genesys-cloud-client-auth 1.0.0-STREAM-623.7 → 1.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "STREAM-623",
3
- "build": "7",
4
- "buildDate": "2025-06-27T03:34:18.257Z",
2
+ "version": "1.0.0-develop",
3
+ "build": "1",
4
+ "buildDate": "2025-06-27T19:40:18.950Z",
5
5
  "indexFiles": [
6
6
  {
7
7
  "file": "index.html"
@@ -1,2 +1,2 @@
1
- (()=>{var t={3144:(t,e,r)=>{"use strict";var o=r(6743),n=r(1002),i=r(76),s=r(7119);t.exports=s||o.call(i,n)},1002:t=>{"use strict";t.exports=Function.prototype.apply},76:t=>{"use strict";t.exports=Function.prototype.call},3126:(t,e,r)=>{"use strict";var o=r(6743),n=r(9675),i=r(76),s=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new n("a function is required");return s(o,i,t)}},7119:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},6556:(t,e,r)=>{"use strict";var o=r(453),n=r(3126),i=n([o("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=o(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?n([r]):r}},5971:t=>{function e(t){if(t)return function(t){for(var r in e.prototype)t[r]=e.prototype[r];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((r=o[n])===e||r.fn===e){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){o=0;for(var n=(r=r.slice(0)).length;o<n;++o)r[o].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7176:(t,e,r)=>{"use strict";var o,n=r(3126),i=r(5795);try{o=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!o&&i&&i(Object.prototype,"__proto__"),a=Object,c=a.getPrototypeOf;t.exports=s&&"function"==typeof s.get?n([s.get]):"function"==typeof c&&function(t){return c(null==t?t:a(t))}},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},9612:t=>{"use strict";t.exports=Object},8463:t=>{t.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var e="[...]",r="[Circular]",o=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=i()),c(t,"",0,[],void 0,0,s);try{a=0===n.length?JSON.stringify(t,e,r):JSON.stringify(t,f(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var p=o.pop();4===p.length?Object.defineProperty(p[0],p[1],p[3]):p[0][p[1]]=p[2]}}return a}function a(t,e,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:t}),o.push([i,r,e,s])):n.push([e,r,t]):(i[r]=t,o.push([i,r,e]))}function c(t,o,n,i,s,p,u){var l;if(p+=1,"object"==typeof t&&null!==t){for(l=0;l<i.length;l++)if(i[l]===t)return void a(r,t,o,s);if(void 0!==u.depthLimit&&p>u.depthLimit)return void a(e,t,o,s);if(void 0!==u.edgesLimit&&n+1>u.edgesLimit)return void a(e,t,o,s);if(i.push(t),Array.isArray(t))for(l=0;l<t.length;l++)c(t[l],l,l,i,t,p,u);else{var f=Object.keys(t);for(l=0;l<f.length;l++){var y=f[l];c(t[y],y,l,i,t,p,u)}}i.pop()}}function p(t,e){return t<e?-1:t>e?1:0}function u(t,e,r,s){void 0===s&&(s=i());var a,c=l(t,"",0,[],void 0,0,s)||t;try{a=0===n.length?JSON.stringify(c,e,r):JSON.stringify(c,f(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var p=o.pop();4===p.length?Object.defineProperty(p[0],p[1],p[3]):p[0][p[1]]=p[2]}}return a}function l(t,n,i,s,c,u,f){var y;if(u+=1,"object"==typeof t&&null!==t){for(y=0;y<s.length;y++)if(s[y]===t)return void a(r,t,n,c);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==f.depthLimit&&u>f.depthLimit)return void a(e,t,n,c);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void a(e,t,n,c);if(s.push(t),Array.isArray(t))for(y=0;y<t.length;y++)l(t[y],y,y,s,t,u,f);else{var h={},d=Object.keys(t).sort(p);for(y=0;y<d.length;y++){var m=d[y];l(t[m],m,y,s,t,u,f),h[m]=t[m]}if(void 0===c)return h;o.push([c,n,t]),c[n]=h}s.pop()}}function f(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(n.length>0)for(var o=0;o<n.length;o++){var i=n[o];if(i[1]===e&&i[0]===r){r=i[2],n.splice(o,1);break}}return t.call(this,e,r)}}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,o=function(t,e){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var n=0;n<e.length;n+=1)r[n+t.length]=e[n];return r};t.exports=function(t){var n=this;if("function"!=typeof n||"[object Function]"!==e.apply(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,s=function(t){for(var e=[],r=1,o=0;r<t.length;r+=1,o+=1)e[o]=t[r];return e}(arguments),a=r(0,n.length-s.length),c=[],p=0;p<a;p++)c[p]="$"+p;if(i=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=n.apply(this,o(s,arguments));return Object(e)===e?e:this}return n.apply(t,o(s,arguments))})),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i}},6743:(t,e,r)=>{"use strict";var o=r(9353);t.exports=Function.prototype.bind||o},453:(t,e,r)=>{"use strict";var o,n=r(9612),i=r(9383),s=r(1237),a=r(9290),c=r(9538),p=r(8068),u=r(9675),l=r(5345),f=r(1514),y=r(8968),h=r(6188),d=r(8002),m=r(5880),g=r(414),b=r(3093),w=Function,v=function(t){try{return w('"use strict"; return ('+t+").constructor;")()}catch(t){}},_=r(5795),S=r(655),E=function(){throw new u},O=_?function(){try{return E}catch(t){try{return _(arguments,"callee").get}catch(t){return E}}}():E,x=r(4039)(),A=r(3628),T=r(1064),j=r(8648),P=r(1002),k=r(76),I={},R="undefined"!=typeof Uint8Array&&A?A(Uint8Array):o,D={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":x&&A?A([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?o:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":I,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&A?A(A([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&x&&A?A((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&x&&A?A((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&A?A(""[Symbol.iterator]()):o,"%Symbol%":x?Symbol:o,"%SyntaxError%":p,"%ThrowTypeError%":O,"%TypedArray%":R,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":P,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":T,"%Math.abs%":f,"%Math.floor%":y,"%Math.max%":h,"%Math.min%":d,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":j};if(A)try{null.error}catch(t){var N=A(A(t));D["%Error.prototype%"]=N}var U=function t(e){var r;if("%AsyncFunction%"===e)r=v("async function () {}");else if("%GeneratorFunction%"===e)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=v("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&A&&(r=A(n.prototype))}return D[e]=r,r},C={__proto__:null,"%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"]},L=r(6743),F=r(9957),M=L.call(k,Array.prototype.concat),$=L.call(P,Array.prototype.splice),B=L.call(k,String.prototype.replace),q=L.call(k,String.prototype.slice),H=L.call(k,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,G=function(t,e){var r,o=t;if(F(C,o)&&(o="%"+(r=C[o])[0]+"%"),F(D,o)){var n=D[o];if(n===I&&(n=U(o)),void 0===n&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:n}}throw new p("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,t))throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=q(t,0,1),r=q(t,-1);if("%"===e&&"%"!==r)throw new p("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new p("invalid intrinsic syntax, expected opening `%`");var o=[];return B(t,W,(function(t,e,r,n){o[o.length]=r?B(n,z,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=G("%"+o+"%",e),i=n.name,s=n.value,a=!1,c=n.alias;c&&(o=c[0],$(r,M([0,1],c)));for(var l=1,f=!0;l<r.length;l+=1){var y=r[l],h=q(y,0,1),d=q(y,-1);if(('"'===h||"'"===h||"`"===h||'"'===d||"'"===d||"`"===d)&&h!==d)throw new p("property names with quotes must have matching quotes");if("constructor"!==y&&f||(a=!0),F(D,i="%"+(o+="."+y)+"%"))s=D[i];else if(null!=s){if(!(y in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=r.length){var m=_(s,y);s=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[y]}else f=F(s,y),s=s[y];f&&!a&&(D[i]=s)}}return s}},1064:(t,e,r)=>{"use strict";var o=r(9612);t.exports=o.getPrototypeOf||null},8648:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:(t,e,r)=>{"use strict";var o=r(8648),n=r(1064),i=r(7176);t.exports=o?function(t){return o(t)}:n?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return n(t)}:i?function(t){return i(t)}:null},6549:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},5795:(t,e,r)=>{"use strict";var o=r(6549);if(o)try{o([],"length")}catch(t){o=null}t.exports=o},4039:(t,e,r)=>{"use strict";var o="undefined"!=typeof Symbol&&Symbol,n=r(1333);t.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&n()}},1333:t=>{"use strict";t.exports=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(var o 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 i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9957:(t,e,r)=>{"use strict";var o=Function.prototype.call,n=Object.prototype.hasOwnProperty,i=r(6743);t.exports=i.call(o,n)},1514:t=>{"use strict";t.exports=Math.abs},8968:t=>{"use strict";t.exports=Math.floor},4459:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188:t=>{"use strict";t.exports=Math.max},8002:t=>{"use strict";t.exports=Math.min},5880:t=>{"use strict";t.exports=Math.pow},414:t=>{"use strict";t.exports=Math.round},3093:(t,e,r)=>{"use strict";var o=r(4459);t.exports=function(t){return o(t)||0===t?t:t<0?-1:1}},8859:(t,e,r)=>{var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=o&&n&&"function"==typeof n.get?n.get:null,s=o&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,_=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,O=Array.prototype.join,x=Array.prototype.slice,A=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,j=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function N(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var o=t<0?-A(-t):A(t);if(o!==t){var n=String(o),i=b.call(e,n.length+1);return w.call(n,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var U=r(2634),C=U.custom,L=z(C)?C:null,F={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function $(t,e,r){var o=r.quoteStyle||e,n=F[o];return n+t+n}function B(t){return w.call(String(t),/"/g,"&quot;")}function q(t){return!I||!("object"==typeof t&&(I in t||void 0!==t[I]))}function H(t){return"[object Array]"===J(t)&&q(t)}function W(t){return"[object RegExp]"===J(t)&&q(t)}function z(t){if(k)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}t.exports=function t(e,o,n,a){var c=o||{};if(K(c,"quoteStyle")&&!K(F,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=!K(c,"customInspect")||c.customInspect;if("boolean"!=typeof d&&"symbol"!==d)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=c.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 Q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return v?N(e,S):S}if("bigint"==typeof e){var A=String(e)+"n";return v?N(e,A):A}var j=void 0===c.depth?5:c.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return H(e)?"[Array]":"[Object]";var C,M=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=O.call(Array(t.indent+1)," ")}return{base:r,prev:O.call(Array(e+1),r)}}(c,n);if(void 0===a)a=[];else if(V(a,e)>=0)return"[Circular]";function G(e,r,o){if(r&&(a=x.call(a)).push(r),o){var i={depth:c.depth};return K(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,n+1,a)}return t(e,c,n+1,a)}if("function"==typeof e&&!W(e)){var X=function(t){if(t.name)return t.name;var e=g.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),ot=rt(e,G);return"[Function"+(X?": "+X:" (anonymous)")+"]"+(ot.length>0?" { "+O.call(ot,", ")+" }":"")}if(z(e)){var nt=k?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(e);return"object"!=typeof e||k?nt:Y(nt)}if((C=e)&&"object"==typeof C&&("undefined"!=typeof HTMLElement&&C instanceof HTMLElement||"string"==typeof C.nodeName&&"function"==typeof C.getAttribute)){for(var it="<"+_.call(String(e.nodeName)),st=e.attributes||[],at=0;at<st.length;at++)it+=" "+st[at].name+"="+$(B(st[at].value),"double",c);return it+=">",e.childNodes&&e.childNodes.length&&(it+="..."),it+"</"+_.call(String(e.nodeName))+">"}if(H(e)){if(0===e.length)return"[]";var ct=rt(e,G);return M&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(ct)?"["+et(ct,M)+"]":"[ "+O.call(ct,", ")+" ]"}if(function(t){return"[object Error]"===J(t)&&q(t)}(e)){var pt=rt(e,G);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===pt.length?"["+String(e)+"]":"{ ["+String(e)+"] "+O.call(pt,", ")+" }":"{ ["+String(e)+"] "+O.call(E.call("[cause]: "+G(e.cause),pt),", ")+" }"}if("object"==typeof e&&d){if(L&&"function"==typeof e[L]&&U)return U(e,{depth:j-n});if("symbol"!==d&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{p.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ut=[];return s&&s.call(e,(function(t,r){ut.push(G(r,e,!0)+" => "+G(t,e))})),tt("Map",i.call(e),ut,M)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var lt=[];return u&&u.call(e,(function(t){lt.push(G(t,e))})),tt("Set",p.call(e),lt,M)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Z("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Z("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Z("WeakRef");if(function(t){return"[object Number]"===J(t)&&q(t)}(e))return Y(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return Y(G(T.call(e)));if(function(t){return"[object Boolean]"===J(t)&&q(t)}(e))return Y(h.call(e));if(function(t){return"[object String]"===J(t)&&q(t)}(e))return Y(G(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==r.g&&e===r.g)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===J(t)&&q(t)}(e)&&!W(e)){var ft=rt(e,G),yt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",dt=!yt&&I&&Object(e)===e&&I in e?b.call(J(e),8,-1):ht?"Object":"",mt=(yt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||ht?"["+O.call(E.call([],dt||[],ht||[]),": ")+"] ":"");return 0===ft.length?mt+"{}":M?mt+"{"+et(ft,M)+"}":mt+"{ "+O.call(ft,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return G.call(t,e)}function J(t){return d.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function Q(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return Q(b.call(t,0,e.maxStringLength),e)+o}var n=M[e.quoteStyle||"single"];return n.lastIndex=0,$(w.call(w.call(t,n,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(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":"")+v.call(e.toString(16))}function Y(t){return"Object("+t+")"}function Z(t){return t+" { ? }"}function tt(t,e,r,o){return t+" ("+e+") {"+(o?et(r,o):O.call(r,", "))+"}"}function et(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+O.call(t,","+r)+"\n"+e.prev}function rt(t,e){var r=H(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=K(t,n)?e(t[n],t):""}var i,s="function"==typeof j?j(t):[];if(k){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in t)K(t,c)&&(r&&String(Number(c))===c&&c<t.length||k&&i["$"+c]instanceof Symbol||(S.call(/[^\w$]/,c)?o.push(e(c,t)+": "+e(t[c],t)):o.push(c+": "+e(t[c],t))));if("function"==typeof j)for(var p=0;p<s.length;p++)R.call(t,s[p])&&o.push("["+e(s[p])+"]: "+e(t[s[p]],t));return o}},4765:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:o}},5373:(t,e,r)=>{"use strict";var o=r(8636),n=r(2642),i=r(4765);t.exports={formats:i,parse:n,stringify:o}},2642:(t,e,r)=>{"use strict";var o=r(7720),n=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},c=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},p=function(t,e,r,i){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,p=r.depth>0&&/(\[[^[\]]*])/.exec(s),u=p?s.slice(0,p.index):s,l=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(p=a.exec(s))&&f<r.depth;){if(f+=1,!r.plainObjects&&n.call(Object.prototype,p[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(p[1])}if(p){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");l.push("["+s.slice(p.index)+"]")}return function(t,e,r,n){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var a=n?e:c(e,r,i),p=t.length-1;p>=0;--p){var u,l=t[p];if("[]"===l&&r.parseArrays)u=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:o.combine([],a);else{u=r.plainObjects?{__proto__:null}:{};var f="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,y=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,h=parseInt(y,10);r.parseArrays||""!==y?!isNaN(h)&&l!==y&&String(h)===y&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(u=[])[h]=a:"__proto__"!==y&&(u[y]=a):u={0:a}}a=u}return a}(l,e,r,i)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?s.charset:t.charset,r=void 0===t.duplicates?s.duplicates:t.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||s.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||o.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:s.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return r.plainObjects?{__proto__:null}:{};for(var u="string"==typeof t?function(t,e){var r={__proto__:null},p=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=e.parameterLimit===1/0?void 0:e.parameterLimit,l=p.split(e.delimiter,e.throwOnLimitExceeded?u+1:u);if(e.throwOnLimitExceeded&&l.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var f,y=-1,h=e.charset;if(e.charsetSentinel)for(f=0;f<l.length;++f)0===l[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[f]?h="utf-8":"utf8=%26%2310003%3B"===l[f]&&(h="iso-8859-1"),y=f,f=l.length);for(f=0;f<l.length;++f)if(f!==y){var d,m,g=l[f],b=g.indexOf("]="),w=-1===b?g.indexOf("="):b+1;-1===w?(d=e.decoder(g,s.decoder,h,"key"),m=e.strictNullHandling?null:""):(d=e.decoder(g.slice(0,w),s.decoder,h,"key"),m=o.maybeMap(c(g.slice(w+1),e,i(r[d])?r[d].length:0),(function(t){return e.decoder(t,s.decoder,h,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===h&&(m=a(String(m))),g.indexOf("[]=")>-1&&(m=i(m)?[m]:m);var v=n.call(r,d);v&&"combine"===e.duplicates?r[d]=o.combine(r[d],m):v&&"last"!==e.duplicates||(r[d]=m)}return r}(t,r):t,l=r.plainObjects?{__proto__:null}:{},f=Object.keys(u),y=0;y<f.length;++y){var h=f[y],d=p(h,u[h],r,"string"==typeof t);l=o.merge(l,d,r)}return!0===r.allowSparse?l:o.compact(l)}},8636:(t,e,r)=>{"use strict";var o=r(920),n=r(7720),i=r(4765),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,p=Array.prototype.push,u=function(t,e){p.apply(t,c(e)?e:[e])},l=Date.prototype.toISOString,f=i.default,y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,filter:void 0,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},h={},d=function t(e,r,i,s,a,p,l,f,d,m,g,b,w,v,_,S,E,O){for(var x,A=e,T=O,j=0,P=!1;void 0!==(T=T.get(h))&&!P;){var k=T.get(e);if(j+=1,void 0!==k){if(k===j)throw new RangeError("Cyclic object value");P=!0}void 0===T.get(h)&&(j=0)}if("function"==typeof m?A=m(r,A):A instanceof Date?A=w(A):"comma"===i&&c(A)&&(A=n.maybeMap(A,(function(t){return t instanceof Date?w(t):t}))),null===A){if(p)return d&&!S?d(r,y.encoder,E,"key",v):r;A=""}if("string"==typeof(x=A)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||n.isBuffer(A))return d?[_(S?r:d(r,y.encoder,E,"key",v))+"="+_(d(A,y.encoder,E,"value",v))]:[_(r)+"="+_(String(A))];var I,R=[];if(void 0===A)return R;if("comma"===i&&c(A))S&&d&&(A=n.maybeMap(A,d)),I=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(m))I=m;else{var D=Object.keys(A);I=g?D.sort(g):D}var N=f?String(r).replace(/\./g,"%2E"):String(r),U=s&&c(A)&&1===A.length?N+"[]":N;if(a&&c(A)&&0===A.length)return U+"[]";for(var C=0;C<I.length;++C){var L=I[C],F="object"==typeof L&&L&&void 0!==L.value?L.value:A[L];if(!l||null!==F){var M=b&&f?String(L).replace(/\./g,"%2E"):String(L),$=c(A)?"function"==typeof i?i(U,M):U:U+(b?"."+M:"["+M+"]");O.set(e,j);var B=o();B.set(h,O),u(R,t(F,$,i,s,a,p,l,f,"comma"===i&&S&&c(A)?null:d,m,g,b,w,v,_,S,E,B))}}return R};t.exports=function(t,e){var r,n=t,p=function(t){if(!t)return y;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||y.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=i.default;if(void 0!==t.format){if(!s.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o,n=i.formatters[r],p=y.filter;if(("function"==typeof t.filter||c(t.filter))&&(p=t.filter),o=t.arrayFormat in a?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":y.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===t.allowDots?!0===t.encodeDotInKeys||y.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:y.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:y.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:y.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?y.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:y.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:y.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:y.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:y.encodeValuesOnly,filter:p,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:y.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:y.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:y.strictNullHandling}}(e);"function"==typeof p.filter?n=(0,p.filter)("",n):c(p.filter)&&(r=p.filter);var l=[];if("object"!=typeof n||null===n)return"";var f=a[p.arrayFormat],h="comma"===f&&p.commaRoundTrip;r||(r=Object.keys(n)),p.sort&&r.sort(p.sort);for(var m=o(),g=0;g<r.length;++g){var b=r[g],w=n[b];p.skipNulls&&null===w||u(l,d(w,b,f,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,m))}var v=l.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""}},7720:(t,e,r)=>{"use strict";var o=r(4765),n=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r},c=1024;t.exports={arrayToObject:a,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=[],o=0;o<e.length;++o)for(var n=e[o],s=n.obj[n.prop],a=Object.keys(s),c=0;c<a.length;++c){var p=a[c],u=s[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:s,prop:p}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(t){return o}},encode:function(t,e,r,n,i){if(0===t.length)return t;var a=t;if("symbol"==typeof t?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var p="",u=0;u<a.length;u+=c){for(var l=a.length>=c?a.slice(u,u+c):a,f=[],y=0;y<l.length;++y){var h=l.charCodeAt(y);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===o.RFC1738&&(40===h||41===h)?f[f.length]=l.charAt(y):h<128?f[f.length]=s[h]:h<2048?f[f.length]=s[192|h>>6]+s[128|63&h]:h<55296||h>=57344?f[f.length]=s[224|h>>12]+s[128|h>>6&63]+s[128|63&h]:(y+=1,h=65536+((1023&h)<<10|1023&l.charCodeAt(y)),f[f.length]=s[240|h>>18]+s[128|h>>12&63]+s[128|h>>6&63]+s[128|63&h])}p+=f.join("")}return p},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(i(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r&&"function"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var s=e;return i(e)&&!i(r)&&(s=a(e,o)),i(e)&&i(r)?(r.forEach((function(r,i){if(n.call(e,i)){var s=e[i];s&&"object"==typeof s&&r&&"object"==typeof r?e[i]=t(s,r,o):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var s=r[i];return n.call(e,i)?e[i]=t(e[i],s,o):e[i]=s,e}),s)}}},4803:(t,e,r)=>{"use strict";var o=r(8859),n=r(9675),i=function(t,e,r){for(var o,n=t;null!=(o=n.next);n=o)if(o.key===e)return n.next=o.next,r||(o.next=t.next,t.next=o),o};t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+o(t))},delete:function(e){var r=t&&t.next,o=function(t,e){if(t)return i(t,e,!0)}(t,e);return o&&r&&r===o&&(t=void 0),!!o},get:function(e){return function(t,e){if(t){var r=i(t,e);return r&&r.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!i(t,e)}(t,e)},set:function(e,r){t||(t={next:void 0}),function(t,e,r){var o=i(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(t,e,r)}};return e}},507:(t,e,r)=>{"use strict";var o=r(453),n=r(6556),i=r(8859),s=r(9675),a=o("%Map%",!0),c=n("Map.prototype.get",!0),p=n("Map.prototype.set",!0),u=n("Map.prototype.has",!0),l=n("Map.prototype.delete",!0),f=n("Map.prototype.size",!0);t.exports=!!a&&function(){var t,e={assert:function(t){if(!e.has(t))throw new s("Side channel does not contain "+i(t))},delete:function(e){if(t){var r=l(t,e);return 0===f(t)&&(t=void 0),r}return!1},get:function(e){if(t)return c(t,e)},has:function(e){return!!t&&u(t,e)},set:function(e,r){t||(t=new a),p(t,e,r)}};return e}},2271:(t,e,r)=>{"use strict";var o=r(453),n=r(6556),i=r(8859),s=r(507),a=r(9675),c=o("%WeakMap%",!0),p=n("WeakMap.prototype.get",!0),u=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("WeakMap.prototype.delete",!0);t.exports=c?function(){var t,e,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+i(t))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(t)return f(t,r)}else if(s&&e)return e.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&t?p(t,r):e&&e.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&t?l(t,r):!!e&&e.has(r)},set:function(r,o){c&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new c),u(t,r,o)):s&&(e||(e=s()),e.set(r,o))}};return r}:s},920:(t,e,r)=>{"use strict";var o=r(9675),n=r(8859),i=r(4803),s=r(507),a=r(2271)||s||i;t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+n(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,r){t||(t=a()),t.set(e,r)}};return e}},1380:t=>{"use strict";const e=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];class r{constructor(){this._defaults=[]}_setDefaults(t){for(const e of this._defaults)t[e.fn](...e.args)}}for(const t of e)r.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return this._defaults.push({fn:t,args:r}),this};t.exports=r},5734:(t,e,r)=>{"use strict";let o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;const n=r(5971),i=r(8463),s=r(5373),a=r(1948),{isObject:c,mixin:p,hasOwn:u}=r(3048),l=r(9450),f=r(1380);function y(){}t.exports=function(t,r){return"function"==typeof r?new e.Request("GET",t).end(r):1===arguments.length?new e.Request("GET",t):new e.Request(t,r)};const h=e=t.exports;e.Request=_,h.getXHR=()=>{if(o.XMLHttpRequest)return new o.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const d="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function m(t){if(!c(t))return t;const e=[];for(const r in t)u(t,r)&&g(e,r,t[r]);return e.join("&")}function g(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))for(const o of r)g(t,e,o);else if(c(r))for(const o in r)u(r,o)&&g(t,`${e}[${o}]`,r[o]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function b(t){const e={},r=t.split("&");let o,n;for(let t=0,i=r.length;t<i;++t)o=r[t],n=o.indexOf("="),-1===n?e[decodeURIComponent(o)]="":e[decodeURIComponent(o.slice(0,n))]=decodeURIComponent(o.slice(n+1));return e}function w(t){return/[/+]json($|[^-\w])/i.test(t)}function v(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let{status:e}=this.xhr;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){const e=t.split(/\r?\n/),r={};let o,n,i,s;for(let t=0,a=e.length;t<a;++t)n=e[t],o=n.indexOf(":"),-1!==o&&(i=n.slice(0,o).toLowerCase(),s=d(n.slice(o+1)),r[i]=s);return r}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function _(t,e){const r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(()=>{let t,e=null,o=null;try{o=new v(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",o);try{r._isResponseOK(o)||(t=new Error(o.statusText||o.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=o,t.status=t.status||o.status,r.callback(t,o)):r.callback(null,o)}))}h.serializeObject=m,h.parseString=b,h.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},h.serialize={"application/x-www-form-urlencoded":t=>s.stringify(t,{indices:!1,strictNullHandling:!0}),"application/json":i},h.parse={"application/x-www-form-urlencoded":b,"application/json":JSON.parse},p(v.prototype,l.prototype),v.prototype._parseBody=function(t){let e=h.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&w(this.type)&&(e=h.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},v.prototype.toError=function(){const{req:t}=this,{method:e}=t,{url:r}=t,o=`cannot ${e} ${r} (${this.status})`,n=new Error(o);return n.status=this.status,n.method=e,n.url=r,n},h.Response=v,n(_.prototype),p(_.prototype,a.prototype),_.prototype.type=function(t){return this.set("Content-Type",h.types[t]||t),this},_.prototype.accept=function(t){return this.set("Accept",h.types[t]||t),this},_.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});const o=r.encoder?r.encoder:t=>{if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,o)},_.prototype.query=function(t){return"string"!=typeof t&&(t=m(t)),t&&this._query.push(t),this},_.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},_.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},_.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();const r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},_.prototype.crossDomainError=function(){const t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},_.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},_.prototype.ca=_.prototype.agent,_.prototype.buffer=_.prototype.ca,_.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},_.prototype.pipe=_.prototype.write,_.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},_.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||y,this._finalizeQueryString(),this._end()},_.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},_.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const t=this;this.xhr=h.getXHR();const{xhr:e}=this;let r=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",(()=>{const{readyState:r}=e;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!==r)return;let o;try{o=e.status}catch(t){o=0}if(!o){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}));const o=(e,r)=>{r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",o.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",o.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){const t=this._header["content-type"];let e=this._serializer||h.serialize[t?t.split(";")[0]:""];!e&&w(t)&&(e=h.serialize["application/json"]),e&&(r=e(r))}for(const t in this.header)null!==this.header[t]&&u(this.header,t)&&e.setRequestHeader(t,this.header[t]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},h.agent=()=>new f;for(const t of["GET","POST","OPTIONS","PATCH","PUT","DELETE"])f.prototype[t.toLowerCase()]=function(e,r){const o=new h.Request(t,e);return this._setDefaults(o),r&&o.end(r),o};function S(t,e,r){const o=h("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}f.prototype.del=f.prototype.delete,h.get=(t,e,r)=>{const o=h("GET",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},h.head=(t,e,r)=>{const o=h("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},h.options=(t,e,r)=>{const o=h("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.del=S,h.delete=S,h.patch=(t,e,r)=>{const o=h("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.post=(t,e,r)=>{const o=h("POST",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.put=(t,e,r)=>{const o=h("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}},1948:(t,e,r)=>{"use strict";const{isObject:o,hasOwn:n}=r(3048);function i(){}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(const e in t)if(n(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};const s=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),a=new Set([408,413,429,500,502,503,504,521,522,524]);i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&a.has(e.status))return!0;if(t){if(t.code&&s.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){if(!this._fullfilledPromise){const t=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(((e,r)=>{t.on("abort",(()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void r(this.timedoutError);const t=new Error("Aborted");t.code="ABORTED",t.status=this.status,t.method=this.method,t.url=this.url,r(t)})),t.end(((t,o)=>{t?r(t):e(o)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(const e in t)n(t,e)&&this.set(e,t[e]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e,r){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(const e in t)n(t,e)&&this.field(e,t[e]);return this}if(Array.isArray(e)){for(const r in e)n(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),r?this._getFormData().append(t,e,r):this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,r,o){switch(r.type){case"basic":this.set("Authorization",`Basic ${o(`${t}:${e}`)}`);break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization",`Bearer ${t}`)}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){const e=o(t);let r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(const e in t){if("bigint"==typeof t[e]&&!t[e].toJSON)throw new Error("Cannot serialize BigInt value to json");n(t,e)&&(this._data[e]=t[e])}else{if("bigint"==typeof t)throw new Error("Cannot send value of type BigInt");"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],r&&(r=r.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===r?this._data?`${this._data}&${t}`:t:(this._data||"")+t):this._data=t}return!e||this._isHost(t)||r||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){const t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){const t=this.url.indexOf("?");if(t>=0){const e=this.url.slice(t+1).split("&");"function"==typeof this._sort?e.sort(this._sort):e.sort(),this.url=this.url.slice(0,t)+"?"+e.join("&")}}},i.prototype._appendQueryString=()=>{console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(this._aborted)return;const o=new Error(`${t+e}ms exceeded`);o.timeout=e,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.timedoutError=o,this.abort(),this.callback(o)},i.prototype._setTimeouts=function(){const t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((()=>{t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((()=>{t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},9450:(t,e,r)=>{"use strict";const o=r(3048);function n(){}t.exports=n,n.prototype.get=function(t){return this.header[t.toLowerCase()]},n.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=o.type(e);const r=o.params(e);for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(this[t]=r[t]);this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},n.prototype._setStatusProperties=function(t){const e=Math.trunc(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},3048:(t,e)=>{"use strict";e.type=t=>t.split(/ *; */).shift(),e.params=t=>{const e={};for(const r of t.split(/ *; */)){const t=r.split(/ *= */),o=t.shift(),n=t.shift();o&&n&&(e[o]=n)}return e},e.parseLinks=t=>{const e={};for(const r of t.split(/ *, */)){const t=r.split(/ *; */),o=t[0].slice(1,-1);e[t[1].split(/ *= */)[1].slice(1,-1)]=o}return e},e.cleanHeader=(t,e)=>(delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t),e.normalizeHostname=t=>{const[,e]=t.match(/^\[([^\]]+)\]$/)||[];return e||t},e.isObject=t=>null!==t&&"object"==typeof t,e.hasOwn=Object.hasOwn||function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(t),e)},e.mixin=(t,r)=>{for(const o in r)e.hasOwn(r,o)&&(t[o]=r[o])},e.isGzipOrDeflateEncoding=t=>new RegExp(/^\s*(?:deflate|gzip)\s*$/).test(t.headers["content-encoding"]),e.isBrotliEncoding=t=>new RegExp(/^\s*(?:br)\s*$/).test(t.headers["content-encoding"])},2634:()=>{}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{GenesysCloudClientAuthenticator:()=>b,TimeoutError:()=>l,VERSION:()=>p,authenticatorFactory:()=>_,default:()=>S,handleRedirectFromLogin:()=>w,isIssuedTimeWithinTimeframe:()=>d,isIssuedTimeWithinWindow:()=>m,parseOauthParams:()=>y,tokenWasIssuedAt:()=>g}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var t=r(5734),e=r.n(t);const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const s=new Uint8Array(16),a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const o=(t=t||{}).random??t.rng?.()??function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(s)}();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=o[t];return e}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(o)},p="1.0.0",u="color: #f29f2c";class l extends Error{constructor(){super(...arguments),this.name="TIMEOUT_ERROR"}}class f extends Error{constructor(t,e){const r=e&&e instanceof Error;super(r?e.message:e),r&&(this.name=e.name),this.translationKey=t}}const y=(t=window.location.hash)=>{const e={},r={},o=new RegExp("^#*(.+?)=(.+?)$","i");if(t.split("&").forEach((t=>{const r=o.exec(t);r&&(e[r[1]]=decodeURIComponent(decodeURIComponent(r[2].replace(/\+/g,"%20"))))})),e.error)return e;if(e.access_token){if(e.state&&(r.state=e.state),e.expires_in){const t=1e3*parseInt(e.expires_in.replace(/\+/g,"%20"));r.tokenExpiryTime=Date.now()+t,r.tokenExpiryTimeString=new Date(r.tokenExpiryTime).toISOString()}r.accessToken=e.access_token.replace(/\+/g,"%20")}return r},h=(t,e)=>{e?(console.log(`%c [DEBUG:gc-client-auth:${p}] ${t}`,u,e),"object"==typeof e&&console.log(`%c [DEBUG:gc-client-auth:${p}] ^ stringified: ${JSON.stringify(e)}`,u)):console.log(`%c [DEBUG:gc-client-auth:${p}] ${t}`,u)},d=(t,e=691199e3,r=168e4,o=Date.now())=>o-g(t,e)<r,m=(t,e,r)=>d(t,e,r),g=(t,e)=>t-e;class b{constructor(t,e={}){this.VERSION=p,this.customHeaders={},this.clientId=t,e.storageKey||(e.storageKey="gc_client_auth_data"),"boolean"!=typeof e.persist&&(e.persist=!1),this.config=Object.assign({},e),this.customHeaders=e.customHeaders||{},this.setEnvironment(e.environment),this.timeout=16e3,this.authData={},this.authentications={"PureCloud OAuth":{type:"oauth2"}};try{localStorage.setItem("genesys_cloud_local_storage_test","genesys_cloud_local_storage_test"),localStorage.removeItem("genesys_cloud_local_storage_test"),this.hasLocalStorage=!0}catch(t){this.hasLocalStorage=!1}this._loadSettings()}loginImplicitGrant(t={},e){const r=e||y();return new Promise(((e,o)=>{t.org&&!t.provider?o(new Error("opts.provider must be set if opts.org is set")):t.provider&&!t.org?o(new Error("opts.org must be set if opts.provider is set")):t.redirectUri||t.usePopupAuth||o(new Error("redirectUri must be provided for implicit grant and not utilizing client-auth app for popup auth")),r&&r.error&&(r.accessToken=void 0,this._saveSettings(r),o(new Error(`[${r.error}] ${r.error_description}`))),r.accessToken&&this._saveSettings(r),this._testTokenAccess().then((()=>(!this.authData.state&&t.state&&(this.authData.state=t.state),e(this.authData)))).catch((r=>{this._debug("Error encountered during login. This is normal if the application has not yet been authorized.",r);const n={client_id:encodeURIComponent(this.clientId),response_type:"token"};if(t.redirectUri&&(n.redirect_uri=encodeURIComponent(t.redirectUri)),t.state&&(n.state=encodeURIComponent(t.state)),t.org&&(n.org=encodeURIComponent(t.org)),t.provider&&(n.provider=encodeURIComponent(t.provider)),t.usePopupAuth){if(!this.hasLocalStorage)return o(new Error("localStorage is unavailable. Cannot authenticate via popup window."));this._debug("using popup auth – adding listener"),this._authenticateViaPopup(n,t.popupTimeout||15e3).then((t=>{this._saveSettings(t),e(t)})).catch(o)}else{const t=this._buildAuthUrl("oauth/authorize",n);this._debug("Implicit grant: redirecting to: "+t),window.location.replace(t),o(new Error(`Routing to login: "${t}"`))}}))}))}setEnvironment(t){t||(t="mypurecloud.com"),(t=t.replace(/\/+$/,"")).startsWith("https://")&&(t=t.substring(8)),t.startsWith("http://")&&(t=t.substring(7)),t.startsWith("api.")&&(t=t.substring(4)),this.environment=t,this.basePath=`https://api.${t}`,this.authUrl=`https://login.${t}`}clearAuthData(){this._saveSettings({accessToken:void 0,state:void 0,tokenExpiryTime:void 0,tokenExpiryTimeString:void 0})}logout(t){this.clearAuthData();const e={client_id:encodeURIComponent(this.clientId)};t&&(e.redirect_uri=encodeURIComponent(t));const r=this._buildAuthUrl("logout",e);window.location.replace(r)}setAccessToken(t){this._saveSettings({accessToken:t})}testAccessToken(t){return this.callApi("/api/v2/tokens/me","get",t)}parseDate(t){return new Date(t.replace(/T/i," "))}paramToString(t){return t?t instanceof Date?t.toJSON():t.toString():""}buildUrl(t,e={}){return t.match(/^\//)||(t=`/${t}`),(this.basePath+t).replace(/\{([\w-]+)\}/g,((t,r)=>{let o;return o=Object.getOwnPropertyDescriptor(e,r)?this.paramToString(e[r]):t,encodeURIComponent(o)}))}callApi(t,r,o){var n;const i=this.buildUrl(t);let s=e()[r](i).type("application/json").timeout(this.timeout).set("Authorization",`Bearer ${o||(null===(n=this.authData)||void 0===n?void 0:n.accessToken)}`);return this.customHeaders&&Object.entries(this.customHeaders).forEach((([t,e])=>{s=s.set(t,e)})),s.send()}_debug(t,e){this.config.debugMode&&h(t,e)}_saveSettings(t){try{if(this.authData.accessToken=t.accessToken,this.authentications["PureCloud OAuth"].accessToken=t.accessToken,t.state&&(this.authData.state=t.state),this.authData.error=t.error,this.authData.error_description=t.error_description,t.tokenExpiryTime&&(this.authData.tokenExpiryTime=t.tokenExpiryTime,this.authData.tokenExpiryTimeString=t.tokenExpiryTimeString),!this.config.persist)return void this._debug("persist is not true. Settings will not be saved.");if(!this.hasLocalStorage)return void this._debug("Warning: Cannot access local storage. Settings will not be saved.");const e=JSON.parse(JSON.stringify(this.authData));delete e.state,localStorage.setItem(this.config.storageKey,JSON.stringify(e)),this._debug("Auth data saved to local storage",e)}catch(t){console.error(t)}}_getId(t){return`gc-ca_${t=t||c()}`}_authenticateViaPopup(t,e){const r=this._getId(),o=Object.assign(Object.assign({},t),{storageKey:this.config.storageKey});this.config.debugMode&&(o.debug=!0),localStorage.setItem(r,JSON.stringify(o)),t.state=r,t.redirect_uri||(t.redirect_uri=encodeURIComponent(`https://apps.${this.environment}/client-auth`));const n=this._buildAuthUrl("oauth/authorize",t);return new Promise(((o,i)=>{this._debug("Implicit grant: opening new window: "+n),window.open(n,"_blank","width=500px,height=500px,noreferrer,noopener,resizable,scrollbars,status");const s=setTimeout((()=>{this._debug("timeout for loginImplicitGrant using popup",t);const e=new l("Popup authentation timeout. It is possible that the popup was blocked or the login page encountered an error");i(e)}),e),a=t=>{if(this._debug("value was just written to storage by another app",{key:t.key,newValue:t.newValue,oldValue:t.oldValue}),t.key===this.config.storageKey){this._debug("keys matched. resolving value",{key:t.key,value:t.newValue}),window.removeEventListener("storage",a),clearTimeout(s);const e=JSON.parse(t.newValue);localStorage.removeItem(r),o(e)}};window.addEventListener("storage",a)}))}_testTokenAccess(){return t=this,e=void 0,o=function*(){if(this._loadSettings(),!this.authentications["PureCloud OAuth"].accessToken)throw new f("errorTokenNotSet","No access token provided.");try{yield this.callApi("/api/v2/tokens/me","get")}catch(t){throw this._saveSettings({accessToken:void 0}),t}},new((r=void 0)||(r=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}));var t,e,r,o}_loadSettings(){if(!this.config.persist)return;if(!this.hasLocalStorage)return void this._debug("Warning: Cannot access local storage. Settings will not be loaded.");const t=this.authData.state,e=localStorage.getItem(this.config.storageKey);this.authData=e?JSON.parse(e):{},this.authData.accessToken&&this.setAccessToken(this.authData.accessToken),this.authData.state=t}_buildAuthUrl(t,e={}){return Object.keys(e).reduce(((t,r)=>e[r]?`${t}&${r}=${e[r]}`:t),`${this.authUrl}/${t}?`)}}const w=()=>{const t=y();if(t.error)throw new Error(`[${t.error}]: ${t.error_description}`);if(!t.accessToken)throw new f("errorToken","No access token provided.");const e=t.state;if(!e)throw new f("errorStateParam","No state param on redirect. Unable to determine location to save auth data.");const r=JSON.parse(localStorage.getItem(e)||"false");if(!r||!r.storageKey)throw new f("errorParse","Unable to parse information from localStorage.");r.state?t.state=r.state:delete t.state,h(`setting auth data to key: ${r.storageKey}`,t),localStorage.setItem(r.storageKey,JSON.stringify(t)),r.debug?h("In debug mode. Not closing window or removing storageId",{storageId:e,authData:t,href:window.location.href}):(h(`removing temp storage key: ${e}`),localStorage.removeItem(e),h("closing window"),window.close())},v=new Map,_=(t,e)=>{let r=v.get(t);return r||(r=new b(t,e),v.set(t,r)),r},S=_})(),window.GenesysCloudClientAuth=o})();
1
+ (()=>{var t={3144:(t,e,r)=>{"use strict";var o=r(6743),n=r(1002),i=r(76),s=r(7119);t.exports=s||o.call(i,n)},1002:t=>{"use strict";t.exports=Function.prototype.apply},76:t=>{"use strict";t.exports=Function.prototype.call},3126:(t,e,r)=>{"use strict";var o=r(6743),n=r(9675),i=r(76),s=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new n("a function is required");return s(o,i,t)}},7119:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},6556:(t,e,r)=>{"use strict";var o=r(453),n=r(3126),i=n([o("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=o(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?n([r]):r}},5971:t=>{function e(t){if(t)return function(t){for(var r in e.prototype)t[r]=e.prototype[r];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((r=o[n])===e||r.fn===e){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){o=0;for(var n=(r=r.slice(0)).length;o<n;++o)r[o].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7176:(t,e,r)=>{"use strict";var o,n=r(3126),i=r(5795);try{o=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!o&&i&&i(Object.prototype,"__proto__"),a=Object,c=a.getPrototypeOf;t.exports=s&&"function"==typeof s.get?n([s.get]):"function"==typeof c&&function(t){return c(null==t?t:a(t))}},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1237:t=>{"use strict";t.exports=EvalError},9383:t=>{"use strict";t.exports=Error},9290:t=>{"use strict";t.exports=RangeError},9538:t=>{"use strict";t.exports=ReferenceError},8068:t=>{"use strict";t.exports=SyntaxError},9675:t=>{"use strict";t.exports=TypeError},5345:t=>{"use strict";t.exports=URIError},9612:t=>{"use strict";t.exports=Object},8463:t=>{t.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var e="[...]",r="[Circular]",o=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var a;void 0===s&&(s=i()),c(t,"",0,[],void 0,0,s);try{a=0===n.length?JSON.stringify(t,e,r):JSON.stringify(t,f(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var p=o.pop();4===p.length?Object.defineProperty(p[0],p[1],p[3]):p[0][p[1]]=p[2]}}return a}function a(t,e,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:t}),o.push([i,r,e,s])):n.push([e,r,t]):(i[r]=t,o.push([i,r,e]))}function c(t,o,n,i,s,p,u){var l;if(p+=1,"object"==typeof t&&null!==t){for(l=0;l<i.length;l++)if(i[l]===t)return void a(r,t,o,s);if(void 0!==u.depthLimit&&p>u.depthLimit)return void a(e,t,o,s);if(void 0!==u.edgesLimit&&n+1>u.edgesLimit)return void a(e,t,o,s);if(i.push(t),Array.isArray(t))for(l=0;l<t.length;l++)c(t[l],l,l,i,t,p,u);else{var f=Object.keys(t);for(l=0;l<f.length;l++){var y=f[l];c(t[y],y,l,i,t,p,u)}}i.pop()}}function p(t,e){return t<e?-1:t>e?1:0}function u(t,e,r,s){void 0===s&&(s=i());var a,c=l(t,"",0,[],void 0,0,s)||t;try{a=0===n.length?JSON.stringify(c,e,r):JSON.stringify(c,f(e),r)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var p=o.pop();4===p.length?Object.defineProperty(p[0],p[1],p[3]):p[0][p[1]]=p[2]}}return a}function l(t,n,i,s,c,u,f){var y;if(u+=1,"object"==typeof t&&null!==t){for(y=0;y<s.length;y++)if(s[y]===t)return void a(r,t,n,c);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==f.depthLimit&&u>f.depthLimit)return void a(e,t,n,c);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void a(e,t,n,c);if(s.push(t),Array.isArray(t))for(y=0;y<t.length;y++)l(t[y],y,y,s,t,u,f);else{var h={},d=Object.keys(t).sort(p);for(y=0;y<d.length;y++){var m=d[y];l(t[m],m,y,s,t,u,f),h[m]=t[m]}if(void 0===c)return h;o.push([c,n,t]),c[n]=h}s.pop()}}function f(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(n.length>0)for(var o=0;o<n.length;o++){var i=n[o];if(i[1]===e&&i[0]===r){r=i[2],n.splice(o,1);break}}return t.call(this,e,r)}}},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,o=function(t,e){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var n=0;n<e.length;n+=1)r[n+t.length]=e[n];return r};t.exports=function(t){var n=this;if("function"!=typeof n||"[object Function]"!==e.apply(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,s=function(t){for(var e=[],r=1,o=0;r<t.length;r+=1,o+=1)e[o]=t[r];return e}(arguments),a=r(0,n.length-s.length),c=[],p=0;p<a;p++)c[p]="$"+p;if(i=Function("binder","return function ("+function(t){for(var e="",r=0;r<t.length;r+=1)e+=t[r],r+1<t.length&&(e+=",");return e}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var e=n.apply(this,o(s,arguments));return Object(e)===e?e:this}return n.apply(t,o(s,arguments))})),n.prototype){var u=function(){};u.prototype=n.prototype,i.prototype=new u,u.prototype=null}return i}},6743:(t,e,r)=>{"use strict";var o=r(9353);t.exports=Function.prototype.bind||o},453:(t,e,r)=>{"use strict";var o,n=r(9612),i=r(9383),s=r(1237),a=r(9290),c=r(9538),p=r(8068),u=r(9675),l=r(5345),f=r(1514),y=r(8968),h=r(6188),d=r(8002),m=r(5880),g=r(414),b=r(3093),w=Function,v=function(t){try{return w('"use strict"; return ('+t+").constructor;")()}catch(t){}},_=r(5795),S=r(655),E=function(){throw new u},O=_?function(){try{return E}catch(t){try{return _(arguments,"callee").get}catch(t){return E}}}():E,x=r(4039)(),A=r(3628),T=r(1064),j=r(8648),P=r(1002),k=r(76),I={},R="undefined"!=typeof Uint8Array&&A?A(Uint8Array):o,D={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":x&&A?A([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?o:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":I,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&A?A(A([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&x&&A?A((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":a,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&x&&A?A((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&A?A(""[Symbol.iterator]()):o,"%Symbol%":x?Symbol:o,"%SyntaxError%":p,"%ThrowTypeError%":O,"%TypedArray%":R,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":P,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":T,"%Math.abs%":f,"%Math.floor%":y,"%Math.max%":h,"%Math.min%":d,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":j};if(A)try{null.error}catch(t){var N=A(A(t));D["%Error.prototype%"]=N}var U=function t(e){var r;if("%AsyncFunction%"===e)r=v("async function () {}");else if("%GeneratorFunction%"===e)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=v("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&A&&(r=A(n.prototype))}return D[e]=r,r},C={__proto__:null,"%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"]},L=r(6743),F=r(9957),M=L.call(k,Array.prototype.concat),$=L.call(P,Array.prototype.splice),B=L.call(k,String.prototype.replace),q=L.call(k,String.prototype.slice),H=L.call(k,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,G=function(t,e){var r,o=t;if(F(C,o)&&(o="%"+(r=C[o])[0]+"%"),F(D,o)){var n=D[o];if(n===I&&(n=U(o)),void 0===n&&!e)throw new u("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:n}}throw new p("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new u('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,t))throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=q(t,0,1),r=q(t,-1);if("%"===e&&"%"!==r)throw new p("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new p("invalid intrinsic syntax, expected opening `%`");var o=[];return B(t,W,(function(t,e,r,n){o[o.length]=r?B(n,z,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=G("%"+o+"%",e),i=n.name,s=n.value,a=!1,c=n.alias;c&&(o=c[0],$(r,M([0,1],c)));for(var l=1,f=!0;l<r.length;l+=1){var y=r[l],h=q(y,0,1),d=q(y,-1);if(('"'===h||"'"===h||"`"===h||'"'===d||"'"===d||"`"===d)&&h!==d)throw new p("property names with quotes must have matching quotes");if("constructor"!==y&&f||(a=!0),F(D,i="%"+(o+="."+y)+"%"))s=D[i];else if(null!=s){if(!(y in s)){if(!e)throw new u("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=r.length){var m=_(s,y);s=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[y]}else f=F(s,y),s=s[y];f&&!a&&(D[i]=s)}}return s}},1064:(t,e,r)=>{"use strict";var o=r(9612);t.exports=o.getPrototypeOf||null},8648:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:(t,e,r)=>{"use strict";var o=r(8648),n=r(1064),i=r(7176);t.exports=o?function(t){return o(t)}:n?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return n(t)}:i?function(t){return i(t)}:null},6549:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},5795:(t,e,r)=>{"use strict";var o=r(6549);if(o)try{o([],"length")}catch(t){o=null}t.exports=o},4039:(t,e,r)=>{"use strict";var o="undefined"!=typeof Symbol&&Symbol,n=r(1333);t.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&n()}},1333:t=>{"use strict";t.exports=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(var o 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 i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9957:(t,e,r)=>{"use strict";var o=Function.prototype.call,n=Object.prototype.hasOwnProperty,i=r(6743);t.exports=i.call(o,n)},1514:t=>{"use strict";t.exports=Math.abs},8968:t=>{"use strict";t.exports=Math.floor},4459:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188:t=>{"use strict";t.exports=Math.max},8002:t=>{"use strict";t.exports=Math.min},5880:t=>{"use strict";t.exports=Math.pow},414:t=>{"use strict";t.exports=Math.round},3093:(t,e,r)=>{"use strict";var o=r(4459);t.exports=function(t){return o(t)||0===t?t:t<0?-1:1}},8859:(t,e,r)=>{var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=o&&n&&"function"==typeof n.get?n.get:null,s=o&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,p=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,d=Object.prototype.toString,m=Function.prototype.toString,g=String.prototype.match,b=String.prototype.slice,w=String.prototype.replace,v=String.prototype.toUpperCase,_=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,O=Array.prototype.join,x=Array.prototype.slice,A=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,j=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function N(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var o=t<0?-A(-t):A(t);if(o!==t){var n=String(o),i=b.call(e,n.length+1);return w.call(n,r,"$&_")+"."+w.call(w.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(e,r,"$&_")}var U=r(2634),C=U.custom,L=z(C)?C:null,F={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function $(t,e,r){var o=r.quoteStyle||e,n=F[o];return n+t+n}function B(t){return w.call(String(t),/"/g,"&quot;")}function q(t){return!I||!("object"==typeof t&&(I in t||void 0!==t[I]))}function H(t){return"[object Array]"===J(t)&&q(t)}function W(t){return"[object RegExp]"===J(t)&&q(t)}function z(t){if(k)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!P)return!1;try{return P.call(t),!0}catch(t){}return!1}t.exports=function t(e,o,n,a){var c=o||{};if(K(c,"quoteStyle")&&!K(F,c.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var d=!K(c,"customInspect")||c.customInspect;if("boolean"!=typeof d&&"symbol"!==d)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var v=c.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 Q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return v?N(e,S):S}if("bigint"==typeof e){var A=String(e)+"n";return v?N(e,A):A}var j=void 0===c.depth?5:c.depth;if(void 0===n&&(n=0),n>=j&&j>0&&"object"==typeof e)return H(e)?"[Array]":"[Object]";var C,M=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=O.call(Array(t.indent+1)," ")}return{base:r,prev:O.call(Array(e+1),r)}}(c,n);if(void 0===a)a=[];else if(V(a,e)>=0)return"[Circular]";function G(e,r,o){if(r&&(a=x.call(a)).push(r),o){var i={depth:c.depth};return K(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,n+1,a)}return t(e,c,n+1,a)}if("function"==typeof e&&!W(e)){var X=function(t){if(t.name)return t.name;var e=g.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),ot=rt(e,G);return"[Function"+(X?": "+X:" (anonymous)")+"]"+(ot.length>0?" { "+O.call(ot,", ")+" }":"")}if(z(e)){var nt=k?w.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(e);return"object"!=typeof e||k?nt:Y(nt)}if((C=e)&&"object"==typeof C&&("undefined"!=typeof HTMLElement&&C instanceof HTMLElement||"string"==typeof C.nodeName&&"function"==typeof C.getAttribute)){for(var it="<"+_.call(String(e.nodeName)),st=e.attributes||[],at=0;at<st.length;at++)it+=" "+st[at].name+"="+$(B(st[at].value),"double",c);return it+=">",e.childNodes&&e.childNodes.length&&(it+="..."),it+"</"+_.call(String(e.nodeName))+">"}if(H(e)){if(0===e.length)return"[]";var ct=rt(e,G);return M&&!function(t){for(var e=0;e<t.length;e++)if(V(t[e],"\n")>=0)return!1;return!0}(ct)?"["+et(ct,M)+"]":"[ "+O.call(ct,", ")+" ]"}if(function(t){return"[object Error]"===J(t)&&q(t)}(e)){var pt=rt(e,G);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===pt.length?"["+String(e)+"]":"{ ["+String(e)+"] "+O.call(pt,", ")+" }":"{ ["+String(e)+"] "+O.call(E.call("[cause]: "+G(e.cause),pt),", ")+" }"}if("object"==typeof e&&d){if(L&&"function"==typeof e[L]&&U)return U(e,{depth:j-n});if("symbol"!==d&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{p.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ut=[];return s&&s.call(e,(function(t,r){ut.push(G(r,e,!0)+" => "+G(t,e))})),tt("Map",i.call(e),ut,M)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var lt=[];return u&&u.call(e,(function(t){lt.push(G(t,e))})),tt("Set",p.call(e),lt,M)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Z("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Z("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Z("WeakRef");if(function(t){return"[object Number]"===J(t)&&q(t)}(e))return Y(G(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return Y(G(T.call(e)));if(function(t){return"[object Boolean]"===J(t)&&q(t)}(e))return Y(h.call(e));if(function(t){return"[object String]"===J(t)&&q(t)}(e))return Y(G(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==r.g&&e===r.g)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===J(t)&&q(t)}(e)&&!W(e)){var ft=rt(e,G),yt=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,ht=e instanceof Object?"":"null prototype",dt=!yt&&I&&Object(e)===e&&I in e?b.call(J(e),8,-1):ht?"Object":"",mt=(yt||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||ht?"["+O.call(E.call([],dt||[],ht||[]),": ")+"] ":"");return 0===ft.length?mt+"{}":M?mt+"{"+et(ft,M)+"}":mt+"{ "+O.call(ft,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function K(t,e){return G.call(t,e)}function J(t){return d.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function Q(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return Q(b.call(t,0,e.maxStringLength),e)+o}var n=M[e.quoteStyle||"single"];return n.lastIndex=0,$(w.call(w.call(t,n,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(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":"")+v.call(e.toString(16))}function Y(t){return"Object("+t+")"}function Z(t){return t+" { ? }"}function tt(t,e,r,o){return t+" ("+e+") {"+(o?et(r,o):O.call(r,", "))+"}"}function et(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+O.call(t,","+r)+"\n"+e.prev}function rt(t,e){var r=H(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=K(t,n)?e(t[n],t):""}var i,s="function"==typeof j?j(t):[];if(k){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in t)K(t,c)&&(r&&String(Number(c))===c&&c<t.length||k&&i["$"+c]instanceof Symbol||(S.call(/[^\w$]/,c)?o.push(e(c,t)+": "+e(t[c],t)):o.push(c+": "+e(t[c],t))));if("function"==typeof j)for(var p=0;p<s.length;p++)R.call(t,s[p])&&o.push("["+e(s[p])+"]: "+e(t[s[p]],t));return o}},4765:t=>{"use strict";var e=String.prototype.replace,r=/%20/g,o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return e.call(t,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:o}},5373:(t,e,r)=>{"use strict";var o=r(8636),n=r(2642),i=r(4765);t.exports={formats:i,parse:n,stringify:o}},2642:(t,e,r)=>{"use strict";var o=r(7720),n=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:o.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},c=function(t,e,r){if(t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},p=function(t,e,r,i){if(t){var s=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,p=r.depth>0&&/(\[[^[\]]*])/.exec(s),u=p?s.slice(0,p.index):s,l=[];if(u){if(!r.plainObjects&&n.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(p=a.exec(s))&&f<r.depth;){if(f+=1,!r.plainObjects&&n.call(Object.prototype,p[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(p[1])}if(p){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");l.push("["+s.slice(p.index)+"]")}return function(t,e,r,n){var i=0;if(t.length>0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");i=Array.isArray(e)&&e[s]?e[s].length:0}for(var a=n?e:c(e,r,i),p=t.length-1;p>=0;--p){var u,l=t[p];if("[]"===l&&r.parseArrays)u=r.allowEmptyArrays&&(""===a||r.strictNullHandling&&null===a)?[]:o.combine([],a);else{u=r.plainObjects?{__proto__:null}:{};var f="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,y=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,h=parseInt(y,10);r.parseArrays||""!==y?!isNaN(h)&&l!==y&&String(h)===y&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(u=[])[h]=a:"__proto__"!==y&&(u[y]=a):u={0:a}}a=u}return a}(l,e,r,i)}};t.exports=function(t,e){var r=function(t){if(!t)return s;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var e=void 0===t.charset?s.charset:t.charset,r=void 0===t.duplicates?s.duplicates:t.duplicates;if("combine"!==r&&"first"!==r&&"last"!==r)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||s.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||o.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,duplicates:r,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:s.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}}(e);if(""===t||null==t)return r.plainObjects?{__proto__:null}:{};for(var u="string"==typeof t?function(t,e){var r={__proto__:null},p=e.ignoreQueryPrefix?t.replace(/^\?/,""):t;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var u=e.parameterLimit===1/0?void 0:e.parameterLimit,l=p.split(e.delimiter,e.throwOnLimitExceeded?u+1:u);if(e.throwOnLimitExceeded&&l.length>u)throw new RangeError("Parameter limit exceeded. Only "+u+" parameter"+(1===u?"":"s")+" allowed.");var f,y=-1,h=e.charset;if(e.charsetSentinel)for(f=0;f<l.length;++f)0===l[f].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[f]?h="utf-8":"utf8=%26%2310003%3B"===l[f]&&(h="iso-8859-1"),y=f,f=l.length);for(f=0;f<l.length;++f)if(f!==y){var d,m,g=l[f],b=g.indexOf("]="),w=-1===b?g.indexOf("="):b+1;-1===w?(d=e.decoder(g,s.decoder,h,"key"),m=e.strictNullHandling?null:""):(d=e.decoder(g.slice(0,w),s.decoder,h,"key"),m=o.maybeMap(c(g.slice(w+1),e,i(r[d])?r[d].length:0),(function(t){return e.decoder(t,s.decoder,h,"value")}))),m&&e.interpretNumericEntities&&"iso-8859-1"===h&&(m=a(String(m))),g.indexOf("[]=")>-1&&(m=i(m)?[m]:m);var v=n.call(r,d);v&&"combine"===e.duplicates?r[d]=o.combine(r[d],m):v&&"last"!==e.duplicates||(r[d]=m)}return r}(t,r):t,l=r.plainObjects?{__proto__:null}:{},f=Object.keys(u),y=0;y<f.length;++y){var h=f[y],d=p(h,u[h],r,"string"==typeof t);l=o.merge(l,d,r)}return!0===r.allowSparse?l:o.compact(l)}},8636:(t,e,r)=>{"use strict";var o=r(920),n=r(7720),i=r(4765),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,p=Array.prototype.push,u=function(t,e){p.apply(t,c(e)?e:[e])},l=Date.prototype.toISOString,f=i.default,y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:n.encode,encodeValuesOnly:!1,filter:void 0,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(t){return l.call(t)},skipNulls:!1,strictNullHandling:!1},h={},d=function t(e,r,i,s,a,p,l,f,d,m,g,b,w,v,_,S,E,O){for(var x,A=e,T=O,j=0,P=!1;void 0!==(T=T.get(h))&&!P;){var k=T.get(e);if(j+=1,void 0!==k){if(k===j)throw new RangeError("Cyclic object value");P=!0}void 0===T.get(h)&&(j=0)}if("function"==typeof m?A=m(r,A):A instanceof Date?A=w(A):"comma"===i&&c(A)&&(A=n.maybeMap(A,(function(t){return t instanceof Date?w(t):t}))),null===A){if(p)return d&&!S?d(r,y.encoder,E,"key",v):r;A=""}if("string"==typeof(x=A)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||n.isBuffer(A))return d?[_(S?r:d(r,y.encoder,E,"key",v))+"="+_(d(A,y.encoder,E,"value",v))]:[_(r)+"="+_(String(A))];var I,R=[];if(void 0===A)return R;if("comma"===i&&c(A))S&&d&&(A=n.maybeMap(A,d)),I=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(m))I=m;else{var D=Object.keys(A);I=g?D.sort(g):D}var N=f?String(r).replace(/\./g,"%2E"):String(r),U=s&&c(A)&&1===A.length?N+"[]":N;if(a&&c(A)&&0===A.length)return U+"[]";for(var C=0;C<I.length;++C){var L=I[C],F="object"==typeof L&&L&&void 0!==L.value?L.value:A[L];if(!l||null!==F){var M=b&&f?String(L).replace(/\./g,"%2E"):String(L),$=c(A)?"function"==typeof i?i(U,M):U:U+(b?"."+M:"["+M+"]");O.set(e,j);var B=o();B.set(h,O),u(R,t(F,$,i,s,a,p,l,f,"comma"===i&&S&&c(A)?null:d,m,g,b,w,v,_,S,E,B))}}return R};t.exports=function(t,e){var r,n=t,p=function(t){if(!t)return y;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.encodeDotInKeys&&"boolean"!=typeof t.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||y.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=i.default;if(void 0!==t.format){if(!s.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o,n=i.formatters[r],p=y.filter;if(("function"==typeof t.filter||c(t.filter))&&(p=t.filter),o=t.arrayFormat in a?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":y.arrayFormat,"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===t.allowDots?!0===t.encodeDotInKeys||y.allowDots:!!t.allowDots;return{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:y.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:y.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:y.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:void 0===t.delimiter?y.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:y.encode,encodeDotInKeys:"boolean"==typeof t.encodeDotInKeys?t.encodeDotInKeys:y.encodeDotInKeys,encoder:"function"==typeof t.encoder?t.encoder:y.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:y.encodeValuesOnly,filter:p,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:y.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:y.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:y.strictNullHandling}}(e);"function"==typeof p.filter?n=(0,p.filter)("",n):c(p.filter)&&(r=p.filter);var l=[];if("object"!=typeof n||null===n)return"";var f=a[p.arrayFormat],h="comma"===f&&p.commaRoundTrip;r||(r=Object.keys(n)),p.sort&&r.sort(p.sort);for(var m=o(),g=0;g<r.length;++g){var b=r[g],w=n[b];p.skipNulls&&null===w||u(l,d(w,b,f,h,p.allowEmptyArrays,p.strictNullHandling,p.skipNulls,p.encodeDotInKeys,p.encode?p.encoder:null,p.filter,p.sort,p.allowDots,p.serializeDate,p.format,p.formatter,p.encodeValuesOnly,p.charset,m))}var v=l.join(p.delimiter),_=!0===p.addQueryPrefix?"?":"";return p.charsetSentinel&&("iso-8859-1"===p.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),v.length>0?_+v:""}},7720:(t,e,r)=>{"use strict";var o=r(4765),n=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r},c=1024;t.exports={arrayToObject:a,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=[],o=0;o<e.length;++o)for(var n=e[o],s=n.obj[n.prop],a=Object.keys(s),c=0;c<a.length;++c){var p=a[c],u=s[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:s,prop:p}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(i(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(t){return o}},encode:function(t,e,r,n,i){if(0===t.length)return t;var a=t;if("symbol"==typeof t?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var p="",u=0;u<a.length;u+=c){for(var l=a.length>=c?a.slice(u,u+c):a,f=[],y=0;y<l.length;++y){var h=l.charCodeAt(y);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===o.RFC1738&&(40===h||41===h)?f[f.length]=l.charAt(y):h<128?f[f.length]=s[h]:h<2048?f[f.length]=s[192|h>>6]+s[128|63&h]:h<55296||h>=57344?f[f.length]=s[224|h>>12]+s[128|h>>6&63]+s[128|63&h]:(y+=1,h=65536+((1023&h)<<10|1023&l.charCodeAt(y)),f[f.length]=s[240|h>>18]+s[128|h>>12&63]+s[128|h>>6&63]+s[128|63&h])}p+=f.join("")}return p},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(i(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r&&"function"!=typeof r){if(i(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!n.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var s=e;return i(e)&&!i(r)&&(s=a(e,o)),i(e)&&i(r)?(r.forEach((function(r,i){if(n.call(e,i)){var s=e[i];s&&"object"==typeof s&&r&&"object"==typeof r?e[i]=t(s,r,o):e.push(r)}else e[i]=r})),e):Object.keys(r).reduce((function(e,i){var s=r[i];return n.call(e,i)?e[i]=t(e[i],s,o):e[i]=s,e}),s)}}},4803:(t,e,r)=>{"use strict";var o=r(8859),n=r(9675),i=function(t,e,r){for(var o,n=t;null!=(o=n.next);n=o)if(o.key===e)return n.next=o.next,r||(o.next=t.next,t.next=o),o};t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+o(t))},delete:function(e){var r=t&&t.next,o=function(t,e){if(t)return i(t,e,!0)}(t,e);return o&&r&&r===o&&(t=void 0),!!o},get:function(e){return function(t,e){if(t){var r=i(t,e);return r&&r.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!i(t,e)}(t,e)},set:function(e,r){t||(t={next:void 0}),function(t,e,r){var o=i(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(t,e,r)}};return e}},507:(t,e,r)=>{"use strict";var o=r(453),n=r(6556),i=r(8859),s=r(9675),a=o("%Map%",!0),c=n("Map.prototype.get",!0),p=n("Map.prototype.set",!0),u=n("Map.prototype.has",!0),l=n("Map.prototype.delete",!0),f=n("Map.prototype.size",!0);t.exports=!!a&&function(){var t,e={assert:function(t){if(!e.has(t))throw new s("Side channel does not contain "+i(t))},delete:function(e){if(t){var r=l(t,e);return 0===f(t)&&(t=void 0),r}return!1},get:function(e){if(t)return c(t,e)},has:function(e){return!!t&&u(t,e)},set:function(e,r){t||(t=new a),p(t,e,r)}};return e}},2271:(t,e,r)=>{"use strict";var o=r(453),n=r(6556),i=r(8859),s=r(507),a=r(9675),c=o("%WeakMap%",!0),p=n("WeakMap.prototype.get",!0),u=n("WeakMap.prototype.set",!0),l=n("WeakMap.prototype.has",!0),f=n("WeakMap.prototype.delete",!0);t.exports=c?function(){var t,e,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+i(t))},delete:function(r){if(c&&r&&("object"==typeof r||"function"==typeof r)){if(t)return f(t,r)}else if(s&&e)return e.delete(r);return!1},get:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&t?p(t,r):e&&e.get(r)},has:function(r){return c&&r&&("object"==typeof r||"function"==typeof r)&&t?l(t,r):!!e&&e.has(r)},set:function(r,o){c&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new c),u(t,r,o)):s&&(e||(e=s()),e.set(r,o))}};return r}:s},920:(t,e,r)=>{"use strict";var o=r(9675),n=r(8859),i=r(4803),s=r(507),a=r(2271)||s||i;t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new o("Side channel does not contain "+n(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,r){t||(t=a()),t.set(e,r)}};return e}},1380:t=>{"use strict";const e=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];class r{constructor(){this._defaults=[]}_setDefaults(t){for(const e of this._defaults)t[e.fn](...e.args)}}for(const t of e)r.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return this._defaults.push({fn:t,args:r}),this};t.exports=r},5734:(t,e,r)=>{"use strict";let o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;const n=r(5971),i=r(8463),s=r(5373),a=r(1948),{isObject:c,mixin:p,hasOwn:u}=r(3048),l=r(9450),f=r(1380);function y(){}t.exports=function(t,r){return"function"==typeof r?new e.Request("GET",t).end(r):1===arguments.length?new e.Request("GET",t):new e.Request(t,r)};const h=e=t.exports;e.Request=_,h.getXHR=()=>{if(o.XMLHttpRequest)return new o.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const d="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function m(t){if(!c(t))return t;const e=[];for(const r in t)u(t,r)&&g(e,r,t[r]);return e.join("&")}function g(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))for(const o of r)g(t,e,o);else if(c(r))for(const o in r)u(r,o)&&g(t,`${e}[${o}]`,r[o]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function b(t){const e={},r=t.split("&");let o,n;for(let t=0,i=r.length;t<i;++t)o=r[t],n=o.indexOf("="),-1===n?e[decodeURIComponent(o)]="":e[decodeURIComponent(o.slice(0,n))]=decodeURIComponent(o.slice(n+1));return e}function w(t){return/[/+]json($|[^-\w])/i.test(t)}function v(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let{status:e}=this.xhr;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){const e=t.split(/\r?\n/),r={};let o,n,i,s;for(let t=0,a=e.length;t<a;++t)n=e[t],o=n.indexOf(":"),-1!==o&&(i=n.slice(0,o).toLowerCase(),s=d(n.slice(o+1)),r[i]=s);return r}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function _(t,e){const r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(()=>{let t,e=null,o=null;try{o=new v(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",o);try{r._isResponseOK(o)||(t=new Error(o.statusText||o.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=o,t.status=t.status||o.status,r.callback(t,o)):r.callback(null,o)}))}h.serializeObject=m,h.parseString=b,h.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},h.serialize={"application/x-www-form-urlencoded":t=>s.stringify(t,{indices:!1,strictNullHandling:!0}),"application/json":i},h.parse={"application/x-www-form-urlencoded":b,"application/json":JSON.parse},p(v.prototype,l.prototype),v.prototype._parseBody=function(t){let e=h.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&w(this.type)&&(e=h.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},v.prototype.toError=function(){const{req:t}=this,{method:e}=t,{url:r}=t,o=`cannot ${e} ${r} (${this.status})`,n=new Error(o);return n.status=this.status,n.method=e,n.url=r,n},h.Response=v,n(_.prototype),p(_.prototype,a.prototype),_.prototype.type=function(t){return this.set("Content-Type",h.types[t]||t),this},_.prototype.accept=function(t){return this.set("Accept",h.types[t]||t),this},_.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});const o=r.encoder?r.encoder:t=>{if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,o)},_.prototype.query=function(t){return"string"!=typeof t&&(t=m(t)),t&&this._query.push(t),this},_.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},_.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},_.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();const r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},_.prototype.crossDomainError=function(){const t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},_.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},_.prototype.ca=_.prototype.agent,_.prototype.buffer=_.prototype.ca,_.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},_.prototype.pipe=_.prototype.write,_.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},_.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||y,this._finalizeQueryString(),this._end()},_.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},_.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const t=this;this.xhr=h.getXHR();const{xhr:e}=this;let r=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",(()=>{const{readyState:r}=e;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!==r)return;let o;try{o=e.status}catch(t){o=0}if(!o){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}));const o=(e,r)=>{r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",o.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",o.bind(null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){const t=this._header["content-type"];let e=this._serializer||h.serialize[t?t.split(";")[0]:""];!e&&w(t)&&(e=h.serialize["application/json"]),e&&(r=e(r))}for(const t in this.header)null!==this.header[t]&&u(this.header,t)&&e.setRequestHeader(t,this.header[t]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},h.agent=()=>new f;for(const t of["GET","POST","OPTIONS","PATCH","PUT","DELETE"])f.prototype[t.toLowerCase()]=function(e,r){const o=new h.Request(t,e);return this._setDefaults(o),r&&o.end(r),o};function S(t,e,r){const o=h("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}f.prototype.del=f.prototype.delete,h.get=(t,e,r)=>{const o=h("GET",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},h.head=(t,e,r)=>{const o=h("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},h.options=(t,e,r)=>{const o=h("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.del=S,h.delete=S,h.patch=(t,e,r)=>{const o=h("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.post=(t,e,r)=>{const o=h("POST",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},h.put=(t,e,r)=>{const o=h("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}},1948:(t,e,r)=>{"use strict";const{isObject:o,hasOwn:n}=r(3048);function i(){}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(const e in t)if(n(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};const s=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),a=new Set([408,413,429,500,502,503,504,521,522,524]);i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&a.has(e.status))return!0;if(t){if(t.code&&s.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(t,e){if(!this._fullfilledPromise){const t=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(((e,r)=>{t.on("abort",(()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void r(this.timedoutError);const t=new Error("Aborted");t.code="ABORTED",t.status=this.status,t.method=this.method,t.url=this.url,r(t)})),t.end(((t,o)=>{t?r(t):e(o)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(o(t)){for(const e in t)n(t,e)&&this.set(e,t[e]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e,r){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(t)){for(const e in t)n(t,e)&&this.field(e,t[e]);return this}if(Array.isArray(e)){for(const r in e)n(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),r?this._getFormData().append(t,e,r):this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,r,o){switch(r.type){case"basic":this.set("Authorization",`Basic ${o(`${t}:${e}`)}`);break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization",`Bearer ${t}`)}return this},i.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){const e=o(t);let r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&o(this._data))for(const e in t){if("bigint"==typeof t[e]&&!t[e].toJSON)throw new Error("Cannot serialize BigInt value to json");n(t,e)&&(this._data[e]=t[e])}else{if("bigint"==typeof t)throw new Error("Cannot send value of type BigInt");"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],r&&(r=r.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===r?this._data?`${this._data}&${t}`:t:(this._data||"")+t):this._data=t}return!e||this._isHost(t)||r||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){const t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){const t=this.url.indexOf("?");if(t>=0){const e=this.url.slice(t+1).split("&");"function"==typeof this._sort?e.sort(this._sort):e.sort(),this.url=this.url.slice(0,t)+"?"+e.join("&")}}},i.prototype._appendQueryString=()=>{console.warn("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(this._aborted)return;const o=new Error(`${t+e}ms exceeded`);o.timeout=e,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.timedoutError=o,this.abort(),this.callback(o)},i.prototype._setTimeouts=function(){const t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((()=>{t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((()=>{t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},9450:(t,e,r)=>{"use strict";const o=r(3048);function n(){}t.exports=n,n.prototype.get=function(t){return this.header[t.toLowerCase()]},n.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=o.type(e);const r=o.params(e);for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(this[t]=r[t]);this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},n.prototype._setStatusProperties=function(t){const e=Math.trunc(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},3048:(t,e)=>{"use strict";e.type=t=>t.split(/ *; */).shift(),e.params=t=>{const e={};for(const r of t.split(/ *; */)){const t=r.split(/ *= */),o=t.shift(),n=t.shift();o&&n&&(e[o]=n)}return e},e.parseLinks=t=>{const e={};for(const r of t.split(/ *, */)){const t=r.split(/ *; */),o=t[0].slice(1,-1);e[t[1].split(/ *= */)[1].slice(1,-1)]=o}return e},e.cleanHeader=(t,e)=>(delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t),e.normalizeHostname=t=>{const[,e]=t.match(/^\[([^\]]+)\]$/)||[];return e||t},e.isObject=t=>null!==t&&"object"==typeof t,e.hasOwn=Object.hasOwn||function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(t),e)},e.mixin=(t,r)=>{for(const o in r)e.hasOwn(r,o)&&(t[o]=r[o])},e.isGzipOrDeflateEncoding=t=>new RegExp(/^\s*(?:deflate|gzip)\s*$/).test(t.headers["content-encoding"]),e.isBrotliEncoding=t=>new RegExp(/^\s*(?:br)\s*$/).test(t.headers["content-encoding"])},2634:()=>{}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o),r.d(o,{GenesysCloudClientAuthenticator:()=>b,TimeoutError:()=>l,VERSION:()=>p,authenticatorFactory:()=>_,default:()=>S,handleRedirectFromLogin:()=>w,isIssuedTimeWithinTimeframe:()=>d,isIssuedTimeWithinWindow:()=>m,parseOauthParams:()=>y,tokenWasIssuedAt:()=>g}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var t=r(5734),e=r.n(t);const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const s=new Uint8Array(16),a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));const c=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const o=(t=t||{}).random??t.rng?.()??function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(s)}();if(o.length<16)throw new Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=o[t];return e}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(o)},p="1.0.0",u="color: #f29f2c";class l extends Error{constructor(){super(...arguments),this.name="TIMEOUT_ERROR"}}class f extends Error{constructor(t,e){const r=e&&e instanceof Error;super(r?e.message:e),r&&(this.name=e.name),this.translationKey=t}}const y=(t=window.location.hash)=>{const e={},r={},o=new RegExp("^#*(.+?)=(.+?)$","i");if(t.split("&").forEach((t=>{const r=o.exec(t);r&&(e[r[1]]=decodeURIComponent(decodeURIComponent(r[2].replace(/\+/g,"%20"))))})),e.error)return e;if(e.access_token){if(e.state&&(r.state=e.state),e.expires_in){const t=1e3*parseInt(e.expires_in.replace(/\+/g,"%20"));r.tokenExpiryTime=Date.now()+t,r.tokenExpiryTimeString=new Date(r.tokenExpiryTime).toISOString()}r.accessToken=e.access_token.replace(/\+/g,"%20")}return r},h=(t,e)=>{e?(console.log(`%c [DEBUG:gc-client-auth:${p}] ${t}`,u,e),"object"==typeof e&&console.log(`%c [DEBUG:gc-client-auth:${p}] ^ stringified: ${JSON.stringify(e)}`,u)):console.log(`%c [DEBUG:gc-client-auth:${p}] ${t}`,u)},d=(t,e=691199e3,r=168e4,o=Date.now())=>o-g(t,e)<r,m=(t,e,r)=>d(t,e,r),g=(t,e)=>t-e;class b{constructor(t,e={}){this.VERSION=p,this.clientId=t,e.storageKey||(e.storageKey="gc_client_auth_data"),"boolean"!=typeof e.persist&&(e.persist=!1),this.config=Object.assign({},e),this.customHeaders=e.customHeaders,this.setEnvironment(e.environment),this.timeout=16e3,this.authData={},this.authentications={"PureCloud OAuth":{type:"oauth2"}};try{localStorage.setItem("genesys_cloud_local_storage_test","genesys_cloud_local_storage_test"),localStorage.removeItem("genesys_cloud_local_storage_test"),this.hasLocalStorage=!0}catch(t){this.hasLocalStorage=!1}this._loadSettings()}loginImplicitGrant(t={},e){const r=e||y();return new Promise(((e,o)=>{t.org&&!t.provider?o(new Error("opts.provider must be set if opts.org is set")):t.provider&&!t.org?o(new Error("opts.org must be set if opts.provider is set")):t.redirectUri||t.usePopupAuth||o(new Error("redirectUri must be provided for implicit grant and not utilizing client-auth app for popup auth")),r&&r.error&&(r.accessToken=void 0,this._saveSettings(r),o(new Error(`[${r.error}] ${r.error_description}`))),r.accessToken&&this._saveSettings(r),this._testTokenAccess().then((()=>(!this.authData.state&&t.state&&(this.authData.state=t.state),e(this.authData)))).catch((r=>{this._debug("Error encountered during login. This is normal if the application has not yet been authorized.",r);const n={client_id:encodeURIComponent(this.clientId),response_type:"token"};if(t.redirectUri&&(n.redirect_uri=encodeURIComponent(t.redirectUri)),t.state&&(n.state=encodeURIComponent(t.state)),t.org&&(n.org=encodeURIComponent(t.org)),t.provider&&(n.provider=encodeURIComponent(t.provider)),t.usePopupAuth){if(!this.hasLocalStorage)return o(new Error("localStorage is unavailable. Cannot authenticate via popup window."));this._debug("using popup auth – adding listener"),this._authenticateViaPopup(n,t.popupTimeout||15e3).then((t=>{this._saveSettings(t),e(t)})).catch(o)}else{const t=this._buildAuthUrl("oauth/authorize",n);this._debug("Implicit grant: redirecting to: "+t),window.location.replace(t),o(new Error(`Routing to login: "${t}"`))}}))}))}setEnvironment(t){t||(t="mypurecloud.com"),(t=t.replace(/\/+$/,"")).startsWith("https://")&&(t=t.substring(8)),t.startsWith("http://")&&(t=t.substring(7)),t.startsWith("api.")&&(t=t.substring(4)),this.environment=t,this.basePath=`https://api.${t}`,this.authUrl=`https://login.${t}`}clearAuthData(){this._saveSettings({accessToken:void 0,state:void 0,tokenExpiryTime:void 0,tokenExpiryTimeString:void 0})}logout(t){this.clearAuthData();const e={client_id:encodeURIComponent(this.clientId)};t&&(e.redirect_uri=encodeURIComponent(t));const r=this._buildAuthUrl("logout",e);window.location.replace(r)}setAccessToken(t){this._saveSettings({accessToken:t})}testAccessToken(t){return this.callApi("/api/v2/tokens/me","get",t)}parseDate(t){return new Date(t.replace(/T/i," "))}paramToString(t){return t?t instanceof Date?t.toJSON():t.toString():""}buildUrl(t,e={}){return t.match(/^\//)||(t=`/${t}`),(this.basePath+t).replace(/\{([\w-]+)\}/g,((t,r)=>{let o;return o=Object.getOwnPropertyDescriptor(e,r)?this.paramToString(e[r]):t,encodeURIComponent(o)}))}callApi(t,r,o){var n;const i=this.buildUrl(t);let s=e()[r](i).type("application/json").timeout(this.timeout).set("Authorization",`Bearer ${o||(null===(n=this.authData)||void 0===n?void 0:n.accessToken)}`);return this.customHeaders&&Object.entries(this.customHeaders).forEach((([t,e])=>{s=s.set(t,e)})),s.send()}_debug(t,e){this.config.debugMode&&h(t,e)}_saveSettings(t){try{if(this.authData.accessToken=t.accessToken,this.authentications["PureCloud OAuth"].accessToken=t.accessToken,t.state&&(this.authData.state=t.state),this.authData.error=t.error,this.authData.error_description=t.error_description,t.tokenExpiryTime&&(this.authData.tokenExpiryTime=t.tokenExpiryTime,this.authData.tokenExpiryTimeString=t.tokenExpiryTimeString),!this.config.persist)return void this._debug("persist is not true. Settings will not be saved.");if(!this.hasLocalStorage)return void this._debug("Warning: Cannot access local storage. Settings will not be saved.");const e=JSON.parse(JSON.stringify(this.authData));delete e.state,localStorage.setItem(this.config.storageKey,JSON.stringify(e)),this._debug("Auth data saved to local storage",e)}catch(t){console.error(t)}}_getId(t){return`gc-ca_${t=t||c()}`}_authenticateViaPopup(t,e){const r=this._getId(),o=Object.assign(Object.assign({},t),{storageKey:this.config.storageKey});this.config.debugMode&&(o.debug=!0),localStorage.setItem(r,JSON.stringify(o)),t.state=r,t.redirect_uri||(t.redirect_uri=encodeURIComponent(`https://apps.${this.environment}/client-auth`));const n=this._buildAuthUrl("oauth/authorize",t);return new Promise(((o,i)=>{this._debug("Implicit grant: opening new window: "+n),window.open(n,"_blank","width=500px,height=500px,noreferrer,noopener,resizable,scrollbars,status");const s=setTimeout((()=>{this._debug("timeout for loginImplicitGrant using popup",t);const e=new l("Popup authentation timeout. It is possible that the popup was blocked or the login page encountered an error");i(e)}),e),a=t=>{if(this._debug("value was just written to storage by another app",{key:t.key,newValue:t.newValue,oldValue:t.oldValue}),t.key===this.config.storageKey){this._debug("keys matched. resolving value",{key:t.key,value:t.newValue}),window.removeEventListener("storage",a),clearTimeout(s);const e=JSON.parse(t.newValue);localStorage.removeItem(r),o(e)}};window.addEventListener("storage",a)}))}_testTokenAccess(){return t=this,e=void 0,o=function*(){if(this._loadSettings(),!this.authentications["PureCloud OAuth"].accessToken)throw new f("errorTokenNotSet","No access token provided.");try{yield this.callApi("/api/v2/tokens/me","get")}catch(t){throw this._saveSettings({accessToken:void 0}),t}},new((r=void 0)||(r=Promise))((function(n,i){function s(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((o=o.apply(t,e||[])).next())}));var t,e,r,o}_loadSettings(){if(!this.config.persist)return;if(!this.hasLocalStorage)return void this._debug("Warning: Cannot access local storage. Settings will not be loaded.");const t=this.authData.state,e=localStorage.getItem(this.config.storageKey);this.authData=e?JSON.parse(e):{},this.authData.accessToken&&this.setAccessToken(this.authData.accessToken),this.authData.state=t}_buildAuthUrl(t,e={}){return Object.keys(e).reduce(((t,r)=>e[r]?`${t}&${r}=${e[r]}`:t),`${this.authUrl}/${t}?`)}}const w=()=>{const t=y();if(t.error)throw new Error(`[${t.error}]: ${t.error_description}`);if(!t.accessToken)throw new f("errorToken","No access token provided.");const e=t.state;if(!e)throw new f("errorStateParam","No state param on redirect. Unable to determine location to save auth data.");const r=JSON.parse(localStorage.getItem(e)||"false");if(!r||!r.storageKey)throw new f("errorParse","Unable to parse information from localStorage.");r.state?t.state=r.state:delete t.state,h(`setting auth data to key: ${r.storageKey}`,t),localStorage.setItem(r.storageKey,JSON.stringify(t)),r.debug?h("In debug mode. Not closing window or removing storageId",{storageId:e,authData:t,href:window.location.href}):(h(`removing temp storage key: ${e}`),localStorage.removeItem(e),h("closing window"),window.close())},v=new Map,_=(t,e)=>{let r=v.get(t);return r||(r=new b(t,e),v.set(t,r)),r},S=_})(),window.GenesysCloudClientAuth=o})();
2
2
  //# sourceMappingURL=genesys-cloud-client-auth.browser.min.js.map