/*! For license information please see mng-digisubs.articleShare.bundle.js.LICENSE.txt */ (()=>{var e={7526(e,t){"use strict";t.toByteArray=function(e){var t,n,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),l=0,d=c>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;sc?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;ia)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=s(n);const o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(o)return r?-1:J(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return R(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:A(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):A(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function A(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function R(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return v(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function N(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r,o){W(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function x(e,t,n,r,o){W(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||k(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){P(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,!r){P(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>>=0,!r){const r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function W(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new H.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||X(t,e.length-(n+1))}(r,o,i)}function F(e,t){if("number"!=typeof e)throw new H.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,n){if(Math.floor(e)!==e)throw F(e,n),new H.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new H.ERR_BUFFER_OUT_OF_BOUNDS;throw new H.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}G("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),G("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),G("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=K(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=K(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const j=/[^+/0-9A-Za-z-_]/g;function J(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},251(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,d=n?o-1:0,h=n?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),i-=u}return(f?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<0;e[n+f]=255&a,f+=p,a/=256,u-=8);e[n+f-p]|=128*y}},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,n){var r=n(5546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function c(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return r(c,"_invoke",function(e,r,o){var i,a,s,c=0,l=o||[],d=!1,h={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,a=0,s=t,h.n=n,u}};function f(e,r){for(a=e,s=r,n=0;!d&&c&&!o&&n3?(o=p===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=e<2&&fr||r>p)&&(i[4]=e,i[5]=r,h.n=p,a=0))}if(o||e>1)return u;throw d=!0,r}return function(o,l,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&f(l,p),a=l,s=p;(n=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(c=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(d=h.n<0)?s:e.call(r,h))!==u)break}catch(e){i=t,a=1,s=e}finally{c=1}}return{value:n,done:d}}}(e,i,a),!0),c}var u={};function l(){}function d(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=h.prototype=l.prototype=Object.create(f);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=h,r(p,"constructor",h),r(h,"constructor",d),d.displayName="GeneratorFunction",r(h,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m:y}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,o,i){var a=r(e,t,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1791(e,t,n){var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,a,s){try{var c=t[e](o),u=c.value;return u instanceof r?n.resolve(u.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(u).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),o=n(6993),i=n(5869),a=n(887),s=n(1791),c=n(4373),u=n(579);function l(){"use strict";var t=o(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(p(e),n,r,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(h(t)?a:i)(p(e),t,n,r,o)},keys:c,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},3612(e,t,n){"use strict";var r,o,i,a,s;n.d(t,{A:()=>c}),window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const c={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,enableReaderDashboardv2:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardv2,enableDashboardCancel:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardCancel,enableDashboardBenefitHub:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardBenefitHub,enableEngageArticleGifting:"1"===(null===(r=window.authentication_config)||void 0===r?void 0:r.articleSharingEnabled)&&"1"===(null===(o=window.authentication_config)||void 0===o?void 0:o.isEngageArticleSharing),enableGiftedArticlesLink:"1"===(null===(i=window.authentication_config)||void 0===i?void 0:i.articleSharingEnabled)&&"1"!==(null===(a=window.authentication_config)||void 0===a?void 0:a.isEngageArticleSharing),enableSavedArticlesLink:"1"===(null===(s=window.authentication_config)||void 0===s?void 0:s.articleSavingEnabled),prosperstackClientid:window.authentication_config?window.authentication_config.prosperstackClientid:"",enableUpgradeSubscription:!!window.authentication_config&&"1"===window.authentication_config.enableUpgradeSubscription,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,forceLogoutOnExpiredIdToken:!!window.authentication_config&&"1"===window.authentication_config.forceLogoutOnExpiredIdToken,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog,updatePaymentEnabled:!!window.authentication_config&&"1"===window.authentication_config.enableUpdatePayment}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return atob(t)}}function g(e,t){this.v=e,this.k=t}function w(e,t){(null==t||t>e.length)&&e.length;for(var n=0,r=Array(t);n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return M(this,void 0,void 0,function(){return x(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return M(this,void 0,void 0,function(){var n,r,o,i;return x(this,function(a){switch(a.label){case 0:return n=void 0===this.storageHandler?H:this.storageHandler,r=D+"-"+t,null===(o=n.getItemSync(r))?[2]:(i=JSON.parse(o)).id!==this.id?[3,2]:[4,B.default().lock(i.iat)];case 1:a.sent(),this.acquiredIatSet.delete(i.iat),n.removeItemSync(r),B.default().unlock(i.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,o=[],i=0;;){var a=r.keySync(i);if(null===a)break;o.push(a),i++}for(var s=!1,c=0;c(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;F=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;de=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw te("The input to be decoded is not correctly encoded.",Q,e)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),n=new Uint8Array(t.length);for(let e=0;e0)return;if(t){if(0!==e)throw te("".concat(n," must be a non-negative number"),Q,o);return}throw te("".concat(n," must be a positive number"),Q,o)}catch(e){if(r)throw ge(e.message,r,o);throw e}}function Se(e,t,n,r){try{if("string"!=typeof e)throw te("".concat(t," must be a string"),ee,r);if(0===e.length)throw te("".concat(t," must not be empty"),Q,r)}catch(e){if(n)throw ge(e.message,n,r);throw e}}function be(e){!function(e,t){if(ze(e)!==t)throw function(e){let t='"response" content-type must be ';for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o2){const e=r.pop();"".concat(r.join(", "),", or ").concat(e)}else 2===r.length?"".concat(r[0]," or ").concat(r[1]):r[0];return ge(t,gt,e)}(e,t)}(e,"application/json")}function Te(){return fe(crypto.getRandomValues(new Uint8Array(32)))}function Re(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new pe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new pe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new pe("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new pe("unsupported CryptoKey algorithm name",{cause:e})}}function Ie(e){const t=null==e?void 0:e[re];return"number"==typeof t&&Number.isFinite(t)?t:0}function Oe(e){const t=null==e?void 0:e[oe];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function Ne(){return Math.floor(Date.now()/1e3)}function Ce(e){if("object"!=typeof e||null===e)throw te('"as" must be an object',ee);Se(e.issuer,'"as.issuer"')}function _e(e){if("object"!=typeof e||null===e)throw te('"client" must be an object',ee);Se(e.client_id,'"client.client_id"')}function Le(e){return Se(e,'"clientSecret"'),(t,n,r,o)=>{r.set("client_id",n.client_id),r.set("client_secret",e)}}function ke(e,t){const n=e instanceof CryptoKey?{key:i}:(null==i?void 0:i.key)instanceof CryptoKey?(void 0!==i.kid&&Se(i.kid,'"kid"'),{key:i.key,kid:i.kid}):{},r=n.key,o=n.kid;var i;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw te("".concat(t," must be a CryptoKey"),ee)}(e,t),"private"!==e.type)throw te("".concat(t," must be a private CryptoKey"),Q)}(r,'"clientPrivateKey.key"'),async(e,n,i,a)=>{var s;const c={alg:Re(r),kid:o},u=function(e,t){const n=Ne()+Ie(t);return{jti:Te(),aud:e.issuer,exp:n+60,iat:n,nbf:n,iss:t.client_id,sub:t.client_id}}(e,n);null==t||null===t[ae]||void 0===s||s.call(t,c,u),i.set("client_id",n.client_id),i.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),i.set("client_assertion",await async function(e,t,n){if(!n.usages.includes("sign"))throw te('CryptoKey instances used for signing assertions must include "sign" in their "usages"',Q);const r="".concat(fe(le(JSON.stringify(e))),".").concat(fe(le(JSON.stringify(t)))),o=fe(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Ot(e)};case"RSA-PSS":switch(It(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new pe("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return It(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new pe("unsupported CryptoKey algorithm name",{cause:e})}(n),n,le(r)));return"".concat(r,".").concat(o)}(c,u,r))}}const Pe=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Me(e,t){if(t&&"https:"!==e.protocol)throw ge("only requests to HTTPS are allowed",mt,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw ge("only HTTP and HTTPS requests are allowed",At,e)}function xe(e,t,n,r){let o;if("string"!=typeof e||!Pe(e))throw ge("authorization server metadata does not contain a valid ".concat(n?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?bt:Tt,{attribute:n?"mtls_endpoint_aliases.".concat(t):t});return Me(o,r),o}function Ue(e,t,n,r){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?xe(e.mtls_endpoint_aliases[t],t,n,r):xe(e[t],t,n,r)}class Be extends Error{constructor(e,t){var n;super(e,t),T(this,"cause",void 0),T(this,"code",void 0),T(this,"error",void 0),T(this,"status",void 0),T(this,"error_description",void 0),T(this,"response",void 0),this.name=this.constructor.name,this.code=dt,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===Error.captureStackTrace||void 0===n||n.call(Error,this,this.constructor)}}class De extends Error{constructor(e,t){var n,r;super(e,t),T(this,"cause",void 0),T(this,"code",void 0),T(this,"error",void 0),T(this,"error_description",void 0),this.name=this.constructor.name,this.code=ft,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==t.cause.get("error_description")&&void 0!==n?n:void 0,null===Error.captureStackTrace||void 0===r||r.call(Error,this,this.constructor)}}class He extends Error{constructor(e,t){var n;super(e,t),T(this,"cause",void 0),T(this,"code",void 0),T(this,"response",void 0),T(this,"status",void 0),this.name=this.constructor.name,this.code=lt,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===Error.captureStackTrace||void 0===n||n.call(Error,this,this.constructor)}}const Ge="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Ke="("+Ge+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',We="("+Ge+")\\s*=\\s*("+Ge+")",Fe=new RegExp("^[,\\s]*("+Ge+")"),Xe=new RegExp("^[,\\s]*"+Ke+"[,\\s]*(.*)"),je=new RegExp("^[,\\s]*"+We+"[,\\s]*(.*)"),Je=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Ve(e,t,n){if(e.status!==t){let t;var r;if(function(e){let t;if(function(e){if(!Z(e,Response))throw te('"response" must be an instance of Response',ee);const t=e.headers.get("www-authenticate");if(null===t)return;const n=[];let r=t;for(;r;){var o;let t=r.match(Fe);const c=null===t||void 0===o?void 0:o[1].toLowerCase();if(!c)return;const u=r.substring(t[0].length);if(u&&!u.match(/^[\s,]/))return;const l=u.match(/^\s+(.*)$/),d=!!l;l?l[1]:void 0;const h={};let f;if(d)for(;r;){let n,o;if(r.match(Xe)){var i=N(t,4);if(i[1],i[2],i[3],o.includes("\\"))try{JSON.parse('"'.concat(o,'"'))}catch(e){}h[n.toLowerCase()]=o}else{if(!r.match(je)){if(r.match(Je)){if(Object.keys(h).length)break;var a=N(t,3);a[1],a[2];break}return}var s=N(t,4);s[1],s[2],s[3],h[n.toLowerCase()]=o}}else 0;const p={scheme:c,parameters:h};f&&(p.token68=f),n.push(p)}return n.length?n:void 0}(e))throw new He("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}(e),await async function(e){if(e.status>399&&e.status<500){Rt(e),be(e);try{const t=await e.clone().json();if(we(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===e.body||void 0===r?void 0:r.cancel()),new Be("server responded with an error in the response body",{cause:t,response:e});throw ge('"response" is not a conform '.concat(n," response (unexpected HTTP status code)"),wt,e)}}function Ye(e){if(!ot.has(e))throw te('"options.DPoP" is not a valid DPoPHandle',Q)}function ze(e){var t;return null===e.headers.get("content-type")||void 0===t?void 0:t.split(";")[0]}async function qe(e,t,n,r,o,i,a){return await n(e,t,o,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==a?void 0:a[ie])||fetch)(r.href,{body:o,headers:Object.fromEntries(i.entries()),method:"POST",redirect:"manual",signal:Ae(r,null==a?void 0:a.signal)})}async function Ze(e,t,n,r,o,i){var a;const s=Ue(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==i?void 0:i[ne]));o.set("grant_type",r);const c=me(null==i?void 0:i.headers);c.set("accept","application/json"),void 0!==(null==i?void 0:i.DPoP)&&(Ye(i.DPoP),await i.DPoP.addProof(s,c,"POST"));const u=await qe(e,t,n,s,o,c,i);return null==i||null===i.DPoP||void 0===a||a.cacheNonce(u,s),u}const Qe=new WeakMap,$e=new WeakMap;function et(e){if(!e.id_token)return;const t=Qe.get(e);if(!t)throw te('"ref" was already garbage collected or did not resolve from the proper sources',Q);return t}async function tt(e,t,n,r,o,i){if(Ce(e),_e(t),!Z(n,Response))throw te('"response" must be an instance of Response',ee);await Ve(n,200,"Token Endpoint"),Rt(n);const a=await kt(n);if(Se(a.access_token,'"response" body "access_token" property',yt,{body:a}),Se(a.token_type,'"response" body "token_type" property',yt,{body:a}),a.token_type=a.token_type.toLowerCase(),void 0!==a.expires_in){let e="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;ve(e,!0,'"response" body "expires_in" property',yt,{body:a}),a.expires_in=e}if(void 0!==a.refresh_token&&Se(a.refresh_token,'"response" body "refresh_token" property',yt,{body:a}),void 0!==a.scope&&"string"!=typeof a.scope)throw ge('"response" body "scope" property must be a string',yt,{body:a});if(void 0!==a.id_token){Se(a.id_token,'"response" body "id_token" property',yt,{body:a});const i=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&i.push("auth_time"),void 0!==t.default_max_age&&(ve(t.default_max_age,!0,'"client.default_max_age"'),i.push("auth_time")),null!=r&&r.length&&i.push(...r);const s=await async function(e,t,n,r,o){let i,a,s=e.split("."),c=s[0],u=s[1],l=s.length;if(5===l){if(void 0===o)throw new pe("JWE decryption is not configured",{cause:e});var d=(await o(e)).split(".");d[0],d[1],d.length}if(3!==l)throw ge("Invalid JWT",yt,e);try{JSON.parse(le(fe(c)))}catch(e){throw ge("failed to parse JWT Header body as base64url encoded JSON",pt,e)}if(!we(i))throw ge("JWT Header must be a top level object",yt,e);if(t(i),void 0!==i.crit)throw new pe('no JWT "crit" header parameter extensions are supported',{cause:{header:i}});try{JSON.parse(le(fe(u)))}catch(e){throw ge("failed to parse JWT Payload body as base64url encoded JSON",pt,e)}if(!we(a))throw ge("JWT Payload must be a top level object",yt,e);const h=Ne()+n;if(void 0!==a.exp){if("number"!=typeof a.exp)throw ge('unexpected JWT "exp" (expiration time) claim type',yt,{claims:a});if(a.exp<=h-r)throw ge('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Et,{claims:a,now:h,tolerance:r,claim:"exp"})}if(void 0!==a.iat&&"number"!=typeof a.iat)throw ge('unexpected JWT "iat" (issued at) claim type',yt,{claims:a});if(void 0!==a.iss&&"string"!=typeof a.iss)throw ge('unexpected JWT "iss" (issuer) claim type',yt,{claims:a});if(void 0!==a.nbf){if("number"!=typeof a.nbf)throw ge('unexpected JWT "nbf" (not before) claim type',yt,{claims:a});if(a.nbf>h+r)throw ge('unexpected JWT "nbf" (not before) claim value',Et,{claims:a,now:h,tolerance:r,claim:"nbf"})}if(void 0!==a.aud&&"string"!=typeof a.aud&&!Array.isArray(a.aud))throw ge('unexpected JWT "aud" (audience) claim type',yt,{claims:a});return{header:i,claims:a,jwt:e}}(a.id_token,Nt.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Ie(t),Oe(t),o).then(st.bind(void 0,i)).then(rt.bind(void 0,e)).then(nt.bind(void 0,t.client_id)),c=s.claims,u=s.jwt;if(Array.isArray(c.aud)&&1!==c.aud.length){if(void 0===c.azp)throw ge('ID Token "aud" (audience) claim includes additional untrusted audiences',vt,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw ge('unexpected ID Token "azp" (authorized party) claim value',vt,{expected:t.client_id,claims:c,claim:"azp"})}void 0!==c.auth_time&&ve(c.auth_time,!0,'ID Token "auth_time" (authentication time)',yt,{claims:c}),$e.set(n,u),Qe.set(a,c)}if(void 0!==(null==i?void 0:i[a.token_type]))i[a.token_type](n,a);else if("dpop"!==a.token_type&&"bearer"!==a.token_type)throw new pe("unsupported `token_type` value",{cause:{body:a}});return a}function nt(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw ge('unexpected JWT "aud" (audience) claim value',vt,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw ge('unexpected JWT "aud" (audience) claim value',vt,{expected:e,claims:t.claims,claim:"aud"});return t}function rt(e,t){var n,r;const o=null!==(null===e[Mt]||void 0===r?void 0:r.call(e,t))&&void 0!==n?n:e.issuer;if(t.claims.iss!==o)throw ge('unexpected JWT "iss" (issuer) claim value',vt,{expected:o,claims:t.claims,claim:"iss"});return t}const ot=new WeakSet,it=Symbol(),at={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function st(e,t){for(const n of e)if(void 0===t.claims[n])throw ge('JWT "'.concat(n,'" (').concat(at[n],") claim missing"),yt,{claims:t.claims});return t}const ct=Symbol(),ut=Symbol();const lt="OAUTH_WWW_AUTHENTICATE_CHALLENGE",dt="OAUTH_RESPONSE_BODY_ERROR",ht="OAUTH_UNSUPPORTED_OPERATION",ft="OAUTH_AUTHORIZATION_RESPONSE_ERROR",pt="OAUTH_PARSE_ERROR",yt="OAUTH_INVALID_RESPONSE",gt="OAUTH_RESPONSE_IS_NOT_JSON",wt="OAUTH_RESPONSE_IS_NOT_CONFORM",mt="OAUTH_HTTP_REQUEST_FORBIDDEN",At="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Et="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",vt="OAUTH_JWT_CLAIM_COMPARISON_FAILED",St="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",bt="OAUTH_MISSING_SERVER_METADATA",Tt="OAUTH_INVALID_SERVER_METADATA";function Rt(e){if(e.bodyUsed)throw te('"response" body has been used already',Q)}function It(e){const t=e.algorithm;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new pe("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Ot(e){switch(e.algorithm.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new pe("unsupported ECDSA namedCurve",{cause:e})}}function Nt(e,t,n,r){if(void 0===e)if(Array.isArray(t)){if(!t.includes(r.alg))throw ge('unexpected JWT "alg" header parameter',yt,{header:r,expected:t,reason:"authorization server metadata"})}else{if(void 0===n)throw ge('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:n});if("string"==typeof n?r.alg!==n:"function"==typeof n?!n(r.alg):!n.includes(r.alg))throw ge('unexpected JWT "alg" header parameter',yt,{header:r,expected:n,reason:"default value"})}else if("string"==typeof e?r.alg!==e:!e.includes(r.alg))throw ge('unexpected JWT "alg" header parameter',yt,{header:r,expected:e,reason:"client configuration"})}function Ct(e,t){const n=e.getAll(t),r=n[0];if(n.length>1)throw ge('"'.concat(t,'" parameter must be provided only once'),yt);return r}const _t=Symbol(),Lt=Symbol();async function kt(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;try{await e.json()}catch(t){throw n(e),ge('failed to parse "response" body as JSON',pt,t)}if(!we(t))throw ge('"response" body must be a top level object',yt,{body:t});return t}const Pt=Symbol(),Mt=Symbol(),xt=new TextEncoder,Ut=new TextDecoder;function Bt(e){const t=new Uint8Array(e.length);for(let n=0;n127)throw new TypeError("non-ASCII string encountered in encode()");t[n]=r}return t}function Dt(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))},Kt=(e,t)=>e.name===t;function Wt(e,t){var n;if(e.hash,parseInt(n.name.slice(4),10)!==t)throw Gt("SHA-".concat(t),"algorithm.hash")}function Ft(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2){const t=r.pop();e+="one of type ".concat(r.join(", "),", or ").concat(t,".")}else 2===r.length?e+="one of type ".concat(r[0]," or ").concat(r[1],"."):e+="of type ".concat(r[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var i;null!==(i=t.constructor)&&void 0!==i&&i.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const Xt=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o2&&void 0!==arguments[2]?arguments[2]:"unspecified",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:n,reason:r,payload:t}}),T(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),T(this,"claim",void 0),T(this,"reason",void 0),T(this,"payload",void 0),this.claim=n,this.reason=r,this.payload=t}}T(Jt,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class Vt extends jt{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:n,reason:r,payload:t}}),T(this,"code","ERR_JWT_EXPIRED"),T(this,"claim",void 0),T(this,"reason",void 0),T(this,"payload",void 0),this.claim=n,this.reason=r,this.payload=t}}T(Vt,"code","ERR_JWT_EXPIRED");class Yt extends jt{constructor(){super(...arguments),T(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}T(Yt,"code","ERR_JOSE_ALG_NOT_ALLOWED");class zt extends jt{constructor(){super(...arguments),T(this,"code","ERR_JOSE_NOT_SUPPORTED")}}T(zt,"code","ERR_JOSE_NOT_SUPPORTED"),T(class extends jt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),T(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),T(class extends jt{constructor(){super(...arguments),T(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class qt extends jt{constructor(){super(...arguments),T(this,"code","ERR_JWS_INVALID")}}T(qt,"code","ERR_JWS_INVALID");class Zt extends jt{constructor(){super(...arguments),T(this,"code","ERR_JWT_INVALID")}}T(Zt,"code","ERR_JWT_INVALID"),T(class extends jt{constructor(){super(...arguments),T(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Qt extends jt{constructor(){super(...arguments),T(this,"code","ERR_JWKS_INVALID")}}T(Qt,"code","ERR_JWKS_INVALID");class $t extends jt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),T(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}T($t,"code","ERR_JWKS_NO_MATCHING_KEY");class en extends jt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),T(this,Symbol.asyncIterator,void 0),T(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}T(en,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class tn extends jt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),T(this,"code","ERR_JWKS_TIMEOUT")}}T(tn,"code","ERR_JWKS_TIMEOUT");class nn extends jt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),T(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}T(nn,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const rn=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},on=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),an=e=>rn(e)||on(e);function sn(e,t,n){try{return Ht(e)}catch(e){throw new n("Failed to base64url decode the ".concat(t))}}function cn(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let n=e;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(e)===n}const un=e=>cn(e)&&"string"==typeof e.kty;async function ln(e,t,n){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r3&&void 0!==arguments[3]&&arguments[3];pn||(pn=new WeakMap);let o=pn.get(e);if(null!=o&&o[n])return o[n];const i=await hn(I(I({},t),{},{alg:n}));return r&&Object.freeze(e),o?o[n]=i:pn.set(e,{[n]:i}),i};const gn=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let n=0;n{const t=e.data[e.pos++];if(128&t){const n=127&t;let r=0;for(let t=0;t{if(e.data[e.pos++]!==t)throw new Error(n)},An=(e,t)=>{const n=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,n},En=(e,t,n)=>{var r;const o=(e=>Dt(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);let i=n;return null!=t&&null!==(r=t.startsWith)&&void 0!==r&&r.call(t,"ECDH-ES")&&(i||(i={}),i.getNamedCurve=e=>{const t={data:e,pos:0};return function(e){mn(e,48,"Invalid PKCS#8 structure"),wn(e),mn(e,2,"Expected version field");const t=wn(e);e.pos+=t,mn(e,48,"Expected algorithm identifier");wn(e);e.pos}(t),(e=>{const t=(e=>{mn(e,6,"Expected algorithm OID");const t=wn(e);return An(e,t)})(e);if(gn(t,[43,101,110]))return"X25519";if(!gn(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");mn(e,6,"Expected curve OID");const n=wn(e),r=An(e,n);for(const e of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}]){const t=e.name,n=e.oid;if(gn(r,n))return t}throw new Error("Unsupported named curve")})(t)}),(async(e,t,n,r)=>{var o;let i,a;const s="spki"===e,c=()=>s?["verify"]:["sign"];switch(n){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(n.slice(-3))},a=c();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(n.slice(-3),10)||1)},a=s?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":i={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[n]},a=c();break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const e=r.getNamedCurve(t);i="X25519"===e?{name:"X25519"}:{name:"ECDH",namedCurve:e}}catch(e){throw new zt("Invalid or unsupported key format")}a=s?[]:["deriveBits"];break;case"Ed25519":case"EdDSA":i={name:"Ed25519"},a=c();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":i={name:n},a=c();break;default:throw new zt('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,i,null!==(o=null==r?void 0:r.extractable)&&void 0!==o?o:!!s,a)})("pkcs8",o,t,i)},vn=e=>null==e?void 0:e[Symbol.toStringTag],Sn=(e,t,n)=>{if(void 0!==t.use){let e;switch(n){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var r,o;let i;switch(!0){case"sign"===n||"verify"===n:case"dir"===e:case e.includes("CBC-HS"):i=n;break;case e.startsWith("PBES2"):i="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):i=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===n?"wrapKey":"unwrapKey":n;break;case"encrypt"===n&&e.startsWith("RSA"):i="wrapKey";break;case"decrypt"===n:i=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(i&&!1===(null===(r=t.key_ops)||void 0===r||null===(o=r.includes)||void 0===o?void 0:o.call(r,i)))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(i,'" when present'))}return!0};var bn,Tn;let Rn,In;if("undefined"==typeof navigator||null===(bn=navigator.userAgent)||void 0===bn||null===(Tn=bn.startsWith)||void 0===Tn||!Tn.call(bn,"Mozilla/5.0 ")){const e="v6.8.4";In="".concat("openid-client","/").concat(e),Rn={"user-agent":In}}const On=e=>Nn.get(e);let Nn,Cn;function _n(e){return void 0!==e?Le(e):(Cn||(Cn=new WeakMap),(e,t,n,r)=>{let o;return(o=Cn.get(t))||(function(e,t){if("string"!=typeof e)throw Mn("".concat(t," must be a string"),Pn);if(0===e.length)throw Mn("".concat(t," must not be empty"),kn)}(t.client_secret,'"metadata.client_secret"'),o=Le(t.client_secret),Cn.set(t,o)),o(e,t,n,r)})}const Ln=ie,kn="ERR_INVALID_ARG_VALUE",Pn="ERR_INVALID_ARG_TYPE";function Mn(e,t,n){const r=new TypeError(e,{cause:n});return Object.assign(r,{code:t}),r}class xn extends Error{constructor(e,t){var n;super(e,t),T(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===Error.captureStackTrace||void 0===n||n.call(Error,this,this.constructor)}}function Un(e,t,n){return new xn(e,{cause:t,code:n})}function Bn(e){if(e instanceof TypeError||e instanceof xn||e instanceof Be||e instanceof De||e instanceof He)throw e;if(e instanceof ye)switch(e.code){case mt:throw Un("only requests to HTTPS are allowed",e,e.code);case At:throw Un("only requests to HTTP or HTTPS are allowed",e,e.code);case wt:throw Un("unexpected HTTP response status code",e.cause,e.code);case gt:throw Un("unexpected response content-type",e.cause,e.code);case pt:throw Un("parsing error occured",e,e.code);case yt:throw Un("invalid response encountered",e,e.code);case vt:throw Un("unexpected JWT claim value encountered",e,e.code);case St:throw Un("unexpected JSON attribute value encountered",e,e.code);case Et:throw Un("JWT timestamp claim value failed validation",e,e.code);default:throw Un(e.message,e,e.code)}if(e instanceof pe)throw Un("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Un("runtime operation error",e,ht);case"NotSupportedError":throw Un("runtime unsupported operation",e,ht);case"TimeoutError":throw Un("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Un("operation aborted",e,"OAUTH_ABORT")}throw new xn("something went wrong",{cause:e})}async function Dn(e,t,n,r,o){const i=await async function(e,t){var n,r;if(!(e instanceof URL))throw Mn('"server" must be an instance of URL',Pn);const o=!e.href.includes("/.well-known/"),i=null!==(null==t?void 0:t.timeout)&&void 0!==n?n:30,a=AbortSignal.timeout(1e3*i),s=await(o?async function(e,t){return async function(e,t,n,r){if(!(e instanceof URL))throw te('"'.concat("issuerIdentifier",'" must be an instance of URL'),ee);Me(e,!0!==(null==r?void 0:r[ne]));const o=n(new URL(e.href)),i=me(null==r?void 0:r.headers);return i.set("accept","application/json"),((null==r?void 0:r[ie])||fetch)(o.href,{body:void 0,headers:Object.fromEntries(i.entries()),method:"GET",redirect:"manual",signal:Ae(o,null==r?void 0:r.signal)})}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=Ee("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=Ee("".concat(t,"/").concat(n?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw te('"options.algorithm" must be "oidc" (default), or "oauth2"',Q)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[ie]:null==t?void 0:t[Ln],[ne]:null==t||null===t.execute||void 0===r?void 0:r.includes(Jn),signal:a,headers:new Headers(Rn)}):((null==t?void 0:t[Ln])||fetch)((Me(e,null==t||null===t.execute||void 0===c||!c.includes(Jn)),e.href),{headers:Object.fromEntries(new Headers(I({accept:"application/json"},Rn)).entries()),body:void 0,method:"GET",redirect:"manual",signal:a})).then(e=>async function(e,t){const n=e;if(!(n instanceof URL)&&n!==Pt)throw te('"expectedIssuerIdentifier" must be an instance of URL',ee);if(!Z(t,Response))throw te('"response" must be an instance of Response',ee);if(200!==t.status)throw ge('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',wt,t);Rt(t);const r=await kt(t);if(Se(r.issuer,'"response" body "issuer" property',yt,{body:r}),n!==Pt&&new URL(r.issuer).href!==n.href)throw ge('"response" body "issuer" property does not match the expected value',St,{expected:n.href,body:r,attribute:"issuer"});return r}(Pt,e)).catch(Bn);var c;return o&&new URL(s.issuer).href!==e.href&&(function(e,t,n){return!("https://login.microsoftonline.com"!==e.origin||null!=n&&n.algorithm&&"oidc"!==n.algorithm||(t[Hn]=!0,0))}(e,s,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new xn("discovered metadata issuer does not match the expected issuer",{code:St,cause:{expected:e.href,body:s,attribute:"issuer"}})})()),s}(e,o),a=new Gn(i,t,n,r);let s=On(a);if(null!=o&&o[Ln]&&(s.fetch=o[Ln]),null!=o&&o.timeout&&(s.timeout=o.timeout),null!=o&&o.execute)for(const e of o.execute)e(a);return a}new TextDecoder;const Hn=Symbol();class Gn{constructor(e,t,n,r){var o,i,a,s,c;if("string"!=typeof t||!t.length)throw Mn('"clientId" must be a non-empty string',Pn);if("string"==typeof n&&(n={client_secret:n}),void 0!==(null===(o=n)||void 0===o?void 0:o.client_id)&&t!==n.client_id)throw Mn('"clientId" and "metadata.client_id" must be the same',kn);const u=I(I({},structuredClone(n)),{},{client_id:t});let l;u[re]=null!==(i=null===(a=n)||void 0===a?void 0:a[re])&&void 0!==i?i:0,u[oe]=null!==(s=null===(c=n)||void 0===c?void 0:c[oe])&&void 0!==s?s:30,l=r||("string"==typeof u.client_secret&&u.client_secret.length?_n(u.client_secret):(e,t,n,r)=>{n.set("client_id",t.client_id)});let d=Object.freeze(u);const h=structuredClone(e);Hn in e&&(h[Mt]=t=>{let n=t.claims.tid;return e.issuer.replace("{tenantid}",n)});let f=Object.freeze(h);Nn||(Nn=new WeakMap),Nn.set(this,{__proto__:null,as:f,c:d,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(On(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(n))}}}}(e))}(e),e}clientMetadata(){return structuredClone(On(this).c)}get timeout(){return On(this).timeout}set timeout(e){On(this).timeout=e}get[Ln](){return On(this).fetch}set[Ln](e){On(this).fetch=e}}function Kn(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const t=new Date;t.setSeconds(t.getSeconds()+e.expires_in),t.getTime()}return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return et(this)}catch(e){return}}}}}(e))}async function Wn(e,t,n){var r;let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=null===e.headers.get("retry-after")||void 0===r?void 0:r.trim();if(void 0===i)return;let a;if(/^\d+$/.test(i))parseInt(i,10);else{const e=new Date(i);if(Number.isFinite(e.getTime())){const t=new Date,n=e.getTime()-t.getTime();n>0&&Math.ceil(n/1e3)}}if(o&&!Number.isFinite(a))throw new ye("invalid Retry-After header value",{cause:e});a>t&&await Fn(a-t,n)}function Fn(e,t){return new Promise((n,r)=>{const o=e=>{try{t.throwIfAborted()}catch(e){return void r(e)}if(e<=0)return void n();const i=Math.min(e,5);setTimeout(()=>o(e-i),1e3*i)};o(e)})}async function Xn(e,t){Qn(e);const n=On(e),r=n.as,o=n.c,i=n.auth,a=n.fetch,s=n.tlsOnly,c=n.timeout;return async function(e,t,n,r,o){Ce(e),_e(t);const i=Ue(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[ne])),a=new URLSearchParams(r);a.set("client_id",t.client_id);const s=me(null==o?void 0:o.headers);return s.set("accept","application/json"),qe(e,t,n,i,a,s,o)}(r,o,i,t,{[ie]:a,[ne]:!s,headers:new Headers(Rn),signal:$n(c)}).then(e=>async function(e,t,n){if(Ce(e),_e(t),!Z(n,Response))throw te('"response" must be an instance of Response',ee);await Ve(n,200,"Backchannel Authentication Endpoint"),Rt(n);const r=await kt(n);Se(r.auth_req_id,'"response" body "auth_req_id" property',yt,{body:r});let o="number"!=typeof r.expires_in?parseFloat(r.expires_in):r.expires_in;return ve(o,!0,'"response" body "expires_in" property',yt,{body:r}),r.expires_in=o,void 0!==r.interval&&ve(r.interval,!1,'"response" body "interval" property',yt,{body:r}),r}(r,o,e)).catch(Bn)}async function jn(e,t,n,r){var o,i;Qn(e),new URLSearchParams(n);let a=null!==t.interval&&void 0!==o?o:5;const s=null!==(null==r?void 0:r.signal)&&void 0!==i?i:AbortSignal.timeout(1e3*t.expires_in);try{await Fn(a,s)}catch(e){Bn(e)}const c=On(e),u=c.as,l=c.c,d=c.auth,h=c.fetch,f=c.tlsOnly,p=c.nonRepudiation,y=c.timeout,g=c.decrypt,w=(o,i)=>jn(e,I(I({},t),{},{interval:o}),n,I(I({},r),{},{signal:s,flag:i})),m=function(e,t){const n=$n(t);if(!n)return{signal:e,cleanup(){}};const r=new AbortController,o=e=>{const t=e.target;r.abort(t.reason)};return e.aborted?r.abort(e.reason):n.aborted?r.abort(n.reason):(e.addEventListener("abort",o,{once:!0}),n.addEventListener("abort",o,{once:!0})),{signal:r.signal,cleanup(){e.removeEventListener("abort",o),n.removeEventListener("abort",o)}}}(s,y),A=await async function(e,t,n,r,o){Ce(e),_e(t),Se(r,'"authReqId"');const i=new URLSearchParams(null==o?void 0:o.additionalParameters);return i.set("auth_req_id",r),Ze(e,t,n,"urn:openid:params:grant-type:ciba",i,o)}(u,l,d,t.auth_req_id,{[ie]:h,[ne]:!f,additionalParameters:n,DPoP:null==r?void 0:r.DPoP,headers:new Headers(Rn),signal:m.signal}).catch(Bn).finally(m.cleanup);var E;if(503===A.status&&A.headers.has("retry-after"))return await Wn(A,a,s,!0),await(null===A.body||void 0===E?void 0:E.cancel()),w(a);const v=async function(e,t,n,r){return tt(e,t,n,void 0,null==r?void 0:r[se],null==r?void 0:r.recognizedTokenTypes)}(u,l,A,{[se]:g});let S;try{await v}catch(e){if(er(e,r))return w(a,tr);if(e instanceof Be)switch(e.error){case"slow_down":0;case"authorization_pending":return await Wn(e.response,a,s),w(a)}Bn(e)}return S.id_token&&await(null==p?void 0:p(A)),Kn(S),S}function Jn(e){On(e).tlsOnly=!1}async function Vn(e,t,n,r,o){if(Qn(e),!((null==o?void 0:o.flag)===tr||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Mn('"currentUrl" must be an instance of URL, or Request',Pn);let i,a;const s=On(e),c=s.as,u=s.c,l=s.auth,d=s.fetch,h=s.tlsOnly,f=s.jarm,p=s.hybrid,y=s.nonRepudiation,g=s.timeout,w=s.decrypt,m=s.implicit;if((null==o?void 0:o.flag)===tr)o.authResponse,o.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(new URL(t.url),e.method){case"GET":break;case"POST":const n=new URLSearchParams(await async function(e){if("POST"!==e.method)throw te("form_post responses are expected to use the POST method",Q,{cause:e});if("application/x-www-form-urlencoded"!==ze(e))throw te("form_post responses are expected to use the application/x-www-form-urlencoded content-type",Q,{cause:e});return async function(e){if(e.bodyUsed)throw te("form_post Request instances must contain a readable body",Q,{cause:e});return e.text()}(e)}(e));if(p)t.hash=n.toString();else for(const e of n.entries()){var A=N(e,2);const n=A[0],r=A[1];t.searchParams.append(n,r)}break;default:throw Mn("unexpected Request HTTP method",kn)}}switch(function(e){return new URL(e).search="",e.hash="",e.href}(t),!0){case!!f:await f(t,null==n?void 0:n.expectedState);break;case!!p:await p(t,null==n?void 0:n.expectedNonce,null==n?void 0:n.expectedState,null==n?void 0:n.maxAge);break;case!!m:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{(function(e,t,n,r){if(Ce(e),_e(t),n instanceof URL&&n.searchParams,!(n instanceof URLSearchParams))throw te('"parameters" must be an instance of URLSearchParams, or URL',ee);if(Ct(n,"response"))throw ge('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',yt,{parameters:n});const o=Ct(n,"iss"),i=Ct(n,"state");if(!o&&e.authorization_response_iss_parameter_supported)throw ge('response parameter "iss" (issuer) missing',yt,{parameters:n});if(o&&o!==e.issuer)throw ge('unexpected "iss" (issuer) response parameter value',yt,{expected:e.issuer,parameters:n});switch(r){case void 0:case Lt:if(void 0!==i)throw ge('unexpected "state" response parameter encountered',yt,{expected:void 0,parameters:n});break;case _t:break;default:if(Se(r,'"expectedState" argument'),i!==r)throw ge(void 0===i?'response parameter "state" missing':'unexpected "state" response parameter value',yt,{expected:r,parameters:n})}if(Ct(n,"error"))throw new De("authorization response from the server is an error",{cause:n});const a=Ct(n,"id_token"),s=Ct(n,"token");if(void 0!==a||void 0!==s)throw new pe("implicit and hybrid flows are not supported");return new URLSearchParams(n),ot.add(c),c;var c})(c,u,t.searchParams,null==n?void 0:n.expectedState)}catch(e){Bn(e)}}}const E=await async function(e,t,n,r,o,i,a){if(Ce(e),_e(t),!ot.has(r))throw te('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',Q);Se(o,'"redirectUri"');const s=Ct(r,"code");if(!s)throw ge('no authorization code in "callbackParameters"',yt);const c=new URLSearchParams(null==a?void 0:a.additionalParameters);return c.set("redirect_uri",o),c.set("code",s),i!==it&&(Se(i,'"codeVerifier"'),c.set("code_verifier",i)),Ze(e,t,n,"authorization_code",c,a)}(c,u,l,i,a,(null==n?void 0:n.pkceCodeVerifier)||it,{additionalParameters:r,[ie]:d,[ne]:!h,DPoP:null==o?void 0:o.DPoP,headers:new Headers(Rn),signal:$n(g)}).catch(Bn);"string"!=typeof(null==n?void 0:n.expectedNonce)&&"number"!=typeof(null==n?void 0:n.maxAge)||(n.idTokenExpected=!0);const v=async function(e,t,n,r){return"string"==typeof(null==r?void 0:r.expectedNonce)||"number"==typeof(null==r?void 0:r.maxAge)||null!=r&&r.requireIdToken?async function(e,t,n,r,o,i,a){const s=[];switch(r){case void 0:0;break;case ct:break;default:Se(r,'"expectedNonce" argument'),s.push("nonce")}switch(null!=o||t.default_max_age,o){case void 0:0;break;case ut:break;default:ve(o,!0,'"maxAge" argument'),s.push("auth_time")}const c=await tt(e,t,n,s,i,a);Se(c.id_token,'"response" body "id_token" property',yt,{body:c});const u=et(c);if(o!==ut){const e=Ne()+Ie(t),n=Oe(t);if(u.auth_time+o{}};const y=async function(e,t,n,r){return tt(e,t,n,void 0,null==r?void 0:r[se],null==r?void 0:r.recognizedTokenTypes)}(i,a,f,{[se]:d,recognizedTokenTypes:p});let g;try{await y}catch(o){if(er(o,r))return nr(e,t,n,I(I({},r),{},{flag:tr}));Bn(o)}return g.id_token&&await(null==h?void 0:h(f)),Kn(g),g}async function rr(e,t,n){if(!cn(e))throw new qt("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new qt('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new qt("JWS Protected Header incorrect type");if(void 0===e.payload)throw new qt("JWS Payload missing");if("string"!=typeof e.signature)throw new qt("JWS Signature missing or incorrect type");if(void 0!==e.header&&!cn(e.header))throw new qt("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const t=Ht(e.protected);JSON.parse(Ut.decode(t))}catch(e){throw new qt("JWS Protected Header is invalid")}if(!function(){for(var e=arguments.length,t=new Array(e),n=0;n"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;void 0!==n?new Map([...Object.entries(n),...t.entries()]):t;for(const t of r.crit){if(!i.has(t))throw new zt('Extension Header Parameter "'.concat(t,'" is not recognized'));if(void 0===o[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(i.get(t)&&void 0===r[t])throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return new Set(r.crit)}(qt,new Map([["b64",!0]]),null==n?void 0:n.crit,r,o);let a=!0;if(i.has("b64")&&(r.b64,"boolean"!=typeof a))throw new qt('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const s=o.alg;if("string"!=typeof s||!s)throw new qt('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=n&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat("algorithms",'" option must be an array of strings'));if(t)return new Set(t)}(0,n.algorithms);if(c&&!c.has(s))throw new Yt('"alg" (Algorithm) Header Parameter value not allowed');if(a){if("string"!=typeof e.payload)throw new qt("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new qt("JWS Payload must be a string or an Uint8Array instance");let u=!1;"function"==typeof t&&(await t(r,e),!0),function(e,t,n){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((e,t,n)=>{if(!(t instanceof Uint8Array)){if(un(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&Sn(e,t,n))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!an(t))throw new TypeError(Xt(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(vn(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,n);break;default:((e,t,n)=>{if(un(t))switch(n){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&Sn(e,t,n))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv)(t)&&Sn(e,t,n))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!an(t))throw new TypeError(Xt(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(vn(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(n){case"sign":throw new TypeError("".concat(vn(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(vn(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(n){case"verify":throw new TypeError("".concat(vn(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(vn(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,n)}}(s,t,"verify");const l=function(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.length,0),o=new Uint8Array(r);let i=0;for(const e of t)o.set(e,i),e.length;return o}(void 0!==e.protected?Bt(e.protected):new Uint8Array,Bt("."),"string"==typeof e.payload?a?Bt(e.payload):xt.encode(e.payload):e.payload),d=sn(e.signature,"signature",qt),h=await async function(e,t){if(e instanceof Uint8Array)return e;if(rn(e))return e;if(on(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{pn||(pn=new WeakMap);let n=pn.get(e);if(null!=n&&n[t])return n[t];const r="public"===e.type,o=!!r;let i;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError(fn)}e.toCryptoKey(e.asymmetricKeyType,o,r?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(fn);e.toCryptoKey(e.asymmetricKeyType,o,[r?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw new TypeError(fn);e.toCryptoKey(e.asymmetricKeyType,o,[r?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let n;switch(t){case"RSA-OAEP":0;break;case"RS256":case"PS256":case"RSA-OAEP-256":0;break;case"RS384":case"PS384":case"RSA-OAEP-384":0;break;case"RS512":case"PS512":case"RSA-OAEP-512":0;break;default:throw new TypeError(fn)}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:n},o,r?["encrypt"]:["decrypt"]);e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:n},o,[r?"verify":"sign"])}if("ec"===e.asymmetricKeyType){var a;const n=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(null===e.asymmetricKeyDetails||void 0===a?void 0:a.namedCurve);if(!n)throw new TypeError(fn);const i={ES256:"P-256",ES384:"P-384",ES512:"P-521"};i[t]&&n===i[t]&&e.toCryptoKey({name:"ECDSA",namedCurve:n},o,[r?"verify":"sign"]),t.startsWith("ECDH-ES")&&e.toCryptoKey({name:"ECDH",namedCurve:n},o,r?[]:["deriveBits"])}if(!i)throw new TypeError(fn);return n?n[t]=i:pn.set(e,{[t]:i}),i})(e,t)}catch(e){if(e instanceof TypeError)throw e}let n=e.export({format:"jwk"});return yn(e,n,t)}if(un(e))return e.k?Ht(e.k):yn(e,e,t,!0);throw new Error("unreachable")}(t,s);if(!await async function(e,t,n,r){const o=await ln(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){const n=t.algorithm.modulusLength;if("number"!=typeof n||n<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}}(e,o);const i=function(e,t){const n="SHA-".concat(e.slice(-3));switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new zt("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}(e,o.algorithm);try{return await crypto.subtle.verify(i,o,n,r)}catch(e){return!1}}(s,h,d,l))throw new nn;let f;a?sn(e.payload,"payload",qt):"string"==typeof e.payload?xt.encode(e.payload):e.payload;const p={payload:f};return void 0!==e.protected&&(p.protectedHeader=r),void 0!==e.header&&(p.unprotectedHeader=e.header),u?I(I({},p),{},{key:h}):p}const or=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function ir(e){const t=or.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const n=parseFloat(t[2]);let r;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":Math.round(n);break;case"minute":case"minutes":case"min":case"mins":case"m":Math.round(60*n);break;case"hour":case"hours":case"hr":case"hrs":case"h":Math.round(3600*n);break;case"day":case"days":case"d":Math.round(86400*n);break;case"week":case"weeks":case"w":Math.round(604800*n);break;default:Math.round(31557600*n)}return"-"===t[1]||"ago"===t[4]?-r:r}const ar=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function sr(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{JSON.parse(Ut.decode(t))}catch(e){}if(!cn(n))throw new Zt("JWT Claims Set must be a top-level JSON object");const o=r.typ;if(o&&("string"!=typeof e.typ||ar(e.typ)!==ar(o)))throw new Jt('unexpected "typ" JWT header value',n,"typ","check_failed");const i=r.requiredClaims,a=void 0===i?[]:i,s=r.issuer,c=r.subject,u=r.audience,l=r.maxTokenAge,d=[...a];void 0!==l&&d.push("iat"),void 0!==u&&d.push("aud"),void 0!==c&&d.push("sub"),void 0!==s&&d.push("iss");for(const e of new Set(d.reverse()))if(!(e in n))throw new Jt('missing required "'.concat(e,'" claim'),n,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(n.iss))throw new Jt('unexpected "iss" claim value',n,"iss","check_failed");if(c&&n.sub!==c)throw new Jt('unexpected "sub" claim value',n,"sub","check_failed");if(u&&!("string"==typeof n.aud?f.includes(h):Array.isArray(h)&&f.some(Set.prototype.has.bind(new Set(h)))))throw new Jt('unexpected "aud" claim value',n,"aud","check_failed");var h,f;let p;switch(typeof r.clockTolerance){case"string":ir(r.clockTolerance);break;case"number":r.clockTolerance;break;case"undefined":0;break;default:throw new TypeError("Invalid clockTolerance option type")}const y=(r.currentDate||new Date,Math.floor(g.getTime()/1e3));var g;if((void 0!==n.iat||l)&&"number"!=typeof n.iat)throw new Jt('"iat" claim must be a number',n,"iat","invalid");if(void 0!==n.nbf){if("number"!=typeof n.nbf)throw new Jt('"nbf" claim must be a number',n,"nbf","invalid");if(n.nbf>y+p)throw new Jt('"nbf" claim timestamp check failed',n,"nbf","check_failed")}if(void 0!==n.exp){if("number"!=typeof n.exp)throw new Jt('"exp" claim must be a number',n,"exp","invalid");if(n.exp<=y-p)throw new Vt('"exp" claim timestamp check failed',n,"exp","check_failed")}if(l){const e=y-n.iat;if(e-p>("number"==typeof l?l:ir(l)))throw new Vt('"iat" claim timestamp check failed (too far in the past)',n,"iat","check_failed");if(e<0-p)throw new Jt('"iat" claim timestamp check failed (it should be in the past)',n,"iat","check_failed")}return n}function cr(e){return cn(e)}var ur,lr,dr=new WeakMap,hr=new WeakMap;class fr{constructor(e){if(S(this,dr,void 0),S(this,hr,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(cr)}(e))throw new Qt("JSON Web Key Set malformed");b(dr,this,structuredClone(e))}jwks(){return v(dr,this)}async getKey(e,t){const n=I(I({},e),null==t?void 0:t.header),r=n.alg,o=n.kid,i=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new zt('Unsupported "alg" value for a JSON Web Key Set')}}(r),a=v(dr,this).keys.filter(e=>{let t=i===e.kty;if(t&&"string"==typeof o&&o===e.kid,!t||"string"!=typeof e.alg&&"AKP"!==i||r===e.alg,t&&"string"==typeof e.use&&"sig"===e.use,t&&Array.isArray(e.key_ops)&&e.key_ops.includes("verify"),t)switch(r){case"ES256":"P-256"===e.crv;break;case"ES384":"P-384"===e.crv;break;case"ES512":"P-521"===e.crv;break;case"Ed25519":case"EdDSA":"Ed25519"===e.crv}return t}),s=a[0],c=a.length;if(0===c)throw new $t;if(1!==c){const e=new en,t=v(hr,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new C(e.apply(this,arguments))}}(function*(){for(const e of a)try{yield yield A(pr(t,e,r))}catch(e){}}),e}return pr(v(hr,this),s,r)}}async function pr(e,t,n){const r=e.get(t)||e.set(t,{}).get(t);if(void 0===r[n]){const e=await async function(e,t){if(!cn(e))throw new TypeError("JWK must be an object");let n;switch(null!=t||e.alg,null!=n||e.ext,e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Ht(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new zt('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return hn(I(I({},e),{},{alg:t,ext:n}));case"AKP":if("string"!=typeof e.alg||!e.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==t&&t!==e.alg)throw new TypeError("JWK alg and alg option value mismatch");return hn(I(I({},e),{},{ext:n}));case"EC":case"OKP":return hn(I(I({},e),{},{alg:t,ext:n}));default:throw new zt('Unsupported "kty" (Key Type) Parameter value')}}(I(I({},t),{},{ext:!0}),n);if(e instanceof Uint8Array||"public"!==e.type)throw new Qt("JSON Web Key Set members must be public keys");r[n]=e}return r[n]}function yr(e){const t=new fr(e),n=async(e,n)=>t.getKey(e,n);return Object.defineProperties(n,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),n}let gr;if("undefined"==typeof navigator||null===(ur=navigator.userAgent)||void 0===ur||null===(lr=ur.startsWith)||void 0===lr||!lr.call(ur,"Mozilla/5.0 ")){const e="v6.2.3";gr="".concat("jose","/").concat(e)}const wr=Symbol(),mr=Symbol();var Ar=new WeakMap,Er=new WeakMap,vr=new WeakMap,Sr=new WeakMap,br=new WeakMap,Tr=new WeakMap,Rr=new WeakMap,Ir=new WeakMap,Or=new WeakMap,Nr=new WeakMap;class Cr{constructor(e,t){if(S(this,Ar,void 0),S(this,Er,void 0),S(this,vr,void 0),S(this,Sr,void 0),S(this,br,void 0),S(this,Tr,void 0),S(this,Rr,void 0),S(this,Ir,void 0),S(this,Or,void 0),S(this,Nr,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var n,r;b(Ar,this,new URL(e.href)),b(Er,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),b(vr,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),b(Sr,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),b(Rr,this,new Headers(null==t?void 0:t.headers)),gr&&!v(Rr,this).has("User-Agent")&&v(Rr,this).set("User-Agent",gr),v(Rr,this).has("accept")||(v(Rr,this).set("accept","application/json"),v(Rr,this).append("accept","application/jwk-set+json")),b(Ir,this,null==t?void 0:t[wr]),void 0!==(null==t?void 0:t[mr])&&(b(Nr,this,null==t?void 0:t[mr]),null==t?void 0:t[mr],v(Sr,this),"object"==typeof n&&null!==n&&"uat"in n&&"number"==typeof n.uat&&!(Date.now()-n.uat>=r)&&"jwks"in n&&cn(n.jwks)&&Array.isArray(n.jwks.keys)&&Array.prototype.every.call(n.jwks.keys,cn)&&(b(br,this,v(Nr,this).uat),b(Or,this,yr(v(Nr,this).jwks))))}pendingFetch(){return!!v(Tr,this)}coolingDown(){return"number"==typeof v(br,this)&&Date.now()3&&void 0!==arguments[3]?arguments[3]:fetch;const o=await r(e,{method:"GET",signal:n,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new tn;throw e});if(200!==o.status)throw new jt("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await o.json()}catch(e){throw new jt("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(v(Ar,this).href,v(Rr,this),AbortSignal.timeout(v(Er,this)),v(Ir,this)).then(e=>{b(Or,this,yr(e)),v(Nr,this)&&(v(Nr,this).uat=Date.now(),v(Nr,this).jwks=e),b(br,this,Date.now()),b(Tr,this,void 0)}).catch(e=>{throw b(Tr,this,void 0),e})),await v(Tr,this)}}const _r=["mfaToken"],Lr=["mfaToken"];var kr,Pr,Mr,xr,Ur,Br,Dr,Hr,Gr,Kr,Wr,Fr,Xr,jr,Jr,Vr,Yr=class extends Error{constructor(e,t){super(t),T(this,"code",void 0),this.name="NotSupportedError",this.code=e}},zr=class extends Error{constructor(e,t,n){super(t),T(this,"cause",void 0),T(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},qr=class extends zr{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},Zr=class extends zr{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},Qr=class extends zr{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},$r=class extends zr{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},eo=class extends zr{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},to=class extends zr{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},no=class extends Error{constructor(e){super(e),T(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},ro=class extends zr{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),T(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},oo=class extends zr{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},io=class extends zr{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},ao=class extends zr{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},so=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),T(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function co(e){return Object.entries(e).filter(e=>void 0!==N(e,2)[1]).reduce((e,t)=>I(I({},e),{},{[t[0]]:t[1]}),{})}var uo=class extends Error{constructor(e,t,n){super(t),T(this,"cause",void 0),T(this,"code",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},lo=class extends uo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},ho=class extends uo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},fo=class extends uo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},po=class extends uo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function yo(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var go=(kr=new WeakMap,Pr=new WeakMap,Mr=new WeakMap,class{constructor(e){var t;S(this,kr,void 0),S(this,Pr,void 0),S(this,Mr,void 0),b(kr,this,"https://".concat(e.domain)),b(Pr,this,e.clientId),b(Mr,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(v(kr,this),"/mfa/authenticators"),n=e.mfaToken,r=await v(Mr,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!r.ok){const e=await r.json();throw new lo(e.error_description||"Failed to list authenticators",e)}return(await r.json()).map(yo)}async enrollAuthenticator(e){const t="".concat(v(kr,this),"/mfa/associate"),n=e.mfaToken,r=O(e,_r),o={authenticator_types:r.authenticatorTypes};"oobChannels"in r&&(o.oob_channels=r.oobChannels),"phoneNumber"in r&&r.phoneNumber&&(o.phone_number=r.phoneNumber),"email"in r&&r.email&&(o.email=r.email);const i=await v(Mr,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},body:JSON.stringify(o)});if(!i.ok){const e=await i.json();throw new ho(e.error_description||"Failed to enroll authenticator",e)}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await i.json())}async deleteAuthenticator(e){const t=e.authenticatorId,n=e.mfaToken,r="".concat(v(kr,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),o=await v(Mr,this).call(this,r,{method:"DELETE",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!o.ok){const e=await o.json();throw new fo(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(v(kr,this),"/mfa/challenge"),n=e.mfaToken,r=O(e,Lr),o={mfa_token:n,client_id:v(Pr,this),challenge_type:r.challengeType};r.authenticatorId&&(o.authenticator_id=r.authenticatorId);const i=await v(Mr,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!i.ok){const e=await i.json();throw new po(e.error_description||"Failed to challenge authenticator",e)}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await i.json())}}),wo=class e{constructor(e,t,n,r,o,i,a){T(this,"accessToken",void 0),T(this,"idToken",void 0),T(this,"refreshToken",void 0),T(this,"expiresAt",void 0),T(this,"scope",void 0),T(this,"claims",void 0),T(this,"authorizationDetails",void 0),T(this,"tokenType",void 0),T(this,"issuedTokenType",void 0),this.accessToken=e,this.idToken=n,this.refreshToken=r,this.expiresAt=t,this.scope=o,this.claims=i,this.authorizationDetails=a}static fromTokenEndpointResponse(t){const n=t.id_token?t.claims():void 0,r=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,n,t.authorization_details);return r.tokenType=t.token_type,r.issuedTokenType=t.issued_token_type,r}},mo=(xr=new WeakMap,Ur=new WeakMap,Br=new WeakMap,class{constructor(e,t){S(this,xr,new Map),S(this,Ur,void 0),S(this,Br,void 0),b(Br,this,Math.max(1,Math.floor(e))),b(Ur,this,Math.max(0,Math.floor(t)))}get(e){const t=v(xr,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return v(xr,this).delete(e),v(xr,this).set(e,t),t.value;v(xr,this).delete(e)}}set(e,t){for(v(xr,this).has(e)&&v(xr,this).delete(e),v(xr,this).set(e,{value:t,expiresAt:Date.now()+v(Ur,this)});v(xr,this).size>v(Br,this);){const e=v(xr,this).keys().next().value;if(void 0===e)break;v(xr,this).delete(e)}}}),Ao=new Map;function Eo(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var vo=class{static createDiscoveryCache(e){const t=(n=e.maxEntries,r=e.ttlMs,"".concat(n,":").concat(r));var n,r;let o=(i=t,Ao.get(i));var i;return o||(o=new mo(e.maxEntries,e.ttlMs),Ao.set(t,o)),o}static createJwksCache(){return{}}},So="openid profile email offline_access",bo=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function To(e){if(null==e)throw new to("subject_token is required");if("string"!=typeof e)throw new to("subject_token must be a string");if(0===e.trim().length)throw new to("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new to("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new to("subject_token must not include the 'Bearer ' prefix")}function Ro(e,t){if(t)for(const r of Object.entries(t)){var n=N(r,2);const t=n[0],o=n[1];if(!bo.has(t))if(Array.isArray(o)){if(o.length>20)throw new to("Parameter '".concat(t,"' exceeds maximum array size of ").concat(20));o.forEach(n=>{e.append(t,n)})}else e.append(t,o)}}var Io="urn:ietf:params:oauth:token-type:access_token";Dr=new WeakMap,Hr=new WeakMap,Gr=new WeakMap,Kr=new WeakMap,Wr=new WeakMap,Fr=new WeakMap,Xr=new WeakMap,jr=new WeakMap,Jr=new WeakMap,Vr=new WeakSet;function Oo(){const e=v(Kr,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(v(Kr,this).useMtls?"1":"0")}async function No(e){const t=await m(Vr,this,ko).call(this),n=new Gn(e,v(Kr,this).clientId,v(Kr,this).clientSecret,t);return n[Ln]=v(Wr,this),n}async function Co(){if(v(Dr,this)&&v(Hr,this))return{configuration:v(Dr,this),serverMetadata:v(Hr,this)};const e=m(Vr,this,Oo).call(this),t=v(Xr,this).get(e);if(t)return b(Hr,this,t.serverMetadata),b(Dr,this,await m(Vr,this,No).call(this,t.serverMetadata)),{configuration:v(Dr,this),serverMetadata:v(Hr,this)};const n=v(jr,this).get(e);if(n){const e=await n;return b(Hr,this,e.serverMetadata),b(Dr,this,await m(Vr,this,No).call(this,e.serverMetadata)),{configuration:v(Dr,this),serverMetadata:v(Hr,this)}}const r=(async()=>{const t=await m(Vr,this,ko).call(this),n=await Dn(new URL("https://".concat(v(Kr,this).domain)),v(Kr,this).clientId,{use_mtls_endpoint_aliases:v(Kr,this).useMtls},t,{[Ln]:v(Wr,this)}),r=n.serverMetadata();return v(Xr,this).set(e,{serverMetadata:r}),{configuration:n,serverMetadata:r}})(),o=r.then(e=>({serverMetadata:e.serverMetadata}));o.catch(()=>{}),v(jr,this).set(e,o);try{const e=await r,t=e.configuration,n=e.serverMetadata;b(Dr,this,t),b(Hr,this,n),v(Dr,this)[Ln]=v(Wr,this)}finally{v(jr,this).delete(e)}return{configuration:v(Dr,this),serverMetadata:v(Hr,this)}}async function _o(e){var t,n;const r=(await m(Vr,this,Co).call(this)).configuration;if("audience"in e||"resource"in e)throw new to("audience and resource parameters are not supported for Token Vault exchanges");To(e.subjectToken);const o=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==e.subjectTokenType&&void 0!==t?t:Io,requested_token_type:null!==e.requestedTokenType&&void 0!==n?n:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&o.append("login_hint",e.loginHint),e.scope&&o.append("scope",e.scope),Ro(o,e.extra);try{const e=await nr(r,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",o);return wo.fromTokenEndpointResponse(e)}catch(t){throw new to("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function Lo(e){const t=(await m(Vr,this,Co).call(this)).configuration;To(e.subjectToken);const n=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&n.append("audience",e.audience),e.scope&&n.append("scope",e.scope),e.requestedTokenType&&n.append("requested_token_type",e.requestedTokenType),e.organization&&n.append("organization",e.organization),Ro(n,e.extra);try{const e=await nr(t,"urn:ietf:params:oauth:grant-type:token-exchange",n);return wo.fromTokenEndpointResponse(e)}catch(t){throw new to("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function ko(){return v(Gr,this)||b(Gr,this,(async()=>{if(!v(Kr,this).clientSecret&&!v(Kr,this).clientAssertionSigningKey&&!v(Kr,this).useMtls)throw new so;if(v(Kr,this).useMtls)return(e,t,n,r)=>{n.set("client_id",t.client_id)};let e=v(Kr,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||await async function(e,t){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return En(e,t,void 0)}(e,v(Kr,this).clientAssertionSigningAlg||"RS256"),e?function(e){return ke(e,void 0)}(e):_n(v(Kr,this).clientSecret)})().catch(e=>{throw b(Gr,this,void 0),e})),v(Gr,this)}async function Po(e){const t=(await m(Vr,this,Co).call(this)).configuration,n=Te(),r=await function(e){return async function(e){return Se(e,"codeVerifier"),fe(await crypto.subtle.digest("SHA-256",le(e)))}(e)}(n),o=co(I(I({},v(Kr,this).authorizationParams),null==e?void 0:e.authorizationParams)),i=new URLSearchParams(I(I({scope:So},o),{},{client_id:v(Kr,this).clientId,code_challenge:r,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await Zn(t,i):await qn(t,i),codeVerifier:n}}function Mo(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{}).timeout,r=Date.now();if(this.readyResolved&&!0===this.readyValue)return s.log("BlueConicUtils | blueConicReady | returning cached value:",this.readyValue),Promise.resolve(!0);if(this.readyPromise)return s.log("BlueConicUtils | blueConicReady | returning existing promise"),this.readyPromise;var o=null!=n?n:e.DEFAULT_TIMEOUT;return s.log("BlueConicUtils | blueConicReady | checking BC readiness"),this.readyPromise=new Promise(function(e){var n,i=setTimeout(function(){t.readyResolved||(s.log("BlueConicUtils | blueConicReady | timeout at:",(Date.now()-r)/1e3,"s"),t.resolveReady(!1,e))},o);if(null!==(n=window.blueConicClient)&&void 0!==n&&n.profile)return s.log("BlueConicUtils | blueConicReady | BC already ready"),void t.resolveReady(!0,e);var a=function(){var n;if(!t.readyResolved)if(null!==(n=window.blueConicClient)&&void 0!==n&&n.event){s.log("BlueConicUtils | blueConicReady | BC client detected");var o=window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},function(){clearTimeout(i),s.log("BlueConicUtils | blueConicReady | onReady fired at:",(Date.now()-r)/1e3,"s"),null==o||o(),t.resolveReady(!0,e)})}else setTimeout(a,500)};a()}),this.readyPromise}},{key:"resolveReady",value:function(e,t){this.readyResolved||(s.log("BlueConicUtils | blueConicReady | resolved with:",e),this.readyResolved=!0,this.readyValue=e,t(e),!1===e&&(this.readyPromise=null,this.readyResolved=!1))}}])}();f(xo,"DEFAULT_TIMEOUT",3e3);new xo;var Uo,Bo;function Do(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ho(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"",t=Go().hostname;if(e&&"string"==typeof e&&e.length>0&&(t=e,e.includes("vipdev.lndo.site")))return"".concat(e.split(".")[0],".com");var n=t.split(".");return"".concat(n[n.length-2],".").concat(n[n.length-1])},Fo=function(){return Go().host.replace(/^(?:www\.|develop\.|staging\.|preprod\.)/,"").replace("vipdev.lndo.site","com")},Xo=function(e){return function(e,t){if("string"!=typeof e)throw new p("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new p(`Invalid token specified: missing part #${n+1}`);let o;try{o=y(r)}catch(e){throw new p(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new p(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}(e)},jo=function(){var e=Wo();return["mcall.com","courant.com","sun-sentinel.com","orlandosentinel.com","growthspotter.com","dailypress.com","pilotonline.com","nydailynews.com","baltimoresun.com","capitalgazette.com","chicagotribune.com","trbdevcloud.com"].includes(e)},Jo=function(){return"complete"===document.readyState},Vo=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(t){var n=!0;if(Jo())t();else{s.log("UIHandler: ","Waiting for the body to load...");var r=setInterval(o(i.mark(function o(){return i.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e&&(n=Jo()),document.querySelector("body")&&n&&(clearInterval(r),t(!0));case 1:case"end":return o.stop()}},o)})),200)}})},Yo=function(){return new Promise(function(e){if(("interactive"===document.readyState||Jo())&&window.dataLayer)s.log("Utils digisubsDataLayerLoaded: ","Document is in interactive state, resolving."),e();else{s.log("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var t=setInterval(o(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(t),e(!0));case 1:case"end":return n.stop()}},n)})),50)}})},zo=function(){return new Promise(function(e){if(Jo())e();else{s.log("Utils digisubsMenuLoaded: ","Waiting for the digisubs dropdown to load...");var t=setInterval(o(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:document.getElementById("account-content")&&(clearInterval(t),e(!0));case 1:case"end":return n.stop()}},n)})),200)}})},qo=function(){var e=o(i.mark(function e(t){var n,r,o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Yo();case 1:return s.log("Utils getDataLayerObject: looking for this dataLayer object ",t),window.dataLayer=window.dataLayer||[],n="",s.log("Utils getDataLayerObject: here is dataLayer length ",window.dataLayer.length),r=function(e){return s.log("Utils dataLayerLoop: look for this element ",e),e[t]?(s.log("Utils dataLayerLoop: found ",e[t]),n=e[t],e[t]):(s.log("Utils dataLayerLoop: dataLayer search ",!1),!1)},o=window.dataLayer.some(r),e.abrupt("return",o?n:"");case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Zo=function(){var e=o(i.mark(function e(){var t,n,r=arguments;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"Page Type",e.next=1,qo(t);case 1:return n=e.sent,s.log("utils | pageType: page type is ",n),e.abrupt("return",n);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Qo=function(){return new Promise(function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(s.log("utils | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(s.log("utils | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",function(n){try{var r=n.detail||{};s.log("utils | Event: authentication ready: ",r),e(r)}catch(e){s.log(e),t(e)}},!1))})},$o=function(){var e=o(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,t){return a.A.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(s.log("Entitlements already present:",window.MNGAuthentication.entitlementsReady),void e(window.MNGAuthentication.entitlementsReady)):void window.addEventListener("entitlementsReady",function(n){try{var r=n.detail||{};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=r,s.log("Received entitlementsReady event:",r),e(r)}catch(e){s.error("Error handling entitlementsReady event:",e),t(e)}},{once:!0}):(s.log("Entitlements disabled in settings."),void e(!1))}));case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ei=function(e){s.log("starting simpleEmailValidation");if(!e)return{valid:!1,message:"Please enter an email."};if(!/^(([^<>()[\]\\.,;:\s@']+(\.[^<>()[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e))return{valid:!1,message:"Please enter a valid email."};var t=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),n=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(t);return s.log("simpleEmailValidation: ","TLD search ".concat(n)),!1===n?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex(function(t){return t===e.split("@")[1]})?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=ei;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var ti=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};var ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return new Promise(function(t,n){var r={sspw:null,sophiClient:null,engagePaywall:null,engageStatus:null},a=function(){var a=o(i.mark(function o(){var a,c,u,l,d,h,f,p,y,g,w;return i.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,"1"!==(null===(a=window.sophi_config)||void 0===a?void 0:a.enableSophiSSPW)){o.next=1;break}if(!document.getElementById("server-paywall")){o.next=1;break}return r.sspw=!0,o.abrupt("return",t({paywall:!0,details:Ho({},r)}));case 1:return o.next=2,Zo();case 2:return u=o.sent,o.next=3,qo("Paywall_Level");case 3:if(l=o.sent,"article"===u&&"free"!==l){o.next=4;break}return o.abrupt("return",t({paywall:!1,details:"article"!==u?"Page type is not an article":"Free article"}));case 4:return o.next=5,$o();case 5:if(!(d=o.sent)||!d.isEntitled){o.next=6;break}return o.abrupt("return",t({paywall:!1,details:"Entitled User"}));case 6:if("premium"!==l){o.next=7;break}return o.abrupt("return",t({paywall:!0,details:"Premium article"}));case 7:if(h=null===(c=window.ConnextUtils)||void 0===c?void 0:c.runningSophi,s.log("checkPaywallStatus - Sophi is running: ",h),!h){o.next=8;break}window.ConnextUtils.connextAlreadyRan&&window.sophiWallConfig&&!window.sophiWallConfig.error&&"paywall"===window.sophiWallConfig.wallType?(r.sophiClient=!0,r.engageStatus=!0,r.engagePaywall=!0):window.addEventListener("onPaywallShown",function(){return"paywall"===window.sophiWallConfig.wallType&&(r.sophiClient=!0),t({paywall:!0,details:Ho({},r)})},{once:!0}),o.next=12;break;case 8:if(h){o.next=12;break}return f=window.ConnextUtils.connextReady("onPaywallShown"),p=new Promise(function(t,n){return setTimeout(function(){return n(new Error("No Engage paywall within 10 seconds, resolving as no paywall."))},e)}),o.prev=9,o.next=10,Promise.race([f,p]);case 10:!0===(y=o.sent)?(r.engagePaywall=!0,r.engageStatus="Engage paywall detected"):(r.engagePaywall=!1,r.engageStatus="Engage response: ".concat(y)),o.next=12;break;case 11:o.prev=11,g=o.catch(9),r.engagePaywall=!1,r.engageStatus="Engage response: ".concat(g);case 12:return o.abrupt("return",t({paywall:Object.values(r).some(function(e){return e}),details:Ho({},r)}));case 13:o.prev=13,w=o.catch(0),n(w);case 14:case"end":return o.stop()}},o,null,[[0,13],[9,11]])}));return function(){return a.apply(this,arguments)}}();a()})};"undefined"!=typeof window&&(window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.checkPaywallStatus=ni);var ri=function(e){try{window.dataLayer.push({event:e}),s.log("ANALYTICS: ".concat(e," event")),s.log("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){s.log("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var oi="#main .article-share ul",ii=".dropdown-menu .account-settings",ai=".nav-wrapper-secondary .article-share ul",si=function(){return document.querySelectorAll(oi)},ci=function(){return document.querySelector(ii)},ui=function(){return document.querySelector(ai)},li=n(8287).hp,di=function(e){return li.from(e,"base64").toString("utf8")},hi=function(){var e=window.localStorage.getItem(l),t=e&&di(e)&&JSON.parse(di(e),function(e,t){return e?function(e){try{var t=parseInt(e,10);return Number.isNaN(t)?e:t}catch(t){return e}}(JSON.parse(di(t))):t});return s.log("Got encoded object hash with a value of ".concat(JSON.stringify(t))),t},fi=function(e){var t=hi();return t&&t[e]},pi=function(e,t){var n=hi()||{};n[e]=t,function(e){var t={};Object.keys(e).forEach(function(n){t[n]=li.from(JSON.stringify(e[n])).toString("base64")});var n=li.from(JSON.stringify(t)).toString("base64");window.localStorage.setItem("user-profile",n),s.log("Set encoded object hash for ".concat(e))}(n)};var yi=function(e,t){var n=e,r=document.getElementById("article-share-copy-link-text".concat(t));"Link Copied"!==e&&"Link Updated"!==e&&(document.getElementById("article-share-copy-btn".concat(t)).disabled=!0);s.log("article sharing: user message inside share button: ",e,t),document.getElementById("articleCopyLinkSpinner".concat(t)).setAttribute("style","display:none"),document.getElementById("article-share-copy-btn".concat(t)).classList.remove("spinner-pad"),document.getElementById("articleCopyLinkSpinner".concat(t)).classList.remove("spring-spinner-mar"),document.getElementById("article-share-copy-link-text".concat(t)).setAttribute("style","display:flex;","align-items:center"),r.innerHTML="Link Copied"===e||"Link Updated"===e?'\n\t\n\t '.concat(n):e},gi=function(){var e=o(i.mark(function e(){var t,n,r,o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Qo();case 1:if(t=e.sent,!(n=t.idToken)){e.next=2;break}return r=Xo(n),o={uuid:r.sub},s.log("Article sharing: get user UUID",o.uuid),e.abrupt("return",o);case 2:return e.abrupt("return",!1);case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),wi=function(e){return s.log("Article sharing: updating article count everywhere with ",e),document.querySelectorAll(".article-share-count").forEach(function(t){s.log("article sharing: updated article count! ",t),t.innerHTML=e}),s.log("Article sharing: update finished, return true"),!0},mi=function(){s.log("Article sharing: User is being spoofed, retrieving uuid to check remaining articles");var e=JSON.parse(localStorage.getItem(c)).entitlementToken;s.log("Article sharing: spoofed jwtToken: ",e);var t=e?Xo(e):"";return s.log("Article sharing: UUID: ",t.uuid),t},Ai=function(e){return new Promise(function(t){var n=a.A.entitlementsEndpoint,r=a.A.entitlementsApiKey,c="".concat(n,"articleSharing/checkRemaining");s.log("Article sharing: api data: ",r);var l=e.uuid;(s.log("Article sharing: callCheckRemainingEndpoint: check if user is spoofed"),window.localStorage.getItem("spoof-user"))&&(l=mi().uuid);var d,h,f={uid:l,entitlementsToken:Ko("mng-entitlements")};s.log("Article sharing: articles remaining api body: ",f),$.ajax({type:"POST",url:c,headers:{"X-Api-Key":a.A.entitlementsApiKey},data:JSON.stringify(f),success:(h=o(i.mark(function e(n){var r;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log("Article sharing: checkRemaining response: successful: ",n.remaining),r="10",r="This user does not exists in the database. Return 10 for sharesRemaining."===n.remaining?"10":n.remaining,pi(u,r),t(r);case 1:case"end":return e.stop()}},e)})),function(e){return h.apply(this,arguments)}),error:(d=o(i.mark(function e(n,r,o){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log("Article sharing: checkRemaining Failure: ",o),t(!1);case 1:case"end":return e.stop()}},e)})),function(e,t,n){return d.apply(this,arguments)})})})},Ei=function(){var e=o(i.mark(function e(t){var n,r,o,a,s=arguments;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],r=fi(u),n||!r){e.next=1;break}return e.abrupt("return",r);case 1:return e.next=2,gi(t);case 2:return o=e.sent,e.next=3,Ai(o);case 3:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),vi=function(){var e=o(i.mark(function e(t){var n,r,o,c,l,d,h,f,p,y,g,w,m,A;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=function(e){for(var t="",n=c.replace(/[^0-9a-zA-Z]+/gm,""),r=n.length,o=0;o?'),null==(u=document.querySelectorAll(".article-share-h6"))||u.forEach(function(e){e.insertAdjacentHTML("beforeend",c)}));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ti=function(e){var t,n=document.getElementById("share-icon-position".concat(e));"rgba(0, 0, 0, 0)"===window.getComputedStyle(document.querySelector("li.share-article")).backgroundColor?(n.classList.add("article-share-icon-invert"),t=window.getComputedStyle(document.getElementById("page")).getPropertyValue("--primary")):t="white";var r='\n\t\t\n\t\t'),o=window.btoa(r),i="url(data:image/svg+xml;base64,".concat(o,")");return n.style.background=i,"url(data:image/svg+xml;base64,".concat(o,")")},Ri=function(e){e.classList.contains("article-share-fixed")&&e.classList.remove("article-share-fixed")},Ii=function(){var e=o(i.mark(function e(n){var r,a,c,u,l,d,h,f,p;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.log("Article sharing: build menu here"),e.next=1,Vo();case 1:if(s.log(" Article Sharing: Build sharing menuz!"),r="",a=function(){var e=o(i.mark(function e(t){var o,a,c,u,l;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(ri("articleshare-openui"),o=document.getElementById("share-box-position".concat(t)),s.log("Article Sharing: i clicked this ",o,t),a=document.getElementById(o.id),s.log("article sharing: look for this box: ",o),o.classList.contains("show-article-sharing")||(s.log("article sharing: box already open, do not show spinner"),document.getElementById("articleShareBtnSpinner".concat(t)).setAttribute("style","display:block"),document.getElementById("share-icon-position".concat(t)).setAttribute("style","display:none!important;")),c=!1,n&&!o.classList.contains("show-article-sharing")){e.next=1;break}c=!0,e.next=4;break;case 1:return e.prev=1,e.next=2,Ei(t,!1);case 2:c=e.sent,wi(c),e.next=4;break;case 3:e.prev=3,e.catch(1),s.log("Article share article count api error");case 4:s.log("article sharing: api request done, show results ",c),document.getElementById("share-icon-position".concat(t)).setAttribute("style","background:".concat(r,"; display:block!important;")),document.getElementById("articleShareBtnSpinner".concat(t)).setAttribute("style","display:none"),o.classList.toggle("show-article-sharing"),a.classList.toggle("show"),0!==t&&(ti(o)||o.classList.add("article-share-fixed")),u=document.querySelector("#article-share-position".concat(t," .article-share-link")),s.log("article sharing: accessible ",u),l=a.classList.contains("show"),s.log("article sharing: box isOpen ",l),l||(a.setAttribute("aria-expanded","false"),u.setAttribute("aria-press","false")),l&&(a.setAttribute("aria-expanded","true"),u.setAttribute("aria-press","true")),c<=0&&(s.log("article share: user out of free views ",c),yi("No more shares left",t));case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),c='\n\t\n\t\n\t\n\tCopy The Shareable Link',u=function(e){var t=document.getElementById("share-box-position".concat(e)),r=document.getElementById("cancel-button-label".concat(e));if(r&&(r.childNodes[0].nodeValue="Cancel"),t&&t.classList.contains("show-article-sharing")){var o=document.getElementById("article-share-copy-link-text".concat(e));n&&o&&(o.innerHTML=c),a(e,"close"),0===e&&Ri(t)}},l=function(e,t){t&&t.addEventListener("click",function(){u(e)})},window.addEventListener("click",function(e){var t=e.target,r=t.closest(".article-share-link");if(n){var o=t.closest("#share-box-position0");null===(o&&o.classList.contains("show-article-sharing"))&&null===r&&u(0)}var i=t.closest("#share-box-position1");null===(i&&i.classList.contains("show-article-sharing"))&&null===r&&u(1);var a=t.closest("#share-box-position2");null===(a&&a.classList.contains("show-article-sharing"))&&null===r&&u(2)}),d=function(){var e=o(i.mark(function e(t){var o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,qo("Page Title");case 1:o=e.sent,t.map(function(e,t){s.log("Article sharing: create button for this: ",e,t);var i=document.createElement("li");i.className="share-article",i.id="article-share-position".concat(t),i.setAttribute("tabindex","0");var u=document.createElement("button");u.className="article-share-link",u.setAttribute("aria-pressed","false"),u.setAttribute("aria-controls","share-box-position".concat(t)),u.setAttribute("aria-label","Article Sharing Button"),u.setAttribute("tabindex","0"),i.append(u);var d=document.createElement("span");d.style.display="none",d.classList.add("spring-spinner"),d.id="articleShareBtnSpinner".concat(t),d.innerHTML='\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
';var h=document.querySelector("li.share-facebook"),f=window.getComputedStyle(h),p=document.createElement("span");s.log("article sharing: share icon color: ",f.backgroundColor),"rgba(0, 0, 0, 0)"===f.backgroundColor&&d.classList.add("spring-spinner-invert"),u.append(d),p.id="share-icon-position".concat(t),p.className="article-share-icon";var y=document.createElement("span");y.className="sharing-screen-reader-text",y.innerHTML="Click to share a free article with a friend",i.append(y),e.appendChild(i),u.append(p),r=Ti(t);var g=document.createElement("div");g.id="share-box-position".concat(t),g.className="article-share-box share-box-position".concat(t);var w,m="GIFT THIS ARTICLE",A='You have '.concat("10"," gift articles remaining this month");w=o,s.log(w),s.log("article sharing article title: ",w);var E=document.location.host;if(!1===n){g.classList.add("no-share");var v=E.replace("www.","").replace("develop.","").replace("preprod.",""),S=jo()?"https://subscription.".concat(v):"https://checkout.".concat(v);A='Subscibers get '.concat("10"," gift articles each month"),g.innerHTML='\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
').concat(m,"
\n\t\t\t\t\t
What is article sharing?
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t

Subscribers are entitled to 10 gift sharing articles each month. These can be shared with friends and family who are not subscribers.

\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t

Subscribe now! or Sign in to your account.

\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t')}else g.innerHTML='\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t
').concat(m,"
\n\t\t\t\t
").concat(A,"
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t

").concat(w,"

\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
Copy the link
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t');e.appendChild(g);var b=document.getElementById("article-share-position".concat(t));b.addEventListener("click",function(){a(t,"open")}),b.addEventListener("keydown",function(e){"q"===e.key&&a(t,"open")});var T=document.getElementById("article-share-close".concat(t));l(t,T);var R=document.getElementById("cancel-button".concat(t));return l(t,R),document.getElementById("article-share-copy-btn".concat(t)).addEventListener("click",function(){Oi(t)}),"done"});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),h=[ui()].concat(t(si())),s.log("article sharing: target elements are ",h),h.filter(function(e){return null!==e}).length!==h.length){e.next=2;break}return e.next=2,d(h);case 2:if(s.log("Article Sharing: appending sticky nav too"),!n){e.next=4;break}return e.next=3,bi();case 3:(f=document.querySelectorAll("#article-share-dropdown-article-page"))&&f.forEach(function(e){e.addEventListener("click",function(){a(0,"open")})}),(p=document.querySelector(".border-container #push-account-content #article-share-dropdown-article-page"))&&p.addEventListener("click",function(){document.getElementById("digisubs-toggle").click()});case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Oi=function(){var e=o(i.mark(function e(t){var n,r,o,a,c,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,vi(t);case 1:return n=e.sent,e.next=2,qo("URL");case 2:if(r=e.sent,s.log("Article sharing: check article endpoint response: successful: ",n),n.sharedCode&&"null"!==n.sharedCode&&void 0!==n.sharedCode){e.next=3;break}yi("Network error, try again",t),e.next=11;break;case 3:if("Link Updated"===n.status?yi("Link Updated",t):yi("Link Copied",t),o="".concat(r,"?share=").concat(n.sharedCode),!document.hasFocus()){e.next=8;break}return e.prev=4,e.next=5,navigator.clipboard.writeText(o);case 5:s.log("Article sharing: Link Copied"),"Link Updated"===n.status?yi("Link Updated",t):yi("Link Copied",t),e.next=7;break;case 6:e.prev=6,u=e.catch(4),s.error("Clipboard write failed:",u),yi("Copy failed. Try again.",t);case 7:e.next=9;break;case 8:s.warn("Clipboard copy blocked: document not focused"),yi("Copy failed. Try again.",t);case 9:if((a=document.getElementById("cancel-button-label".concat(t)))&&(a.childNodes[0].nodeValue="Close"),"Link Updated"===n.status){e.next=11;break}return e.next=10,Ei(t);case 10:c=e.sent,wi(c);case 11:case"end":return e.stop()}},e,null,[[4,6]])}));return function(t){return e.apply(this,arguments)}}(),Ni=function(){var e=o(i.mark(function e(){var t,n,r,c,u,l,d,h,f;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.articleShareConvo=!1,window.MNGAuthentication.articleShare="",s.log("article sharing: code check: checking free article code"),t=window.location.search,n=new URLSearchParams(t),e.next=1,qo("Content ID");case 1:if(r=e.sent,c=Fo(),s.log("article sharing: code check: url params array ",n.getAll("share")),0!==n.getAll("share").length){e.next=2;break}return s.log("No share search param"),e.abrupt("return",!1);case 2:return window.MNGAuthentication.articleShareConvo=!0,u=n.getAll("share"),ri("articleshare-readingshare"),s.log("Article sharing: code check: check share code: ",u),l=a.A.entitlementsEndpoint,d=a.A.entitlementsApiKey,h="".concat(l,"articleSharing/checkArticleSharedLink"),f={articleName:r,publication:c,code:u[0]},e.abrupt("return",$.ajax({type:"POST",url:h,headers:{"X-Api-Key":d},data:JSON.stringify(f),success:function(e){if(s.log("Article sharing: code check: looking for valid share code: ",e),"nocodefound"===e)s.log("Article sharing: code check: code does not exist"),ri("articleshare-readshare-codenotfound"),window.MNGAuthentication.articleShare="codenotfound";else{s.log("Article sharing: code check: time api timestamp response: ",e.sharedTimestamp);var t=new Date(e.sharedTimestamp),n=(t=t.setDate(t.getDate()+30))/1e3;s.log("Article sharing: code check: time api timestamp response expiration date ",n);var r=new Date;r=Math.floor(r.getTime()/1e3),s.log("Article sharing: code check: current unix time is, ",r),n0&&e.forEach(function(e){if(e&&e.classList.contains("show-article-sharing")){var t=window.scrollY,n=document.getElementById("sharing-bottom"),r=document.getElementById("sharing-top");if(n&&e.classList.contains("share-box-position2"))t/n.offsetTop*100>=93?Ri(e):e.classList.contains("article-share-fixed")||e.classList.add("article-share-fixed");if(r&&e.classList.contains("share-box-position1"))window.scrollY/(document.documentElement.scrollHeight-window.innerHeight)*100>=11.5?Ri(e):e.classList.contains("article-share-fixed")||e.classList.add("article-share-fixed")}})}),e.next=1,Qo();case 1:return n=e.sent,r=n.isAuthenticated,e.next=2,$o();case 2:if(o=e.sent,!0!==r||void 0===window.MNGAuthentication||"function"!=typeof window.MNGAuthentication.isUserSubscriber||!o.isEntitled){e.next=7;break}return s.log("article sharing: subscriber, show sharing tool"),e.next=3,Zo();case 3:if(a=e.sent,s.log("article sharing: page type is ",a),"article"!==a){e.next=5;break}return e.next=4,Ii(!0);case 4:e.next=6;break;case 5:return e.next=6,bi();case 6:e.next=9;break;case 7:return s.log("article sharing: not a logged in or a subscriber, show marketing message and check for share code"),e.next=8,Ni();case 8:return e.next=9,Ii(!1);case 9:window.addEventListener("updateArticlesRemainingUI",function(e){wi(e.detail)});case 10:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();Ci()})()})(); //# sourceMappingURL=mng-digisubs.articleShare.bundle.js.map; /*! For license information please see mng-digisubs.articleSave.bundle.js.LICENSE.txt */ (()=>{var e={893(e,t,r){"use strict";function o(e,t){this.v=e,this.k=t}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]0?setTimeout(r,t):r(null)}}window.addEventListener("storage",i),e.addToWaiting(i);var s=setTimeout(i,Math.max(0,t-Date.now()))})];case 1:return r.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return b(this,void 0,void 0,function(){return E(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return b(this,void 0,void 0,function(){var r,o,n,a;return E(this,function(i){switch(i.label){case 0:return r=void 0===this.storageHandler?_:this.storageHandler,o=T+"-"+t,null===(n=r.getItemSync(o))?[2]:(a=JSON.parse(n)).id!==this.id?[3,2]:[4,R.default().lock(a.iat)];case 1:i.sent(),this.acquiredIatSet.delete(a.iat),r.removeItemSync(o),R.default().unlock(a.iat),e.notifyWaiters(),i.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var r=Date.now()-5e3,o=t,n=[],a=0;;){var i=o.keySync(a);if(null===i)break;n.push(i),a++}for(var s=!1,c=0;c(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;P=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const r=[];for(let o=0;o(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;q=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const r=[];for(let o=0;o{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw K("The input to be decoded is not correctly encoded.",B,e)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),r=new Uint8Array(t.length);for(let e=0;e0)return;if(t){if(0!==e)throw K("".concat(r," must be a non-negative number"),B,n);return}throw K("".concat(r," must be a positive number"),B,n)}catch(e){if(o)throw re(e.message,o,n);throw e}}function ce(e,t,r,o){try{if("string"!=typeof e)throw K("".concat(t," must be a string"),G,o);if(0===e.length)throw K("".concat(t," must not be empty"),B,o)}catch(e){if(r)throw re(e.message,r,o);throw e}}function le(e){!function(e,t){if(Me(e)!==t)throw function(e){let t='"response" content-type must be ';for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n2){const e=o.pop();t+="".concat(o.join(", "),", or ").concat(e)}else 2===o.length?t+="".concat(o[0]," or ").concat(o[1]):t+=o[0];return re(t,rt,e)}(e,t)}(e,"application/json")}function de(){return $(crypto.getRandomValues(new Uint8Array(32)))}function ue(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new ee("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new ee("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new ee("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new ee("unsupported CryptoKey algorithm name",{cause:e})}}function pe(e){const t=null==e?void 0:e[F];return"number"==typeof t&&Number.isFinite(t)?t:0}function me(e){const t=null==e?void 0:e[j];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function he(){return Math.floor(Date.now()/1e3)}function fe(e){if("object"!=typeof e||null===e)throw K('"as" must be an object',G);ce(e.issuer,'"as.issuer"')}function ge(e){if("object"!=typeof e||null===e)throw K('"client" must be an object',G);ce(e.client_id,'"client.client_id"')}function ye(e){return ce(e,'"clientSecret"'),(t,r,o,n)=>{o.set("client_id",r.client_id),o.set("client_secret",e)}}function Ae(e,t){const r=(a=e)instanceof CryptoKey?{key:a}:(null==a?void 0:a.key)instanceof CryptoKey?(void 0!==a.kid&&ce(a.kid,'"kid"'),{key:a.key,kid:a.kid}):{},o=r.key,n=r.kid;var a;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw K("".concat(t," must be a CryptoKey"),G)}(e,t),"private"!==e.type)throw K("".concat(t," must be a private CryptoKey"),B)}(o,'"clientPrivateKey.key"'),async(e,r,a,i)=>{var s;const c={alg:ue(o),kid:n},l=function(e,t){const r=he()+pe(t);return{jti:de(),aud:e.issuer,exp:r+60,iat:r,nbf:r,iss:t.client_id,sub:t.client_id}}(e,r);null==t||null===(s=t[J])||void 0===s||s.call(t,c,l),a.set("client_id",r.client_id),a.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),a.set("client_assertion",await async function(e,t,r){if(!r.usages.includes("sign"))throw K('CryptoKey instances used for signing assertions must include "sign" in their "usages"',B);const o="".concat($(z(JSON.stringify(e))),".").concat($(z(JSON.stringify(t)))),n=$(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:mt(e)};case"RSA-PSS":switch(pt(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new ee("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return pt(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new ee("unsupported CryptoKey algorithm name",{cause:e})}(r),r,z(o)));return"".concat(o,".").concat(n)}(c,l,o))}}const ve=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Se(e,t){if(t&&"https:"!==e.protocol)throw re("only requests to HTTPS are allowed",nt,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw re("only HTTP and HTTPS requests are allowed",at,e)}function be(e,t,r,o){let n;if("string"!=typeof e||!(n=ve(e)))throw re("authorization server metadata does not contain a valid ".concat(r?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?lt:dt,{attribute:r?"mtls_endpoint_aliases.".concat(t):t});return Se(n,o),n}function Ee(e,t,r,o){return r&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?be(e.mtls_endpoint_aliases[t],t,r,o):be(e[t],t,r,o)}class we extends Error{constructor(e,t){var r;super(e,t),u(this,"cause",void 0),u(this,"code",void 0),u(this,"error",void 0),u(this,"status",void 0),u(this,"error_description",void 0),u(this,"response",void 0),this.name=this.constructor.name,this.code=qe,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===(r=Error.captureStackTrace)||void 0===r||r.call(Error,this,this.constructor)}}class Re extends Error{constructor(e,t){var r,o;super(e,t),u(this,"cause",void 0),u(this,"code",void 0),u(this,"error",void 0),u(this,"error_description",void 0),this.name=this.constructor.name,this.code=$e,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==(r=t.cause.get("error_description"))&&void 0!==r?r:void 0,null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}class Te extends Error{constructor(e,t){var r;super(e,t),u(this,"cause",void 0),u(this,"code",void 0),u(this,"response",void 0),u(this,"status",void 0),this.name=this.constructor.name,this.code=ze,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===(r=Error.captureStackTrace)||void 0===r||r.call(Error,this,this.constructor)}}const _e="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Ne="("+_e+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',Ce="("+_e+")\\s*=\\s*("+_e+")",Oe=new RegExp("^[,\\s]*("+_e+")"),Pe=new RegExp("^[,\\s]*"+Ne+"[,\\s]*(.*)"),Ie=new RegExp("^[,\\s]*"+Ce+"[,\\s]*(.*)"),De=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Le(e,t,r){if(e.status!==t){let t;var o;if(function(e){let t;if(t=function(e){if(!U(e,Response))throw K('"response" must be an instance of Response',G);const t=e.headers.get("www-authenticate");if(null===t)return;const r=[];let o=t;for(;o;){var n;let t=o.match(Oe);const c=null===(n=t)||void 0===n?void 0:n[1].toLowerCase();if(!c)return;const l=o.substring(t[0].length);if(l&&!l.match(/^[\s,]/))return;const d=l.match(/^\s+(.*)$/),u=!!d;o=d?d[1]:void 0;const p={};let m;if(u)for(;o;){let r,n;if(t=o.match(Pe)){var a=f(t,4);if(r=a[1],n=a[2],o=a[3],n.includes("\\"))try{n=JSON.parse('"'.concat(n,'"'))}catch(e){}p[r.toLowerCase()]=n}else{if(!(t=o.match(Ie))){if(t=o.match(De)){if(Object.keys(p).length)break;var i=f(t,3);m=i[1],o=i[2];break}return}var s=f(t,4);r=s[1],n=s[2],o=s[3],p[r.toLowerCase()]=n}}else o=l||void 0;const h={scheme:c,parameters:p};m&&(h.token68=m),r.push(h)}return r.length?r:void 0}(e))throw new Te("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}(e),t=await async function(e){if(e.status>399&&e.status<500){ut(e),le(e);try{const t=await e.clone().json();if(oe(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===(o=e.body)||void 0===o?void 0:o.cancel()),new we("server responded with an error in the response body",{cause:t,response:e});throw re('"response" is not a conform '.concat(r," response (unexpected HTTP status code)"),ot,e)}}function ke(e){if(!je.has(e))throw K('"options.DPoP" is not a valid DPoPHandle',B)}function Me(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function He(e,t,r,o,n,a,i){return await r(e,t,n,a),a.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==i?void 0:i[X])||fetch)(o.href,{body:n,headers:Object.fromEntries(a.entries()),method:"POST",redirect:"manual",signal:ae(o,null==i?void 0:i.signal)})}async function xe(e,t,r,o,n,a){var i;const s=Ee(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==a?void 0:a[W]));n.set("grant_type",o);const c=ne(null==a?void 0:a.headers);c.set("accept","application/json"),void 0!==(null==a?void 0:a.DPoP)&&(ke(a.DPoP),await a.DPoP.addProof(s,c,"POST"));const l=await He(e,t,r,s,n,c,a);return null==a||null===(i=a.DPoP)||void 0===i||i.cacheNonce(l,s),l}const Ue=new WeakMap,Be=new WeakMap;function Ge(e){if(!e.id_token)return;const t=Ue.get(e);if(!t)throw K('"ref" was already garbage collected or did not resolve from the proper sources',B);return t}async function Ke(e,t,r,o,n,a){if(fe(e),ge(t),!U(r,Response))throw K('"response" must be an instance of Response',G);await Le(r,200,"Token Endpoint"),ut(r);const i=await At(r);if(ce(i.access_token,'"response" body "access_token" property',tt,{body:i}),ce(i.token_type,'"response" body "token_type" property',tt,{body:i}),i.token_type=i.token_type.toLowerCase(),void 0!==i.expires_in){let e="number"!=typeof i.expires_in?parseFloat(i.expires_in):i.expires_in;se(e,!0,'"response" body "expires_in" property',tt,{body:i}),i.expires_in=e}if(void 0!==i.refresh_token&&ce(i.refresh_token,'"response" body "refresh_token" property',tt,{body:i}),void 0!==i.scope&&"string"!=typeof i.scope)throw re('"response" body "scope" property must be a string',tt,{body:i});if(void 0!==i.id_token){ce(i.id_token,'"response" body "id_token" property',tt,{body:i});const a=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&a.push("auth_time"),void 0!==t.default_max_age&&(se(t.default_max_age,!0,'"client.default_max_age"'),a.push("auth_time")),null!=o&&o.length&&a.push(...o);const s=await async function(e,t,r,o,n){let a,i,s=e.split("."),c=s[0],l=s[1],d=s.length;if(5===d){if(void 0===n)throw new ee("JWE decryption is not configured",{cause:e});var u=(e=await n(e)).split(".");c=u[0],l=u[1],d=u.length}if(3!==d)throw re("Invalid JWT",tt,e);try{a=JSON.parse(z($(c)))}catch(e){throw re("failed to parse JWT Header body as base64url encoded JSON",et,e)}if(!oe(a))throw re("JWT Header must be a top level object",tt,e);if(t(a),void 0!==a.crit)throw new ee('no JWT "crit" header parameter extensions are supported',{cause:{header:a}});try{i=JSON.parse(z($(l)))}catch(e){throw re("failed to parse JWT Payload body as base64url encoded JSON",et,e)}if(!oe(i))throw re("JWT Payload must be a top level object",tt,e);const p=he()+r;if(void 0!==i.exp){if("number"!=typeof i.exp)throw re('unexpected JWT "exp" (expiration time) claim type',tt,{claims:i});if(i.exp<=p-o)throw re('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',it,{claims:i,now:p,tolerance:o,claim:"exp"})}if(void 0!==i.iat&&"number"!=typeof i.iat)throw re('unexpected JWT "iat" (issued at) claim type',tt,{claims:i});if(void 0!==i.iss&&"string"!=typeof i.iss)throw re('unexpected JWT "iss" (issuer) claim type',tt,{claims:i});if(void 0!==i.nbf){if("number"!=typeof i.nbf)throw re('unexpected JWT "nbf" (not before) claim type',tt,{claims:i});if(i.nbf>p+o)throw re('unexpected JWT "nbf" (not before) claim value',it,{claims:i,now:p,tolerance:o,claim:"nbf"})}if(void 0!==i.aud&&"string"!=typeof i.aud&&!Array.isArray(i.aud))throw re('unexpected JWT "aud" (audience) claim type',tt,{claims:i});return{header:a,claims:i,jwt:e}}(i.id_token,ht.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),pe(t),me(t),n).then(Ve.bind(void 0,a)).then(Fe.bind(void 0,e)).then(We.bind(void 0,t.client_id)),c=s.claims,l=s.jwt;if(Array.isArray(c.aud)&&1!==c.aud.length){if(void 0===c.azp)throw re('ID Token "aud" (audience) claim includes additional untrusted audiences',st,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw re('unexpected ID Token "azp" (authorized party) claim value',st,{expected:t.client_id,claims:c,claim:"azp"})}void 0!==c.auth_time&&se(c.auth_time,!0,'ID Token "auth_time" (authentication time)',tt,{claims:c}),Be.set(r,l),Ue.set(i,c)}if(void 0!==(null==a?void 0:a[i.token_type]))a[i.token_type](r,i);else if("dpop"!==i.token_type&&"bearer"!==i.token_type)throw new ee("unsupported `token_type` value",{cause:{body:i}});return i}function We(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw re('unexpected JWT "aud" (audience) claim value',st,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw re('unexpected JWT "aud" (audience) claim value',st,{expected:e,claims:t.claims,claim:"aud"});return t}function Fe(e,t){var r,o;const n=null!==(r=null===(o=e[St])||void 0===o?void 0:o.call(e,t))&&void 0!==r?r:e.issuer;if(t.claims.iss!==n)throw re('unexpected JWT "iss" (issuer) claim value',st,{expected:n,claims:t.claims,claim:"iss"});return t}const je=new WeakSet,Xe=Symbol(),Je={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function Ve(e,t){for(const r of e)if(void 0===t.claims[r])throw re('JWT "'.concat(r,'" (').concat(Je[r],") claim missing"),tt,{claims:t.claims});return t}const Ye=Symbol(),Ze=Symbol();const ze="OAUTH_WWW_AUTHENTICATE_CHALLENGE",qe="OAUTH_RESPONSE_BODY_ERROR",Qe="OAUTH_UNSUPPORTED_OPERATION",$e="OAUTH_AUTHORIZATION_RESPONSE_ERROR",et="OAUTH_PARSE_ERROR",tt="OAUTH_INVALID_RESPONSE",rt="OAUTH_RESPONSE_IS_NOT_JSON",ot="OAUTH_RESPONSE_IS_NOT_CONFORM",nt="OAUTH_HTTP_REQUEST_FORBIDDEN",at="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",it="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",st="OAUTH_JWT_CLAIM_COMPARISON_FAILED",ct="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",lt="OAUTH_MISSING_SERVER_METADATA",dt="OAUTH_INVALID_SERVER_METADATA";function ut(e){if(e.bodyUsed)throw K('"response" body has been used already',B)}function pt(e){const t=e.algorithm;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new ee("unsupported ".concat(t.name," modulusLength"),{cause:e})}function mt(e){switch(e.algorithm.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new ee("unsupported ECDSA namedCurve",{cause:e})}}function ht(e,t,r,o){if(void 0===e)if(Array.isArray(t)){if(!t.includes(o.alg))throw re('unexpected JWT "alg" header parameter',tt,{header:o,expected:t,reason:"authorization server metadata"})}else{if(void 0===r)throw re('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:r});if("string"==typeof r?o.alg!==r:"function"==typeof r?!r(o.alg):!r.includes(o.alg))throw re('unexpected JWT "alg" header parameter',tt,{header:o,expected:r,reason:"default value"})}else if("string"==typeof e?o.alg!==e:!e.includes(o.alg))throw re('unexpected JWT "alg" header parameter',tt,{header:o,expected:e,reason:"client configuration"})}function ft(e,t){const r=e.getAll(t),o=r[0];if(r.length>1)throw re('"'.concat(t,'" parameter must be provided only once'),tt);return o}const gt=Symbol(),yt=Symbol();async function At(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le;try{t=await e.json()}catch(t){throw r(e),re('failed to parse "response" body as JSON',et,t)}if(!oe(t))throw re('"response" body must be a top level object',tt,{body:t});return t}const vt=Symbol(),St=Symbol(),bt=new TextEncoder,Et=new TextDecoder;function wt(e){const t=new Uint8Array(e.length);for(let r=0;r127)throw new TypeError("non-ASCII string encountered in encode()");t[r]=o}return t}function Rt(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),r=new Uint8Array(t.length);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))},Nt=(e,t)=>e.name===t;function Ct(e,t){var r;if(r=e.hash,parseInt(r.name.slice(4),10)!==t)throw _t("SHA-".concat(t),"algorithm.hash")}function Ot(e,t){for(var r=arguments.length,o=new Array(r>2?r-2:0),n=2;n2){const t=o.pop();e+="one of type ".concat(o.join(", "),", or ").concat(t,".")}else 2===o.length?e+="one of type ".concat(o[0]," or ").concat(o[1],"."):e+="of type ".concat(o[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var a;null!==(a=t.constructor)&&void 0!==a&&a.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}const Pt=function(e,t){for(var r=arguments.length,o=new Array(r>2?r-2:0),n=2;n2&&void 0!==arguments[2]?arguments[2]:"unspecified",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:r,reason:o,payload:t}}),u(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),u(this,"claim",void 0),u(this,"reason",void 0),u(this,"payload",void 0),this.claim=r,this.reason=o,this.payload=t}}u(Dt,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class Lt extends It{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:r,reason:o,payload:t}}),u(this,"code","ERR_JWT_EXPIRED"),u(this,"claim",void 0),u(this,"reason",void 0),u(this,"payload",void 0),this.claim=r,this.reason=o,this.payload=t}}u(Lt,"code","ERR_JWT_EXPIRED");class kt extends It{constructor(){super(...arguments),u(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}u(kt,"code","ERR_JOSE_ALG_NOT_ALLOWED");class Mt extends It{constructor(){super(...arguments),u(this,"code","ERR_JOSE_NOT_SUPPORTED")}}u(Mt,"code","ERR_JOSE_NOT_SUPPORTED"),u(class extends It{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),u(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),u(class extends It{constructor(){super(...arguments),u(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Ht extends It{constructor(){super(...arguments),u(this,"code","ERR_JWS_INVALID")}}u(Ht,"code","ERR_JWS_INVALID");class xt extends It{constructor(){super(...arguments),u(this,"code","ERR_JWT_INVALID")}}u(xt,"code","ERR_JWT_INVALID"),u(class extends It{constructor(){super(...arguments),u(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Ut extends It{constructor(){super(...arguments),u(this,"code","ERR_JWKS_INVALID")}}u(Ut,"code","ERR_JWKS_INVALID");class Bt extends It{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),u(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}u(Bt,"code","ERR_JWKS_NO_MATCHING_KEY");class Gt extends It{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),u(this,Symbol.asyncIterator,void 0),u(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}u(Gt,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class Kt extends It{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),u(this,"code","ERR_JWKS_TIMEOUT")}}u(Kt,"code","ERR_JWKS_TIMEOUT");class Wt extends It{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),u(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}u(Wt,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const Ft=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}},jt=e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]),Xt=e=>Ft(e)||jt(e);function Jt(e,t,r){try{return Tt(e)}catch(e){throw new r("Failed to base64url decode the ".concat(t))}}function Vt(e){if("object"!=typeof(t=e)||null===t||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t;if(null===Object.getPrototypeOf(e))return!0;let r=e;for(;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}const Yt=e=>Vt(e)&&"string"==typeof e.kty;async function Zt(e,t,r){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o3&&void 0!==arguments[3]&&arguments[3];$t||($t=new WeakMap);let n=$t.get(e);if(null!=n&&n[r])return n[r];const a=await qt(m(m({},t),{},{alg:r}));return o&&Object.freeze(e),n?n[r]=a:$t.set(e,{[r]:a}),a};const tr=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r{const t=e.data[e.pos++];if(128&t){const r=127&t;let o=0;for(let t=0;t{if(e.data[e.pos++]!==t)throw new Error(r)},nr=(e,t)=>{const r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},ar=(e,t,r)=>{var o;const n=(e=>Rt(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);let a=r;return null!=t&&null!==(o=t.startsWith)&&void 0!==o&&o.call(t,"ECDH-ES")&&(a||(a={}),a.getNamedCurve=e=>{const t={data:e,pos:0};return function(e){or(e,48,"Invalid PKCS#8 structure"),rr(e),or(e,2,"Expected version field");const t=rr(e);e.pos+=t,or(e,48,"Expected algorithm identifier");rr(e);e.pos}(t),(e=>{const t=(e=>{or(e,6,"Expected algorithm OID");const t=rr(e);return nr(e,t)})(e);if(tr(t,[43,101,110]))return"X25519";if(!tr(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");or(e,6,"Expected curve OID");const r=rr(e),o=nr(e,r);for(const e of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}]){const t=e.name,r=e.oid;if(tr(o,r))return t}throw new Error("Unsupported named curve")})(t)}),(async(e,t,r,o)=>{var n;let a,i;const s="spki"===e,c=()=>s?["verify"]:["sign"];switch(r){case"PS256":case"PS384":case"PS512":a={name:"RSA-PSS",hash:"SHA-".concat(r.slice(-3))},i=c();break;case"RS256":case"RS384":case"RS512":a={name:"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(r.slice(-3))},i=c();break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":a={name:"RSA-OAEP",hash:"SHA-".concat(parseInt(r.slice(-3),10)||1)},i=s?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":case"ES384":case"ES512":a={name:"ECDSA",namedCurve:{ES256:"P-256",ES384:"P-384",ES512:"P-521"}[r]},i=c();break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":try{const e=o.getNamedCurve(t);a="X25519"===e?{name:"X25519"}:{name:"ECDH",namedCurve:e}}catch(e){throw new Mt("Invalid or unsupported key format")}i=s?[]:["deriveBits"];break;case"Ed25519":case"EdDSA":a={name:"Ed25519"},i=c();break;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":a={name:r},i=c();break;default:throw new Mt('Invalid or unsupported "alg" (Algorithm) value')}return crypto.subtle.importKey(e,t,a,null!==(n=null==o?void 0:o.extractable)&&void 0!==n?n:!!s,i)})("pkcs8",n,t,a)},ir=e=>null==e?void 0:e[Symbol.toStringTag],sr=(e,t,r)=>{if(void 0!==t.use){let e;switch(r){case"sign":case"verify":e="sig";break;case"encrypt":case"decrypt":e="enc"}if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==e)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(e,'" when present'));if(Array.isArray(t.key_ops)){var o,n;let a;switch(!0){case"sign"===r||"verify"===r:case"dir"===e:case e.includes("CBC-HS"):a=r;break;case e.startsWith("PBES2"):a="deriveBits";break;case/^A\d{3}(?:GCM)?(?:KW)?$/.test(e):a=!e.includes("GCM")&&e.endsWith("KW")?"encrypt"===r?"wrapKey":"unwrapKey":r;break;case"encrypt"===r&&e.startsWith("RSA"):a="wrapKey";break;case"decrypt"===r:a=e.startsWith("RSA")?"unwrapKey":"deriveBits"}if(a&&!1===(null===(o=t.key_ops)||void 0===o||null===(n=o.includes)||void 0===n?void 0:n.call(o,a)))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(a,'" when present'))}return!0};var cr,lr;let dr,ur;if("undefined"==typeof navigator||null===(cr=navigator.userAgent)||void 0===cr||null===(lr=cr.startsWith)||void 0===lr||!lr.call(cr,"Mozilla/5.0 ")){const e="v6.8.4";ur="".concat("openid-client","/").concat(e),dr={"user-agent":ur}}const pr=e=>mr.get(e);let mr,hr;function fr(e){return void 0!==e?ye(e):(hr||(hr=new WeakMap),(e,t,r,o)=>{let n;return(n=hr.get(t))||(function(e,t){if("string"!=typeof e)throw vr("".concat(t," must be a string"),Ar);if(0===e.length)throw vr("".concat(t," must not be empty"),yr)}(t.client_secret,'"metadata.client_secret"'),n=ye(t.client_secret),hr.set(t,n)),n(e,t,r,o)})}const gr=X,yr="ERR_INVALID_ARG_VALUE",Ar="ERR_INVALID_ARG_TYPE";function vr(e,t,r){const o=new TypeError(e,{cause:r});return Object.assign(o,{code:t}),o}class Sr extends Error{constructor(e,t){var r;super(e,t),u(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===(r=Error.captureStackTrace)||void 0===r||r.call(Error,this,this.constructor)}}function br(e,t,r){return new Sr(e,{cause:t,code:r})}function Er(e){if(e instanceof TypeError||e instanceof Sr||e instanceof we||e instanceof Re||e instanceof Te)throw e;if(e instanceof te)switch(e.code){case nt:throw br("only requests to HTTPS are allowed",e,e.code);case at:throw br("only requests to HTTP or HTTPS are allowed",e,e.code);case ot:throw br("unexpected HTTP response status code",e.cause,e.code);case rt:throw br("unexpected response content-type",e.cause,e.code);case et:throw br("parsing error occured",e,e.code);case tt:throw br("invalid response encountered",e,e.code);case st:throw br("unexpected JWT claim value encountered",e,e.code);case ct:throw br("unexpected JSON attribute value encountered",e,e.code);case it:throw br("JWT timestamp claim value failed validation",e,e.code);default:throw br(e.message,e,e.code)}if(e instanceof ee)throw br("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw br("runtime operation error",e,Qe);case"NotSupportedError":throw br("runtime unsupported operation",e,Qe);case"TimeoutError":throw br("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw br("operation aborted",e,"OAUTH_ABORT")}throw new Sr("something went wrong",{cause:e})}async function wr(e,t,r,o,n){const a=await async function(e,t){var r,o;if(!(e instanceof URL))throw vr('"server" must be an instance of URL',Ar);const n=!e.href.includes("/.well-known/"),a=null!==(r=null==t?void 0:t.timeout)&&void 0!==r?r:30,i=AbortSignal.timeout(1e3*a),s=await(n?async function(e,t){return async function(e,t,r,o){if(!(e instanceof URL))throw K('"'.concat("issuerIdentifier",'" must be an instance of URL'),G);Se(e,!0!==(null==o?void 0:o[W]));const n=r(new URL(e.href)),a=ne(null==o?void 0:o.headers);return a.set("accept","application/json"),((null==o?void 0:o[X])||fetch)(n.href,{body:void 0,headers:Object.fromEntries(a.entries()),method:"GET",redirect:"manual",signal:ae(n,null==o?void 0:o.signal)})}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=ie("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=ie("".concat(t,"/").concat(r?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw K('"options.algorithm" must be "oidc" (default), or "oauth2"',B)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[X]:null==t?void 0:t[gr],[W]:null==t||null===(o=t.execute)||void 0===o?void 0:o.includes(Ir),signal:i,headers:new Headers(dr)}):((null==t?void 0:t[gr])||fetch)((Se(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(Ir)),e.href),{headers:Object.fromEntries(new Headers(m({accept:"application/json"},dr)).entries()),body:void 0,method:"GET",redirect:"manual",signal:i})).then(e=>async function(e,t){const r=e;if(!(r instanceof URL)&&r!==vt)throw K('"expectedIssuerIdentifier" must be an instance of URL',G);if(!U(t,Response))throw K('"response" must be an instance of Response',G);if(200!==t.status)throw re('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',ot,t);ut(t);const o=await At(t);if(ce(o.issuer,'"response" body "issuer" property',tt,{body:o}),r!==vt&&new URL(o.issuer).href!==r.href)throw re('"response" body "issuer" property does not match the expected value',ct,{expected:r.href,body:o,attribute:"issuer"});return o}(vt,e)).catch(Er);var c;return n&&new URL(s.issuer).href!==e.href&&(function(e,t,r){return!("https://login.microsoftonline.com"!==e.origin||null!=r&&r.algorithm&&"oidc"!==r.algorithm||(t[Rr]=!0,0))}(e,s,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new Sr("discovered metadata issuer does not match the expected issuer",{code:ct,cause:{expected:e.href,body:s,attribute:"issuer"}})})()),s}(e,n),i=new Tr(a,t,r,o);let s=pr(i);if(null!=n&&n[gr]&&(s.fetch=n[gr]),null!=n&&n.timeout&&(s.timeout=n.timeout),null!=n&&n.execute)for(const e of n.execute)e(i);return i}new TextDecoder;const Rr=Symbol();class Tr{constructor(e,t,r,o){var n,a,i,s,c;if("string"!=typeof t||!t.length)throw vr('"clientId" must be a non-empty string',Ar);if("string"==typeof r&&(r={client_secret:r}),void 0!==(null===(n=r)||void 0===n?void 0:n.client_id)&&t!==r.client_id)throw vr('"clientId" and "metadata.client_id" must be the same',yr);const l=m(m({},structuredClone(r)),{},{client_id:t});let d;l[F]=null!==(a=null===(i=r)||void 0===i?void 0:i[F])&&void 0!==a?a:0,l[j]=null!==(s=null===(c=r)||void 0===c?void 0:c[j])&&void 0!==s?s:30,d=o||("string"==typeof l.client_secret&&l.client_secret.length?fr(l.client_secret):(e,t,r,o)=>{r.set("client_id",t.client_id)});let u=Object.freeze(l);const p=structuredClone(e);Rr in e&&(p[St]=t=>{let r=t.claims.tid;return e.issuer.replace("{tenantid}",r)});let h=Object.freeze(p);mr||(mr=new WeakMap),mr.set(this,{__proto__:null,as:h,c:u,auth:d,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(pr(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(r))}}}}(e))}(e),e}clientMetadata(){return structuredClone(pr(this).c)}get timeout(){return pr(this).timeout}set timeout(e){pr(this).timeout=e}get[gr](){return pr(this).fetch}set[gr](e){pr(this).fetch=e}}function _r(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const r=new Date;r.setSeconds(r.getSeconds()+e.expires_in),t=r.getTime()}return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return Ge(this)}catch(e){return}}}}}(e))}async function Nr(e,t,r){var o;let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const a=null===(o=e.headers.get("retry-after"))||void 0===o?void 0:o.trim();if(void 0===a)return;let i;if(/^\d+$/.test(a))i=parseInt(a,10);else{const e=new Date(a);if(Number.isFinite(e.getTime())){const t=new Date,r=e.getTime()-t.getTime();r>0&&(i=Math.ceil(r/1e3))}}if(n&&!Number.isFinite(i))throw new te("invalid Retry-After header value",{cause:e});i>t&&await Cr(i-t,r)}function Cr(e,t){return new Promise((r,o)=>{const n=e=>{try{t.throwIfAborted()}catch(e){return void o(e)}if(e<=0)return void r();const a=Math.min(e,5);setTimeout(()=>n(e-a),1e3*a)};n(e)})}async function Or(e,t){xr(e);const r=pr(e),o=r.as,n=r.c,a=r.auth,i=r.fetch,s=r.tlsOnly,c=r.timeout;return async function(e,t,r,o,n){fe(e),ge(t);const a=Ee(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[W])),i=new URLSearchParams(o);i.set("client_id",t.client_id);const s=ne(null==n?void 0:n.headers);return s.set("accept","application/json"),He(e,t,r,a,i,s,n)}(o,n,a,t,{[X]:i,[W]:!s,headers:new Headers(dr),signal:Ur(c)}).then(e=>async function(e,t,r){if(fe(e),ge(t),!U(r,Response))throw K('"response" must be an instance of Response',G);await Le(r,200,"Backchannel Authentication Endpoint"),ut(r);const o=await At(r);ce(o.auth_req_id,'"response" body "auth_req_id" property',tt,{body:o});let n="number"!=typeof o.expires_in?parseFloat(o.expires_in):o.expires_in;return se(n,!0,'"response" body "expires_in" property',tt,{body:o}),o.expires_in=n,void 0!==o.interval&&se(o.interval,!1,'"response" body "interval" property',tt,{body:o}),o}(o,n,e)).catch(Er)}async function Pr(e,t,r,o){var n,a;xr(e),r=new URLSearchParams(r);let i=null!==(n=t.interval)&&void 0!==n?n:5;const s=null!==(a=null==o?void 0:o.signal)&&void 0!==a?a:AbortSignal.timeout(1e3*t.expires_in);try{await Cr(i,s)}catch(e){Er(e)}const c=pr(e),l=c.as,d=c.c,u=c.auth,p=c.fetch,h=c.tlsOnly,f=c.nonRepudiation,g=c.timeout,y=c.decrypt,A=(n,a)=>Pr(e,m(m({},t),{},{interval:n}),r,m(m({},o),{},{signal:s,flag:a})),v=function(e,t){const r=Ur(t);if(!r)return{signal:e,cleanup(){}};const o=new AbortController,n=e=>{const t=e.target;o.abort(t.reason)};return e.aborted?o.abort(e.reason):r.aborted?o.abort(r.reason):(e.addEventListener("abort",n,{once:!0}),r.addEventListener("abort",n,{once:!0})),{signal:o.signal,cleanup(){e.removeEventListener("abort",n),r.removeEventListener("abort",n)}}}(s,g),S=await async function(e,t,r,o,n){fe(e),ge(t),ce(o,'"authReqId"');const a=new URLSearchParams(null==n?void 0:n.additionalParameters);return a.set("auth_req_id",o),xe(e,t,r,"urn:openid:params:grant-type:ciba",a,n)}(l,d,u,t.auth_req_id,{[X]:p,[W]:!h,additionalParameters:r,DPoP:null==o?void 0:o.DPoP,headers:new Headers(dr),signal:v.signal}).catch(Er).finally(v.cleanup);var b;if(503===S.status&&S.headers.has("retry-after"))return await Nr(S,i,s,!0),await(null===(b=S.body)||void 0===b?void 0:b.cancel()),A(i);const E=async function(e,t,r,o){return Ke(e,t,r,void 0,null==o?void 0:o[V],null==o?void 0:o.recognizedTokenTypes)}(l,d,S,{[V]:y});let w;try{w=await E}catch(e){if(Br(e,o))return A(i,Gr);if(e instanceof we)switch(e.error){case"slow_down":i+=5;case"authorization_pending":return await Nr(e.response,i,s),A(i)}Er(e)}return w.id_token&&await(null==f?void 0:f(S)),_r(w),w}function Ir(e){pr(e).tlsOnly=!1}async function Dr(e,t,r,o,n){if(xr(e),!((null==n?void 0:n.flag)===Gr||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw vr('"currentUrl" must be an instance of URL, or Request',Ar);let a,i;const s=pr(e),c=s.as,l=s.c,d=s.auth,u=s.fetch,p=s.tlsOnly,h=s.jarm,g=s.hybrid,y=s.nonRepudiation,A=s.timeout,v=s.decrypt,S=s.implicit;if((null==n?void 0:n.flag)===Gr)a=n.authResponse,i=n.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(t=new URL(t.url),e.method){case"GET":break;case"POST":const r=new URLSearchParams(await async function(e){if("POST"!==e.method)throw K("form_post responses are expected to use the POST method",B,{cause:e});if("application/x-www-form-urlencoded"!==Me(e))throw K("form_post responses are expected to use the application/x-www-form-urlencoded content-type",B,{cause:e});return async function(e){if(e.bodyUsed)throw K("form_post Request instances must contain a readable body",B,{cause:e});return e.text()}(e)}(e));if(g)t.hash=r.toString();else for(const e of r.entries()){var b=f(e,2);const r=b[0],o=b[1];t.searchParams.append(r,o)}break;default:throw vr("unexpected Request HTTP method",yr)}}switch(i=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!h:a=await h(t,null==r?void 0:r.expectedState);break;case!!g:a=await g(t,null==r?void 0:r.expectedNonce,null==r?void 0:r.expectedState,null==r?void 0:r.maxAge);break;case!!S:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{a=function(e,t,r,o){if(fe(e),ge(t),r instanceof URL&&(r=r.searchParams),!(r instanceof URLSearchParams))throw K('"parameters" must be an instance of URLSearchParams, or URL',G);if(ft(r,"response"))throw re('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',tt,{parameters:r});const n=ft(r,"iss"),a=ft(r,"state");if(!n&&e.authorization_response_iss_parameter_supported)throw re('response parameter "iss" (issuer) missing',tt,{parameters:r});if(n&&n!==e.issuer)throw re('unexpected "iss" (issuer) response parameter value',tt,{expected:e.issuer,parameters:r});switch(o){case void 0:case yt:if(void 0!==a)throw re('unexpected "state" response parameter encountered',tt,{expected:void 0,parameters:r});break;case gt:break;default:if(ce(o,'"expectedState" argument'),a!==o)throw re(void 0===a?'response parameter "state" missing':'unexpected "state" response parameter value',tt,{expected:o,parameters:r})}if(ft(r,"error"))throw new Re("authorization response from the server is an error",{cause:r});const i=ft(r,"id_token"),s=ft(r,"token");if(void 0!==i||void 0!==s)throw new ee("implicit and hybrid flows are not supported");return c=new URLSearchParams(r),je.add(c),c;var c}(c,l,t.searchParams,null==r?void 0:r.expectedState)}catch(e){Er(e)}}}const E=await async function(e,t,r,o,n,a,i){if(fe(e),ge(t),!je.has(o))throw K('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',B);ce(n,'"redirectUri"');const s=ft(o,"code");if(!s)throw re('no authorization code in "callbackParameters"',tt);const c=new URLSearchParams(null==i?void 0:i.additionalParameters);return c.set("redirect_uri",n),c.set("code",s),a!==Xe&&(ce(a,'"codeVerifier"'),c.set("code_verifier",a)),xe(e,t,r,"authorization_code",c,i)}(c,l,d,a,i,(null==r?void 0:r.pkceCodeVerifier)||Xe,{additionalParameters:o,[X]:u,[W]:!p,DPoP:null==n?void 0:n.DPoP,headers:new Headers(dr),signal:Ur(A)}).catch(Er);"string"!=typeof(null==r?void 0:r.expectedNonce)&&"number"!=typeof(null==r?void 0:r.maxAge)||(r.idTokenExpected=!0);const w=async function(e,t,r,o){return"string"==typeof(null==o?void 0:o.expectedNonce)||"number"==typeof(null==o?void 0:o.maxAge)||null!=o&&o.requireIdToken?async function(e,t,r,o,n,a,i){const s=[];switch(o){case void 0:o=Ye;break;case Ye:break;default:ce(o,'"expectedNonce" argument'),s.push("nonce")}switch(null!=n||(n=t.default_max_age),n){case void 0:n=Ze;break;case Ze:break;default:se(n,!0,'"maxAge" argument'),s.push("auth_time")}const c=await Ke(e,t,r,s,a,i);ce(c.id_token,'"response" body "id_token" property',tt,{body:c});const l=Ge(c);if(n!==Ze){const e=he()+pe(t),r=me(t);if(l.auth_time+n{}});const g=async function(e,t,r,o){return Ke(e,t,r,void 0,null==o?void 0:o[V],null==o?void 0:o.recognizedTokenTypes)}(a,i,h,{[V]:u,recognizedTokenTypes:f});let y;try{y=await g}catch(n){if(Br(n,o))return Kr(e,t,r,m(m({},o),{},{flag:Gr}));Er(n)}return y.id_token&&await(null==p?void 0:p(h)),_r(y),y}async function Wr(e,t,r){if(!Vt(e))throw new Ht("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new Ht('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new Ht("JWS Protected Header incorrect type");if(void 0===e.payload)throw new Ht("JWS Payload missing");if("string"!=typeof e.signature)throw new Ht("JWS Signature missing or incorrect type");if(void 0!==e.header&&!Vt(e.header))throw new Ht("JWS Unprotected Header incorrect type");let o={};if(e.protected)try{const t=Tt(e.protected);o=JSON.parse(Et.decode(t))}catch(e){throw new Ht("JWS Protected Header is invalid")}if(!function(){for(var e=arguments.length,t=new Array(e),r=0;r"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let a;a=void 0!==r?new Map([...Object.entries(r),...t.entries()]):t;for(const t of o.crit){if(!a.has(t))throw new Mt('Extension Header Parameter "'.concat(t,'" is not recognized'));if(void 0===n[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(a.get(t)&&void 0===o[t])throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return new Set(o.crit)}(Ht,new Map([["b64",!0]]),null==r?void 0:r.crit,o,n);let i=!0;if(a.has("b64")&&(i=o.b64,"boolean"!=typeof i))throw new Ht('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const s=n.alg;if("string"!=typeof s||!s)throw new Ht('JWS "alg" (Algorithm) Header Parameter missing or invalid');const c=r&&function(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat("algorithms",'" option must be an array of strings'));if(t)return new Set(t)}(0,r.algorithms);if(c&&!c.has(s))throw new kt('"alg" (Algorithm) Header Parameter value not allowed');if(i){if("string"!=typeof e.payload)throw new Ht("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new Ht("JWS Payload must be a string or an Uint8Array instance");let l=!1;"function"==typeof t&&(t=await t(o,e),l=!0),function(e,t,r){switch(e.substring(0,2)){case"A1":case"A2":case"di":case"HS":case"PB":((e,t,r)=>{if(!(t instanceof Uint8Array)){if(Yt(t)){if((e=>"oct"===e.kty&&"string"==typeof e.k)(t)&&sr(e,t,r))return;throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Xt(t))throw new TypeError(Pt(e,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if("secret"!==t.type)throw new TypeError("".concat(ir(t),' instances for symmetric algorithms must be of type "secret"'))}})(e,t,r);break;default:((e,t,r)=>{if(Yt(t))switch(r){case"decrypt":case"sign":if((e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d))(t)&&sr(e,t,r))return;throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if((e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv)(t)&&sr(e,t,r))return;throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!Xt(t))throw new TypeError(Pt(e,t,"CryptoKey","KeyObject","JSON Web Key"));if("secret"===t.type)throw new TypeError("".concat(ir(t),' instances for asymmetric algorithms must not be of type "secret"'));if("public"===t.type)switch(r){case"sign":throw new TypeError("".concat(ir(t),' instances for asymmetric algorithm signing must be of type "private"'));case"decrypt":throw new TypeError("".concat(ir(t),' instances for asymmetric algorithm decryption must be of type "private"'))}if("private"===t.type)switch(r){case"verify":throw new TypeError("".concat(ir(t),' instances for asymmetric algorithm verifying must be of type "public"'));case"encrypt":throw new TypeError("".concat(ir(t),' instances for asymmetric algorithm encryption must be of type "public"'))}})(e,t,r)}}(s,t,"verify");const d=function(){for(var e=arguments.length,t=new Array(e),r=0;re+t.length,0),n=new Uint8Array(o);let a=0;for(const e of t)n.set(e,a),a+=e.length;return n}(void 0!==e.protected?wt(e.protected):new Uint8Array,wt("."),"string"==typeof e.payload?i?wt(e.payload):bt.encode(e.payload):e.payload),u=Jt(e.signature,"signature",Ht),p=await async function(e,t){if(e instanceof Uint8Array)return e;if(Ft(e))return e;if(jt(e)){if("secret"===e.type)return e.export();if("toCryptoKey"in e&&"function"==typeof e.toCryptoKey)try{return((e,t)=>{$t||($t=new WeakMap);let r=$t.get(e);if(null!=r&&r[t])return r[t];const o="public"===e.type,n=!!o;let a;if("x25519"===e.asymmetricKeyType){switch(t){case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":break;default:throw new TypeError(Qt)}a=e.toCryptoKey(e.asymmetricKeyType,n,o?[]:["deriveBits"])}if("ed25519"===e.asymmetricKeyType){if("EdDSA"!==t&&"Ed25519"!==t)throw new TypeError(Qt);a=e.toCryptoKey(e.asymmetricKeyType,n,[o?"verify":"sign"])}switch(e.asymmetricKeyType){case"ml-dsa-44":case"ml-dsa-65":case"ml-dsa-87":if(t!==e.asymmetricKeyType.toUpperCase())throw new TypeError(Qt);a=e.toCryptoKey(e.asymmetricKeyType,n,[o?"verify":"sign"])}if("rsa"===e.asymmetricKeyType){let r;switch(t){case"RSA-OAEP":r="SHA-1";break;case"RS256":case"PS256":case"RSA-OAEP-256":r="SHA-256";break;case"RS384":case"PS384":case"RSA-OAEP-384":r="SHA-384";break;case"RS512":case"PS512":case"RSA-OAEP-512":r="SHA-512";break;default:throw new TypeError(Qt)}if(t.startsWith("RSA-OAEP"))return e.toCryptoKey({name:"RSA-OAEP",hash:r},n,o?["encrypt"]:["decrypt"]);a=e.toCryptoKey({name:t.startsWith("PS")?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:r},n,[o?"verify":"sign"])}if("ec"===e.asymmetricKeyType){var i;const r=new Map([["prime256v1","P-256"],["secp384r1","P-384"],["secp521r1","P-521"]]).get(null===(i=e.asymmetricKeyDetails)||void 0===i?void 0:i.namedCurve);if(!r)throw new TypeError(Qt);const s={ES256:"P-256",ES384:"P-384",ES512:"P-521"};s[t]&&r===s[t]&&(a=e.toCryptoKey({name:"ECDSA",namedCurve:r},n,[o?"verify":"sign"])),t.startsWith("ECDH-ES")&&(a=e.toCryptoKey({name:"ECDH",namedCurve:r},n,o?[]:["deriveBits"]))}if(!a)throw new TypeError(Qt);return r?r[t]=a:$t.set(e,{[t]:a}),a})(e,t)}catch(e){if(e instanceof TypeError)throw e}let r=e.export({format:"jwk"});return er(e,r,t)}if(Yt(e))return e.k?Tt(e.k):er(e,e,t,!0);throw new Error("unreachable")}(t,s);if(!await async function(e,t,r,o){const n=await Zt(e,t,"verify");!function(e,t){if(e.startsWith("RS")||e.startsWith("PS")){const r=t.algorithm.modulusLength;if("number"!=typeof r||r<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}}(e,n);const a=function(e,t){const r="SHA-".concat(e.slice(-3));switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:parseInt(e.slice(-3),10)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"Ed25519":case"EdDSA":return{name:"Ed25519"};case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return{name:e};default:throw new Mt("alg ".concat(e," is not supported either by JOSE or your javascript runtime"))}}(e,n.algorithm);try{return await crypto.subtle.verify(a,n,r,o)}catch(e){return!1}}(s,p,u,d))throw new Wt;let h;h=i?Jt(e.payload,"payload",Ht):"string"==typeof e.payload?bt.encode(e.payload):e.payload;const f={payload:h};return void 0!==e.protected&&(f.protectedHeader=o),void 0!==e.header&&(f.unprotectedHeader=e.header),l?m(m({},f),{},{key:p}):f}const Fr=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function jr(e){const t=Fr.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");const r=parseFloat(t[2]);let o;switch(t[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":o=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":o=Math.round(60*r);break;case"hour":case"hours":case"hr":case"hrs":case"h":o=Math.round(3600*r);break;case"day":case"days":case"d":o=Math.round(86400*r);break;case"week":case"weeks":case"w":o=Math.round(604800*r);break;default:o=Math.round(31557600*r)}return"-"===t[1]||"ago"===t[4]?-o:o}const Xr=e=>e.includes("/")?e.toLowerCase():"application/".concat(e.toLowerCase());function Jr(e,t){let r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{r=JSON.parse(Et.decode(t))}catch(e){}if(!Vt(r))throw new xt("JWT Claims Set must be a top-level JSON object");const n=o.typ;if(n&&("string"!=typeof e.typ||Xr(e.typ)!==Xr(n)))throw new Dt('unexpected "typ" JWT header value',r,"typ","check_failed");const a=o.requiredClaims,i=void 0===a?[]:a,s=o.issuer,c=o.subject,l=o.audience,d=o.maxTokenAge,u=[...i];void 0!==d&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==s&&u.push("iss");for(const e of new Set(u.reverse()))if(!(e in r))throw new Dt('missing required "'.concat(e,'" claim'),r,e,"missing");if(s&&!(Array.isArray(s)?s:[s]).includes(r.iss))throw new Dt('unexpected "iss" claim value',r,"iss","check_failed");if(c&&r.sub!==c)throw new Dt('unexpected "sub" claim value',r,"sub","check_failed");if(l&&(m="string"==typeof l?[l]:l,!("string"==typeof(p=r.aud)?m.includes(p):Array.isArray(p)&&m.some(Set.prototype.has.bind(new Set(p))))))throw new Dt('unexpected "aud" claim value',r,"aud","check_failed");var p,m;let h;switch(typeof o.clockTolerance){case"string":h=jr(o.clockTolerance);break;case"number":h=o.clockTolerance;break;case"undefined":h=0;break;default:throw new TypeError("Invalid clockTolerance option type")}const f=(g=o.currentDate||new Date,Math.floor(g.getTime()/1e3));var g;if((void 0!==r.iat||d)&&"number"!=typeof r.iat)throw new Dt('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new Dt('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>f+h)throw new Dt('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new Dt('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=f-h)throw new Lt('"exp" claim timestamp check failed',r,"exp","check_failed")}if(d){const e=f-r.iat;if(e-h>("number"==typeof d?d:jr(d)))throw new Lt('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-h)throw new Dt('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r}function Vr(e){return Vt(e)}var Yr,Zr,zr=new WeakMap,qr=new WeakMap;class Qr{constructor(e){if(l(this,zr,void 0),l(this,qr,new WeakMap),!function(e){return e&&"object"==typeof e&&Array.isArray(e.keys)&&e.keys.every(Vr)}(e))throw new Ut("JSON Web Key Set malformed");d(zr,this,structuredClone(e))}jwks(){return c(zr,this)}async getKey(e,t){const r=m(m({},e),null==t?void 0:t.header),o=r.alg,n=r.kid,a=function(e){switch("string"==typeof e&&e.slice(0,2)){case"RS":case"PS":return"RSA";case"ES":return"EC";case"Ed":return"OKP";case"ML":return"AKP";default:throw new Mt('Unsupported "alg" value for a JSON Web Key Set')}}(o),s=c(zr,this).keys.filter(e=>{let t=a===e.kty;if(t&&"string"==typeof n&&(t=n===e.kid),!t||"string"!=typeof e.alg&&"AKP"!==a||(t=o===e.alg),t&&"string"==typeof e.use&&(t="sig"===e.use),t&&Array.isArray(e.key_ops)&&(t=e.key_ops.includes("verify")),t)switch(o){case"ES256":t="P-256"===e.crv;break;case"ES384":t="P-384"===e.crv;break;case"ES512":t="P-521"===e.crv;break;case"Ed25519":case"EdDSA":t="Ed25519"===e.crv}return t}),l=s[0],d=s.length;if(0===d)throw new Bt;if(1!==d){const e=new Gt,t=c(qr,this);throw e[Symbol.asyncIterator]=function(e){return function(){return new g(e.apply(this,arguments))}}(function*(){for(const e of s)try{yield yield i($r(t,e,o))}catch(e){}}),e}return $r(c(qr,this),l,o)}}async function $r(e,t,r){const o=e.get(t)||e.set(t,{}).get(t);if(void 0===o[r]){const e=await async function(e,t){if(!Vt(e))throw new TypeError("JWK must be an object");let r;switch(null!=t||(t=e.alg),null!=r||(r=e.ext),e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw new TypeError('missing "k" (Key Value) Parameter value');return Tt(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new Mt('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');return qt(m(m({},e),{},{alg:t,ext:r}));case"AKP":if("string"!=typeof e.alg||!e.alg)throw new TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==t&&t!==e.alg)throw new TypeError("JWK alg and alg option value mismatch");return qt(m(m({},e),{},{ext:r}));case"EC":case"OKP":return qt(m(m({},e),{},{alg:t,ext:r}));default:throw new Mt('Unsupported "kty" (Key Type) Parameter value')}}(m(m({},t),{},{ext:!0}),r);if(e instanceof Uint8Array||"public"!==e.type)throw new Ut("JSON Web Key Set members must be public keys");o[r]=e}return o[r]}function eo(e){const t=new Qr(e),r=async(e,r)=>t.getKey(e,r);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}let to;if("undefined"==typeof navigator||null===(Yr=navigator.userAgent)||void 0===Yr||null===(Zr=Yr.startsWith)||void 0===Zr||!Zr.call(Yr,"Mozilla/5.0 ")){const e="v6.2.3";to="".concat("jose","/").concat(e)}const ro=Symbol(),oo=Symbol();var no=new WeakMap,ao=new WeakMap,io=new WeakMap,so=new WeakMap,co=new WeakMap,lo=new WeakMap,uo=new WeakMap,po=new WeakMap,mo=new WeakMap,ho=new WeakMap;class fo{constructor(e,t){if(l(this,no,void 0),l(this,ao,void 0),l(this,io,void 0),l(this,so,void 0),l(this,co,void 0),l(this,lo,void 0),l(this,uo,void 0),l(this,po,void 0),l(this,mo,void 0),l(this,ho,void 0),!(e instanceof URL))throw new TypeError("url must be an instance of URL");var r,o;d(no,this,new URL(e.href)),d(ao,this,"number"==typeof(null==t?void 0:t.timeoutDuration)?null==t?void 0:t.timeoutDuration:5e3),d(io,this,"number"==typeof(null==t?void 0:t.cooldownDuration)?null==t?void 0:t.cooldownDuration:3e4),d(so,this,"number"==typeof(null==t?void 0:t.cacheMaxAge)?null==t?void 0:t.cacheMaxAge:6e5),d(uo,this,new Headers(null==t?void 0:t.headers)),to&&!c(uo,this).has("User-Agent")&&c(uo,this).set("User-Agent",to),c(uo,this).has("accept")||(c(uo,this).set("accept","application/json"),c(uo,this).append("accept","application/jwk-set+json")),d(po,this,null==t?void 0:t[ro]),void 0!==(null==t?void 0:t[oo])&&(d(ho,this,null==t?void 0:t[oo]),r=null==t?void 0:t[oo],o=c(so,this),"object"==typeof r&&null!==r&&"uat"in r&&"number"==typeof r.uat&&!(Date.now()-r.uat>=o)&&"jwks"in r&&Vt(r.jwks)&&Array.isArray(r.jwks.keys)&&Array.prototype.every.call(r.jwks.keys,Vt)&&(d(co,this,c(ho,this).uat),d(mo,this,eo(c(ho,this).jwks))))}pendingFetch(){return!!c(lo,this)}coolingDown(){return"number"==typeof c(co,this)&&Date.now()3&&void 0!==arguments[3]?arguments[3]:fetch;const n=await o(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(e=>{if("TimeoutError"===e.name)throw new Kt;throw e});if(200!==n.status)throw new It("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch(e){throw new It("Failed to parse the JSON Web Key Set HTTP response as JSON")}}(c(no,this).href,c(uo,this),AbortSignal.timeout(c(ao,this)),c(po,this)).then(e=>{d(mo,this,eo(e)),c(ho,this)&&(c(ho,this).uat=Date.now(),c(ho,this).jwks=e),d(co,this,Date.now()),d(lo,this,void 0)}).catch(e=>{throw d(lo,this,void 0),e})),await c(lo,this)}}const go=["mfaToken"],yo=["mfaToken"];var Ao,vo,So,bo,Eo,wo,Ro,To,_o,No,Co,Oo,Po,Io,Do,Lo,ko=class extends Error{constructor(e,t){super(t),u(this,"code",void 0),this.name="NotSupportedError",this.code=e}},Mo=class extends Error{constructor(e,t,r){super(t),u(this,"cause",void 0),u(this,"code",void 0),this.code=e,this.cause=r&&{error:r.error,error_description:r.error_description,message:r.message}}},Ho=class extends Mo{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},xo=class extends Mo{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},Uo=class extends Mo{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},Bo=class extends Mo{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},Go=class extends Mo{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},Ko=class extends Mo{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},Wo=class extends Error{constructor(e){super(e),u(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Fo=class extends Mo{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),u(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},jo=class extends Mo{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},Xo=class extends Mo{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},Jo=class extends Mo{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Vo=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),u(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}};function Yo(e){return Object.entries(e).filter(e=>void 0!==f(e,2)[1]).reduce((e,t)=>m(m({},e),{},{[t[0]]:t[1]}),{})}var Zo=class extends Error{constructor(e,t,r){super(t),u(this,"cause",void 0),u(this,"code",void 0),this.code=e,this.cause=r&&{error:r.error,error_description:r.error_description,message:r.message}}},zo=class extends Zo{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},qo=class extends Zo{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},Qo=class extends Zo{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},$o=class extends Zo{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}};function en(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var tn=(Ao=new WeakMap,vo=new WeakMap,So=new WeakMap,class{constructor(e){var t;l(this,Ao,void 0),l(this,vo,void 0),l(this,So,void 0),d(Ao,this,"https://".concat(e.domain)),d(vo,this,e.clientId),d(So,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async listAuthenticators(e){const t="".concat(c(Ao,this),"/mfa/authenticators"),r=e.mfaToken,o=await c(So,this).call(this,t,{method:"GET",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}});if(!o.ok){const e=await o.json();throw new zo(e.error_description||"Failed to list authenticators",e)}return(await o.json()).map(en)}async enrollAuthenticator(e){const t="".concat(c(Ao,this),"/mfa/associate"),r=e.mfaToken,o=h(e,go),n={authenticator_types:o.authenticatorTypes};"oobChannels"in o&&(n.oob_channels=o.oobChannels),"phoneNumber"in o&&o.phoneNumber&&(n.phone_number=o.phoneNumber),"email"in o&&o.email&&(n.email=o.email);const a=await c(So,this).call(this,t,{method:"POST",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const e=await a.json();throw new qo(e.error_description||"Failed to enroll authenticator",e)}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await a.json())}async deleteAuthenticator(e){const t=e.authenticatorId,r=e.mfaToken,o="".concat(c(Ao,this),"/mfa/authenticators/").concat(encodeURIComponent(t)),n=await c(So,this).call(this,o,{method:"DELETE",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}});if(!n.ok){const e=await n.json();throw new Qo(e.error_description||"Failed to delete authenticator",e)}}async challengeAuthenticator(e){const t="".concat(c(Ao,this),"/mfa/challenge"),r=e.mfaToken,o=h(e,yo),n={mfa_token:r,client_id:c(vo,this),challenge_type:o.challengeType};o.authenticatorId&&(n.authenticator_id=o.authenticatorId);const a=await c(So,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const e=await a.json();throw new $o(e.error_description||"Failed to challenge authenticator",e)}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await a.json())}}),rn=class e{constructor(e,t,r,o,n,a,i){u(this,"accessToken",void 0),u(this,"idToken",void 0),u(this,"refreshToken",void 0),u(this,"expiresAt",void 0),u(this,"scope",void 0),u(this,"claims",void 0),u(this,"authorizationDetails",void 0),u(this,"tokenType",void 0),u(this,"issuedTokenType",void 0),this.accessToken=e,this.idToken=r,this.refreshToken=o,this.expiresAt=t,this.scope=n,this.claims=a,this.authorizationDetails=i}static fromTokenEndpointResponse(t){const r=t.id_token?t.claims():void 0,o=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,r,t.authorization_details);return o.tokenType=t.token_type,o.issuedTokenType=t.issued_token_type,o}},on=(bo=new WeakMap,Eo=new WeakMap,wo=new WeakMap,class{constructor(e,t){l(this,bo,new Map),l(this,Eo,void 0),l(this,wo,void 0),d(wo,this,Math.max(1,Math.floor(e))),d(Eo,this,Math.max(0,Math.floor(t)))}get(e){const t=c(bo,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return c(bo,this).delete(e),c(bo,this).set(e,t),t.value;c(bo,this).delete(e)}}set(e,t){for(c(bo,this).has(e)&&c(bo,this).delete(e),c(bo,this).set(e,{value:t,expiresAt:Date.now()+c(Eo,this)});c(bo,this).size>c(wo,this);){const e=c(bo,this).keys().next().value;if(void 0===e)break;c(bo,this).delete(e)}}}),nn=new Map;function an(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var sn=class{static createDiscoveryCache(e){const t=(r=e.maxEntries,o=e.ttlMs,"".concat(r,":").concat(o));var r,o;let n=(a=t,nn.get(a));var a;return n||(n=new on(e.maxEntries,e.ttlMs),nn.set(t,n)),n}static createJwksCache(){return{}}},cn="openid profile email offline_access",ln=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function dn(e){if(null==e)throw new Ko("subject_token is required");if("string"!=typeof e)throw new Ko("subject_token must be a string");if(0===e.trim().length)throw new Ko("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new Ko("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new Ko("subject_token must not include the 'Bearer ' prefix")}function un(e,t){if(t)for(const o of Object.entries(t)){var r=f(o,2);const t=r[0],n=r[1];if(!ln.has(t))if(Array.isArray(n)){if(n.length>20)throw new Ko("Parameter '".concat(t,"' exceeds maximum array size of ").concat(20));n.forEach(r=>{e.append(t,r)})}else e.append(t,n)}}var pn="urn:ietf:params:oauth:token-type:access_token";Ro=new WeakMap,To=new WeakMap,_o=new WeakMap,No=new WeakMap,Co=new WeakMap,Oo=new WeakMap,Po=new WeakMap,Io=new WeakMap,Do=new WeakMap,Lo=new WeakSet;function mn(){const e=c(No,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(c(No,this).useMtls?"1":"0")}async function hn(e){const t=await a(Lo,this,An).call(this),r=new Tr(e,c(No,this).clientId,c(No,this).clientSecret,t);return r[gr]=c(Co,this),r}async function fn(){if(c(Ro,this)&&c(To,this))return{configuration:c(Ro,this),serverMetadata:c(To,this)};const e=a(Lo,this,mn).call(this),t=c(Po,this).get(e);if(t)return d(To,this,t.serverMetadata),d(Ro,this,await a(Lo,this,hn).call(this,t.serverMetadata)),{configuration:c(Ro,this),serverMetadata:c(To,this)};const r=c(Io,this).get(e);if(r){const e=await r;return d(To,this,e.serverMetadata),d(Ro,this,await a(Lo,this,hn).call(this,e.serverMetadata)),{configuration:c(Ro,this),serverMetadata:c(To,this)}}const o=(async()=>{const t=await a(Lo,this,An).call(this),r=await wr(new URL("https://".concat(c(No,this).domain)),c(No,this).clientId,{use_mtls_endpoint_aliases:c(No,this).useMtls},t,{[gr]:c(Co,this)}),o=r.serverMetadata();return c(Po,this).set(e,{serverMetadata:o}),{configuration:r,serverMetadata:o}})(),n=o.then(e=>({serverMetadata:e.serverMetadata}));n.catch(()=>{}),c(Io,this).set(e,n);try{const e=await o,t=e.configuration,r=e.serverMetadata;d(Ro,this,t),d(To,this,r),c(Ro,this)[gr]=c(Co,this)}finally{c(Io,this).delete(e)}return{configuration:c(Ro,this),serverMetadata:c(To,this)}}async function gn(e){var t,r;const o=(await a(Lo,this,fn).call(this)).configuration;if("audience"in e||"resource"in e)throw new Ko("audience and resource parameters are not supported for Token Vault exchanges");dn(e.subjectToken);const n=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(t=e.subjectTokenType)&&void 0!==t?t:pn,requested_token_type:null!==(r=e.requestedTokenType)&&void 0!==r?r:"http://auth0.com/oauth/token-type/federated-connection-access-token"});e.loginHint&&n.append("login_hint",e.loginHint),e.scope&&n.append("scope",e.scope),un(n,e.extra);try{const e=await Kr(o,"urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",n);return rn.fromTokenEndpointResponse(e)}catch(t){throw new Ko("Failed to exchange token for connection '".concat(e.connection,"'."),t)}}async function yn(e){const t=(await a(Lo,this,fn).call(this)).configuration;dn(e.subjectToken);const r=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});e.audience&&r.append("audience",e.audience),e.scope&&r.append("scope",e.scope),e.requestedTokenType&&r.append("requested_token_type",e.requestedTokenType),e.organization&&r.append("organization",e.organization),un(r,e.extra);try{const e=await Kr(t,"urn:ietf:params:oauth:grant-type:token-exchange",r);return rn.fromTokenEndpointResponse(e)}catch(t){throw new Ko("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),t)}}async function An(){return c(_o,this)||d(_o,this,(async()=>{if(!c(No,this).clientSecret&&!c(No,this).clientAssertionSigningKey&&!c(No,this).useMtls)throw new Vo;if(c(No,this).useMtls)return(e,t,r,o)=>{r.set("client_id",t.client_id)};let e=c(No,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await async function(e,t){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return ar(e,t,void 0)}(e,c(No,this).clientAssertionSigningAlg||"RS256")),e?function(e){return Ae(e,void 0)}(e):fr(c(No,this).clientSecret)})().catch(e=>{throw d(_o,this,void 0),e})),c(_o,this)}async function vn(e){const t=(await a(Lo,this,fn).call(this)).configuration,r=de(),o=await function(e){return async function(e){return ce(e,"codeVerifier"),$(await crypto.subtle.digest("SHA-256",z(e)))}(e)}(r),n=Yo(m(m({},c(No,this).authorizationParams),null==e?void 0:e.authorizationParams)),i=new URLSearchParams(m(m({scope:cn},n),{},{client_id:c(No,this).clientId,code_challenge:o,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await Hr(t,i):await Mr(t,i),codeVerifier:r}}},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,r){var o=r(5546);function n(){var t,r,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function c(e,n,a,i){var s=n&&n.prototype instanceof d?n:d,c=Object.create(s.prototype);return o(c,"_invoke",function(e,o,n){var a,i,s,c=0,d=n||[],u=!1,p={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(e,r){return a=e,i=0,s=t,p.n=r,l}};function m(e,o){for(i=e,s=o,r=0;!u&&c&&!n&&r3?(n=h===o)&&(s=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=m&&((n=e<2&&mo||o>h)&&(a[4]=e,a[5]=o,p.n=h,i=0))}if(n||e>1)return l;throw u=!0,o}return function(n,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,h),i=d,s=h;(r=i<2?t:s)||!u;){a||(i?i<3?(i>1&&(p.n=-1),m(i,s)):p.n=s:p.v=s);try{if(c=2,a){if(i||(n="next"),r=a[n]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),i=1);a=t}else if((r=(u=p.n<0)?s:e.call(o,p))!==l)break}catch(e){a=t,i=1,s=e}finally{c=1}}return{value:r,done:u}}}(e,a,i),!0),c}var l={};function d(){}function u(){}function p(){}r=Object.getPrototypeOf;var m=[][i]?r(r([][i]())):(o(r={},i,function(){return this}),r),h=p.prototype=d.prototype=Object.create(m);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,o(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=p,o(h,"constructor",p),o(p,"constructor",u),u.displayName="GeneratorFunction",o(p,s,"GeneratorFunction"),o(h),o(h,s,"Generator"),o(h,i,function(){return this}),o(h,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:c,m:f}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,r){var o=r(887);e.exports=function(e,t,r,n,a){var i=o(e,t,r,n,a);return i.next().then(function(e){return e.done?e.value:i.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,r){var o=r(6993),n=r(1791);e.exports=function(e,t,r,a,i){return new n(o().w(e,t,r,a),i||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1791(e,t,r){var o=r(5172),n=r(5546);e.exports=function e(t,r){function a(e,n,i,s){try{var c=t[e](n),l=c.value;return l instanceof o?r.resolve(l.v).then(function(e){a("next",e,i,s)},function(e){a("throw",e,i,s)}):r.resolve(l).then(function(e){c.value=e,i(c)},function(e){return a("throw",e,i,s)})}catch(e){s(e)}}var i;this.next||(n(e.prototype),n(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(e,t,o){function n(){return new r(function(t,r){a(e,o,t,r)})}return i=i?i.then(n,n):n()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(r,o,n,a){var i=Object.defineProperty;try{i({},"",{})}catch(r){i=0}e.exports=t=function(e,r,o,n){function a(r,o){t(e,r,function(e){return this._invoke(r,o,e)})}r?i?i(e,r,{value:o,enumerable:!n,configurable:!n,writable:!n}):e[r]=o:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,o,n,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),r=[];for(var o in t)r.unshift(o);return function e(){for(;r.length;)if((o=r.pop())in t)return e.value=o,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,r){var o=r(5172),n=r(6993),a=r(5869),i=r(887),s=r(1791),c=r(4373),l=r(579);function d(){"use strict";var t=n(),r=t.m(d),u=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))}var m={throw:1,return:2,break:3,continue:3};function h(e){var t,r;return function(o){t||(t={stop:function(){return r(o.a,2)},catch:function(){return o.v},abrupt:function(e,t){return r(o.a,m[e],t)},delegateYield:function(e,n,a){return t.resultName=n,r(o.d,l(e),a)},finish:function(e){return r(o.f,e)}},r=function(e,r,n){o.p=t.prev,o.n=t.next;try{return e(r,n)}finally{t.next=o.n}}),t.resultName&&(t[t.resultName]=o.v,t.resultName=void 0),t.sent=o.v,t.next=o.n;try{return e.call(this,t)}finally{o.p=t.prev,o.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,r,o,n){return t.w(h(e),r,o,n&&n.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new o(e,t)},AsyncIterator:s,async:function(e,t,r,o,n){return(p(t)?i:a)(h(e),t,r,o,n)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,r){var o=r(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(o(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,r){var o=r(4633)();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},467(e,t,r){"use strict";function o(e,t,r,o,n,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(o,n)}function n(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,c,"next",e)}function c(e){o(i,n,a,s,c,"throw",e)}s(void 0)})}}r.d(t,{A:()=>n})},3029(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,{A:()=>o})},2901(e,t,r){"use strict";r.d(t,{A:()=>a});var o=r(9922);function n(e,t){for(var r=0;rn});var o=r(9922);function n(e,t,r){return(t=(0,o.A)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},2327(e,t,r){"use strict";r.d(t,{A:()=>n});var o=r(2284);function n(e,t){if("object"!=(0,o.A)(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=(0,o.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},9922(e,t,r){"use strict";r.d(t,{A:()=>a});var o=r(2284),n=r(2327);function a(e){var t=(0,n.A)(e,"string");return"symbol"==(0,o.A)(t)?t:t+""}},2284(e,t,r){"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}r.d(t,{A:()=>o})},8479(e,t,r){"use strict";var o=r(3029),n=r(2901),a=r(4467),i=r(3153),s=function(){function e(){(0,o.A)(this,e),(0,a.A)(this,"readyPromise",null),(0,a.A)(this,"readyResolved",!1),(0,a.A)(this,"readyValue",!1)}return(0,n.A)(e,[{key:"blueConicReady",value:function(){var t=this,r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).timeout,o=Date.now();if(this.readyResolved&&!0===this.readyValue)return i.A.log("BlueConicUtils | blueConicReady | returning cached value:",this.readyValue),Promise.resolve(!0);if(this.readyPromise)return i.A.log("BlueConicUtils | blueConicReady | returning existing promise"),this.readyPromise;var n=null!=r?r:e.DEFAULT_TIMEOUT;return i.A.log("BlueConicUtils | blueConicReady | checking BC readiness"),this.readyPromise=new Promise(function(e){var r,a=setTimeout(function(){t.readyResolved||(i.A.log("BlueConicUtils | blueConicReady | timeout at:",(Date.now()-o)/1e3,"s"),t.resolveReady(!1,e))},n);if(null!==(r=window.blueConicClient)&&void 0!==r&&r.profile)return i.A.log("BlueConicUtils | blueConicReady | BC already ready"),void t.resolveReady(!0,e);var s=function(){var r;if(!t.readyResolved)if(null!==(r=window.blueConicClient)&&void 0!==r&&r.event){i.A.log("BlueConicUtils | blueConicReady | BC client detected");var n=window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},function(){clearTimeout(a),i.A.log("BlueConicUtils | blueConicReady | onReady fired at:",(Date.now()-o)/1e3,"s"),null==n||n(),t.resolveReady(!0,e)})}else setTimeout(s,500)};s()}),this.readyPromise}},{key:"resolveReady",value:function(e,t){this.readyResolved||(i.A.log("BlueConicUtils | blueConicReady | resolved with:",e),this.readyResolved=!0,this.readyValue=e,t(e),!1===e&&(this.readyPromise=null,this.readyResolved=!1))}}])}();(0,a.A)(s,"DEFAULT_TIMEOUT",3e3);new s},3153(e,t,r){"use strict";r.d(t,{A:()=>n});var o=r(3612);const n={log:function(){if(o.A.debug){for(var e,t=arguments.length,r=new Array(t),n=0;nc}),window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const c={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,enableReaderDashboardv2:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardv2,enableDashboardCancel:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardCancel,enableDashboardBenefitHub:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardBenefitHub,enableEngageArticleGifting:"1"===(null===(o=window.authentication_config)||void 0===o?void 0:o.articleSharingEnabled)&&"1"===(null===(n=window.authentication_config)||void 0===n?void 0:n.isEngageArticleSharing),enableGiftedArticlesLink:"1"===(null===(a=window.authentication_config)||void 0===a?void 0:a.articleSharingEnabled)&&"1"!==(null===(i=window.authentication_config)||void 0===i?void 0:i.isEngageArticleSharing),enableSavedArticlesLink:"1"===(null===(s=window.authentication_config)||void 0===s?void 0:s.articleSavingEnabled),prosperstackClientid:window.authentication_config?window.authentication_config.prosperstackClientid:"",enableUpgradeSubscription:!!window.authentication_config&&"1"===window.authentication_config.enableUpgradeSubscription,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,forceLogoutOnExpiredIdToken:!!window.authentication_config&&"1"===window.authentication_config.forceLogoutOnExpiredIdToken,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog,updatePaymentEnabled:!!window.authentication_config&&"1"===window.authentication_config.enableUpdatePayment}},9532(e,t,r){"use strict";r.d(t,{L4:()=>g,aG:()=>A,gQ:()=>y,mP:()=>S,oL:()=>m});var o,n,a=r(4467),i=r(467),s=r(4756),c=r(5537),l=(r(893),r(3153)),d=r(3612);r(8479);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function p(e){for(var t=1;t2&&(clearInterval(t),e(!0));case 1:case"end":return r.stop()}},r)})),50)}})},g=function(){var e=(0,i.A)(s.mark(function e(t){var r,o,n;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,f();case 1:return l.A.log("Utils getDataLayerObject: looking for this dataLayer object ",t),window.dataLayer=window.dataLayer||[],r="",l.A.log("Utils getDataLayerObject: here is dataLayer length ",window.dataLayer.length),o=function(e){return l.A.log("Utils dataLayerLoop: look for this element ",e),e[t]?(l.A.log("Utils dataLayerLoop: found ",e[t]),r=e[t],e[t]):(l.A.log("Utils dataLayerLoop: dataLayer search ",!1),!1)},n=window.dataLayer.some(o),e.abrupt("return",n?r:"");case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,i.A)(s.mark(function e(){var t,r,o=arguments;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:"Page Type",e.next=1,g(t);case 1:return r=e.sent,l.A.log("utils | pageType: page type is ",r),e.abrupt("return",r);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(){var e=(0,i.A)(s.mark(function e(){return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,t){return d.A.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(l.A.log("Entitlements already present:",window.MNGAuthentication.entitlementsReady),void e(window.MNGAuthentication.entitlementsReady)):void window.addEventListener("entitlementsReady",function(r){try{var o=r.detail||{};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=o,l.A.log("Received entitlementsReady event:",o),e(o)}catch(e){l.A.error("Error handling entitlementsReady event:",e),t(e)}},{once:!0}):(l.A.log("Entitlements disabled in settings."),void e(!1))}));case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(e){l.A.log("starting simpleEmailValidation");if(!e)return{valid:!1,message:"Please enter an email."};if(!/^(([^<>()[\]\\.,;:\s@']+(\.[^<>()[\]\\.,;:\s@']+)*)|('.+'))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(e))return{valid:!1,message:"Please enter a valid email."};var t=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),r=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(t);return l.A.log("simpleEmailValidation: ","TLD search ".concat(r)),!1===r?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex(function(t){return t===e.split("@")[1]})?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=v;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var S=function(e){var t=e.text,r=e.boldText,o=void 0!==r&&r,n=e.title,a=e.legal,i=void 0===a?"":a,s=e.id,c=e.fullScreen,l=e.appendToId,d=e.closeConfirm,u=e.buttonText,p=e.autoDismiss,m=void 0===p||p,h=e.embedded,f=void 0!==h&&h,g=e.loginModal,y=void 0!==g&&g,A=e.homePage,v=e.canonicalURL,S=document.querySelector("#".concat(s)),E="";if(y){var w=encodeURIComponent(v);E='
\n
\n
\n
\n
\n
\n

').concat(n||"",'

\n
\n
\n\t\t\t\t\t\t\t\t\t').concat(t||"",'\n
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t').concat(i||"",'\n
\n
\n
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n \t
\n \t
\n \t
\n \t
\n \t
")}else E='
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

').concat(n||"",'

\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t').concat(t||"",'\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t').concat(i||"","\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t").concat(d?'
\n\t\t\t\t\t\t\t\t
"):"","\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
");(S||((S=document.createElement("div")).id=s,S.classList="digisubs-mainModalWrapper"),S.innerHTML="",S.innerHTML=E,y)||S.querySelector("#digisubs-modal-button-container").addEventListener("click",function(){S.remove()});d&&S.querySelector(".digisubs-optional-button-container").addEventListener("click",function(){S.remove()});if(l){var R=document.querySelector("#".concat(l));if(R&&f){var T=document.getElementById("userProfileEntriesContainer").querySelectorAll(".user-profile-item-row");if(T.length>=2)T[1].parentNode.insertBefore(S,T[1].nextSibling)}else R.append(S)}var _=S.querySelector("#modalContainer");if(_&&_.addEventListener("click",b),m){var N=Math.min(Math.max(55*t.length,2500),7e3);N=N>2800?N:3500,setTimeout(function(){var e;(e=S).classList.add("fade-out"),setTimeout(function(){e.remove()},200)},N)}return S};function b(e){var t=document.getElementById("modalContainer"),r=document.getElementById("modal-wrap");t&&r&&e.target===t&&(t.classList.add("fade-out"),setTimeout(function(){t.style.display="none";var r=document.elementFromPoint(e.clientX,e.clientY);if(t.style.display="",t.remove(),r&&"A"===r.tagName)try{var o=new URL(r.href,window.location.origin);"http:"!==o.protocol&&"https:"!==o.protocol||window.location.assign(o.href)}catch(e){console.warn("URL no válida:",e)}},200))}var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return new Promise(function(t,r){var o={sspw:null,sophiClient:null,engagePaywall:null,engageStatus:null},n=function(){var n=(0,i.A)(s.mark(function n(){var a,i,c,d,u,m,h,f,v,S,b;return s.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,"1"!==(null===(a=window.sophi_config)||void 0===a?void 0:a.enableSophiSSPW)){n.next=1;break}if(!document.getElementById("server-paywall")){n.next=1;break}return o.sspw=!0,n.abrupt("return",t({paywall:!0,details:p({},o)}));case 1:return n.next=2,y();case 2:return c=n.sent,n.next=3,g("Paywall_Level");case 3:if(d=n.sent,"article"===c&&"free"!==d){n.next=4;break}return n.abrupt("return",t({paywall:!1,details:"article"!==c?"Page type is not an article":"Free article"}));case 4:return n.next=5,A();case 5:if(!(u=n.sent)||!u.isEntitled){n.next=6;break}return n.abrupt("return",t({paywall:!1,details:"Entitled User"}));case 6:if("premium"!==d){n.next=7;break}return n.abrupt("return",t({paywall:!0,details:"Premium article"}));case 7:if(m=null===(i=window.ConnextUtils)||void 0===i?void 0:i.runningSophi,l.A.log("checkPaywallStatus - Sophi is running: ",m),!m){n.next=8;break}window.ConnextUtils.connextAlreadyRan&&window.sophiWallConfig&&!window.sophiWallConfig.error&&"paywall"===window.sophiWallConfig.wallType?(o.sophiClient=!0,o.engageStatus=!0,o.engagePaywall=!0):window.addEventListener("onPaywallShown",function(){return"paywall"===window.sophiWallConfig.wallType&&(o.sophiClient=!0),t({paywall:!0,details:p({},o)})},{once:!0}),n.next=12;break;case 8:if(m){n.next=12;break}return h=window.ConnextUtils.connextReady("onPaywallShown"),f=new Promise(function(t,r){return setTimeout(function(){return r(new Error("No Engage paywall within 10 seconds, resolving as no paywall."))},e)}),n.prev=9,n.next=10,Promise.race([h,f]);case 10:!0===(v=n.sent)?(o.engagePaywall=!0,o.engageStatus="Engage paywall detected"):(o.engagePaywall=!1,o.engageStatus="Engage response: ".concat(v)),n.next=12;break;case 11:n.prev=11,S=n.catch(9),o.engagePaywall=!1,o.engageStatus="Engage response: ".concat(S);case 12:return n.abrupt("return",t({paywall:Object.values(o).some(function(e){return e}),details:p({},o)}));case 13:n.prev=13,b=n.catch(0),r(b);case 14:case"end":return n.stop()}},n,null,[[0,13],[9,11]])}));return function(){return n.apply(this,arguments)}}();n()})};"undefined"!=typeof window&&(window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.checkPaywallStatus=E)},5537(e,t,r){"use strict";r.d(t,{s:()=>a});class o extends Error{}function n(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}(t)}catch(e){return atob(t)}}function a(e,t){if("string"!=typeof e)throw new o("Invalid token specified: must be a string");t||(t={});const r=!0===t.header?0:1,a=e.split(".")[r];if("string"!=typeof a)throw new o(`Invalid token specified: missing part #${r+1}`);let i;try{i=n(a)}catch(e){throw new o(`Invalid token specified: invalid base64 for part #${r+1} (${e.message})`)}try{return JSON.parse(i)}catch(e){throw new o(`Invalid token specified: invalid json for part #${r+1} (${e.message})`)}}o.prototype.name="InvalidTokenError"},2450(e){"use strict";e.exports=JSON.parse('{"macombdaily.com":{"code":"MD","logo":"MD_Logo.png","title":"Macomb Daily","tribune":false,"cluster":["themorningsun.com","theoaklandpress.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-977-3677","email":"service@macombdaily.com","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 3 p.m. Sat. 7 a.m. – 10 a.m. Sun. 7 a.m. – 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/macomb-daily-for-iphone/id520209090?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.macombdaily"}]},"themorningsun.com":{"code":"MSUN","logo":"MS_Logo.png","title":"Mount Pleasant Morning","tribune":false,"cluster":["macombdaily.com","theoaklandpress.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"989-779-6000","email":"customerservice@oakpress.com","address1":"","address2":"","timeZone":"Eastern","supportHours":" Mon.-Fri. 8:30 a.m. – 5:00 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-morning-sun-for-iphone/id520224707?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.morningsun"}]},"theoaklandpress.com":{"code":"OP","logo":"OP_Logo.png","title":"Daily Oakland","tribune":false,"cluster":["macombdaily.com","themorningsun.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-977-3677","email":"customerservice@oakpress.com","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 3 p.m. Sat. 7 a.m. – 10 a.m. Sun. 7 a.m. – 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-oakland-press-for-iphone/id520210301?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.oaklandpress"}]},"thenewsherald.com":{"code":"TNH","logo":"TNH_Logo.png","title":"The News-Herald","tribune":false,"cluster":[],"clusterName":"Michigan Weeklies","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-977-3677","email":"customerservice@oakpress.com","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 3 p.m. Sat. 7 a.m. – 10 a.m. Sun. 7 a.m. – 12 p.m."},"apps":[{"app_store":"","play_store":""}]},"dailyfreeman.com":{"code":"KF","logo":"DF_Logo.png","title":"Kingston Daily Freeman","tribune":false,"cluster":["oneidadispatch.com","saratogian.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-699-7699","email":" circulation@freemanonline.com","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 6 p.m. Sat. 6:30 a.m. – 11 a.m. Sun. 6:30 a.m. – 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/daily-freeman-for-iphone/id520227762?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailyfreeman"}]},"oneidadispatch.com":{"code":"OD","logo":"OD_Logo.png","title":"Oneida Daily Dispatch","tribune":false,"cluster":["dailyfreeman.com","saratogian.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-699-7699","email":"customerservice@oneidadispatch.com","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 6 p.m. Sat. 6:30 a.m. – 11 a.m. Sun. 6:30 a.m. – 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/oneida-dispatch-for-iphone/id520233872?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.oneidadispatch"}]},"saratogian.com":{"code":"SA","logo":"SRT_Logo.png","title":"The Saratogian","tribune":false,"cluster":["oneidadispatch.com","dailyfreeman.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-599-0499","email":"circulation@saratogian.com","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday – Friday 7:30 a.m.–6 p.m. Saturday 6:30 a.m.–11 a.m. Sunday 6:30 a.m.-12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/saratogian-for-iphone/id520229775?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.saratogian"}]},"troyrecord.com":{"code":"TR","logo":"TROY_Logo.png","title":"The Troy Record","tribune":false,"cluster":["oneidadispatch.com","dailyfreeman.com","saratogian.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-599-0499","email":"circulation@saratogian.com","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Monday – Friday 7:30 a.m. – 6:00 p.m. \\\\n Saturday 6:30 a.m. – 11:00 a.m. \\\\n Sunday 6:30 a.m. – 12:00 noon"},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-record-for-iphone/id520232370?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.record"}]},"morningjournal.com":{"code":"MJ","logo":"MOJ_Logo.png","title":"Lorain Morning Journal","tribune":false,"cluster":["news-herald.com"],"clusterName":"Ohio","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-757-0727","email":"subscribe@morningjournal.com","address1":"401 Broadway Ave., Suite B","address2":"Lorain, Ohio 44052","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 3 p.m. Sat. 6:30 a.m. – 10 a.m. Sun. 6:30 a.m. – 10 a.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/morning-journal-for-iphone/id520205939?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.morningjournal"}]},"news-herald.com":{"code":"NH","logo":"NH_Logo.png","title":"Lake County News-Herald","tribune":false,"cluster":["morningjournal.com"],"clusterName":"Ohio","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-787-0717","email":"circulation@news-herald.com","address1":"36625 Vine St. Suite 4","address2":"Willoughby, Ohio 44094","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. – 3 p.m. Sat. 6:30 a.m. – 10 a.m. Sun. 6:30 a.m. – 10 a.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-news-herald-for-iphone/id520206415?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.newsherald"}]},"delcotimes.com":{"code":"DCDT","logo":"DEL_Logo.png","title":"Delaware County Times","tribune":false,"cluster":["readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-799-6299","email":"epapersupport@21st-centurymedia.com","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/delaware-county-daily-times/id508962453?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.thedelawarecountydailytimes"}]},"readingeagle.com":{"code":"EAGLE","logo":"RE_Logo.png","title":"Reading Eagle","tribune":false,"cluster":["delcotimes.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"610-371-5122","email":"ecustomerservice@readingeagle.com","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/reading-eagle/id950379194?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.readingeagle.eversify"}]},"thereporteronline.com":{"code":"LANS","logo":"TRO_Logo.png","title":"The Lansdale Reporter","tribune":false,"cluster":["delcotimes.com","readingeagle.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-955-0355","email":"epapersupport@21st-centurymedia.com","address1":"307 Derstine Ave.","address2":"Lansdale, PA 19446","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-reporter-for-iphone/id525105540?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.reporter"}]},"timesherald.com":{"code":"NORR","logo":"TH_Logo.png","title":"Norristown Times Herald","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","pottsmerc.com","trentonian.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-933-4233","email":"epapersupport@21st-centurymedia.com","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-times-herald-for-iphone/id525130019?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.timesherald"}]},"pottsmerc.com":{"code":"PMERC","logo":"PM_Logo.png","title":"The Pottstown Mercury","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","trentonian.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-933-5133","email":"epapersupport@21st-centurymedia.com","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-mercury-for-iphone/id525118208?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.mercury"}]},"trentonian.com":{"code":"TREN","logo":"TRT_Logo.png","title":"The Trentonian","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","dailylocal.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-489-8189","email":"epapersupport@21st-centurymedia.com","address1":"127 Rte 206 South, Suite 27","address2":"Trenton, NJ 08610","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-trentonian-for-iphone/id503293221?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.trentonian"}]},"dailylocal.com":{"code":"WCDL","logo":"DL_Logo.png","title":"West Chester Daily Local","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-744-2144","email":"epapersupport@21st-centurymedia.com","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/daily-local-for-iphone/id525116294?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailylocalnews"}]},"marinij.com":{"code":"MIJ","logo":"MJ_Logo.png","title":"Marin Independent Journal","tribune":false,"cluster":["eastbaytimes.com","mercurynews.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"415-937-7222","email":"subscriberservices@bayareanewsgroup.net","address1":"103 Shoreline Parkway, Suite 201","address2":"San Rafael, CA 94901","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30a.m. – 5:00 p.m. \\\\n Saturday: 7:00a.m. – 10:30a.m. \\\\n Sunday: 8:00a.m. – 10:30a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/marin-independent-journal-news/id499674553?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.marinindependentjournal"}]},"eastbaytimes.com":{"code":"EBT","logo":"EBT_Logo.png","title":"East Bay Times","tribune":false,"cluster":["marinij.com","mercurynews.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"925-276-9254","email":"subscriberservices@bayareanewsgroup.net","address1":"208 Lindbergh Avenue","address2":"Livermore, CA 94551-9512","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30 a.m. – 5:00 p.m. \\\\n Saturday: 7:00 a.m. – 10:30 a.m. \\\\n Sunday: 8:00 a.m. – 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/east-bay-times-for-mobile/id479676946?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.contracostatimes"}]},"mercurynews.com":{"code":"MERC","logo":"SJMN_Logo.png","title":"The Mercury News","tribune":false,"cluster":["marinij.com","eastbaytimes.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"408-508-5554","email":"subscriberservices@bayareanewsgroup.net","address1":"75 E. Santa Clara Street, Suite 1100","address2":"San Jose, CA 95113","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30 a.m. – 5:00 p.m. \\\\n Saturday: 7:00 a.m. – 10:30 a.m. \\\\n Sunday: 8:00 a.m. – 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-mercury-news-for-mobile/id4799551.9959?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.sanjosemercurynews"}]},"bostonherald.com":{"code":"BH","logo":"BH_Logo.png","title":"Boston Herald","tribune":false,"cluster":["lowellsun.com","sentinelandenterprise.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"617-619-6265","email":"circulation@bostonherald.com","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday – Friday 7:30 a.m. – 6:00 p.m. \\\\n Saturday 6:30 a.m. – 11:00 a.m. \\\\n Sunday 6:30 a.m. – 12:00 12 p.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/boston-herald/id1471216824?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.doapps.android.mln.MLN_42b39fdb198522d2bfc6b1f64cd98365"}]},"lowellsun.com":{"code":"LS","logo":"LS_Logo.png","title":"Lowell Sun","tribune":false,"cluster":["bostonherald.com","sentinelandenterprise.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"978-459-1300","email":"circulation@lowellsun.com","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday – Friday 7:30 a.m. – 6 p.m. \\\\n Saturday 6:30 a.m. – 11 a.m. \\\\n Sunday 6:30 a.m. – 12 p.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/lowell-sun-news-for-mobile/id502959997?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.lowellsunnews"}]},"sentinelandenterprise.com":{"code":"SE","logo":"SE_Logo.png","title":"Sentinel & Enterprise","tribune":false,"cluster":["bostonherald.com","lowellsun.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"978-343-6911","email":"circulation@sentinelandenterprise.com","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday – Friday: 7:30 a.m. to 6 p.m. \\\\n Saturday – Sunday: 6:30 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/sentinel-and-enterprise/id507306870?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sentinelenterprise"}]},"denverpost.com":{"code":"DP","logo":"DP_Logo.png","title":"The Denver Post","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com","mercurynews.com","ocregister.com","bostonherald.com","twincities.com","readingeagle.com"],"clusterName":"Denver","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-832-3232","email":"memberservices@denverpost.com","address1":"5990 Washington St.","address2":"Denver, CO 80216","timeZone":"Mountain","supportHours":" Monday - Friday: 6:30 a.m. - 5 p.m. \\\\n Saturday & holidays: 7 a.m. - 10 a.m. \\\\n Sunday: 8:30 a.m. - 11 a.m. "},"apps":[{"app_store":"https://apps.apple.com/us/app/denver-post/id375264133?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.ap.denverpost"}]},"dailycamera.com":{"code":"BDC","logo":"BDC_Logo.png","title":"Boulder Daily Camera","tribune":false,"cluster":["greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-444-3444","email":"circulation@dailycamera.com","address1":"PO Box 19199","address2":"Boulder CO, 80308","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/boulder-daily-camera/id405275092?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.dailycamera"}]},"greeleytribune.com":{"code":"GRE","logo":"GRE_Logo.png","title":"Greeley Tribune","tribune":false,"cluster":["dailycamera.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-352-8089","email":"circulation@greeleytribune.com","address1":"PO Box 337228","address2":"Greeley, CO 80633-7228","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"","play_store":""}]},"reporterherald.com":{"code":"LRH","logo":"LRH_Logo.png","title":"Loveland Reporter-Herald","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-635-3660","email":"rhcirculation@prairiemountainmedia.com","address1":"P.O. Box 59","address2":"Loveland, CO 80539","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/loveland-reporter-herald-for/id514599798?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.lovelandreporterherald"}]},"timescall.com":{"code":"LTC","logo":"LTC_Logo.png","title":"Longmont Times Call","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-684-5358","email":"tccirculation@dailycamera.com","address1":"P.O. Box 299","address2":"Longmont, CO 80502","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/longmont-times-call-for-mobile/id514597776?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.longmonttimescall"}]},"canoncitydailyrecord.com":{"code":"CDR","logo":"CDR_Logo.png","title":"Cañon City Daily Record","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"719-275-7565","email":"","address1":"The Hive, 729 Main St.","address2":"Cañon City, CO. 81212","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/canon-city-daily-record/id514585870?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.canoncitydailyrecord"}]},"eptrail.com":{"code":"EP","logo":"EP_Logo.png","title":"Estes Park Trail-Gazette","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-586-3356","email":"circulation@eptrail.com","address1":"P.O. Box 1707","address2":"Estes Park, CO 80517","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"","play_store":""}]},"fortmorgantimes.com":{"code":"FMT","logo":"FMT_Logo.png","title":"Fort Morgan Times","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-867-5651","email":"","address1":"P.O. Box 495","address2":"Sterling, CO 80751","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/co/app/fort-morgan-times-for-mobile/id509595449?l=en&mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.fortmorgantimes"}]},"journal-advocate.com":{"code":"SJA","logo":"SJC_Logo.png","title":"Sterling Journal Advocate","tribune":false,"cluster":[],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-522-1990","email":"","address1":"P.O. Box 495","address2":"Sterling, CO 80751","timeZone":"Mountain","supportHours":" Mon. – Fri. 6:30 a.m. – 3 p.m. \\\\n Sat. 7 a.m. – 10 a.m. \\\\n Sun. 8:30 a.m. – 11a.m. \\\\n Holidays 7 a.m. – 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/journal-advocate/id509598546?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.journaladvocate"}]},"chicoer.com":{"code":"ER","logo":"EP_Logo.png","title":"Estes Park Trail-Gazette","tribune":false,"cluster":["orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"delivery@chicoer.com","address1":"400 E. Park Ave.","address2":"Chico, CA 95928","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/chico-enterprise-record/id499663248?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.chicoenterpriserecord"}]},"orovillemr.com":{"code":"MR","logo":"ORO_Logo.png","title":"Oroville Mercury Register","tribune":false,"cluster":["chicoer.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"udjcirc@ukiahdj.com","address1":"400 E. Park Ave.","address2":"Chico, CA 95928","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 5:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"redbluffdailynews.com":{"code":"RB","logo":"RBDN_Logo.png","title":"Red Bluff Daily News","tribune":false,"cluster":["chicoer.com","orovillemr.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-737-5047","email":"circ@redbluffdailynews.com","address1":"PO Box 885","address2":"Red Bluff, CA 96080","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"record-bee.com":{"code":"BEE","logo":"RB_Logo.png","title":"Lake County Record-Bee","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-263-5636","email":"gdeboth@record-bee.com","address1":"","address2":"","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"montereyherald.com":{"code":"HERALD","logo":"MH_Logo.png","title":"Monterey Herald","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"831-646-1808","email":"circservices@montereyherald.com","address1":"2555 Garden Road Suite D","address2":"Monterey, CA 93940","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/monterey-county-herald/id507305181?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.montereyherald"}]},"santacruzsentinel.com":{"code":"SCS","logo":"SCS_Logo.png","title":"Santa Cruz Sentinel","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"831-706-3201","email":"circulation@santacruzsentinel.com","address1":"318 Encinal St.","address2":"Santa Cruz, CA 95060","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 5:00 p.m. \\\\n Saturday: Closed \\\\n Sunday & holidays: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/santa-cruz-sentinel-for-mobile/id499677382?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.santacruzsentinel"}]},"times-standard.com":{"code":"TS","logo":"TSTD_Logo.png","title":"Eureka Times-Standard","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-441-0550","email":"circulation@times-standard.com","address1":"39 Fifth St.","address2":"Eureka, CA 95501","timeZone":"Pacific","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/eureka-times-standard/id499669816?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.eurekatimesstandard"}]},"ukiahdailyjournal.com":{"code":"UK","logo":"UK_Logo.png","title":"Ukiah Daily Journal","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-468-3500","email":"udjcirc@ukiahdj.com","address1":"415 Talmage Road Ste A","address2":"Ukiah, CA 95482","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ukiah-daily-journal/id503016816?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.ukiahdailyjournal"}]},"thereporter.com":{"code":"VR","logo":"TR_Logo.png","title":"Vacaville Reporter","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-448-8566","email":"subscribe@thereporter.com","address1":"57 Commerce Place, Ste. A","address2":"Vacaville, CA 95687","timeZone":"Pacific","supportHours":" Monday 8:00 a.m. to 4:00 p.m. \\\\n Tuesday through Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/vacaville-reporter/id499680399?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.vacavillereporter"}]},"timesheraldonline.com":{"code":"VT","logo":"THO_Logo.png","title":"Vallejo Times-Herald","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-644-5478","email":"services@timesheraldonline.com","address1":"425A Virginia St.","address2":"Vallejo, CA 94590","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/vallejo-times-herald-news/id508566566?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.vallejotimesherald"}]},"dailydemocrat.com":{"code":"WD","logo":"DD_Logo.png","title":"Woodland Daily Democrat","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-406-6205","email":"udjcirc@ukiahdj.com","address1":"725 Main Street, Suite 222","address2":"Woodland, CA 95695","timeZone":"Pacific","supportHours":" Monday 8:00 a.m. to 4:00 p.m. \\\\n Tuesday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/daily-democrat-for-mobile/id507295340?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailydemocrat"}]},"paradisepost.com":{"code":"PP","logo":"PP_Logo.png","title":"Paradise Post","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"","address1":"P.O. Box 9","address2":"Chico, CA 95927","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"dailybulletin.com":{"code":"IVDB","logo":"DBU_Logo.png","title":"Inland Valley Daily Bulletin","tribune":false,"cluster":["dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-987-9900","email":"service@scng.com","address1":"3200 Guasti Rd. Suite 100","address2":"Ontario, CA 91761","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/inland-valley-daily-bulletin/id503648014?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstemedia.inlandvalleydailybulletin"}]},"sandiegouniontribune.com":{"code":"SDUT","logo":"SDUT_Logo.png","title":"San Diego Union Tribune","tribune":false,"cluster":["dailybulletin.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","dailynews.com"],"clusterName":"SCNG","benefits":["e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(619) 299-4141","email":"scustomer.service@sduniontribune.com","address1":"600 B St","address2":"San Diego, CA 92101","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-san-diego-union-tribune/id1145952888","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.sdut&hl=en_US&pli=1"}]},"dailynews.com":{"code":"LADN","logo":"DN_Logo.png","title":"SDUT","tribune":false,"cluster":["dailybulletin.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"818-713-3000","email":"service@scng.com","address1":"181 E. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/los-angeles-daily-news/id502957174?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.ladailynews"}]},"presstelegram.com":{"code":"LBPT","logo":"PT_Logo.png","title":"Long Beach Press-Telegram","tribune":false,"cluster":["dailybulletin.com","dailynews.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"562-435-1161","email":"service@scng.com","address1":"5150 E. Pacific Coast Highway, Suite 200","address2":"Long Beach CA 90804","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/long-beach-press-telegram/id502958939?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.longbeachpresstelegram"}]},"ocregister.com":{"code":"OCR","logo":"OCR_Logo.png","title":"Orange County Register","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"714-796-7000","email":"service@scng.com","address1":"1920 Main Street, Suite 225","address2":"Irvine, CA 92614","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ocregister/id380372599?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.freedom.ocregister"}]},"pressenterprise.com":{"code":"PE","logo":"PE_Logo.png","title":"Press Enterprise","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"951-368-9000","email":"service@scng.com","address1":"3512 14th Street","address2":"Riverside, CA 92501","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-press-enterprise/id1218912043?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.doapps.android.mln.MLN_7c590f01490190db0ed02a5070e20f01"}]},"pasadenastarnews.com":{"code":"PSN","logo":"PSN_Logo.png","title":"Pasadena Star-News","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-578-6300","email":"service@scng.com","address1":"177 E. Colorado Blvd.","address2":"Pasadena, CA 91105","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ocregister/id380372599?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.pasadenastarnews"}]},"redlandsdailyfacts.com":{"code":"RDF","logo":"RDF_Logo.png","title":"Redlands Daily Facts","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-353-1641","email":"service@scng.com","address1":"1255 W. Colton Ave.","address2":"Redlands, CA 92374","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/redlands-daily-facts/id502960941?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.redlandsdailyfacts"}]},"sbsun.com":{"code":"SBS","logo":"SBS_Logo.png","title":"San Bernardino Sun","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-889-9666","email":"service@scng.com","address1":"473 E. Carnegie Drive, Suite 250","address2":"San Bernardino, CA 92408","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/silicon-valley-for-mobile/id502964313?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sanbernardinosun"}]},"sgvtribune.com":{"code":"SGVT","logo":"SGV_Logo.png","title":"San Gabriel Valley Tribune","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-598-8826","email":"service@scng.com","address1":"181 W. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/san-gabriel-valley-tribune/id50302551.998?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sangabrielvalleytribune"}]},"dailybreeze.com":{"code":"TODB","logo":"DBR_Logo.png","title":"Torrance Daily Breeze","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"310-540-5511","email":"service@scng.com","address1":"2615 Pacific Coast Highway #329","address2":"Hermosa Beach CA 90254","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/daily-breeze/id503015160?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.torrancedailybreeze"}]},"whittierdailynews.com":{"code":"WDN","logo":"WDN_Logo.png","title":"Whittier Daily News","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-962-8811","email":"service@scng.com","address1":"181 W. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/whittier-daily-news/id503668140?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.whittierdailynews"}]},"twincities.com":{"code":"PPST","logo":"TC_Logo.png","title":"St. Paul Pioneer Press","tribune":false,"cluster":[],"clusterName":"St. Paul","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts","Events"],"customerService":{"phone":"651-717-7377","email":"customerservice@pioneerpress.com","address1":"1 West Water St., Suite 200","address2":"St. Paul, MN 55107","timeZone":"Central","supportHours":" Monday through Friday: 6:30 a.m. to 5 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8:30 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/st-paul-pioneer-press/id603264610?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.stpaulpioneerpress"}]},"baltimoresun.com":{"code":"200","logo":"BS_Logo.png","title":"The Baltimore Sun","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"443-692-9011","email":"customersatisfactions@baltsun.com","address1":"PO Box 1377","address2":"Baltimore, MD 21278","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id496681035?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.bs&hl=en_US&gl=US"}]},"capitalgazette.com":{"code":"247","logo":"CG_Logo.png","title":"Capital Gazette","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"410-268-4800","email":"circulations@capgaznews.com","address1":"PO Box 1377","address2":"Baltimore, MD 21278","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"chicagotribune.com":{"code":"3CHITRIB","logo":"CTR_Logo.png","title":"Chicago Tribune","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"312-546-7900","email":"consumerservices@chicagotribune.com","address1":"1000 Albion Avenue","address2":"Schaumburg, IL 60193-4549","timeZone":"Central","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id383137151?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.ct"}]},"courant.com":{"code":"6HrtCrnt","logo":"HC_Logo.png","title":"Hartford Courant","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"860-525-5555","email":"custserv@courant.com","address1":"PO Box 569","address2":"Hartford, CT 06141","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id391113483?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.hc&hl=en_US&gl=US"}]},"dailypress.com":{"code":"7DPress","logo":"","title":"Daily Press","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"757 247-4800","email":"customerservice@dailypress.com","address1":"P.O. Box 2820","address2":"Norfolk, VA 23501","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id397500600?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.hrdp"}]},"growthspotter.com":{"code":"5GrowSpt","logo":"","title":"","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"","email":"","address1":"P.O. Box 2833","address2":"Orlando, FL 32803","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"mcall.com":{"code":"800","logo":"MC_Logo.png","title":"The Morning Call","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"610-820-6601","email":"circweb@mcall.com","address1":"P.O. Box 1260","address2":"Allentown, PA 18105-1260","timeZone":"Eastern","supportHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id501096172?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.amc"}]},"nydailynews.com":{"code":"850","logo":"NYDN_Logo.png","title":"New York Daily News","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"201-521-2851","email":"customerservice@nydailynews.com","address1":"PO Box 7180","address2":"New York, NY 10008","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id354730788?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.freerange360.mpp.NYDN"}]},"orlandosentinel.com":{"code":"5OrlSent","logo":"OOS_Logo.png","title":"Orlando Sentinel","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"407-420-5353","email":"customerservice@orlandosentinel.com","address1":"PO Box 2833","address2":"Orlando, FL 32802","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id402223551?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.os"}]},"pilotonline.com":{"code":"7VAPilot","logo":"","title":"","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"757-446-9000","email":"customerservice@pilotonline.com","address1":"PO Box 2833","address2":"Orlando, FL 32802","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"sun-sentinel.com":{"code":"4SunSent","logo":"SS_Logo.png","title":"Sun Sentinel","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"954-375-2018","email":"customerservice@sunsentinel.com","address1":"333 SW 12th Ave.","address2":"Deerfield Beach, FL 33442","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id402230662?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.sfss"}]},"republicanherald.com":{"code":"PR","logo":"PR_Logo.png","title":"Republican Herald","tribune":false,"cluster":["standardspeaker.com","citizensvoice.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"570-622-3456 | 1-800-622-1737","email":"customerservice@srepublicanherald.com","address1":"23 S. Centre St., 2nd Floor","address2":"Pottsville, PA 17901","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/pottsville-republican-herald/id821007739","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.republicanherald&hl=en_US&pli=1"}]},"standardspeaker.com":{"code":"SS","logo":"SSK_Logo.png","title":"Standard-Speaker","tribune":false,"cluster":["republicanherald.com","citizensvoice.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"570-455-3636 | 800-843-6680","email":"customerservice@standardspeaker.com","address1":"21 N. Wyoming St.","address2":"Hazleton, PA 18201","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/the-hazleton-standard-speaker/id821012052","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.standardspeaker&hl=en_US"}]},"citizensvoice.com":{"code":"CV","logo":"CV_Logo.png","title":"Citizens\' Voice","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":" (570) 821-2010","email":"customerservice@citizensvoice.com","address1":"75 N. Washington St.","address2":"Wilkes-Barre, PA 18701","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/citizens-voice/id859248069","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.citizensvoice&hl=en_US"}]},"thetimes-tribune.com":{"code":"ST","logo":"ST_Logo.png","title":"Scranton Times-Tribune","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","citizensvoice.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-800-228-4637","email":"customerservice@thetimes-tribune.com","address1":"305 Linden St.","address2":"Scranton, PA 18503","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/citizens-voice/id859248069","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.citizensvoice&hl=en_US"}]},"wcexaminer.com":{"code":"WCE","logo":"WCE_Logo.png","title":"Wyoming County Examiner","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","thetimes-tribune.com","citizensvoice.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(570) 836-2123","email":"customerservice@wcexaminer.com","address1":"16 East Tioga St.","address2":"Tunkhannock, PA 18657","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[]},"pressdemocrat.com":{"code":"PD","logo":"PD_Logo.png","title":"The Press Democrat","tribune":false,"cluster":["sonomanews.com","petalumanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"help@pressdemocrat.com","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-press-democrat-eedition/id591168598","play_store":"https://play.google.com/store/apps/details?id=com.santarosapressdemocrat.android.prod"}]},"sonomanews.com":{"code":"SIT","logo":"SIT_Logo.png","title":"Sonoma Index-Tribune","tribune":false,"cluster":["pressdemocrat.com","petalumanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"help@sonomanews.com","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-sonoma-index-tribune/id959583528","play_store":"https://play.google.com/store/apps/details?id=com.sonomaindextribune.android.prod"}]},"petalumanews.com":{"code":"AC","logo":"AC_Logo.png","title":"Petaluma Argus Courier","tribune":false,"cluster":["pressdemocrat.com","sonomanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"help@arguscourier.com","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/petaluma-argus-courier/id787425680","play_store":"https://play.google.com/store/apps/details?id=com.petalumaarguscourier.android.prod"}]}}')}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,o,n=r(467),a=r(4756),i=r(3153),s=r(3612),c=r(9532),l=r(2450),d={},u=window.location.hostname,p=l[u=u.replace("www.","").replace("preprod.","").replace("develop.","").replace("staging.","").replace("local","com").replace("vipdev.lndo.site","com")],m="https://ui-static-assets-prod.s3.us-west-1.amazonaws.com/img/",h=s.A.enableReaderDashboardv2?"/dashboard/support":"/user-tools/dashboard/#billing-payment-container",f='An error has occurred. Please try again.
\n\t
\n\tIf the issue persists,\n\tplease contact customer service.'),g=function(){var e=(0,n.A)(a.mark(function e(){var t,r,o,n,s;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i.A.log("Article Saving | init"),e.next=1,(0,c.gQ)();case 1:if("page"!==(r=e.sent)){e.next=2;break}return i.A.log("Article Saving | page type is not home, section, article, exit"),e.abrupt("return");case 2:return e.next=3,(0,c.aG)();case 3:if((o=e.sent).token&&o.adfree){e.next=4;break}return i.A.log("Article Saving | not a premium subscriber, exit"),e.abrupt("return");case 4:return e.next=5,E(o);case 5:if(null!==(d=JSON.parse(sessionStorage.getItem("articleIds")))&&null!==(t=d)&&void 0!==t&&t.timestamp){e.next=7;break}return d={},e.next=6,y();case 6:e.next=8;break;case 7:w(d.timestamp);case 8:if(i.A.log("Article Saving | page type is ",r),"article"===r){e.next=9;break}return i.A.log("Article Saving | page type is not article, exit"),e.abrupt("return");case 9:return i.A.log("Article Saving | page type is ",r),n=_,e.next=10,v();case 10:n(e.sent),e.next=12;break;case 11:throw e.prev=11,s=e.catch(0),i.A.error("Error during Article Saving initialization:",s),new Error("Article Saving initialization failed");case 12:case"end":return e.stop()}},e,null,[[0,11]])}));return function(){return e.apply(this,arguments)}}(),y=function(){var t=(0,n.A)(a.mark(function t(){var r,o,n,l,d;return a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i.A.log("Article Saving | session data expired or missing - fetch articles ",e),e){t.next=1;break}return i.A.log("Article Saving | unable to get decodedUser - exit fetch"),t.abrupt("return");case 1:return t.next=2,(0,c.L4)("Publisher Domain");case 2:return r=t.sent,o=encodeURIComponent(e.uuid),n="".concat(s.A.entitlementsEndpoint,"savedArticles/?authId=").concat(o,"&domain=").concat(r),t.next=3,fetch(n,{method:"GET",headers:{"X-Api-Key":s.A.entitlementsApiKey}});case 3:if(200!==(l=t.sent).status){t.next=5;break}return t.next=4,l.json();case 4:d=t.sent,A(d.articles),t.next=6;break;case 5:i.A.log("Article Saving | error in fetch");case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),A=function(e){var t=new Date;d.timestamp=t.getTime(),d.articles=e,i.A.log("Article Saving | set session data ",d),sessionStorage.setItem("articleIds",JSON.stringify(d))},v=function(){var e=(0,n.A)(a.mark(function e(){var r,n,s,l,u,p,m;return a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.A.log("Article Saving | create button"),r=document.querySelector(".articleSave"),n=!0,null===r&&(n=!1,r=document.createElement("span")),s=document.querySelector("#articleSaveContainer"),l=document.querySelector("#stickyArticleSaveContainer"),s?s.replaceChildren():(s=document.createElement("div")).setAttribute("id","articleSaveContainer"),l?l.replaceChildren():(l=document.createElement("div")).setAttribute("id","stickyArticleSaveContainer"),e.next=1,(0,c.L4)("Content ID");case 1:return t=e.sent,o=d.articles.find(function(e){return e.contentId===t}),i.A.log("Article Saving | check if article already saved ",d,o),o?(r.className="icon-bookmark2 removeSavedArticleButton articleSave",r.setAttribute("aria-pressed","true"),r.setAttribute("data-mng-click","remove-article-saved"),r.setAttribute("data-mng-category","saved-articles"),r.setAttribute("data-mng-action","remove-article-saved"),r.setAttribute("aria-label","This article is saved. Click again to remove from your saved list"),r.setAttribute("title","This article is saved. Click again to remove from your saved list."),u="deleteArticle"):(r.className="icon-bookmark3 saveArticleButton articleSave",r.setAttribute("aria-pressed","false"),r.setAttribute("data-mng-click","save-article"),r.setAttribute("data-mng-category","saved-articles"),r.setAttribute("data-mng-action","save-article"),r.setAttribute("aria-label","Save this article to read later."),r.setAttribute("title","Save this article to read later."),u="saveArticle"),r.setAttribute("tabindex","0"),n||(p=document.querySelector(".article-bottom-share .sd-sharing-enabled"),m=document.querySelector(".article-share .sd-sharing-enabled"),s.append(r.cloneNode(!0)),l.append(r),p&&p.insertBefore(s,p.firstChild),m&&m.insertBefore(l,m.firstChild)),e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),S=function(){var r=(0,n.A)(a.mark(function r(){var o,n,l,u,h,g,y,b,E,w,N,C;return a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i.A.log("Article Saving | begin article save"),o=Array.from(document.querySelectorAll(".saveArticleButton")),e){r.next=1;break}return i.A.log("Article Saving | unable to get decodedUser - exit save"),(0,c.mP)({title:"Please try logging in again.",text:"",id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"OK!"}),r.abrupt("return",!1);case 1:if(!d){r.next=2;break}if(10!==d.articles.length){r.next=2;break}return i.A.log("Article Saving | reached max articles"),n=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#subscriber-benefits-container/?openOnLoad=ArticleSection",(0,c.mP)({title:"Out of Space",text:'You are out of space in your Saved Articles List.
\n\t\t\t\t
\n\t\t\t\tPlease remove articles from your list on the Reader Dashboard.'),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0}),r.abrupt("return",!1);case 2:return o.forEach(function(e){e.removeEventListener("click",S)}),R(".icon-bookmark3.saveArticleButton"),l="".concat(s.A.entitlementsEndpoint,"savedArticles"),r.next=3,(0,c.L4)("Publisher Domain");case 3:return u=r.sent,h={userId:e.uuid,publication:u,contentId:t},i.A.log("Article saving | attempting save the request is",h,l),r.prev=4,r.next=5,fetch(l,{method:"POST",headers:{"X-Api-Key":s.A.entitlementsApiKey},body:JSON.stringify(h)});case 5:return g=r.sent,r.next=6,g.json();case 6:if(y=r.sent,200!==g.status){r.next=8;break}return d&&A(y.upDatedArticleList),r.next=7,v();case 7:return b=r.sent,Array.from(document.querySelectorAll(".articleSave")).forEach(function(e){T(e,"article-save-click-success")}),_(b),i.A.log("Updated Saved Article list",y.upDatedArticleList.length),10===y.upDatedArticleList.length?(E=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#billing-payment-container?openOnLoad=ArticleSection",(0,c.mP)({title:"This article has been saved.",text:'This article has been saved.
\n\t\t\t\t\t
\n\t\t\t\t\tYou are now out of space in your\n\t\t\t\t\tSaved Articles list.\n\t\t\t\t\tYou will need to remove items from the list before you can add more.
\n\t\t\t\t\t
\n\t\t\t\t\tYou can save even more articles on our mobile app.\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t').concat(p.apps[0].play_store?"\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t"):"","\n\t\t\t\t\t\t\t").concat(p.apps[0].app_store?"\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t"):"","\n\t\t\t\t\t\t
\n\t\t\t\t\t
"),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0})):(0,c.mP)({title:"",text:"This article has been saved.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,autoDismiss:!0,buttonText:"OK!"}),i.A.log("Article saving | Success! The response is",y),r.abrupt("return",y);case 8:if(422!==g.status){r.next=10;break}return i.A.log("Article Saving |reached max articles"),w=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#billing-payment-container/?openOnLoad=ArticleSection",(0,c.mP)({title:"Out of Space",text:'You are out of space in your Saved Articles List.
\n\t\t\t\t\t
\n\t\t\t\t\tPlease remove articles from your list on the Reader Dashboard.
\n\t\t\t\t\t
\n\t\t\t\t\tYou can save even more articles on our mobile app.\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t"),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0}),o.forEach(function(e){e.addEventListener("click",S)}),r.next=9,v();case 9:return N=r.sent,Array.from(document.querySelectorAll(".articleSave")).forEach(function(e){T(e,"article-save-422")}),_(N),r.abrupt("return",y);case 10:if(g.ok){r.next=11;break}return(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),Array.from(document.querySelectorAll(".articleSave")).forEach(function(e){e.setAttribute("data-mng-click","article-save-fail")}),o.forEach(function(e){e.addEventListener("click",S)}),i.A.log("Article saving | the response is",g.statusText),r.abrupt("return",y);case 11:return r.abrupt("return",!1);case 12:return r.prev=12,C=r.catch(4),(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),i.A.log("Article saving | save endpoint Failure: ",C),r.abrupt("return",new Error("Article saving | save article endpoint failure"));case 13:case"end":return r.stop()}},r,null,[[4,12]])}));return function(){return r.apply(this,arguments)}}(),b=function(){var t=(0,n.A)(a.mark(function t(){var r,n,l,u,p,m,h,g;return a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i.A.log("Article Saving | begin article delete"),document.querySelectorAll(".removeSavedArticleButton").forEach(function(e){e.removeEventListener("click",b)}),e){t.next=1;break}return i.A.log("Article Saving | unable to get decodedUser - exit save"),(0,c.mP)({title:"",text:"Please log in again.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),t.abrupt("return",!1);case 1:return r="".concat(s.A.entitlementsEndpoint,"savedArticles"),R(".icon-bookmark2.removeSavedArticleButton"),t.next=2,(0,c.L4)("Publisher Domain");case 2:return n=t.sent,l={userId:e.uuid,savedDate:o.savedDate,publication:n},i.A.log("Article saving | attempting delete the request is",l,r),t.prev=3,t.next=4,fetch(r,{method:"DELETE",headers:{"X-Api-Key":s.A.entitlementsApiKey},body:JSON.stringify(l)});case 4:return u=t.sent,t.next=5,u.json();case 5:if(p=t.sent,200!==u.status){t.next=7;break}return i.A.log("Article saving | delete success",p),d&&A(p.upDatedArticleList),m=_,t.next=6,v();case 6:return m(t.sent),(0,c.mP)({title:"",text:"This article has been removed from your Saved Articles list.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"OK!",autoDismiss:!0}),t.abrupt("return",p);case 7:if(u.ok){t.next=9;break}return(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),i.A.log("Article saving | delete ERROR the response is",u.statusText),h=_,t.next=8,v();case 8:return h(t.sent),t.abrupt("return",p);case 9:return t.abrupt("return",!1);case 10:return t.prev=10,g=t.catch(3),(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),i.A.log("Article saving | deleteArticle endpoint Failure: ",g),t.abrupt("return",new Error("Article saving | delete article endpoint failure"));case 11:case"end":return t.stop()}},t,null,[[3,10]])}));return function(){return t.apply(this,arguments)}}(),E=function(){var t=(0,n.A)(a.mark(function t(r){return a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,c.oL)(r.token);case 1:e=t.sent;case 2:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),w=function(e){i.A.log("Article Saving | checking time stamp, ",e);var t=(new Date-new Date(e))/6e4;i.A.log("Article Saving | time difference is ",t),t>3&&(i.A.log("Article Saving | session outdated, fetching"),y())},R=function(e){Array.from(document.querySelectorAll(e)).forEach(function(e){var t=document.createElement("div");t.classList.add("spring-spinner"),t.id="articleSaveSpinner",t.innerHTML='\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t
',e.parentNode.replaceChild(t,e)})},T=function(e,t){e.setAttribute("data-mng-click",t),e.click(),e.removeAttribute("data-mng-click")},_=function(e){Array.from(document.querySelectorAll(".articleSave")).forEach(function(t){"saveArticle"===e?t.addEventListener("click",S):"deleteArticle"===e&&t.addEventListener("click",b)})};document.addEventListener("DOMContentLoaded",g)})()})(); //# sourceMappingURL=mng-digisubs.articleSave.bundle.js.map;