@livechat/accounts-sdk
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).AccountsSDK=t()}(this,(function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={extend:function(e){return e.oauth_exception&&this.oauth_exception[e.oauth_exception]?Object.assign(e,{description:this.oauth_exception[e.oauth_exception]}):e.identity_exception&&this.identity_exception[e.identity_exception]?Object.assign(e,{description:this.identity_exception[e.identity_exception]}):e},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}},c=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,e),this.options=r,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}return n(e,[{key:"start",value:function(e,t){var r=this;this._listenerInited||(this.listening=!0,this.callback=t,e&&(this.tid=setTimeout((function(){r.stop(),t("timeout",null)}),e)),window.addEventListener("message",this.receiveMessage))}},{key:"stop",value:function(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}},{key:"receiveMessage",value:function(e){e.origin!==this.options.server_url&&e.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(e.data.data||e.data.error)&&(this.stop(),e.data.error?this.callback(s.extend(e.data.error),null):(e.data.data.scopes&&(e.data.data.scope=e.data.data.scopes,delete e.data.data.scopes),e.data.data.expires_in&&(e.data.data.expires_in=parseInt(e.data.data.expires_in)||0),this.callback(null,e.data.data)))}}]),e}(),u=function(){function e(r,n){t(this,e),this.options=n,this.sdk=r}return n(e,[{key:"authorize",value:function(){var e=this;return new Promise((function(t,r){var n=e.sdk.authorizeURL(e.options,"button"),i=window.screen.width/2-250,o=window.screen.height/2-325;new c(e.options).start(null,(function(e,n){if(e)return r(e);t(n)}));var a=function(){window.open(n,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(i,",top=").concat(o))};document.requestStorageAccess?document.requestStorageAccess().then(a,a):a()}))}}]),e}(),l=Object.prototype.hasOwnProperty,f=Array.isArray,p=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),h=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},d={arrayToObject:h,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"===e(l)&&null!==l&&-1===n.indexOf(l)&&(r.push({obj:a,prop:u}),n.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(f(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}}(r),t},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(t,r,n){if(0===t.length)return t;var i=t;if("symbol"===e(t)?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<i.length;++a){var s=i.charCodeAt(a);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?o+=i.charAt(a):s<128?o+=p[s]:s<2048?o+=p[192|s>>6]+p[128|63&s]:s<55296||s>=57344?o+=p[224|s>>12]+p[128|s>>6&63]+p[128|63&s]:(a+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(a)),o+=p[240|s>>18]+p[128|s>>12&63]+p[128|s>>6&63]+p[128|63&s])}return o},isBuffer:function(t){return!(!t||"object"!==e(t))&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(f(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function t(r,n,i){if(!n)return r;if("object"!==e(n)){if(f(r))r.push(n);else{if(!r||"object"!==e(r))return[r,n];(i&&(i.plainObjects||i.allowPrototypes)||!l.call(Object.prototype,n))&&(r[n]=!0)}return r}if(!r||"object"!==e(r))return[r].concat(n);var o=r;return f(r)&&!f(n)&&(o=h(r,i)),f(r)&&f(n)?(n.forEach((function(n,o){if(l.call(r,o)){var a=r[o];a&&"object"===e(a)&&n&&"object"===e(n)?r[o]=t(a,n,i):r.push(n)}else r[o]=n})),r):Object.keys(n).reduce((function(e,r){var o=n[r];return l.call(e,r)?e[r]=t(e[r],o,i):e[r]=o,e}),o)}},y=String.prototype.replace,g=/%20/g,m={RFC1738:"RFC1738",RFC3986:"RFC3986"},v=d.assign({default:m.RFC3986,formatters:{RFC1738:function(e){return y.call(e,g,"+")},RFC3986:function(e){return String(e)}}},m),b=Object.prototype.hasOwnProperty,w={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},_=Array.isArray,k=Array.prototype.push,O=function(e,t){k.apply(e,_(t)?t:[t])},j=Date.prototype.toISOString,x=v.default,S={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:d.encode,encodeValuesOnly:!1,format:x,formatter:v.formatters[x],indices:!1,serializeDate:function(e){return j.call(e)},skipNulls:!1,strictNullHandling:!1},A=function t(r,n,i,o,a,s,c,u,l,f,p,h,y){var g,m=r;if("function"==typeof c?m=c(n,m):m instanceof Date?m=f(m):"comma"===i&&_(m)&&(m=d.maybeMap(m,(function(e){return e instanceof Date?f(e):e})).join(",")),null===m){if(o)return s&&!h?s(n,S.encoder,y,"key"):n;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"===e(g)||"bigint"==typeof g||d.isBuffer(m))return s?[p(h?n:s(n,S.encoder,y,"key"))+"="+p(s(m,S.encoder,y,"value"))]:[p(n)+"="+p(String(m))];var v,b=[];if(void 0===m)return b;if(_(c))v=c;else{var w=Object.keys(m);v=u?w.sort(u):w}for(var k=0;k<v.length;++k){var j=v[k],x=m[j];if(!a||null!==x){var A=_(m)?"function"==typeof i?i(n,j):n:n+(l?"."+j:"["+j+"]");O(b,t(x,A,i,o,a,s,c,u,l,f,p,h,y))}}return b},I=Object.prototype.hasOwnProperty,P=Array.isArray,C={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:d.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},D=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},N=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},R=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),s=a?i.slice(0,a.index):i,c=[];if(s){if(!r.plainObjects&&I.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(a=o.exec(i))&&u<r.depth;){if(u+=1,!r.plainObjects&&I.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var i=n?t:N(t,r),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=i:a[c]=i:a={0:i}}i=a}return i}(c,t,r,n)}},E=function(e,t){var r=function(e){if(!e)return C;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?C.charset:e.charset;return{allowDots:void 0===e.allowDots?C.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:C.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:C.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:C.comma,decoder:"function"==typeof e.decoder?e.decoder:C.decoder,delimiter:"string"==typeof e.delimiter||d.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:C.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:C.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:C.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=i.split(t.delimiter,o),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),s=r,r=a.length);for(r=0;r<a.length;++r)if(r!==s){var u,l,f=a[r],p=f.indexOf("]="),h=-1===p?f.indexOf("="):p+1;-1===h?(u=t.decoder(f,C.decoder,c,"key"),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,h),C.decoder,c,"key"),l=d.maybeMap(N(f.slice(h+1),t),(function(e){return t.decoder(e,C.decoder,c,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=D(l)),f.indexOf("[]=")>-1&&(l=P(l)?[l]:l),I.call(n,u)?n[u]=d.combine(n[u],l):n[u]=l}return n}(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var s=o[a],c=R(s,n[s],r,"string"==typeof e);i=d.merge(i,c,r)}return d.compact(i)},L=function(t,r){var n,i=t,o=function(e){if(!e)return S;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||S.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=v.default;if(void 0!==e.format){if(!b.call(v.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=v.formatters[r],i=S.filter;return("function"==typeof e.filter||_(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:S.addQueryPrefix,allowDots:void 0===e.allowDots?S.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:S.charsetSentinel,delimiter:void 0===e.delimiter?S.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:S.encode,encoder:"function"==typeof e.encoder?e.encoder:S.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:S.encodeValuesOnly,filter:i,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:S.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:S.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:S.strictNullHandling}}(r);"function"==typeof o.filter?i=(0,o.filter)("",i):_(o.filter)&&(n=o.filter);var a,s=[];if("object"!==e(i)||null===i)return"";a=r&&r.arrayFormat in w?r.arrayFormat:r&&"indices"in r?r.indices?"indices":"repeat":"indices";var c=w[a];n||(n=Object.keys(i)),o.sort&&n.sort(o.sort);for(var u=0;u<n.length;++u){var l=n[u];o.skipNulls&&null===i[l]||O(s,A(i[l],l,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.formatter,o.encodeValuesOnly,o.charset))}var f=s.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""}; | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("util")):"function"==typeof define&&define.amd?define(["util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).AccountsSDK=e(t.require$$0)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),n={extend:function(t){return t.oauth_exception&&this.oauth_exception[t.oauth_exception]?Object.assign(t,{description:this.oauth_exception[t.oauth_exception]}):t.identity_exception&&this.identity_exception[t.identity_exception]?Object.assign(t,{description:this.identity_exception[t.identity_exception]}):t},oauth_exception:{invalid_request:"You may be loading accounts-sdk on a domain that is not whitelisted.",unauthorized_client:"Client not found, not provided or incorectly configured.",access_denied:"Probably this application is installed on a different account and you do not have access to it.",unsupported_response_type:"Provided response type is incorrect or unavailable for a given client."},identity_exception:{unauthorized:"Resource owner identity is not known or consent is missing."}};class o{constructor(t={}){this.options=t,this.listening=!1,this.receiveMessage=this.receiveMessage.bind(this)}start(t,e){this._listenerInited||(this.listening=!0,this.callback=e,t&&(this.tid=setTimeout((()=>{this.stop(),e("timeout",null)}),t)),window.addEventListener("message",this.receiveMessage))}stop(){this.listening=!1,clearTimeout(this.tid),window.removeEventListener("message",this.receiveMessage,!1)}receiveMessage(t){t.origin!==this.options.server_url&&t.origin!==this.options.server_url.replace(/livechat\.com$/,"livechatinc.com")||(t.data.data||t.data.error)&&(this.stop(),t.data.error?this.callback(n.extend(t.data.error),null):(t.data.data.scopes&&(t.data.data.scope=t.data.data.scopes,delete t.data.data.scopes),t.data.data.expires_in&&(t.data.data.expires_in=parseInt(t.data.data.expires_in)||0),this.callback(null,t.data.data)))}}class i{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const r=this.sdk.authorizeURL(this.options,"button"),n=window.screen.width/2-250,i=window.screen.height/2-325;new o(this.options).start(null,((r,n)=>{if(r)return e(r);t(n)}));var a=function(){window.open(r,"livechat-login-popup","resizable,scrollbars,width=".concat(500,",height=").concat(650,",left=").concat(n,",top=").concat(i))};document.requestStorageAccess?document.requestStorageAccess().then(a,a):a()}))}}var a,c="undefined"!=typeof Symbol&&Symbol,s={foo:{}},l=Object,p=Object.prototype.toString,u=Math.max,f=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r},y=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==p.apply(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,n=function(t,e){for(var r=[],n=e||0,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),o=u(0,e.length-n.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(r=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(i,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=e.apply(this,f(n,arguments));return Object(o)===o?o:this}return e.apply(t,f(n,arguments))})),e.prototype){var c=function(){};c.prototype=e.prototype,r.prototype=new c,c.prototype=null}return r},h=Function.prototype.call,d=Object.prototype.hasOwnProperty,g=y.call(h,d),m=SyntaxError,b=Function,v=TypeError,w=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(t){}},S=Object.getOwnPropertyDescriptor;if(S)try{S({},"")}catch(t){S=null}var _=function(){throw new v},A=S?function(){try{return _}catch(t){try{return S(arguments,"callee").get}catch(t){return _}}}():_,j="function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),O={__proto__:s}.foo===s.foo&&!({__proto__:null}instanceof l),P=Object.getPrototypeOf||(O?function(t){return t.__proto__}:null),x={},k="undefined"!=typeof Uint8Array&&P?P(Uint8Array):a,I={"%AggregateError%":"undefined"==typeof AggregateError?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?a:ArrayBuffer,"%ArrayIteratorPrototype%":j&&P?P([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":"undefined"==typeof Atomics?a:Atomics,"%BigInt%":"undefined"==typeof BigInt?a:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?a:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?a:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?a:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?a:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":x,"%Int8Array%":"undefined"==typeof Int8Array?a:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?a:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&P?P(P([][Symbol.iterator]())):a,"%JSON%":"object"==typeof JSON?JSON:a,"%Map%":"undefined"==typeof Map?a:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&j&&P?P((new Map)[Symbol.iterator]()):a,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?a:Promise,"%Proxy%":"undefined"==typeof Proxy?a:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?a:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?a:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&j&&P?P((new Set)[Symbol.iterator]()):a,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&P?P(""[Symbol.iterator]()):a,"%Symbol%":j?Symbol:a,"%SyntaxError%":m,"%ThrowTypeError%":A,"%TypedArray%":k,"%TypeError%":v,"%Uint8Array%":"undefined"==typeof Uint8Array?a:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?a:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?a:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?a:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?a:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?a:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?a:WeakSet};if(P)try{null.error}catch(t){var E=P(P(t));I["%Error.prototype%"]=E}var R=function t(e){var r;if("%AsyncFunction%"===e)r=w("async function () {}");else if("%GeneratorFunction%"===e)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=w("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&P&&(r=P(o.prototype))}return I[e]=r,r},U={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},N=y.call(Function.call,Array.prototype.concat),F=y.call(Function.apply,Array.prototype.splice),M=y.call(Function.call,String.prototype.replace),D=y.call(Function.call,String.prototype.slice),C=y.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B=/\\(\\)?/g,L=function(t,e){var r,n=t;if(g(U,n)&&(n="%"+(r=U[n])[0]+"%"),g(I,n)){var o=I[n];if(o===x&&(o=R(n)),void 0===o&&!e)throw new v("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new m("intrinsic "+t+" does not exist!")},W=function(t,e){if("string"!=typeof t||0===t.length)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new v('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,t))throw new m("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=D(t,0,1),r=D(t,-1);if("%"===e&&"%"!==r)throw new m("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new m("invalid intrinsic syntax, expected opening `%`");var n=[];return M(t,T,(function(t,e,r,o){n[n.length]=r?M(o,B,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=L("%"+n+"%",e),i=o.name,a=o.value,c=!1,s=o.alias;s&&(n=s[0],F(r,N([0,1],s)));for(var l=1,p=!0;l<r.length;l+=1){var u=r[l],f=D(u,0,1),y=D(u,-1);if(('"'===f||"'"===f||"`"===f||'"'===y||"'"===y||"`"===y)&&f!==y)throw new m("property names with quotes must have matching quotes");if("constructor"!==u&&p||(c=!0),g(I,i="%"+(n+="."+u)+"%"))a=I[i];else if(null!=a){if(!(u in a)){if(!e)throw new v("base intrinsic for "+t+" exists, but the property is not available.");return}if(S&&l+1>=r.length){var h=S(a,u);a=(p=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[u]}else p=g(a,u),a=a[u];p&&!c&&(I[i]=a)}}return a},z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function q(t,e,r){return t(r={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&r.path)}},r.exports),r.exports}var $=W("%Object.defineProperty%",!0),G=function(){if($)try{return $({},"a",{value:1}),!0}catch(t){return!1}return!1};G.hasArrayLengthDefineBug=function(){if(!G())return null;try{return 1!==$([],"length",{value:1}).length}catch(t){return!0}};var H=G,V=W("%Object.getOwnPropertyDescriptor%",!0);if(V)try{V([],"length")}catch(t){V=null}var J=V,Q=H()&&W("%Object.defineProperty%",!0);if(Q)try{Q({},"a",{value:1})}catch(t){Q=!1}var Y=W("%SyntaxError%"),K=W("%TypeError%"),Z=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new K("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new K("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new K("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new K("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new K("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new K("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,a=arguments.length>6&&arguments[6],c=!!J&&J(t,e);if(Q)Q(t,e,{configurable:null===i&&c?c.configurable:!i,enumerable:null===n&&c?c.enumerable:!n,value:r,writable:null===o&&c?c.writable:!o});else{if(!a&&(n||o||i))throw new Y("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}},X=H(),tt=W("%TypeError%"),et=W("%Math.floor%"),rt=q((function(t){var e=W("%TypeError%"),r=W("%Function.prototype.apply%"),n=W("%Function.prototype.call%"),o=W("%Reflect.apply%",!0)||y.call(n,r),i=W("%Object.defineProperty%",!0),a=W("%Math.max%");if(i)try{i({},"a",{value:1})}catch(t){i=null}t.exports=function(t){if("function"!=typeof t)throw new e("a function is required");return function(t,e){if("function"!=typeof t)throw new tt("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||et(e)!==e)throw new tt("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,o=!0;if("length"in t&&J){var i=J(t,"length");i&&!i.configurable&&(n=!1),i&&!i.writable&&(o=!1)}return(n||o||!r)&&(X?Z(t,"length",e,!0,!0):Z(t,"length",e)),t}(o(y,n,arguments),1+a(0,t.length-(arguments.length-1)),!0)};var c=function(){return o(y,r,arguments)};i?i(t.exports,"apply",{value:c}):t.exports.apply=c})),nt=rt(W("String.prototype.indexOf")),ot=function(t,e){var r=W(t,!!e);return"function"==typeof r&&nt(t,".prototype.")>-1?rt(r):r},it=r.default.inspect,at="function"==typeof Map&&Map.prototype,ct=Object.getOwnPropertyDescriptor&&at?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,st=at&&ct&&"function"==typeof ct.get?ct.get:null,lt=at&&Map.prototype.forEach,pt="function"==typeof Set&&Set.prototype,ut=Object.getOwnPropertyDescriptor&&pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ft=pt&&ut&&"function"==typeof ut.get?ut.get:null,yt=pt&&Set.prototype.forEach,ht="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,dt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,gt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,mt=Boolean.prototype.valueOf,bt=Object.prototype.toString,vt=Function.prototype.toString,wt=String.prototype.match,St=String.prototype.slice,_t=String.prototype.replace,At=String.prototype.toUpperCase,jt=String.prototype.toLowerCase,Ot=RegExp.prototype.test,Pt=Array.prototype.concat,xt=Array.prototype.join,kt=Array.prototype.slice,It=Math.floor,Et="function"==typeof BigInt?BigInt.prototype.valueOf:null,Rt=Object.getOwnPropertySymbols,Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Nt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Ft="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Nt||"symbol")?Symbol.toStringTag:null,Mt=Object.prototype.propertyIsEnumerable,Dt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Ct(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||Ot.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-It(-t):It(t);if(n!==t){var o=String(n),i=St.call(e,o.length+1);return _t.call(o,r,"$&_")+"."+_t.call(_t.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _t.call(e,r,"$&_")}var Tt=it.custom,Bt=Gt(Tt)?Tt:null,Lt=function t(e,r,n,o){var i=r||{};if(Vt(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Vt(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Vt(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Vt(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Vt(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=i.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Yt(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var s=String(e);return c?Ct(e,s):s}if("bigint"==typeof e){var l=String(e)+"n";return c?Ct(e,l):l}var p=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=p&&p>0&&"object"==typeof e)return qt(e)?"[Array]":"[Object]";var u=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=xt.call(Array(t.indent+1)," ")}return{base:r,prev:xt.call(Array(e+1),r)}}(i,n);if(void 0===o)o=[];else if(Qt(o,e)>=0)return"[Circular]";function f(e,r,a){if(r&&(o=kt.call(o)).push(r),a){var c={depth:i.depth};return Vt(i,"quoteStyle")&&(c.quoteStyle=i.quoteStyle),t(e,c,n+1,o)}return t(e,i,n+1,o)}if("function"==typeof e&&!$t(e)){var y=function(t){if(t.name)return t.name;var e=wt.call(vt.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),h=re(e,f);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(h.length>0?" { "+xt.call(h,", ")+" }":"")}if(Gt(e)){var d=Nt?_t.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ut.call(e);return"object"!=typeof e||Nt?d:Zt(d)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var g="<"+jt.call(String(e.nodeName)),m=e.attributes||[],b=0;b<m.length;b++)g+=" "+m[b].name+"="+Wt(zt(m[b].value),"double",i);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+jt.call(String(e.nodeName))+">"}if(qt(e)){if(0===e.length)return"[]";var v=re(e,f);return u&&!function(t){for(var e=0;e<t.length;e++)if(Qt(t[e],"\n")>=0)return!1;return!0}(v)?"["+ee(v,u)+"]":"[ "+xt.call(v,", ")+" ]"}if(function(t){return!("[object Error]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}(e)){var w=re(e,f);return"cause"in Error.prototype||!("cause"in e)||Mt.call(e,"cause")?0===w.length?"["+String(e)+"]":"{ ["+String(e)+"] "+xt.call(w,", ")+" }":"{ ["+String(e)+"] "+xt.call(Pt.call("[cause]: "+f(e.cause),w),", ")+" }"}if("object"==typeof e&&a){if(Bt&&"function"==typeof e[Bt]&&it)return it(e,{depth:p-n});if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!st||!t||"object"!=typeof t)return!1;try{st.call(t);try{ft.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var S=[];return lt&<.call(e,(function(t,r){S.push(f(r,e,!0)+" => "+f(t,e))})),te("Map",st.call(e),S,u)}if(function(t){if(!ft||!t||"object"!=typeof t)return!1;try{ft.call(t);try{st.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var _=[];return yt&&yt.call(e,(function(t){_.push(f(t,e))})),te("Set",ft.call(e),_,u)}if(function(t){if(!ht||!t||"object"!=typeof t)return!1;try{ht.call(t,ht);try{dt.call(t,dt)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Xt("WeakMap");if(function(t){if(!dt||!t||"object"!=typeof t)return!1;try{dt.call(t,dt);try{ht.call(t,ht)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Xt("WeakSet");if(function(t){if(!gt||!t||"object"!=typeof t)return!1;try{return gt.call(t),!0}catch(t){}return!1}(e))return Xt("WeakRef");if(function(t){return!("[object Number]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}(e))return Zt(f(Number(e)));if(function(t){if(!t||"object"!=typeof t||!Et)return!1;try{return Et.call(t),!0}catch(t){}return!1}(e))return Zt(f(Et.call(e)));if(function(t){return!("[object Boolean]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}(e))return Zt(mt.call(e));if(function(t){return!("[object String]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}(e))return Zt(f(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===z)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}(e)&&!$t(e)){var A=re(e,f),j=Dt?Dt(e)===Object.prototype:e instanceof Object||e.constructor===Object,O=e instanceof Object?"":"null prototype",P=!j&&Ft&&Object(e)===e&&Ft in e?St.call(Jt(e),8,-1):O?"Object":"",x=(j||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(P||O?"["+xt.call(Pt.call([],P||[],O||[]),": ")+"] ":"");return 0===A.length?x+"{}":u?x+"{"+ee(A,u)+"}":x+"{ "+xt.call(A,", ")+" }"}return String(e)};function Wt(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function zt(t){return _t.call(String(t),/"/g,""")}function qt(t){return!("[object Array]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}function $t(t){return!("[object RegExp]"!==Jt(t)||Ft&&"object"==typeof t&&Ft in t)}function Gt(t){if(Nt)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!Ut)return!1;try{return Ut.call(t),!0}catch(t){}return!1}var Ht=Object.prototype.hasOwnProperty||function(t){return t in this};function Vt(t,e){return Ht.call(t,e)}function Jt(t){return bt.call(t)}function Qt(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Yt(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Yt(St.call(t,0,e.maxStringLength),e)+n}return Wt(_t.call(_t.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Kt),"single",e)}function Kt(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+At.call(e.toString(16))}function Zt(t){return"Object("+t+")"}function Xt(t){return t+" { ? }"}function te(t,e,r,n){return t+" ("+e+") {"+(n?ee(r,n):xt.call(r,", "))+"}"}function ee(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+xt.call(t,","+r)+"\n"+e.prev}function re(t,e){var r=qt(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Vt(t,o)?e(t[o],t):""}var i,a="function"==typeof Rt?Rt(t):[];if(Nt){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var s in t)Vt(t,s)&&(r&&String(Number(s))===s&&s<t.length||Nt&&i["$"+s]instanceof Symbol||(Ot.call(/[^\w$]/,s)?n.push(e(s,t)+": "+e(t[s],t)):n.push(s+": "+e(t[s],t))));if("function"==typeof Rt)for(var l=0;l<a.length;l++)Mt.call(t,a[l])&&n.push("["+e(a[l])+"]: "+e(t[a[l]],t));return n}var ne=W("%TypeError%"),oe=W("%WeakMap%",!0),ie=W("%Map%",!0),ae=ot("WeakMap.prototype.get",!0),ce=ot("WeakMap.prototype.set",!0),se=ot("WeakMap.prototype.has",!0),le=ot("Map.prototype.get",!0),pe=ot("Map.prototype.set",!0),ue=ot("Map.prototype.has",!0),fe=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},ye=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new ne("Side channel does not contain "+Lt(t))},get:function(n){if(oe&&n&&("object"==typeof n||"function"==typeof n)){if(t)return ae(t,n)}else if(ie){if(e)return le(e,n)}else if(r)return function(t,e){var r=fe(t,e);return r&&r.value}(r,n)},has:function(n){if(oe&&n&&("object"==typeof n||"function"==typeof n)){if(t)return se(t,n)}else if(ie){if(e)return ue(e,n)}else if(r)return function(t,e){return!!fe(t,e)}(r,n);return!1},set:function(n,o){oe&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new oe),ce(t,n,o)):ie?(e||(e=new ie),pe(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=fe(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n},he=String.prototype.replace,de=/%20/g,ge="RFC3986",me={default:ge,formatters:{RFC1738:function(t){return he.call(t,de,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:ge},be=Object.prototype.hasOwnProperty,ve=Array.isArray,we=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Se=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r},_e={arrayToObject:Se,assign:function(t,e){return Object.keys(e).reduce((function(t,r){return t[r]=e[r],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],a=Object.keys(i),c=0;c<a.length;++c){var s=a[c],l=i[s];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(e.push({obj:i,prop:s}),r.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(ve(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(t){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",c=0;c<i.length;++c){var s=i.charCodeAt(c);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===me.RFC1738&&(40===s||41===s)?a+=i.charAt(c):s<128?a+=we[s]:s<2048?a+=we[192|s>>6]+we[128|63&s]:s<55296||s>=57344?a+=we[224|s>>12]+we[128|s>>6&63]+we[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(c)),a+=we[240|s>>18]+we[128|s>>12&63]+we[128|s>>6&63]+we[128|63&s])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(ve(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=typeof r){if(ve(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!be.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var o=e;return ve(e)&&!ve(r)&&(o=Se(e,n)),ve(e)&&ve(r)?(r.forEach((function(r,o){if(be.call(e,o)){var i=e[o];i&&"object"==typeof i&&r&&"object"==typeof r?e[o]=t(i,r,n):e.push(r)}else e[o]=r})),e):Object.keys(r).reduce((function(e,o){var i=r[o];return be.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}},Ae=Object.prototype.hasOwnProperty,je={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},Oe=Array.isArray,Pe=Array.prototype.push,xe=function(t,e){Pe.apply(t,Oe(e)?e:[e])},ke=Date.prototype.toISOString,Ie=me.default,Ee={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:_e.encode,encodeValuesOnly:!1,format:Ie,formatter:me.formatters[Ie],indices:!1,serializeDate:function(t){return ke.call(t)},skipNulls:!1,strictNullHandling:!1},Re={},Ue=function t(e,r,n,o,i,a,c,s,l,p,u,f,y,h,d,g){for(var m,b=e,v=g,w=0,S=!1;void 0!==(v=v.get(Re))&&!S;){var _=v.get(e);if(w+=1,void 0!==_){if(_===w)throw new RangeError("Cyclic object value");S=!0}void 0===v.get(Re)&&(w=0)}if("function"==typeof s?b=s(r,b):b instanceof Date?b=u(b):"comma"===n&&Oe(b)&&(b=_e.maybeMap(b,(function(t){return t instanceof Date?u(t):t}))),null===b){if(i)return c&&!h?c(r,Ee.encoder,d,"key",f):r;b=""}if("string"==typeof(m=b)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||_e.isBuffer(b))return c?[y(h?r:c(r,Ee.encoder,d,"key",f))+"="+y(c(b,Ee.encoder,d,"value",f))]:[y(r)+"="+y(String(b))];var A,j=[];if(void 0===b)return j;if("comma"===n&&Oe(b))h&&c&&(b=_e.maybeMap(b,c)),A=[{value:b.length>0?b.join(",")||null:void 0}];else if(Oe(s))A=s;else{var O=Object.keys(b);A=l?O.sort(l):O}for(var P=o&&Oe(b)&&1===b.length?r+"[]":r,x=0;x<A.length;++x){var k=A[x],I="object"==typeof k&&void 0!==k.value?k.value:b[k];if(!a||null!==I){var E=Oe(b)?"function"==typeof n?n(P,k):P:P+(p?"."+k:"["+k+"]");g.set(e,w);var R=ye();R.set(Re,g),xe(j,t(I,E,n,o,i,a,"comma"===n&&h&&Oe(b)?null:c,s,l,p,u,f,y,h,d,R))}}return j},Ne=Object.prototype.hasOwnProperty,Fe=Array.isArray,Me={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:_e.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},De=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},Ce=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Te=function(t,e,r,n){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,s=[];if(c){if(!r.plainObjects&&Ne.call(Object.prototype,c)&&!r.allowPrototypes)return;s.push(c)}for(var l=0;r.depth>0&&null!==(a=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&Ne.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(a[1])}return a&&s.push("["+o.slice(a.index)+"]"),function(t,e,r,n){for(var o=n?e:Ce(e,r),i=t.length-1;i>=0;--i){var a,c=t[i];if("[]"===c&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var s="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(s,10);r.parseArrays||""!==s?!isNaN(l)&&c!==s&&String(l)===s&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==s&&(a[s]=o):a={0:o}}o=a}return o}(s,e,r,n)}},Be=function(t,e){var r=function(t){if(!t)return Me;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?Me.charset:t.charset;return{allowDots:void 0===t.allowDots?Me.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:Me.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:Me.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:Me.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Me.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:Me.comma,decoder:"function"==typeof t.decoder?t.decoder:Me.decoder,delimiter:"string"==typeof t.delimiter||_e.isRegExp(t.delimiter)?t.delimiter:Me.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:Me.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:Me.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:Me.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:Me.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Me.strictNullHandling}}(e);if(""===t||null==t)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof t?function(t,e){var r,n={__proto__:null},o=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=e.parameterLimit===1/0?void 0:e.parameterLimit,a=o.split(e.delimiter,i),c=-1,s=e.charset;if(e.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?s="utf-8":"utf8=%26%2310003%3B"===a[r]&&(s="iso-8859-1"),c=r,r=a.length);for(r=0;r<a.length;++r)if(r!==c){var l,p,u=a[r],f=u.indexOf("]="),y=-1===f?u.indexOf("="):f+1;-1===y?(l=e.decoder(u,Me.decoder,s,"key"),p=e.strictNullHandling?null:""):(l=e.decoder(u.slice(0,y),Me.decoder,s,"key"),p=_e.maybeMap(Ce(u.slice(y+1),e),(function(t){return e.decoder(t,Me.decoder,s,"value")}))),p&&e.interpretNumericEntities&&"iso-8859-1"===s&&(p=De(p)),u.indexOf("[]=")>-1&&(p=Fe(p)?[p]:p),Ne.call(n,l)?n[l]=_e.combine(n[l],p):n[l]=p}return n}(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var c=i[a],s=Te(c,n[c],r,"string"==typeof t);o=_e.merge(o,s,r)}return!0===r.allowSparse?o:_e.compact(o)},Le=function(t,e){var r,n=t,o=function(t){if(!t)return Ee;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||Ee.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=me.default;if(void 0!==t.format){if(!Ae.call(me.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=me.formatters[r],o=Ee.filter;return("function"==typeof t.filter||Oe(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Ee.addQueryPrefix,allowDots:void 0===t.allowDots?Ee.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Ee.charsetSentinel,delimiter:void 0===t.delimiter?Ee.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Ee.encode,encoder:"function"==typeof t.encoder?t.encoder:Ee.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Ee.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Ee.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Ee.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Ee.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):Oe(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=e&&e.arrayFormat in je?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var c=je[i];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s="comma"===c&&e&&e.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=ye(),p=0;p<r.length;++p){var u=r[p];o.skipNulls&&null===n[u]||xe(a,Ue(n[u],u,c,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var f=a.join(o.delimiter),y=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),f.length>0?y+f:""}; | ||
/** @fileOverview | ||
@@ -6,13 +6,11 @@ * @author Auth0 https://github.com/auth0/auth0.js | ||
*/ | ||
function U(e,t){return t.reduce((function(t,r){return e[r]&&(t[r]=e[r]),t}),{})}var z=function(){function e(r,n){t(this,e),this.options=n,this.sdk=r}return n(e,[{key:"authorize",value:function(){var e=this.sdk.authorizeURL(this.options);window.location=e}},{key:"authorizeData",value:function(){var e=this;return new Promise((function(t,r){var n={},i=[];switch(e.options.response_type){case"token":if(i=["access_token","expires_in","token_type"],n=U(n=E(window.location.hash.substring(1)),["access_token","expires_in","state","scope","token_type"]),!i.every((function(e){return n.hasOwnProperty(e)})))return void r(s.extend({identity_exception:"unauthorized"}));n.expires_in=parseInt(n.expires_in);break;case"code":if(i=["code"],n=U(n=E(window.location.search,{ignoreQueryPrefix:!0}),["state","code"]),!i.every((function(e){return n.hasOwnProperty(e)})))return void r(s.extend({identity_exception:"unauthorized"}))}e.sdk.redirectUriParamsPersister.retrieve(n.state),t(n)}))}}]),e}(),M=function(){function e(r,n){t(this,e),this.options=n,this.sdk=r}return n(e,[{key:"authorize",value:function(){var e=this;return new Promise((function(t,r){var n=e.sdk.authorizeURL(e.options,"button");new c(e.options).start(5e3,(function(n,i){if(e.removeIframe(),n)return r(n);t(i)}));var i=document.createElement("iframe");i.setAttribute("src",n),i.setAttribute("id",e.iframeID()),i.style.width="1px",i.style.height="1px",i.style.position="fixed",i.style.top="0",i.style.right="0",i.style.opacity="0",i.style.visibility="none",document.body.appendChild(i)}))}},{key:"iframeID",value:function(){return this.options.client_id+this.options.response_type}},{key:"removeIframe",value:function(){var e=document.getElementById(this.iframeID());e&&e.parentNode&&e.parentNode.removeChild(e)}}]),e}(); | ||
function We(t,e){return e.reduce(((e,r)=>(t[r]&&(e[r]=t[r]),e)),{})}class ze{constructor(t,e){this.options=e,this.sdk=t}authorize(){const t=this.sdk.authorizeURL(this.options);window.location=t}authorizeData(){return new Promise(((t,e)=>{let r={},o=[];switch(this.options.response_type){case"token":if(o=["access_token","expires_in","token_type"],r=Be(window.location.hash.substring(1)),r=We(r,["access_token","expires_in","state","scope","token_type"]),!o.every((t=>r.hasOwnProperty(t))))return void e(n.extend({identity_exception:"unauthorized"}));r.expires_in=parseInt(r.expires_in);break;case"code":if(o=["code"],r=Be(window.location.search,{ignoreQueryPrefix:!0}),r=We(r,["state","code"]),!o.every((t=>r.hasOwnProperty(t))))return void e(n.extend({identity_exception:"unauthorized"}))}this.sdk.redirectUriParamsPersister.retrieve(r.state),t(r)}))}}class qe{constructor(t,e){this.options=e,this.sdk=t}authorize(){return new Promise(((t,e)=>{const r=this.sdk.authorizeURL(this.options,"button");new o(this.options).start(5e3,((r,n)=>{if(this.removeIframe(),r)return e(r);t(n)}));const n=document.createElement("iframe");n.setAttribute("src",r),n.setAttribute("id",this.iframeID()),n.style.width="1px",n.style.height="1px",n.style.position="fixed",n.style.top="0",n.style.right="0",n.style.opacity="0",n.style.visibility="none",document.body.appendChild(n)}))}iframeID(){return this.options.client_id+this.options.response_type}removeIframe(){const t=document.getElementById(this.iframeID());t&&t.parentNode&&t.parentNode.removeChild(t)}} | ||
/** @fileOverview | ||
* @author Auth0 https://github.com/auth0/auth0.js | ||
* @license MIT | ||
*/ | ||
function B(){}B.prototype.getItem=function(){return null},B.prototype.removeItem=function(){},B.prototype.setItem=function(){};var T=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){var r;r=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in o)o[c]&&(s+="; "+c,!0!==o[c]&&(s+="="+o[c].split(";")[0]));return document.cookie=t+"="+r+s}}function a(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],a=0;a<o.length;a++){var s=o[a].split("="),c=s.slice(1).join("=");r||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(n.read||n)(c,u)||t(c),r)try{c=JSON.parse(c)}catch(e){}if(i[u]=c,e===u)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return a(e,!1)},i.getJSON=function(e){return a(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}((function(){}))},e.exports=r()}));function H(){}function F(e){if(this.storage=new H,!0===e.force_local_storage)try{var t=window.localStorage;t&&(this.storage=t)}catch(e){console.warn(e),console.warn("Cant use localStorage. Using CookieStorage instead.")}}function Q(e){this.handler=new F(e)}H.prototype.getItem=function(e){return T.get(e)},H.prototype.removeItem=function(e){T.remove(e)},H.prototype.setItem=function(e,t,r){var n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);T.set(e,t,n)},F.prototype.failover=function(){this.storage instanceof B?console.warn("DummyStorage: ignore failover"):this.storage instanceof H?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new B):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new H)},F.prototype.getItem=function(e){try{return this.storage.getItem(e)}catch(t){return console.warn(t),this.failover(),this.getItem(e)}},F.prototype.removeItem=function(e){try{return this.storage.removeItem(e)}catch(t){return console.warn(t),this.failover(),this.removeItem(e)}},F.prototype.setItem=function(e,t,r){try{return this.storage.setItem(e,t,r)}catch(n){return console.warn(n),this.failover(),this.setItem(e,t,r)}},Q.prototype.getItem=function(e){var t=this.handler.getItem(e);try{return JSON.parse(t)}catch(e){return t}},Q.prototype.removeItem=function(e){return this.handler.removeItem(e)},Q.prototype.setItem=function(e,t,r){var n=JSON.stringify(t);return this.handler.setItem(e,n,r)};var q=function(){function e(r){t(this,e),this.options=r.transaction,this.storage=new Q(this.options)}return n(e,[{key:"generate",value:function(e){this.storage.setItem(this.options.namespace+e.state,{state:e.state,code_verifier:e.code_verifier},{expires:1/48})}},{key:"get",value:function(e){var t=this.storage.getItem(this.options.namespace+e);return this.clear(e),t||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),V={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};V.bitArray={bitSlice:function(e,t,r){return e=V.bitArray._shiftRight(e.slice(t/32),32-(31&t)).slice(1),void 0===r?e:V.bitArray.clamp(e,r-t)},extract:function(e,t,r){var n=Math.floor(-t-r&31);return(-32&(t+r-1^t)?e[t/32|0]<<32-n^e[t/32+1|0]>>>n:e[t/32|0]>>>n)&(1<<r)-1},concat:function(e,t){if(0===e.length||0===t.length)return e.concat(t);var r=e[e.length-1],n=V.bitArray.getPartial(r);return 32===n?e.concat(t):V.bitArray._shiftRight(t,n,0|r,e.slice(0,e.length-1))},bitLength:function(e){var t,r=e.length;return 0===r?0:(t=e[r-1],32*(r-1)+V.bitArray.getPartial(t))},clamp:function(e,t){if(32*e.length<t)return e;var r=(e=e.slice(0,Math.ceil(t/32))).length;return t&=31,r>0&&t&&(e[r-1]=V.bitArray.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:function(e,t,r){return 32===e?t:(r?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(V.bitArray.bitLength(e)!==V.bitArray.bitLength(t))return!1;var r,n=0;for(r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n},_shiftRight:function(e,t,r,n){var i,o,a;for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(i=0;i<e.length;i++)n.push(r|e[i]>>>t),r=e[i]<<32-t;return o=e.length?e[e.length-1]:0,a=V.bitArray.getPartial(o),n.push(V.bitArray.partial(t+a&31,t+a>32?r:n.pop(),1)),n},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,r;for(t=0;t<e.length;++t)r=e[t],e[t]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return e}},V.codec.utf8String={fromBits:function(e){var t,r,n="",i=V.bitArray.bitLength(e);for(t=0;t<i/8;t++)0==(3&t)&&(r=e[t/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,r=[],n=0;for(t=0;t<e.length;t++)n=n<<8|e.charCodeAt(t),3==(3&t)&&(r.push(n),n=0);return 3&t&&r.push(V.bitArray.partial(8*(3&t),n)),r}},V.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},V.hash.sha256.hash=function(e){return(new V.hash.sha256).update(e).finalize()},V.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=V.codec.utf8String.toBits(e));var t,r=this._buffer=V.bitArray.concat(this._buffer,e),n=this._length,i=this._length=n+V.bitArray.bitLength(e);if(i>9007199254740991)throw new V.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var o=new Uint32Array(r),a=0;for(t=512+n-(512+n&511);t<=i;t+=512)this._block(o.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(t=512+n-(512+n&511);t<=i;t+=512)this._block(r.splice(0,16));return this},finalize:function(){var e,t=this._buffer,r=this._h;for(e=(t=V.bitArray.concat(t,[V.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var e,t,r=0,n=2;function i(e){return 4294967296*(e-Math.floor(e))|0}for(;r<64;n++){for(t=!0,e=2;e*e<=n;e++)if(n%e==0){t=!1;break}t&&(r<8&&(this._init[r]=i(Math.pow(n,.5))),this._key[r]=i(Math.pow(n,1/3)),r++)}},_block:function(e){var t,r,n,i,o=this._h,a=this._key,s=o[0],c=o[1],u=o[2],l=o[3],f=o[4],p=o[5],h=o[6],d=o[7];for(t=0;t<64;t++)t<16?r=e[t]:(n=e[t+1&15],i=e[t+14&15],r=e[15&t]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&t]+e[t+9&15]|0),r=r+d+(f>>>6^f>>>11^f>>>25^f<<26^f<<21^f<<7)+(h^f&(p^h))+a[t],d=h,h=p,p=f,f=l+r|0,l=u,u=c,s=r+((c=s)&u^l&(c^u))+(c>>>2^c>>>13^c>>>22^c<<30^c<<19^c<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+c|0,o[2]=o[2]+u|0,o[3]=o[3]+l|0,o[4]=o[4]+f|0,o[5]=o[5]+p|0,o[6]=o[6]+h|0,o[7]=o[7]+d|0}};var J={base64URLEncode:function(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}},Y=function(){function e(r,n){t(this,e),this.options={namespace:r.transaction.namespace+n},this.storage=new Q(this.options)}return n(e,[{key:"set",value:function(e,t){this.storage.setItem(this.options.namespace+e,t,{expires:1/48})}},{key:"get",value:function(e){var t=this.storage.getItem(this.options.namespace+e);return this.clear(e),t||{}}},{key:"clear",value:function(e){this.storage.removeItem(this.options.namespace+e)}}]),e}(),$=function(){function e(r){t(this,e),this.persister=new Y(r,"redirect_uri_params")}return n(e,[{key:"persist",value:function(e){var t=new URL(e.redirect_uri),r=E(t.search.substring(1)),n=E(t.hash.substring(1));this.persister.set(e.state,{query_params:r,hash_params:n}),e.redirect_uri=t.origin+t.pathname}},{key:"retrieve",value:function(e){var t,r,n=this.persister.get(e,!1);if(n){var i=a(a({},null!==(t=n.query_params)&&void 0!==t?t:{}),E(window.location.search.substring(1))),o=a(a({},null!==(r=n.hash_params)&&void 0!==r?r:{}),E(window.location.hash.substring(1))),s=window.location.origin+window.location.pathname;i&&(s+="?"+L(i)),o&&(s+="#"+L(o)),window.history.replaceState({},document.title,s)}}}]),e}();var G={string: | ||
*/function $e(){}$e.prototype.getItem=function(){return null},$e.prototype.removeItem=function(){},$e.prototype.setItem=function(){};var Ge=q((function(t,e){var r;r=function(){function t(){for(var t=0,e={};t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function r(n){function o(){}function i(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=t({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(r);/^[\{\[]/.test(a)&&(r=a)}catch(t){}r=n.write?n.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var c="";for(var s in i)i[s]&&(c+="; "+s,!0!==i[s]&&(c+="="+i[s].split(";")[0]));return document.cookie=e+"="+r+c}}function a(t,r){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var c=i[a].split("="),s=c.slice(1).join("=");r||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var l=e(c[0]);if(s=(n.read||n)(s,l)||e(s),r)try{s=JSON.parse(s)}catch(t){}if(o[l]=s,t===l)break}catch(t){}}return t?o[t]:o}}return o.set=i,o.get=function(t){return a(t,!1)},o.getJSON=function(t){return a(t,!0)},o.remove=function(e,r){i(e,"",t(r,{expires:-1}))},o.defaults={},o.withConverter=r,o}((function(){}))},t.exports=r()}));function He(){}function Ve(t){if(this.storage=new He,!0===t.force_local_storage)try{const t=window.localStorage;t&&(this.storage=t)}catch(t){console.warn(t),console.warn("Cant use localStorage. Using CookieStorage instead.")}}function Je(t){this.handler=new Ve(t)}He.prototype.getItem=function(t){return Ge.get(t)},He.prototype.removeItem=function(t){Ge.remove(t)},He.prototype.setItem=function(t,e,r){const n=Object.assign({expires:1,SameSite:"none",Secure:!0},r);Ge.set(t,e,n)},Ve.prototype.failover=function(){this.storage instanceof $e?console.warn("DummyStorage: ignore failover"):this.storage instanceof He?(console.warn("CookieStorage: failing over DummyStorage"),this.storage=new $e):(console.warn("LocalStorage: failing over CookieStorage"),this.storage=new He)},Ve.prototype.getItem=function(t){try{return this.storage.getItem(t)}catch(e){return console.warn(e),this.failover(),this.getItem(t)}},Ve.prototype.removeItem=function(t){try{return this.storage.removeItem(t)}catch(e){return console.warn(e),this.failover(),this.removeItem(t)}},Ve.prototype.setItem=function(t,e,r){try{return this.storage.setItem(t,e,r)}catch(n){return console.warn(n),this.failover(),this.setItem(t,e,r)}},Je.prototype.getItem=function(t){const e=this.handler.getItem(t);try{return JSON.parse(e)}catch(t){return e}},Je.prototype.removeItem=function(t){return this.handler.removeItem(t)},Je.prototype.setItem=function(t,e,r){const n=JSON.stringify(e);return this.handler.setItem(t,n,r)};class Qe{constructor(t){this.options=t.transaction,this.storage=new Je(this.options)}generate(t){this.storage.setItem(this.options.namespace+t.state,{state:t.state,code_verifier:t.code_verifier},{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}var Ye={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};Ye.bitArray={bitSlice:function(t,e,r){return t=Ye.bitArray._shiftRight(t.slice(e/32),32-(31&e)).slice(1),void 0===r?t:Ye.bitArray.clamp(t,r-e)},extract:function(t,e,r){var n=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-n^t[e/32+1|0]>>>n:t[e/32|0]>>>n)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],n=Ye.bitArray.getPartial(r);return 32===n?t.concat(e):Ye.bitArray._shiftRight(e,n,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e,r=t.length;return 0===r?0:(e=t[r-1],32*(r-1)+Ye.bitArray.getPartial(e))},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Ye.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(Ye.bitArray.bitLength(t)!==Ye.bitArray.bitLength(e))return!1;var r,n=0;for(r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n},_shiftRight:function(t,e,r,n){var o,i,a;for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;return i=t.length?t[t.length-1]:0,a=Ye.bitArray.getPartial(i),n.push(Ye.bitArray.partial(e+a&31,e+a>32?r:n.pop(),1)),n},_xor4:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]},byteswapM:function(t){var e,r;for(e=0;e<t.length;++e)r=t[e],t[e]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return t}},Ye.codec.utf8String={fromBits:function(t){var e,r,n="",o=Ye.bitArray.bitLength(t);for(e=0;e<o/8;e++)0==(3&e)&&(r=t[e/4]),n+=String.fromCharCode(r>>>8>>>8>>>8),r<<=8;return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(Ye.bitArray.partial(8*(3&e),n)),r}},Ye.hash.sha256=function(t){this._key[0]||this._precompute(),t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()},Ye.hash.sha256.hash=function(t){return(new Ye.hash.sha256).update(t).finalize()},Ye.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(t){"string"==typeof t&&(t=Ye.codec.utf8String.toBits(t));var e,r=this._buffer=Ye.bitArray.concat(this._buffer,t),n=this._length,o=this._length=n+Ye.bitArray.bitLength(t);if(o>9007199254740991)throw new Ye.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var i=new Uint32Array(r),a=0;for(e=512+n-(512+n&511);e<=o;e+=512)this._block(i.subarray(16*a,16*(a+1))),a+=1;r.splice(0,16*a)}else for(e=512+n-(512+n&511);e<=o;e+=512)this._block(r.splice(0,16));return this},finalize:function(){var t,e=this._buffer,r=this._h;for(t=(e=Ye.bitArray.concat(e,[Ye.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this._length/4294967296)),e.push(0|this._length);e.length;)this._block(e.splice(0,16));return this.reset(),r},_init:[],_key:[],_precompute:function(){var t,e,r=0,n=2;function o(t){return 4294967296*(t-Math.floor(t))|0}for(;r<64;n++){for(e=!0,t=2;t*t<=n;t++)if(n%t==0){e=!1;break}e&&(r<8&&(this._init[r]=o(Math.pow(n,.5))),this._key[r]=o(Math.pow(n,1/3)),r++)}},_block:function(t){var e,r,n,o,i=this._h,a=this._key,c=i[0],s=i[1],l=i[2],p=i[3],u=i[4],f=i[5],y=i[6],h=i[7];for(e=0;e<64;e++)e<16?r=t[e]:(n=t[e+1&15],o=t[e+14&15],r=t[15&e]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(o>>>17^o>>>19^o>>>10^o<<15^o<<13)+t[15&e]+t[e+9&15]|0),r=r+h+(u>>>6^u>>>11^u>>>25^u<<26^u<<21^u<<7)+(y^u&(f^y))+a[e],h=y,y=f,f=u,u=p+r|0,p=l,l=s,c=r+((s=c)&l^p&(s^l))+(s>>>2^s>>>13^s>>>22^s<<30^s<<19^s<<10)|0;i[0]=i[0]+c|0,i[1]=i[1]+s|0,i[2]=i[2]+l|0,i[3]=i[3]+p|0,i[4]=i[4]+u|0,i[5]=i[5]+f|0,i[6]=i[6]+y|0,i[7]=i[7]+h|0}};var Ke={base64URLEncode:function(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}};class Ze{constructor(t,e){this.options={namespace:t.transaction.namespace+e},this.storage=new Je(this.options)}set(t,e){this.storage.setItem(this.options.namespace+t,e,{expires:1/48})}get(t){const e=this.storage.getItem(this.options.namespace+t);return this.clear(t),e||{}}clear(t){this.storage.removeItem(this.options.namespace+t)}}class Xe{constructor(t){this.persister=new Ze(t,"redirect_uri_params")}persist(t){const e=new URL(t.redirect_uri),r=Be(e.search.substring(1)),n=Be(e.hash.substring(1));this.persister.set(t.state,{query_params:r,hash_params:n}),t.redirect_uri=e.origin+e.pathname}retrieve(t){var e,r;const n=this.persister.get(t,!1);if(!n)return;const o={...null!==(e=n.query_params)&&void 0!==e?e:{},...Be(window.location.search.substring(1))},i={...null!==(r=n.hash_params)&&void 0!==r?r:{},...Be(window.location.hash.substring(1))};let a=window.location.origin+window.location.pathname;o&&(a+="?"+Le(o)),i&&(a+="#"+Le(i)),window.history.replaceState({},document.title,a)}} | ||
/** @fileOverview | ||
* @author Auth0 https://github.com/auth0/auth0.js | ||
* @license MIT | ||
*/ | ||
function(e){var t=new Uint8Array(e),r=[],n="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",i=window.crypto||window.msCrypto,o="";if(i)o=i.getRandomValues(t);else for(var a=0;a<e;a++)o+=n.charAt(Math.floor(Math.random()*n.length));for(var s=0;s<o.length;s++)r.push(n[o[s]%n.length]);return r.join("")}};return function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t(this,e),null==r.client_id)throw new Error("client id not provided");var n={prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}};this.options=Object.assign({},n,r),this.transaction=new q(this.options),this.redirectUriParamsPersister=new $(this.options)}return n(e,[{key:"iframe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.options,e);return new M(this,t)}},{key:"popup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.options,e);return new u(this,t)}},{key:"redirect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},this.options,e);return new z(this,t)}},{key:"authorizeURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=Object.assign({},this.options,e);r.state||(r.state=G.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);var n=U(r,["client_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(n,r.tracking),null===n.scope&&delete n.scope,null!=t&&(n.flow=t),r.email_hint&&(n.email=r.email_hint);var i=r.server_url;if("manual"===r.popup_flow&&(i+="/signin"),r.path&&(i+=r.path),"code"===r.response_type&&r.pkce.enabled){var o=r.pkce.code_verifier||G.string(r.pkce.code_verifier_length);switch(r.pkce.code_challange_method){case"S256":var a=V.hash.sha256.hash(o);Object.assign(n,{code_verifier:o,code_challenge:J.base64URLEncode(a),code_challenge_method:r.pkce.code_challange_method});break;default:Object.assign(n,{code_verifier:o,code_challenge:o,code_challenge_method:r.pkce.code_challange_method})}}return this.transaction.generate(n),this.redirectUriParamsPersister.persist(n),delete n.code_verifier,i+"?"+L(n)}},{key:"verify",value:function(e){var t=this.transaction.get(e.state);return e.state&&this.options.verify_state&&t.state!=e.state?null:t}}]),e}()})); | ||
*/var tr={string:function(t){const e=new Uint8Array(t),r=[],n="0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._~",o=window.crypto||window.msCrypto;let i="";if(o)i=o.getRandomValues(e);else for(let e=0;e<t;e++)i+=n.charAt(Math.floor(65*Math.random()));for(let t=0;t<i.length;t++)r.push(n[i[t]%65]);return r.join("")}};return class{constructor(t={}){if(null==t.client_id)throw new Error("client id not provided");this.options=Object.assign({},{prompt:"",response_type:"token",popup_flow:"auto",state:"",verify_state:!0,verify_callback:!0,scope:null,redirect_uri:"",email_hint:null,server_url:"https://accounts.livechat.com",tracking:{utm_source:"accounts.livechat.com",utm_medium:"accounts-sdk"},transaction:{namespace:"com.livechat.accounts",key_length:32,force_local_storage:!1},pkce:{enabled:!0,code_verifier_length:128,code_challange_method:"S256"}},t),this.transaction=new Qe(this.options),this.redirectUriParamsPersister=new Xe(this.options)}iframe(t={}){const e=Object.assign({},this.options,t);return new qe(this,e)}popup(t={}){const e=Object.assign({},this.options,t);return new i(this,e)}redirect(t={}){const e=Object.assign({},this.options,t);return new ze(this,e)}authorizeURL(t={},e=""){const r=Object.assign({},this.options,t);r.state||(r.state=tr.string(r.key_length)),r.redirect_uri||(r.redirect_uri=window.location.href);const n=We(r,["client_id","redirect_uri","state","response_type","scope","prompt"]);Object.assign(n,r.tracking),null===n.scope&&delete n.scope,null!=e&&(n.flow=e),r.email_hint&&(n.email=r.email_hint);let o=r.server_url;if("manual"===r.popup_flow&&(o+="/signin"),r.path&&(o+=r.path),"code"===r.response_type&&r.pkce.enabled){const t=r.pkce.code_verifier||tr.string(r.pkce.code_verifier_length);if("S256"===r.pkce.code_challange_method){const e=Ye.hash.sha256.hash(t);Object.assign(n,{code_verifier:t,code_challenge:Ke.base64URLEncode(e),code_challenge_method:r.pkce.code_challange_method})}else Object.assign(n,{code_verifier:t,code_challenge:t,code_challenge_method:r.pkce.code_challange_method})}return this.transaction.generate(n),this.redirectUriParamsPersister.persist(n),delete n.code_verifier,o+"?"+Le(n)}verify(t){const e=this.transaction.get(t.state);return t.state&&this.options.verify_state&&e.state!=t.state?null:e}}})); | ||
//# sourceMappingURL=accounts-sdk.min.js.map |
{ | ||
"name": "@livechat/accounts-sdk", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "SDK for 'Sign in with LiveChat'.", | ||
@@ -36,3 +36,3 @@ "author": "LiveChat", | ||
"jsdom-global": "^3.0.2", | ||
"mocha": "^8.1.3", | ||
"mocha": "^10.2.0", | ||
"rollup": "^2.27.0", | ||
@@ -39,0 +39,0 @@ "rollup-plugin-serve": "^1.0.4", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
836951
6035
2
5