(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{51446:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.AwsCrc32=void 0;var R=C(92717),T=C(61359),L=C(94079),U=function(){function AwsCrc32(){this.crc32=new L.Crc32}return AwsCrc32.prototype.update=function(_){(0,T.isEmptyData)(_)||this.crc32.update((0,T.convertToBuffer)(_))},AwsCrc32.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,(0,T.numToUint8)(this.crc32.digest())]})})},AwsCrc32.prototype.reset=function(){this.crc32=new L.Crc32},AwsCrc32}();m.AwsCrc32=U},94079:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.AwsCrc32=m.Crc32=m.crc32=void 0;var R=C(92717),T=C(61359);m.crc32=function(_){return new L().update(_).digest()};var L=function(){function Crc32(){this.checksum=4294967295}return Crc32.prototype.update=function(_){var m,C;try{for(var T=R.__values(_),L=T.next();!L.done;L=T.next()){var F=L.value;this.checksum=this.checksum>>>8^U[(this.checksum^F)&255]}}catch(_){m={error:_}}finally{try{L&&!L.done&&(C=T.return)&&C.call(T)}finally{if(m)throw m.error}}return this},Crc32.prototype.digest=function(){return(4294967295^this.checksum)>>>0},Crc32}();m.Crc32=L;var U=(0,T.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),F=C(51446);Object.defineProperty(m,"AwsCrc32",{enumerable:!0,get:function(){return F.AwsCrc32}})},28229:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},61359:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(28229);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(80701);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(46251);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(43340);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},80701:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},46251:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},43340:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},92717:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},51204:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},52795:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},22385:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},82535:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},50148:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isMsWindow=void 0;var C=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];m.isMsWindow=function(_){if("MSInputMethodContext"in _&&"msCrypto"in _&&void 0!==_.msCrypto.subtle){var m=_.msCrypto,R=m.getRandomValues,T=m.subtle;return C.map(function(_){return T[_]}).concat(R).every(function(_){return"function"==typeof _})}return!1}},56486:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var R=C(80767);R.__exportStar(C(51204),m),R.__exportStar(C(52795),m),R.__exportStar(C(22385),m),R.__exportStar(C(82535),m),R.__exportStar(C(50148),m)},80767:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},44209:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_DATA_SHA_256=m.SHA_256_HMAC_ALGO=m.SHA_256_HASH=void 0,m.SHA_256_HASH={name:"SHA-256"},m.SHA_256_HMAC_ALGO={name:"HMAC",hash:m.SHA_256_HASH},m.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},17612:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(6404),T=C(52960),L=C(4497),U=C(39738),F=C(56486),B=C(56495),$=C(90389),H=function(){function Sha256(_){(0,U.supportsWebCrypto)((0,B.locateWindow)())?this.hash=new T.Sha256(_):(0,F.isMsWindow)((0,B.locateWindow)())?this.hash=new R.Sha256(_):this.hash=new L.Sha256(_)}return Sha256.prototype.update=function(_,m){this.hash.update((0,$.convertToBuffer)(_))},Sha256.prototype.digest=function(){return this.hash.digest()},Sha256.prototype.reset=function(){this.hash.reset()},Sha256}();m.Sha256=H},6404:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(10026),T=C(44209),L=C(98143),U=C(56495),F=function(){function Sha256(_){this.secret=_,this.reset()}return Sha256.prototype.update=function(_){var m=this;(0,R.isEmptyData)(_)||(this.operation=this.operation.then(function(C){return C.onerror=function(){m.operation=Promise.reject(Error("Error encountered updating hash"))},C.process(toArrayBufferView(_)),C}),this.operation.catch(function(){}))},Sha256.prototype.digest=function(){return this.operation.then(function(_){return new Promise(function(m,C){_.onerror=function(){C(Error("Error encountered finalizing hash"))},_.oncomplete=function(){_.result&&m(new Uint8Array(_.result)),C(Error("Error encountered finalizing hash"))},_.finish()})})},Sha256.prototype.reset=function(){var _;this.secret?(this.operation=(_=this.secret,new Promise(function(m,C){var R=(0,U.locateWindow)().msCrypto.subtle.importKey("raw",toArrayBufferView(_),T.SHA_256_HMAC_ALGO,!1,["sign"]);R.oncomplete=function(){R.result&&m(R.result),C(Error("ImportKey completed without importing key."))},R.onerror=function(){C(Error("ImportKey failed to import key."))}})).then(function(_){return(0,U.locateWindow)().msCrypto.subtle.sign(T.SHA_256_HMAC_ALGO,_)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,U.locateWindow)().msCrypto.subtle.digest("SHA-256"))},Sha256}();function toArrayBufferView(_){return"string"==typeof _?(0,L.fromUtf8)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}m.Sha256=F},16037:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.WebCryptoSha256=m.Ie11Sha256=void 0,C(31279).__exportStar(C(17612),m);var R=C(6404);Object.defineProperty(m,"Ie11Sha256",{enumerable:!0,get:function(){return R.Sha256}});var T=C(52960);Object.defineProperty(m,"WebCryptoSha256",{enumerable:!0,get:function(){return T.Sha256}})},10026:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},52960:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(90389),T=C(44209),L=C(56495),U=function(){function Sha256(_){this.toHash=new Uint8Array(0),this.secret=_,this.reset()}return Sha256.prototype.update=function(_){if(!(0,R.isEmptyData)(_)){var m=(0,R.convertToBuffer)(_),C=new Uint8Array(this.toHash.byteLength+m.byteLength);C.set(this.toHash,0),C.set(m,this.toHash.byteLength),this.toHash=C}},Sha256.prototype.digest=function(){var _=this;return this.key?this.key.then(function(m){return(0,L.locateWindow)().crypto.subtle.sign(T.SHA_256_HMAC_ALGO,m,_.toHash).then(function(_){return new Uint8Array(_)})}):(0,R.isEmptyData)(this.toHash)?Promise.resolve(T.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,L.locateWindow)().crypto.subtle.digest(T.SHA_256_HASH,_.toHash)}).then(function(_){return Promise.resolve(new Uint8Array(_))})},Sha256.prototype.reset=function(){var _=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(m,C){(0,L.locateWindow)().crypto.subtle.importKey("raw",(0,R.convertToBuffer)(_.secret),T.SHA_256_HMAC_ALGO,!1,["sign"]).then(m,C)}),this.key.catch(function(){}))},Sha256}();m.Sha256=U},31279:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},49507:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.RawSha256=void 0;var R=C(19882),T=function(){function RawSha256(){this.state=Int32Array.from(R.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return RawSha256.prototype.update=function(_){if(this.finished)throw Error("Attempted to update an already finished hash.");var m=0,C=_.byteLength;if(this.bytesHashed+=C,8*this.bytesHashed>R.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;C>0;)this.buffer[this.bufferLength++]=_[m++],C--,this.bufferLength===R.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},RawSha256.prototype.digest=function(){if(!this.finished){var _=8*this.bytesHashed,m=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),C=this.bufferLength;if(m.setUint8(this.bufferLength++,128),C%R.BLOCK_SIZE>=R.BLOCK_SIZE-8){for(var T=this.bufferLength;T>>24&255,L[4*T+1]=this.state[T]>>>16&255,L[4*T+2]=this.state[T]>>>8&255,L[4*T+3]=this.state[T]>>>0&255;return L},RawSha256.prototype.hashBuffer=function(){for(var _=this.buffer,m=this.state,C=m[0],T=m[1],L=m[2],U=m[3],F=m[4],B=m[5],$=m[6],H=m[7],V=0;V>>17|q<<15)^(q>>>19|q<<13)^q>>>10,K=((q=this.temp[V-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;this.temp[V]=(G+this.temp[V-7]|0)+(K+this.temp[V-16]|0)}var Z=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&B^~F&$)|0)+(H+(R.KEY[V]+this.temp[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&L^T&L)|0;H=$,$=B,B=F,F=U+Z|0,U=L,L=T,T=C,C=Z+W|0}m[0]+=C,m[1]+=T,m[2]+=L,m[3]+=U,m[4]+=F,m[5]+=B,m[6]+=$,m[7]+=H},RawSha256}();m.RawSha256=T},19882:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.MAX_HASHABLE_LENGTH=m.INIT=m.KEY=m.DIGEST_LENGTH=m.BLOCK_SIZE=void 0,m.BLOCK_SIZE=64,m.DIGEST_LENGTH=32,m.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],m.MAX_HASHABLE_LENGTH=9007199254740991},4497:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(53239).__exportStar(C(34666),m)},34666:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(53239),T=C(19882),L=C(49507),U=C(90389),F=function(){function Sha256(_){this.secret=_,this.hash=new L.RawSha256,this.reset()}return Sha256.prototype.update=function(_){if(!(0,U.isEmptyData)(_)&&!this.error)try{this.hash.update((0,U.convertToBuffer)(_))}catch(_){this.error=_}},Sha256.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Sha256.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,this.digestSync()]})})},Sha256.prototype.reset=function(){if(this.hash=new L.RawSha256,this.secret){this.outer=new L.RawSha256;var _=function(_){var m=(0,U.convertToBuffer)(_);if(m.byteLength>T.BLOCK_SIZE){var C=new L.RawSha256;C.update(m),m=C.digest()}var R=new Uint8Array(T.BLOCK_SIZE);return R.set(m),R}(this.secret),m=new Uint8Array(T.BLOCK_SIZE);m.set(_);for(var C=0;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},39738:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(78699).__exportStar(C(89703),m)},89703:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.supportsZeroByteGCM=m.supportsSubtleCrypto=m.supportsSecureRandom=m.supportsWebCrypto=void 0;var R=C(78699),T=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsSecureRandom(_){return"object"==typeof _&&"object"==typeof _.crypto&&"function"==typeof _.crypto.getRandomValues}function supportsSubtleCrypto(_){return _&&T.every(function(m){return"function"==typeof _[m]})}m.supportsWebCrypto=function(_){return!!supportsSecureRandom(_)&&"object"==typeof _.crypto.subtle&&supportsSubtleCrypto(_.crypto.subtle)},m.supportsSecureRandom=supportsSecureRandom,m.supportsSubtleCrypto=supportsSubtleCrypto,m.supportsZeroByteGCM=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:if(!supportsSubtleCrypto(_))return[2,!1];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,_.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return m=C.sent(),[4,_.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},m,new Uint8Array(0))];case 3:return[2,16===C.sent().byteLength];case 4:return C.sent(),[2,!1];case 5:return[2]}})})}},78699:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},67818:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},90389:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(67818);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(45755);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(18457);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(71575);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},45755:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},18457:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},71575:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},67394:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},91609:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},59333:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},81995:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},43543:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isMsWindow=void 0;var C=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];m.isMsWindow=function(_){if("MSInputMethodContext"in _&&"msCrypto"in _&&void 0!==_.msCrypto.subtle){var m=_.msCrypto,R=m.getRandomValues,T=m.subtle;return C.map(function(_){return T[_]}).concat(R).every(function(_){return"function"==typeof _})}return!1}},19365:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var R=C(51942);R.__exportStar(C(67394),m),R.__exportStar(C(91609),m),R.__exportStar(C(59333),m),R.__exportStar(C(81995),m),R.__exportStar(C(43543),m)},51942:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},25836:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_DATA_SHA_256=m.SHA_256_HMAC_ALGO=m.SHA_256_HASH=void 0,m.SHA_256_HASH={name:"SHA-256"},m.SHA_256_HMAC_ALGO={name:"HMAC",hash:m.SHA_256_HASH},m.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},8254:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(42455),T=C(61699),L=C(56642),U=C(23787),F=C(19365),B=C(56495),$=C(20458),H=function(){function Sha256(_){(0,U.supportsWebCrypto)((0,B.locateWindow)())?this.hash=new T.Sha256(_):(0,F.isMsWindow)((0,B.locateWindow)())?this.hash=new R.Sha256(_):this.hash=new L.Sha256(_)}return Sha256.prototype.update=function(_,m){this.hash.update((0,$.convertToBuffer)(_))},Sha256.prototype.digest=function(){return this.hash.digest()},Sha256.prototype.reset=function(){this.hash.reset()},Sha256}();m.Sha256=H},42455:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(71317),T=C(25836),L=C(98143),U=C(56495),F=function(){function Sha256(_){this.secret=_,this.reset()}return Sha256.prototype.update=function(_){var m=this;(0,R.isEmptyData)(_)||(this.operation=this.operation.then(function(C){return C.onerror=function(){m.operation=Promise.reject(Error("Error encountered updating hash"))},C.process(toArrayBufferView(_)),C}),this.operation.catch(function(){}))},Sha256.prototype.digest=function(){return this.operation.then(function(_){return new Promise(function(m,C){_.onerror=function(){C(Error("Error encountered finalizing hash"))},_.oncomplete=function(){_.result&&m(new Uint8Array(_.result)),C(Error("Error encountered finalizing hash"))},_.finish()})})},Sha256.prototype.reset=function(){var _;this.secret?(this.operation=(_=this.secret,new Promise(function(m,C){var R=(0,U.locateWindow)().msCrypto.subtle.importKey("raw",toArrayBufferView(_),T.SHA_256_HMAC_ALGO,!1,["sign"]);R.oncomplete=function(){R.result&&m(R.result),C(Error("ImportKey completed without importing key."))},R.onerror=function(){C(Error("ImportKey failed to import key."))}})).then(function(_){return(0,U.locateWindow)().msCrypto.subtle.sign(T.SHA_256_HMAC_ALGO,_)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,U.locateWindow)().msCrypto.subtle.digest("SHA-256"))},Sha256}();function toArrayBufferView(_){return"string"==typeof _?(0,L.fromUtf8)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}m.Sha256=F},57381:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.WebCryptoSha256=m.Ie11Sha256=void 0,C(34948).__exportStar(C(8254),m);var R=C(42455);Object.defineProperty(m,"Ie11Sha256",{enumerable:!0,get:function(){return R.Sha256}});var T=C(61699);Object.defineProperty(m,"WebCryptoSha256",{enumerable:!0,get:function(){return T.Sha256}})},71317:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},61699:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(20458),T=C(25836),L=C(56495),U=function(){function Sha256(_){this.toHash=new Uint8Array(0),this.secret=_,this.reset()}return Sha256.prototype.update=function(_){if(!(0,R.isEmptyData)(_)){var m=(0,R.convertToBuffer)(_),C=new Uint8Array(this.toHash.byteLength+m.byteLength);C.set(this.toHash,0),C.set(m,this.toHash.byteLength),this.toHash=C}},Sha256.prototype.digest=function(){var _=this;return this.key?this.key.then(function(m){return(0,L.locateWindow)().crypto.subtle.sign(T.SHA_256_HMAC_ALGO,m,_.toHash).then(function(_){return new Uint8Array(_)})}):(0,R.isEmptyData)(this.toHash)?Promise.resolve(T.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,L.locateWindow)().crypto.subtle.digest(T.SHA_256_HASH,_.toHash)}).then(function(_){return Promise.resolve(new Uint8Array(_))})},Sha256.prototype.reset=function(){var _=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(m,C){(0,L.locateWindow)().crypto.subtle.importKey("raw",(0,R.convertToBuffer)(_.secret),T.SHA_256_HMAC_ALGO,!1,["sign"]).then(m,C)}),this.key.catch(function(){}))},Sha256}();m.Sha256=U},34948:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},33784:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.RawSha256=void 0;var R=C(25538),T=function(){function RawSha256(){this.state=Int32Array.from(R.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return RawSha256.prototype.update=function(_){if(this.finished)throw Error("Attempted to update an already finished hash.");var m=0,C=_.byteLength;if(this.bytesHashed+=C,8*this.bytesHashed>R.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;C>0;)this.buffer[this.bufferLength++]=_[m++],C--,this.bufferLength===R.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},RawSha256.prototype.digest=function(){if(!this.finished){var _=8*this.bytesHashed,m=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),C=this.bufferLength;if(m.setUint8(this.bufferLength++,128),C%R.BLOCK_SIZE>=R.BLOCK_SIZE-8){for(var T=this.bufferLength;T>>24&255,L[4*T+1]=this.state[T]>>>16&255,L[4*T+2]=this.state[T]>>>8&255,L[4*T+3]=this.state[T]>>>0&255;return L},RawSha256.prototype.hashBuffer=function(){for(var _=this.buffer,m=this.state,C=m[0],T=m[1],L=m[2],U=m[3],F=m[4],B=m[5],$=m[6],H=m[7],V=0;V>>17|q<<15)^(q>>>19|q<<13)^q>>>10,K=((q=this.temp[V-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;this.temp[V]=(G+this.temp[V-7]|0)+(K+this.temp[V-16]|0)}var Z=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&B^~F&$)|0)+(H+(R.KEY[V]+this.temp[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&L^T&L)|0;H=$,$=B,B=F,F=U+Z|0,U=L,L=T,T=C,C=Z+W|0}m[0]+=C,m[1]+=T,m[2]+=L,m[3]+=U,m[4]+=F,m[5]+=B,m[6]+=$,m[7]+=H},RawSha256}();m.RawSha256=T},25538:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.MAX_HASHABLE_LENGTH=m.INIT=m.KEY=m.DIGEST_LENGTH=m.BLOCK_SIZE=void 0,m.BLOCK_SIZE=64,m.DIGEST_LENGTH=32,m.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],m.MAX_HASHABLE_LENGTH=9007199254740991},56642:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(3917).__exportStar(C(71016),m)},71016:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(3917),T=C(25538),L=C(33784),U=C(20458),F=function(){function Sha256(_){this.secret=_,this.hash=new L.RawSha256,this.reset()}return Sha256.prototype.update=function(_){if(!(0,U.isEmptyData)(_)&&!this.error)try{this.hash.update((0,U.convertToBuffer)(_))}catch(_){this.error=_}},Sha256.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Sha256.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,this.digestSync()]})})},Sha256.prototype.reset=function(){if(this.hash=new L.RawSha256,this.secret){this.outer=new L.RawSha256;var _=function(_){var m=(0,U.convertToBuffer)(_);if(m.byteLength>T.BLOCK_SIZE){var C=new L.RawSha256;C.update(m),m=C.digest()}var R=new Uint8Array(T.BLOCK_SIZE);return R.set(m),R}(this.secret),m=new Uint8Array(T.BLOCK_SIZE);m.set(_);for(var C=0;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},23787:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(35497).__exportStar(C(20014),m)},20014:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.supportsZeroByteGCM=m.supportsSubtleCrypto=m.supportsSecureRandom=m.supportsWebCrypto=void 0;var R=C(35497),T=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsSecureRandom(_){return"object"==typeof _&&"object"==typeof _.crypto&&"function"==typeof _.crypto.getRandomValues}function supportsSubtleCrypto(_){return _&&T.every(function(m){return"function"==typeof _[m]})}m.supportsWebCrypto=function(_){return!!supportsSecureRandom(_)&&"object"==typeof _.crypto.subtle&&supportsSubtleCrypto(_.crypto.subtle)},m.supportsSecureRandom=supportsSecureRandom,m.supportsSubtleCrypto=supportsSubtleCrypto,m.supportsZeroByteGCM=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:if(!supportsSubtleCrypto(_))return[2,!1];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,_.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return m=C.sent(),[4,_.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},m,new Uint8Array(0))];case 3:return[2,16===C.sent().byteLength];case 4:return C.sent(),[2,!1];case 5:return[2]}})})}},35497:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},51346:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},20458:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(51346);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(32498);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(85276);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(64665);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},32498:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},85276:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},64665:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},12832:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},4703:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},24432:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},75184:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},5694:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isMsWindow=void 0;var C=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];m.isMsWindow=function(_){if("MSInputMethodContext"in _&&"msCrypto"in _&&void 0!==_.msCrypto.subtle){var m=_.msCrypto,R=m.getRandomValues,T=m.subtle;return C.map(function(_){return T[_]}).concat(R).every(function(_){return"function"==typeof _})}return!1}},93467:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var R=C(49767);R.__exportStar(C(12832),m),R.__exportStar(C(4703),m),R.__exportStar(C(24432),m),R.__exportStar(C(75184),m),R.__exportStar(C(5694),m)},49767:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},14567:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_DATA_SHA_256=m.SHA_256_HMAC_ALGO=m.SHA_256_HASH=void 0,m.SHA_256_HASH={name:"SHA-256"},m.SHA_256_HMAC_ALGO={name:"HMAC",hash:m.SHA_256_HASH},m.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},77358:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(68770),T=C(47977),L=C(47108),U=C(35755),F=C(93467),B=C(56495),$=C(97664),H=function(){function Sha256(_){(0,U.supportsWebCrypto)((0,B.locateWindow)())?this.hash=new T.Sha256(_):(0,F.isMsWindow)((0,B.locateWindow)())?this.hash=new R.Sha256(_):this.hash=new L.Sha256(_)}return Sha256.prototype.update=function(_,m){this.hash.update((0,$.convertToBuffer)(_))},Sha256.prototype.digest=function(){return this.hash.digest()},Sha256.prototype.reset=function(){this.hash.reset()},Sha256}();m.Sha256=H},68770:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(29055),T=C(14567),L=C(98143),U=C(56495),F=function(){function Sha256(_){this.secret=_,this.reset()}return Sha256.prototype.update=function(_){var m=this;(0,R.isEmptyData)(_)||(this.operation=this.operation.then(function(C){return C.onerror=function(){m.operation=Promise.reject(Error("Error encountered updating hash"))},C.process(toArrayBufferView(_)),C}),this.operation.catch(function(){}))},Sha256.prototype.digest=function(){return this.operation.then(function(_){return new Promise(function(m,C){_.onerror=function(){C(Error("Error encountered finalizing hash"))},_.oncomplete=function(){_.result&&m(new Uint8Array(_.result)),C(Error("Error encountered finalizing hash"))},_.finish()})})},Sha256.prototype.reset=function(){var _;this.secret?(this.operation=(_=this.secret,new Promise(function(m,C){var R=(0,U.locateWindow)().msCrypto.subtle.importKey("raw",toArrayBufferView(_),T.SHA_256_HMAC_ALGO,!1,["sign"]);R.oncomplete=function(){R.result&&m(R.result),C(Error("ImportKey completed without importing key."))},R.onerror=function(){C(Error("ImportKey failed to import key."))}})).then(function(_){return(0,U.locateWindow)().msCrypto.subtle.sign(T.SHA_256_HMAC_ALGO,_)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,U.locateWindow)().msCrypto.subtle.digest("SHA-256"))},Sha256}();function toArrayBufferView(_){return"string"==typeof _?(0,L.fromUtf8)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}m.Sha256=F},76505:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.WebCryptoSha256=m.Ie11Sha256=void 0,C(77563).__exportStar(C(77358),m);var R=C(68770);Object.defineProperty(m,"Ie11Sha256",{enumerable:!0,get:function(){return R.Sha256}});var T=C(47977);Object.defineProperty(m,"WebCryptoSha256",{enumerable:!0,get:function(){return T.Sha256}})},29055:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},47977:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(97664),T=C(14567),L=C(56495),U=function(){function Sha256(_){this.toHash=new Uint8Array(0),this.secret=_,this.reset()}return Sha256.prototype.update=function(_){if(!(0,R.isEmptyData)(_)){var m=(0,R.convertToBuffer)(_),C=new Uint8Array(this.toHash.byteLength+m.byteLength);C.set(this.toHash,0),C.set(m,this.toHash.byteLength),this.toHash=C}},Sha256.prototype.digest=function(){var _=this;return this.key?this.key.then(function(m){return(0,L.locateWindow)().crypto.subtle.sign(T.SHA_256_HMAC_ALGO,m,_.toHash).then(function(_){return new Uint8Array(_)})}):(0,R.isEmptyData)(this.toHash)?Promise.resolve(T.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,L.locateWindow)().crypto.subtle.digest(T.SHA_256_HASH,_.toHash)}).then(function(_){return Promise.resolve(new Uint8Array(_))})},Sha256.prototype.reset=function(){var _=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(m,C){(0,L.locateWindow)().crypto.subtle.importKey("raw",(0,R.convertToBuffer)(_.secret),T.SHA_256_HMAC_ALGO,!1,["sign"]).then(m,C)}),this.key.catch(function(){}))},Sha256}();m.Sha256=U},77563:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},36321:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.RawSha256=void 0;var R=C(18280),T=function(){function RawSha256(){this.state=Int32Array.from(R.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return RawSha256.prototype.update=function(_){if(this.finished)throw Error("Attempted to update an already finished hash.");var m=0,C=_.byteLength;if(this.bytesHashed+=C,8*this.bytesHashed>R.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;C>0;)this.buffer[this.bufferLength++]=_[m++],C--,this.bufferLength===R.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},RawSha256.prototype.digest=function(){if(!this.finished){var _=8*this.bytesHashed,m=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),C=this.bufferLength;if(m.setUint8(this.bufferLength++,128),C%R.BLOCK_SIZE>=R.BLOCK_SIZE-8){for(var T=this.bufferLength;T>>24&255,L[4*T+1]=this.state[T]>>>16&255,L[4*T+2]=this.state[T]>>>8&255,L[4*T+3]=this.state[T]>>>0&255;return L},RawSha256.prototype.hashBuffer=function(){for(var _=this.buffer,m=this.state,C=m[0],T=m[1],L=m[2],U=m[3],F=m[4],B=m[5],$=m[6],H=m[7],V=0;V>>17|q<<15)^(q>>>19|q<<13)^q>>>10,K=((q=this.temp[V-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;this.temp[V]=(G+this.temp[V-7]|0)+(K+this.temp[V-16]|0)}var Z=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&B^~F&$)|0)+(H+(R.KEY[V]+this.temp[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&L^T&L)|0;H=$,$=B,B=F,F=U+Z|0,U=L,L=T,T=C,C=Z+W|0}m[0]+=C,m[1]+=T,m[2]+=L,m[3]+=U,m[4]+=F,m[5]+=B,m[6]+=$,m[7]+=H},RawSha256}();m.RawSha256=T},18280:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.MAX_HASHABLE_LENGTH=m.INIT=m.KEY=m.DIGEST_LENGTH=m.BLOCK_SIZE=void 0,m.BLOCK_SIZE=64,m.DIGEST_LENGTH=32,m.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],m.MAX_HASHABLE_LENGTH=9007199254740991},47108:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(10191).__exportStar(C(80009),m)},80009:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(10191),T=C(18280),L=C(36321),U=C(97664),F=function(){function Sha256(_){this.secret=_,this.hash=new L.RawSha256,this.reset()}return Sha256.prototype.update=function(_){if(!(0,U.isEmptyData)(_)&&!this.error)try{this.hash.update((0,U.convertToBuffer)(_))}catch(_){this.error=_}},Sha256.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Sha256.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,this.digestSync()]})})},Sha256.prototype.reset=function(){if(this.hash=new L.RawSha256,this.secret){this.outer=new L.RawSha256;var _=function(_){var m=(0,U.convertToBuffer)(_);if(m.byteLength>T.BLOCK_SIZE){var C=new L.RawSha256;C.update(m),m=C.digest()}var R=new Uint8Array(T.BLOCK_SIZE);return R.set(m),R}(this.secret),m=new Uint8Array(T.BLOCK_SIZE);m.set(_);for(var C=0;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},35755:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(67223).__exportStar(C(39369),m)},39369:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.supportsZeroByteGCM=m.supportsSubtleCrypto=m.supportsSecureRandom=m.supportsWebCrypto=void 0;var R=C(67223),T=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsSecureRandom(_){return"object"==typeof _&&"object"==typeof _.crypto&&"function"==typeof _.crypto.getRandomValues}function supportsSubtleCrypto(_){return _&&T.every(function(m){return"function"==typeof _[m]})}m.supportsWebCrypto=function(_){return!!supportsSecureRandom(_)&&"object"==typeof _.crypto.subtle&&supportsSubtleCrypto(_.crypto.subtle)},m.supportsSecureRandom=supportsSecureRandom,m.supportsSubtleCrypto=supportsSubtleCrypto,m.supportsZeroByteGCM=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:if(!supportsSubtleCrypto(_))return[2,!1];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,_.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return m=C.sent(),[4,_.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},m,new Uint8Array(0))];case 3:return[2,16===C.sent().byteLength];case 4:return C.sent(),[2,!1];case 5:return[2]}})})}},67223:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},38895:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},97664:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(38895);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(24647);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(35522);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(40976);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},24647:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},35522:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},40976:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},16636:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},38491:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},76061:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},45143:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},76834:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isMsWindow=void 0;var C=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];m.isMsWindow=function(_){if("MSInputMethodContext"in _&&"msCrypto"in _&&void 0!==_.msCrypto.subtle){var m=_.msCrypto,R=m.getRandomValues,T=m.subtle;return C.map(function(_){return T[_]}).concat(R).every(function(_){return"function"==typeof _})}return!1}},66448:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var R=C(9101);R.__exportStar(C(16636),m),R.__exportStar(C(38491),m),R.__exportStar(C(76061),m),R.__exportStar(C(45143),m),R.__exportStar(C(76834),m)},9101:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},14:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_DATA_SHA_256=m.SHA_256_HMAC_ALGO=m.SHA_256_HASH=void 0,m.SHA_256_HASH={name:"SHA-256"},m.SHA_256_HMAC_ALGO={name:"HMAC",hash:m.SHA_256_HASH},m.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},80418:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(80330),T=C(26560),L=C(95165),U=C(48871),F=C(66448),B=C(56495),$=C(37421),H=function(){function Sha256(_){(0,U.supportsWebCrypto)((0,B.locateWindow)())?this.hash=new T.Sha256(_):(0,F.isMsWindow)((0,B.locateWindow)())?this.hash=new R.Sha256(_):this.hash=new L.Sha256(_)}return Sha256.prototype.update=function(_,m){this.hash.update((0,$.convertToBuffer)(_))},Sha256.prototype.digest=function(){return this.hash.digest()},Sha256.prototype.reset=function(){this.hash.reset()},Sha256}();m.Sha256=H},80330:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(78659),T=C(14),L=C(98143),U=C(56495),F=function(){function Sha256(_){this.secret=_,this.reset()}return Sha256.prototype.update=function(_){var m=this;(0,R.isEmptyData)(_)||(this.operation=this.operation.then(function(C){return C.onerror=function(){m.operation=Promise.reject(Error("Error encountered updating hash"))},C.process(toArrayBufferView(_)),C}),this.operation.catch(function(){}))},Sha256.prototype.digest=function(){return this.operation.then(function(_){return new Promise(function(m,C){_.onerror=function(){C(Error("Error encountered finalizing hash"))},_.oncomplete=function(){_.result&&m(new Uint8Array(_.result)),C(Error("Error encountered finalizing hash"))},_.finish()})})},Sha256.prototype.reset=function(){var _;this.secret?(this.operation=(_=this.secret,new Promise(function(m,C){var R=(0,U.locateWindow)().msCrypto.subtle.importKey("raw",toArrayBufferView(_),T.SHA_256_HMAC_ALGO,!1,["sign"]);R.oncomplete=function(){R.result&&m(R.result),C(Error("ImportKey completed without importing key."))},R.onerror=function(){C(Error("ImportKey failed to import key."))}})).then(function(_){return(0,U.locateWindow)().msCrypto.subtle.sign(T.SHA_256_HMAC_ALGO,_)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,U.locateWindow)().msCrypto.subtle.digest("SHA-256"))},Sha256}();function toArrayBufferView(_){return"string"==typeof _?(0,L.fromUtf8)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}m.Sha256=F},80686:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.WebCryptoSha256=m.Ie11Sha256=void 0,C(61688).__exportStar(C(80418),m);var R=C(80330);Object.defineProperty(m,"Ie11Sha256",{enumerable:!0,get:function(){return R.Sha256}});var T=C(26560);Object.defineProperty(m,"WebCryptoSha256",{enumerable:!0,get:function(){return T.Sha256}})},78659:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},26560:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(37421),T=C(14),L=C(56495),U=function(){function Sha256(_){this.toHash=new Uint8Array(0),this.secret=_,this.reset()}return Sha256.prototype.update=function(_){if(!(0,R.isEmptyData)(_)){var m=(0,R.convertToBuffer)(_),C=new Uint8Array(this.toHash.byteLength+m.byteLength);C.set(this.toHash,0),C.set(m,this.toHash.byteLength),this.toHash=C}},Sha256.prototype.digest=function(){var _=this;return this.key?this.key.then(function(m){return(0,L.locateWindow)().crypto.subtle.sign(T.SHA_256_HMAC_ALGO,m,_.toHash).then(function(_){return new Uint8Array(_)})}):(0,R.isEmptyData)(this.toHash)?Promise.resolve(T.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,L.locateWindow)().crypto.subtle.digest(T.SHA_256_HASH,_.toHash)}).then(function(_){return Promise.resolve(new Uint8Array(_))})},Sha256.prototype.reset=function(){var _=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(m,C){(0,L.locateWindow)().crypto.subtle.importKey("raw",(0,R.convertToBuffer)(_.secret),T.SHA_256_HMAC_ALGO,!1,["sign"]).then(m,C)}),this.key.catch(function(){}))},Sha256}();m.Sha256=U},61688:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},43259:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.RawSha256=void 0;var R=C(72758),T=function(){function RawSha256(){this.state=Int32Array.from(R.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return RawSha256.prototype.update=function(_){if(this.finished)throw Error("Attempted to update an already finished hash.");var m=0,C=_.byteLength;if(this.bytesHashed+=C,8*this.bytesHashed>R.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;C>0;)this.buffer[this.bufferLength++]=_[m++],C--,this.bufferLength===R.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},RawSha256.prototype.digest=function(){if(!this.finished){var _=8*this.bytesHashed,m=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),C=this.bufferLength;if(m.setUint8(this.bufferLength++,128),C%R.BLOCK_SIZE>=R.BLOCK_SIZE-8){for(var T=this.bufferLength;T>>24&255,L[4*T+1]=this.state[T]>>>16&255,L[4*T+2]=this.state[T]>>>8&255,L[4*T+3]=this.state[T]>>>0&255;return L},RawSha256.prototype.hashBuffer=function(){for(var _=this.buffer,m=this.state,C=m[0],T=m[1],L=m[2],U=m[3],F=m[4],B=m[5],$=m[6],H=m[7],V=0;V>>17|q<<15)^(q>>>19|q<<13)^q>>>10,K=((q=this.temp[V-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;this.temp[V]=(G+this.temp[V-7]|0)+(K+this.temp[V-16]|0)}var Z=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&B^~F&$)|0)+(H+(R.KEY[V]+this.temp[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&L^T&L)|0;H=$,$=B,B=F,F=U+Z|0,U=L,L=T,T=C,C=Z+W|0}m[0]+=C,m[1]+=T,m[2]+=L,m[3]+=U,m[4]+=F,m[5]+=B,m[6]+=$,m[7]+=H},RawSha256}();m.RawSha256=T},72758:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.MAX_HASHABLE_LENGTH=m.INIT=m.KEY=m.DIGEST_LENGTH=m.BLOCK_SIZE=void 0,m.BLOCK_SIZE=64,m.DIGEST_LENGTH=32,m.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],m.MAX_HASHABLE_LENGTH=9007199254740991},95165:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(13175).__exportStar(C(62035),m)},62035:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(13175),T=C(72758),L=C(43259),U=C(37421),F=function(){function Sha256(_){this.secret=_,this.hash=new L.RawSha256,this.reset()}return Sha256.prototype.update=function(_){if(!(0,U.isEmptyData)(_)&&!this.error)try{this.hash.update((0,U.convertToBuffer)(_))}catch(_){this.error=_}},Sha256.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Sha256.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,this.digestSync()]})})},Sha256.prototype.reset=function(){if(this.hash=new L.RawSha256,this.secret){this.outer=new L.RawSha256;var _=function(_){var m=(0,U.convertToBuffer)(_);if(m.byteLength>T.BLOCK_SIZE){var C=new L.RawSha256;C.update(m),m=C.digest()}var R=new Uint8Array(T.BLOCK_SIZE);return R.set(m),R}(this.secret),m=new Uint8Array(T.BLOCK_SIZE);m.set(_);for(var C=0;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},48871:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(7500).__exportStar(C(28684),m)},28684:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.supportsZeroByteGCM=m.supportsSubtleCrypto=m.supportsSecureRandom=m.supportsWebCrypto=void 0;var R=C(7500),T=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsSecureRandom(_){return"object"==typeof _&&"object"==typeof _.crypto&&"function"==typeof _.crypto.getRandomValues}function supportsSubtleCrypto(_){return _&&T.every(function(m){return"function"==typeof _[m]})}m.supportsWebCrypto=function(_){return!!supportsSecureRandom(_)&&"object"==typeof _.crypto.subtle&&supportsSubtleCrypto(_.crypto.subtle)},m.supportsSecureRandom=supportsSecureRandom,m.supportsSubtleCrypto=supportsSubtleCrypto,m.supportsZeroByteGCM=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:if(!supportsSubtleCrypto(_))return[2,!1];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,_.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return m=C.sent(),[4,_.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},m,new Uint8Array(0))];case 3:return[2,16===C.sent().byteLength];case 4:return C.sent(),[2,!1];case 5:return[2]}})})}},7500:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},94276:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},37421:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(94276);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(65499);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(26444);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(416);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},65499:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},26444:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},416:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},84810:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},92767:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},88846:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},40343:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0})},53557:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isMsWindow=void 0;var C=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];m.isMsWindow=function(_){if("MSInputMethodContext"in _&&"msCrypto"in _&&void 0!==_.msCrypto.subtle){var m=_.msCrypto,R=m.getRandomValues,T=m.subtle;return C.map(function(_){return T[_]}).concat(R).every(function(_){return"function"==typeof _})}return!1}},32214:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var R=C(65957);R.__exportStar(C(84810),m),R.__exportStar(C(92767),m),R.__exportStar(C(88846),m),R.__exportStar(C(40343),m),R.__exportStar(C(53557),m)},65957:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},33579:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.EMPTY_DATA_SHA_256=m.SHA_256_HMAC_ALGO=m.SHA_256_HASH=void 0,m.SHA_256_HASH={name:"SHA-256"},m.SHA_256_HMAC_ALGO={name:"HMAC",hash:m.SHA_256_HASH},m.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},94511:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(43039),T=C(47059),L=C(47162),U=C(53453),F=C(32214),B=C(56495),$=C(61558),H=function(){function Sha256(_){(0,U.supportsWebCrypto)((0,B.locateWindow)())?this.hash=new T.Sha256(_):(0,F.isMsWindow)((0,B.locateWindow)())?this.hash=new R.Sha256(_):this.hash=new L.Sha256(_)}return Sha256.prototype.update=function(_,m){this.hash.update((0,$.convertToBuffer)(_))},Sha256.prototype.digest=function(){return this.hash.digest()},Sha256.prototype.reset=function(){this.hash.reset()},Sha256}();m.Sha256=H},43039:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(19982),T=C(33579),L=C(98143),U=C(56495),F=function(){function Sha256(_){this.secret=_,this.reset()}return Sha256.prototype.update=function(_){var m=this;(0,R.isEmptyData)(_)||(this.operation=this.operation.then(function(C){return C.onerror=function(){m.operation=Promise.reject(Error("Error encountered updating hash"))},C.process(toArrayBufferView(_)),C}),this.operation.catch(function(){}))},Sha256.prototype.digest=function(){return this.operation.then(function(_){return new Promise(function(m,C){_.onerror=function(){C(Error("Error encountered finalizing hash"))},_.oncomplete=function(){_.result&&m(new Uint8Array(_.result)),C(Error("Error encountered finalizing hash"))},_.finish()})})},Sha256.prototype.reset=function(){var _;this.secret?(this.operation=(_=this.secret,new Promise(function(m,C){var R=(0,U.locateWindow)().msCrypto.subtle.importKey("raw",toArrayBufferView(_),T.SHA_256_HMAC_ALGO,!1,["sign"]);R.oncomplete=function(){R.result&&m(R.result),C(Error("ImportKey completed without importing key."))},R.onerror=function(){C(Error("ImportKey failed to import key."))}})).then(function(_){return(0,U.locateWindow)().msCrypto.subtle.sign(T.SHA_256_HMAC_ALGO,_)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,U.locateWindow)().msCrypto.subtle.digest("SHA-256"))},Sha256}();function toArrayBufferView(_){return"string"==typeof _?(0,L.fromUtf8)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}m.Sha256=F},63037:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.WebCryptoSha256=m.Ie11Sha256=void 0,C(8397).__exportStar(C(94511),m);var R=C(43039);Object.defineProperty(m,"Ie11Sha256",{enumerable:!0,get:function(){return R.Sha256}});var T=C(47059);Object.defineProperty(m,"WebCryptoSha256",{enumerable:!0,get:function(){return T.Sha256}})},19982:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},47059:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(61558),T=C(33579),L=C(56495),U=function(){function Sha256(_){this.toHash=new Uint8Array(0),this.secret=_,this.reset()}return Sha256.prototype.update=function(_){if(!(0,R.isEmptyData)(_)){var m=(0,R.convertToBuffer)(_),C=new Uint8Array(this.toHash.byteLength+m.byteLength);C.set(this.toHash,0),C.set(m,this.toHash.byteLength),this.toHash=C}},Sha256.prototype.digest=function(){var _=this;return this.key?this.key.then(function(m){return(0,L.locateWindow)().crypto.subtle.sign(T.SHA_256_HMAC_ALGO,m,_.toHash).then(function(_){return new Uint8Array(_)})}):(0,R.isEmptyData)(this.toHash)?Promise.resolve(T.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,L.locateWindow)().crypto.subtle.digest(T.SHA_256_HASH,_.toHash)}).then(function(_){return Promise.resolve(new Uint8Array(_))})},Sha256.prototype.reset=function(){var _=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(m,C){(0,L.locateWindow)().crypto.subtle.importKey("raw",(0,R.convertToBuffer)(_.secret),T.SHA_256_HMAC_ALGO,!1,["sign"]).then(m,C)}),this.key.catch(function(){}))},Sha256}();m.Sha256=U},8397:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},54486:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.RawSha256=void 0;var R=C(68094),T=function(){function RawSha256(){this.state=Int32Array.from(R.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return RawSha256.prototype.update=function(_){if(this.finished)throw Error("Attempted to update an already finished hash.");var m=0,C=_.byteLength;if(this.bytesHashed+=C,8*this.bytesHashed>R.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;C>0;)this.buffer[this.bufferLength++]=_[m++],C--,this.bufferLength===R.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},RawSha256.prototype.digest=function(){if(!this.finished){var _=8*this.bytesHashed,m=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),C=this.bufferLength;if(m.setUint8(this.bufferLength++,128),C%R.BLOCK_SIZE>=R.BLOCK_SIZE-8){for(var T=this.bufferLength;T>>24&255,L[4*T+1]=this.state[T]>>>16&255,L[4*T+2]=this.state[T]>>>8&255,L[4*T+3]=this.state[T]>>>0&255;return L},RawSha256.prototype.hashBuffer=function(){for(var _=this.buffer,m=this.state,C=m[0],T=m[1],L=m[2],U=m[3],F=m[4],B=m[5],$=m[6],H=m[7],V=0;V>>17|q<<15)^(q>>>19|q<<13)^q>>>10,K=((q=this.temp[V-15])>>>7|q<<25)^(q>>>18|q<<14)^q>>>3;this.temp[V]=(G+this.temp[V-7]|0)+(K+this.temp[V-16]|0)}var Z=(((F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7))+(F&B^~F&$)|0)+(H+(R.KEY[V]+this.temp[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&L^T&L)|0;H=$,$=B,B=F,F=U+Z|0,U=L,L=T,T=C,C=Z+W|0}m[0]+=C,m[1]+=T,m[2]+=L,m[3]+=U,m[4]+=F,m[5]+=B,m[6]+=$,m[7]+=H},RawSha256}();m.RawSha256=T},68094:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.MAX_HASHABLE_LENGTH=m.INIT=m.KEY=m.DIGEST_LENGTH=m.BLOCK_SIZE=void 0,m.BLOCK_SIZE=64,m.DIGEST_LENGTH=32,m.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),m.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],m.MAX_HASHABLE_LENGTH=9007199254740991},47162:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(41798).__exportStar(C(5119),m)},5119:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.Sha256=void 0;var R=C(41798),T=C(68094),L=C(54486),U=C(61558),F=function(){function Sha256(_){this.secret=_,this.hash=new L.RawSha256,this.reset()}return Sha256.prototype.update=function(_){if(!(0,U.isEmptyData)(_)&&!this.error)try{this.hash.update((0,U.convertToBuffer)(_))}catch(_){this.error=_}},Sha256.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Sha256.prototype.digest=function(){return R.__awaiter(this,void 0,void 0,function(){return R.__generator(this,function(_){return[2,this.digestSync()]})})},Sha256.prototype.reset=function(){if(this.hash=new L.RawSha256,this.secret){this.outer=new L.RawSha256;var _=function(_){var m=(0,U.convertToBuffer)(_);if(m.byteLength>T.BLOCK_SIZE){var C=new L.RawSha256;C.update(m),m=C.digest()}var R=new Uint8Array(T.BLOCK_SIZE);return R.set(m),R}(this.secret),m=new Uint8Array(T.BLOCK_SIZE);m.set(_);for(var C=0;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},53453:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),C(9481).__exportStar(C(37773),m)},37773:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.supportsZeroByteGCM=m.supportsSubtleCrypto=m.supportsSecureRandom=m.supportsWebCrypto=void 0;var R=C(9481),T=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsSecureRandom(_){return"object"==typeof _&&"object"==typeof _.crypto&&"function"==typeof _.crypto.getRandomValues}function supportsSubtleCrypto(_){return _&&T.every(function(m){return"function"==typeof _[m]})}m.supportsWebCrypto=function(_){return!!supportsSecureRandom(_)&&"object"==typeof _.crypto.subtle&&supportsSubtleCrypto(_.crypto.subtle)},m.supportsSecureRandom=supportsSecureRandom,m.supportsSubtleCrypto=supportsSubtleCrypto,m.supportsZeroByteGCM=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:if(!supportsSubtleCrypto(_))return[2,!1];C.label=1;case 1:return C.trys.push([1,4,,5]),[4,_.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return m=C.sent(),[4,_.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},m,new Uint8Array(0))];case 3:return[2,16===C.sent().byteLength];case 4:return C.sent(),[2,!1];case 5:return[2]}})})}},9481:function(_,m,C){"use strict";C.r(m),C.d(m,{__assign:function(){return __assign},__asyncDelegator:function(){return __asyncDelegator},__asyncGenerator:function(){return __asyncGenerator},__asyncValues:function(){return __asyncValues},__await:function(){return __await},__awaiter:function(){return __awaiter},__classPrivateFieldGet:function(){return __classPrivateFieldGet},__classPrivateFieldSet:function(){return __classPrivateFieldSet},__createBinding:function(){return __createBinding},__decorate:function(){return __decorate},__exportStar:function(){return __exportStar},__extends:function(){return __extends},__generator:function(){return __generator},__importDefault:function(){return __importDefault},__importStar:function(){return __importStar},__makeTemplateObject:function(){return __makeTemplateObject},__metadata:function(){return __metadata},__param:function(){return __param},__read:function(){return __read},__rest:function(){return __rest},__spread:function(){return __spread},__spreadArrays:function(){return __spreadArrays},__values:function(){return __values}});/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics=function(_,m){return(extendStatics=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)m.hasOwnProperty(C)&&(_[C]=m[C])})(_,m)};function __extends(_,m){function __(){this.constructor=_}extendStatics(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function(_){for(var m,C=1,R=arguments.length;Cm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},91189:function(_,m,C){"use strict";var R=C(48764).lW;Object.defineProperty(m,"__esModule",{value:!0}),m.convertToBuffer=void 0;var T=C(98143),L=void 0!==R&&R.from?function(_){return R.from(_,"utf8")}:T.fromUtf8;m.convertToBuffer=function(_){return _ instanceof Uint8Array?_:"string"==typeof _?L(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)}},61558:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=m.numToUint8=m.isEmptyData=m.convertToBuffer=void 0;var R=C(91189);Object.defineProperty(m,"convertToBuffer",{enumerable:!0,get:function(){return R.convertToBuffer}});var T=C(59924);Object.defineProperty(m,"isEmptyData",{enumerable:!0,get:function(){return T.isEmptyData}});var L=C(26747);Object.defineProperty(m,"numToUint8",{enumerable:!0,get:function(){return L.numToUint8}});var U=C(8919);Object.defineProperty(m,"uint32ArrayFrom",{enumerable:!0,get:function(){return U.uint32ArrayFrom}})},59924:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.isEmptyData=void 0,m.isEmptyData=function(_){return"string"==typeof _?0===_.length:0===_.byteLength}},26747:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.numToUint8=void 0,m.numToUint8=function(_){return new Uint8Array([(4278190080&_)>>24,(16711680&_)>>16,(65280&_)>>8,255&_])}},8919:function(_,m){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.uint32ArrayFrom=void 0,m.uint32ArrayFrom=function(_){if(!Uint32Array.from){for(var m=new Uint32Array(_.length),C=0;C<_.length;)m[C]=_[C],C+=1;return m}return Uint32Array.from(_)}},71769:function(_,m,C){"use strict";C.d(m,{eV:function(){return getRecursionDetectionPlugin}});var R=C(91526),T=C(34155);let L="X-Amzn-Trace-Id",recursionDetectionMiddleware=_=>m=>async C=>{let{request:U}=C;if(!R.aW.isInstance(U)||"node"!==_.runtime||U.headers.hasOwnProperty(L))return m(C);let F=T.env.AWS_LAMBDA_FUNCTION_NAME,B=T.env._X_AMZN_TRACE_ID;return"string"==typeof F&&F.length>0&&"string"==typeof B&&B.length>0&&(U.headers[L]=B),m({...C,request:U})},U={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},getRecursionDetectionPlugin=_=>({applyToStack:m=>{m.add(recursionDetectionMiddleware(_),U)}})},63743:function(_,m,C){"use strict";C.d(m,{GW:function(){return getAwsRegionExtensionConfiguration},A1:function(){return resolveAwsRegionExtensionConfiguration}});let getAwsRegionExtensionConfiguration=_=>{let runtimeConfigRegion=async()=>{if(void 0===_.region)throw Error("Region is missing from runtimeConfig");let m=_.region;return"string"==typeof m?m:m()};return{setRegion(_){runtimeConfigRegion=_},region:()=>runtimeConfigRegion}},resolveAwsRegionExtensionConfiguration=_=>({region:_.region()})},8794:function(_,m,C){"use strict";C.d(m,{Qj:function(){return getUserAgentPrefix},B1:function(){return resolveEndpoint}});var R,T,L={};C.r(L),C.d(L,{getUserAgentPrefix:function(){return getUserAgentPrefix},isVirtualHostableS3Bucket:function(){return isVirtualHostableS3Bucket},parseArn:function(){return parseArn},partition:function(){return partition},setPartitionInfo:function(){return setPartitionInfo},useDefaultPartitionInfo:function(){return useDefaultPartitionInfo}});var U={};C.r(U),C.d(U,{aws:function(){return L},booleanEquals:function(){return booleanEquals},getAttr:function(){return getAttr},isSet:function(){return isSet},isValidHostLabel:function(){return isValidHostLabel},not:function(){return not},parseURL:function(){return parseURL},stringEquals:function(){return stringEquals},substring:function(){return substring},uriEncode:function(){return uriEncode}});var F=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}');let B=F,$="",partition=_=>{let{partitions:m}=B;for(let C of m){let{regions:m,outputs:R}=C;for(let[C,T]of Object.entries(m))if(C===_)return{...R,...T}}for(let C of m){let{regionRegex:m,outputs:R}=C;if(new RegExp(m).test(_))return{...R}}let C=m.find(_=>"aws"===_.id);if(!C)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...C.outputs}},setPartitionInfo=(_,m="")=>{B=_,$=m},useDefaultPartitionInfo=()=>{setPartitionInfo(F,"")},getUserAgentPrefix=()=>$,H="endpoints";function toDebugString(_){return"object"!=typeof _||null==_?_:"ref"in _?`$${toDebugString(_.ref)}`:"fn"in _?`${_.fn}(${(_.argv||[]).map(toDebugString).join(", ")})`:JSON.stringify(_,null,2)}let EndpointError=class EndpointError extends Error{constructor(_){super(_),this.name="EndpointError"}};let V=RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),isIpAddress=_=>V.test(_)||_.startsWith("[")&&_.endsWith("]"),q=RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),isValidHostLabel=(_,m=!1)=>{if(!m)return q.test(_);let C=_.split(".");for(let _ of C)if(!isValidHostLabel(_))return!1;return!0},isVirtualHostableS3Bucket=(_,m=!1)=>{if(m){for(let m of _.split("."))if(!isVirtualHostableS3Bucket(m))return!1;return!0}return!(!isValidHostLabel(_)||_.length<3||_.length>63||_!==_.toLowerCase()||isIpAddress(_))},parseArn=_=>{let m=_.split(":");if(m.length<6)return null;let[C,R,T,L,U,...F]=m;return"arn"!==C||""===R||""===T||""===F[0]?null:{partition:R,service:T,region:L,accountId:U,resourceId:F[0].includes("/")?F[0].split("/"):F}},booleanEquals=(_,m)=>_===m,getAttrPathList=_=>{let m=_.split("."),C=[];for(let R of m){let m=R.indexOf("[");if(-1!==m){if(R.indexOf("]")!==R.length-1)throw new EndpointError(`Path: '${_}' does not end with ']'`);let T=R.slice(m+1,-1);if(Number.isNaN(parseInt(T)))throw new EndpointError(`Invalid array index: '${T}' in path: '${_}'`);0!==m&&C.push(R.slice(0,m)),C.push(T)}else C.push(R)}return C},getAttr=(_,m)=>getAttrPathList(m).reduce((C,R)=>{if("object"!=typeof C)throw new EndpointError(`Index '${R}' in '${m}' not found in '${JSON.stringify(_)}'`);return Array.isArray(C)?C[parseInt(R)]:C[R]},_),isSet=_=>null!=_,not=_=>!_;var G=C(97761);(R=T||(T={})).AAAA="AAAA",R.A="A";let K={[G.cj.HTTP]:80,[G.cj.HTTPS]:443},parseURL=_=>{let m=(()=>{try{if(_ instanceof URL)return _;if("object"==typeof _&&"hostname"in _){let{hostname:m,port:C,protocol:R="",path:T="",query:L={}}=_,U=new URL(`${R}//${m}${C?`:${C}`:""}${T}`);return U.search=Object.entries(L).map(([_,m])=>`${_}=${m}`).join("&"),U}return new URL(_)}catch(_){return null}})();if(!m)return console.error(`Unable to parse ${JSON.stringify(_)} as a whatwg URL.`),null;let C=m.href,{host:R,hostname:T,pathname:L,protocol:U,search:F}=m;if(F)return null;let B=U.slice(0,-1);if(!Object.values(G.cj).includes(B))return null;let $=isIpAddress(T),H=C.includes(`${R}:${K[B]}`)||"string"==typeof _&&_.includes(`${R}:${K[B]}`),V=`${R}${H?`:${K[B]}`:""}`;return{scheme:B,authority:V,path:L,normalizedPath:L.endsWith("/")?L:`${L}/`,isIp:$}},stringEquals=(_,m)=>_===m,substring=(_,m,C,R)=>m>=C||_.lengthencodeURIComponent(_).replace(/[!*'()]/g,_=>`%${_.charCodeAt(0).toString(16).toUpperCase()}`),evaluateTemplate=(_,m)=>{let C=[],R={...m.endpointParams,...m.referenceRecord},T=0;for(;T<_.length;){let m=_.indexOf("{",T);if(-1===m){C.push(_.slice(T));break}C.push(_.slice(T,m));let L=_.indexOf("}",m);if(-1===L){C.push(_.slice(m));break}"{"===_[m+1]&&"}"===_[L+1]&&(C.push(_.slice(m+1,L)),T=L+2);let U=_.substring(m+1,L);if(U.includes("#")){let[_,m]=U.split("#");C.push(getAttr(R[_],m))}else C.push(R[U]);T=L+1}return C.join("")},getReferenceValue=({ref:_},m)=>{let C={...m.endpointParams,...m.referenceRecord};return C[_]},evaluateExpression=(_,m,C)=>{if("string"==typeof _)return evaluateTemplate(_,C);if(_.fn)return callFunction(_,C);if(_.ref)return getReferenceValue(_,C);throw new EndpointError(`'${m}': ${String(_)} is not a string, function or reference.`)},callFunction=({fn:_,argv:m},C)=>{let R=m.map(_=>["boolean","number"].includes(typeof _)?_:evaluateExpression(_,"arg",C));return _.split(".").reduce((_,m)=>_[m],U)(...R)},evaluateCondition=({assign:_,...m},C)=>{if(_&&_ in C.referenceRecord)throw new EndpointError(`'${_}' is already defined in Reference Record.`);let R=callFunction(m,C);return C.logger?.debug?.(H,`evaluateCondition: ${toDebugString(m)} = ${toDebugString(R)}`),{result:""===R||!!R,...null!=_&&{toAssign:{name:_,value:R}}}},evaluateConditions=(_=[],m)=>{let C={};for(let R of _){let{result:_,toAssign:T}=evaluateCondition(R,{...m,referenceRecord:{...m.referenceRecord,...C}});if(!_)return{result:_};T&&(C[T.name]=T.value,m.logger?.debug?.(H,`assign: ${T.name} := ${toDebugString(T.value)}`))}return{result:!0,referenceRecord:C}},getEndpointHeaders=(_,m)=>Object.entries(_).reduce((_,[C,R])=>({..._,[C]:R.map(_=>{let R=evaluateExpression(_,"Header value entry",m);if("string"!=typeof R)throw new EndpointError(`Header '${C}' value '${R}' is not a string`);return R})}),{}),getEndpointProperty=(_,m)=>{if(Array.isArray(_))return _.map(_=>getEndpointProperty(_,m));switch(typeof _){case"string":return evaluateTemplate(_,m);case"object":if(null===_)throw new EndpointError(`Unexpected endpoint property: ${_}`);return getEndpointProperties(_,m);case"boolean":return _;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof _}`)}},getEndpointProperties=(_,m)=>Object.entries(_).reduce((_,[C,R])=>({..._,[C]:getEndpointProperty(R,m)}),{}),getEndpointUrl=(_,m)=>{let C=evaluateExpression(_,"Endpoint URL",m);if("string"==typeof C)try{return new URL(C)}catch(_){throw console.error(`Failed to construct URL with ${C}`,_),_}throw new EndpointError(`Endpoint URL must be a string, got ${typeof C}`)},evaluateEndpointRule=(_,m)=>{let{conditions:C,endpoint:R}=_,{result:T,referenceRecord:L}=evaluateConditions(C,m);if(!T)return;let U={...m,referenceRecord:{...m.referenceRecord,...L}},{url:F,properties:B,headers:$}=R;return m.logger?.debug?.(H,`Resolving endpoint from template: ${toDebugString(R)}`),{...void 0!=$&&{headers:getEndpointHeaders($,U)},...void 0!=B&&{properties:getEndpointProperties(B,U)},url:getEndpointUrl(F,U)}},evaluateErrorRule=(_,m)=>{let{conditions:C,error:R}=_,{result:T,referenceRecord:L}=evaluateConditions(C,m);if(T)throw new EndpointError(evaluateExpression(R,"Error",{...m,referenceRecord:{...m.referenceRecord,...L}}))},evaluateTreeRule=(_,m)=>{let{conditions:C,rules:R}=_,{result:T,referenceRecord:L}=evaluateConditions(C,m);if(T)return evaluateRules(R,{...m,referenceRecord:{...m.referenceRecord,...L}})},evaluateRules=(_,m)=>{for(let C of _)if("endpoint"===C.type){let _=evaluateEndpointRule(C,m);if(_)return _}else if("error"===C.type)evaluateErrorRule(C,m);else if("tree"===C.type){let _=evaluateTreeRule(C,m);if(_)return _}else throw new EndpointError(`Unknown endpoint rule: ${C}`);throw new EndpointError("Rules evaluation failed")},resolveEndpoint=(_,m)=>{let{endpointParams:C,logger:R}=m,{parameters:T,rules:L}=_;m.logger?.debug?.(`${H} Initial EndpointParams: ${toDebugString(C)}`);let U=Object.entries(T).filter(([,_])=>null!=_.default).map(([_,m])=>[_,m.default]);if(U.length>0)for(let[_,m]of U)C[_]=C[_]??m;let F=Object.entries(T).filter(([,_])=>_.required).map(([_])=>_);for(let _ of F)if(null==C[_])throw new EndpointError(`Missing required parameter: '${_}'`);let B=evaluateRules(L,{endpointParams:C,logger:R,referenceRecord:{}});if(m.endpointParams?.Endpoint)try{let _=new URL(m.endpointParams.Endpoint),{protocol:C,port:R}=_;B.url.protocol=C,B.url.port=R}catch(_){}return m.logger?.debug?.(`${H} Resolved endpoint: ${toDebugString(B)}`),B}},56495:function(_,m,C){"use strict";C.r(m),C.d(m,{locateWindow:function(){return locateWindow}});let R={};function locateWindow(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:R}},98143:function(_,m,C){"use strict";C.r(m),C.d(m,{fromUtf8:function(){return es_fromUtf8},toUtf8:function(){return es_toUtf8}});var fromUtf8=function(_){for(var m=[],C=0,R=_.length;C>6|192,63&T|128);else if(C+1<_.length&&(64512&T)==55296&&(64512&_.charCodeAt(C+1))==56320){var L=65536+((1023&T)<<10)+(1023&_.charCodeAt(++C));m.push(L>>18|240,L>>12&63|128,L>>6&63|128,63&L|128)}else m.push(T>>12|224,T>>6&63|128,63&T|128)}return Uint8Array.from(m)},toUtf8=function(_){for(var m="",C=0,R=_.length;C1?m-1:0),R=1;R3?m.i-4:m.i:Array.isArray(_)?1:s(_)?2:v(_)?3:0}function u(_,m){return 2===o(_)?_.has(m):Object.prototype.hasOwnProperty.call(_,m)}function f(_,m,C){var R=o(_);2===R?_.set(m,C):3===R?_.add(C):_[m]=C}function c(_,m){return _===m?0!==_||1/_==1/m:_!=_&&m!=m}function s(_){return F&&_ instanceof Map}function v(_){return B&&_ instanceof Set}function p(_){return _.o||_.t}function l(_){if(Array.isArray(_))return Array.prototype.slice.call(_);var m=Z(_);delete m[q];for(var C=K(m),R=0;R1&&(_.set=_.add=_.clear=_.delete=h),Object.freeze(_),m&&i(_,function(_,m){return d(m,!0)},!0)),_}function h(){n(2)}function y(_){return null==_||"object"!=typeof _||Object.isFrozen(_)}function b(_){var m=W[_];return m||n(18,_),m}function j(_,m){m&&(b("Patches"),_.u=[],_.s=[],_.v=m)}function g(_){O(_),_.p.forEach(S),_.p=null}function O(_){_===L&&(L=_.l)}function w(_){return L={p:[],l:L,h:_,m:!0,_:0}}function S(_){var m=_[q];0===m.i||1===m.i?m.j():m.g=!0}function P(_,m){m._=m.p.length;var C=m.p[0],R=void 0!==_&&_!==C;return m.h.O||b("ES5").S(m,_,R),R?(C[q].P&&(g(m),n(4)),t(_)&&(_=M(m,_),m.l||x(m,_)),m.u&&b("Patches").M(C[q].t,_,m.u,m.s)):_=M(m,C,[]),g(m),m.u&&m.v(m.u,m.s),_!==H?_:void 0}function M(_,m,C){if(y(m))return m;var R=m[q];if(!R)return i(m,function(T,L){return A(_,R,m,T,L,C)},!0),m;if(R.A!==_)return m;if(!R.P)return x(_,R.t,!0),R.t;if(!R.I){R.I=!0,R.A._--;var T=4===R.i||5===R.i?R.o=l(R.k):R.o,L=T,U=!1;3===R.i&&(L=new Set(T),T.clear(),U=!0),i(L,function(m,L){return A(_,R,T,m,L,C,U)}),x(_,T,!1),C&&_.u&&b("Patches").N(R,C,_.u,_.s)}return R.o}function A(_,m,C,R,T,L,U){if(r(T)){var F=M(_,T,L&&m&&3!==m.i&&!u(m.R,R)?L.concat(R):void 0);if(f(C,R,F),!r(F))return;_.m=!1}else U&&C.add(T);if(t(T)&&!y(T)){if(!_.h.D&&_._<1)return;M(_,T),m&&m.A.l||x(_,T)}}function x(_,m,C){void 0===C&&(C=!1),!_.l&&_.h.D&&_.m&&d(m,C)}function z(_,m){var C=_[q];return(C?p(C):_)[m]}function I(_,m){if(m in _)for(var C=Object.getPrototypeOf(_);C;){var R=Object.getOwnPropertyDescriptor(C,m);if(R)return R;C=Object.getPrototypeOf(C)}}function k(_){_.P||(_.P=!0,_.l&&k(_.l))}function E(_){_.o||(_.o=l(_.t))}function N(_,m,C){var R,T,U,F,B,$,H,V=s(m)?b("MapSet").F(m,C):v(m)?b("MapSet").T(m,C):_.O?(U=T={i:(R=Array.isArray(m))?1:0,A:C?C.A:L,P:!1,I:!1,R:{},l:C,t:m,k:null,o:null,j:null,C:!1},F=Y,R&&(U=[T],F=J),$=(B=Proxy.revocable(U,F)).revoke,H=B.proxy,T.k=H,T.j=$,H):b("ES5").J(m,C);return(C?C.A:L).p.push(V),V}function D(_,m){switch(m){case 2:return new Map(_);case 3:return Array.from(_)}return l(_)}C.d(m,{xC:function(){return configureStore},oM:function(){return createSlice}});var R,T,L,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),F="undefined"!=typeof Map,B="undefined"!=typeof Set,$="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=U?Symbol.for("immer-nothing"):((T={})["immer-nothing"]=!0,T),V=U?Symbol.for("immer-draftable"):"__$immer_draftable",q=U?Symbol.for("immer-state"):"__$immer_state",G=""+Object.prototype.constructor,K="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:Object.getOwnPropertyNames,Z=Object.getOwnPropertyDescriptors||function(_){var m={};return K(_).forEach(function(C){m[C]=Object.getOwnPropertyDescriptor(_,C)}),m},W={},Y={get:function(_,m){if(m===q)return _;var C,R,T=p(_);if(!u(T,m))return(R=I(T,m))?"value"in R?R.value:null===(C=R.get)||void 0===C?void 0:C.call(_.k):void 0;var L=T[m];return _.I||!t(L)?L:L===z(_.t,m)?(E(_),_.o[m]=N(_.A.h,L,_)):L},has:function(_,m){return m in p(_)},ownKeys:function(_){return Reflect.ownKeys(p(_))},set:function(_,m,C){var R=I(p(_),m);if(null==R?void 0:R.set)return R.set.call(_.k,C),!0;if(!_.P){var T=z(p(_),m),L=null==T?void 0:T[q];if(L&&L.t===C)return _.o[m]=C,_.R[m]=!1,!0;if(c(C,T)&&(void 0!==C||u(_.t,m)))return!0;E(_),k(_)}return _.o[m]===C&&(void 0!==C||m in _.o)||Number.isNaN(C)&&Number.isNaN(_.o[m])||(_.o[m]=C,_.R[m]=!0),!0},deleteProperty:function(_,m){return void 0!==z(_.t,m)||m in _.t?(_.R[m]=!1,E(_),k(_)):delete _.R[m],_.o&&delete _.o[m],!0},getOwnPropertyDescriptor:function(_,m){var C=p(_),R=Reflect.getOwnPropertyDescriptor(C,m);return R?{writable:!0,configurable:1!==_.i||"length"!==m,enumerable:R.enumerable,value:C[m]}:R},defineProperty:function(){n(11)},getPrototypeOf:function(_){return Object.getPrototypeOf(_.t)},setPrototypeOf:function(){n(12)}},J={};i(Y,function(_,m){J[_]=function(){return arguments[0]=arguments[0][0],m.apply(this,arguments)}}),J.deleteProperty=function(_,m){return J.set.call(this,_,m,void 0)},J.set=function(_,m,C){return Y.set.call(this,_[0],m,C,_[0])};var Q=new(function(){function e(_){var m=this;this.O=$,this.D=!0,this.produce=function(_,C,R){if("function"==typeof _&&"function"!=typeof C){var T,L=C;return C=_,function(_){var R=this;void 0===_&&(_=L);for(var T=arguments.length,U=Array(T>1?T-1:0),F=1;F1?R-1:0),L=1;L=0;C--){var C,R=m[C];if(0===R.path.length&&"replace"===R.op){_=R.value;break}}C>-1&&(m=m.slice(C+1));var T=b("Patches").$;return r(_)?T(_,m):this.produce(_,function(_){return T(_,m)})},e}()),X=Q.produce;Q.produceWithPatches.bind(Q),Q.setAutoFreeze.bind(Q),Q.setUseProxies.bind(Q),Q.applyPatches.bind(Q),Q.createDraft.bind(Q),Q.finishDraft.bind(Q);var ee=C(45217);function createThunkMiddleware(_){return function(m){var C=m.dispatch,R=m.getState;return function(m){return function(T){return"function"==typeof T?T(C,R,_):m(T)}}}}var et=createThunkMiddleware();et.withExtraArgument=createThunkMiddleware,C(34155);var er=(R=function(_,m){return(R=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(_,m){_.__proto__=m}||function(_,m){for(var C in m)Object.prototype.hasOwnProperty.call(m,C)&&(_[C]=m[C])})(_,m)},function(_,m){if("function"!=typeof m&&null!==m)throw TypeError("Class extends value "+String(m)+" is not a constructor or null");function __(){this.constructor=_}R(_,m),_.prototype=null===m?Object.create(m):(__.prototype=m.prototype,new __)}),__generator=function(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=0;m--){var C=_[m][q];if(!C.P)switch(C.i){case 5:a(C)&&k(C);break;case 4:o(C)&&k(C)}}}function o(_){for(var m=_.t,C=_.k,R=K(C),T=R.length-1;T>=0;T--){var L=R[T];if(L!==q){var U=m[L];if(void 0===U&&!u(m,L))return!0;var F=C[L],B=F&&F[q];if(B?B.t!==U:!c(F,U))return!0}}var $=!!m[q];return R.length!==K(m).length+($?0:1)}function a(_){var m=_.k;if(m.length!==_.t.length)return!0;var C=Object.getOwnPropertyDescriptor(m,m.length-1);if(C&&!C.get)return!0;for(var R=0;R"string"==typeof _&&(_.startsWith("fips-")||_.endsWith("-fips")),getRealRegion=_=>isFipsRegion(_)?["fips-aws-global","aws-fips"].includes(_)?"us-east-1":_.replace(/fips-(dkr-|prod-)?|-fips/,""):_,resolveRegionConfig=_=>{let{region:m,useFipsEndpoint:C}=_;if(!m)throw Error("Region is missing");return{..._,region:async()=>{if("string"==typeof m)return getRealRegion(m);let _=await m();return getRealRegion(_)},useFipsEndpoint:async()=>{let _="string"==typeof m?m:await m();return!!isFipsRegion(_)||("function"!=typeof C?Promise.resolve(!!C):C())}}}},14912:function(_,m,C){"use strict";C.d(m,{Pg:function(){return EventStreamCodec},y7:function(){return HeaderMarshaller},Jx:function(){return MessageDecoderStream},Qj:function(){return MessageEncoderStream},kr:function(){return SmithyMessageDecoderStream},iF:function(){return SmithyMessageEncoderStream}});var R,T,L=C(94079),U=C(44562);let Int64=class Int64{constructor(_){if(this.bytes=_,8!==_.byteLength)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(_){if(_>0x7fffffffffffffff||_<-0x8000000000000000)throw Error(`${_} is too large (or, if negative, too small) to represent as an Int64`);let m=new Uint8Array(8);for(let C=7,R=Math.abs(Math.round(_));C>-1&&R>0;C--,R/=256)m[C]=R;return _<0&&negate(m),new Int64(m)}valueOf(){let _=this.bytes.slice(0),m=128&_[0];return m&&negate(_),parseInt((0,U.N)(_),16)*(m?-1:1)}toString(){return String(this.valueOf())}};function negate(_){for(let m=0;m<8;m++)_[m]^=255;for(let m=7;m>-1&&(_[m]++,0===_[m]);m--);}let HeaderMarshaller=class HeaderMarshaller{constructor(_,m){this.toUtf8=_,this.fromUtf8=m}format(_){let m=[];for(let C of Object.keys(_)){let R=this.fromUtf8(C);m.push(Uint8Array.from([R.byteLength]),R,this.formatHeaderValue(_[C]))}let C=new Uint8Array(m.reduce((_,m)=>_+m.byteLength,0)),R=0;for(let _ of m)C.set(_,R),R+=_.byteLength;return C}formatHeaderValue(_){switch(_.type){case"boolean":return Uint8Array.from([_.value?0:1]);case"byte":return Uint8Array.from([2,_.value]);case"short":let m=new DataView(new ArrayBuffer(3));return m.setUint8(0,3),m.setInt16(1,_.value,!1),new Uint8Array(m.buffer);case"integer":let C=new DataView(new ArrayBuffer(5));return C.setUint8(0,4),C.setInt32(1,_.value,!1),new Uint8Array(C.buffer);case"long":let R=new Uint8Array(9);return R[0]=5,R.set(_.value.bytes,1),R;case"binary":let T=new DataView(new ArrayBuffer(3+_.value.byteLength));T.setUint8(0,6),T.setUint16(1,_.value.byteLength,!1);let L=new Uint8Array(T.buffer);return L.set(_.value,3),L;case"string":let F=this.fromUtf8(_.value),B=new DataView(new ArrayBuffer(3+F.byteLength));B.setUint8(0,7),B.setUint16(1,F.byteLength,!1);let $=new Uint8Array(B.buffer);return $.set(F,3),$;case"timestamp":let H=new Uint8Array(9);return H[0]=8,H.set(Int64.fromNumber(_.value.valueOf()).bytes,1),H;case"uuid":if(!W.test(_.value))throw Error(`Invalid UUID received: ${_.value}`);let V=new Uint8Array(17);return V[0]=9,V.set((0,U.H)(_.value.replace(/\-/g,"")),1),V}}parse(_){let m={},C=0;for(;C<_.byteLength;){let R=_.getUint8(C++),T=this.toUtf8(new Uint8Array(_.buffer,_.byteOffset+C,R));switch(C+=R,_.getUint8(C++)){case 0:m[T]={type:F,value:!0};break;case 1:m[T]={type:F,value:!1};break;case 2:m[T]={type:B,value:_.getInt8(C++)};break;case 3:m[T]={type:$,value:_.getInt16(C,!1)},C+=2;break;case 4:m[T]={type:H,value:_.getInt32(C,!1)},C+=4;break;case 5:m[T]={type:V,value:new Int64(new Uint8Array(_.buffer,_.byteOffset+C,8))},C+=8;break;case 6:let L=_.getUint16(C,!1);C+=2,m[T]={type:q,value:new Uint8Array(_.buffer,_.byteOffset+C,L)},C+=L;break;case 7:let W=_.getUint16(C,!1);C+=2,m[T]={type:G,value:this.toUtf8(new Uint8Array(_.buffer,_.byteOffset+C,W))},C+=W;break;case 8:m[T]={type:K,value:new Date(new Int64(new Uint8Array(_.buffer,_.byteOffset+C,8)).valueOf())},C+=8;break;case 9:let Y=new Uint8Array(_.buffer,_.byteOffset+C,16);C+=16,m[T]={type:Z,value:`${(0,U.N)(Y.subarray(0,4))}-${(0,U.N)(Y.subarray(4,6))}-${(0,U.N)(Y.subarray(6,8))}-${(0,U.N)(Y.subarray(8,10))}-${(0,U.N)(Y.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return m}};(R=T||(T={}))[R.boolTrue=0]="boolTrue",R[R.boolFalse=1]="boolFalse",R[R.byte=2]="byte",R[R.short=3]="short",R[R.integer=4]="integer",R[R.long=5]="long",R[R.byteArray=6]="byteArray",R[R.string=7]="string",R[R.timestamp=8]="timestamp",R[R.uuid=9]="uuid";let F="boolean",B="byte",$="short",H="integer",V="long",q="binary",G="string",K="timestamp",Z="uuid",W=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let EventStreamCodec=class EventStreamCodec{constructor(_,m){this.headerMarshaller=new HeaderMarshaller(_,m),this.messageBuffer=[],this.isEndOfStream=!1}feed(_){this.messageBuffer.push(this.decode(_))}endOfStream(){this.isEndOfStream=!0}getMessage(){let _=this.messageBuffer.pop(),m=this.isEndOfStream;return{getMessage:()=>_,isEndOfStream:()=>m}}getAvailableMessages(){let _=this.messageBuffer;this.messageBuffer=[];let m=this.isEndOfStream;return{getMessages:()=>_,isEndOfStream:()=>m}}encode({headers:_,body:m}){let C=this.headerMarshaller.format(_),R=C.byteLength+m.byteLength+16,T=new Uint8Array(R),U=new DataView(T.buffer,T.byteOffset,T.byteLength),F=new L.Crc32;return U.setUint32(0,R,!1),U.setUint32(4,C.byteLength,!1),U.setUint32(8,F.update(T.subarray(0,8)).digest(),!1),T.set(C,12),T.set(m,C.byteLength+12),U.setUint32(R-4,F.update(T.subarray(8,R-4)).digest(),!1),T}decode(_){let{headers:m,body:C}=function({byteLength:_,byteOffset:m,buffer:C}){if(_<16)throw Error("Provided message too short to accommodate event stream message overhead");let R=new DataView(C,m,_),T=R.getUint32(0,!1);if(_!==T)throw Error("Reported message length does not match received message length");let U=R.getUint32(4,!1),F=R.getUint32(8,!1),B=R.getUint32(_-4,!1),$=new L.Crc32().update(new Uint8Array(C,m,8));if(F!==$.digest())throw Error(`The prelude checksum specified in the message (${F}) does not match the calculated CRC32 checksum (${$.digest()})`);if($.update(new Uint8Array(C,m+8,_-12)),B!==$.digest())throw Error(`The message checksum (${$.digest()}) did not match the expected value of ${B}`);return{headers:new DataView(C,m+8+4,U),body:new Uint8Array(C,m+8+4+U,T-U-16)}}(_);return{headers:this.headerMarshaller.parse(m),body:C}}formatHeaders(_){return this.headerMarshaller.format(_)}};let MessageDecoderStream=class MessageDecoderStream{constructor(_){this.options=_}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let _ of this.options.inputStream){let m=this.options.decoder.decode(_);yield m}}};let MessageEncoderStream=class MessageEncoderStream{constructor(_){this.options=_}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let _ of this.options.messageStream){let m=this.options.encoder.encode(_);yield m}this.options.includeEndFrame&&(yield new Uint8Array(0))}};let SmithyMessageDecoderStream=class SmithyMessageDecoderStream{constructor(_){this.options=_}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let _ of this.options.messageStream){let m=await this.options.deserializer(_);void 0!==m&&(yield m)}}};let SmithyMessageEncoderStream=class SmithyMessageEncoderStream{constructor(_){this.options=_}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let _ of this.options.inputStream){let m=this.options.serializer(_);yield m}}}},39627:function(_,m,C){"use strict";C.d(m,{BX:function(){return FetchHttpHandler},CF:function(){return streamCollector}});var R=C(91526),T=C(55388);let L={supported:!!("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]"))};let FetchHttpHandler=class FetchHttpHandler{constructor(_){"function"==typeof _?this.configProvider=_().then(_=>_||{}):(this.config=_??{},this.configProvider=Promise.resolve(this.config))}destroy(){}async handle(_,{abortSignal:m}={}){this.config||(this.config=await this.configProvider);let C=this.config.requestTimeout,U=!0===this.config.keepAlive;if(m?.aborted){let _=Error("Request aborted");return _.name="AbortError",Promise.reject(_)}let F=_.path,B=function(_){let m=[];for(let C of Object.keys(_).sort()){let R=_[C];if(C=(0,T.i)(C),Array.isArray(R))for(let _=0,L=R.length;_{let m=_.headers,C={};for(let _ of m.entries())C[_[0]]=_[1];let T=void 0!=_.body;return T?{response:new R.Zn({headers:C,reason:_.statusText,statusCode:_.status,body:_.body})}:_.blob().then(m=>({response:new R.Zn({headers:C,reason:_.statusText,statusCode:_.status,body:m})}))}),function(_=0){return new Promise((m,C)=>{_&&setTimeout(()=>{let m=Error(`Request did not complete within ${_} ms`);m.name="TimeoutError",C(m)},_)})}(C)];return m&&W.push(new Promise((_,C)=>{m.onabort=()=>{let _=Error("Request aborted");_.name="AbortError",C(_)}})),Promise.race(W)}updateHttpClientConfig(_,m){this.config=void 0,this.configProvider=this.configProvider.then(C=>(C[_]=m,C))}httpHandlerConfigs(){return this.config??{}}};var U=C(10687);let streamCollector=_=>"function"==typeof Blob&&_ instanceof Blob?collectBlob(_):collectStream(_);async function collectBlob(_){let m=await new Promise((m,C)=>{let R=new FileReader;R.onloadend=()=>{if(2!==R.readyState)return C(Error("Reader aborted too early"));let _=R.result??"",T=_.indexOf(","),L=T>-1?T+1:_.length;m(_.substring(L))},R.onabort=()=>C(Error("Read aborted")),R.onerror=()=>C(R.error),R.readAsDataURL(_)}),C=(0,U.G)(m);return new Uint8Array(C)}async function collectStream(_){let m=new Uint8Array(0),C=_.getReader(),R=!1;for(;!R;){let{done:_,value:T}=await C.read();if(T){let _=m;(m=new Uint8Array(_.length+T.length)).set(_),m.set(T,_.length)}R=_}return m}},33131:function(_,m,C){"use strict";C.d(m,{n:function(){return invalidProvider}});let invalidProvider=_=>()=>Promise.reject(_)},52326:function(_,m,C){"use strict";C.d(m,{VG:function(){return getContentLengthPlugin}});var R=C(91526);let T="content-length",L={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},getContentLengthPlugin=_=>({applyToStack:m=>{var C;m.add((C=_.bodyLengthChecker,_=>async m=>{let L=m.request;if(R.aW.isInstance(L)){let{body:_,headers:m}=L;if(_&&-1===Object.keys(m).map(_=>_.toLowerCase()).indexOf(T))try{let m=C(_);L.headers={...L.headers,[T]:String(m)}}catch(_){}}return _({...m,request:L})}),L)}})},45597:function(_,m,C){"use strict";C.d(m,{a3:function(){return getEndpointPlugin},uW:function(){return resolveEndpointConfig}});var R=C(45410);let resolveParamsForS3=async _=>{let m=_?.Bucket||"";if("string"==typeof _.Bucket&&(_.Bucket=m.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),isArnBucketName(m)){if(!0===_.ForcePathStyle)throw Error("Path-style addressing cannot be used with ARN buckets")}else isDnsCompatibleBucketName(m)&&(-1===m.indexOf(".")||String(_.Endpoint).startsWith("http:"))&&m.toLowerCase()===m&&!(m.length<3)||(_.ForcePathStyle=!0);return _.DisableMultiRegionAccessPoints&&(_.disableMultiRegionAccessPoints=!0,_.DisableMRAP=!0),_},T=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,L=/(\d+\.){3}\d+/,U=/\.\./,isDnsCompatibleBucketName=_=>T.test(_)&&!L.test(_)&&!U.test(_),isArnBucketName=_=>{let[m,C,R,T,L,U]=_.split(":"),F="arn"===m&&_.split(":").length>=6,B=5===[m,C,R,L,U].filter(Boolean).length;if(F&&!B)throw Error(`Invalid ARN: ${_} was an invalid ARN.`);return"arn"===m&&!!C&&!!R&&!!L&&!!U},createConfigValueProvider=(_,m,C)=>{let configProvider=async()=>{let R=C[_]??C[m];return"function"==typeof R?R():R};return"endpoint"===_||"endpoint"===m?async()=>{let _=await configProvider();if(_&&"object"==typeof _){if("url"in _)return _.url.href;if("hostname"in _){let{protocol:m,hostname:C,port:R,path:T}=_;return`${m}//${C}${R?":"+R:""}${T}`}}return _}:configProvider},getEndpointFromConfig=async _=>void 0;var F=C(93294);let toEndpointV1=_=>"object"==typeof _?"url"in _?(0,F.e)(_.url):_:(0,F.e)(_),getEndpointFromInstructions=async(_,m,C,R)=>{if(!C.endpoint){let _=await getEndpointFromConfig(C.serviceId||"");_&&(C.endpoint=()=>Promise.resolve(toEndpointV1(_)))}let T=await resolveParams(_,m,C);if("function"!=typeof C.endpointProvider)throw Error("config.endpointProvider is not set.");let L=C.endpointProvider(T,R);return L},resolveParams=async(_,m,C)=>{let R={},T=m?.getEndpointParameterInstructions?.()||{};for(let[m,L]of Object.entries(T))switch(L.type){case"staticContextParams":R[m]=L.value;break;case"contextParams":R[m]=_[L.name];break;case"clientContextParams":case"builtInParams":R[m]=await createConfigValueProvider(L.name,m,C)();break;default:throw Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(L))}return 0===Object.keys(T).length&&Object.assign(R,C),"s3"===String(C.serviceId).toLowerCase()&&await resolveParamsForS3(R),R},endpointMiddleware=({config:_,instructions:m})=>(C,R)=>async T=>{let L=await getEndpointFromInstructions(T.input,{getEndpointParameterInstructions:()=>m},{..._},R);R.endpointV2=L,R.authSchemes=L.properties?.authSchemes;let U=R.authSchemes?.[0];return U&&(R.signing_region=U.signingRegion,R.signing_service=U.signingName),C({...T})},B={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:R.JK.name},getEndpointPlugin=(_,m)=>({applyToStack:C=>{C.addRelativeTo(endpointMiddleware({config:_,instructions:m}),B)}});var $=C(69080);let resolveEndpointConfig=_=>{let m=_.tls??!0,{endpoint:C}=_,R=null!=C?async()=>toEndpointV1(await (0,$.$)(C)()):void 0,T=!!C;return{..._,endpoint:R,tls:m,isCustomEndpoint:T,useDualstackEndpoint:(0,$.$)(_.useDualstackEndpoint??!1),useFipsEndpoint:(0,$.$)(_.useFipsEndpoint??!1)}}},11511:function(_,m,C){"use strict";C.d(m,{gn:function(){return getOmitRetryHeadersPlugin},NQ:function(){return getRetryPlugin},BC:function(){return resolveRetryConfig}});var R,T=C(63660),L=C(91526),U=C(69080);let F="AWS_MAX_ATTEMPTS",B="max_attempts";_=>{let m=_[F];if(!m)return;let C=parseInt(m);if(Number.isNaN(C))throw Error(`Environment variable ${F} mast be a number, got "${m}"`);return C},T.J;let resolveRetryConfig=_=>{let{retryStrategy:m}=_,C=(0,U.$)(_.maxAttempts??T.J);return{..._,maxAttempts:C,retryStrategy:async()=>{if(m)return m;let R=await (0,U.$)(_.retryMode)();return R===T.Ul.ADAPTIVE?new T.AY(C):new T.Uz(C)}}};_=>_.AWS_RETRY_MODE,T.CA;let omitRetryHeadersMiddleware=()=>_=>async m=>{let{request:C}=m;return L.aW.isInstance(C)&&(delete C.headers[T.lk],delete C.headers[T.r5]),_(m)},$={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},getOmitRetryHeadersPlugin=_=>({applyToStack:_=>{_.addRelativeTo(omitRetryHeadersMiddleware(),$)}});for(var H=C(87568),V=new Uint8Array(16),q=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,G=[],K=0;K<256;++K)G.push((K+256).toString(16).substr(1));var esm_browser_stringify=function(_){var m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,C=(G[_[m+0]]+G[_[m+1]]+G[_[m+2]]+G[_[m+3]]+"-"+G[_[m+4]]+G[_[m+5]]+"-"+G[_[m+6]]+G[_[m+7]]+"-"+G[_[m+8]]+G[_[m+9]]+"-"+G[_[m+10]]+G[_[m+11]]+G[_[m+12]]+G[_[m+13]]+G[_[m+14]]+G[_[m+15]]).toLowerCase();if(!("string"==typeof C&&q.test(C)))throw TypeError("Stringified UUID is invalid");return C},esm_browser_v4=function(_,m,C){var T=(_=_||{}).random||(_.rng||function(){if(!R&&!(R="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return R(V)})();if(T[6]=15&T[6]|64,T[8]=63&T[8]|128,m){C=C||0;for(var L=0;L<16;++L)m[C+L]=T[L];return m}return esm_browser_stringify(T)};let util_asSdkError=_=>_ instanceof Error?_:_ instanceof Object?Object.assign(Error(),_):"string"==typeof _?Error(_):Error(`AWS SDK error wrapper for ${_}`),retryMiddleware=_=>(m,C)=>async R=>{let U=await _.retryStrategy(),F=await _.maxAttempts();if(!isRetryStrategyV2(U))return U?.mode&&(C.userAgent=[...C.userAgent||[],["cfg/retry-mode",U.mode]]),U.retry(m,R);{let _=await U.acquireInitialRetryToken(C.partition_id),B=Error(),$=0,H=0,{request:V}=R;for(L.aW.isInstance(V)&&(V.headers[T.lk]=esm_browser_v4());;)try{L.aW.isInstance(V)&&(V.headers[T.r5]=`attempt=${$+1}; max=${F}`);let{response:C,output:B}=await m(R);return U.recordSuccess(_),B.$metadata.attempts=$+1,B.$metadata.totalRetryDelay=H,{response:C,output:B}}catch(R){let m=getRetryErrorInfo(R);B=util_asSdkError(R);try{_=await U.refreshRetryTokenForRetry(_,m)}catch(_){throw B.$metadata||(B.$metadata={}),B.$metadata.attempts=$+1,B.$metadata.totalRetryDelay=H,B}$=_.getRetryCount();let C=_.getRetryDelay();H+=C,await new Promise(_=>setTimeout(_,C))}}},isRetryStrategyV2=_=>void 0!==_.acquireInitialRetryToken&&void 0!==_.refreshRetryTokenForRetry&&void 0!==_.recordSuccess,getRetryErrorInfo=_=>{let m={errorType:getRetryErrorType(_)},C=getRetryAfterHint(_.$response);return C&&(m.retryAfterHint=C),m},getRetryErrorType=_=>(0,H.pK)(_)?"THROTTLING":(0,H.iH)(_)?"TRANSIENT":(0,H.o7)(_)?"SERVER_ERROR":"CLIENT_ERROR",Z={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},getRetryPlugin=_=>({applyToStack:m=>{m.add(retryMiddleware(_),Z)}}),getRetryAfterHint=_=>{if(!L.Zn.isInstance(_))return;let m=Object.keys(_.headers).find(_=>"retry-after"===_.toLowerCase());if(!m)return;let C=_.headers[m],R=Number(C);if(!Number.isNaN(R))return new Date(1e3*R);let T=new Date(C);return T}},45410:function(_,m,C){"use strict";C.d(m,{p2:function(){return getSerdePlugin},JK:function(){return T}});let deserializerMiddleware=(_,m)=>(C,R)=>async R=>{let{response:T}=await C(R);try{let C=await m(T,_);return{response:T,output:C}}catch(_){throw Object.defineProperty(_,"$response",{value:T}),"$metadata"in _||(_.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object."),_}},serializerMiddleware=(_,m)=>(C,R)=>async T=>{let L=R.endpointV2?.url&&_.urlParser?async()=>_.urlParser(R.endpointV2.url):_.endpoint;if(!L)throw Error("No valid endpoint provider available.");let U=await m(T.input,{..._,endpoint:L});return C({...T,request:U})},R={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},T={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function getSerdePlugin(_,m,C){return{applyToStack:L=>{L.add(deserializerMiddleware(_,C),R),L.add(serializerMiddleware(_,m),T)}}}},8243:function(_,m,C){"use strict";C.d(m,{H:function(){return memoize}});let memoize=(_,m,C)=>{let R,T,L;let U=!1,coalesceProvider=async()=>{T||(T=_());try{R=await T,L=!0,U=!1}finally{T=void 0}return R};return void 0===m?async _=>((!L||_?.forceRefresh)&&(R=await coalesceProvider()),R):async _=>((!L||_?.forceRefresh)&&(R=await coalesceProvider()),U||(C&&!C(R)?U=!0:m(R)&&await coalesceProvider()),R)}},91526:function(_,m,C){"use strict";C.d(m,{aW:function(){return HttpRequest},Zn:function(){return HttpResponse},cA:function(){return getHttpHandlerExtensionConfiguration},AO:function(){return resolveHttpHandlerRuntimeConfig}});let getHttpHandlerExtensionConfiguration=_=>{let m=_.httpHandler;return{setHttpHandler(_){m=_},httpHandler:()=>m,updateHttpClientConfig(_,C){m.updateHttpClientConfig(_,C)},httpHandlerConfigs:()=>m.httpHandlerConfigs()}},resolveHttpHandlerRuntimeConfig=_=>({httpHandler:_.httpHandler()});C(97761);let HttpRequest=class HttpRequest{constructor(_){this.method=_.method||"GET",this.hostname=_.hostname||"localhost",this.port=_.port,this.query=_.query||{},this.headers=_.headers||{},this.body=_.body,this.protocol=_.protocol?":"!==_.protocol.slice(-1)?`${_.protocol}:`:_.protocol:"https:",this.path=_.path?"/"!==_.path.charAt(0)?`/${_.path}`:_.path:"/",this.username=_.username,this.password=_.password,this.fragment=_.fragment}static isInstance(_){return!!_&&"method"in _&&"protocol"in _&&"hostname"in _&&"path"in _&&"object"==typeof _.query&&"object"==typeof _.headers}clone(){var _;let m=new HttpRequest({...this,headers:{...this.headers}});return m.query&&(m.query=Object.keys(_=m.query).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{})),m}};let HttpResponse=class HttpResponse{constructor(_){this.statusCode=_.statusCode,this.reason=_.reason,this.headers=_.headers||{},this.body=_.body}static isInstance(_){return!!_&&"number"==typeof _.statusCode&&"object"==typeof _.headers}}},87568:function(_,m,C){"use strict";C.d(m,{o7:function(){return isServerError},pK:function(){return isThrottlingError},iH:function(){return isTransientError}});let R=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],T=["TimeoutError","RequestTimeout","RequestTimeoutException"],L=[500,502,503,504],U=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],isThrottlingError=_=>_.$metadata?.httpStatusCode===429||R.includes(_.name)||_.$retryable?.throttling==!0,isTransientError=_=>T.includes(_.name)||U.includes(_?.code||"")||L.includes(_.$metadata?.httpStatusCode||0),isServerError=_=>{if(_.$metadata?.httpStatusCode!==void 0){let m=_.$metadata.httpStatusCode;if(500<=m&&m<=599&&!isTransientError(_))return!0}return!1}},69419:function(_,m,C){"use strict";C.d(m,{KU:function(){return Client},mY:function(){return Command},vk:function(){return NoOpLogger},oc:function(){return B},sI:function(){return ServiceException},F3:function(){return _json},Wg:function(){return collectBody},to:function(){return decorateServiceException},CE:function(){return expectNonNull},Fx:function(){return expectNumber},Wh:function(){return expectObject},pY:function(){return expectString},kE:function(){return getDefaultExtensionConfiguration},jv:function(){return loadConfigsForDefaultMode},UI:function(){return map},KX:function(){return parseEpochTimestamp},SQ:function(){return resolveDefaultRuntimeConfig},Is:function(){return resolvedPath},qn:function(){return take},PC:function(){return withBaseException}});let NoOpLogger=class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}};let getAllAliases=(_,m)=>{let C=[];if(_&&C.push(_),m)for(let _ of m)C.push(_);return C},getMiddlewareNameWithAliases=(_,m)=>`${_||"anonymous"}${m&&m.length>0?` (a.k.a. ${m.join(",")})`:""}`,constructStack=()=>{let _=[],m=[],C=!1,L=new Set,sort=_=>_.sort((_,m)=>R[m.step]-R[_.step]||T[m.priority||"normal"]-T[_.priority||"normal"]),removeByName=C=>{let R=!1,filterCb=_=>{let m=getAllAliases(_.name,_.aliases);if(m.includes(C)){for(let _ of(R=!0,m))L.delete(_);return!1}return!0};return _=_.filter(filterCb),m=m.filter(filterCb),R},removeByReference=C=>{let R=!1,filterCb=_=>{if(_.middleware===C){for(let m of(R=!0,getAllAliases(_.name,_.aliases)))L.delete(m);return!1}return!0};return _=_.filter(filterCb),m=m.filter(filterCb),R},cloneTo=C=>(_.forEach(_=>{C.add(_.middleware,{..._})}),m.forEach(_=>{C.addRelativeTo(_.middleware,{..._})}),C.identifyOnResolve?.(U.identifyOnResolve()),C),expandRelativeMiddlewareList=_=>{let m=[];return _.before.forEach(_=>{0===_.before.length&&0===_.after.length?m.push(_):m.push(...expandRelativeMiddlewareList(_))}),m.push(_),_.after.reverse().forEach(_=>{0===_.before.length&&0===_.after.length?m.push(_):m.push(...expandRelativeMiddlewareList(_))}),m},getMiddlewareList=(C=!1)=>{let R=[],T=[],L={};_.forEach(_=>{let m={..._,before:[],after:[]};for(let _ of getAllAliases(m.name,m.aliases))L[_]=m;R.push(m)}),m.forEach(_=>{let m={..._,before:[],after:[]};for(let _ of getAllAliases(m.name,m.aliases))L[_]=m;T.push(m)}),T.forEach(_=>{if(_.toMiddleware){let m=L[_.toMiddleware];if(void 0===m){if(C)return;throw Error(`${_.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(_.name,_.aliases)} middleware ${_.relation} ${_.toMiddleware}`)}"after"===_.relation&&m.after.push(_),"before"===_.relation&&m.before.push(_)}});let U=sort(R).map(expandRelativeMiddlewareList).reduce((_,m)=>(_.push(...m),_),[]);return U},U={add:(m,C={})=>{let{name:R,override:T,aliases:U}=C,F={step:"initialize",priority:"normal",middleware:m,...C},B=getAllAliases(R,U);if(B.length>0){if(B.some(_=>L.has(_))){if(!T)throw Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(R,U)}'`);for(let m of B){let C=_.findIndex(_=>_.name===m||_.aliases?.some(_=>_===m));if(-1===C)continue;let T=_[C];if(T.step!==F.step||F.priority!==T.priority)throw Error(`"${getMiddlewareNameWithAliases(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${getMiddlewareNameWithAliases(R,U)}" middleware with ${F.priority} priority in ${F.step} step.`);_.splice(C,1)}}for(let _ of B)L.add(_)}_.push(F)},addRelativeTo:(_,C)=>{let{name:R,override:T,aliases:U}=C,F={middleware:_,...C},B=getAllAliases(R,U);if(B.length>0){if(B.some(_=>L.has(_))){if(!T)throw Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(R,U)}'`);for(let _ of B){let C=m.findIndex(m=>m.name===_||m.aliases?.some(m=>m===_));if(-1===C)continue;let T=m[C];if(T.toMiddleware!==F.toMiddleware||T.relation!==F.relation)throw Error(`"${getMiddlewareNameWithAliases(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(R,U)}" middleware ${F.relation} "${F.toMiddleware}" middleware.`);m.splice(C,1)}}for(let _ of B)L.add(_)}m.push(F)},clone:()=>cloneTo(constructStack()),use:_=>{_.applyToStack(U)},remove:_=>"string"==typeof _?removeByName(_):removeByReference(_),removeByTag:C=>{let R=!1,filterCb=_=>{let{tags:m,name:T,aliases:U}=_;if(m&&m.includes(C)){let _=getAllAliases(T,U);for(let m of _)L.delete(m);return R=!0,!1}return!0};return _=_.filter(filterCb),m=m.filter(filterCb),R},concat:_=>{let m=cloneTo(constructStack());return m.use(_),m.identifyOnResolve(C||m.identifyOnResolve()||(_.identifyOnResolve?.()??!1)),m},applyToStack:cloneTo,identify:()=>getMiddlewareList(!0).map(_=>{let m=_.step??_.relation+" "+_.toMiddleware;return getMiddlewareNameWithAliases(_.name,_.aliases)+" - "+m}),identifyOnResolve:_=>("boolean"==typeof _&&(C=_),C),resolve:(_,m)=>{for(let C of getMiddlewareList().map(_=>_.middleware).reverse())_=C(_,m);return C&&console.log(U.identify()),_}};return U},R={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},T={high:3,normal:2,low:1};let Client=class Client{constructor(_){this.middlewareStack=constructStack(),this.config=_}send(_,m,C){let R="function"==typeof m?m:C,T=_.resolveMiddleware(this.middlewareStack,this.config,"function"!=typeof m?m:void 0);if(!R)return T(_).then(_=>_.output);T(_).then(_=>R(null,_.output),_=>R(_)).catch(()=>{})}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}};var L=C(10687),U=C(68504),F=C(37916);let Uint8ArrayBlobAdapter=class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(_,m="utf-8"){if("string"==typeof _)return"base64"===m?Uint8ArrayBlobAdapter.mutate((0,L.G)(_)):Uint8ArrayBlobAdapter.mutate((0,F.$)(_));throw Error(`Unsupported conversion from ${typeof _} to Uint8ArrayBlobAdapter.`)}static mutate(_){return Object.setPrototypeOf(_,Uint8ArrayBlobAdapter.prototype),_}transformToString(_="utf-8"){return function(_,m="utf-8"){return"base64"===m?(0,L.s)(_):(0,U.G)(_)}(this,_)}};C(39627),C(44562);let collectBody=async(_=new Uint8Array,m)=>{if(_ instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(_);if(!_)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);let C=m.streamCollector(_);return Uint8ArrayBlobAdapter.mutate(await C)};let Command=class Command{constructor(){this.middlewareStack=constructStack()}};let B="***SensitiveInformation***",expectNumber=_=>{if(null!=_){if("string"==typeof _){let m=parseFloat(_);if(!Number.isNaN(m))return String(m)!==String(_)&&H.warn(stackTraceWarning(`Expected number but observed string: ${_}`)),m}if("number"==typeof _)return _;throw TypeError(`Expected number, got ${typeof _}: ${_}`)}},expectNonNull=(_,m)=>{if(null==_){if(m)throw TypeError(`Expected a non-null value for ${m}`);throw TypeError("Expected a non-null value")}return _},expectObject=_=>{if(null==_)return;if("object"==typeof _&&!Array.isArray(_))return _;let m=Array.isArray(_)?"array":typeof _;throw TypeError(`Expected object, got ${m}: ${_}`)},expectString=_=>{if(null!=_){if("string"==typeof _)return _;if(["boolean","number","bigint"].includes(typeof _))return H.warn(stackTraceWarning(`Expected string, got ${typeof _}: ${_}`)),String(_);throw TypeError(`Expected string, got ${typeof _}: ${_}`)}},strictParseDouble=_=>"string"==typeof _?expectNumber(parseNumber(_)):expectNumber(_),$=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,parseNumber=_=>{let m=_.match($);if(null===m||m[0].length!==_.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(_)},stackTraceWarning=_=>String(TypeError(_).stack||_).split("\n").slice(0,5).filter(_=>!_.includes("stackTraceWarning")).join("\n"),H={warn:console.warn},parseEpochTimestamp=_=>{let m;if(null!=_){if("number"==typeof _)m=_;else if("string"==typeof _)m=strictParseDouble(_);else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(m)||m===1/0||m===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*m))}};let ServiceException=class ServiceException extends Error{constructor(_){super(_.message),Object.setPrototypeOf(this,ServiceException.prototype),this.name=_.name,this.$fault=_.$fault,this.$metadata=_.$metadata}};let decorateServiceException=(_,m={})=>{Object.entries(m).filter(([,_])=>void 0!==_).forEach(([m,C])=>{(void 0==_[m]||""===_[m])&&(_[m]=C)});let C=_.message||_.Message||"UnknownError";return _.message=C,delete _.Message,_},throwDefaultError=({output:_,parsedBody:m,exceptionCtor:C,errorCode:R})=>{let T=deserializeMetadata(_),L=T.httpStatusCode?T.httpStatusCode+"":void 0,U=new C({name:m?.code||m?.Code||R||L||"UnknownError",$fault:"client",$metadata:T});throw decorateServiceException(U,m)},withBaseException=_=>({output:m,parsedBody:C,errorCode:R})=>{throwDefaultError({output:m,parsedBody:C,exceptionCtor:_,errorCode:R})},deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),loadConfigsForDefaultMode=_=>{switch(_){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};var V=C(97761);let getChecksumConfiguration=_=>{let m=[];for(let C in V.f3){let R=V.f3[C];void 0!==_[R]&&m.push({algorithmId:()=>R,checksumConstructor:()=>_[R]})}return{_checksumAlgorithms:m,addChecksumAlgorithm(_){this._checksumAlgorithms.push(_)},checksumAlgorithms(){return this._checksumAlgorithms}}},resolveChecksumRuntimeConfig=_=>{let m={};return _.checksumAlgorithms().forEach(_=>{m[_.algorithmId()]=_.checksumConstructor()}),m},getRetryConfiguration=_=>{let m=_.retryStrategy;return{setRetryStrategy(_){m=_},retryStrategy:()=>m}},resolveRetryRuntimeConfig=_=>{let m={};return m.retryStrategy=_.retryStrategy(),m},getDefaultExtensionConfiguration=_=>({...getChecksumConfiguration(_),...getRetryConfiguration(_)}),resolveDefaultRuntimeConfig=_=>({...resolveChecksumRuntimeConfig(_),...resolveRetryRuntimeConfig(_)}),StringWrapper=function(){let _=Object.getPrototypeOf(this).constructor,m=Function.bind.apply(String,[null,...arguments]),C=new m;return Object.setPrototypeOf(C,_.prototype),C};function map(_,m,C){let R,T;if(void 0===m&&void 0===C)R={},T=_;else{if(R=_,"function"==typeof m)return mapWithFilter(R,m,T=C);T=m}for(let _ of Object.keys(T)){if(!Array.isArray(T[_])){R[_]=T[_];continue}applyInstruction(R,null,T,_)}return R}StringWrapper.prototype=Object.create(String.prototype,{constructor:{value:StringWrapper,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(StringWrapper,String);let take=(_,m)=>{let C={};for(let R in m)applyInstruction(C,_,m,R);return C},mapWithFilter=(_,m,C)=>map(_,Object.entries(C).reduce((_,[C,R])=>(Array.isArray(R)?_[C]=R:"function"==typeof R?_[C]=[m,R()]:_[C]=[m,R],_),{})),applyInstruction=(_,m,C,R)=>{if(null!==m){let T=C[R];"function"==typeof T&&(T=[,T]);let[L=nonNullish,U=pass,F=R]=T;("function"==typeof L&&L(m[F])||"function"!=typeof L&&L)&&(_[R]=U(m[F]));return}let[T,L]=C[R];if("function"==typeof L){let m;let C=void 0===T&&null!=(m=L()),U="function"==typeof T&&!!T(void 0)||"function"!=typeof T&&!!T;C?_[R]=m:U&&(_[R]=L())}else{let m=void 0===T&&null!=L,C="function"==typeof T&&!!T(L)||"function"!=typeof T&&!!T;(m||C)&&(_[R]=L)}},nonNullish=_=>null!=_,pass=_=>_;function extendedEncodeURIComponent(_){return encodeURIComponent(_).replace(/[!'()*]/g,function(_){return"%"+_.charCodeAt(0).toString(16).toUpperCase()})}let resolvedPath=(_,m,C,R,T,L)=>{if(null!=m&&void 0!==m[C]){let m=R();if(m.length<=0)throw Error("Empty value provided for input HTTP label: "+C+".");_=_.replace(T,L?m.split("/").map(_=>extendedEncodeURIComponent(_)).join("/"):extendedEncodeURIComponent(m))}else throw Error("No value provided for input HTTP label: "+C+".");return _},_json=_=>{if(null==_)return{};if(Array.isArray(_))return _.filter(_=>null!=_);if("object"==typeof _){let m={};for(let C of Object.keys(_))null!=_[C]&&(m[C]=_json(_[C]));return m}return _}},97761:function(_,m,C){"use strict";var R,T,L,U,F,B,$,H,V,q,G,K;C.d(m,{f3:function(){return L},cj:function(){return T},zK:function(){return Z}}),($=R||(R={})).HEADER="header",$.QUERY="query",(H=T||(T={})).HTTP="http",H.HTTPS="https",(V=L||(L={})).MD5="md5",V.CRC32="crc32",V.CRC32C="crc32c",V.SHA1="sha1",V.SHA256="sha256",(q=U||(U={}))[q.HEADER=0]="HEADER",q[q.TRAILER=1]="TRAILER";let Z="__smithy_context";(G=F||(F={})).PROFILE="profile",G.SSO_SESSION="sso-session",G.SERVICES="services",(K=B||(B={})).HTTP_0_9="http/0.9",K.HTTP_1_0="http/1.0",K.TDS_8_0="tds/8.0"},93294:function(_,m,C){"use strict";C.d(m,{e:function(){return parseUrl}});let parseUrl=_=>{let m;if("string"==typeof _)return parseUrl(new URL(_));let{hostname:C,pathname:R,port:T,protocol:L,search:U}=_;return U&&(m=function(_){let m={};if(_=_.replace(/^\?/,""))for(let C of _.split("&")){let[_,R=null]=C.split("=");_=decodeURIComponent(_),R&&(R=decodeURIComponent(R)),_ in m?Array.isArray(m[_])?m[_].push(R):m[_]=[m[_],R]:m[_]=R}return m}(U)),{hostname:C,port:T?parseInt(T):void 0,protocol:L,path:R,query:m}}},10687:function(_,m,C){"use strict";C.d(m,{G:function(){return fromBase64},s:function(){return toBase64}});let R={},T=Array(64);for(let _=0;_+65<=90;_++){let m=String.fromCharCode(_+65);R[m]=_,T[_]=m}for(let _=0;_+97<=122;_++){let m=String.fromCharCode(_+97),C=_+26;R[m]=C,T[C]=m}for(let _=0;_<10;_++){R[_.toString(10)]=_+52;let m=_.toString(10),C=_+52;R[m]=C,T[C]=m}R["+"]=62,T[62]="+",R["/"]=63,T[63]="/";let fromBase64=_=>{let m=_.length/4*3;"=="===_.slice(-2)?m-=2:"="===_.slice(-1)&&m--;let C=new ArrayBuffer(m),T=new DataView(C);for(let m=0;m<_.length;m+=4){let C=0,L=0;for(let T=m,U=m+3;T<=U;T++)if("="!==_[T]){if(!(_[T]in R))throw TypeError(`Invalid character ${_[T]} in base64 string.`);C|=R[_[T]]<<(U-T)*6,L+=6}else C>>=6;let U=m/4*3;C>>=L%8;let F=Math.floor(L/8);for(let _=0;_>m)}}return new Uint8Array(C)};function toBase64(_){let m="";for(let C=0;C<_.length;C+=3){let R=0,L=0;for(let m=C,T=Math.min(C+3,_.length);m>C]}m+="==".slice(0,4-U)}return m}},90130:function(_,m,C){"use strict";C.d(m,{W:function(){return calculateBodyLength}});let calculateBodyLength=_=>{if("string"==typeof _){let m=_.length;for(let C=m-1;C>=0;C--){let R=_.charCodeAt(C);R>127&&R<=2047?m++:R>2047&&R<=65535&&(m+=2),R>=56320&&R<=57343&&C--}return m}if("number"==typeof _.byteLength)return _.byteLength;if("number"==typeof _.size)return _.size;throw Error(`Body Length computation failed for ${_}`)}},95419:function(_,m,C){"use strict";C.d(m,{j:function(){return resolveDefaultsModeConfig}});var R=C(8243),T=C(51206),L=C.n(T);let U=["in-region","cross-region","mobile","standard","legacy"],resolveDefaultsModeConfig=({defaultsMode:_}={})=>(0,R.H)(async()=>{let m="function"==typeof _?await _():_;switch(m?.toLowerCase()){case"auto":return Promise.resolve(isMobileBrowser()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(m?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw Error(`Invalid parameter for "defaultsMode", expect ${U.join(", ")}, got ${m}`)}}),isMobileBrowser=()=>{let _="undefined"!=typeof window&&window?.navigator?.userAgent?L().parse(window.navigator.userAgent):void 0,m=_?.platform?.type;return"tablet"===m||"mobile"===m}},44562:function(_,m,C){"use strict";C.d(m,{H:function(){return fromHex},N:function(){return toHex}});let R={},T={};for(let _=0;_<256;_++){let m=_.toString(16).toLowerCase();1===m.length&&(m=`0${m}`),R[_]=m,T[m]=_}function fromHex(_){if(_.length%2!=0)throw Error("Hex encoded strings must have an even number length");let m=new Uint8Array(_.length/2);for(let C=0;C<_.length;C+=2){let R=_.slice(C,C+2).toLowerCase();if(R in T)m[C/2]=T[R];else throw Error(`Cannot decode unrecognized sequence ${R} as hexadecimal`)}return m}function toHex(_){let m="";for(let C=0;C<_.byteLength;C++)m+=R[_[C]];return m}},69080:function(_,m,C){"use strict";C.d(m,{$:function(){return normalizeProvider}}),C(97761);let normalizeProvider=_=>{if("function"==typeof _)return _;let m=Promise.resolve(_);return()=>m}},63660:function(_,m,C){"use strict";C.d(m,{AY:function(){return AdaptiveRetryStrategy},J:function(){return R},CA:function(){return T},lk:function(){return B},r5:function(){return $},Ul:function(){return U},Uz:function(){return StandardRetryStrategy_StandardRetryStrategy}}),(L=U||(U={})).STANDARD="standard",L.ADAPTIVE="adaptive";let R=3,T=U.STANDARD;var L,U,F=C(87568);let DefaultRateLimiter=class DefaultRateLimiter{constructor(_){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=_?.beta??.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??.5,this.scaleConstant=_?.scaleConstant??.4,this.smooth=_?.smooth??.8;let m=this.getCurrentTimeInSeconds();this.lastThrottleTime=m,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(_){if(this.enabled){if(this.refillTokenBucket(),_>this.currentCapacity){let m=(_-this.currentCapacity)/this.fillRate*1e3;await new Promise(_=>setTimeout(_,m))}this.currentCapacity=this.currentCapacity-_}}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let m=(_-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+m),this.lastTimestamp=_}updateClientSendingRate(_){let m;if(this.updateMeasuredRate(),(0,F.pK)(_)){let _=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=_,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),m=this.cubicThrottle(_),this.enableTokenBucket()}else this.calculateTimeWindow(),m=this.cubicSuccess(this.getCurrentTimeInSeconds());let C=Math.min(m,2*this.measuredTxRate);this.updateTokenBucketRate(C)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),m=Math.floor(2*_)/2;if(this.requestCount++,m>this.lastTxRateBucket){let _=this.requestCount/(m-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(_*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=m}}getPrecise(_){return parseFloat(_.toFixed(8))}};let B="amz-sdk-invocation-id",$="amz-sdk-request",getDefaultRetryBackoffStrategy=()=>{let _=100;return{computeNextBackoffDelay:m=>Math.floor(Math.min(2e4,Math.random()*2**m*_)),setDelayBase:m=>{_=m}}},createDefaultRetryToken=({retryDelay:_,retryCount:m,retryCost:C})=>({getRetryCount:()=>m,getRetryDelay:()=>Math.min(2e4,_),getRetryCost:()=>C});let StandardRetryStrategy_StandardRetryStrategy=class StandardRetryStrategy_StandardRetryStrategy{constructor(_){this.maxAttempts=_,this.mode=U.STANDARD,this.capacity=500,this.retryBackoffStrategy=getDefaultRetryBackoffStrategy(),this.maxAttemptsProvider="function"==typeof _?_:async()=>_}async acquireInitialRetryToken(_){return createDefaultRetryToken({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(_,m){let C=await this.getMaxAttempts();if(this.shouldRetry(_,m,C)){let C=m.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===C?500:100);let R=this.retryBackoffStrategy.computeNextBackoffDelay(_.getRetryCount()),T=m.retryAfterHint?Math.max(m.retryAfterHint.getTime()-Date.now()||0,R):R,L=this.getCapacityCost(C);return this.capacity-=L,createDefaultRetryToken({retryDelay:T,retryCount:_.getRetryCount()+1,retryCost:L})}throw Error("No retry token available")}recordSuccess(_){this.capacity=Math.max(500,this.capacity+(_.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(_){return console.warn(`Max attempts provider could not resolve. Using default of ${R}`),R}}shouldRetry(_,m,C){let R=_.getRetryCount()+1;return R=this.getCapacityCost(m.errorType)&&this.isRetryableError(m.errorType)}getCapacityCost(_){return"TRANSIENT"===_?10:5}isRetryableError(_){return"THROTTLING"===_||"TRANSIENT"===_}};let AdaptiveRetryStrategy=class AdaptiveRetryStrategy{constructor(_,m){this.maxAttemptsProvider=_,this.mode=U.ADAPTIVE;let{rateLimiter:C}=m??{};this.rateLimiter=C??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy_StandardRetryStrategy(_)}async acquireInitialRetryToken(_){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(_)}async refreshRetryTokenForRetry(_,m){return this.rateLimiter.updateClientSendingRate(m),this.standardRetryStrategy.refreshRetryTokenForRetry(_,m)}recordSuccess(_){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(_)}}},55388:function(_,m,C){"use strict";C.d(m,{i:function(){return escapeUri}});let escapeUri=_=>encodeURIComponent(_).replace(/[!'()*]/g,hexEncode),hexEncode=_=>`%${_.charCodeAt(0).toString(16).toUpperCase()}`},37916:function(_,m,C){"use strict";C.d(m,{$:function(){return fromUtf8}});let fromUtf8=_=>new TextEncoder().encode(_)},12532:function(_,m,C){"use strict";C.d(m,{_:function(){return toUint8Array}});var R=C(37916);let toUint8Array=_=>"string"==typeof _?(0,R.$)(_):ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(_)},68504:function(_,m,C){"use strict";C.d(m,{G:function(){return toUtf8}});let toUtf8=_=>new TextDecoder("utf-8").decode(_)},89348:function(_,m){"use strict";var C;Object.defineProperty(m,"__esModule",{value:!0}),m.Role=void 0,(C=m.Role||(m.Role={})).MASTER="MASTER",C.VIEWER="VIEWER"},91055:function(_,m,C){"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.SigV4RequestSigner=void 0;var R=C(12871),T=R.__importDefault(C(80898)),L=C(92434),U=function(){function SigV4RequestSigner(_,m,C){void 0===C&&(C=SigV4RequestSigner.DEFAULT_SERVICE),this.region=_,this.credentials=m,this.service=C}return SigV4RequestSigner.prototype.getSignedURL=function(_,m,C){return void 0===C&&(C=new Date),R.__awaiter(this,void 0,void 0,function(){var T,U,F,B,$,H,V,q,G,K,Z,W,Y,J,Q,X,ee,et,er,en,ei,eo,ea;return R.__generator(this,function(R){switch(R.label){case 0:if("function"!=typeof this.credentials.getPromise)return[3,2];return[4,this.credentials.getPromise()];case 1:R.sent(),R.label=2;case 2:if((0,L.validateValueNonNil)(this.credentials.accessKeyId,"credentials.accessKeyId"),(0,L.validateValueNonNil)(this.credentials.secretAccessKey,"credentials.secretAccessKey"),T=SigV4RequestSigner.getDateTimeString(C),U=SigV4RequestSigner.getDateString(C),F="wss",B="".concat(F,"://"),!_.startsWith(B))throw Error("Endpoint '".concat(_,"' is not a secure WebSocket endpoint. It should start with '").concat(B,"'."));if(_.includes("?"))throw Error("Endpoint '".concat(_,"' should not contain any query parameters."));return($=_.indexOf("/",B.length))<0?(H=_.substring(B.length),V="/"):(H=_.substring(B.length,$),V=_.substring($)),q="host",G="GET",K=U+"/"+this.region+"/"+this.service+"/aws4_request",Z=Object.assign({},m,{"X-Amz-Algorithm":SigV4RequestSigner.DEFAULT_ALGORITHM,"X-Amz-Credential":this.credentials.accessKeyId+"/"+K,"X-Amz-Date":T,"X-Amz-Expires":"299","X-Amz-SignedHeaders":q}),this.credentials.sessionToken&&Object.assign(Z,{"X-Amz-Security-Token":this.credentials.sessionToken}),W=SigV4RequestSigner.createQueryString(Z),Y={host:H},J=SigV4RequestSigner.createHeadersString(Y),[4,SigV4RequestSigner.sha256("")];case 3:return Q=R.sent(),X=[G,V,W,J,q,Q].join("\n"),[4,SigV4RequestSigner.sha256(X)];case 4:return ee=R.sent(),et=[SigV4RequestSigner.DEFAULT_ALGORITHM,T,K,ee].join("\n"),[4,this.getSignatureKey(U)];case 5:return er=R.sent(),eo=(ei=SigV4RequestSigner).toHex,[4,SigV4RequestSigner.hmac(er,et)];case 6:return[4,eo.apply(ei,[R.sent()])];case 7:return en=R.sent(),ea=Object.assign({},Z,{"X-Amz-Signature":en}),[2,F+"://"+H+V+"?"+SigV4RequestSigner.createQueryString(ea)]}})})},SigV4RequestSigner.prototype.getSignatureKey=function(_){return R.__awaiter(this,void 0,void 0,function(){var m,C,T;return R.__generator(this,function(R){switch(R.label){case 0:return[4,SigV4RequestSigner.hmac("AWS4"+this.credentials.secretAccessKey,_)];case 1:return m=R.sent(),[4,SigV4RequestSigner.hmac(m,this.region)];case 2:return C=R.sent(),[4,SigV4RequestSigner.hmac(C,this.service)];case 3:return T=R.sent(),[4,SigV4RequestSigner.hmac(T,"aws4_request")];case 4:return[2,R.sent()]}})})},SigV4RequestSigner.createHeadersString=function(_){return Object.keys(_).map(function(m){return"".concat(m,":").concat(_[m],"\n")}).join()},SigV4RequestSigner.createQueryString=function(_){return Object.keys(_).sort().map(function(m){return"".concat(m,"=").concat(encodeURIComponent(_[m]))}).join("&")},SigV4RequestSigner.getDateTimeString=function(_){return _.toISOString().replace(/\.\d{3}Z$/,"Z").replace(/[:\-]/g,"")},SigV4RequestSigner.getDateString=function(_){return this.getDateTimeString(_).substring(0,8)},SigV4RequestSigner.sha256=function(_){return R.__awaiter(this,void 0,void 0,function(){var m;return R.__generator(this,function(C){switch(C.label){case 0:return[4,T.default.subtle.digest({name:"SHA-256"},this.toUint8Array(_))];case 1:return m=C.sent(),[2,this.toHex(m)]}})})},SigV4RequestSigner.hmac=function(_,m){return R.__awaiter(this,void 0,void 0,function(){var C,L,U;return R.__generator(this,function(R){switch(R.label){case 0:return C="string"==typeof _?this.toUint8Array(_).buffer:_,L=this.toUint8Array(m).buffer,[4,T.default.subtle.importKey("raw",C,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"])];case 1:return U=R.sent(),[4,T.default.subtle.sign({name:"HMAC",hash:{name:"SHA-256"}},U,L)];case 2:return[2,R.sent()]}})})},SigV4RequestSigner.toUint8Array=function(_){for(var m=new ArrayBuffer(_.length),C=new Uint8Array(m),R=0,T=_.length;Rm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __decorate(_,m,C,R){var T,L=arguments.length,U=L<3?m:null===R?R=Object.getOwnPropertyDescriptor(m,C):R;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)U=Reflect.decorate(_,m,C,R);else for(var F=_.length-1;F>=0;F--)(T=_[F])&&(U=(L<3?T(U):L>3?T(m,C,U):T(m,C))||U);return L>3&&U&&Object.defineProperty(m,C,U),U}function __param(_,m){return function(C,R){m(C,R,_)}}function __metadata(_,m){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(_,m)}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(L){return function(F){return function(L){if(C)throw TypeError("Generator is already executing.");for(;U;)try{if(C=1,R&&(T=2&L[0]?R.return:L[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,L[1])).done)return T;switch(R=0,T&&(L=[2&L[0],T.value]),L[0]){case 0:case 1:T=L;break;case 4:return U.label++,{value:L[1],done:!1};case 5:U.label++,R=L[1],L=[0];continue;case 7:L=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===L[0]||2===L[0])){U=0;continue}if(3===L[0]&&(!T||L[1]>T[0]&&L[1]=_.length&&(_=void 0),{value:_&&_[R++],done:!_}}};throw TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(_,m){var C="function"==typeof Symbol&&_[Symbol.iterator];if(!C)return _;var R,T,L=C.call(_),U=[];try{for(;(void 0===m||m-- >0)&&!(R=L.next()).done;)U.push(R.value)}catch(_){T={error:_}}finally{try{R&&!R.done&&(C=L.return)&&C.call(L)}finally{if(T)throw T.error}}return U}function __spread(){for(var _=[],m=0;m1||resume(_,m)})})}function resume(_,m){try{var C;(C=T[_](m)).value instanceof __await?Promise.resolve(C.value.v).then(fulfill,reject):settle(L[0][2],C)}catch(_){settle(L[0][3],_)}}function fulfill(_){resume("next",_)}function reject(_){resume("throw",_)}function settle(_,m){_(m),L.shift(),L.length&&resume(L[0][0],L[0][1])}}function __asyncDelegator(_){var m,C;return m={},verb("next"),verb("throw",function(_){throw _}),verb("return"),m[Symbol.iterator]=function(){return this},m;function verb(R,T){m[R]=_[R]?function(m){return(C=!C)?{value:__await(_[R](m)),done:"return"===R}:T?T(m):m}:T}}function __asyncValues(_){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var m,C=_[Symbol.asyncIterator];return C?C.call(_):(_=__values(_),m={},verb("next"),verb("throw"),verb("return"),m[Symbol.asyncIterator]=function(){return this},m);function verb(C){m[C]=_[C]&&function(m){return new Promise(function(R,T){!function(_,m,C,R){Promise.resolve(R).then(function(m){_({value:m,done:C})},m)}(R,T,(m=_[C](m)).done,m.value)})}}}function __makeTemplateObject(_,m){return Object.defineProperty?Object.defineProperty(_,"raw",{value:m}):_.raw=m,_}function __importStar(_){if(_&&_.__esModule)return _;var m={};if(null!=_)for(var C in _)Object.hasOwnProperty.call(_,C)&&(m[C]=_[C]);return m.default=_,m}function __importDefault(_){return _&&_.__esModule?_:{default:_}}function __classPrivateFieldGet(_,m){if(!m.has(_))throw TypeError("attempted to get private field on non-instance");return m.get(_)}function __classPrivateFieldSet(_,m,C){if(!m.has(_))throw TypeError("attempted to set private field on non-instance");return m.set(_,C),C}},79742:function(_,m){"use strict";m.byteLength=function(_){var m=getLens(_),C=m[0],R=m[1];return(C+R)*3/4-R},m.toByteArray=function(_){var m,C,L=getLens(_),U=L[0],F=L[1],B=new T((U+F)*3/4-F),$=0,H=F>0?U-4:U;for(C=0;C>16&255,B[$++]=m>>8&255,B[$++]=255&m;return 2===F&&(m=R[_.charCodeAt(C)]<<2|R[_.charCodeAt(C+1)]>>4,B[$++]=255&m),1===F&&(m=R[_.charCodeAt(C)]<<10|R[_.charCodeAt(C+1)]<<4|R[_.charCodeAt(C+2)]>>2,B[$++]=m>>8&255,B[$++]=255&m),B},m.fromByteArray=function(_){for(var m,R=_.length,T=R%3,L=[],U=0,F=R-T;U>18&63]+C[T>>12&63]+C[T>>6&63]+C[63&T]);return L.join("")}(_,U,U+16383>F?F:U+16383));return 1===T?L.push(C[(m=_[R-1])>>2]+C[m<<4&63]+"=="):2===T&&L.push(C[(m=(_[R-2]<<8)+_[R-1])>>10]+C[m>>4&63]+C[m<<2&63]+"="),L.join("")};for(var C=[],R=[],T="undefined"!=typeof Uint8Array?Uint8Array:Array,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=0,F=L.length;U0)throw Error("Invalid string. Length must be a multiple of 4");var C=_.indexOf("=");-1===C&&(C=m);var R=C===m?0:4-C%4;return[C,R]}R["-".charCodeAt(0)]=62,R["_".charCodeAt(0)]=63},51206:function(_){_.exports=function(_){var m={};function r(C){if(m[C])return m[C].exports;var R=m[C]={i:C,l:!1,exports:{}};return _[C].call(R.exports,R,R.exports,r),R.l=!0,R.exports}return r.m=_,r.c=m,r.d=function(_,m,C){r.o(_,m)||Object.defineProperty(_,m,{enumerable:!0,get:C})},r.r=function(_){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},r.t=function(_,m){if(1&m&&(_=r(_)),8&m||4&m&&"object"==typeof _&&_&&_.__esModule)return _;var C=Object.create(null);if(r.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:_}),2&m&&"string"!=typeof _)for(var R in _)r.d(C,R,(function(m){return _[m]}).bind(null,R));return C},r.n=function(_){var m=_&&_.__esModule?function(){return _.default}:function(){return _};return r.d(m,"a",m),m},r.o=function(_,m){return Object.prototype.hasOwnProperty.call(_,m)},r.p="",r(r.s=90)}({17:function(_,m,C){"use strict";m.__esModule=!0,m.default=void 0;var R=C(18),T=function(){function e(){}return e.getFirstMatch=function(_,m){var C=m.match(_);return C&&C.length>0&&C[1]||""},e.getSecondMatch=function(_,m){var C=m.match(_);return C&&C.length>1&&C[2]||""},e.matchAndReturnConst=function(_,m,C){if(_.test(m))return C},e.getWindowsVersionName=function(_){switch(_){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(_){var m=_.split(".").splice(0,2).map(function(_){return parseInt(_,10)||0});if(m.push(0),10===m[0])switch(m[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(_){var m=_.split(".").splice(0,2).map(function(_){return parseInt(_,10)||0});if(m.push(0),!(1===m[0]&&m[1]<5))return 1===m[0]&&m[1]<6?"Cupcake":1===m[0]&&m[1]>=6?"Donut":2===m[0]&&m[1]<2?"Eclair":2===m[0]&&2===m[1]?"Froyo":2===m[0]&&m[1]>2?"Gingerbread":3===m[0]?"Honeycomb":4===m[0]&&m[1]<1?"Ice Cream Sandwich":4===m[0]&&m[1]<4?"Jelly Bean":4===m[0]&&m[1]>=4?"KitKat":5===m[0]?"Lollipop":6===m[0]?"Marshmallow":7===m[0]?"Nougat":8===m[0]?"Oreo":9===m[0]?"Pie":void 0},e.getVersionPrecision=function(_){return _.split(".").length},e.compareVersions=function(_,m,C){void 0===C&&(C=!1);var R=e.getVersionPrecision(_),T=e.getVersionPrecision(m),L=Math.max(R,T),U=0,F=e.map([_,m],function(_){var m=L-e.getVersionPrecision(_),C=_+Array(m+1).join(".0");return e.map(C.split("."),function(_){return Array(20-_.length).join("0")+_}).reverse()});for(C&&(U=L-Math.min(R,T)),L-=1;L>=U;){if(F[0][L]>F[1][L])return 1;if(F[0][L]===F[1][L]){if(L===U)return 0;L-=1}else if(F[0][L]1?R-1:0),L=1;L0){var U=Object.keys(C),B=F.default.find(U,function(_){return m.isOS(_)});if(B){var $=this.satisfies(C[B]);if(void 0!==$)return $}var H=F.default.find(U,function(_){return m.isPlatform(_)});if(H){var V=this.satisfies(C[H]);if(void 0!==V)return V}}if(L>0){var q=Object.keys(T),G=F.default.find(q,function(_){return m.isBrowser(_,!0)});if(void 0!==G)return this.compareVersion(T[G])}},_.isBrowser=function(_,m){void 0===m&&(m=!1);var C=this.getBrowserName().toLowerCase(),R=_.toLowerCase(),T=F.default.getBrowserTypeByAlias(R);return m&&T&&(R=T.toLowerCase()),R===C},_.compareVersion=function(_){var m=[0],C=_,R=!1,T=this.getBrowserVersion();if("string"==typeof T)return">"===_[0]||"<"===_[0]?(C=_.substr(1),"="===_[1]?(R=!0,C=_.substr(2)):m=[],">"===_[0]?m.push(1):m.push(-1)):"="===_[0]?C=_.substr(1):"~"===_[0]&&(R=!0,C=_.substr(1)),m.indexOf(F.default.compareVersions(T,C,R))>-1},_.isOS=function(_){return this.getOSName(!0)===String(_).toLowerCase()},_.isPlatform=function(_){return this.getPlatformType(!0)===String(_).toLowerCase()},_.isEngine=function(_){return this.getEngineName(!0)===String(_).toLowerCase()},_.is=function(_,m){return void 0===m&&(m=!1),this.isBrowser(_,m)||this.isOS(_)||this.isPlatform(_)},_.some=function(_){var m=this;return void 0===_&&(_=[]),_.some(function(_){return m.is(_)})},e}();m.default=B,_.exports=m.default},92:function(_,m,C){"use strict";m.__esModule=!0,m.default=void 0;var R,T=(R=C(17))&&R.__esModule?R:{default:R},L=/version\/(\d+(\.?_?\d+)+)/i,U=[{test:[/googlebot/i],describe:function(_){var m={name:"Googlebot"},C=T.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/opera/i],describe:function(_){var m={name:"Opera"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/opr\/|opios/i],describe:function(_){var m={name:"Opera"},C=T.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/SamsungBrowser/i],describe:function(_){var m={name:"Samsung Internet for Android"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/Whale/i],describe:function(_){var m={name:"NAVER Whale Browser"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/MZBrowser/i],describe:function(_){var m={name:"MZ Browser"},C=T.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/focus/i],describe:function(_){var m={name:"Focus"},C=T.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/swing/i],describe:function(_){var m={name:"Swing"},C=T.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/coast/i],describe:function(_){var m={name:"Opera Coast"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(_){var m={name:"Opera Touch"},C=T.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/yabrowser/i],describe:function(_){var m={name:"Yandex Browser"},C=T.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/ucbrowser/i],describe:function(_){var m={name:"UC Browser"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/Maxthon|mxios/i],describe:function(_){var m={name:"Maxthon"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/epiphany/i],describe:function(_){var m={name:"Epiphany"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/puffin/i],describe:function(_){var m={name:"Puffin"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/sleipnir/i],describe:function(_){var m={name:"Sleipnir"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/k-meleon/i],describe:function(_){var m={name:"K-Meleon"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/micromessenger/i],describe:function(_){var m={name:"WeChat"},C=T.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/qqbrowser/i],describe:function(_){var m={name:/qqbrowserlite/i.test(_)?"QQ Browser Lite":"QQ Browser"},C=T.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/msie|trident/i],describe:function(_){var m={name:"Internet Explorer"},C=T.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/\sedg\//i],describe:function(_){var m={name:"Microsoft Edge"},C=T.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/edg([ea]|ios)/i],describe:function(_){var m={name:"Microsoft Edge"},C=T.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/vivaldi/i],describe:function(_){var m={name:"Vivaldi"},C=T.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/seamonkey/i],describe:function(_){var m={name:"SeaMonkey"},C=T.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/sailfish/i],describe:function(_){var m={name:"Sailfish"},C=T.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,_);return C&&(m.version=C),m}},{test:[/silk/i],describe:function(_){var m={name:"Amazon Silk"},C=T.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/phantom/i],describe:function(_){var m={name:"PhantomJS"},C=T.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/slimerjs/i],describe:function(_){var m={name:"SlimerJS"},C=T.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(_){var m={name:"BlackBerry"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/(web|hpw)[o0]s/i],describe:function(_){var m={name:"WebOS Browser"},C=T.default.getFirstMatch(L,_)||T.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/bada/i],describe:function(_){var m={name:"Bada"},C=T.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/tizen/i],describe:function(_){var m={name:"Tizen"},C=T.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/qupzilla/i],describe:function(_){var m={name:"QupZilla"},C=T.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/firefox|iceweasel|fxios/i],describe:function(_){var m={name:"Firefox"},C=T.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/electron/i],describe:function(_){var m={name:"Electron"},C=T.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/MiuiBrowser/i],describe:function(_){var m={name:"Miui"},C=T.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/chromium/i],describe:function(_){var m={name:"Chromium"},C=T.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,_)||T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/chrome|crios|crmo/i],describe:function(_){var m={name:"Chrome"},C=T.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/GSA/i],describe:function(_){var m={name:"Google Search"},C=T.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:function(_){var m=!_.test(/like android/i),C=_.test(/android/i);return m&&C},describe:function(_){var m={name:"Android Browser"},C=T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/playstation 4/i],describe:function(_){var m={name:"PlayStation 4"},C=T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/safari|applewebkit/i],describe:function(_){var m={name:"Safari"},C=T.default.getFirstMatch(L,_);return C&&(m.version=C),m}},{test:[/.*/i],describe:function(_){var m=-1!==_.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:T.default.getFirstMatch(m,_),version:T.default.getSecondMatch(m,_)}}}];m.default=U,_.exports=m.default},93:function(_,m,C){"use strict";m.__esModule=!0,m.default=void 0;var R,T=(R=C(17))&&R.__esModule?R:{default:R},L=C(18),U=[{test:[/Roku\/DVP/],describe:function(_){var m=T.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,_);return{name:L.OS_MAP.Roku,version:m}}},{test:[/windows phone/i],describe:function(_){var m=T.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,_);return{name:L.OS_MAP.WindowsPhone,version:m}}},{test:[/windows /i],describe:function(_){var m=T.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,_),C=T.default.getWindowsVersionName(m);return{name:L.OS_MAP.Windows,version:m,versionName:C}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(_){var m={name:L.OS_MAP.iOS},C=T.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,_);return C&&(m.version=C),m}},{test:[/macintosh/i],describe:function(_){var m=T.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,_).replace(/[_\s]/g,"."),C=T.default.getMacOSVersionName(m),R={name:L.OS_MAP.MacOS,version:m};return C&&(R.versionName=C),R}},{test:[/(ipod|iphone|ipad)/i],describe:function(_){var m=T.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,_).replace(/[_\s]/g,".");return{name:L.OS_MAP.iOS,version:m}}},{test:function(_){var m=!_.test(/like android/i),C=_.test(/android/i);return m&&C},describe:function(_){var m=T.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,_),C=T.default.getAndroidVersionName(m),R={name:L.OS_MAP.Android,version:m};return C&&(R.versionName=C),R}},{test:[/(web|hpw)[o0]s/i],describe:function(_){var m=T.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,_),C={name:L.OS_MAP.WebOS};return m&&m.length&&(C.version=m),C}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(_){var m=T.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,_)||T.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,_)||T.default.getFirstMatch(/\bbb(\d+)/i,_);return{name:L.OS_MAP.BlackBerry,version:m}}},{test:[/bada/i],describe:function(_){var m=T.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,_);return{name:L.OS_MAP.Bada,version:m}}},{test:[/tizen/i],describe:function(_){var m=T.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,_);return{name:L.OS_MAP.Tizen,version:m}}},{test:[/linux/i],describe:function(){return{name:L.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:L.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(_){var m=T.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,_);return{name:L.OS_MAP.PlayStation4,version:m}}}];m.default=U,_.exports=m.default},94:function(_,m,C){"use strict";m.__esModule=!0,m.default=void 0;var R,T=(R=C(17))&&R.__esModule?R:{default:R},L=C(18),U=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(_){var m=T.default.getFirstMatch(/(can-l01)/i,_)&&"Nova",C={type:L.PLATFORMS_MAP.mobile,vendor:"Huawei"};return m&&(C.model=m),C}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:L.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:L.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:L.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:L.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:L.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:L.PLATFORMS_MAP.tablet}}},{test:function(_){var m=_.test(/ipod|iphone/i),C=_.test(/like (ipod|iphone)/i);return m&&!C},describe:function(_){var m=T.default.getFirstMatch(/(ipod|iphone)/i,_);return{type:L.PLATFORMS_MAP.mobile,vendor:"Apple",model:m}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:L.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:L.PLATFORMS_MAP.mobile}}},{test:function(_){return"blackberry"===_.getBrowserName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(_){return"bada"===_.getBrowserName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.mobile}}},{test:function(_){return"windows phone"===_.getBrowserName()},describe:function(){return{type:L.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(_){var m=Number(String(_.getOSVersion()).split(".")[0]);return"android"===_.getOSName(!0)&&m>=3},describe:function(){return{type:L.PLATFORMS_MAP.tablet}}},{test:function(_){return"android"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.mobile}}},{test:function(_){return"macos"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(_){return"windows"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.desktop}}},{test:function(_){return"linux"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.desktop}}},{test:function(_){return"playstation 4"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.tv}}},{test:function(_){return"roku"===_.getOSName(!0)},describe:function(){return{type:L.PLATFORMS_MAP.tv}}}];m.default=U,_.exports=m.default},95:function(_,m,C){"use strict";m.__esModule=!0,m.default=void 0;var R,T=(R=C(17))&&R.__esModule?R:{default:R},L=C(18),U=[{test:function(_){return"microsoft edge"===_.getBrowserName(!0)},describe:function(_){if(/\sedg\//i.test(_))return{name:L.ENGINE_MAP.Blink};var m=T.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,_);return{name:L.ENGINE_MAP.EdgeHTML,version:m}}},{test:[/trident/i],describe:function(_){var m={name:L.ENGINE_MAP.Trident},C=T.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:function(_){return _.test(/presto/i)},describe:function(_){var m={name:L.ENGINE_MAP.Presto},C=T.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:function(_){var m=_.test(/gecko/i),C=_.test(/like gecko/i);return m&&!C},describe:function(_){var m={name:L.ENGINE_MAP.Gecko},C=T.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:L.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(_){var m={name:L.ENGINE_MAP.WebKit},C=T.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,_);return C&&(m.version=C),m}}];m.default=U,_.exports=m.default}})},48764:function(_,m,C){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var R=C(79742),T=C(80645),L=C(5826);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(_,m){if(kMaxLength()=kMaxLength())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|_}function byteLength(_,m){if(Buffer.isBuffer(_))return _.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(_)||_ instanceof ArrayBuffer))return _.byteLength;"string"!=typeof _&&(_=""+_);var C=_.length;if(0===C)return 0;for(var R=!1;;)switch(m){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":case void 0:return utf8ToBytes(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*C;case"hex":return C>>>1;case"base64":return base64ToBytes(_).length;default:if(R)return utf8ToBytes(_).length;m=(""+m).toLowerCase(),R=!0}}function slowToString(_,m,C){var T,L,U=!1;if((void 0===m||m<0)&&(m=0),m>this.length||((void 0===C||C>this.length)&&(C=this.length),C<=0||(C>>>=0)<=(m>>>=0)))return"";for(_||(_="utf8");;)switch(_){case"hex":return function(_,m,C){var R,T=_.length;(!m||m<0)&&(m=0),(!C||C<0||C>T)&&(C=T);for(var L="",U=m;U2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),isNaN(C=+C)&&(C=T?0:_.length-1),C<0&&(C=_.length+C),C>=_.length){if(T)return -1;C=_.length-1}else if(C<0){if(!T)return -1;C=0}if("string"==typeof m&&(m=Buffer.from(m,R)),Buffer.isBuffer(m))return 0===m.length?-1:arrayIndexOf(_,m,C,R,T);if("number"==typeof m)return(m&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?T?Uint8Array.prototype.indexOf.call(_,m,C):Uint8Array.prototype.lastIndexOf.call(_,m,C):arrayIndexOf(_,[m],C,R,T);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(_,m,C,R,T){var L,U=1,F=_.length,B=m.length;if(void 0!==R&&("ucs2"===(R=String(R).toLowerCase())||"ucs-2"===R||"utf16le"===R||"utf-16le"===R)){if(_.length<2||m.length<2)return -1;U=2,F/=2,B/=2,C/=2}function read(_,m){return 1===U?_[m]:_.readUInt16BE(m*U)}if(T){var $=-1;for(L=C;LF&&(C=F-B),L=C;L>=0;L--){for(var H=!0,V=0;V239?4:$>223?3:$>191?2:1;if(T+V<=C)switch(V){case 1:$<128&&(H=$);break;case 2:(192&(L=_[T+1]))==128&&(B=(31&$)<<6|63&L)>127&&(H=B);break;case 3:L=_[T+1],U=_[T+2],(192&L)==128&&(192&U)==128&&(B=(15&$)<<12|(63&L)<<6|63&U)>2047&&(B<55296||B>57343)&&(H=B);break;case 4:L=_[T+1],U=_[T+2],F=_[T+3],(192&L)==128&&(192&U)==128&&(192&F)==128&&(B=(15&$)<<18|(63&L)<<12|(63&U)<<6|63&F)>65535&&B<1114112&&(H=B)}null===H?(H=65533,V=1):H>65535&&(H-=65536,R.push(H>>>10&1023|55296),H=56320|1023&H),R.push(H),T+=V}return function(_){var m=_.length;if(m<=4096)return String.fromCharCode.apply(String,_);for(var C="",R=0;RC)throw RangeError("Trying to access beyond buffer length")}function checkInt(_,m,C,R,T,L){if(!Buffer.isBuffer(_))throw TypeError('"buffer" argument must be a Buffer instance');if(m>T||m_.length)throw RangeError("Index out of range")}function objectWriteUInt16(_,m,C,R){m<0&&(m=65535+m+1);for(var T=0,L=Math.min(_.length-C,2);T>>(R?T:1-T)*8}function objectWriteUInt32(_,m,C,R){m<0&&(m=4294967295+m+1);for(var T=0,L=Math.min(_.length-C,4);T>>(R?T:3-T)*8&255}function checkIEEE754(_,m,C,R,T,L){if(C+R>_.length||C<0)throw RangeError("Index out of range")}function writeFloat(_,m,C,R,L){return L||checkIEEE754(_,m,C,4,34028234663852886e22,-34028234663852886e22),T.write(_,m,C,R,23,4),C+4}function writeDouble(_,m,C,R,L){return L||checkIEEE754(_,m,C,8,17976931348623157e292,-17976931348623157e292),T.write(_,m,C,R,52,8),C+8}m.lW=Buffer,m.h2=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==C.g.TYPED_ARRAY_SUPPORT?C.g.TYPED_ARRAY_SUPPORT:function(){try{var _=new Uint8Array(1);return _.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===_.foo()&&"function"==typeof _.subarray&&0===_.subarray(1,1).byteLength}catch(_){return!1}}(),kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(_){return _.__proto__=Buffer.prototype,_},Buffer.from=function(_,m,C){return from(null,_,m,C)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(_,m,C){return(assertSize(_),_<=0)?createBuffer(null,_):void 0!==m?"string"==typeof C?createBuffer(null,_).fill(m,C):createBuffer(null,_).fill(m):createBuffer(null,_)},Buffer.allocUnsafe=function(_){return allocUnsafe(null,_)},Buffer.allocUnsafeSlow=function(_){return allocUnsafe(null,_)},Buffer.isBuffer=function(_){return!!(null!=_&&_._isBuffer)},Buffer.compare=function(_,m){if(!Buffer.isBuffer(_)||!Buffer.isBuffer(m))throw TypeError("Arguments must be Buffers");if(_===m)return 0;for(var C=_.length,R=m.length,T=0,L=Math.min(C,R);T0&&(_=this.toString("hex",0,C).match(/.{2}/g).join(" "),this.length>C&&(_+=" ... ")),""},Buffer.prototype.compare=function(_,m,C,R,T){if(!Buffer.isBuffer(_))throw TypeError("Argument must be a Buffer");if(void 0===m&&(m=0),void 0===C&&(C=_?_.length:0),void 0===R&&(R=0),void 0===T&&(T=this.length),m<0||C>_.length||R<0||T>this.length)throw RangeError("out of range index");if(R>=T&&m>=C)return 0;if(R>=T)return -1;if(m>=C)return 1;if(m>>>=0,C>>>=0,R>>>=0,T>>>=0,this===_)return 0;for(var L=T-R,U=C-m,F=Math.min(L,U),B=this.slice(R,T),$=_.slice(m,C),H=0;HW)&&(C=W),_.length>0&&(C<0||m<0)||m>this.length)throw RangeError("Attempt to write outside buffer bounds");R||(R="utf8");for(var Y=!1;;)switch(R){case"hex":return function(_,m,C,R){C=Number(C)||0;var T=_.length-C;R?(R=Number(R))>T&&(R=T):R=T;var L=m.length;if(L%2!=0)throw TypeError("Invalid hex string");R>L/2&&(R=L/2);for(var U=0;U>8,T.push(C%256),T.push(R);return T}(_,this.length-K),this,K,Z);default:if(Y)throw TypeError("Unknown encoding: "+R);R=(""+R).toLowerCase(),Y=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(_,m){var C,R=this.length;if(_=~~_,m=void 0===m?R:~~m,_<0?(_+=R)<0&&(_=0):_>R&&(_=R),m<0?(m+=R)<0&&(m=0):m>R&&(m=R),m<_&&(m=_),Buffer.TYPED_ARRAY_SUPPORT)(C=this.subarray(_,m)).__proto__=Buffer.prototype;else{var T=m-_;C=new Buffer(T,void 0);for(var L=0;L0&&(T*=256);)R+=this[_+--m]*T;return R},Buffer.prototype.readUInt8=function(_,m){return m||checkOffset(_,1,this.length),this[_]},Buffer.prototype.readUInt16LE=function(_,m){return m||checkOffset(_,2,this.length),this[_]|this[_+1]<<8},Buffer.prototype.readUInt16BE=function(_,m){return m||checkOffset(_,2,this.length),this[_]<<8|this[_+1]},Buffer.prototype.readUInt32LE=function(_,m){return m||checkOffset(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+16777216*this[_+3]},Buffer.prototype.readUInt32BE=function(_,m){return m||checkOffset(_,4,this.length),16777216*this[_]+(this[_+1]<<16|this[_+2]<<8|this[_+3])},Buffer.prototype.readIntLE=function(_,m,C){_|=0,m|=0,C||checkOffset(_,m,this.length);for(var R=this[_],T=1,L=0;++L=(T*=128)&&(R-=Math.pow(2,8*m)),R},Buffer.prototype.readIntBE=function(_,m,C){_|=0,m|=0,C||checkOffset(_,m,this.length);for(var R=m,T=1,L=this[_+--R];R>0&&(T*=256);)L+=this[_+--R]*T;return L>=(T*=128)&&(L-=Math.pow(2,8*m)),L},Buffer.prototype.readInt8=function(_,m){return(m||checkOffset(_,1,this.length),128&this[_])?-((255-this[_]+1)*1):this[_]},Buffer.prototype.readInt16LE=function(_,m){m||checkOffset(_,2,this.length);var C=this[_]|this[_+1]<<8;return 32768&C?4294901760|C:C},Buffer.prototype.readInt16BE=function(_,m){m||checkOffset(_,2,this.length);var C=this[_+1]|this[_]<<8;return 32768&C?4294901760|C:C},Buffer.prototype.readInt32LE=function(_,m){return m||checkOffset(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},Buffer.prototype.readInt32BE=function(_,m){return m||checkOffset(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},Buffer.prototype.readFloatLE=function(_,m){return m||checkOffset(_,4,this.length),T.read(this,_,!0,23,4)},Buffer.prototype.readFloatBE=function(_,m){return m||checkOffset(_,4,this.length),T.read(this,_,!1,23,4)},Buffer.prototype.readDoubleLE=function(_,m){return m||checkOffset(_,8,this.length),T.read(this,_,!0,52,8)},Buffer.prototype.readDoubleBE=function(_,m){return m||checkOffset(_,8,this.length),T.read(this,_,!1,52,8)},Buffer.prototype.writeUIntLE=function(_,m,C,R){if(_=+_,m|=0,C|=0,!R){var T=Math.pow(2,8*C)-1;checkInt(this,_,m,C,T,0)}var L=1,U=0;for(this[m]=255&_;++U=0&&(U*=256);)this[m+L]=_/U&255;return m+C},Buffer.prototype.writeUInt8=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(_=Math.floor(_)),this[m]=255&_,m+1},Buffer.prototype.writeUInt16LE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=255&_,this[m+1]=_>>>8):objectWriteUInt16(this,_,m,!0),m+2},Buffer.prototype.writeUInt16BE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=_>>>8,this[m+1]=255&_):objectWriteUInt16(this,_,m,!1),m+2},Buffer.prototype.writeUInt32LE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[m+3]=_>>>24,this[m+2]=_>>>16,this[m+1]=_>>>8,this[m]=255&_):objectWriteUInt32(this,_,m,!0),m+4},Buffer.prototype.writeUInt32BE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=_>>>24,this[m+1]=_>>>16,this[m+2]=_>>>8,this[m+3]=255&_):objectWriteUInt32(this,_,m,!1),m+4},Buffer.prototype.writeIntLE=function(_,m,C,R){if(_=+_,m|=0,!R){var T=Math.pow(2,8*C-1);checkInt(this,_,m,C,T-1,-T)}var L=0,U=1,F=0;for(this[m]=255&_;++L>0)-F&255;return m+C},Buffer.prototype.writeIntBE=function(_,m,C,R){if(_=+_,m|=0,!R){var T=Math.pow(2,8*C-1);checkInt(this,_,m,C,T-1,-T)}var L=C-1,U=1,F=0;for(this[m+L]=255&_;--L>=0&&(U*=256);)_<0&&0===F&&0!==this[m+L+1]&&(F=1),this[m+L]=(_/U>>0)-F&255;return m+C},Buffer.prototype.writeInt8=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(_=Math.floor(_)),_<0&&(_=255+_+1),this[m]=255&_,m+1},Buffer.prototype.writeInt16LE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=255&_,this[m+1]=_>>>8):objectWriteUInt16(this,_,m,!0),m+2},Buffer.prototype.writeInt16BE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=_>>>8,this[m+1]=255&_):objectWriteUInt16(this,_,m,!1),m+2},Buffer.prototype.writeInt32LE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=255&_,this[m+1]=_>>>8,this[m+2]=_>>>16,this[m+3]=_>>>24):objectWriteUInt32(this,_,m,!0),m+4},Buffer.prototype.writeInt32BE=function(_,m,C){return _=+_,m|=0,C||checkInt(this,_,m,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),Buffer.TYPED_ARRAY_SUPPORT?(this[m]=_>>>24,this[m+1]=_>>>16,this[m+2]=_>>>8,this[m+3]=255&_):objectWriteUInt32(this,_,m,!1),m+4},Buffer.prototype.writeFloatLE=function(_,m,C){return writeFloat(this,_,m,!0,C)},Buffer.prototype.writeFloatBE=function(_,m,C){return writeFloat(this,_,m,!1,C)},Buffer.prototype.writeDoubleLE=function(_,m,C){return writeDouble(this,_,m,!0,C)},Buffer.prototype.writeDoubleBE=function(_,m,C){return writeDouble(this,_,m,!1,C)},Buffer.prototype.copy=function(_,m,C,R){if(C||(C=0),R||0===R||(R=this.length),m>=_.length&&(m=_.length),m||(m=0),R>0&&R=this.length)throw RangeError("sourceStart out of bounds");if(R<0)throw RangeError("sourceEnd out of bounds");R>this.length&&(R=this.length),_.length-m=0;--T)_[T+m]=this[T+C];else if(L<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(T=0;T>>=0,C=void 0===C?this.length:C>>>0,_||(_=0),"number"==typeof _)for(T=m;T55295&&C<57344){if(!T){if(C>56319||U+1===R){(m-=3)>-1&&L.push(239,191,189);continue}T=C;continue}if(C<56320){(m-=3)>-1&&L.push(239,191,189),T=C;continue}C=(T-55296<<10|C-56320)+65536}else T&&(m-=3)>-1&&L.push(239,191,189);if(T=null,C<128){if((m-=1)<0)break;L.push(C)}else if(C<2048){if((m-=2)<0)break;L.push(C>>6|192,63&C|128)}else if(C<65536){if((m-=3)<0)break;L.push(C>>12|224,C>>6&63|128,63&C|128)}else if(C<1114112){if((m-=4)<0)break;L.push(C>>18|240,C>>12&63|128,C>>6&63|128,63&C|128)}else throw Error("Invalid code point")}return L}function asciiToBytes(_){for(var m=[],C=0;C<_.length;++C)m.push(255&_.charCodeAt(C));return m}function base64ToBytes(_){return R.toByteArray(function(_){var m;if((_=((m=_).trim?m.trim():m.replace(/^\s+|\s+$/g,"")).replace(U,"")).length<2)return"";for(;_.length%4!=0;)_+="=";return _}(_))}function blitBuffer(_,m,C,R){for(var T=0;T=m.length)&&!(T>=_.length);++T)m[T+C]=_[T];return T}},17187:function(_){"use strict";var m,C="object"==typeof Reflect?Reflect:null,R=C&&"function"==typeof C.apply?C.apply:function(_,m,C){return Function.prototype.apply.call(_,m,C)};m=C&&"function"==typeof C.ownKeys?C.ownKeys:Object.getOwnPropertySymbols?function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:function(_){return Object.getOwnPropertyNames(_)};var T=Number.isNaN||function(_){return _!=_};function EventEmitter(){EventEmitter.init.call(this)}_.exports=EventEmitter,_.exports.once=function(_,m){return new Promise(function(C,R){function errorListener(C){_.removeListener(m,resolver),R(C)}function resolver(){"function"==typeof _.removeListener&&_.removeListener("error",errorListener),C([].slice.call(arguments))}eventTargetAgnosticAddListener(_,m,resolver,{once:!0}),"error"!==m&&"function"==typeof _.on&&eventTargetAgnosticAddListener(_,"error",errorListener,{once:!0})})},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var L=10;function checkListener(_){if("function"!=typeof _)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof _)}function _getMaxListeners(_){return void 0===_._maxListeners?EventEmitter.defaultMaxListeners:_._maxListeners}function _addListener(_,m,C,R){if(checkListener(C),void 0===(L=_._events)?(L=_._events=Object.create(null),_._eventsCount=0):(void 0!==L.newListener&&(_.emit("newListener",m,C.listener?C.listener:C),L=_._events),U=L[m]),void 0===U)U=L[m]=C,++_._eventsCount;else if("function"==typeof U?U=L[m]=R?[C,U]:[U,C]:R?U.unshift(C):U.push(C),(T=_getMaxListeners(_))>0&&U.length>T&&!U.warned){U.warned=!0;var T,L,U,F=Error("Possible EventEmitter memory leak detected. "+U.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=_,F.type=m,F.count=U.length,console&&console.warn&&console.warn(F)}return _}function onceWrapper(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(_,m,C){var R={fired:!1,wrapFn:void 0,target:_,type:m,listener:C},T=onceWrapper.bind(R);return T.listener=C,R.wrapFn=T,T}function _listeners(_,m,C){var R=_._events;if(void 0===R)return[];var T=R[m];return void 0===T?[]:"function"==typeof T?C?[T.listener||T]:[T]:C?function(_){for(var m=Array(_.length),C=0;C0&&(U=m[0]),U instanceof Error)throw U;var U,F=Error("Unhandled error."+(U?" ("+U.message+")":""));throw F.context=U,F}var B=L[_];if(void 0===B)return!1;if("function"==typeof B)R(B,this,m);else for(var $=B.length,H=arrayClone(B,$),C=0;C<$;++C)R(H[C],this,m);return!0},EventEmitter.prototype.addListener=function(_,m){return _addListener(this,_,m,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function(_,m){return _addListener(this,_,m,!0)},EventEmitter.prototype.once=function(_,m){return checkListener(m),this.on(_,_onceWrap(this,_,m)),this},EventEmitter.prototype.prependOnceListener=function(_,m){return checkListener(m),this.prependListener(_,_onceWrap(this,_,m)),this},EventEmitter.prototype.removeListener=function(_,m){var C,R,T,L,U;if(checkListener(m),void 0===(R=this._events)||void 0===(C=R[_]))return this;if(C===m||C.listener===m)0==--this._eventsCount?this._events=Object.create(null):(delete R[_],R.removeListener&&this.emit("removeListener",_,C.listener||m));else if("function"!=typeof C){for(T=-1,L=C.length-1;L>=0;L--)if(C[L]===m||C[L].listener===m){U=C[L].listener,T=L;break}if(T<0)return this;0===T?C.shift():function(_,m){for(;m+1<_.length;m++)_[m]=_[m+1];_.pop()}(C,T),1===C.length&&(R[_]=C[0]),void 0!==R.removeListener&&this.emit("removeListener",_,U||m)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(_){var m,C,R;if(void 0===(C=this._events))return this;if(void 0===C.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==C[_]&&(0==--this._eventsCount?this._events=Object.create(null):delete C[_]),this;if(0==arguments.length){var T,L=Object.keys(C);for(R=0;R=0;R--)this.removeListener(_,m[R]);return this},EventEmitter.prototype.listeners=function(_){return _listeners(this,_,!0)},EventEmitter.prototype.rawListeners=function(_){return _listeners(this,_,!1)},EventEmitter.listenerCount=function(_,m){return"function"==typeof _.listenerCount?_.listenerCount(m):listenerCount.call(_,m)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?m(this._events):[]}},31230:function(_,m,C){"use strict";C.d(m,{HW:function(){return resetCaches},J9:function(){return disableExperimentalFragmentVariables},Ps:function(){return gql},_t:function(){return disableFragmentWarnings},wO:function(){return enableExperimentalFragmentVariables}});var R,T=C(97582),L=C(84275),U=new Map,F=new Map,B=!0,$=!1;function normalize(_){return _.replace(/[\s,]+/g," ").trim()}function gql(_){for(var m=[],C=1;C */m.read=function(_,m,C,R,T){var L,U,F=8*T-R-1,B=(1<>1,H=-7,V=C?T-1:0,q=C?-1:1,G=_[m+V];for(V+=q,L=G&(1<<-H)-1,G>>=-H,H+=F;H>0;L=256*L+_[m+V],V+=q,H-=8);for(U=L&(1<<-H)-1,L>>=-H,H+=R;H>0;U=256*U+_[m+V],V+=q,H-=8);if(0===L)L=1-$;else{if(L===B)return U?NaN:(G?-1:1)*(1/0);U+=Math.pow(2,R),L-=$}return(G?-1:1)*U*Math.pow(2,L-R)},m.write=function(_,m,C,R,T,L){var U,F,B,$=8*L-T-1,H=(1<<$)-1,V=H>>1,q=23===T?5960464477539062e-23:0,G=R?0:L-1,K=R?1:-1,Z=m<0||0===m&&1/m<0?1:0;for(isNaN(m=Math.abs(m))||m===1/0?(F=isNaN(m)?1:0,U=H):(U=Math.floor(Math.log(m)/Math.LN2),m*(B=Math.pow(2,-U))<1&&(U--,B*=2),U+V>=1?m+=q/B:m+=q*Math.pow(2,1-V),m*B>=2&&(U++,B/=2),U+V>=H?(F=0,U=H):U+V>=1?(F=(m*B-1)*Math.pow(2,T),U+=V):(F=m*Math.pow(2,V-1)*Math.pow(2,T),U=0));T>=8;_[C+G]=255&F,G+=K,F/=256,T-=8);for(U=U<0;_[C+G]=255&U,G+=K,U/=256,$-=8);_[C+G-K]|=128*Z}},5826:function(_){var m={}.toString;_.exports=Array.isArray||function(_){return"[object Array]"==m.call(_)}},6840:function(_,m,C){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return C(30900)}])},30900:function(_,m,C){"use strict";let R,T;C.r(m),C.d(m,{default:function(){return _app}});var L,U,F=C(85893);C(67294),C(55303);var B=C(57632),$=C(9008),H=C.n($),V=C(68824),q=C(31955),G=C(13594),K=C(39518);{let _=window.location.pathname;window.onerror=(m,C,R,T,L)=>{G.vU("window.onerror(): msg: ".concat(m,", url: ").concat(C,", lineNo: ").concat(R,", columnNo: ").concat(T)),(0,K.f)("event","skelly_error",{skelly_event_action:"window.onerror",skelly_event_pathname:_,skelly_event_source:C?"".concat(C,"?").concat(R,":").concat(T):void 0,skelly_event_label:m||void 0})},window.onunhandledrejection=m=>{G.vU("window.onunhandledrejection(): event.reason: ".concat(m.reason,",")),(0,K.f)("event","skelly_error",{skelly_event_action:"window.onunhandledrejection",skelly_event_pathname:_,skelly_event_source:"Uncaught (in promise)",skelly_event_label:m.reason?m.reason:void 0})},document.addEventListener("error",m=>{if("string"==typeof m.target.outerHTML){let _=m.target.outerHTML;if(_.includes("adservice.google")||_.includes("www.googletagservices.com")||_.includes("googlesyndication")||_.includes("securepubads.g.doubleclick.net")||_.includes("content.overwolf.com"))return}let C={action:"document.error",pathname:_+m.target&&m.target.baseURI?m.target.baseURI.replace("overwolf-extension://elhafgldkenhhgfkfpcdhemiebkhbgibncgnbnpb",""):"",source:m.target.constructor.name,label:m.target&&m.target.outerHTML?m.target&&m.target.outerHTML:void 0};G.vU("document.error(): ".concat(JSON.stringify(C))),(0,K.f)("event","skelly_error",{...C})},!0)}var Z=C(77236),W="persist:",Y="persist/FLUSH",J="persist/REHYDRATE",Q="persist/PAUSE",X="persist/PERSIST",ee="persist/PURGE",et="persist/REGISTER";function _typeof(_){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(_){return typeof _}:function(_){return _&&"function"==typeof Symbol&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(_)}function ownKeys(_,m){var C=Object.keys(_);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(_);m&&(R=R.filter(function(m){return Object.getOwnPropertyDescriptor(_,m).enumerable})),C.push.apply(C,R)}return C}function autoMergeLevel1(_,m,C,R){R.debug;var T=function(_){for(var m=1;m=0||(T[C]=_[C]);return T}(_,m);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(_);for(R=0;R=0)&&Object.prototype.propertyIsEnumerable.call(_,C)&&(T[C]=_[C])}return T}(G,["_persist"]);if(H.type===X){var et=!1,_rehydrate=function(m,C){et||(H.rehydrate(_.key,m,C),et=!0)};if(L&&setTimeout(function(){et||_rehydrate(void 0,Error('redux-persist: persist timed out for persist key "'.concat(_.key,'"')))},L),B=!1,U||(U=function(_){var m,C=_.blacklist||null,R=_.whitelist||null,T=_.transforms||[],L=_.throttle||0,U="".concat(void 0!==_.keyPrefix?_.keyPrefix:W).concat(_.key),F=_.storage;m=!1===_.serialize?function(_){return _}:"function"==typeof _.serialize?_.serialize:defaultSerialize;var B=_.writeFailHandler||null,$={},H={},V=[],q=null,G=null;function processNextKey(){if(0===V.length){q&&clearInterval(q),q=null;return}var _=V.shift(),C=T.reduce(function(m,C){return C.in(m,_,$)},$[_]);if(void 0!==C)try{H[_]=m(C)}catch(_){console.error("redux-persist/createPersistoid: error serializing state",_)}else delete H[_];0===V.length&&(Object.keys(H).forEach(function(_){void 0===$[_]&&delete H[_]}),G=F.setItem(U,m(H)).catch(onWriteFail))}function passWhitelistBlacklist(_){return(!R||-1!==R.indexOf(_)||"_persist"===_)&&(!C||-1===C.indexOf(_))}function onWriteFail(_){B&&B(_)}return{update:function(_){Object.keys(_).forEach(function(m){passWhitelistBlacklist(m)&&$[m]!==_[m]&&-1===V.indexOf(m)&&V.push(m)}),Object.keys($).forEach(function(m){void 0===_[m]&&passWhitelistBlacklist(m)&&-1===V.indexOf(m)&&void 0!==$[m]&&V.push(m)}),null===q&&(q=setInterval(processNextKey,L)),$=_},flush:function(){for(;0!==V.length;)processNextKey();return G||Promise.resolve()}}}(_)),K)return persistReducer_objectSpread({},m(Z,H),{_persist:K});if("function"!=typeof H.rehydrate||"function"!=typeof H.register)throw Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return H.register(_.key),T(_).then(function(m){(_.migrate||function(_,m){return Promise.resolve(_)})(m,C).then(function(_){_rehydrate(_)},function(_){_rehydrate(void 0,_)})},function(_){_rehydrate(void 0,_)}),persistReducer_objectSpread({},m(Z,H),{_persist:{version:C,rehydrated:!1}})}if(H.type===ee)return F=!0,H.result((V=_.storage,q="".concat(void 0!==_.keyPrefix?_.keyPrefix:W).concat(_.key),V.removeItem(q,warnIfRemoveError))),persistReducer_objectSpread({},m(Z,H),{_persist:K});if(H.type===Y)return H.result(U&&U.flush()),persistReducer_objectSpread({},m(Z,H),{_persist:K});if(H.type===Q)B=!0;else if(H.type===J){if(F)return persistReducer_objectSpread({},Z,{_persist:persistReducer_objectSpread({},K,{rehydrated:!0})});if(H.key===_.key){var er=m(Z,H),en=H.payload;return conditionalUpdate(persistReducer_objectSpread({},!1!==R&&void 0!==en?R(en,$,er,_):er,{_persist:persistReducer_objectSpread({},K,{rehydrated:!0})}))}}if(!K)return m($,H);var ei=m(Z,H);return ei===Z?$:conditionalUpdate(persistReducer_objectSpread({},ei,{_persist:K}))}}var er=C(45217);function _toConsumableArray(_){return function(_){if(Array.isArray(_)){for(var m=0,C=Array(_.length);m<_.length;m++)C[m]=_[m];return C}}(_)||function(_){if(Symbol.iterator in Object(_)||"[object Arguments]"===Object.prototype.toString.call(_))return Array.from(_)}(_)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}function persistStore_ownKeys(_,m){var C=Object.keys(_);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(_);m&&(R=R.filter(function(m){return Object.getOwnPropertyDescriptor(_,m).enumerable})),C.push.apply(C,R)}return C}function persistStore_objectSpread(_){for(var m=1;m0&&void 0!==arguments[0]?arguments[0]:en,m=arguments.length>1?arguments[1]:void 0;switch(m.type){case et:return persistStore_objectSpread({},_,{registry:[].concat(_toConsumableArray(_.registry),[m.key])});case J:var C=_.registry.indexOf(m.key),R=_toConsumableArray(_.registry);return R.splice(C,1),persistStore_objectSpread({},_,{registry:R,bootstrapped:0===R.length});default:return _}},ei=C(47669),eo=C(36448),ea=C(55576),es=C(73356),ec=C(67566),eu=C(66492),el=C(62858),ed=C(83337),ef=C(76734),ep=C(76872),eh=C(60323),ey=C(12824),eg=C(69419);let KinesisVideoServiceException=class KinesisVideoServiceException extends eg.sI{constructor(_){super(_),Object.setPrototypeOf(this,KinesisVideoServiceException.prototype)}};let AccessDeniedException=class AccessDeniedException extends KinesisVideoServiceException{constructor(_){super({name:"AccessDeniedException",$fault:"client",..._}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,AccessDeniedException.prototype),this.Message=_.Message}};let e_={MASTER:"MASTER",VIEWER:"VIEWER"};let ClientLimitExceededException=class ClientLimitExceededException extends KinesisVideoServiceException{constructor(_){super({name:"ClientLimitExceededException",$fault:"client",..._}),this.name="ClientLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,ClientLimitExceededException.prototype),this.Message=_.Message}};let InvalidArgumentException=class InvalidArgumentException extends KinesisVideoServiceException{constructor(_){super({name:"InvalidArgumentException",$fault:"client",..._}),this.name="InvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,InvalidArgumentException.prototype),this.Message=_.Message}};let ResourceInUseException=class ResourceInUseException extends KinesisVideoServiceException{constructor(_){super({name:"ResourceInUseException",$fault:"client",..._}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,ResourceInUseException.prototype),this.Message=_.Message}};let ResourceNotFoundException=class ResourceNotFoundException extends KinesisVideoServiceException{constructor(_){super({name:"ResourceNotFoundException",$fault:"client",..._}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype),this.Message=_.Message}};var em=C(91526);let hostHeaderMiddleware=_=>m=>async C=>{if(!em.aW.isInstance(C.request))return m(C);let{request:R}=C,{handlerProtocol:T=""}=_.requestHandler.metadata||{};if(T.indexOf("h2")>=0&&!R.headers[":authority"])delete R.headers.host,R.headers[":authority"]="";else if(!R.headers.host){let _=R.hostname;null!=R.port&&(_+=`:${R.port}`),R.headers.host=_}return m(C)},ev={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=_=>({applyToStack:m=>{m.add(hostHeaderMiddleware(_),ev)}}),loggerMiddleware=()=>(_,m)=>async C=>{try{let R=await _(C),{clientName:T,commandName:L,logger:U,dynamoDbDocumentClientOptions:F={}}=m,{overrideInputFilterSensitiveLog:B,overrideOutputFilterSensitiveLog:$}=F,H=B??m.inputFilterSensitiveLog,V=$??m.outputFilterSensitiveLog,{$metadata:q,...G}=R.output;return U?.info?.({clientName:T,commandName:L,input:H(C.input),output:V(G),metadata:q}),R}catch(B){let{clientName:_,commandName:R,logger:T,dynamoDbDocumentClientOptions:L={}}=m,{overrideInputFilterSensitiveLog:U}=L,F=U??m.inputFilterSensitiveLog;throw T?.error?.({clientName:_,commandName:R,input:F(C.input),error:B,metadata:B.$metadata}),B}},eb={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=_=>({applyToStack:_=>{_.add(loggerMiddleware(),eb)}});var ew=C(71769),eS=C(8243),eE=C(14912),eC=C(44562),ex=C(69080),eP=C(68504),eA=C(37916),eR=C(12532);let eO="X-Amz-Date",eI="X-Amz-Signature",eT="X-Amz-Security-Token",ek="authorization",eM=eO.toLowerCase(),ej=[ek,eM,"date"],eD=eI.toLowerCase(),eN="x-amz-content-sha256",eL=eT.toLowerCase(),eU={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},eF=/^proxy-/,eB=/^sec-/,e$="AWS4-HMAC-SHA256",ez="aws4_request",eH={},eV=[],createScope=(_,m,C)=>`${_}/${m}/${C}/${ez}`,getSigningKey=async(_,m,C,R,T)=>{let L=await hmac(_,m.secretAccessKey,m.accessKeyId),U=`${C}:${R}:${T}:${(0,eC.N)(L)}:${m.sessionToken}`;if(U in eH)return eH[U];for(eV.push(U);eV.length>50;)delete eH[eV.shift()];let F=`AWS4${m.secretAccessKey}`;for(let m of[C,R,T,ez])F=await hmac(_,F,m);return eH[U]=F},hmac=(_,m,C)=>{let R=new _(m);return R.update((0,eR._)(C)),R.digest()},getCanonicalHeaders=({headers:_},m,C)=>{let R={};for(let T of Object.keys(_).sort()){if(void 0==_[T])continue;let L=T.toLowerCase();(!(L in eU||m?.has(L)||eF.test(L)||eB.test(L))||C&&(!C||C.has(L)))&&(R[L]=_[T].trim().replace(/\s+/g," "))}return R};var eq=C(55388);let getCanonicalQuery=({query:_={}})=>{let m=[],C={};for(let R of Object.keys(_).sort()){if(R.toLowerCase()===eD)continue;m.push(R);let T=_[R];"string"==typeof T?C[R]=`${(0,eq.i)(R)}=${(0,eq.i)(T)}`:Array.isArray(T)&&(C[R]=T.slice(0).reduce((_,m)=>_.concat([`${(0,eq.i)(R)}=${(0,eq.i)(m)}`]),[]).sort().join("&"))}return m.map(_=>C[_]).filter(_=>_).join("&")},isArrayBuffer=_=>"function"==typeof ArrayBuffer&&_ instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(_),getPayloadHash=async({headers:_,body:m},C)=>{for(let m of Object.keys(_))if(m.toLowerCase()===eN)return _[m];if(void 0==m)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof m||ArrayBuffer.isView(m)||isArrayBuffer(m)){let _=new C;return _.update((0,eR._)(m)),(0,eC.N)(await _.digest())}return"UNSIGNED-PAYLOAD"},hasHeader=(_,m)=>{for(let C of(_=_.toLowerCase(),Object.keys(m)))if(_===C.toLowerCase())return!0;return!1},cloneRequest=({headers:_,query:m,...C})=>({...C,headers:{..._},query:m?cloneQuery(m):void 0}),cloneQuery=_=>Object.keys(_).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{}),moveHeadersToQuery=(_,m={})=>{let{headers:C,query:R={}}="function"==typeof _.clone?_.clone():cloneRequest(_);for(let _ of Object.keys(C)){let T=_.toLowerCase();"x-amz-"!==T.slice(0,6)||m.unhoistableHeaders?.has(T)||(R[_]=C[_],delete C[_])}return{..._,headers:C,query:R}},prepareRequest=_=>{for(let m of Object.keys((_="function"==typeof _.clone?_.clone():cloneRequest(_)).headers))ej.indexOf(m.toLowerCase())>-1&&delete _.headers[m];return _},iso8601=_=>toDate(_).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=_=>"number"==typeof _?new Date(1e3*_):"string"==typeof _?Number(_)?new Date(1e3*Number(_)):new Date(_):_;let SignatureV4_SignatureV4=class SignatureV4_SignatureV4{constructor({applyChecksum:_,credentials:m,region:C,service:R,sha256:T,uriEscapePath:L=!0}){this.headerMarshaller=new eE.y7(eP.G,eA.$),this.service=R,this.sha256=T,this.uriEscapePath=L,this.applyChecksum="boolean"!=typeof _||_,this.regionProvider=(0,ex.$)(C),this.credentialProvider=(0,ex.$)(m)}async presign(_,m={}){let{signingDate:C=new Date,expiresIn:R=3600,unsignableHeaders:T,unhoistableHeaders:L,signableHeaders:U,signingRegion:F,signingService:B}=m,$=await this.credentialProvider();this.validateResolvedCredentials($);let H=F??await this.regionProvider(),{longDate:V,shortDate:q}=formatDate(C);if(R>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let G=createScope(q,H,B??this.service),K=moveHeadersToQuery(prepareRequest(_),{unhoistableHeaders:L});$.sessionToken&&(K.query[eT]=$.sessionToken),K.query["X-Amz-Algorithm"]=e$,K.query["X-Amz-Credential"]=`${$.accessKeyId}/${G}`,K.query[eO]=V,K.query["X-Amz-Expires"]=R.toString(10);let Z=getCanonicalHeaders(K,T,U);return K.query["X-Amz-SignedHeaders"]=getCanonicalHeaderList(Z),K.query[eI]=await this.getSignature(V,G,this.getSigningKey($,H,q,B),this.createCanonicalRequest(K,Z,await getPayloadHash(_,this.sha256))),K}async sign(_,m){return"string"==typeof _?this.signString(_,m):_.headers&&_.payload?this.signEvent(_,m):_.message?this.signMessage(_,m):this.signRequest(_,m)}async signEvent({headers:_,payload:m},{signingDate:C=new Date,priorSignature:R,signingRegion:T,signingService:L}){let U=T??await this.regionProvider(),{shortDate:F,longDate:B}=formatDate(C),$=createScope(F,U,L??this.service),H=await getPayloadHash({headers:{},body:m},this.sha256),V=new this.sha256;V.update(_);let q=(0,eC.N)(await V.digest()),G=["AWS4-HMAC-SHA256-PAYLOAD",B,$,R,q,H].join("\n");return this.signString(G,{signingDate:C,signingRegion:U,signingService:L})}async signMessage(_,{signingDate:m=new Date,signingRegion:C,signingService:R}){let T=this.signEvent({headers:this.headerMarshaller.format(_.message.headers),payload:_.message.body},{signingDate:m,signingRegion:C,signingService:R,priorSignature:_.priorSignature});return T.then(m=>({message:_.message,signature:m}))}async signString(_,{signingDate:m=new Date,signingRegion:C,signingService:R}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let L=C??await this.regionProvider(),{shortDate:U}=formatDate(m),F=new this.sha256(await this.getSigningKey(T,L,U,R));return F.update((0,eR._)(_)),(0,eC.N)(await F.digest())}async signRequest(_,{signingDate:m=new Date,signableHeaders:C,unsignableHeaders:R,signingRegion:T,signingService:L}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let F=T??await this.regionProvider(),B=prepareRequest(_),{longDate:$,shortDate:H}=formatDate(m),V=createScope(H,F,L??this.service);B.headers[eM]=$,U.sessionToken&&(B.headers[eL]=U.sessionToken);let q=await getPayloadHash(B,this.sha256);!hasHeader(eN,B.headers)&&this.applyChecksum&&(B.headers[eN]=q);let G=getCanonicalHeaders(B,R,C),K=await this.getSignature($,V,this.getSigningKey(U,F,H,L),this.createCanonicalRequest(B,G,q));return B.headers[ek]=`${e$} Credential=${U.accessKeyId}/${V}, SignedHeaders=${getCanonicalHeaderList(G)}, Signature=${K}`,B}createCanonicalRequest(_,m,C){let R=Object.keys(m).sort();return`${_.method} ${this.getCanonicalPath(_)} ${getCanonicalQuery(_)} ${R.map(_=>`${_}:${m[_]}`).join("\n")} ${R.join(";")} ${C}`}async createStringToSign(_,m,C){let R=new this.sha256;R.update((0,eR._)(C));let T=await R.digest();return`${e$} ${_} ${m} ${(0,eC.N)(T)}`}getCanonicalPath({path:_}){if(this.uriEscapePath){let m=[];for(let C of _.split("/"))C?.length!==0&&"."!==C&&(".."===C?m.pop():m.push(C));let C=`${_?.startsWith("/")?"/":""}${m.join("/")}${m.length>0&&_?.endsWith("/")?"/":""}`,R=encodeURIComponent(C);return R.replace(/%2F/g,"/")}return _}async getSignature(_,m,C,R){let T=await this.createStringToSign(_,m,R),L=new this.sha256(await C);return L.update((0,eR._)(T)),(0,eC.N)(await L.digest())}getSigningKey(_,m,C,R){return getSigningKey(this.sha256,_,C,m,R||this.service)}validateResolvedCredentials(_){if("object"!=typeof _||"string"!=typeof _.accessKeyId||"string"!=typeof _.secretAccessKey)throw Error("Resolved credential object is not valid")}};let formatDate=_=>{let m=iso8601(_).replace(/[\-:]/g,"");return{longDate:m,shortDate:m.slice(0,8)}},getCanonicalHeaderList=_=>Object.keys(_).sort().join(";"),resolveAwsAuthConfig=_=>{let m;let C=_.credentials?normalizeCredentialProvider(_.credentials):_.credentialDefaultProvider(_),{signingEscapePath:R=!0,systemClockOffset:T=_.systemClockOffset||0,sha256:L}=_;return m=_.signer?(0,ex.$)(_.signer):_.regionInfoProvider?()=>(0,ex.$)(_.region)().then(async m=>[await _.regionInfoProvider(m,{useFipsEndpoint:await _.useFipsEndpoint(),useDualstackEndpoint:await _.useDualstackEndpoint()})||{},m]).then(([m,T])=>{let{signingRegion:U,signingService:F}=m;_.signingRegion=_.signingRegion||U||T,_.signingName=_.signingName||F||_.serviceId;let B={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},$=_.signerConstructor||SignatureV4_SignatureV4;return new $(B)}):async m=>{m=Object.assign({},{name:"sigv4",signingName:_.signingName||_.defaultSigningName,signingRegion:await (0,ex.$)(_.region)(),properties:{}},m);let T=m.signingRegion,U=m.signingName;_.signingRegion=_.signingRegion||T,_.signingName=_.signingName||U||_.serviceId;let F={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},B=_.signerConstructor||SignatureV4_SignatureV4;return new B(F)},{..._,systemClockOffset:T,signingEscapePath:R,credentials:C,signer:m}},normalizeCredentialProvider=_=>"function"==typeof _?(0,eS.H)(_,_=>void 0!==_.expiration&&_.expiration.getTime()-Date.now()<3e5,_=>void 0!==_.expiration):(0,ex.$)(_),getSkewCorrectedDate=_=>new Date(Date.now()+_),isClockSkewed=(_,m)=>Math.abs(getSkewCorrectedDate(m).getTime()-_)>=3e5,getUpdatedSystemClockOffset=(_,m)=>{let C=Date.parse(_);return isClockSkewed(C,m)?C-Date.now():m},awsAuthMiddleware=_=>(m,C)=>async function(R){if(!em.aW.isInstance(R.request))return m(R);let T=C.endpointV2?.properties?.authSchemes?.[0],L=T?.name==="sigv4a"?T?.signingRegionSet?.join(","):void 0,U=await _.signer(T),F=await m({...R,request:await U.sign(R.request,{signingDate:getSkewCorrectedDate(_.systemClockOffset),signingRegion:L||C.signing_region,signingService:C.signing_service})}).catch(m=>{let C=m.ServerTime??getDateHeader(m.$response);throw C&&(_.systemClockOffset=getUpdatedSystemClockOffset(C,_.systemClockOffset)),m}),B=getDateHeader(F.response);return B&&(_.systemClockOffset=getUpdatedSystemClockOffset(B,_.systemClockOffset)),F},getDateHeader=_=>em.Zn.isInstance(_)?_.headers?.date??_.headers?.Date:void 0,eG={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},getAwsAuthPlugin=_=>({applyToStack:m=>{m.addRelativeTo(awsAuthMiddleware(_),eG)}});var eK=C(8794);let eZ="user-agent",eW="x-amz-user-agent",eY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,eJ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,userAgentMiddleware=_=>(m,C)=>async R=>{let{request:T}=R;if(!em.aW.isInstance(T))return m(R);let{headers:L}=T,U=C?.userAgent?.map(escapeUserAgent)||[],F=(await _.defaultUserAgentProvider()).map(escapeUserAgent),B=_?.customUserAgent?.map(escapeUserAgent)||[],$=(0,eK.Qj)(),H=($?[$]:[]).concat([...F,...U,...B]).join(" "),V=[...F.filter(_=>_.startsWith("aws-sdk-")),...B].join(" ");return"browser"!==_.runtime?(V&&(L[eW]=L[eW]?`${L[eZ]} ${V}`:V),L[eZ]=H):L[eW]=H,m({...R,request:T})},escapeUserAgent=_=>{let m=_[0].split("/").map(_=>_.replace(eY,"-")).join("/"),C=_[1]?.replace(eJ,"-"),R=m.indexOf("/"),T=m.substring(0,R),L=m.substring(R+1);return"api"===T&&(L=L.toLowerCase()),[T,L,C].filter(_=>_&&_.length>0).reduce((_,m,C)=>{switch(C){case 0:return m;case 1:return`${_}/${m}`;default:return`${_}#${m}`}},"")},eQ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=_=>({applyToStack:m=>{m.add(userAgentMiddleware(_),eQ)}});var eX=C(59280),e0=C(52326),e1=C(45597),e2=C(11511);let resolveClientEndpointParameters=_=>({..._,useDualstackEndpoint:_.useDualstackEndpoint??!1,useFipsEndpoint:_.useFipsEndpoint??!1,defaultSigningName:"kinesisvideo"});var e5={i8:"3.428.0"},e6=C(76505),e3=C(51206),e4=C.n(e3);let defaultUserAgent=({serviceId:_,clientVersion:m})=>async()=>{let C="undefined"!=typeof window&&window?.navigator?.userAgent?e4().parse(window.navigator.userAgent):void 0,R=[["aws-sdk-js",m],["ua","2.0"],[`os/${C?.os?.name||"other"}`,C?.os?.version],["lang/js"],["md/browser",`${C?.browser?.name??"unknown"}_${C?.browser?.version??"unknown"}`]];return _&&R.push([`api/${_}`,m]),R};var e8=C(39627),e7=C(33131),e9=C(90130),te=C(63660),tt=C(93294),tr=C(10687);let tn="required",ti="argv",to="isSet",ta="tree",ts="error",tc="endpoint",tu="PartitionResult",tl={[tn]:!1,type:"String"},td={[tn]:!0,default:!1,type:"Boolean"},tf={ref:"Endpoint"},tp={fn:"booleanEquals",[ti]:[{ref:"UseFIPS"},!0]},th={fn:"booleanEquals",[ti]:[{ref:"UseDualStack"},!0]},ty={},tg={fn:"booleanEquals",[ti]:[!0,{fn:"getAttr",[ti]:[{ref:tu},"supportsFIPS"]}]},t_={fn:"booleanEquals",[ti]:[!0,{fn:"getAttr",[ti]:[{ref:tu},"supportsDualStack"]}]},tm=[tp],tv=[th],tb=[{ref:"Region"}],tw={version:"1.0",parameters:{Region:tl,UseDualStack:td,UseFIPS:td,Endpoint:tl},rules:[{conditions:[{fn:to,[ti]:[tf]}],type:ta,rules:[{conditions:tm,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ts},{conditions:tv,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ts},{endpoint:{url:tf,properties:ty,headers:ty},type:tc}]},{conditions:[{fn:to,[ti]:tb}],type:ta,rules:[{conditions:[{fn:"aws.partition",[ti]:tb,assign:tu}],type:ta,rules:[{conditions:[tp,th],type:ta,rules:[{conditions:[tg,t_],type:ta,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ty,headers:ty},type:tc}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ts}]},{conditions:tm,type:ta,rules:[{conditions:[tg],type:ta,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ty,headers:ty},type:tc}]},{error:"FIPS is enabled but this partition does not support FIPS",type:ts}]},{conditions:tv,type:ta,rules:[{conditions:[t_],type:ta,rules:[{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ty,headers:ty},type:tc}]},{error:"DualStack is enabled but this partition does not support DualStack",type:ts}]},{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}",properties:ty,headers:ty},type:tc}]}]},{error:"Invalid Configuration: Missing Region",type:ts}]},defaultEndpointResolver=(_,m={})=>(0,eK.B1)(tw,{endpointParams:_,logger:m.logger}),getRuntimeConfig=_=>({apiVersion:"2019-12-04",base64Decoder:_?.base64Decoder??tr.G,base64Encoder:_?.base64Encoder??tr.s,disableHostPrefix:_?.disableHostPrefix??!1,endpointProvider:_?.endpointProvider??defaultEndpointResolver,extensions:_?.extensions??[],logger:_?.logger??new eg.vk,serviceId:_?.serviceId??"Kinesis Video Signaling",urlParser:_?.urlParser??tt.e,utf8Decoder:_?.utf8Decoder??eA.$,utf8Encoder:_?.utf8Encoder??eP.G});var tS=C(95419);let runtimeConfig_browser_getRuntimeConfig=_=>{let m=(0,tS.j)(_),defaultConfigProvider=()=>m().then(eg.jv),C=getRuntimeConfig(_);return{...C,..._,runtime:"browser",defaultsMode:m,bodyLengthChecker:_?.bodyLengthChecker??e9.W,credentialDefaultProvider:_?.credentialDefaultProvider??(_=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:_?.defaultUserAgentProvider??defaultUserAgent({serviceId:C.serviceId,clientVersion:e5.i8}),maxAttempts:_?.maxAttempts??te.J,region:_?.region??(0,e7.n)("Region is missing"),requestHandler:_?.requestHandler??new e8.BX(defaultConfigProvider),retryMode:_?.retryMode??(async()=>(await defaultConfigProvider()).retryMode||te.CA),sha256:_?.sha256??e6.Sha256,streamCollector:_?.streamCollector??e8.CF,useDualstackEndpoint:_?.useDualstackEndpoint??(()=>Promise.resolve(eX.JY)),useFipsEndpoint:_?.useFipsEndpoint??(()=>Promise.resolve(eX.Fh))}};var tE=C(63743);let asPartial=_=>_,resolveRuntimeExtensions=(_,m)=>{let C={...asPartial((0,tE.GW)(_)),...asPartial((0,eg.kE)(_)),...asPartial((0,em.cA)(_))};return m.forEach(_=>_.configure(C)),{..._,...(0,tE.A1)(C),...(0,eg.SQ)(C),...(0,em.AO)(C)}};let KinesisVideoSignalingClient=class KinesisVideoSignalingClient extends eg.KU{constructor(...[_]){let m=runtimeConfig_browser_getRuntimeConfig(_||{}),C=resolveClientEndpointParameters(m),R=(0,eX.Xb)(C),T=(0,e1.uW)(R),L=(0,e2.BC)(T),U=resolveAwsAuthConfig(L),F={...U,customUserAgent:"string"==typeof U.customUserAgent?[[U.customUserAgent]]:U.customUserAgent},B=resolveRuntimeExtensions(F,_?.extensions||[]);super(B),this.config=B,this.middlewareStack.use((0,e2.NQ)(this.config)),this.middlewareStack.use((0,e0.VG)(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use((0,ew.eV)(this.config)),this.middlewareStack.use(getAwsAuthPlugin(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use((0,e2.gn)(this.config))}destroy(){super.destroy()}};var tC=C(45410),tx=C(97761);let KinesisVideoSignalingServiceException=class KinesisVideoSignalingServiceException extends eg.sI{constructor(_){super(_),Object.setPrototypeOf(this,KinesisVideoSignalingServiceException.prototype)}};let models_0_ClientLimitExceededException=class models_0_ClientLimitExceededException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"ClientLimitExceededException",$fault:"client",..._}),this.name="ClientLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,models_0_ClientLimitExceededException.prototype),this.Message=_.Message}};let models_0_InvalidArgumentException=class models_0_InvalidArgumentException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"InvalidArgumentException",$fault:"client",..._}),this.name="InvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,models_0_InvalidArgumentException.prototype),this.Message=_.Message}};let InvalidClientException=class InvalidClientException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"InvalidClientException",$fault:"client",..._}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,InvalidClientException.prototype)}};let models_models_0_NotAuthorizedException=class models_models_0_NotAuthorizedException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"NotAuthorizedException",$fault:"client",..._}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,models_models_0_NotAuthorizedException.prototype),this.Message=_.Message}};let models_0_ResourceNotFoundException=class models_0_ResourceNotFoundException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"ResourceNotFoundException",$fault:"client",..._}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,models_0_ResourceNotFoundException.prototype),this.Message=_.Message}};let SessionExpiredException=class SessionExpiredException extends KinesisVideoSignalingServiceException{constructor(_){super({name:"SessionExpiredException",$fault:"client",..._}),this.name="SessionExpiredException",this.$fault="client",Object.setPrototypeOf(this,SessionExpiredException.prototype)}};let se_GetIceServerConfigCommand=async(_,m)=>{let C;let{hostname:R,protocol:T="https",port:L,path:U}=await m.endpoint(),F=`${U?.endsWith("/")?U.slice(0,-1):U||""}/v1/get-ice-server-config`;return C=JSON.stringify((0,eg.qn)(_,{ChannelARN:[],ClientId:[],Service:[],Username:[]})),new em.aW({protocol:T,hostname:R,port:L,method:"POST",headers:{"content-type":"application/json"},path:F,body:C})},de_GetIceServerConfigCommand=async(_,m)=>{if(200!==_.statusCode&&_.statusCode>=300)return de_GetIceServerConfigCommandError(_,m);let C=(0,eg.UI)({$metadata:deserializeMetadata(_)}),R=(0,eg.CE)((0,eg.Wh)(await parseBody(_.body,m)),"body"),T=(0,eg.qn)(R,{IceServerList:eg.F3});return Object.assign(C,T),C},de_GetIceServerConfigCommandError=async(_,m)=>{let C={..._,body:await parseErrorBody(_.body,m)},R=loadRestJsonErrorCode(_,C.body);switch(R){case"ClientLimitExceededException":case"com.amazonaws.kinesisvideosignaling#ClientLimitExceededException":throw await de_ClientLimitExceededExceptionRes(C,m);case"InvalidArgumentException":case"com.amazonaws.kinesisvideosignaling#InvalidArgumentException":throw await de_InvalidArgumentExceptionRes(C,m);case"InvalidClientException":case"com.amazonaws.kinesisvideosignaling#InvalidClientException":throw await de_InvalidClientExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.kinesisvideosignaling#NotAuthorizedException":throw await de_NotAuthorizedExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.kinesisvideosignaling#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes(C,m);case"SessionExpiredException":case"com.amazonaws.kinesisvideosignaling#SessionExpiredException":throw await de_SessionExpiredExceptionRes(C,m);default:let T=C.body;return tP({output:_,parsedBody:T,errorCode:R})}},tP=(0,eg.PC)(KinesisVideoSignalingServiceException),de_ClientLimitExceededExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new models_0_ClientLimitExceededException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_InvalidArgumentExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new models_0_InvalidArgumentException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_InvalidClientExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{message:eg.pY});Object.assign(C,T);let L=new InvalidClientException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_NotAuthorizedExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new models_models_0_NotAuthorizedException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_ResourceNotFoundExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new models_0_ResourceNotFoundException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_SessionExpiredExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{message:eg.pY});Object.assign(C,T);let L=new SessionExpiredException({$metadata:deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),collectBodyString=(_,m)=>(0,eg.Wg)(_,m).then(_=>m.utf8Encoder(_)),parseBody=(_,m)=>collectBodyString(_,m).then(_=>_.length?JSON.parse(_):{}),parseErrorBody=async(_,m)=>{let C=await parseBody(_,m);return C.message=C.message??C.Message,C},loadRestJsonErrorCode=(_,m)=>{let sanitizeErrorCode=_=>{let m=_;return"number"==typeof m&&(m=m.toString()),m.indexOf(",")>=0&&(m=m.split(",")[0]),m.indexOf(":")>=0&&(m=m.split(":")[0]),m.indexOf("#")>=0&&(m=m.split("#")[1]),m},C=Object.keys(_.headers).find(_=>"x-amzn-errortype"===_.toLowerCase());return void 0!==C?sanitizeErrorCode(_.headers[C]):void 0!==m.code?sanitizeErrorCode(m.code):void 0!==m.__type?sanitizeErrorCode(m.__type):void 0};let GetIceServerConfigCommand=class GetIceServerConfigCommand extends eg.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,tC.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,e1.a3)(m,GetIceServerConfigCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"KinesisVideoSignalingClient",commandName:"GetIceServerConfigCommand",inputFilterSensitiveLog:_=>_,outputFilterSensitiveLog:_=>_,[tx.zK]:{service:"AWSAcuitySignalingService",operation:"GetIceServerConfig"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_GetIceServerConfigCommand(_,m)}deserialize(_,m){return de_GetIceServerConfigCommand(_,m)}};let tA="us-east-1";async function getIceServers(_,m,C,R,T){if(!_.AccessKeyId)throw"MissingAccessKeyId";if(!_.SecretAccessKey)throw"MissingSecretAccessKey";let L=new KinesisVideoSignalingClient({region:tA,credentials:{accessKeyId:_.AccessKeyId,secretAccessKey:_.SecretAccessKey,sessionToken:_.SessionToken,expiration:_.Expiration},endpoint:m}),U={ChannelARN:C};R===e_.VIEWER&&(U.ClientId=T),G.ZP.log("webRTC.getIceServers(): params: ".concat(JSON.stringify(U)));let F=await L.send(new GetIceServerConfigCommand(U));G.ZP.log("webRTC.getIceServers(): result: ".concat(JSON.stringify(F)));let B=[{urls:"stun:stun.kinesisvideo.".concat(tA,".amazonaws.com:443")}];if(!F.IceServerList)throw"GetIceServerFailed";return F.IceServerList.forEach(_=>B.push({urls:_.Uris,username:_.Username,credential:_.Password})),B}let dist_es_hostHeaderMiddleware=_=>m=>async C=>{if(!em.aW.isInstance(C.request))return m(C);let{request:R}=C,{handlerProtocol:T=""}=_.requestHandler.metadata||{};if(T.indexOf("h2")>=0&&!R.headers[":authority"])delete R.headers.host,R.headers[":authority"]="";else if(!R.headers.host){let _=R.hostname;null!=R.port&&(_+=`:${R.port}`),R.headers.host=_}return m(C)},tR={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},dist_es_getHostHeaderPlugin=_=>({applyToStack:m=>{m.add(dist_es_hostHeaderMiddleware(_),tR)}}),loggerMiddleware_loggerMiddleware=()=>(_,m)=>async C=>{try{let R=await _(C),{clientName:T,commandName:L,logger:U,dynamoDbDocumentClientOptions:F={}}=m,{overrideInputFilterSensitiveLog:B,overrideOutputFilterSensitiveLog:$}=F,H=B??m.inputFilterSensitiveLog,V=$??m.outputFilterSensitiveLog,{$metadata:q,...G}=R.output;return U?.info?.({clientName:T,commandName:L,input:H(C.input),output:V(G),metadata:q}),R}catch(B){let{clientName:_,commandName:R,logger:T,dynamoDbDocumentClientOptions:L={}}=m,{overrideInputFilterSensitiveLog:U}=L,F=U??m.inputFilterSensitiveLog;throw T?.error?.({clientName:_,commandName:R,input:F(C.input),error:B,metadata:B.$metadata}),B}},tO={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},loggerMiddleware_getLoggerPlugin=_=>({applyToStack:_=>{_.add(loggerMiddleware_loggerMiddleware(),tO)}}),tI="X-Amz-Date",tT="X-Amz-Signature",tk="X-Amz-Security-Token",tM="authorization",tj=tI.toLowerCase(),tD=[tM,tj,"date"],tN=tT.toLowerCase(),tL="x-amz-content-sha256",tU=tk.toLowerCase(),tF={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},tB=/^proxy-/,t$=/^sec-/,tz="AWS4-HMAC-SHA256",tH="aws4_request",tV={},tq=[],credentialDerivation_createScope=(_,m,C)=>`${_}/${m}/${C}/${tH}`,credentialDerivation_getSigningKey=async(_,m,C,R,T)=>{let L=await credentialDerivation_hmac(_,m.secretAccessKey,m.accessKeyId),U=`${C}:${R}:${T}:${(0,eC.N)(L)}:${m.sessionToken}`;if(U in tV)return tV[U];for(tq.push(U);tq.length>50;)delete tV[tq.shift()];let F=`AWS4${m.secretAccessKey}`;for(let m of[C,R,T,tH])F=await credentialDerivation_hmac(_,F,m);return tV[U]=F},credentialDerivation_hmac=(_,m,C)=>{let R=new _(m);return R.update((0,eR._)(C)),R.digest()},getCanonicalHeaders_getCanonicalHeaders=({headers:_},m,C)=>{let R={};for(let T of Object.keys(_).sort()){if(void 0==_[T])continue;let L=T.toLowerCase();(!(L in tF||m?.has(L)||tB.test(L)||t$.test(L))||C&&(!C||C.has(L)))&&(R[L]=_[T].trim().replace(/\s+/g," "))}return R},getCanonicalQuery_getCanonicalQuery=({query:_={}})=>{let m=[],C={};for(let R of Object.keys(_).sort()){if(R.toLowerCase()===tN)continue;m.push(R);let T=_[R];"string"==typeof T?C[R]=`${(0,eq.i)(R)}=${(0,eq.i)(T)}`:Array.isArray(T)&&(C[R]=T.slice(0).reduce((_,m)=>_.concat([`${(0,eq.i)(R)}=${(0,eq.i)(m)}`]),[]).sort().join("&"))}return m.map(_=>C[_]).filter(_=>_).join("&")},dist_es_isArrayBuffer=_=>"function"==typeof ArrayBuffer&&_ instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(_),getPayloadHash_getPayloadHash=async({headers:_,body:m},C)=>{for(let m of Object.keys(_))if(m.toLowerCase()===tL)return _[m];if(void 0==m)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof m||ArrayBuffer.isView(m)||dist_es_isArrayBuffer(m)){let _=new C;return _.update((0,eR._)(m)),(0,eC.N)(await _.digest())}return"UNSIGNED-PAYLOAD"},headerUtil_hasHeader=(_,m)=>{for(let C of(_=_.toLowerCase(),Object.keys(m)))if(_===C.toLowerCase())return!0;return!1},cloneRequest_cloneRequest=({headers:_,query:m,...C})=>({...C,headers:{..._},query:m?cloneRequest_cloneQuery(m):void 0}),cloneRequest_cloneQuery=_=>Object.keys(_).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{}),moveHeadersToQuery_moveHeadersToQuery=(_,m={})=>{let{headers:C,query:R={}}="function"==typeof _.clone?_.clone():cloneRequest_cloneRequest(_);for(let _ of Object.keys(C)){let T=_.toLowerCase();"x-amz-"!==T.slice(0,6)||m.unhoistableHeaders?.has(T)||(R[_]=C[_],delete C[_])}return{..._,headers:C,query:R}},prepareRequest_prepareRequest=_=>{for(let m of Object.keys((_="function"==typeof _.clone?_.clone():cloneRequest_cloneRequest(_)).headers))tD.indexOf(m.toLowerCase())>-1&&delete _.headers[m];return _},utilDate_iso8601=_=>utilDate_toDate(_).toISOString().replace(/\.\d{3}Z$/,"Z"),utilDate_toDate=_=>"number"==typeof _?new Date(1e3*_):"string"==typeof _?Number(_)?new Date(1e3*Number(_)):new Date(_):_;let dist_es_SignatureV4_SignatureV4=class dist_es_SignatureV4_SignatureV4{constructor({applyChecksum:_,credentials:m,region:C,service:R,sha256:T,uriEscapePath:L=!0}){this.headerMarshaller=new eE.y7(eP.G,eA.$),this.service=R,this.sha256=T,this.uriEscapePath=L,this.applyChecksum="boolean"!=typeof _||_,this.regionProvider=(0,ex.$)(C),this.credentialProvider=(0,ex.$)(m)}async presign(_,m={}){let{signingDate:C=new Date,expiresIn:R=3600,unsignableHeaders:T,unhoistableHeaders:L,signableHeaders:U,signingRegion:F,signingService:B}=m,$=await this.credentialProvider();this.validateResolvedCredentials($);let H=F??await this.regionProvider(),{longDate:V,shortDate:q}=SignatureV4_formatDate(C);if(R>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let G=credentialDerivation_createScope(q,H,B??this.service),K=moveHeadersToQuery_moveHeadersToQuery(prepareRequest_prepareRequest(_),{unhoistableHeaders:L});$.sessionToken&&(K.query[tk]=$.sessionToken),K.query["X-Amz-Algorithm"]=tz,K.query["X-Amz-Credential"]=`${$.accessKeyId}/${G}`,K.query[tI]=V,K.query["X-Amz-Expires"]=R.toString(10);let Z=getCanonicalHeaders_getCanonicalHeaders(K,T,U);return K.query["X-Amz-SignedHeaders"]=SignatureV4_getCanonicalHeaderList(Z),K.query[tT]=await this.getSignature(V,G,this.getSigningKey($,H,q,B),this.createCanonicalRequest(K,Z,await getPayloadHash_getPayloadHash(_,this.sha256))),K}async sign(_,m){return"string"==typeof _?this.signString(_,m):_.headers&&_.payload?this.signEvent(_,m):_.message?this.signMessage(_,m):this.signRequest(_,m)}async signEvent({headers:_,payload:m},{signingDate:C=new Date,priorSignature:R,signingRegion:T,signingService:L}){let U=T??await this.regionProvider(),{shortDate:F,longDate:B}=SignatureV4_formatDate(C),$=credentialDerivation_createScope(F,U,L??this.service),H=await getPayloadHash_getPayloadHash({headers:{},body:m},this.sha256),V=new this.sha256;V.update(_);let q=(0,eC.N)(await V.digest()),G=["AWS4-HMAC-SHA256-PAYLOAD",B,$,R,q,H].join("\n");return this.signString(G,{signingDate:C,signingRegion:U,signingService:L})}async signMessage(_,{signingDate:m=new Date,signingRegion:C,signingService:R}){let T=this.signEvent({headers:this.headerMarshaller.format(_.message.headers),payload:_.message.body},{signingDate:m,signingRegion:C,signingService:R,priorSignature:_.priorSignature});return T.then(m=>({message:_.message,signature:m}))}async signString(_,{signingDate:m=new Date,signingRegion:C,signingService:R}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let L=C??await this.regionProvider(),{shortDate:U}=SignatureV4_formatDate(m),F=new this.sha256(await this.getSigningKey(T,L,U,R));return F.update((0,eR._)(_)),(0,eC.N)(await F.digest())}async signRequest(_,{signingDate:m=new Date,signableHeaders:C,unsignableHeaders:R,signingRegion:T,signingService:L}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let F=T??await this.regionProvider(),B=prepareRequest_prepareRequest(_),{longDate:$,shortDate:H}=SignatureV4_formatDate(m),V=credentialDerivation_createScope(H,F,L??this.service);B.headers[tj]=$,U.sessionToken&&(B.headers[tU]=U.sessionToken);let q=await getPayloadHash_getPayloadHash(B,this.sha256);!headerUtil_hasHeader(tL,B.headers)&&this.applyChecksum&&(B.headers[tL]=q);let G=getCanonicalHeaders_getCanonicalHeaders(B,R,C),K=await this.getSignature($,V,this.getSigningKey(U,F,H,L),this.createCanonicalRequest(B,G,q));return B.headers[tM]=`${tz} Credential=${U.accessKeyId}/${V}, SignedHeaders=${SignatureV4_getCanonicalHeaderList(G)}, Signature=${K}`,B}createCanonicalRequest(_,m,C){let R=Object.keys(m).sort();return`${_.method} ${this.getCanonicalPath(_)} ${getCanonicalQuery_getCanonicalQuery(_)} ${R.map(_=>`${_}:${m[_]}`).join("\n")} ${R.join(";")} ${C}`}async createStringToSign(_,m,C){let R=new this.sha256;R.update((0,eR._)(C));let T=await R.digest();return`${tz} ${_} ${m} ${(0,eC.N)(T)}`}getCanonicalPath({path:_}){if(this.uriEscapePath){let m=[];for(let C of _.split("/"))C?.length!==0&&"."!==C&&(".."===C?m.pop():m.push(C));let C=`${_?.startsWith("/")?"/":""}${m.join("/")}${m.length>0&&_?.endsWith("/")?"/":""}`,R=encodeURIComponent(C);return R.replace(/%2F/g,"/")}return _}async getSignature(_,m,C,R){let T=await this.createStringToSign(_,m,R),L=new this.sha256(await C);return L.update((0,eR._)(T)),(0,eC.N)(await L.digest())}getSigningKey(_,m,C,R){return credentialDerivation_getSigningKey(this.sha256,_,C,m,R||this.service)}validateResolvedCredentials(_){if("object"!=typeof _||"string"!=typeof _.accessKeyId||"string"!=typeof _.secretAccessKey)throw Error("Resolved credential object is not valid")}};let SignatureV4_formatDate=_=>{let m=utilDate_iso8601(_).replace(/[\-:]/g,"");return{longDate:m,shortDate:m.slice(0,8)}},SignatureV4_getCanonicalHeaderList=_=>Object.keys(_).sort().join(";"),awsAuthConfiguration_resolveAwsAuthConfig=_=>{let m;let C=_.credentials?awsAuthConfiguration_normalizeCredentialProvider(_.credentials):_.credentialDefaultProvider(_),{signingEscapePath:R=!0,systemClockOffset:T=_.systemClockOffset||0,sha256:L}=_;return m=_.signer?(0,ex.$)(_.signer):_.regionInfoProvider?()=>(0,ex.$)(_.region)().then(async m=>[await _.regionInfoProvider(m,{useFipsEndpoint:await _.useFipsEndpoint(),useDualstackEndpoint:await _.useDualstackEndpoint()})||{},m]).then(([m,T])=>{let{signingRegion:U,signingService:F}=m;_.signingRegion=_.signingRegion||U||T,_.signingName=_.signingName||F||_.serviceId;let B={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},$=_.signerConstructor||dist_es_SignatureV4_SignatureV4;return new $(B)}):async m=>{m=Object.assign({},{name:"sigv4",signingName:_.signingName||_.defaultSigningName,signingRegion:await (0,ex.$)(_.region)(),properties:{}},m);let T=m.signingRegion,U=m.signingName;_.signingRegion=_.signingRegion||T,_.signingName=_.signingName||U||_.serviceId;let F={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},B=_.signerConstructor||dist_es_SignatureV4_SignatureV4;return new B(F)},{..._,systemClockOffset:T,signingEscapePath:R,credentials:C,signer:m}},awsAuthConfiguration_normalizeCredentialProvider=_=>"function"==typeof _?(0,eS.H)(_,_=>void 0!==_.expiration&&_.expiration.getTime()-Date.now()<3e5,_=>void 0!==_.expiration):(0,ex.$)(_),getSkewCorrectedDate_getSkewCorrectedDate=_=>new Date(Date.now()+_),isClockSkewed_isClockSkewed=(_,m)=>Math.abs(getSkewCorrectedDate_getSkewCorrectedDate(m).getTime()-_)>=3e5,getUpdatedSystemClockOffset_getUpdatedSystemClockOffset=(_,m)=>{let C=Date.parse(_);return isClockSkewed_isClockSkewed(C,m)?C-Date.now():m},awsAuthMiddleware_awsAuthMiddleware=_=>(m,C)=>async function(R){if(!em.aW.isInstance(R.request))return m(R);let T=C.endpointV2?.properties?.authSchemes?.[0],L=T?.name==="sigv4a"?T?.signingRegionSet?.join(","):void 0,U=await _.signer(T),F=await m({...R,request:await U.sign(R.request,{signingDate:getSkewCorrectedDate_getSkewCorrectedDate(_.systemClockOffset),signingRegion:L||C.signing_region,signingService:C.signing_service})}).catch(m=>{let C=m.ServerTime??awsAuthMiddleware_getDateHeader(m.$response);throw C&&(_.systemClockOffset=getUpdatedSystemClockOffset_getUpdatedSystemClockOffset(C,_.systemClockOffset)),m}),B=awsAuthMiddleware_getDateHeader(F.response);return B&&(_.systemClockOffset=getUpdatedSystemClockOffset_getUpdatedSystemClockOffset(B,_.systemClockOffset)),F},awsAuthMiddleware_getDateHeader=_=>em.Zn.isInstance(_)?_.headers?.date??_.headers?.Date:void 0,tG={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},awsAuthMiddleware_getAwsAuthPlugin=_=>({applyToStack:m=>{m.addRelativeTo(awsAuthMiddleware_awsAuthMiddleware(_),tG)}}),tK="user-agent",tZ="x-amz-user-agent",tW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,tY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,user_agent_middleware_userAgentMiddleware=_=>(m,C)=>async R=>{let{request:T}=R;if(!em.aW.isInstance(T))return m(R);let{headers:L}=T,U=C?.userAgent?.map(user_agent_middleware_escapeUserAgent)||[],F=(await _.defaultUserAgentProvider()).map(user_agent_middleware_escapeUserAgent),B=_?.customUserAgent?.map(user_agent_middleware_escapeUserAgent)||[],$=(0,eK.Qj)(),H=($?[$]:[]).concat([...F,...U,...B]).join(" "),V=[...F.filter(_=>_.startsWith("aws-sdk-")),...B].join(" ");return"browser"!==_.runtime?(V&&(L[tZ]=L[tZ]?`${L[tK]} ${V}`:V),L[tK]=H):L[tZ]=H,m({...R,request:T})},user_agent_middleware_escapeUserAgent=_=>{let m=_[0].split("/").map(_=>_.replace(tW,"-")).join("/"),C=_[1]?.replace(tY,"-"),R=m.indexOf("/"),T=m.substring(0,R),L=m.substring(R+1);return"api"===T&&(L=L.toLowerCase()),[T,L,C].filter(_=>_&&_.length>0).reduce((_,m,C)=>{switch(C){case 0:return m;case 1:return`${_}/${m}`;default:return`${_}#${m}`}},"")},tJ={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},user_agent_middleware_getUserAgentPlugin=_=>({applyToStack:m=>{m.add(user_agent_middleware_userAgentMiddleware(_),tJ)}}),EndpointParameters_resolveClientEndpointParameters=_=>({..._,useDualstackEndpoint:_.useDualstackEndpoint??!1,useFipsEndpoint:_.useFipsEndpoint??!1,defaultSigningName:"kinesisvideo"});var tQ={i8:"3.428.0"},tX=C(80686);let dist_es_defaultUserAgent=({serviceId:_,clientVersion:m})=>async()=>{let C="undefined"!=typeof window&&window?.navigator?.userAgent?e4().parse(window.navigator.userAgent):void 0,R=[["aws-sdk-js",m],["ua","2.0"],[`os/${C?.os?.name||"other"}`,C?.os?.version],["lang/js"],["md/browser",`${C?.browser?.name??"unknown"}_${C?.browser?.version??"unknown"}`]];return _&&R.push([`api/${_}`,m]),R},t0="required",t1="argv",t2="isSet",t5="tree",t6="error",t3="endpoint",t4="PartitionResult",t8={[t0]:!1,type:"String"},t7={[t0]:!0,default:!1,type:"Boolean"},t9={ref:"Endpoint"},re={fn:"booleanEquals",[t1]:[{ref:"UseFIPS"},!0]},rt={fn:"booleanEquals",[t1]:[{ref:"UseDualStack"},!0]},rr={},rn={fn:"booleanEquals",[t1]:[!0,{fn:"getAttr",[t1]:[{ref:t4},"supportsFIPS"]}]},ri={fn:"booleanEquals",[t1]:[!0,{fn:"getAttr",[t1]:[{ref:t4},"supportsDualStack"]}]},ro=[re],ra=[rt],rs=[{ref:"Region"}],rc={version:"1.0",parameters:{Region:t8,UseDualStack:t7,UseFIPS:t7,Endpoint:t8},rules:[{conditions:[{fn:t2,[t1]:[t9]}],type:t5,rules:[{conditions:ro,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:t6},{conditions:ra,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:t6},{endpoint:{url:t9,properties:rr,headers:rr},type:t3}]},{conditions:[{fn:t2,[t1]:rs}],type:t5,rules:[{conditions:[{fn:"aws.partition",[t1]:rs,assign:t4}],type:t5,rules:[{conditions:[re,rt],type:t5,rules:[{conditions:[rn,ri],type:t5,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:rr,headers:rr},type:t3}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:t6}]},{conditions:ro,type:t5,rules:[{conditions:[rn],type:t5,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:rr,headers:rr},type:t3}]},{error:"FIPS is enabled but this partition does not support FIPS",type:t6}]},{conditions:ra,type:t5,rules:[{conditions:[ri],type:t5,rules:[{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:rr,headers:rr},type:t3}]},{error:"DualStack is enabled but this partition does not support DualStack",type:t6}]},{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}",properties:rr,headers:rr},type:t3}]}]},{error:"Invalid Configuration: Missing Region",type:t6}]},endpointResolver_defaultEndpointResolver=(_,m={})=>(0,eK.B1)(rc,{endpointParams:_,logger:m.logger}),runtimeConfig_shared_getRuntimeConfig=_=>({apiVersion:"2017-09-30",base64Decoder:_?.base64Decoder??tr.G,base64Encoder:_?.base64Encoder??tr.s,disableHostPrefix:_?.disableHostPrefix??!1,endpointProvider:_?.endpointProvider??endpointResolver_defaultEndpointResolver,extensions:_?.extensions??[],logger:_?.logger??new eg.vk,serviceId:_?.serviceId??"Kinesis Video",urlParser:_?.urlParser??tt.e,utf8Decoder:_?.utf8Decoder??eA.$,utf8Encoder:_?.utf8Encoder??eP.G}),dist_es_runtimeConfig_browser_getRuntimeConfig=_=>{let m=(0,tS.j)(_),defaultConfigProvider=()=>m().then(eg.jv),C=runtimeConfig_shared_getRuntimeConfig(_);return{...C,..._,runtime:"browser",defaultsMode:m,bodyLengthChecker:_?.bodyLengthChecker??e9.W,credentialDefaultProvider:_?.credentialDefaultProvider??(_=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:_?.defaultUserAgentProvider??dist_es_defaultUserAgent({serviceId:C.serviceId,clientVersion:tQ.i8}),maxAttempts:_?.maxAttempts??te.J,region:_?.region??(0,e7.n)("Region is missing"),requestHandler:_?.requestHandler??new e8.BX(defaultConfigProvider),retryMode:_?.retryMode??(async()=>(await defaultConfigProvider()).retryMode||te.CA),sha256:_?.sha256??tX.Sha256,streamCollector:_?.streamCollector??e8.CF,useDualstackEndpoint:_?.useDualstackEndpoint??(()=>Promise.resolve(eX.JY)),useFipsEndpoint:_?.useFipsEndpoint??(()=>Promise.resolve(eX.Fh))}},runtimeExtensions_asPartial=_=>_,runtimeExtensions_resolveRuntimeExtensions=(_,m)=>{let C={...runtimeExtensions_asPartial((0,tE.GW)(_)),...runtimeExtensions_asPartial((0,eg.kE)(_)),...runtimeExtensions_asPartial((0,em.cA)(_))};return m.forEach(_=>_.configure(C)),{..._,...(0,tE.A1)(C),...(0,eg.SQ)(C),...(0,em.AO)(C)}};let KinesisVideoClient=class KinesisVideoClient extends eg.KU{constructor(...[_]){let m=dist_es_runtimeConfig_browser_getRuntimeConfig(_||{}),C=EndpointParameters_resolveClientEndpointParameters(m),R=(0,eX.Xb)(C),T=(0,e1.uW)(R),L=(0,e2.BC)(T),U=awsAuthConfiguration_resolveAwsAuthConfig(L),F={...U,customUserAgent:"string"==typeof U.customUserAgent?[[U.customUserAgent]]:U.customUserAgent},B=runtimeExtensions_resolveRuntimeExtensions(F,_?.extensions||[]);super(B),this.config=B,this.middlewareStack.use((0,e2.NQ)(this.config)),this.middlewareStack.use((0,e0.VG)(this.config)),this.middlewareStack.use(dist_es_getHostHeaderPlugin(this.config)),this.middlewareStack.use(loggerMiddleware_getLoggerPlugin(this.config)),this.middlewareStack.use((0,ew.eV)(this.config)),this.middlewareStack.use(awsAuthMiddleware_getAwsAuthPlugin(this.config)),this.middlewareStack.use(user_agent_middleware_getUserAgentPlugin(this.config))}destroy(){super.destroy()}};let Kinesis=class Kinesis{async getKinesisVideoClient(_){if(this.kinesisVideoClient)return this.kinesisVideoClient;let m=new KinesisVideoClient({region:"us-east-1",credentials:{accessKeyId:_.AccessKeyId,secretAccessKey:_.SecretAccessKey,sessionToken:_.SessionToken,expiration:_.Expiration}});return this.kinesisVideoClient=m,m}constructor(){this.kinesisVideoClient=void 0}};let se_GetSignalingChannelEndpointCommand=async(_,m)=>{let C;let{hostname:R,protocol:T="https",port:L,path:U}=await m.endpoint(),F=`${U?.endsWith("/")?U.slice(0,-1):U||""}/getSignalingChannelEndpoint`;return C=JSON.stringify((0,eg.qn)(_,{ChannelARN:[],SingleMasterChannelEndpointConfiguration:_=>(0,eg.F3)(_)})),new em.aW({protocol:T,hostname:R,port:L,method:"POST",headers:{"content-type":"application/json"},path:F,body:C})},de_GetSignalingChannelEndpointCommand=async(_,m)=>{if(200!==_.statusCode&&_.statusCode>=300)return de_GetSignalingChannelEndpointCommandError(_,m);let C=(0,eg.UI)({$metadata:Aws_restJson1_deserializeMetadata(_)}),R=(0,eg.CE)((0,eg.Wh)(await Aws_restJson1_parseBody(_.body,m)),"body"),T=(0,eg.qn)(R,{ResourceEndpointList:eg.F3});return Object.assign(C,T),C},de_GetSignalingChannelEndpointCommandError=async(_,m)=>{let C={..._,body:await Aws_restJson1_parseErrorBody(_.body,m)},R=Aws_restJson1_loadRestJsonErrorCode(_,C.body);switch(R){case"AccessDeniedException":case"com.amazonaws.kinesisvideo#AccessDeniedException":throw await de_AccessDeniedExceptionRes(C,m);case"ClientLimitExceededException":case"com.amazonaws.kinesisvideo#ClientLimitExceededException":throw await Aws_restJson1_de_ClientLimitExceededExceptionRes(C,m);case"InvalidArgumentException":case"com.amazonaws.kinesisvideo#InvalidArgumentException":throw await Aws_restJson1_de_InvalidArgumentExceptionRes(C,m);case"ResourceInUseException":case"com.amazonaws.kinesisvideo#ResourceInUseException":throw await de_ResourceInUseExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.kinesisvideo#ResourceNotFoundException":throw await Aws_restJson1_de_ResourceNotFoundExceptionRes(C,m);default:let T=C.body;return ru({output:_,parsedBody:T,errorCode:R})}},ru=(0,eg.PC)(KinesisVideoServiceException),de_AccessDeniedExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new AccessDeniedException({$metadata:Aws_restJson1_deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},Aws_restJson1_de_ClientLimitExceededExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new ClientLimitExceededException({$metadata:Aws_restJson1_deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},Aws_restJson1_de_InvalidArgumentExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new InvalidArgumentException({$metadata:Aws_restJson1_deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},de_ResourceInUseExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new ResourceInUseException({$metadata:Aws_restJson1_deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},Aws_restJson1_de_ResourceNotFoundExceptionRes=async(_,m)=>{let C=(0,eg.UI)({}),R=_.body,T=(0,eg.qn)(R,{Message:eg.pY});Object.assign(C,T);let L=new ResourceNotFoundException({$metadata:Aws_restJson1_deserializeMetadata(_),...C});return(0,eg.to)(L,_.body)},Aws_restJson1_deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),Aws_restJson1_collectBodyString=(_,m)=>(0,eg.Wg)(_,m).then(_=>m.utf8Encoder(_)),Aws_restJson1_parseBody=(_,m)=>Aws_restJson1_collectBodyString(_,m).then(_=>_.length?JSON.parse(_):{}),Aws_restJson1_parseErrorBody=async(_,m)=>{let C=await Aws_restJson1_parseBody(_,m);return C.message=C.message??C.Message,C},Aws_restJson1_loadRestJsonErrorCode=(_,m)=>{let sanitizeErrorCode=_=>{let m=_;return"number"==typeof m&&(m=m.toString()),m.indexOf(",")>=0&&(m=m.split(",")[0]),m.indexOf(":")>=0&&(m=m.split(":")[0]),m.indexOf("#")>=0&&(m=m.split("#")[1]),m},C=Object.keys(_.headers).find(_=>"x-amzn-errortype"===_.toLowerCase());return void 0!==C?sanitizeErrorCode(_.headers[C]):void 0!==m.code?sanitizeErrorCode(m.code):void 0!==m.__type?sanitizeErrorCode(m.__type):void 0};let GetSignalingChannelEndpointCommand=class GetSignalingChannelEndpointCommand extends eg.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,tC.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,e1.a3)(m,GetSignalingChannelEndpointCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"KinesisVideoClient",commandName:"GetSignalingChannelEndpointCommand",inputFilterSensitiveLog:_=>_,outputFilterSensitiveLog:_=>_,[tx.zK]:{service:"KinesisVideo_20170930",operation:"GetSignalingChannelEndpoint"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_GetSignalingChannelEndpointCommand(_,m)}deserialize(_,m){return de_GetSignalingChannelEndpointCommand(_,m)}};async function getSignalingChannelEndpoint(_,m,C){G.ZP.log("webRTC.getSignalingChannelEndpoint(): Called");let R=new GetSignalingChannelEndpointCommand({ChannelARN:m,SingleMasterChannelEndpointConfiguration:{Protocols:["WSS","HTTPS"],Role:C}}),T=await _.send(R);G.ZP.log("webRTC.getSignalingChannelEndpoint(): Result: ".concat(JSON.stringify(T)));let L=T.ResourceEndpointList.reduce((_,m)=>(m.Protocol&&(_[m.Protocol]=m.ResourceEndpoint),_),{});return L}var rl=C(28967);let rd=navigator.mediaDevices;function getNewMediaStream(){return new MediaStream}var rf=C(68099);let PeerConnection=class PeerConnection{openDataChannel(){var _,m;if((null===(_=this.skellySignalingClient)||void 0===_?void 0:_.getRole())===rf.uU.VIEWER){if(G.ZP.log("peerConnection.openDataChannel(): Called"),this.dataChannel){G.ZP.log("peerConnection.openDataChannel(): Returning, as there is already a data channel");return}this.dataChannel=null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.createDataChannel("skelly-datachannel"),this.setUpDataChannel()}}setUpDataChannel(){let _=this;for(this.dataChannel.onopen=()=>{G.ZP.log("peerConnection.dataChannel.onopen(): Called; sending current status to peer");let m=globalThis.skelly.reduxStore.getState(),C=m.webRTC.localAudio;_.send({update:C?"unmute":"mute"});let R=m.webRTC.localVideo;_.send({update:R?"enableVideo":"disableVideo"})},this.dataChannel.onmessage=m=>{G.ZP.log("peerConnection.dataChannel.onmessage(): Called (".concat(m.data,")")),_.onMessage(JSON.parse(m.data))},this.dataChannel.onerror=_=>{G.ZP.error("peerConnection.dataChannel.onerror(): Called"),G.ZP.error("e.error: ".concat(_.error))},this.dataChannel.onclose=()=>{var m;let C=null===(m=_.rtcPeerConnection)||void 0===m?void 0:m.connectionState;"connected"===C?(G.ZP.log("peerConnection.dataChannel.onclose(): Data channel is being re-opened (as connection is still alive)"),_.openDataChannel()):G.ZP.log("peerConnection.dataChannel.onclose(): Data connection closed (connectionState: ".concat(C,")"))};this.sendPromises.length>0;)this.sendPromises.shift()()}addTrack(_){var m,C,R;G.ZP.log("peerConnection.addTrack(): Adding track to RTC peer connection: ");let T=null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.getSenders();if(T)for(let _ of T)G.ZP.log("peerConnection.addTrack(): Track before adding: ",_.track);if(null===(C=this.rtcPeerConnection)||void 0===C||C.addTrack(_),T=null===(R=this.rtcPeerConnection)||void 0===R?void 0:R.getSenders())for(let _ of T)G.ZP.log("peerConnection.addTrack(): Track after adding: ",_.track)}async createOffer(){G.ZP.log("peerConnection.createOffer(): Called");try{var _,m,C,R;let T=await (null===(_=this.rtcPeerConnection)||void 0===_?void 0:_.createOffer({}));G.ZP.log("peerConnection.createOffer(): Sending SDP offer to '".concat(this.remoteClientId||"MASTER","'")),await (null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.setLocalDescription(T));let L=null===(C=this.rtcPeerConnection)||void 0===C?void 0:C.localDescription;null===(R=this.skellySignalingClient)||void 0===R||R.sendSdpOffer(L,this.remoteClientId)}catch(_){G.ZP.error("peerConnection.createOffer(): Failed"),G.ZP.error(JSON.stringify(_))}}async setSdpOffer(_){this.processingOffer=!0;try{var m,C,R,T,L;G.ZP.log("peerConnection.setSdpOffer(): Setting remote description"),await (null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.setRemoteDescription(_)),G.ZP.log("peerConnection.setSdpOffer(): Creating answer");let U=await (null===(C=this.rtcPeerConnection)||void 0===C?void 0:C.createAnswer());G.ZP.log("peerConnection.setSdpOffer(): Setting local description"),await (null===(R=this.rtcPeerConnection)||void 0===R?void 0:R.setLocalDescription(U)),null===(L=this.skellySignalingClient)||void 0===L||L.sendSdpAnswer(null===(T=this.rtcPeerConnection)||void 0===T?void 0:T.localDescription,this.remoteClientId),this.flushRemoteIceCandidates()}catch(_){G.ZP.error("peerConnection.setSdpOffer(): Failed"),G.ZP.error(JSON.stringify(_))}this.processingOffer=!1}async setSdpAnswer(_){var m;G.ZP.log("peerConnection.setSdpAnswer(): Received SDP answer from '".concat(this.remoteClientId||"VIEWER","'")),await (null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.setRemoteDescription(_)),this.flushRemoteIceCandidates()}addIceCandidate(_){var m,C,R,T;G.ZP.log("peerConnection.addIceCandidate(): Called (connectionState: ".concat(null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.connectionState,"; remoteDescription: ").concat(!!(null===(C=this.rtcPeerConnection)||void 0===C?void 0:C.remoteDescription),")")),(null===(R=this.rtcPeerConnection)||void 0===R?void 0:R.remoteDescription)?(G.ZP.log("peerConnection.addIceCandidate(): Adding ice candidate to rtcPeerConnection"),null===(T=this.rtcPeerConnection)||void 0===T||T.addIceCandidate(_)):(G.ZP.log("peerConnection.addIceCandidate(): Candidate was added to backlog"),this.remoteIceCandidates.push(_))}flushRemoteIceCandidates(){for(G.ZP.log("peerConnection.flushRemoteIceCandidates(): Called (no. of candidates: ".concat(this.remoteIceCandidates.length,")"));this.remoteIceCandidates.length;){var _;let m=this.remoteIceCandidates.shift();G.ZP.log("peerConnection.flushRemoteIceCandidates(): Adding ice candidate to rtcPeerConnection"),null===(_=this.rtcPeerConnection)||void 0===_||_.addIceCandidate(m)}}mute(){var _;if(G.ZP.log("peerConnection.mute(): Called"),"connected"!==this.connectionState){G.ZP.log("peerConnection.mute(): Returning, as not yet connected");return}console.log("senders");let m=(null===(_=this.rtcPeerConnection)||void 0===_?void 0:_.getSenders())||[];console.log(m),m.forEach(_=>{_.track&&"audio"===_.track.kind&&(_.track.enabled=!1)}),this.send({update:"mute"})}unmute(){var _;if(G.ZP.log("peerConnection.unmute(): Called"),"connected"!==this.connectionState){G.ZP.log("peerConnection.unmute(): Returning, as not yet connected");return}console.log("senders");let m=(null===(_=this.rtcPeerConnection)||void 0===_?void 0:_.getSenders())||[];console.log(m),m.forEach(_=>{var m;(null===(m=_.track)||void 0===m?void 0:m.kind)==="audio"&&(_.track.enabled=!0)}),this.send({update:"unmute"})}disableVideo(){var _;if(G.ZP.log("peerConnection.disableVideo(): Called"),"connected"!==this.connectionState){G.ZP.log("peerConnection.disableVideo(): Returning, as not yet connected");return}console.log("senders");let m=(null===(_=this.rtcPeerConnection)||void 0===_?void 0:_.getSenders())||[];console.log(m);let C=this;m.forEach(_=>{var m,R;(null===(m=_.track)||void 0===m?void 0:m.kind)==="video"&&(null===(R=C.rtcPeerConnection)||void 0===R||R.removeTrack(_))}),this.send({update:"disableVideo"})}enableVideo(_){var m;if(G.ZP.log("peerConnection.enableVideo(): Called"),"connected"!==this.connectionState){G.ZP.log("peerConnection.enableVideo(): Returning, as not yet connected");return}let C=(null===(m=this.rtcPeerConnection)||void 0===m?void 0:m.getSenders())||[],R=!1;C.forEach(_=>{var m;(null===(m=_.track)||void 0===m?void 0:m.kind)==="video"&&(R=!0)}),R?G.ZP.log("peerConnection.enableVideo(): RTC connection already has a video track"):(G.ZP.log("peerConnection.enableVideo(): Adding video track: ",_),this.addTrack(_)),this.send({update:"enableVideo"})}send(_){var m,C;let R=JSON.stringify(_);if(G.ZP.log("peerConnection.dataChannel.send(message: ".concat(R.slice(0,20),"...; readyState: ").concat(null===(m=this.dataChannel)||void 0===m?void 0:m.readyState,"): Called")),(null===(C=this.dataChannel)||void 0===C?void 0:C.readyState)==="open")this.dataChannel.send(R);else{let _=this;new Promise(m=>{_.sendPromises.push(m)}).then(()=>{_.dataChannel.send(R)})}}close(){var _;null===(_=this.rtcPeerConnection)||void 0===_||_.close(),this.rtcPeerConnection=void 0}constructor(_,m,C,R,T,L){this.processingOffer=!1,this.connectionState=void 0,this.remoteIceCandidates=[],this.sendPromises=[],G.ZP.log("peerConnection.constructor(remoteClientId: ".concat(L,"): Called")),this.onMessage=T,L&&(this.remoteClientId=L),this.skellySignalingClient=m,this.rtcPeerConnection=new RTCPeerConnection({iceServers:_});let U=this;this.rtcPeerConnection.onnegotiationneeded=_=>{G.ZP.log("peerConnection.onnegotationneeded(): Called"),U.processingOffer?G.ZP.log("peerConnection.onnegotationneeded(): Returning as offer is being processed"):(G.ZP.log("peerConnection.onnegotationneeded(): Creating offer"),U.createOffer())},this.rtcPeerConnection.ontrack=_=>{var m;G.ZP.log("peerConnection.ontrack(): Received remote ".concat(null==_?void 0:null===(m=_.track)||void 0===m?void 0:m.kind," track from peer")),G.ZP.log("peerConnection.ontrack(): Track: ".concat(JSON.stringify(_.track))),U.remoteClientId?R(_.track,U.remoteClientId):R(_.track)},this.rtcPeerConnection.onicecandidate=async _=>{if(_.candidate){var m;null===(m=this.skellySignalingClient)||void 0===m||m.sendIceCandidate(_.candidate,U.remoteClientId)}else G.ZP.log("peerConnection.onicecandidate(): Received empty local ICE candidate")},this.rtcPeerConnection.onicecandidateerror=_=>{},this.rtcPeerConnection.onconnectionstatechange=()=>{var _,m;let R=U.rtcPeerConnection?U.rtcPeerConnection.connectionState:"closed";G.ZP.log("peerConnection.onconnectionstatechange: state = '".concat(R,"'")),U.connectionState=R,"connected"===R&&(U.openDataChannel(),null===(m=U.rtcPeerConnection)||void 0===m||m.getStats().then(_=>{})),null===(_=U.rtcPeerConnection)||void 0===_||_.connectionState,C(R)},this.rtcPeerConnection.ondatachannel=_=>{G.ZP.log("rtcPeerConnection.ondatachannel(): Called"),U.dataChannel=_.channel,U.setUpDataChannel()}}};(L=U||(U={})).Idle="Idle",L.Opening="Opening",L.OpeningFailed="OpeningFailed",L.Open="Open",L.Closed="Closed";let SkellySignalingClient=class SkellySignalingClient{async prepareMaster(_){return this.role=rf.uU.MASTER,this.participants=[this.friendId,_],await this.fetchMasterCredentials(),{channelARN:this.channelARN,credentials:this.credentials}}async fetchMasterCredentials(){let _=await (0,rl.tD)(this.participants);if(G.ZP.log("skellySignalingClient.fetchMasterCredentials(): Got signaling channel '".concat(JSON.stringify(_),"'")),_.success)this.channelARN=_.SignalingChannel.channel_arn;else throw _.error;this.credentials=_.Credentials}async prepareViewer(_){G.ZP.log("skellySignalingClient.prepareViewer(channelARN: ".concat(_,"): Called")),this.role=rf.uU.VIEWER,this.channelARN=_;let m=/.+channel\/(.+)\/.+/.exec(this.channelARN);if(!Array.isArray(m)||2!==m.length)throw"Invalid channelARN";return this.channelName=m[1],await this.fetchViewerCredentials(),this.credentials}async fetchViewerCredentials(){let _=await (0,rl.wH)(this.channelName);if(G.ZP.log("skellySignalingClient.fetchViewerCredentials(): Result form getSignalingChannelViewer: ".concat(JSON.stringify(_))),!1===_.success)throw _.error;this.credentials=_.Credentials}createSignalingChannel(_,m){G.ZP.log("skellySignalingClient.createSignalingChannel(): Called"),this.channelEndpoint=_,this.systemClockOffset=m,this.createSignalingChannel_()}createSignalingChannel_(){G.ZP.log("skellySignalingClient.createSignalingChannel_(): Called"),this.signalingClient=new rf._r({channelEndpoint:this.channelEndpoint,role:this.role,clientId:this.role===rf.uU.MASTER?void 0:this.friendId,channelARN:this.channelARN,region:"us-east-1",systemClockOffset:this.systemClockOffset,credentials:{accessKeyId:this.credentials.AccessKeyId,secretAccessKey:this.credentials.SecretAccessKey,sessionToken:this.credentials.SessionToken}});let _=this;this.signalingClient.on("open",()=>{for(G.ZP.log("skellySignalingClient.onOpen(): Signaling client opened (No. of promises: ".concat(this.signalingClientReadyPromises.length,")")),_.connectionState="Open";this.signalingClientReadyPromises.length>0;)this.signalingClientReadyPromises.shift()()}),this.signalingClient.on("close",()=>{G.ZP.log("skellySignalingClient.onClose(): Disconnected from signaling server (connectionState: ".concat(_.connectionState,")"));let m=_.connectionState;switch(_.connectionState="Closed",m){case"OpeningFailed":G.ZP.log("skellySignalingClient.onClose(): Opening failed. Try again with new credentials?!");break;case"Open":G.ZP.log("skellySignalingClient.onClose(): Re-opening connection"),_.open();break;case"Closed":G.ZP.log("skellySignalingClient.onClose(): Ordinary closure");break;default:G.ZP.log("skellySignalingClient.onClose(): Unhandled closing")}}),this.signalingClient.on("error",m=>{G.ZP.error("skellySignalingClient.onError(): ".concat(JSON.stringify(m)," (connectionState: ").concat(_.connectionState,")")),G.ZP.error(m),"Opening"===_.connectionState&&(G.ZP.error("skellySignalingClient.onError(): Opening failed"),_.connectionState="OpeningFailed"),G.ZP.error("skellySignalingClient.onError(): Unhandled error")})}on(_,m){var C;null===(C=this.signalingClient)||void 0===C||C.on(_,m)}async open(){var _;if(G.ZP.log("skellySignalingClient.open(): Called (connection state: ".concat(this.connectionState,")")),"Idle"!==this.connectionState&&"Closed"!==this.connectionState){G.ZP.log("skellySignalingClient.open(): Function called in invalid connection state (connection state: ".concat(this.connectionState,")"));return}this.connectionState="Opening";let m=await this.ensureCredentials();m||this.createSignalingChannel_(),G.ZP.log("skellySignalingClient.open(): Opening signaling client"),null===(_=this.signalingClient)||void 0===_||_.open()}async ensureCredentials(){var _,m;let C=new Date(null===(_=this.credentials)||void 0===_?void 0:_.Expiration).getTime()-Date.now()>6e4;return G.ZP.log("skellySignalingClient.ensureCredentials(): Called (expiration: ".concat(null===(m=this.credentials)||void 0===m?void 0:m.Expiration,", valid: ").concat(C,")")),C||(this.role===rf.uU.MASTER?await this.fetchMasterCredentials():await this.fetchViewerCredentials()),C}async awaitOpen(){let _=this;if("Open"!==this.connectionState)return new Promise(m=>{_.signalingClientReadyPromises.push(m)})}async sendIceCandidate(_,m){for(;this.signalingClient;)try{m?this.signalingClient.sendIceCandidate(_,m):this.signalingClient.sendIceCandidate(_);return}catch(_){G.ZP.error("skellySignalingClient.sendIceCandidate(): Could not send ice candidate (".concat(_.toString(),")")),console.log(_),await this.awaitOpen()}}async sendSdpOffer(_,m){for(;this.signalingClient;)try{if(m){var C;null===(C=this.signalingClient)||void 0===C||C.sendSdpOffer(_,m)}else this.signalingClient.sendSdpOffer(_);return}catch(_){G.ZP.error("skellySignalingClient.sendSdpOffer(): Could not send SDP offer (".concat(JSON.stringify(_),")")),console.log(typeof _),console.log(_),await this.awaitOpen()}}async sendSdpAnswer(_,m){for(G.ZP.log("skellySignalingClient.sendSdpAnswer(): Called (".concat(JSON.stringify(_),")"));this.signalingClient;)try{var C,R;m?null===(C=this.signalingClient)||void 0===C||C.sendSdpAnswer(_,m):null===(R=this.signalingClient)||void 0===R||R.sendSdpAnswer(_);return}catch(_){G.ZP.error("skellySignalingClient.sendSdpAnswer(): Could not send SDP answer (".concat(JSON.stringify(_),")")),console.log(_),console.log(typeof _),console.log(_),await this.awaitOpen()}}close(){var _;for(G.ZP.log("skellySignalingClient.close(): Called"),this.connectionState="Closed",null===(_=this.signalingClient)||void 0===_||_.close(),this.signalingClient=void 0;this.signalingClientReadyPromises.length>0;)this.signalingClientReadyPromises.shift()()}getRole(){return this.role}constructor(_){this.signalingClientReadyPromises=[],this.connectionState="Idle",this.friendId=_}};function useReduxState(){return globalThis.skelly.reduxStore.getState()}function useReduxDispatch(){return globalThis.skelly.reduxStore.dispatch}function useFriendId(){return globalThis.skelly.reduxStore.getState().account.friendId}function useApolloClient(){return globalThis.skelly.apolloClient}let WebRTCMaster=class WebRTCMaster{async start(_){var m,C;G.ZP.log("webRTCMaster.start(): Called");let R=this;this.skellySignalingClient=new SkellySignalingClient(useFriendId());let{channelARN:T,credentials:L}=await this.skellySignalingClient.prepareMaster(_),U=await this.kinesis.getKinesisVideoClient(L),F=await getSignalingChannelEndpoint(U,T,e_.MASTER),B=await getIceServers(L,F.HTTPS,T,e_.MASTER);if(!this.skellySignalingClient)throw"SkellySignalingClientClosed";return this.skellySignalingClient.createSignalingChannel(F.WSS,U.config.systemClockOffset),this.skellySignalingClient.on("open",async()=>{G.ZP.log("webRTCMaster.onOpen(): MASTER is connected to signaling channel")}),this.skellySignalingClient.on("sdpOffer",async(_,m)=>{if(G.ZP.log("webRTCMaster.onSdpOffer(): Received SDP offer from '".concat(m,"'")),R.peerConnections[m])G.ZP.log("webRTCMaster.onSdpOffer(): Skipping creation of PeerConnection and adding tracks, as it is a follow-up sdp offer from '".concat(m,"'")),R.peerConnections[m].setSdpOffer(_);else{let C;G.ZP.log("webRTCMaster.onSdpOffer(): Creating new peer connection");let T=new PeerConnection(B,R.skellySignalingClient,_=>{G.ZP.log("webRTCMaster.peerConnection(): Connection state = '".concat(_,"'"));let C=globalThis.skelly.reduxStore.dispatch;C((0,ec.$6)({friendId:m,connectionState:_})),R.onConnectionStateChange(_)},R.onRemoteTrack,R.onMessage,m);R.peerConnections[m]=T;try{C=await R.getTracks()}catch(_){G.ZP.error("webRTCMaster.onSdpOffer(): Error getting tracks (".concat(JSON.stringify(_),")")),R.onError(_);return}C.forEach(_=>{G.ZP.log("webRTCMaster.onSdpOffer(): Adding local track '".concat(_.kind,"' to peer connection")),R.peerConnections[m].addTrack(_)}),G.ZP.log("webRTCMaster.onSdpOffer(): Setting SDP offer"),await R.peerConnections[m].setSdpOffer(_)}}),this.skellySignalingClient.on("sdpAnswer",async(_,m)=>{G.ZP.log("webRTCMaster.onSdpAnswer(): Received SDP answer from '".concat(m,"'")),R.peerConnections[m].setSdpAnswer(_)}),null===(m=R.skellySignalingClient)||void 0===m||m.on("iceCandidate",(_,m)=>{var C;G.ZP.log("webRTCMaster.onIceCandidate(): Received ice candidate from ".concat(m)),null===(C=R.peerConnections[m])||void 0===C||C.addIceCandidate(_)}),G.ZP.log("webRTCMaster.start(): Connecting to signaling channel"),await (null===(C=R.skellySignalingClient)||void 0===C?void 0:C.open()),G.ZP.log("webRTCMaster.start(): Successfully completed (i.e. iceServers added and signalingClient opened)"),T}mute(){Object.values(this.peerConnections).forEach(_=>_.mute())}unmute(){Object.values(this.peerConnections).forEach(_=>_.unmute())}disableVideo(){Object.values(this.peerConnections).forEach(_=>_.disableVideo())}enableVideo(_){Object.values(this.peerConnections).forEach(m=>m.enableVideo(_))}callLeft(_){return this.peerConnections[_]&&(this.peerConnections[_].close(),delete this.peerConnections[_]),Object.keys(this.peerConnections).length}close(){G.ZP.log("webRTCMaster.close(): Called");let _=useApolloClient(),m=useFriendId();G.ZP.log("webRTCMaster.close(): Informing all peers of leaving call");let C=Object.keys(this.peerConnections);C.forEach(C=>{null==_||_.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(m,C),message:"",type:"call_leave"},update:eh.P})}),G.ZP.log("webRTCMaster.close(): Closing signaling channel");let R=this.skellySignalingClient;this.skellySignalingClient=void 0,null==R||R.close(),G.ZP.log("webRTCMaster.close(): Release signalling channel"),(0,rl.aH)().then(_=>{G.ZP.log("webRTCMaster.close(): Result from releasing signaling channel (".concat(JSON.stringify(_),")"))}),Object.values(this.peerConnections).forEach(_=>_.close()),this.peerConnections={}}constructor(_,m,C,R,T){this.kinesis=new Kinesis,this.peerConnections={},G.ZP.log("webRTCMaster.constructor() Called"),this.getTracks=_,this.onRemoteTrack=m,this.onConnectionStateChange=C,this.onMessage=R,this.onError=T}};let WebRTCViewer=class WebRTCViewer{async start(){G.ZP.log("webRTCViewer.start(): Called");let _=this;this.skellySignalingClient=new SkellySignalingClient(this.friendIdViewer);let m=await this.skellySignalingClient.prepareViewer(this.channelARN),C=await this.kinesis.getKinesisVideoClient(m),R=await getSignalingChannelEndpoint(C,this.channelARN,e_.VIEWER),T=await getIceServers(m,R.HTTPS,this.channelARN,e_.VIEWER,this.friendIdViewer);await this.skellySignalingClient.createSignalingChannel(R.WSS,C.config.systemClockOffset),this.skellySignalingClient.on("open",async()=>{if(G.ZP.log("webRTCViewer.onOpen(): VIEWER connected to signaling channel (".concat(_.peerConnection?"subsequent open":"first open",")")),!_.peerConnection){let m;let C=new PeerConnection(T,_.skellySignalingClient,m=>{G.ZP.log("webRTCViewer.peerConnection(): Connection state = '".concat(m,"'"));let C=globalThis.skelly.reduxStore.dispatch;C((0,ec.$6)({friendId:_.friendIdMaster,connectionState:m})),_.onConnectionStateChange(m)},_.onRemoteTrack,_.onMessage);_.peerConnection=C;try{m=await _.getTracks()}catch(m){G.ZP.log("webRTCViewer.onOpen(): Error getting tracks (".concat(JSON.stringify(m),")")),_.onError(m);return}m.forEach(m=>{var C;G.ZP.log("webRTCViewer.onOpen(): Adding local ".concat(m.kind," track to peer connection")),null===(C=_.peerConnection)||void 0===C||C.addTrack(m)})}}),this.skellySignalingClient.on("sdpOffer",async m=>{var C;G.ZP.log("webRTCViewer.onSdpOffer(): Received SDP offer from 'MASTER'"),await (null===(C=_.peerConnection)||void 0===C?void 0:C.setSdpOffer(m))}),this.skellySignalingClient.on("sdpAnswer",async m=>{var C;G.ZP.log("webRTCViewer.onSdpAnswer(): Received SDP answer from 'MASTER'"),await (null===(C=_.peerConnection)||void 0===C?void 0:C.setSdpAnswer(m))}),this.skellySignalingClient.on("iceCandidate",m=>{var C;G.ZP.log("webRTCViewer.onIceCandidate(): Received ice candidate from MASTER"),null===(C=_.peerConnection)||void 0===C||C.addIceCandidate(m)}),G.ZP.log("webRTCViewer(): Opening signaling connection"),await this.skellySignalingClient.open(),G.ZP.log("webRTCViewer.start(): Sucessfully completed (i.e. iceServers added and signalingClient opened)")}mute(){this.peerConnection&&this.peerConnection.mute()}unmute(){this.peerConnection&&this.peerConnection.unmute()}disableVideo(){this.peerConnection&&this.peerConnection.disableVideo()}enableVideo(_){this.peerConnection&&this.peerConnection.enableVideo(_)}close(){var _;G.ZP.log("webRTCViewer.close(): Called"),G.ZP.log("webRTCViewer.close(): Closing peer connections"),null===(_=this.peerConnection)||void 0===_||_.close(),this.peerConnection=void 0,G.ZP.log("webRTCViewer.close(): Closing signaling channel");let m=this.skellySignalingClient;this.skellySignalingClient=void 0,null==m||m.close();let C=useApolloClient();null==C||C.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(this.friendIdViewer,this.friendIdMaster),message:"",type:"call_leave"},update:eh.P})}constructor(_,m,C,R,T,L,U,F){this.kinesis=new Kinesis,this.peerConnection=void 0,G.ZP.log("webRTCViewer.constructor(channelARN: ".concat(C,") Called")),this.friendIdViewer=_,this.friendIdMaster=m,this.channelARN=C,this.getTracks=R,this.onRemoteTrack=T,this.onConnectionStateChange=L,this.onMessage=U,this.onError=F}};var rp=C(47797),rh=C(18510);function getRelevantState(){let _=useReduxState();return{localAudio:_.webRTC.localAudio,localVideo:_.webRTC.localVideo,localScreenSharing:_.webRTC.localScreenSharing,localDeafen:_.webRTC.localDeafen}}globalThis.skelly={},R||function(){var _,m,C,L,U,F;G.ZP.log("reduxStore.setupStore(): Called");let B=persistReducer({key:"account",version:1,storage:ef.Z,blacklist:["loginState"]},ei.ZP),$=persistReducer({key:"settings",version:1,storage:ef.Z},eo.ZP),H=persistReducer({key:"messages",version:1,storage:ef.Z,whitelist:["chatPostDrafts"]},ed.ZP),V={account:B,settings:$,internetConnection:ea.ZP,notifications:es.ZP,webRTC:ec.ZP,activities:eu.ZP,search:el.ZP,messages:H,navigation:ep.ZP},q=(0,Z.xC)({reducer:V,middleware:_=>_({serializableCheck:{ignoredActions:[Y,J,Q,X,ee,et]},immutableCheck:!1}).concat([])});R=q,globalThis.skelly.reduxStore=q,m=!1,C=(0,er.MT)(persistorReducer,en,_&&_.enhancer?_.enhancer:void 0),L=function(_){C.dispatch({type:et,key:_})},U=function(_,R,T){var L={type:J,payload:R,err:T,key:_};q.dispatch(L),C.dispatch(L),m&&F.getState().bootstrapped&&(m(),m=!1)},F=persistStore_objectSpread({},C,{purge:function(){var _=[];return q.dispatch({type:ee,result:function(m){_.push(m)}}),Promise.all(_)},flush:function(){var _=[];return q.dispatch({type:Y,result:function(m){_.push(m)}}),Promise.all(_)},pause:function(){q.dispatch({type:Q})},persist:function(){q.dispatch({type:X,register:L,rehydrate:U})}}),_&&_.manualPersist||F.persist(),T=F,(0,ea.S1)(),globalThis.skelly.persistor=T,G.ZP.log("reduxStore.setupStore(): Completed")}(),G.ZP.log("initGlobals(): Instanciating globalThis"),globalThis.skelly.callManager=new class{start(){var _;G.ZP.log("callManager.start(): Called"),this.previousState=getRelevantState();let process=async _=>{if(this.pipeline.push(_),!this.isProcessing){for(this.isProcessing=!0;this.pipeline.length>0;){let _=this.pipeline.shift();if(this.localStream){var m,C,R,T;if((null===(m=this.previousState)||void 0===m?void 0:m.localVideo)!==(null==_?void 0:_.localVideo)){let m=(null==_?void 0:_.localVideo)===!0;if(m)try{let _=await this.getVideoTrack();this.webRTCMaster&&this.webRTCMaster.enableVideo(_),Object.values(this.webRTCViewers).forEach(m=>m.enableVideo(_))}catch(m){let _=useReduxDispatch();_((0,ec.J9)({name:m.name,message:m.message}))}else{this.webRTCMaster&&this.webRTCMaster.disableVideo(),Object.values(this.webRTCViewers).forEach(_=>_.disableVideo());let _=this;null===(T=this.userMedia)||void 0===T||T.getTracks().forEach(m=>{if("video"===m.kind){var C;m.stop(),null===(C=_.userMedia)||void 0===C||C.removeTrack(m)}}),this.localStream.getTracks().forEach(m=>{if("video"===m.kind){var C;m.stop(),null===(C=_.localStream)||void 0===C||C.removeTrack(m)}});let m=useReduxDispatch();m((0,ec.zG)())}}if((null===(C=this.previousState)||void 0===C?void 0:C.localAudio)!==(null==_?void 0:_.localAudio)){let m=(null==_?void 0:_.localAudio)===!0;m?(this.webRTCMaster&&this.webRTCMaster.unmute(),Object.values(this.webRTCViewers).forEach(_=>_.unmute())):(this.webRTCMaster&&this.webRTCMaster.mute(),Object.values(this.webRTCViewers).forEach(_=>_.mute()))}(null===(R=this.previousState)||void 0===R?void 0:R.localDeafen)!==(null==_?void 0:_.localDeafen)&&Object.values(this.remoteStreams).forEach(m=>{let C=(null==_?void 0:_.localDeafen)!==!0;m.getAudioTracks().forEach(_=>{_.enabled=C})})}this.previousState=_}this.isProcessing=!1}};null===(_=globalThis.skelly.reduxStore)||void 0===_||_.subscribe(async()=>process(getRelevantState())),process(this.previousState)}async openCall(_,m){if(G.ZP.log("callManager.openCall(friendId: ".concat(_.friend_id,", type: ").concat(m,"): Called")),!(null==_?void 0:_.friend_id))return;let C=useFriendId(),R=useReduxDispatch(),T=useApolloClient();try{this.onOpenCall&&this.onOpenCall(_.friend_id,m),R((0,ec.f5)({friendId:_.friend_id,type:m}));let L=await (null==T?void 0:T.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(C,_.friend_id),message:m,type:"call_request"},update:eh.P}));G.ZP.log("callManager.openCall(): GraphQL call request returned: ".concat(JSON.stringify(L)));let U=await (0,rp.i)(_.friend_id,void 0,{message:"call_request",type:m,senderName:(0,rh.Jl)(_)});G.ZP.log("callManager.openCall(): Lambda sendNotification request returned: ",JSON.stringify(U))}catch(_){throw G.ZP.log("callManager.openCall(): Call request failed: ",_),_}}async cancelCall(_){G.ZP.log("callManager.cancelCall(friendId: ".concat(_,"): Called"));let m=useFriendId(),C=useReduxDispatch(),R=useApolloClient();this.onCancelCall&&this.onCancelCall(_);try{let T=await (null==R?void 0:R.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(m,_),message:"",type:"call_cancel"},update:eh.P}));C((0,ec.vb)(_)),G.ZP.log("callManager.cancelCall(): Call request returned: ",T)}catch(_){throw G.ZP.log("callManager.cancelCall(): Call request failed: ",_),_}}async callRejected(_){let m=useReduxDispatch();m((0,ec.vb)(_))}async callAccepted(_,m){m=m||"video",G.ZP.log("callManager.callAccepted(friendId: ".concat(_,", type: ").concat(m,"): Called"));let C=useReduxDispatch();this.onCallAccepted&&this.onCallAccepted(_,m),C((0,ec.VZ)({friendId:_,type:m}));let R=this,T=new WebRTCMaster(this.getTracks.bind(this),(_,m)=>{R.onRemoteTrack(_,m)},_=>{R.onConnectionStateChange(T,_)},m=>{R.onMessage(m,_)},_=>{C((0,ec.Jz)({name:_.name,message:_.message})),R.freeResources()});this.webRTCMaster=T;let L=await this.webRTCMaster.start(_);await this.sendSignalingChannel(_,L)}async callRequested(_,m,C){var R;G.ZP.log("callManager.callRequest(caller: ".concat(_,", type: ").concat(m,"): Called"));let T=useReduxDispatch();T((0,ec.W)({friendId:_,type:m})),null===(R=this.onCallRequested)||void 0===R||R.call(this,_,m,C)}async callCanceled(_){G.ZP.log("callManager.callCancel(caller: ".concat(_,"): Called"));let m=useReduxDispatch();m((0,ec.Z6)(_)),this.onCallCancelled&&this.onCallCancelled(_)}async rejectCall(_){G.ZP.log("callManager.rejectCall(caller: ".concat(_,"): Called"));let m=useFriendId(),C=useReduxDispatch(),R=useApolloClient();try{C((0,ec.Z6)(_));let T=await (null==R?void 0:R.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(_,m),message:"",type:"call_reject"},update:eh.P}));G.ZP.log("callManager.rejectCall(): Call reject returned: ",T)}catch(_){throw G.ZP.log("callManager.rejectCall(): Call reject failed: ",_),_}}async acceptIncomingCall(_,m){G.ZP.log("callManager.acceptIncomingCall(friendId: ".concat(_,", type: ").concat(m,"): Called")),this.freeAllRemoteMedia(),this.freeAllWebRTCViewers(),this.freeWebRTCMaster();let C=useFriendId(),R=useReduxDispatch(),T=useApolloClient();try{R((0,ec.Ks)({friendId:_,type:m}));let L=await (null==T?void 0:T.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(_,C),message:m,type:"call_accept"},update:eh.P}));G.ZP.log("callManager.acceptIncomingCall(): Call accept returned: ".concat(JSON.stringify(L)," "))}catch(_){throw G.ZP.log("callManager.acceptIncomingCall(): Call accept failed: ",_),_}}async addSignalingChannel(_,m){G.ZP.log("callManager.addSignalingChannel(caller: ".concat(_,", channelARN: ").concat(m,"): Called"));let C=useFriendId(),R=useReduxDispatch(),T=this,L=new WebRTCViewer(C,_,m,this.getTracks.bind(this),(m,C)=>{T.onRemoteTrack(m,_)},_=>{T.onConnectionStateChange(L,_)},m=>{T.onMessage(m,_)},_=>{G.ZP.log("callManager(): WebRTCViewer reported error (".concat(JSON.stringify(_),")")),R((0,ec.Jz)({name:_.name,message:_.message})),T.freeResources()});this.webRTCViewers[_]=L;try{await L.start()}catch(_){G.ZP.error("callManager.addSignalingChannel(): Could not start webRTCViewer (".concat(JSON.stringify(_),")")),useReduxDispatch()}}async onConnectionStateChange(_,m){if(G.ZP.log("callManager.onConnectionStateChange(connectionState: ".concat(m,"): Called")),"connected"===m){let m=useReduxState();if(m.webRTC.localAudio?_.unmute():_.mute(),m.webRTC.localVideo){let m=await this.getVideoTrack();_.enableVideo(m)}else _.disableVideo()}}async sendSignalingChannel(_,m){G.ZP.log("callManager.sendSignalingChannel(friendId: ".concat(_,", channelARN: ").concat(m,"): Called"));let C=useFriendId(),R=useApolloClient();try{let T=await (null==R?void 0:R.mutate({mutation:ey.oi,variables:{chatId:(0,ey.ns)(C,_),message:"".concat(m),type:"signaling_channel"},update:eh.P}));G.ZP.log("callManager.sendSignalingChannel(): Call request returned: ",JSON.stringify(T))}catch(_){throw G.ZP.log("callManager.sendSignalingChannel(): Call request failed: ",_),_}}async getTracks(){if(G.ZP.log("callManager.getTracks(): Called"),!this.userMedia){let _=useReduxState(),m=_.webRTC.localAudio,C=_.webRTC.localVideo,R={};C&&(R.video={}),m&&(R.audio={noiseSuppression:!0}),G.ZP.log("callManager.getTracks(): Config: ".concat(JSON.stringify(R)));try{this.userMedia=await rd.getUserMedia(R),this.localStream=getNewMediaStream(),this.userMedia.getTracks().forEach(_=>{if("video"===_.kind){var m;null===(m=this.localStream)||void 0===m||m.addTrack(_)}});let _=useReduxDispatch();_((0,ec.zG)(!0))}catch(_){throw G.ZP.log("callManager.getTracks(): Error occured: ".concat(JSON.stringify(_))),console.log(_),console.log("e.name: ".concat(_.name)),console.log("e.message: ".concat(_.message)),_}}return this.userMedia.getTracks()}async getVideoTrack(){let _;if(G.ZP.log("callManager.getVideoTrack(): Called"),!this.localStream)throw G.ZP.log("callManager.getVideoTrack(): Returning as there is no local streama"),"NoLocalStream";if(this.localStream.getVideoTracks().forEach(m=>{_=m}),_)return _;try{let m=await rd.getUserMedia({video:!0});G.ZP.log("callManager.getVideoTrack(): userMedia: ".concat(JSON.stringify(m)));let C=this;m.getTracks().forEach(m=>{var R,T;_=m,null===(R=C.userMedia)||void 0===R||R.addTrack(m),null===(T=C.localStream)||void 0===T||T.addTrack(m)});let R=useReduxDispatch();R((0,ec.zG)(!0))}catch(_){throw G.ZP.log("callManager.getVideoTrack(): Error occured: ".concat(JSON.stringify(_))),console.log(_),console.log("e.name: ".concat(_.name)),console.log("e.message: ".concat(_.message)),_}return _}onRemoteTrack(_,m){G.ZP.log("callManager.onRemoteTrack(kind: ".concat(_.kind,", remoteClientId: ").concat(m,"): Called")),this.remoteStreams[m]||(this.remoteStreams[m]=getNewMediaStream()),this.remoteStreams[m].addTrack(_);let C=useReduxDispatch();C((0,ec.K4)({friendId:m,isActive:!0}))}onMessage(_,m){G.ZP.log("callManager.onMessage(): Message received (".concat(JSON.stringify(_),")"));let C=useReduxDispatch();switch(_.update){case"mute":C((0,ec.SU)({friendId:m,remoteAudio:!1}));break;case"unmute":C((0,ec.SU)({friendId:m,remoteAudio:!0}));break;case"disableVideo":C((0,ec.Lg)({friendId:m,remoteVideo:!1})),this.remoteStreams[m]&&this.remoteStreams[m].getTracks().forEach(_=>{"video"===_.kind&&(_.stop(),this.remoteStreams[m].removeTrack(_))});break;case"enableVideo":C((0,ec.Lg)({friendId:m,remoteVideo:!0}))}}async callLeft(_){G.ZP.log("callManager.callLeft(friendId: ".concat(_,"): Called"));let m=useReduxDispatch();if(this.remoteStreams[_]&&(m((0,ec.Fy)(_)),this.remoteStreams[_].getTracks().forEach(_=>_.stop()),delete this.remoteStreams[_]),this.webRTCMaster){let m=this.webRTCMaster.callLeft(_);0===m&&(this.webRTCMaster.close(),this.webRTCMaster=void 0)}this.webRTCViewers[_]&&(this.webRTCViewers[_].close(),delete this.webRTCViewers[_]),void 0===this.webRTCMaster&&0===Object.keys(this.webRTCViewers).length&&this.userMedia&&(this.userMedia.getTracks().forEach(_=>_.stop()),this.userMedia=void 0,this.localStream=void 0,m((0,ec.zG)(!1))),this.onCallLeft&&this.onCallLeft(_)}leaveCall(){G.ZP.log("callManager.leaveCall(): Called"),this.onLeaveCall&&this.onLeaveCall(),this.freeResources();let _=useReduxDispatch();_((0,ec.ur)())}freeResources(){G.ZP.log("callManager.freeResources(): Called"),this.freeWebRTCMaster(),this.freeAllWebRTCViewers(),this.freeLocalMedia(),this.freeAllRemoteMedia()}freeWebRTCMaster(){this.webRTCMaster&&(this.webRTCMaster.close(),this.webRTCMaster=void 0)}freeAllWebRTCViewers(){Object.values(this.webRTCViewers).forEach(_=>_.close()),this.webRTCViewers={}}freeLocalMedia(){this.userMedia&&this.userMedia.getTracks().forEach(_=>_.stop()),this.userMedia=void 0,this.localStream=void 0}freeAllRemoteMedia(){Object.values(this.remoteStreams).forEach(_=>{_.getTracks().forEach(_=>_.stop())}),this.remoteStreams={}}getLocalStream(){return this.localStream}getUserMedia(){return this.userMedia}getRemoteStreams(){return this.remoteStreams}constructor(){this.webRTCMaster=void 0,this.webRTCViewers={},this.remoteStreams={},this.userMedia=void 0,this.localStream=void 0,this.isProcessing=!1,this.pipeline=[],this.onOpenCall=void 0,this.onCallRequested=void 0,this.onCallCancelled=void 0,this.onCallLeft=void 0,this.onLeaveCall=void 0,G.ZP.log("callManager.constructor(): Called")}},null===localStorage.getItem("skelly:installationId")&&(localStorage.setItem("skelly:installationId",(0,B.Z)()),localStorage.setItem("skelly:installationTime",Math.round(new Date().getTime()/1e3).toString())),globalThis.skellyGlobal={},globalThis.skellyGlobal.skellyAudio=new class{subscribe(){G.ZP.log("SkellyAudio.subscribe(): Called");let _={callOngoing:!1},m=this;globalThis.skelly.reduxStore.subscribe(()=>{let C=Object.keys(globalThis.skelly.reduxStore.getState().webRTC.incomingCalls).length>0||Object.keys(globalThis.skelly.reduxStore.getState().webRTC.outgoingCalls).length>0;C!==_.callOngoing&&(C?(G.ZP.log("SkellyAudio.subscribe(): Playing ringtone"),m.playRingtone()):(G.ZP.log("SkellyAudio.subscribe(): Stop playing ringtone"),m.stopRingtone()),_.callOngoing=C)})}playRingtone(){G.ZP.log("Audio.playRingtone(): Called (this.callCounter: ".concat(this.callCounter,")")),this.ringtone.currentTime=0,this.ringtone.play()}stopRingtone(){G.ZP.log("Audio.stopRingtone(): Called (this.callCounter: ".concat(this.callCounter,")")),this.ringtone.pause()}playMatchEnded(){let _=new Audio("/music/matchEnded.mp3");_.onerror=function(_){G.ZP.error("audio.onerror: Ringtone could not be played")},_.play()}constructor(){this.callCounter=0,G.ZP.log("SkellyAudio.constructor(): Called"),this.ringtone=new Audio("/music/ringtone.mp3"),this.ringtone.loop=!0,this.ringtone.onerror=function(_){G.ZP.error("SkellyAudio(): audio.onerror: Ringtone could not be played"),G.ZP.error(_)},G.ZP.log("SkellyAudio.constructor(): Completed")}},globalThis.skellyGlobal.skellyAudio.subscribe();var _app=_=>{let{Component:m,pageProps:C}=_;{let _=q.Z.get("mode");document.body.style.backgroundColor=(0,V.d)(_)}return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(H(),{children:(0,F.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})}),(0,F.jsx)(m,{...C})]})}},16243:function(_,m,C){"use strict";C.d(m,{d:function(){return invoke}});var R,T=C(91526);let hostHeaderMiddleware=_=>m=>async C=>{if(!T.aW.isInstance(C.request))return m(C);let{request:R}=C,{handlerProtocol:L=""}=_.requestHandler.metadata||{};if(L.indexOf("h2")>=0&&!R.headers[":authority"])delete R.headers.host,R.headers[":authority"]="";else if(!R.headers.host){let _=R.hostname;null!=R.port&&(_+=`:${R.port}`),R.headers.host=_}return m(C)},L={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=_=>({applyToStack:m=>{m.add(hostHeaderMiddleware(_),L)}}),loggerMiddleware=()=>(_,m)=>async C=>{try{let R=await _(C),{clientName:T,commandName:L,logger:U,dynamoDbDocumentClientOptions:F={}}=m,{overrideInputFilterSensitiveLog:B,overrideOutputFilterSensitiveLog:$}=F,H=B??m.inputFilterSensitiveLog,V=$??m.outputFilterSensitiveLog,{$metadata:q,...G}=R.output;return U?.info?.({clientName:T,commandName:L,input:H(C.input),output:V(G),metadata:q}),R}catch(B){let{clientName:_,commandName:R,logger:T,dynamoDbDocumentClientOptions:L={}}=m,{overrideInputFilterSensitiveLog:U}=L,F=U??m.inputFilterSensitiveLog;throw T?.error?.({clientName:_,commandName:R,input:F(C.input),error:B,metadata:B.$metadata}),B}},U={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=_=>({applyToStack:_=>{_.add(loggerMiddleware(),U)}});var F=C(71769),B=C(8243),$=C(14912),H=C(44562),V=C(69080),q=C(68504),G=C(37916),K=C(12532);let Z="X-Amz-Date",W="X-Amz-Signature",Y="X-Amz-Security-Token",J="authorization",Q=Z.toLowerCase(),X=[J,Q,"date"],ee=W.toLowerCase(),et="x-amz-content-sha256",er=Y.toLowerCase(),en={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ei=/^proxy-/,eo=/^sec-/,ea="AWS4-HMAC-SHA256",es="aws4_request",ec={},eu=[],createScope=(_,m,C)=>`${_}/${m}/${C}/${es}`,getSigningKey=async(_,m,C,R,T)=>{let L=await hmac(_,m.secretAccessKey,m.accessKeyId),U=`${C}:${R}:${T}:${(0,H.N)(L)}:${m.sessionToken}`;if(U in ec)return ec[U];for(eu.push(U);eu.length>50;)delete ec[eu.shift()];let F=`AWS4${m.secretAccessKey}`;for(let m of[C,R,T,es])F=await hmac(_,F,m);return ec[U]=F},hmac=(_,m,C)=>{let R=new _(m);return R.update((0,K._)(C)),R.digest()},getCanonicalHeaders=({headers:_},m,C)=>{let R={};for(let T of Object.keys(_).sort()){if(void 0==_[T])continue;let L=T.toLowerCase();(!(L in en||m?.has(L)||ei.test(L)||eo.test(L))||C&&(!C||C.has(L)))&&(R[L]=_[T].trim().replace(/\s+/g," "))}return R};var el=C(55388);let getCanonicalQuery=({query:_={}})=>{let m=[],C={};for(let R of Object.keys(_).sort()){if(R.toLowerCase()===ee)continue;m.push(R);let T=_[R];"string"==typeof T?C[R]=`${(0,el.i)(R)}=${(0,el.i)(T)}`:Array.isArray(T)&&(C[R]=T.slice(0).reduce((_,m)=>_.concat([`${(0,el.i)(R)}=${(0,el.i)(m)}`]),[]).sort().join("&"))}return m.map(_=>C[_]).filter(_=>_).join("&")},isArrayBuffer=_=>"function"==typeof ArrayBuffer&&_ instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(_),getPayloadHash=async({headers:_,body:m},C)=>{for(let m of Object.keys(_))if(m.toLowerCase()===et)return _[m];if(void 0==m)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof m||ArrayBuffer.isView(m)||isArrayBuffer(m)){let _=new C;return _.update((0,K._)(m)),(0,H.N)(await _.digest())}return"UNSIGNED-PAYLOAD"},hasHeader=(_,m)=>{for(let C of(_=_.toLowerCase(),Object.keys(m)))if(_===C.toLowerCase())return!0;return!1},cloneRequest=({headers:_,query:m,...C})=>({...C,headers:{..._},query:m?cloneQuery(m):void 0}),cloneQuery=_=>Object.keys(_).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{}),moveHeadersToQuery=(_,m={})=>{let{headers:C,query:R={}}="function"==typeof _.clone?_.clone():cloneRequest(_);for(let _ of Object.keys(C)){let T=_.toLowerCase();"x-amz-"!==T.slice(0,6)||m.unhoistableHeaders?.has(T)||(R[_]=C[_],delete C[_])}return{..._,headers:C,query:R}},prepareRequest=_=>{for(let m of Object.keys((_="function"==typeof _.clone?_.clone():cloneRequest(_)).headers))X.indexOf(m.toLowerCase())>-1&&delete _.headers[m];return _},iso8601=_=>toDate(_).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=_=>"number"==typeof _?new Date(1e3*_):"string"==typeof _?Number(_)?new Date(1e3*Number(_)):new Date(_):_;let SignatureV4_SignatureV4=class SignatureV4_SignatureV4{constructor({applyChecksum:_,credentials:m,region:C,service:R,sha256:T,uriEscapePath:L=!0}){this.headerMarshaller=new $.y7(q.G,G.$),this.service=R,this.sha256=T,this.uriEscapePath=L,this.applyChecksum="boolean"!=typeof _||_,this.regionProvider=(0,V.$)(C),this.credentialProvider=(0,V.$)(m)}async presign(_,m={}){let{signingDate:C=new Date,expiresIn:R=3600,unsignableHeaders:T,unhoistableHeaders:L,signableHeaders:U,signingRegion:F,signingService:B}=m,$=await this.credentialProvider();this.validateResolvedCredentials($);let H=F??await this.regionProvider(),{longDate:V,shortDate:q}=formatDate(C);if(R>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let G=createScope(q,H,B??this.service),K=moveHeadersToQuery(prepareRequest(_),{unhoistableHeaders:L});$.sessionToken&&(K.query[Y]=$.sessionToken),K.query["X-Amz-Algorithm"]=ea,K.query["X-Amz-Credential"]=`${$.accessKeyId}/${G}`,K.query[Z]=V,K.query["X-Amz-Expires"]=R.toString(10);let J=getCanonicalHeaders(K,T,U);return K.query["X-Amz-SignedHeaders"]=getCanonicalHeaderList(J),K.query[W]=await this.getSignature(V,G,this.getSigningKey($,H,q,B),this.createCanonicalRequest(K,J,await getPayloadHash(_,this.sha256))),K}async sign(_,m){return"string"==typeof _?this.signString(_,m):_.headers&&_.payload?this.signEvent(_,m):_.message?this.signMessage(_,m):this.signRequest(_,m)}async signEvent({headers:_,payload:m},{signingDate:C=new Date,priorSignature:R,signingRegion:T,signingService:L}){let U=T??await this.regionProvider(),{shortDate:F,longDate:B}=formatDate(C),$=createScope(F,U,L??this.service),V=await getPayloadHash({headers:{},body:m},this.sha256),q=new this.sha256;q.update(_);let G=(0,H.N)(await q.digest()),K=["AWS4-HMAC-SHA256-PAYLOAD",B,$,R,G,V].join("\n");return this.signString(K,{signingDate:C,signingRegion:U,signingService:L})}async signMessage(_,{signingDate:m=new Date,signingRegion:C,signingService:R}){let T=this.signEvent({headers:this.headerMarshaller.format(_.message.headers),payload:_.message.body},{signingDate:m,signingRegion:C,signingService:R,priorSignature:_.priorSignature});return T.then(m=>({message:_.message,signature:m}))}async signString(_,{signingDate:m=new Date,signingRegion:C,signingService:R}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let L=C??await this.regionProvider(),{shortDate:U}=formatDate(m),F=new this.sha256(await this.getSigningKey(T,L,U,R));return F.update((0,K._)(_)),(0,H.N)(await F.digest())}async signRequest(_,{signingDate:m=new Date,signableHeaders:C,unsignableHeaders:R,signingRegion:T,signingService:L}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let F=T??await this.regionProvider(),B=prepareRequest(_),{longDate:$,shortDate:H}=formatDate(m),V=createScope(H,F,L??this.service);B.headers[Q]=$,U.sessionToken&&(B.headers[er]=U.sessionToken);let q=await getPayloadHash(B,this.sha256);!hasHeader(et,B.headers)&&this.applyChecksum&&(B.headers[et]=q);let G=getCanonicalHeaders(B,R,C),K=await this.getSignature($,V,this.getSigningKey(U,F,H,L),this.createCanonicalRequest(B,G,q));return B.headers[J]=`${ea} Credential=${U.accessKeyId}/${V}, SignedHeaders=${getCanonicalHeaderList(G)}, Signature=${K}`,B}createCanonicalRequest(_,m,C){let R=Object.keys(m).sort();return`${_.method} ${this.getCanonicalPath(_)} ${getCanonicalQuery(_)} ${R.map(_=>`${_}:${m[_]}`).join("\n")} ${R.join(";")} ${C}`}async createStringToSign(_,m,C){let R=new this.sha256;R.update((0,K._)(C));let T=await R.digest();return`${ea} ${_} ${m} ${(0,H.N)(T)}`}getCanonicalPath({path:_}){if(this.uriEscapePath){let m=[];for(let C of _.split("/"))C?.length!==0&&"."!==C&&(".."===C?m.pop():m.push(C));let C=`${_?.startsWith("/")?"/":""}${m.join("/")}${m.length>0&&_?.endsWith("/")?"/":""}`,R=encodeURIComponent(C);return R.replace(/%2F/g,"/")}return _}async getSignature(_,m,C,R){let T=await this.createStringToSign(_,m,R),L=new this.sha256(await C);return L.update((0,K._)(T)),(0,H.N)(await L.digest())}getSigningKey(_,m,C,R){return getSigningKey(this.sha256,_,C,m,R||this.service)}validateResolvedCredentials(_){if("object"!=typeof _||"string"!=typeof _.accessKeyId||"string"!=typeof _.secretAccessKey)throw Error("Resolved credential object is not valid")}};let formatDate=_=>{let m=iso8601(_).replace(/[\-:]/g,"");return{longDate:m,shortDate:m.slice(0,8)}},getCanonicalHeaderList=_=>Object.keys(_).sort().join(";"),resolveAwsAuthConfig=_=>{let m;let C=_.credentials?normalizeCredentialProvider(_.credentials):_.credentialDefaultProvider(_),{signingEscapePath:R=!0,systemClockOffset:T=_.systemClockOffset||0,sha256:L}=_;return m=_.signer?(0,V.$)(_.signer):_.regionInfoProvider?()=>(0,V.$)(_.region)().then(async m=>[await _.regionInfoProvider(m,{useFipsEndpoint:await _.useFipsEndpoint(),useDualstackEndpoint:await _.useDualstackEndpoint()})||{},m]).then(([m,T])=>{let{signingRegion:U,signingService:F}=m;_.signingRegion=_.signingRegion||U||T,_.signingName=_.signingName||F||_.serviceId;let B={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},$=_.signerConstructor||SignatureV4_SignatureV4;return new $(B)}):async m=>{m=Object.assign({},{name:"sigv4",signingName:_.signingName||_.defaultSigningName,signingRegion:await (0,V.$)(_.region)(),properties:{}},m);let T=m.signingRegion,U=m.signingName;_.signingRegion=_.signingRegion||T,_.signingName=_.signingName||U||_.serviceId;let F={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},B=_.signerConstructor||SignatureV4_SignatureV4;return new B(F)},{..._,systemClockOffset:T,signingEscapePath:R,credentials:C,signer:m}},normalizeCredentialProvider=_=>"function"==typeof _?(0,B.H)(_,_=>void 0!==_.expiration&&_.expiration.getTime()-Date.now()<3e5,_=>void 0!==_.expiration):(0,V.$)(_),getSkewCorrectedDate=_=>new Date(Date.now()+_),isClockSkewed=(_,m)=>Math.abs(getSkewCorrectedDate(m).getTime()-_)>=3e5,getUpdatedSystemClockOffset=(_,m)=>{let C=Date.parse(_);return isClockSkewed(C,m)?C-Date.now():m},awsAuthMiddleware=_=>(m,C)=>async function(R){if(!T.aW.isInstance(R.request))return m(R);let L=C.endpointV2?.properties?.authSchemes?.[0],U=L?.name==="sigv4a"?L?.signingRegionSet?.join(","):void 0,F=await _.signer(L),B=await m({...R,request:await F.sign(R.request,{signingDate:getSkewCorrectedDate(_.systemClockOffset),signingRegion:U||C.signing_region,signingService:C.signing_service})}).catch(m=>{let C=m.ServerTime??getDateHeader(m.$response);throw C&&(_.systemClockOffset=getUpdatedSystemClockOffset(C,_.systemClockOffset)),m}),$=getDateHeader(B.response);return $&&(_.systemClockOffset=getUpdatedSystemClockOffset($,_.systemClockOffset)),B},getDateHeader=_=>T.Zn.isInstance(_)?_.headers?.date??_.headers?.Date:void 0,ed={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},getAwsAuthPlugin=_=>({applyToStack:m=>{m.addRelativeTo(awsAuthMiddleware(_),ed)}});var ef=C(8794);let ep="user-agent",eh="x-amz-user-agent",ey=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,eg=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,userAgentMiddleware=_=>(m,C)=>async R=>{let{request:L}=R;if(!T.aW.isInstance(L))return m(R);let{headers:U}=L,F=C?.userAgent?.map(escapeUserAgent)||[],B=(await _.defaultUserAgentProvider()).map(escapeUserAgent),$=_?.customUserAgent?.map(escapeUserAgent)||[],H=(0,ef.Qj)(),V=(H?[H]:[]).concat([...B,...F,...$]).join(" "),q=[...B.filter(_=>_.startsWith("aws-sdk-")),...$].join(" ");return"browser"!==_.runtime?(q&&(U[eh]=U[eh]?`${U[ep]} ${q}`:q),U[ep]=V):U[eh]=V,m({...R,request:L})},escapeUserAgent=_=>{let m=_[0].split("/").map(_=>_.replace(ey,"-")).join("/"),C=_[1]?.replace(eg,"-"),R=m.indexOf("/"),T=m.substring(0,R),L=m.substring(R+1);return"api"===T&&(L=L.toLowerCase()),[T,L,C].filter(_=>_&&_.length>0).reduce((_,m,C)=>{switch(C){case 0:return m;case 1:return`${_}/${m}`;default:return`${_}#${m}`}},"")},e_={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=_=>({applyToStack:m=>{m.add(userAgentMiddleware(_),e_)}});var em=C(59280);let resolveEventStreamSerdeConfig=_=>({..._,eventStreamMarshaller:_.eventStreamSerdeProvider(_)});var ev=C(52326),eb=C(45597),ew=C(11511),eS=C(69419);let resolveClientEndpointParameters=_=>({..._,useDualstackEndpoint:_.useDualstackEndpoint??!1,useFipsEndpoint:_.useFipsEndpoint??!1,defaultSigningName:"lambda"});var eE={i8:"3.428.0"},eC=C(63037),ex=C(51206),eP=C.n(ex);let defaultUserAgent=({serviceId:_,clientVersion:m})=>async()=>{let C="undefined"!=typeof window&&window?.navigator?.userAgent?eP().parse(window.navigator.userAgent):void 0,R=[["aws-sdk-js",m],["ua","2.0"],[`os/${C?.os?.name||"other"}`,C?.os?.version],["lang/js"],["md/browser",`${C?.browser?.name??"unknown"}_${C?.browser?.version??"unknown"}`]];return _&&R.push([`api/${_}`,m]),R};let EventStreamMarshaller_EventStreamMarshaller=class EventStreamMarshaller_EventStreamMarshaller{constructor({utf8Encoder:_,utf8Decoder:m}){this.eventStreamCodec=new $.Pg(_,m),this.utfEncoder=_}deserialize(_,m){var C;let R=function(_){let m=0,C=0,R=null,T=null,allocateMessage=_=>{if("number"!=typeof _)throw Error("Attempted to allocate an event message where size was not a number: "+_);m=_,C=4,R=new Uint8Array(_);let T=new DataView(R.buffer);T.setUint32(0,_,!1)},iterator=async function*(){let L=_[Symbol.asyncIterator]();for(;;){let{value:_,done:U}=await L.next();if(U){if(m){if(m===C)yield R;else throw Error("Truncated event message received.")}return}let F=_.length,B=0;for(;B({[Symbol.asyncIterator]:async function*(){let m=_.getReader();try{for(;;){let{done:_,value:C}=await m.read();if(_)return;yield C}}finally{m.releaseLock()}}}),iterableToReadableStream=_=>{let m=_[Symbol.asyncIterator]();return new ReadableStream({async pull(_){let{done:C,value:R}=await m.next();if(C)return _.close();_.enqueue(R)}})};let dist_es_EventStreamMarshaller_EventStreamMarshaller=class dist_es_EventStreamMarshaller_EventStreamMarshaller{constructor({utf8Encoder:_,utf8Decoder:m}){this.universalMarshaller=new EventStreamMarshaller_EventStreamMarshaller({utf8Decoder:m,utf8Encoder:_})}deserialize(_,m){let C=isReadableStream(_)?readableStreamtoIterable(_):_;return this.universalMarshaller.deserialize(C,m)}serialize(_,m){let C=this.universalMarshaller.serialize(_,m);return"function"==typeof ReadableStream?iterableToReadableStream(C):C}};let isReadableStream=_=>"function"==typeof ReadableStream&&_ instanceof ReadableStream,provider_eventStreamSerdeProvider=_=>new dist_es_EventStreamMarshaller_EventStreamMarshaller(_);var eA=C(39627),eR=C(33131),eO=C(90130),eI=C(63660),eT=C(93294),ek=C(10687);let eM="required",ej="argv",eD="isSet",eN="tree",eL="error",eU="endpoint",eF="PartitionResult",eB={[eM]:!1,type:"String"},e$={[eM]:!0,default:!1,type:"Boolean"},ez={ref:"Endpoint"},eH={fn:"booleanEquals",[ej]:[{ref:"UseFIPS"},!0]},eV={fn:"booleanEquals",[ej]:[{ref:"UseDualStack"},!0]},eq={},eG={fn:"booleanEquals",[ej]:[!0,{fn:"getAttr",[ej]:[{ref:eF},"supportsFIPS"]}]},eK={fn:"booleanEquals",[ej]:[!0,{fn:"getAttr",[ej]:[{ref:eF},"supportsDualStack"]}]},eZ=[eH],eW=[eV],eY=[{ref:"Region"}],eJ={version:"1.0",parameters:{Region:eB,UseDualStack:e$,UseFIPS:e$,Endpoint:eB},rules:[{conditions:[{fn:eD,[ej]:[ez]}],type:eN,rules:[{conditions:eZ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:eL},{conditions:eW,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:eL},{endpoint:{url:ez,properties:eq,headers:eq},type:eU}]},{conditions:[{fn:eD,[ej]:eY}],type:eN,rules:[{conditions:[{fn:"aws.partition",[ej]:eY,assign:eF}],type:eN,rules:[{conditions:[eH,eV],type:eN,rules:[{conditions:[eG,eK],type:eN,rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eq,headers:eq},type:eU}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:eL}]},{conditions:eZ,type:eN,rules:[{conditions:[eG],type:eN,rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:eq,headers:eq},type:eU}]},{error:"FIPS is enabled but this partition does not support FIPS",type:eL}]},{conditions:eW,type:eN,rules:[{conditions:[eK],type:eN,rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eq,headers:eq},type:eU}]},{error:"DualStack is enabled but this partition does not support DualStack",type:eL}]},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:eq,headers:eq},type:eU}]}]},{error:"Invalid Configuration: Missing Region",type:eL}]},defaultEndpointResolver=(_,m={})=>(0,ef.B1)(eJ,{endpointParams:_,logger:m.logger}),getRuntimeConfig=_=>({apiVersion:"2015-03-31",base64Decoder:_?.base64Decoder??ek.G,base64Encoder:_?.base64Encoder??ek.s,disableHostPrefix:_?.disableHostPrefix??!1,endpointProvider:_?.endpointProvider??defaultEndpointResolver,extensions:_?.extensions??[],logger:_?.logger??new eS.vk,serviceId:_?.serviceId??"Lambda",urlParser:_?.urlParser??eT.e,utf8Decoder:_?.utf8Decoder??G.$,utf8Encoder:_?.utf8Encoder??q.G});var eQ=C(95419);let runtimeConfig_browser_getRuntimeConfig=_=>{let m=(0,eQ.j)(_),defaultConfigProvider=()=>m().then(eS.jv),C=getRuntimeConfig(_);return{...C,..._,runtime:"browser",defaultsMode:m,bodyLengthChecker:_?.bodyLengthChecker??eO.W,credentialDefaultProvider:_?.credentialDefaultProvider??(_=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:_?.defaultUserAgentProvider??defaultUserAgent({serviceId:C.serviceId,clientVersion:eE.i8}),eventStreamSerdeProvider:_?.eventStreamSerdeProvider??provider_eventStreamSerdeProvider,maxAttempts:_?.maxAttempts??eI.J,region:_?.region??(0,eR.n)("Region is missing"),requestHandler:_?.requestHandler??new eA.BX(defaultConfigProvider),retryMode:_?.retryMode??(async()=>(await defaultConfigProvider()).retryMode||eI.CA),sha256:_?.sha256??eC.Sha256,streamCollector:_?.streamCollector??eA.CF,useDualstackEndpoint:_?.useDualstackEndpoint??(()=>Promise.resolve(em.JY)),useFipsEndpoint:_?.useFipsEndpoint??(()=>Promise.resolve(em.Fh))}};var eX=C(63743);let asPartial=_=>_,resolveRuntimeExtensions=(_,m)=>{let C={...asPartial((0,eX.GW)(_)),...asPartial((0,eS.kE)(_)),...asPartial((0,T.cA)(_))};return m.forEach(_=>_.configure(C)),{..._,...(0,eX.A1)(C),...(0,eS.SQ)(C),...(0,T.AO)(C)}};let LambdaClient=class LambdaClient extends eS.KU{constructor(...[_]){let m=runtimeConfig_browser_getRuntimeConfig(_||{}),C=resolveClientEndpointParameters(m),R=(0,em.Xb)(C),T=(0,eb.uW)(R),L=(0,ew.BC)(T),U=resolveAwsAuthConfig(L),B={...U,customUserAgent:"string"==typeof U.customUserAgent?[[U.customUserAgent]]:U.customUserAgent},$=resolveEventStreamSerdeConfig(B),H=resolveRuntimeExtensions($,_?.extensions||[]);super(H),this.config=H,this.middlewareStack.use((0,ew.NQ)(this.config)),this.middlewareStack.use((0,ev.VG)(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use((0,F.eV)(this.config)),this.middlewareStack.use(getAwsAuthPlugin(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config))}destroy(){super.destroy()}};var e0=C(45410),e1=C(97761);let LambdaServiceException=class LambdaServiceException extends eS.sI{constructor(_){super(_),Object.setPrototypeOf(this,LambdaServiceException.prototype)}};let InvalidParameterValueException=class InvalidParameterValueException extends LambdaServiceException{constructor(_){super({name:"InvalidParameterValueException",$fault:"client",..._}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,InvalidParameterValueException.prototype),this.Type=_.Type}};let ResourceConflictException=class ResourceConflictException extends LambdaServiceException{constructor(_){super({name:"ResourceConflictException",$fault:"client",..._}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceConflictException.prototype),this.Type=_.Type}};let ResourceNotFoundException=class ResourceNotFoundException extends LambdaServiceException{constructor(_){super({name:"ResourceNotFoundException",$fault:"client",..._}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype),this.Type=_.Type,this.Message=_.Message}};let ServiceException=class ServiceException extends LambdaServiceException{constructor(_){super({name:"ServiceException",$fault:"server",..._}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,ServiceException.prototype),this.Type=_.Type,this.Message=_.Message}};let TooManyRequestsException=class TooManyRequestsException extends LambdaServiceException{constructor(_){super({name:"TooManyRequestsException",$fault:"client",..._}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,TooManyRequestsException.prototype),this.retryAfterSeconds=_.retryAfterSeconds,this.Type=_.Type,this.Reason=_.Reason}};let EC2AccessDeniedException=class EC2AccessDeniedException extends LambdaServiceException{constructor(_){super({name:"EC2AccessDeniedException",$fault:"server",..._}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,EC2AccessDeniedException.prototype),this.Type=_.Type,this.Message=_.Message}};let EC2ThrottledException=class EC2ThrottledException extends LambdaServiceException{constructor(_){super({name:"EC2ThrottledException",$fault:"server",..._}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,EC2ThrottledException.prototype),this.Type=_.Type,this.Message=_.Message}};let EC2UnexpectedException=class EC2UnexpectedException extends LambdaServiceException{constructor(_){super({name:"EC2UnexpectedException",$fault:"server",..._}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,EC2UnexpectedException.prototype),this.Type=_.Type,this.Message=_.Message,this.EC2ErrorCode=_.EC2ErrorCode}};let EFSIOException=class EFSIOException extends LambdaServiceException{constructor(_){super({name:"EFSIOException",$fault:"client",..._}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,EFSIOException.prototype),this.Type=_.Type,this.Message=_.Message}};let EFSMountConnectivityException=class EFSMountConnectivityException extends LambdaServiceException{constructor(_){super({name:"EFSMountConnectivityException",$fault:"client",..._}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,EFSMountConnectivityException.prototype),this.Type=_.Type,this.Message=_.Message}};let EFSMountFailureException=class EFSMountFailureException extends LambdaServiceException{constructor(_){super({name:"EFSMountFailureException",$fault:"client",..._}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,EFSMountFailureException.prototype),this.Type=_.Type,this.Message=_.Message}};let EFSMountTimeoutException=class EFSMountTimeoutException extends LambdaServiceException{constructor(_){super({name:"EFSMountTimeoutException",$fault:"client",..._}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,EFSMountTimeoutException.prototype),this.Type=_.Type,this.Message=_.Message}};let ENILimitReachedException=class ENILimitReachedException extends LambdaServiceException{constructor(_){super({name:"ENILimitReachedException",$fault:"server",..._}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ENILimitReachedException.prototype),this.Type=_.Type,this.Message=_.Message}};let InvalidRequestContentException=class InvalidRequestContentException extends LambdaServiceException{constructor(_){super({name:"InvalidRequestContentException",$fault:"client",..._}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,InvalidRequestContentException.prototype),this.Type=_.Type}};let InvalidRuntimeException=class InvalidRuntimeException extends LambdaServiceException{constructor(_){super({name:"InvalidRuntimeException",$fault:"server",..._}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,InvalidRuntimeException.prototype),this.Type=_.Type,this.Message=_.Message}};let InvalidSecurityGroupIDException=class InvalidSecurityGroupIDException extends LambdaServiceException{constructor(_){super({name:"InvalidSecurityGroupIDException",$fault:"server",..._}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,InvalidSecurityGroupIDException.prototype),this.Type=_.Type,this.Message=_.Message}};let InvalidSubnetIDException=class InvalidSubnetIDException extends LambdaServiceException{constructor(_){super({name:"InvalidSubnetIDException",$fault:"server",..._}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,InvalidSubnetIDException.prototype),this.Type=_.Type,this.Message=_.Message}};let InvalidZipFileException=class InvalidZipFileException extends LambdaServiceException{constructor(_){super({name:"InvalidZipFileException",$fault:"server",..._}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,InvalidZipFileException.prototype),this.Type=_.Type,this.Message=_.Message}};let KMSAccessDeniedException=class KMSAccessDeniedException extends LambdaServiceException{constructor(_){super({name:"KMSAccessDeniedException",$fault:"server",..._}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,KMSAccessDeniedException.prototype),this.Type=_.Type,this.Message=_.Message}};let KMSDisabledException=class KMSDisabledException extends LambdaServiceException{constructor(_){super({name:"KMSDisabledException",$fault:"server",..._}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,KMSDisabledException.prototype),this.Type=_.Type,this.Message=_.Message}};let KMSInvalidStateException=class KMSInvalidStateException extends LambdaServiceException{constructor(_){super({name:"KMSInvalidStateException",$fault:"server",..._}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,KMSInvalidStateException.prototype),this.Type=_.Type,this.Message=_.Message}};let KMSNotFoundException=class KMSNotFoundException extends LambdaServiceException{constructor(_){super({name:"KMSNotFoundException",$fault:"server",..._}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,KMSNotFoundException.prototype),this.Type=_.Type,this.Message=_.Message}};let RecursiveInvocationException=class RecursiveInvocationException extends LambdaServiceException{constructor(_){super({name:"RecursiveInvocationException",$fault:"client",..._}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,RecursiveInvocationException.prototype),this.Type=_.Type,this.Message=_.Message}};let RequestTooLargeException=class RequestTooLargeException extends LambdaServiceException{constructor(_){super({name:"RequestTooLargeException",$fault:"client",..._}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,RequestTooLargeException.prototype),this.Type=_.Type}};let ResourceNotReadyException=class ResourceNotReadyException extends LambdaServiceException{constructor(_){super({name:"ResourceNotReadyException",$fault:"server",..._}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,ResourceNotReadyException.prototype),this.Type=_.Type}};let SnapStartException=class SnapStartException extends LambdaServiceException{constructor(_){super({name:"SnapStartException",$fault:"client",..._}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,SnapStartException.prototype),this.Type=_.Type,this.Message=_.Message}};let SnapStartNotReadyException=class SnapStartNotReadyException extends LambdaServiceException{constructor(_){super({name:"SnapStartNotReadyException",$fault:"client",..._}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,SnapStartNotReadyException.prototype),this.Type=_.Type,this.Message=_.Message}};let SnapStartTimeoutException=class SnapStartTimeoutException extends LambdaServiceException{constructor(_){super({name:"SnapStartTimeoutException",$fault:"client",..._}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,SnapStartTimeoutException.prototype),this.Type=_.Type,this.Message=_.Message}};let SubnetIPAddressLimitReachedException=class SubnetIPAddressLimitReachedException extends LambdaServiceException{constructor(_){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",..._}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,SubnetIPAddressLimitReachedException.prototype),this.Type=_.Type,this.Message=_.Message}};let UnsupportedMediaTypeException=class UnsupportedMediaTypeException extends LambdaServiceException{constructor(_){super({name:"UnsupportedMediaTypeException",$fault:"client",..._}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,UnsupportedMediaTypeException.prototype),this.Type=_.Type}};(R||(R={})).visit=(_,m)=>void 0!==_.PayloadChunk?m.PayloadChunk(_.PayloadChunk):void 0!==_.InvokeComplete?m.InvokeComplete(_.InvokeComplete):m._(_.$unknown[0],_.$unknown[1]);let InvocationRequestFilterSensitiveLog=_=>({..._,..._.Payload&&{Payload:eS.oc}}),InvocationResponseFilterSensitiveLog=_=>({..._,..._.Payload&&{Payload:eS.oc}}),se_InvokeCommand=async(_,m)=>{let C;let{hostname:R,protocol:L="https",port:U,path:F}=await m.endpoint(),B=(0,eS.UI)({},isSerializableHeaderValue,{"content-type":"application/octet-stream","x-amz-invocation-type":_.InvocationType,"x-amz-log-type":_.LogType,"x-amz-client-context":_.ClientContext}),$=`${F?.endsWith("/")?F.slice(0,-1):F||""}/2015-03-31/functions/{FunctionName}/invocations`;$=(0,eS.Is)($,_,"FunctionName",()=>_.FunctionName,"{FunctionName}",!1);let H=(0,eS.UI)({Qualifier:[,_.Qualifier]});return void 0!==_.Payload&&(C=_.Payload),new T.aW({protocol:L,hostname:R,port:U,method:"POST",headers:B,path:$,query:H,body:C})},de_InvokeCommand=async(_,m)=>{if(200!==_.statusCode&&_.statusCode>=300)return de_InvokeCommandError(_,m);let C=(0,eS.UI)({$metadata:deserializeMetadata(_),FunctionError:[,_.headers["x-amz-function-error"]],LogResult:[,_.headers["x-amz-log-result"]],ExecutedVersion:[,_.headers["x-amz-executed-version"]]}),R=await (0,eS.Wg)(_.body,m);return C.Payload=R,(0,eS.UI)(C,{StatusCode:[,_.statusCode]}),C},de_InvokeCommandError=async(_,m)=>{let C={..._,body:await parseErrorBody(_.body,m)},R=loadRestJsonErrorCode(_,C.body);switch(R){case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await de_EC2AccessDeniedExceptionRes(C,m);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await de_EC2ThrottledExceptionRes(C,m);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await de_EC2UnexpectedExceptionRes(C,m);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await de_EFSIOExceptionRes(C,m);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await de_EFSMountConnectivityExceptionRes(C,m);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await de_EFSMountFailureExceptionRes(C,m);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await de_EFSMountTimeoutExceptionRes(C,m);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await de_ENILimitReachedExceptionRes(C,m);case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await de_InvalidParameterValueExceptionRes(C,m);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await de_InvalidRequestContentExceptionRes(C,m);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await de_InvalidRuntimeExceptionRes(C,m);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await de_InvalidSecurityGroupIDExceptionRes(C,m);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await de_InvalidSubnetIDExceptionRes(C,m);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await de_InvalidZipFileExceptionRes(C,m);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await de_KMSAccessDeniedExceptionRes(C,m);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await de_KMSDisabledExceptionRes(C,m);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await de_KMSInvalidStateExceptionRes(C,m);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await de_KMSNotFoundExceptionRes(C,m);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await de_RecursiveInvocationExceptionRes(C,m);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await de_RequestTooLargeExceptionRes(C,m);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await de_ResourceConflictExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes(C,m);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await de_ResourceNotReadyExceptionRes(C,m);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await de_ServiceExceptionRes(C,m);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await de_SnapStartExceptionRes(C,m);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await de_SnapStartNotReadyExceptionRes(C,m);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await de_SnapStartTimeoutExceptionRes(C,m);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await de_SubnetIPAddressLimitReachedExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await de_TooManyRequestsExceptionRes(C,m);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await de_UnsupportedMediaTypeExceptionRes(C,m);default:let T=C.body;return e2({output:_,parsedBody:T,errorCode:R})}},e2=(0,eS.PC)(LambdaServiceException),de_EC2AccessDeniedExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EC2AccessDeniedException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EC2ThrottledExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EC2ThrottledException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EC2UnexpectedExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{EC2ErrorCode:eS.pY,Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EC2UnexpectedException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EFSIOExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EFSIOException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EFSMountConnectivityExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EFSMountConnectivityException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EFSMountFailureExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EFSMountFailureException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_EFSMountTimeoutExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new EFSMountTimeoutException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_ENILimitReachedExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new ENILimitReachedException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidParameterValueExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new InvalidParameterValueException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidRequestContentExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new InvalidRequestContentException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidRuntimeExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new InvalidRuntimeException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidSecurityGroupIDExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new InvalidSecurityGroupIDException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidSubnetIDExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new InvalidSubnetIDException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_InvalidZipFileExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new InvalidZipFileException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_KMSAccessDeniedExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new KMSAccessDeniedException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_KMSDisabledExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new KMSDisabledException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_KMSInvalidStateExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new KMSInvalidStateException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_KMSNotFoundExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new KMSNotFoundException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_RecursiveInvocationExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new RecursiveInvocationException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_RequestTooLargeExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new RequestTooLargeException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_ResourceConflictExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new ResourceConflictException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_ResourceNotFoundExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new ResourceNotFoundException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_ResourceNotReadyExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new ResourceNotReadyException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_ServiceExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new ServiceException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_SnapStartExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new SnapStartException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_SnapStartNotReadyExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new SnapStartNotReadyException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_SnapStartTimeoutExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new SnapStartTimeoutException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_SubnetIPAddressLimitReachedExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Message:eS.pY,Type:eS.pY});Object.assign(C,T);let L=new SubnetIPAddressLimitReachedException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_TooManyRequestsExceptionRes=async(_,m)=>{let C=(0,eS.UI)({retryAfterSeconds:[,_.headers["retry-after"]]}),R=_.body,T=(0,eS.qn)(R,{Reason:eS.pY,Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new TooManyRequestsException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},de_UnsupportedMediaTypeExceptionRes=async(_,m)=>{let C=(0,eS.UI)({}),R=_.body,T=(0,eS.qn)(R,{Type:eS.pY,message:eS.pY});Object.assign(C,T);let L=new UnsupportedMediaTypeException({$metadata:deserializeMetadata(_),...C});return(0,eS.to)(L,_.body)},deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),collectBodyString=(_,m)=>(0,eS.Wg)(_,m).then(_=>m.utf8Encoder(_)),isSerializableHeaderValue=_=>null!=_&&""!==_&&(!Object.getOwnPropertyNames(_).includes("length")||0!=_.length)&&(!Object.getOwnPropertyNames(_).includes("size")||0!=_.size),parseBody=(_,m)=>collectBodyString(_,m).then(_=>_.length?JSON.parse(_):{}),parseErrorBody=async(_,m)=>{let C=await parseBody(_,m);return C.message=C.message??C.Message,C},loadRestJsonErrorCode=(_,m)=>{let sanitizeErrorCode=_=>{let m=_;return"number"==typeof m&&(m=m.toString()),m.indexOf(",")>=0&&(m=m.split(",")[0]),m.indexOf(":")>=0&&(m=m.split(":")[0]),m.indexOf("#")>=0&&(m=m.split("#")[1]),m},C=Object.keys(_.headers).find(_=>"x-amzn-errortype"===_.toLowerCase());return void 0!==C?sanitizeErrorCode(_.headers[C]):void 0!==m.code?sanitizeErrorCode(m.code):void 0!==m.__type?sanitizeErrorCode(m.__type):void 0};let InvokeCommand=class InvokeCommand extends eS.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,e0.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,eb.a3)(m,InvokeCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"LambdaClient",commandName:"InvokeCommand",inputFilterSensitiveLog:InvocationRequestFilterSensitiveLog,outputFilterSensitiveLog:InvocationResponseFilterSensitiveLog,[e1.zK]:{service:"AWSGirApiService",operation:"Invoke"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_InvokeCommand(_,m)}deserialize(_,m){return de_InvokeCommand(_,m)}};var e5=C(48764).lW,e6=C(31011),e3=C(13594),e4=C(39518);async function invoke(_,m){var C;let R;e3.ZP.log("lambda.invoke(".concat(_,"): Called (payload: ").concat(JSON.stringify(m),")"));let T=await (0,e6.UR)(),L=new LambdaClient({region:"us-east-1",credentials:T}),U={FunctionName:_},F=await (0,e6.hP)();void 0!==F&&(U.ClientContext=e5.from(JSON.stringify({accessToken:F})).toString("base64")),void 0!==m&&(U.Payload=e5.from(JSON.stringify(m)));let B=new InvokeCommand(U);try{R=await L.send(B)}catch(C){throw(0,e4.f)("event","skelly_error",{skelly_event_action:"lambda_invoke",skelly_event_source:_,skelly_event_label:JSON.stringify(m)}),C}let $=(C=R.Payload,new TextDecoder().decode(C)),H=JSON.parse($);if(!0===H.success)return H;if((0,e4.f)("event","skelly_error",{skelly_event_action:"lambda_invoke",skelly_event_source:"".concat(_," | ").concat(JSON.stringify(m)),skelly_event_label:H.message||H.errorMessages||"n/a"}),e3.ZP.warn("lambda.invoke(".concat(_,"): Failed ").concat(JSON.stringify(H)," (payload: ").concat(JSON.stringify(m),")")),H.message)throw H.message;if(H.errorMessage)throw H.errorMessage;throw H}},47797:function(_,m,C){"use strict";C.d(m,{i:function(){return sendNotification}});var R=C(13594),T=C(16243);async function sendNotification(_,m,C){R.ZP.log("lambda.sendNotification(recipient: ".concat(_,", notification: ").concat(JSON.stringify(m),", data: ").concat(JSON.stringify(C),"): Called"));let L={recipient:_};m&&(L.notification=m),C&&(L.data=C);let U=await (0,T.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_mobile_notification",L);return U}},28967:function(_,m,C){"use strict";C.d(m,{P4:function(){return setSignalingChannelParticipants},aH:function(){return releaseSignalingChannel},tD:function(){return getSignalingChannel},wH:function(){return getSignalingChannelViewer}});var R=C(16243);async function getSignalingChannel(_){let m=await (0,R.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_get",_?{participants:_}:void 0);return m}async function setSignalingChannelParticipants(_,m){let C=await (0,R.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_participants",{channel_name:_,participants:m});return C}async function getSignalingChannelViewer(_){let m=await (0,R.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_viewer",{channel_name:_});return m}async function releaseSignalingChannel(){let _=await (0,R.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_release");return _}},39518:function(_,m,C){"use strict";C.d(m,{f:function(){return R}});var R=gtag},60323:function(_,m,C){"use strict";C.d(m,{P:function(){return updatePostMessage}});var R=C(12824);function updatePostMessage(_,m){let{data:C}=m,T=C.postMessage.chat_id;null==_||_.updateQuery({query:R._U,variables:{chatId:T},broadcast:!0},_=>({getMessages:{chat_id:T,messages:[C.postMessage],nextToken:null,scannedCount:null,startedAt:null,__typename:"Messages"}}))}},12824:function(_,m,C){"use strict";C.d(m,{$Z:function(){return B},RX:function(){return H},Ux:function(){return attachmentToText},YS:function(){return getOtherPartyFromChatId},_U:function(){return L},ec:function(){return attachmentToFilename},ns:function(){return getFriendChatId},o6:function(){return F},oi:function(){return U},sc:function(){return fileSizeToText},uF:function(){return V},wi:function(){return q},xk:function(){return $}});var R=C(82729),T=C(31230);function _templateObject(){let _=(0,R._)(["\n query getMessages(\n $chatId: String!\n $messageId: Int\n $fetchNewer: Boolean\n $nextToken: String\n ) {\n getMessages(\n chat_id: $chatId\n message_id: $messageId\n fetch_newer: $fetchNewer\n nextToken: $nextToken\n ) {\n chat_id\n messages {\n chat_id\n message_id\n type\n message\n owner\n timestamp\n attachments {\n name\n size\n type\n }\n }\n nextToken\n scannedCount\n startedAt\n }\n }\n"]);return _templateObject=function(){return _},_}function _templateObject1(){let _=(0,R._)(["\n mutation postMessage(\n $chatId: String!\n $message: String!\n $type: String\n $attachments: [AttachmentInput!]\n ) {\n postMessage(\n chat_id: $chatId\n message: $message\n type: $type\n attachments: $attachments\n ) {\n chat_id\n message\n message_id\n owner\n type\n timestamp\n auth\n attachments {\n name\n size\n type\n }\n }\n }\n"]);return _templateObject1=function(){return _},_}function _templateObject2(){let _=(0,R._)(["\n mutation updateMessage(\n $chatId: String!\n $messageId: Int!\n $message: String!\n ) {\n updateMessage(chat_id: $chatId, message_id: $messageId, message: $message) {\n chat_id\n message\n message_id\n owner\n type\n timestamp\n auth\n attachments {\n name\n size\n type\n }\n }\n }\n"]);return _templateObject2=function(){return _},_}function _templateObject3(){let _=(0,R._)(["\n mutation deleteMessage($chatId: String!, $messageId: Int!) {\n deleteMessage(chat_id: $chatId, message_id: $messageId) {\n chat_id\n message\n message_id\n owner\n type\n timestamp\n auth\n }\n }\n"]);return _templateObject3=function(){return _},_}function _templateObject4(){let _=(0,R._)(["\n subscription messageSubscriptionV2($chatIds: [String!]!) {\n messageV2(chatIds: $chatIds) {\n chat_id\n message\n message_id\n attachments {\n name\n size\n type\n }\n type\n owner\n timestamp\n }\n }\n"]);return _templateObject4=function(){return _},_}function _templateObject5(){let _=(0,R._)(["\n query getLastMessages($chatIds: [String!]!) {\n getLastMessages(chatIds: $chatIds)\n }\n"]);return _templateObject5=function(){return _},_}function _templateObject6(){let _=(0,R._)(["\n query getMessagesSeen {\n getMessagesSeen {\n chat_id\n message_id\n }\n }\n"]);return _templateObject6=function(){return _},_}function _templateObject7(){let _=(0,R._)(["\n mutation messageSeen($chatId: String!, $messageId: Int!) {\n messageSeen(chat_id: $chatId, message_id: $messageId) {\n chat_id\n message_id\n }\n }\n"]);return _templateObject7=function(){return _},_}let L=(0,T.Ps)(_templateObject());function attachmentToText(_,m){let C=attachmentToFilename(_);return"".concat(C," (").concat(fileSizeToText(_.size)).concat(m?" "+m:"",")")}function fileSizeToText(_){let m=_>1073741824?(_/1073741824).toFixed(1):_>1048576?(_/1048576).toFixed(1):_>1024?(_/1024).toFixed(1):_;return"".concat(m," ").concat(_>1073741824?"GB":_>1048576?"MB":_>1024?"KB":"B")}function attachmentToFilename(_){return _.name.slice(37)}function getFriendChatId(_,m){return parseInt(_)>parseInt(m)?"friend#".concat(m,"#").concat(_):"friend#".concat(_,"#").concat(m)}let U=(0,T.Ps)(_templateObject1()),F=(0,T.Ps)(_templateObject2()),B=(0,T.Ps)(_templateObject3()),$=(0,T.Ps)(_templateObject4());function getOtherPartyFromChatId(_,m){return _.split("#").find(_=>""!==_&&_!==m)}let H=(0,T.Ps)(_templateObject5()),V=(0,T.Ps)(_templateObject6()),q=(0,T.Ps)(_templateObject7())},30490:function(_,m,C){"use strict";C.d(m,{N:function(){return R}});let R="web"},13594:function(_,m,C){"use strict";let R;C.d(m,{cM:function(){return log},vU:function(){return error}});var T,L,U=C(30490);let F="android"===U.N||"ios"===U.N;function addMemoryLog(_,m,C){F&&(B.push("".concat(_," ").concat(JSON.stringify(m)).concat(C?" | "+JSON.stringify(C):"")),R&&R())}let B=[];(T=L||(L={}))[T.prod=0]="prod",T[T.dev=1]="dev";let $=1;function toBeLogged(_){return void 0==_||_<=$}function log(_,m,C){toBeLogged(C)&&(void 0===m?console.log(preFix(),_):console.log(preFix(),_,m),addMemoryLog("[log] "+preFix(),_,m))}function error(_,m,C){toBeLogged(C)&&(void 0===m?console.error(preFix(),_):console.error(preFix(),_,m),addMemoryLog("[error] "+preFix(),_,m))}function preFix(){let _=new Date;return _.toString().split(" ")[4]+"."+(100>_.getMilliseconds()?"0":"")+(10>_.getMilliseconds()?"0":"")+_.getMilliseconds()+":"}let H={LogLevel:L,setLogLevel:function(_){$=_},log,warn:function(_,m,C){toBeLogged(C)&&(void 0===m?console.warn(preFix(),_):console.warn(preFix(),_,m),addMemoryLog("[warn] "+preFix(),_,m))},error};m.ZP=H},18510:function(_,m,C){"use strict";function getProfileName(_){return(_=_||{}).real_name||(_.gamer_names&&_.gamer_names.length>0?_.gamer_names[0]:void 0)||_.customized_id||_.friend_id||"n/a"}function getProfileNameLong(_,m){_=_||{};let C=Array.isArray(_.gamer_names)?_.gamer_names.filter(_=>!!_):[],R=C.length>0?C.join(", "):void 0;return(null==_?void 0:_.real_name)||R||(null==m?void 0:m.formatMessage({id:"SkellyIdValue"},{friendId:null==_?void 0:_.friend_id}))||(null==_?void 0:_.friend_id)||"n/a"}C.d(m,{Jl:function(){return getProfileName},dm:function(){return getProfileNameLong}})},47669:function(_,m,C){"use strict";C.d(m,{zZ:function(){return T},ZP:function(){return J},ni:function(){return Y},Dj:function(){return W},vV:function(){return V},Fu:function(){return q},JF:function(){return K},i_:function(){return G},av:function(){return $},d0:function(){return Z},b6:function(){return H}});var R,T,L=C(77236);function e(_){this.message=_}e.prototype=Error(),e.prototype.name="InvalidCharacterError";var U="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(_){var m=String(_).replace(/=+$/,"");if(m.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var C,R,T=0,L=0,U="";R=m.charAt(L++);~R&&(C=T%4?64*C+R:R,T++%4)&&(U+=String.fromCharCode(255&C>>(-2*T&6))))R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(R);return U};function n(_){this.message=_}n.prototype=Error(),n.prototype.name="InvalidTokenError";var jwt_decode_esm=function(_,m){if("string"!=typeof _)throw new n("Invalid token specified");var C=!0===(m=m||{}).header?0:1;try{return JSON.parse(function(_){var m,C=_.replace(/-/g,"+").replace(/_/g,"/");switch(C.length%4){case 0:break;case 2:C+="==";break;case 3:C+="=";break;default:throw"Illegal base64url string!"}try{return m=C,decodeURIComponent(U(m).replace(/(.)/g,function(_,m){var C=m.charCodeAt(0).toString(16).toUpperCase();return C.length<2&&(C="0"+C),"%"+C}))}catch(_){return U(C)}}(_.split(".")[C]))}catch(_){throw new n("Invalid token specified: "+_.message)}},F=C(13594);(R=T||(T={})).Initializing="Initializing",R.CreatingApolloClientPrivate="CreatingApolloClientPrivate",R.LoggedIn="LoggedIn",R.ClosingApolloClientPrivate="ClosingApolloClientPrivate",R.CreatingApolloClientPublic="CreatingApolloClientPublic",R.CreatingApolloClientLocal="CreatingApolloClientLocal",R.LoggedOut="LoggedOut",R.ClosingApolloClientPublicLocal="ClosingApolloClientPublicLocal";let B=(0,L.oM)({name:"account",initialState:{loginState:"Initializing"},reducers:{setLoginState:(_,m)=>{F.ZP.log("accountSlice.setLoginState(".concat(m.payload,"): Called")),_.loginState=m.payload},setUsername:(_,m)=>{F.ZP.log("accountSlice.setUsername(payload: ".concat(m.payload,"): Called")),_.username=m.payload},setEmail:(_,m)=>{F.ZP.log("accountSlice.setEmail(payload: ".concat(m.payload,"): Called")),_.email=m.payload},setEmailVerified:(_,m)=>{F.ZP.log("accountSlice.setEmailVerified(payload: ".concat(m.payload,"): Called")),_.emailVerified=m.payload},setFriendId:(_,m)=>{F.ZP.log("accountSlice.setFriendId(payload: ".concat(m.payload,"): Called")),_.friendId=m.payload},setLocale:(_,m)=>{F.ZP.log("accountSlice.setLocale(payload: ".concat(m.payload,"): Called")),_.locale=m.payload},setTokens:(_,m)=>{F.ZP.log("accountSlice.setTokens(): Called"),_.accessToken=m.payload.accessToken,_.validUntil=m.payload.validUntil;let C=m.payload.idToken;_.idToken=C;var R=jwt_decode_esm(C);_.isDeveloper=(R["cognito:groups"]||[]).includes("Developer"),m.payload.refreshToken&&(_.refreshToken=m.payload.refreshToken)},setCredentials:(_,m)=>{F.ZP.log("accountSlice.setCredentials(): Called"),_.credentials=m.payload},logOut:_=>{F.ZP.log("accountSlice.logOut(): Called"),_.username=void 0,_.isDeveloper=void 0,_.email=void 0,_.emailVerified=void 0,_.friendId=void 0,_.locale=void 0,_.accessToken=void 0,_.validUntil=void 0,_.idToken=void 0,_.refreshToken=void 0,_.credentials=void 0}}}),{setLoginState:$,setUsername:H,setEmail:V,setEmailVerified:q,setLocale:G,setFriendId:K,setTokens:Z,setCredentials:W,logOut:Y}=B.actions;var J=B.reducer},66492:function(_,m,C){"use strict";C.d(m,{XO:function(){return U},z6:function(){return B}});var R=C(77236),T=C(13594);let L=(0,R.oM)({name:"activitiesSlice",initialState:{fetchMore:{}},reducers:{fetchMore:(_,m)=>{T.cM("activitiesSlice.fetchMore(action: ".concat(JSON.stringify(m.payload),"): Called")),!0!==_.fetchMore[m.payload]&&(_.fetchMore[m.payload]=!0)},removeFetchMore:(_,m)=>{T.cM("activitiesSlice.removeFetchMore(action: ".concat(JSON.stringify(m.payload),"): Called")),!0===_.fetchMore[m.payload]&&delete _.fetchMore[m.payload]},setActivities:(_,m)=>{let{activities:C,hasMore:R}=m.payload;T.cM("activitiesSlice.setActivities(# of activities: ".concat(C.length,", hasMore: ").concat(R,"): Called")),_.activities=C,_.hasMore=R,_.fetchMore={}}}}),{fetchMore:U,removeFetchMore:F,setActivities:B}=L.actions;m.ZP=L.reducer},55576:function(_,m,C){"use strict";C.d(m,{ZP:function(){return $},S1:function(){return init},iC:function(){return B},HB:function(){return F}});var R=C(77236),T=C(13594);let L={isOnline:window.navigator.onLine},init=()=>{T.ZP.log("internetConnection.slice.init(): initialState (isOnline: ".concat(L.isOnline,") ")),window.addEventListener("online",()=>{globalThis.skelly.reduxStore.dispatch(F(!0)),F(!0)}),window.addEventListener("offline",()=>{globalThis.skelly.reduxStore.dispatch(F(!1))})},U=(0,R.oM)({name:"internetConnection",initialState:L,reducers:{setIsOnline:(_,m)=>{T.cM("internetConnetionSlice.setIsOnline(action: ".concat(JSON.stringify(m.payload),"): Called")),_.isOnline=m.payload},setApolloError:(_,m)=>{T.cM("internetConnetionSlice.setApolloError(action: ".concat(JSON.stringify(m.payload),"): Called")),_.apolloError=m.payload}}}),{setIsOnline:F,setApolloError:B}=U.actions;var $=U.reducer},83337:function(_,m,C){"use strict";C.d(m,{O6:function(){return V},Ry:function(){return H},V8:function(){return $},m7:function(){return U},rk:function(){return F}});var R=C(77236),T=C(13594);let L=(0,R.oM)({name:"messages",initialState:{messagesSeenLoaded:!1,chatPostDrafts:{}},reducers:{setMessagesSeen:(_,m)=>{for(let C of(T.ZP.log("messagesSlice.setMessagesSeen(action: ".concat(JSON.stringify(m.payload).slice(0,100),"...): Called")),_.chats||(_.chats={}),m.payload)){let m=C.chat_id;_.chats[m]||(_.chats[m]={}),_.chats[m].messageSeen=C.message_id}_.messagesSeenLoaded=!0},setChatTypes:(_,m)=>{for(let C of(T.ZP.log("messagesSlice.setChatTypes(action: ".concat(JSON.stringify(m.payload),"): Called")),_.chats||(_.chats={}),m.payload)){let{chatId:m,type:R}=C;_.chats[m]||(_.chats[m]={}),_.chats[m].type=R}},setMessageSeen:(_,m)=>{T.ZP.log("messagesSlice.setMessageSeen(action: ".concat(JSON.stringify(m.payload),"): Called")),_.chats||(_.chats={});let{chatId:C,messageSeen:R}=m.payload;_.chats[C]||(_.chats[C]={}),_.chats[C].messageSeen=R},setMessagesUnseen:(_,m)=>{T.ZP.log("messagesSlice.setMessagesUnseen(chatId: ".concat(m.payload.chatId,", messagesUnseen: ").concat(m.payload.messagesUnseen,"): Called"));let{chatId:C,messagesUnseen:R}=m.payload;_.chats||T.ZP.warn("messagesSlice.setMessagesUnseen(): Returning, as state.chats not yet loaded"),_.chats[C]||(_.chats[C]={}),_.chats[C].messagesUnseen,_.chats[C].messagesUnseen=R},setChatPostDraft:(_,m)=>{let{chatId:C,post:R}=m.payload;_.chatPostDrafts[C]=R},removeChat:(_,m)=>{T.ZP.log("messagesSlice.removeChat(chatId: ".concat(m.payload.chatId,"): Called"));let{chatId:C}=m.payload;delete _.chats[C],delete _.chatPostDrafts[C]},clearChatPostDrafts:_=>{T.ZP.log("messagesSlice.clearChatPostDrafts(): Called"),_.chatPostDrafts={}}}}),{setMessagesSeen:U,setChatTypes:F,setMessageSeen:B,setMessagesUnseen:$,setChatPostDraft:H,removeChat:V,clearChatPostDrafts:q}=L.actions;m.ZP=L.reducer},76872:function(_,m,C){"use strict";C.d(m,{II:function(){return W},Ln:function(){return G},T2:function(){return K},Wd:function(){return Z},YZ:function(){return B},e:function(){return T},eD:function(){return H},hs:function(){return $},it:function(){return V},lr:function(){return q}});var R,T,L=C(77236),U=C(13594);(R=T||(T={})).Connections="Connections",R.Invitations="Invitations",R.Groups="Groups",R.Guilds="Guilds",R.Communities="Communities",R.Following="Following",R.Followers="Followers",R.Search="Search";let F=(0,L.oM)({name:"navigation",initialState:{networkPage:"Connections"},reducers:{setNetworkPage:(_,m)=>{U.ZP.log("navigationSlice.setNetworkPage(".concat(m.payload,"): Called"));let C=m.payload;switch(_.networkPage=C,C){case"Connections":_.activeChat=_.selectedProfile;break;case"Groups":_.activeChat=_.selectedGroup;break;case"Guilds":_.activeChat=_.selectedGuild;break;case"Communities":_.activeChat=_.selectedCommunity;break;default:_.activeChat&&(_.activeChat=void 0)}},setShowProfile:(_,m)=>{U.ZP.log("navigationSlice.setShowProfile(): Called"),_.showProfile=m.payload},setShowGroup:(_,m)=>{U.ZP.log("navigationSlice.setShowGroup(): Called"),_.showGroup=m.payload},setSelectedProfile:(_,m)=>{var C;U.ZP.log("navigationSlice.setSelectedProfile(friendId: ".concat(null===(C=m.payload)||void 0===C?void 0:C.friend_id,"): Called")),_.selectedProfile=m.payload},setSelectedGroup:(_,m)=>{U.ZP.log("navigationSlice.setSelectedGroup(): Called (".concat(JSON.stringify(m.payload),")")),_.selectedGroup=m.payload},setSelectedGuild:(_,m)=>{U.ZP.log("navigationSlice.setSelectedGuild(): Called (".concat(JSON.stringify(m.payload),")")),_.selectedGuild=m.payload},setSelectedCommunity:(_,m)=>{U.ZP.log("navigationSlice.setSelectedCommunity(): Called (".concat(JSON.stringify(m.payload),")")),_.selectedCommunity=m.payload},setActiveChat:(_,m)=>{U.ZP.log("navigationSlice.setActiveChat(): Called (".concat(JSON.stringify(m.payload),")")),_.activeChat=m.payload},groupDeleted:(_,m)=>{var C,R,T,L;U.ZP.log("navigationSlice.groupDeleted(groupId: ".concat(m.payload.groupId,"): Called (activeChat: ").concat(JSON.stringify(_.activeChat),")"));let{groupId:F}=m.payload;(null===(C=_.selectedGroup)||void 0===C?void 0:C.group_id)===F&&(_.selectedGroup=void 0),(null===(R=_.selectedGuild)||void 0===R?void 0:R.group_id)===F&&(_.selectedGuild=void 0),(null===(T=_.selectedCommunity)||void 0===T?void 0:T.group_id)===F&&(_.selectedCommunity=void 0),(null===(L=_.activeChat)||void 0===L?void 0:L.group_id)===F&&(_.activeChat=void 0)}}}),{setNetworkPage:B,setShowProfile:$,setShowGroup:H,setSelectedProfile:V,setSelectedGroup:q,setSelectedGuild:G,setSelectedCommunity:K,setActiveChat:Z,groupDeleted:W}=F.actions;m.ZP=F.reducer},73356:function(_,m,C){"use strict";C.d(m,{sU:function(){return U},zL:function(){return F}});var R=C(77236),T=C(13594);let L=(0,R.oM)({name:"notifications",initialState:{matchEnded:[]},reducers:{addMatchEnded:(_,m)=>{T.cM("notificationsSlice.addMatchEnded(action: ".concat(JSON.stringify(m.payload),"): Called")),_.matchEnded=[..._.matchEnded,m.payload]},removeMatchEnded:(_,m)=>{T.cM("notificationsSlice.removeMatchEnded(action: ".concat(JSON.stringify(m.payload),"): Called")),_.matchEnded=_.matchEnded.filter(_=>_!==m.payload)}}}),{addMatchEnded:U,removeMatchEnded:F}=L.actions;m.ZP=L.reducer},62858:function(_,m,C){"use strict";C.d(m,{PU:function(){return U},Te:function(){return B},_8:function(){return F},cp:function(){return $},ub:function(){return H}});var R=C(77236),T=C(13594);let L=(0,R.oM)({name:"search",initialState:{gameFilter:void 0,countryFilter:void 0,localesFilter:void 0,customizedIdFilter:void 0,nameFilter:void 0},reducers:{setGameFilter:(_,m)=>{var C;T.ZP.log("searchSlice.setGameFilter(".concat(null===(C=m.payload)||void 0===C?void 0:C.name,"): Called")),_.gameFilter=m.payload},setCountryFilter:(_,m)=>{T.ZP.log("searchSlice.setCountryFilter(".concat(m.payload,"): Called")),_.countryFilter=m.payload},setLocalesFilter:(_,m)=>{T.ZP.log("searchSlice.setLocalesFilter(".concat(m.payload,"): Called")),_.localesFilter=m.payload},setCustomizedIdFilter:(_,m)=>{T.ZP.log("searchSlice.setCustomizedIdFilter(".concat(m.payload,"): Called")),_.customizedIdFilter=m.payload},setNameFilter:(_,m)=>{T.ZP.log("searchSlice.setNameFilter(".concat(m.payload,"): Called")),_.nameFilter=m.payload}}}),{setGameFilter:U,setCountryFilter:F,setLocalesFilter:B,setCustomizedIdFilter:$,setNameFilter:H}=L.actions;m.ZP=L.reducer},68824:function(_,m,C){"use strict";C.d(m,{d:function(){return getBackgroundColor}});var R=C(46008);function getBackgroundColor(_){return"dark"===_?R.Kj.dark.background:R.Kj.light.background}},36448:function(_,m,C){"use strict";C.d(m,{ZP:function(){return Y},i_:function(){return F},PM:function(){return B},rv:function(){return W},fs:function(){return K},Bk:function(){return Z}});var R=C(77236),T=C(13594);let L=(null==navigator?void 0:navigator.language)?navigator.language.startsWith("de")?"de-DE":navigator.language.startsWith("es")?"es-ES":navigator.language.startsWith("it")?"it-IT":navigator.language.startsWith("ja")?"ja-JP":navigator.language.startsWith("ko")?"ko-KR":navigator.language.startsWith("pt")?"pt-BR":navigator.language.startsWith("ru")?"ru-RU":navigator.language.startsWith("sv")?"sv-SE":navigator.language.startsWith("uk")?"uk-UA":navigator.language.startsWith("zh")?"zh-CN":"en-US":"en-US",U=(0,R.oM)({name:"settings",initialState:{locale:L,mode:void 0,appearance:!1,audioVideo:!1,notifications:!1,launchOverlay:!1,appVersion:!1,subscription:!1,webhooks:!1,myAccount:!1},reducers:{setLocale:(_,m)=>{T.ZP.log("settingsSlice.setLocale(".concat(m.payload,")")),_.locale=m.payload},setMode:(_,m)=>{T.ZP.log("settingsSlice.setMode(".concat(m.payload,")")),_.mode=m.payload},setAppearance:(_,m)=>{T.ZP.log("settingsSlice.setAppearance(".concat(m.payload,")")),_.appearance=m.payload},setAudioVideo:(_,m)=>{T.ZP.log("settingsSlice.setAudioVideo(".concat(m.payload,")")),_.audioVideo=m.payload},setNotifications:(_,m)=>{T.ZP.log("settingsSlice.setNotifications(".concat(m.payload,")")),_.notifications=m.payload},setLaunchOverlay:(_,m)=>{T.ZP.log("settingsSlice.setLaunchOverlay(".concat(m.payload,")")),_.launchOverlay=m.payload},setAppVersion:(_,m)=>{T.ZP.log("settingsSlice.setAppVersion(".concat(m.payload,")")),_.appVersion=m.payload},setSubscription:(_,m)=>{T.ZP.log("settingsSlice.setSubscription(".concat(m.payload,")")),_.subscription=m.payload},setWebhooks:(_,m)=>{T.ZP.log("settingsSlice.setWebhooks(".concat(m.payload,")")),_.webhooks=m.payload},setMyAccount:(_,m)=>{T.ZP.log("settingsSlice.setMyAccount(".concat(m.payload,")")),_.myAccount=m.payload}}}),{setLocale:F,setMode:B,setAppearance:$,setAudioVideo:H,setNotifications:V,setLaunchOverlay:q,setAppVersion:G,setSubscription:K,setWebhooks:Z,setMyAccount:W}=U.actions;var Y=U.reducer},67566:function(_,m,C){"use strict";C.d(m,{$6:function(){return W},Fy:function(){return er},J9:function(){return G},Jz:function(){return q},K4:function(){return et},Ks:function(){return B},Lg:function(){return Z},SU:function(){return K},VZ:function(){return V},W:function(){return U},Z6:function(){return F},f5:function(){return $},ur:function(){return en},vb:function(){return H},zG:function(){return Y}});var R=C(77236),T=C(13594);let L=(0,R.oM)({name:"webRTC",initialState:{isLocalMediaStreamActive:!1,outgoingCalls:{},incomingCalls:{},connections:{}},reducers:{addIncomingCall:(_,m)=>{T.ZP.log("webRTCSlice.addIncomingCall(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,type:R}=m.payload;_.incomingCalls[C]={type:R,timestamp:Math.round(Date.now()/1e3)}},removeIncomingCall:(_,m)=>{T.ZP.log("webRTCSlice.removeIncomingCall(action: ".concat(JSON.stringify(m.payload),"): Called")),delete _.incomingCalls[m.payload]},acceptIncomingCall:(_,m)=>{T.ZP.log("webRTCSlice.acceptIncomingCall(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,type:R}=m.payload;if(!_.incomingCalls[C]){T.ZP.warn("webRTCSlice.acceptIncomingCall(): No incoming call found");return}setConnecting(_,C,R,_.incomingCalls[C].type),delete _.incomingCalls[C]},addOutgoingCall:(_,m)=>{T.ZP.log("webRTCSlice.addOutgoingCall(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,type:R}=m.payload;_.outgoingCalls[C]={type:R,timestamp:Math.round(Date.now()/1e3)}},removeOutgoingCall:(_,m)=>{T.ZP.log("webRTCSlice.removeOutgoingCall(action: ".concat(m.payload,"): Called")),delete _.outgoingCalls[m.payload]},outgoingCallAccepted:(_,m)=>{T.ZP.log("webRTCSlice.outgoingCallAccepted(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,type:R}=m.payload;if(!_.outgoingCalls[C]){T.ZP.log("webRTCSlice.outgoingCallAccepted(): Retruning as there is no outgoing call with ".concat(C));return}setConnecting(_,C,_.outgoingCalls[C].type,R),delete _.outgoingCalls[C]},setLocalMediaStreamError:(_,m)=>{T.ZP.log("webRTCSlice.setLocalMediaStreamError(action: ".concat(JSON.stringify(m.payload),"): Called"));let{name:C,message:R}=m.payload;_.localMediaStreamError={name:C,message:R}},setLocalMediaStreamVideoError:(_,m)=>{T.ZP.log("webRTCSlice.setLocalMediaStreamVideoError(action: ".concat(JSON.stringify(m.payload),"): Called"));let{name:C,message:R}=m.payload;_.localMediaStreamVideoError={name:C,message:R}},setRemoteAudio:(_,m)=>{T.ZP.log("webRTCSlice.setRemoteAudio(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,remoteAudio:R}=m.payload;_.connections[C]?_.connections[C].remoteAudio=R:T.ZP.error("webRTCSlice.setRemoteAudio(): No connection with ".concat(C))},setRemoteVideo:(_,m)=>{T.ZP.log("webRTCSlice.setRemoteVideo(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,remoteVideo:R}=m.payload;_.connections[C]?_.connections[C].remoteVideo=R:T.ZP.error("webRTCSlice.setRemoteVideo(): No connection with ".concat(C))},updateConnectionState:(_,m)=>{T.ZP.log("webRTCSlice.updateConnectionState(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,connectionState:R}=m.payload;_.connections[C]?_.connections[C].state=R:T.ZP.log("webRTCSlice.connectionError(): No connection with ".concat(C))},updateLocalMediaStream:(_,m)=>{let C=m.payload;void 0!==C&&(_.isLocalMediaStreamActive=C),_.localMediaStreamVersion=(_.localMediaStreamVersion||0)+1},setLocalAudio:(_,m)=>{_.localAudio=m.payload},setLocalVideo:(_,m)=>{_.localVideo=m.payload},setLocalScreenSharing:(_,m)=>{_.localScreenSharing=m.payload},setLocalDeafen:(_,m)=>{let C=m.payload;_.localDeafen=C,!0===C&&(_.localAudio=!1)},updateRemoteMediaStream:(_,m)=>{T.ZP.log("webRTCSlice.updateRemoteMediaStream(action: ".concat(JSON.stringify(m.payload),"): Called"));let{friendId:C,isActive:R}=m.payload;_.connections[C]&&(_.connections[C].remoteMediaStreamsVersion=(_.connections[C].remoteMediaStreamsVersion||0)+1,_.connections[C].isRemoteMediaStreamActive=R)},leftCall:(_,m)=>{T.ZP.log("webRTCSlice.leftCall(friend id: ".concat(m.payload,"): Called"));let C=m.payload;delete _.connections[C]},leaveCall:_=>{T.ZP.log("webRTCSlice.leaveCall(): Called"),_.connections={},_.localMediaStreamVersion=(_.localMediaStreamVersion||0)+1,_.isLocalMediaStreamActive=!1,_.localAudio=void 0,_.localVideo=void 0,_.localScreenSharing=void 0,_.localDeafen=void 0}}}),{addIncomingCall:U,removeIncomingCall:F,acceptIncomingCall:B,addOutgoingCall:$,removeOutgoingCall:H,outgoingCallAccepted:V,setLocalMediaStreamError:q,setLocalMediaStreamVideoError:G,setRemoteAudio:K,setRemoteVideo:Z,updateConnectionState:W,updateLocalMediaStream:Y,setLocalAudio:J,setLocalVideo:Q,setLocalScreenSharing:X,setLocalDeafen:ee,updateRemoteMediaStream:et,leftCall:er,leaveCall:en}=L.actions;function setConnecting(_,m,C,R){_.connections[m]={isRemoteMediaStreamActive:!1,remoteAudio:!0,remoteVideo:"video"===R,remoteScreenSharing:!1},_.localAudio=!0,_.localVideo="video"===C,_.localScreenSharing=!1,_.localDeafen=!1}m.ZP=L.reducer},31011:function(_,m,C){"use strict";C.d(m,{Cp:function(){return changePassword},h8:function(){return deleteUser},gF:function(){return forgotPassword},hP:function(){return getAccessToken},UR:function(){return getCredentials},lI:function(){return getIdToken},Ib:function(){return logIn},ni:function(){return logOut},S5:function(){return resendConfirmationCode},c0:function(){return resetPassword},y1:function(){return signUp}});var R=C(91526);let hostHeaderMiddleware=_=>m=>async C=>{if(!R.aW.isInstance(C.request))return m(C);let{request:T}=C,{handlerProtocol:L=""}=_.requestHandler.metadata||{};if(L.indexOf("h2")>=0&&!T.headers[":authority"])delete T.headers.host,T.headers[":authority"]="";else if(!T.headers.host){let _=T.hostname;null!=T.port&&(_+=`:${T.port}`),T.headers.host=_}return m(C)},T={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=_=>({applyToStack:m=>{m.add(hostHeaderMiddleware(_),T)}}),loggerMiddleware=()=>(_,m)=>async C=>{try{let R=await _(C),{clientName:T,commandName:L,logger:U,dynamoDbDocumentClientOptions:F={}}=m,{overrideInputFilterSensitiveLog:B,overrideOutputFilterSensitiveLog:$}=F,H=B??m.inputFilterSensitiveLog,V=$??m.outputFilterSensitiveLog,{$metadata:q,...G}=R.output;return U?.info?.({clientName:T,commandName:L,input:H(C.input),output:V(G),metadata:q}),R}catch(B){let{clientName:_,commandName:R,logger:T,dynamoDbDocumentClientOptions:L={}}=m,{overrideInputFilterSensitiveLog:U}=L,F=U??m.inputFilterSensitiveLog;throw T?.error?.({clientName:_,commandName:R,input:F(C.input),error:B,metadata:B.$metadata}),B}},L={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=_=>({applyToStack:_=>{_.add(loggerMiddleware(),L)}});var U=C(71769),F=C(8243),B=C(14912),$=C(44562),H=C(69080),V=C(68504),q=C(37916),G=C(12532);let K="X-Amz-Date",Z="X-Amz-Signature",W="X-Amz-Security-Token",Y="authorization",J=K.toLowerCase(),Q=[Y,J,"date"],X=Z.toLowerCase(),ee="x-amz-content-sha256",et=W.toLowerCase(),er={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},en=/^proxy-/,ei=/^sec-/,eo="AWS4-HMAC-SHA256",ea="aws4_request",es={},ec=[],createScope=(_,m,C)=>`${_}/${m}/${C}/${ea}`,getSigningKey=async(_,m,C,R,T)=>{let L=await hmac(_,m.secretAccessKey,m.accessKeyId),U=`${C}:${R}:${T}:${(0,$.N)(L)}:${m.sessionToken}`;if(U in es)return es[U];for(ec.push(U);ec.length>50;)delete es[ec.shift()];let F=`AWS4${m.secretAccessKey}`;for(let m of[C,R,T,ea])F=await hmac(_,F,m);return es[U]=F},hmac=(_,m,C)=>{let R=new _(m);return R.update((0,G._)(C)),R.digest()},getCanonicalHeaders=({headers:_},m,C)=>{let R={};for(let T of Object.keys(_).sort()){if(void 0==_[T])continue;let L=T.toLowerCase();(!(L in er||m?.has(L)||en.test(L)||ei.test(L))||C&&(!C||C.has(L)))&&(R[L]=_[T].trim().replace(/\s+/g," "))}return R};var eu=C(55388);let getCanonicalQuery=({query:_={}})=>{let m=[],C={};for(let R of Object.keys(_).sort()){if(R.toLowerCase()===X)continue;m.push(R);let T=_[R];"string"==typeof T?C[R]=`${(0,eu.i)(R)}=${(0,eu.i)(T)}`:Array.isArray(T)&&(C[R]=T.slice(0).reduce((_,m)=>_.concat([`${(0,eu.i)(R)}=${(0,eu.i)(m)}`]),[]).sort().join("&"))}return m.map(_=>C[_]).filter(_=>_).join("&")},isArrayBuffer=_=>"function"==typeof ArrayBuffer&&_ instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(_),getPayloadHash=async({headers:_,body:m},C)=>{for(let m of Object.keys(_))if(m.toLowerCase()===ee)return _[m];if(void 0==m)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof m||ArrayBuffer.isView(m)||isArrayBuffer(m)){let _=new C;return _.update((0,G._)(m)),(0,$.N)(await _.digest())}return"UNSIGNED-PAYLOAD"},hasHeader=(_,m)=>{for(let C of(_=_.toLowerCase(),Object.keys(m)))if(_===C.toLowerCase())return!0;return!1},cloneRequest=({headers:_,query:m,...C})=>({...C,headers:{..._},query:m?cloneQuery(m):void 0}),cloneQuery=_=>Object.keys(_).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{}),moveHeadersToQuery=(_,m={})=>{let{headers:C,query:R={}}="function"==typeof _.clone?_.clone():cloneRequest(_);for(let _ of Object.keys(C)){let T=_.toLowerCase();"x-amz-"!==T.slice(0,6)||m.unhoistableHeaders?.has(T)||(R[_]=C[_],delete C[_])}return{..._,headers:C,query:R}},prepareRequest=_=>{for(let m of Object.keys((_="function"==typeof _.clone?_.clone():cloneRequest(_)).headers))Q.indexOf(m.toLowerCase())>-1&&delete _.headers[m];return _},iso8601=_=>toDate(_).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=_=>"number"==typeof _?new Date(1e3*_):"string"==typeof _?Number(_)?new Date(1e3*Number(_)):new Date(_):_;let SignatureV4_SignatureV4=class SignatureV4_SignatureV4{constructor({applyChecksum:_,credentials:m,region:C,service:R,sha256:T,uriEscapePath:L=!0}){this.headerMarshaller=new B.y7(V.G,q.$),this.service=R,this.sha256=T,this.uriEscapePath=L,this.applyChecksum="boolean"!=typeof _||_,this.regionProvider=(0,H.$)(C),this.credentialProvider=(0,H.$)(m)}async presign(_,m={}){let{signingDate:C=new Date,expiresIn:R=3600,unsignableHeaders:T,unhoistableHeaders:L,signableHeaders:U,signingRegion:F,signingService:B}=m,$=await this.credentialProvider();this.validateResolvedCredentials($);let H=F??await this.regionProvider(),{longDate:V,shortDate:q}=formatDate(C);if(R>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let G=createScope(q,H,B??this.service),Y=moveHeadersToQuery(prepareRequest(_),{unhoistableHeaders:L});$.sessionToken&&(Y.query[W]=$.sessionToken),Y.query["X-Amz-Algorithm"]=eo,Y.query["X-Amz-Credential"]=`${$.accessKeyId}/${G}`,Y.query[K]=V,Y.query["X-Amz-Expires"]=R.toString(10);let J=getCanonicalHeaders(Y,T,U);return Y.query["X-Amz-SignedHeaders"]=getCanonicalHeaderList(J),Y.query[Z]=await this.getSignature(V,G,this.getSigningKey($,H,q,B),this.createCanonicalRequest(Y,J,await getPayloadHash(_,this.sha256))),Y}async sign(_,m){return"string"==typeof _?this.signString(_,m):_.headers&&_.payload?this.signEvent(_,m):_.message?this.signMessage(_,m):this.signRequest(_,m)}async signEvent({headers:_,payload:m},{signingDate:C=new Date,priorSignature:R,signingRegion:T,signingService:L}){let U=T??await this.regionProvider(),{shortDate:F,longDate:B}=formatDate(C),H=createScope(F,U,L??this.service),V=await getPayloadHash({headers:{},body:m},this.sha256),q=new this.sha256;q.update(_);let G=(0,$.N)(await q.digest()),K=["AWS4-HMAC-SHA256-PAYLOAD",B,H,R,G,V].join("\n");return this.signString(K,{signingDate:C,signingRegion:U,signingService:L})}async signMessage(_,{signingDate:m=new Date,signingRegion:C,signingService:R}){let T=this.signEvent({headers:this.headerMarshaller.format(_.message.headers),payload:_.message.body},{signingDate:m,signingRegion:C,signingService:R,priorSignature:_.priorSignature});return T.then(m=>({message:_.message,signature:m}))}async signString(_,{signingDate:m=new Date,signingRegion:C,signingService:R}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let L=C??await this.regionProvider(),{shortDate:U}=formatDate(m),F=new this.sha256(await this.getSigningKey(T,L,U,R));return F.update((0,G._)(_)),(0,$.N)(await F.digest())}async signRequest(_,{signingDate:m=new Date,signableHeaders:C,unsignableHeaders:R,signingRegion:T,signingService:L}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let F=T??await this.regionProvider(),B=prepareRequest(_),{longDate:$,shortDate:H}=formatDate(m),V=createScope(H,F,L??this.service);B.headers[J]=$,U.sessionToken&&(B.headers[et]=U.sessionToken);let q=await getPayloadHash(B,this.sha256);!hasHeader(ee,B.headers)&&this.applyChecksum&&(B.headers[ee]=q);let G=getCanonicalHeaders(B,R,C),K=await this.getSignature($,V,this.getSigningKey(U,F,H,L),this.createCanonicalRequest(B,G,q));return B.headers[Y]=`${eo} Credential=${U.accessKeyId}/${V}, SignedHeaders=${getCanonicalHeaderList(G)}, Signature=${K}`,B}createCanonicalRequest(_,m,C){let R=Object.keys(m).sort();return`${_.method} ${this.getCanonicalPath(_)} ${getCanonicalQuery(_)} ${R.map(_=>`${_}:${m[_]}`).join("\n")} ${R.join(";")} ${C}`}async createStringToSign(_,m,C){let R=new this.sha256;R.update((0,G._)(C));let T=await R.digest();return`${eo} ${_} ${m} ${(0,$.N)(T)}`}getCanonicalPath({path:_}){if(this.uriEscapePath){let m=[];for(let C of _.split("/"))C?.length!==0&&"."!==C&&(".."===C?m.pop():m.push(C));let C=`${_?.startsWith("/")?"/":""}${m.join("/")}${m.length>0&&_?.endsWith("/")?"/":""}`,R=encodeURIComponent(C);return R.replace(/%2F/g,"/")}return _}async getSignature(_,m,C,R){let T=await this.createStringToSign(_,m,R),L=new this.sha256(await C);return L.update((0,G._)(T)),(0,$.N)(await L.digest())}getSigningKey(_,m,C,R){return getSigningKey(this.sha256,_,C,m,R||this.service)}validateResolvedCredentials(_){if("object"!=typeof _||"string"!=typeof _.accessKeyId||"string"!=typeof _.secretAccessKey)throw Error("Resolved credential object is not valid")}};let formatDate=_=>{let m=iso8601(_).replace(/[\-:]/g,"");return{longDate:m,shortDate:m.slice(0,8)}},getCanonicalHeaderList=_=>Object.keys(_).sort().join(";"),resolveAwsAuthConfig=_=>{let m;let C=_.credentials?normalizeCredentialProvider(_.credentials):_.credentialDefaultProvider(_),{signingEscapePath:R=!0,systemClockOffset:T=_.systemClockOffset||0,sha256:L}=_;return m=_.signer?(0,H.$)(_.signer):_.regionInfoProvider?()=>(0,H.$)(_.region)().then(async m=>[await _.regionInfoProvider(m,{useFipsEndpoint:await _.useFipsEndpoint(),useDualstackEndpoint:await _.useDualstackEndpoint()})||{},m]).then(([m,T])=>{let{signingRegion:U,signingService:F}=m;_.signingRegion=_.signingRegion||U||T,_.signingName=_.signingName||F||_.serviceId;let B={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},$=_.signerConstructor||SignatureV4_SignatureV4;return new $(B)}):async m=>{m=Object.assign({},{name:"sigv4",signingName:_.signingName||_.defaultSigningName,signingRegion:await (0,H.$)(_.region)(),properties:{}},m);let T=m.signingRegion,U=m.signingName;_.signingRegion=_.signingRegion||T,_.signingName=_.signingName||U||_.serviceId;let F={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},B=_.signerConstructor||SignatureV4_SignatureV4;return new B(F)},{..._,systemClockOffset:T,signingEscapePath:R,credentials:C,signer:m}},normalizeCredentialProvider=_=>"function"==typeof _?(0,F.H)(_,_=>void 0!==_.expiration&&_.expiration.getTime()-Date.now()<3e5,_=>void 0!==_.expiration):(0,H.$)(_);var el=C(8794);let ed="user-agent",ef="x-amz-user-agent",ep=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,eh=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,userAgentMiddleware=_=>(m,C)=>async T=>{let{request:L}=T;if(!R.aW.isInstance(L))return m(T);let{headers:U}=L,F=C?.userAgent?.map(escapeUserAgent)||[],B=(await _.defaultUserAgentProvider()).map(escapeUserAgent),$=_?.customUserAgent?.map(escapeUserAgent)||[],H=(0,el.Qj)(),V=(H?[H]:[]).concat([...B,...F,...$]).join(" "),q=[...B.filter(_=>_.startsWith("aws-sdk-")),...$].join(" ");return"browser"!==_.runtime?(q&&(U[ef]=U[ef]?`${U[ed]} ${q}`:q),U[ed]=V):U[ef]=V,m({...T,request:L})},escapeUserAgent=_=>{let m=_[0].split("/").map(_=>_.replace(ep,"-")).join("/"),C=_[1]?.replace(eh,"-"),R=m.indexOf("/"),T=m.substring(0,R),L=m.substring(R+1);return"api"===T&&(L=L.toLowerCase()),[T,L,C].filter(_=>_&&_.length>0).reduce((_,m,C)=>{switch(C){case 0:return m;case 1:return`${_}/${m}`;default:return`${_}#${m}`}},"")},ey={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=_=>({applyToStack:m=>{m.add(userAgentMiddleware(_),ey)}});var eg=C(59280),e_=C(52326),em=C(45597),ev=C(11511),eb=C(69419);let resolveClientEndpointParameters=_=>({..._,useDualstackEndpoint:_.useDualstackEndpoint??!1,useFipsEndpoint:_.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"});var ew={i8:"3.428.0"},eS=C(57381),eE=C(51206),eC=C.n(eE);let defaultUserAgent=({serviceId:_,clientVersion:m})=>async()=>{let C="undefined"!=typeof window&&window?.navigator?.userAgent?eC().parse(window.navigator.userAgent):void 0,R=[["aws-sdk-js",m],["ua","2.0"],[`os/${C?.os?.name||"other"}`,C?.os?.version],["lang/js"],["md/browser",`${C?.browser?.name??"unknown"}_${C?.browser?.version??"unknown"}`]];return _&&R.push([`api/${_}`,m]),R};var ex=C(39627),eP=C(33131),eA=C(90130),eR=C(63660),eO=C(93294),eI=C(10687);let eT="required",ek="argv",eM="isSet",ej="tree",eD="error",eN="endpoint",eL="PartitionResult",eU={[eT]:!1,type:"String"},eF={[eT]:!0,default:!1,type:"Boolean"},eB={ref:"Endpoint"},e$={fn:"booleanEquals",[ek]:[{ref:"UseFIPS"},!0]},ez={fn:"booleanEquals",[ek]:[{ref:"UseDualStack"},!0]},eH={},eV={fn:"booleanEquals",[ek]:[!0,{fn:"getAttr",[ek]:[{ref:eL},"supportsFIPS"]}]},eq={fn:"booleanEquals",[ek]:[!0,{fn:"getAttr",[ek]:[{ref:eL},"supportsDualStack"]}]},eG=[e$],eK=[ez],eZ=[{ref:"Region"}],eW={version:"1.0",parameters:{Region:eU,UseDualStack:eF,UseFIPS:eF,Endpoint:eU},rules:[{conditions:[{fn:eM,[ek]:[eB]}],type:ej,rules:[{conditions:eG,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:eD},{conditions:eK,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:eD},{endpoint:{url:eB,properties:eH,headers:eH},type:eN}]},{conditions:[{fn:eM,[ek]:eZ}],type:ej,rules:[{conditions:[{fn:"aws.partition",[ek]:eZ,assign:eL}],type:ej,rules:[{conditions:[e$,ez],type:ej,rules:[{conditions:[eV,eq],type:ej,rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eH,headers:eH},type:eN}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:eD}]},{conditions:eG,type:ej,rules:[{conditions:[eV],type:ej,rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:eH,headers:eH},type:eN}]},{error:"FIPS is enabled but this partition does not support FIPS",type:eD}]},{conditions:eK,type:ej,rules:[{conditions:[eq],type:ej,rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eH,headers:eH},type:eN}]},{error:"DualStack is enabled but this partition does not support DualStack",type:eD}]},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:eH,headers:eH},type:eN}]}]},{error:"Invalid Configuration: Missing Region",type:eD}]},defaultEndpointResolver=(_,m={})=>(0,el.B1)(eW,{endpointParams:_,logger:m.logger}),getRuntimeConfig=_=>({apiVersion:"2014-06-30",base64Decoder:_?.base64Decoder??eI.G,base64Encoder:_?.base64Encoder??eI.s,disableHostPrefix:_?.disableHostPrefix??!1,endpointProvider:_?.endpointProvider??defaultEndpointResolver,extensions:_?.extensions??[],logger:_?.logger??new eb.vk,serviceId:_?.serviceId??"Cognito Identity",urlParser:_?.urlParser??eO.e,utf8Decoder:_?.utf8Decoder??q.$,utf8Encoder:_?.utf8Encoder??V.G});var eY=C(95419);let runtimeConfig_browser_getRuntimeConfig=_=>{let m=(0,eY.j)(_),defaultConfigProvider=()=>m().then(eb.jv),C=getRuntimeConfig(_);return{...C,..._,runtime:"browser",defaultsMode:m,bodyLengthChecker:_?.bodyLengthChecker??eA.W,credentialDefaultProvider:_?.credentialDefaultProvider??(_=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:_?.defaultUserAgentProvider??defaultUserAgent({serviceId:C.serviceId,clientVersion:ew.i8}),maxAttempts:_?.maxAttempts??eR.J,region:_?.region??(0,eP.n)("Region is missing"),requestHandler:_?.requestHandler??new ex.BX(defaultConfigProvider),retryMode:_?.retryMode??(async()=>(await defaultConfigProvider()).retryMode||eR.CA),sha256:_?.sha256??eS.Sha256,streamCollector:_?.streamCollector??ex.CF,useDualstackEndpoint:_?.useDualstackEndpoint??(()=>Promise.resolve(eg.JY)),useFipsEndpoint:_?.useFipsEndpoint??(()=>Promise.resolve(eg.Fh))}};var eJ=C(63743);let asPartial=_=>_,resolveRuntimeExtensions=(_,m)=>{let C={...asPartial((0,eJ.GW)(_)),...asPartial((0,eb.kE)(_)),...asPartial((0,R.cA)(_))};return m.forEach(_=>_.configure(C)),{..._,...(0,eJ.A1)(C),...(0,eb.SQ)(C),...(0,R.AO)(C)}};let CognitoIdentityClient=class CognitoIdentityClient extends eb.KU{constructor(...[_]){let m=runtimeConfig_browser_getRuntimeConfig(_||{}),C=resolveClientEndpointParameters(m),R=(0,eg.Xb)(C),T=(0,em.uW)(R),L=(0,ev.BC)(T),F=resolveAwsAuthConfig(L),B={...F,customUserAgent:"string"==typeof F.customUserAgent?[[F.customUserAgent]]:F.customUserAgent},$=resolveRuntimeExtensions(B,_?.extensions||[]);super($),this.config=$,this.middlewareStack.use((0,ev.NQ)(this.config)),this.middlewareStack.use((0,e_.VG)(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use((0,U.eV)(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config))}destroy(){super.destroy()}};var eQ=C(45410),eX=C(97761);let CognitoIdentityServiceException=class CognitoIdentityServiceException extends eb.sI{constructor(_){super(_),Object.setPrototypeOf(this,CognitoIdentityServiceException.prototype)}};let InternalErrorException=class InternalErrorException extends CognitoIdentityServiceException{constructor(_){super({name:"InternalErrorException",$fault:"server",..._}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,InternalErrorException.prototype)}};let InvalidParameterException=class InvalidParameterException extends CognitoIdentityServiceException{constructor(_){super({name:"InvalidParameterException",$fault:"client",..._}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,InvalidParameterException.prototype)}};let LimitExceededException=class LimitExceededException extends CognitoIdentityServiceException{constructor(_){super({name:"LimitExceededException",$fault:"client",..._}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,LimitExceededException.prototype)}};let NotAuthorizedException=class NotAuthorizedException extends CognitoIdentityServiceException{constructor(_){super({name:"NotAuthorizedException",$fault:"client",..._}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,NotAuthorizedException.prototype)}};let ResourceConflictException=class ResourceConflictException extends CognitoIdentityServiceException{constructor(_){super({name:"ResourceConflictException",$fault:"client",..._}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,ResourceConflictException.prototype)}};let TooManyRequestsException=class TooManyRequestsException extends CognitoIdentityServiceException{constructor(_){super({name:"TooManyRequestsException",$fault:"client",..._}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,TooManyRequestsException.prototype)}};let ResourceNotFoundException=class ResourceNotFoundException extends CognitoIdentityServiceException{constructor(_){super({name:"ResourceNotFoundException",$fault:"client",..._}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ResourceNotFoundException.prototype)}};let ExternalServiceException=class ExternalServiceException extends CognitoIdentityServiceException{constructor(_){super({name:"ExternalServiceException",$fault:"client",..._}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,ExternalServiceException.prototype)}};let InvalidIdentityPoolConfigurationException=class InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException{constructor(_){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",..._}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,InvalidIdentityPoolConfigurationException.prototype)}};let se_GetCredentialsForIdentityCommand=async(_,m)=>{let C=sharedHeaders("GetCredentialsForIdentity");return buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_GetIdCommand=async(_,m)=>{let C=sharedHeaders("GetId");return buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},de_GetCredentialsForIdentityCommand=async(_,m)=>{if(_.statusCode>=300)return de_GetCredentialsForIdentityCommandError(_,m);let C=await parseBody(_.body,m),R={};R=de_GetCredentialsForIdentityResponse(C,m);let T={$metadata:deserializeMetadata(_),...R};return T},de_GetCredentialsForIdentityCommandError=async(_,m)=>{let C={..._,body:await parseErrorBody(_.body,m)},R=loadRestJsonErrorCode(_,C.body);switch(R){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await de_ExternalServiceExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await de_InternalErrorExceptionRes(C,m);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await de_InvalidIdentityPoolConfigurationExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await de_InvalidParameterExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await de_NotAuthorizedExceptionRes(C,m);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await de_ResourceConflictExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await de_TooManyRequestsExceptionRes(C,m);default:let T=C.body;return e0({output:_,parsedBody:T,errorCode:R})}},de_GetIdCommand=async(_,m)=>{if(_.statusCode>=300)return de_GetIdCommandError(_,m);let C=await parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:deserializeMetadata(_),...R};return T},de_GetIdCommandError=async(_,m)=>{let C={..._,body:await parseErrorBody(_.body,m)},R=loadRestJsonErrorCode(_,C.body);switch(R){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await de_ExternalServiceExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await de_InternalErrorExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await de_InvalidParameterExceptionRes(C,m);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await de_LimitExceededExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await de_NotAuthorizedExceptionRes(C,m);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await de_ResourceConflictExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await de_TooManyRequestsExceptionRes(C,m);default:let T=C.body;return e0({output:_,parsedBody:T,errorCode:R})}},de_ExternalServiceExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new ExternalServiceException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InternalErrorExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InternalErrorException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidIdentityPoolConfigurationExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidIdentityPoolConfigurationException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidParameterExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidParameterException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_LimitExceededExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new LimitExceededException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_NotAuthorizedExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new NotAuthorizedException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_ResourceConflictExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new ResourceConflictException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_ResourceNotFoundExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new ResourceNotFoundException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_TooManyRequestsExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new TooManyRequestsException({$metadata:deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_Credentials=(_,m)=>(0,eb.qn)(_,{AccessKeyId:eb.pY,Expiration:_=>(0,eb.CE)((0,eb.KX)((0,eb.Fx)(_))),SecretKey:eb.pY,SessionToken:eb.pY}),de_GetCredentialsForIdentityResponse=(_,m)=>(0,eb.qn)(_,{Credentials:_=>de_Credentials(_,m),IdentityId:eb.pY}),deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),collectBodyString=(_,m)=>(0,eb.Wg)(_,m).then(_=>m.utf8Encoder(_)),e0=(0,eb.PC)(CognitoIdentityServiceException),buildHttpRpcRequest=async(_,m,C,T,L)=>{let{hostname:U,protocol:F="https",port:B,path:$}=await _.endpoint(),H={protocol:F,hostname:U,port:B,method:"POST",path:$.endsWith("/")?$.slice(0,-1)+C:$+C,headers:m};return void 0!==T&&(H.hostname=T),void 0!==L&&(H.body=L),new R.aW(H)};function sharedHeaders(_){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${_}`}}let parseBody=(_,m)=>collectBodyString(_,m).then(_=>_.length?JSON.parse(_):{}),parseErrorBody=async(_,m)=>{let C=await parseBody(_,m);return C.message=C.message??C.Message,C},loadRestJsonErrorCode=(_,m)=>{let sanitizeErrorCode=_=>{let m=_;return"number"==typeof m&&(m=m.toString()),m.indexOf(",")>=0&&(m=m.split(",")[0]),m.indexOf(":")>=0&&(m=m.split(":")[0]),m.indexOf("#")>=0&&(m=m.split("#")[1]),m},C=Object.keys(_.headers).find(_=>"x-amzn-errortype"===_.toLowerCase());return void 0!==C?sanitizeErrorCode(_.headers[C]):void 0!==m.code?sanitizeErrorCode(m.code):void 0!==m.__type?sanitizeErrorCode(m.__type):void 0};let GetIdCommand=class GetIdCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,GetIdCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:_=>_,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityService",operation:"GetId"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_GetIdCommand(_,m)}deserialize(_,m){return de_GetIdCommand(_,m)}};let ProviderError=class ProviderError extends Error{constructor(_,m=!0){super(_),this.tryNextLink=m,this.name="ProviderError",Object.setPrototypeOf(this,ProviderError.prototype)}static from(_,m=!0){return Object.assign(new this(_.message,m),_)}};let CredentialsProviderError=class CredentialsProviderError extends ProviderError{constructor(_,m=!0){super(_,m),this.tryNextLink=m,this.name="CredentialsProviderError",Object.setPrototypeOf(this,CredentialsProviderError.prototype)}};let GetCredentialsForIdentityCommand=class GetCredentialsForIdentityCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,GetCredentialsForIdentityCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:_=>_,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityService",operation:"GetCredentialsForIdentity"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_GetCredentialsForIdentityCommand(_,m)}deserialize(_,m){return de_GetCredentialsForIdentityCommand(_,m)}};function resolveLogins(_){return Promise.all(Object.keys(_).reduce((m,C)=>{let R=_[C];return"string"==typeof R?m.push([C,R]):m.push(R().then(_=>[C,_])),m},[])).then(_=>_.reduce((_,[m,C])=>(_[m]=C,_),{}))}let e1="IdentityIds";let IndexedDbStorage=class IndexedDbStorage{constructor(_="aws:cognito-identity-ids"){this.dbName=_}getItem(_){return this.withObjectStore("readonly",m=>{let C=m.get(_);return new Promise(_=>{C.onerror=()=>_(null),C.onsuccess=()=>_(C.result?C.result.value:null)})}).catch(()=>null)}removeItem(_){return this.withObjectStore("readwrite",m=>{let C=m.delete(_);return new Promise((_,m)=>{C.onerror=()=>m(C.error),C.onsuccess=()=>_()})})}setItem(_,m){return this.withObjectStore("readwrite",C=>{let R=C.put({id:_,value:m});return new Promise((_,m)=>{R.onerror=()=>m(R.error),R.onsuccess=()=>_()})})}getDb(){let _=self.indexedDB.open(this.dbName,1);return new Promise((m,C)=>{_.onsuccess=()=>{m(_.result)},_.onerror=()=>{C(_.error)},_.onblocked=()=>{C(Error("Unable to access DB"))},_.onupgradeneeded=()=>{let m=_.result;m.onerror=()=>{C(Error("Failed to create object store"))},m.createObjectStore(e1,{keyPath:"id"})}})}withObjectStore(_,m){return this.getDb().then(C=>{let R=C.transaction(e1,_);return R.oncomplete=()=>C.close(),new Promise((_,C)=>{R.onerror=()=>C(R.error),_(m(R.objectStore(e1)))}).catch(_=>{throw C.close(),_})})}};let e2=new class{constructor(_={}){this.store=_}getItem(_){return _ in this.store?this.store[_]:null}removeItem(_){delete this.store[_]}setItem(_,m){this.store[_]=m}},fromCognitoIdentityPool_fromCognitoIdentityPool=_=>(function({accountId:_,cache:m="object"==typeof self&&self.indexedDB?new IndexedDbStorage:"object"==typeof window&&window.localStorage?window.localStorage:e2,client:C,customRoleArn:R,identityPoolId:T,logins:L,userIdentifier:U=L&&0!==Object.keys(L).length?void 0:"ANONYMOUS"}){let F=U?`aws:cognito-identity-credentials:${T}:${U}`:void 0,provider=async()=>{var U;let B=F&&await m.getItem(F);if(!B){let{IdentityId:R=function(){throw new CredentialsProviderError("Response from Amazon Cognito contained no identity ID")}()}=await C.send(new GetIdCommand({AccountId:_,IdentityPoolId:T,Logins:L?await resolveLogins(L):void 0}));B=R,F&&Promise.resolve(m.setItem(F,B)).catch(()=>{})}return U={client:C,customRoleArn:R,logins:L,identityId:B},(provider=async()=>{let{Credentials:{AccessKeyId:_=function(){throw new CredentialsProviderError("Response from Amazon Cognito contained no access key ID")}(),Expiration:m,SecretKey:C=function(){throw new CredentialsProviderError("Response from Amazon Cognito contained no secret key")}(),SessionToken:R}=function(){throw new CredentialsProviderError("Response from Amazon Cognito contained no credentials")}()}=await U.client.send(new GetCredentialsForIdentityCommand({CustomRoleArn:U.customRoleArn,IdentityId:U.identityId,Logins:U.logins?await resolveLogins(U.logins):void 0}));return{identityId:U.identityId,accessKeyId:_,secretAccessKey:C,sessionToken:R,expiration:m}})()};return()=>provider().catch(async _=>{throw F&&Promise.resolve(m.removeItem(F)).catch(()=>{}),_})})({..._,client:new CognitoIdentityClient(_.clientConfig??{})}),dist_es_hostHeaderMiddleware=_=>m=>async C=>{if(!R.aW.isInstance(C.request))return m(C);let{request:T}=C,{handlerProtocol:L=""}=_.requestHandler.metadata||{};if(L.indexOf("h2")>=0&&!T.headers[":authority"])delete T.headers.host,T.headers[":authority"]="";else if(!T.headers.host){let _=T.hostname;null!=T.port&&(_+=`:${T.port}`),T.headers.host=_}return m(C)},e5={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},dist_es_getHostHeaderPlugin=_=>({applyToStack:m=>{m.add(dist_es_hostHeaderMiddleware(_),e5)}}),loggerMiddleware_loggerMiddleware=()=>(_,m)=>async C=>{try{let R=await _(C),{clientName:T,commandName:L,logger:U,dynamoDbDocumentClientOptions:F={}}=m,{overrideInputFilterSensitiveLog:B,overrideOutputFilterSensitiveLog:$}=F,H=B??m.inputFilterSensitiveLog,V=$??m.outputFilterSensitiveLog,{$metadata:q,...G}=R.output;return U?.info?.({clientName:T,commandName:L,input:H(C.input),output:V(G),metadata:q}),R}catch(B){let{clientName:_,commandName:R,logger:T,dynamoDbDocumentClientOptions:L={}}=m,{overrideInputFilterSensitiveLog:U}=L,F=U??m.inputFilterSensitiveLog;throw T?.error?.({clientName:_,commandName:R,input:F(C.input),error:B,metadata:B.$metadata}),B}},e6={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},loggerMiddleware_getLoggerPlugin=_=>({applyToStack:_=>{_.add(loggerMiddleware_loggerMiddleware(),e6)}}),e3="X-Amz-Date",e4="X-Amz-Signature",e8="X-Amz-Security-Token",e7="authorization",e9=e3.toLowerCase(),te=[e7,e9,"date"],tt=e4.toLowerCase(),tr="x-amz-content-sha256",tn=e8.toLowerCase(),ti={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},to=/^proxy-/,ta=/^sec-/,ts="AWS4-HMAC-SHA256",tc="aws4_request",tu={},tl=[],credentialDerivation_createScope=(_,m,C)=>`${_}/${m}/${C}/${tc}`,credentialDerivation_getSigningKey=async(_,m,C,R,T)=>{let L=await credentialDerivation_hmac(_,m.secretAccessKey,m.accessKeyId),U=`${C}:${R}:${T}:${(0,$.N)(L)}:${m.sessionToken}`;if(U in tu)return tu[U];for(tl.push(U);tl.length>50;)delete tu[tl.shift()];let F=`AWS4${m.secretAccessKey}`;for(let m of[C,R,T,tc])F=await credentialDerivation_hmac(_,F,m);return tu[U]=F},credentialDerivation_hmac=(_,m,C)=>{let R=new _(m);return R.update((0,G._)(C)),R.digest()},getCanonicalHeaders_getCanonicalHeaders=({headers:_},m,C)=>{let R={};for(let T of Object.keys(_).sort()){if(void 0==_[T])continue;let L=T.toLowerCase();(!(L in ti||m?.has(L)||to.test(L)||ta.test(L))||C&&(!C||C.has(L)))&&(R[L]=_[T].trim().replace(/\s+/g," "))}return R},getCanonicalQuery_getCanonicalQuery=({query:_={}})=>{let m=[],C={};for(let R of Object.keys(_).sort()){if(R.toLowerCase()===tt)continue;m.push(R);let T=_[R];"string"==typeof T?C[R]=`${(0,eu.i)(R)}=${(0,eu.i)(T)}`:Array.isArray(T)&&(C[R]=T.slice(0).reduce((_,m)=>_.concat([`${(0,eu.i)(R)}=${(0,eu.i)(m)}`]),[]).sort().join("&"))}return m.map(_=>C[_]).filter(_=>_).join("&")},dist_es_isArrayBuffer=_=>"function"==typeof ArrayBuffer&&_ instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(_),getPayloadHash_getPayloadHash=async({headers:_,body:m},C)=>{for(let m of Object.keys(_))if(m.toLowerCase()===tr)return _[m];if(void 0==m)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof m||ArrayBuffer.isView(m)||dist_es_isArrayBuffer(m)){let _=new C;return _.update((0,G._)(m)),(0,$.N)(await _.digest())}return"UNSIGNED-PAYLOAD"},headerUtil_hasHeader=(_,m)=>{for(let C of(_=_.toLowerCase(),Object.keys(m)))if(_===C.toLowerCase())return!0;return!1},cloneRequest_cloneRequest=({headers:_,query:m,...C})=>({...C,headers:{..._},query:m?cloneRequest_cloneQuery(m):void 0}),cloneRequest_cloneQuery=_=>Object.keys(_).reduce((m,C)=>{let R=_[C];return{...m,[C]:Array.isArray(R)?[...R]:R}},{}),moveHeadersToQuery_moveHeadersToQuery=(_,m={})=>{let{headers:C,query:R={}}="function"==typeof _.clone?_.clone():cloneRequest_cloneRequest(_);for(let _ of Object.keys(C)){let T=_.toLowerCase();"x-amz-"!==T.slice(0,6)||m.unhoistableHeaders?.has(T)||(R[_]=C[_],delete C[_])}return{..._,headers:C,query:R}},prepareRequest_prepareRequest=_=>{for(let m of Object.keys((_="function"==typeof _.clone?_.clone():cloneRequest_cloneRequest(_)).headers))te.indexOf(m.toLowerCase())>-1&&delete _.headers[m];return _},utilDate_iso8601=_=>utilDate_toDate(_).toISOString().replace(/\.\d{3}Z$/,"Z"),utilDate_toDate=_=>"number"==typeof _?new Date(1e3*_):"string"==typeof _?Number(_)?new Date(1e3*Number(_)):new Date(_):_;let dist_es_SignatureV4_SignatureV4=class dist_es_SignatureV4_SignatureV4{constructor({applyChecksum:_,credentials:m,region:C,service:R,sha256:T,uriEscapePath:L=!0}){this.headerMarshaller=new B.y7(V.G,q.$),this.service=R,this.sha256=T,this.uriEscapePath=L,this.applyChecksum="boolean"!=typeof _||_,this.regionProvider=(0,H.$)(C),this.credentialProvider=(0,H.$)(m)}async presign(_,m={}){let{signingDate:C=new Date,expiresIn:R=3600,unsignableHeaders:T,unhoistableHeaders:L,signableHeaders:U,signingRegion:F,signingService:B}=m,$=await this.credentialProvider();this.validateResolvedCredentials($);let H=F??await this.regionProvider(),{longDate:V,shortDate:q}=SignatureV4_formatDate(C);if(R>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let G=credentialDerivation_createScope(q,H,B??this.service),K=moveHeadersToQuery_moveHeadersToQuery(prepareRequest_prepareRequest(_),{unhoistableHeaders:L});$.sessionToken&&(K.query[e8]=$.sessionToken),K.query["X-Amz-Algorithm"]=ts,K.query["X-Amz-Credential"]=`${$.accessKeyId}/${G}`,K.query[e3]=V,K.query["X-Amz-Expires"]=R.toString(10);let Z=getCanonicalHeaders_getCanonicalHeaders(K,T,U);return K.query["X-Amz-SignedHeaders"]=SignatureV4_getCanonicalHeaderList(Z),K.query[e4]=await this.getSignature(V,G,this.getSigningKey($,H,q,B),this.createCanonicalRequest(K,Z,await getPayloadHash_getPayloadHash(_,this.sha256))),K}async sign(_,m){return"string"==typeof _?this.signString(_,m):_.headers&&_.payload?this.signEvent(_,m):_.message?this.signMessage(_,m):this.signRequest(_,m)}async signEvent({headers:_,payload:m},{signingDate:C=new Date,priorSignature:R,signingRegion:T,signingService:L}){let U=T??await this.regionProvider(),{shortDate:F,longDate:B}=SignatureV4_formatDate(C),H=credentialDerivation_createScope(F,U,L??this.service),V=await getPayloadHash_getPayloadHash({headers:{},body:m},this.sha256),q=new this.sha256;q.update(_);let G=(0,$.N)(await q.digest()),K=["AWS4-HMAC-SHA256-PAYLOAD",B,H,R,G,V].join("\n");return this.signString(K,{signingDate:C,signingRegion:U,signingService:L})}async signMessage(_,{signingDate:m=new Date,signingRegion:C,signingService:R}){let T=this.signEvent({headers:this.headerMarshaller.format(_.message.headers),payload:_.message.body},{signingDate:m,signingRegion:C,signingService:R,priorSignature:_.priorSignature});return T.then(m=>({message:_.message,signature:m}))}async signString(_,{signingDate:m=new Date,signingRegion:C,signingService:R}={}){let T=await this.credentialProvider();this.validateResolvedCredentials(T);let L=C??await this.regionProvider(),{shortDate:U}=SignatureV4_formatDate(m),F=new this.sha256(await this.getSigningKey(T,L,U,R));return F.update((0,G._)(_)),(0,$.N)(await F.digest())}async signRequest(_,{signingDate:m=new Date,signableHeaders:C,unsignableHeaders:R,signingRegion:T,signingService:L}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let F=T??await this.regionProvider(),B=prepareRequest_prepareRequest(_),{longDate:$,shortDate:H}=SignatureV4_formatDate(m),V=credentialDerivation_createScope(H,F,L??this.service);B.headers[e9]=$,U.sessionToken&&(B.headers[tn]=U.sessionToken);let q=await getPayloadHash_getPayloadHash(B,this.sha256);!headerUtil_hasHeader(tr,B.headers)&&this.applyChecksum&&(B.headers[tr]=q);let G=getCanonicalHeaders_getCanonicalHeaders(B,R,C),K=await this.getSignature($,V,this.getSigningKey(U,F,H,L),this.createCanonicalRequest(B,G,q));return B.headers[e7]=`${ts} Credential=${U.accessKeyId}/${V}, SignedHeaders=${SignatureV4_getCanonicalHeaderList(G)}, Signature=${K}`,B}createCanonicalRequest(_,m,C){let R=Object.keys(m).sort();return`${_.method} ${this.getCanonicalPath(_)} ${getCanonicalQuery_getCanonicalQuery(_)} ${R.map(_=>`${_}:${m[_]}`).join("\n")} ${R.join(";")} ${C}`}async createStringToSign(_,m,C){let R=new this.sha256;R.update((0,G._)(C));let T=await R.digest();return`${ts} ${_} ${m} ${(0,$.N)(T)}`}getCanonicalPath({path:_}){if(this.uriEscapePath){let m=[];for(let C of _.split("/"))C?.length!==0&&"."!==C&&(".."===C?m.pop():m.push(C));let C=`${_?.startsWith("/")?"/":""}${m.join("/")}${m.length>0&&_?.endsWith("/")?"/":""}`,R=encodeURIComponent(C);return R.replace(/%2F/g,"/")}return _}async getSignature(_,m,C,R){let T=await this.createStringToSign(_,m,R),L=new this.sha256(await C);return L.update((0,G._)(T)),(0,$.N)(await L.digest())}getSigningKey(_,m,C,R){return credentialDerivation_getSigningKey(this.sha256,_,C,m,R||this.service)}validateResolvedCredentials(_){if("object"!=typeof _||"string"!=typeof _.accessKeyId||"string"!=typeof _.secretAccessKey)throw Error("Resolved credential object is not valid")}};let SignatureV4_formatDate=_=>{let m=utilDate_iso8601(_).replace(/[\-:]/g,"");return{longDate:m,shortDate:m.slice(0,8)}},SignatureV4_getCanonicalHeaderList=_=>Object.keys(_).sort().join(";"),awsAuthConfiguration_resolveAwsAuthConfig=_=>{let m;let C=_.credentials?awsAuthConfiguration_normalizeCredentialProvider(_.credentials):_.credentialDefaultProvider(_),{signingEscapePath:R=!0,systemClockOffset:T=_.systemClockOffset||0,sha256:L}=_;return m=_.signer?(0,H.$)(_.signer):_.regionInfoProvider?()=>(0,H.$)(_.region)().then(async m=>[await _.regionInfoProvider(m,{useFipsEndpoint:await _.useFipsEndpoint(),useDualstackEndpoint:await _.useDualstackEndpoint()})||{},m]).then(([m,T])=>{let{signingRegion:U,signingService:F}=m;_.signingRegion=_.signingRegion||U||T,_.signingName=_.signingName||F||_.serviceId;let B={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},$=_.signerConstructor||dist_es_SignatureV4_SignatureV4;return new $(B)}):async m=>{m=Object.assign({},{name:"sigv4",signingName:_.signingName||_.defaultSigningName,signingRegion:await (0,H.$)(_.region)(),properties:{}},m);let T=m.signingRegion,U=m.signingName;_.signingRegion=_.signingRegion||T,_.signingName=_.signingName||U||_.serviceId;let F={..._,credentials:C,region:_.signingRegion,service:_.signingName,sha256:L,uriEscapePath:R},B=_.signerConstructor||dist_es_SignatureV4_SignatureV4;return new B(F)},{..._,systemClockOffset:T,signingEscapePath:R,credentials:C,signer:m}},awsAuthConfiguration_normalizeCredentialProvider=_=>"function"==typeof _?(0,F.H)(_,_=>void 0!==_.expiration&&_.expiration.getTime()-Date.now()<3e5,_=>void 0!==_.expiration):(0,H.$)(_),td="user-agent",tf="x-amz-user-agent",tp=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,th=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,user_agent_middleware_userAgentMiddleware=_=>(m,C)=>async T=>{let{request:L}=T;if(!R.aW.isInstance(L))return m(T);let{headers:U}=L,F=C?.userAgent?.map(user_agent_middleware_escapeUserAgent)||[],B=(await _.defaultUserAgentProvider()).map(user_agent_middleware_escapeUserAgent),$=_?.customUserAgent?.map(user_agent_middleware_escapeUserAgent)||[],H=(0,el.Qj)(),V=(H?[H]:[]).concat([...B,...F,...$]).join(" "),q=[...B.filter(_=>_.startsWith("aws-sdk-")),...$].join(" ");return"browser"!==_.runtime?(q&&(U[tf]=U[tf]?`${U[td]} ${q}`:q),U[td]=V):U[tf]=V,m({...T,request:L})},user_agent_middleware_escapeUserAgent=_=>{let m=_[0].split("/").map(_=>_.replace(tp,"-")).join("/"),C=_[1]?.replace(th,"-"),R=m.indexOf("/"),T=m.substring(0,R),L=m.substring(R+1);return"api"===T&&(L=L.toLowerCase()),[T,L,C].filter(_=>_&&_.length>0).reduce((_,m,C)=>{switch(C){case 0:return m;case 1:return`${_}/${m}`;default:return`${_}#${m}`}},"")},ty={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},user_agent_middleware_getUserAgentPlugin=_=>({applyToStack:m=>{m.add(user_agent_middleware_userAgentMiddleware(_),ty)}}),EndpointParameters_resolveClientEndpointParameters=_=>({..._,useDualstackEndpoint:_.useDualstackEndpoint??!1,useFipsEndpoint:_.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"});var tg={i8:"3.428.0"},t_=C(16037);let dist_es_defaultUserAgent=({serviceId:_,clientVersion:m})=>async()=>{let C="undefined"!=typeof window&&window?.navigator?.userAgent?eC().parse(window.navigator.userAgent):void 0,R=[["aws-sdk-js",m],["ua","2.0"],[`os/${C?.os?.name||"other"}`,C?.os?.version],["lang/js"],["md/browser",`${C?.browser?.name??"unknown"}_${C?.browser?.version??"unknown"}`]];return _&&R.push([`api/${_}`,m]),R},tm="required",tv="argv",tb="isSet",tw="tree",tS="error",tE="endpoint",tC="PartitionResult",tx={[tm]:!1,type:"String"},tP={[tm]:!0,default:!1,type:"Boolean"},tA={ref:"Endpoint"},tR={fn:"booleanEquals",[tv]:[{ref:"UseFIPS"},!0]},tO={fn:"booleanEquals",[tv]:[{ref:"UseDualStack"},!0]},tI={},tT={fn:"booleanEquals",[tv]:[!0,{fn:"getAttr",[tv]:[{ref:tC},"supportsFIPS"]}]},tk={fn:"booleanEquals",[tv]:[!0,{fn:"getAttr",[tv]:[{ref:tC},"supportsDualStack"]}]},tM=[tR],tj=[tO],tD=[{ref:"Region"}],tN={version:"1.0",parameters:{Region:tx,UseDualStack:tP,UseFIPS:tP,Endpoint:tx},rules:[{conditions:[{fn:tb,[tv]:[tA]}],type:tw,rules:[{conditions:tM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:tS},{conditions:tj,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:tS},{endpoint:{url:tA,properties:tI,headers:tI},type:tE}]},{conditions:[{fn:tb,[tv]:tD}],type:tw,rules:[{conditions:[{fn:"aws.partition",[tv]:tD,assign:tC}],type:tw,rules:[{conditions:[tR,tO],type:tw,rules:[{conditions:[tT,tk],type:tw,rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:tI,headers:tI},type:tE}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:tS}]},{conditions:tM,type:tw,rules:[{conditions:[tT],type:tw,rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:tI,headers:tI},type:tE}]},{error:"FIPS is enabled but this partition does not support FIPS",type:tS}]},{conditions:tj,type:tw,rules:[{conditions:[tk],type:tw,rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:tI,headers:tI},type:tE}]},{error:"DualStack is enabled but this partition does not support DualStack",type:tS}]},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:tI,headers:tI},type:tE}]}]},{error:"Invalid Configuration: Missing Region",type:tS}]},endpointResolver_defaultEndpointResolver=(_,m={})=>(0,el.B1)(tN,{endpointParams:_,logger:m.logger}),runtimeConfig_shared_getRuntimeConfig=_=>({apiVersion:"2016-04-18",base64Decoder:_?.base64Decoder??eI.G,base64Encoder:_?.base64Encoder??eI.s,disableHostPrefix:_?.disableHostPrefix??!1,endpointProvider:_?.endpointProvider??endpointResolver_defaultEndpointResolver,extensions:_?.extensions??[],logger:_?.logger??new eb.vk,serviceId:_?.serviceId??"Cognito Identity Provider",urlParser:_?.urlParser??eO.e,utf8Decoder:_?.utf8Decoder??q.$,utf8Encoder:_?.utf8Encoder??V.G}),dist_es_runtimeConfig_browser_getRuntimeConfig=_=>{let m=(0,eY.j)(_),defaultConfigProvider=()=>m().then(eb.jv),C=runtimeConfig_shared_getRuntimeConfig(_);return{...C,..._,runtime:"browser",defaultsMode:m,bodyLengthChecker:_?.bodyLengthChecker??eA.W,credentialDefaultProvider:_?.credentialDefaultProvider??(_=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:_?.defaultUserAgentProvider??dist_es_defaultUserAgent({serviceId:C.serviceId,clientVersion:tg.i8}),maxAttempts:_?.maxAttempts??eR.J,region:_?.region??(0,eP.n)("Region is missing"),requestHandler:_?.requestHandler??new ex.BX(defaultConfigProvider),retryMode:_?.retryMode??(async()=>(await defaultConfigProvider()).retryMode||eR.CA),sha256:_?.sha256??t_.Sha256,streamCollector:_?.streamCollector??ex.CF,useDualstackEndpoint:_?.useDualstackEndpoint??(()=>Promise.resolve(eg.JY)),useFipsEndpoint:_?.useFipsEndpoint??(()=>Promise.resolve(eg.Fh))}},runtimeExtensions_asPartial=_=>_,runtimeExtensions_resolveRuntimeExtensions=(_,m)=>{let C={...runtimeExtensions_asPartial((0,eJ.GW)(_)),...runtimeExtensions_asPartial((0,eb.kE)(_)),...runtimeExtensions_asPartial((0,R.cA)(_))};return m.forEach(_=>_.configure(C)),{..._,...(0,eJ.A1)(C),...(0,eb.SQ)(C),...(0,R.AO)(C)}};let CognitoIdentityProviderClient=class CognitoIdentityProviderClient extends eb.KU{constructor(...[_]){let m=dist_es_runtimeConfig_browser_getRuntimeConfig(_||{}),C=EndpointParameters_resolveClientEndpointParameters(m),R=(0,eg.Xb)(C),T=(0,em.uW)(R),L=(0,ev.BC)(T),F=awsAuthConfiguration_resolveAwsAuthConfig(L),B={...F,customUserAgent:"string"==typeof F.customUserAgent?[[F.customUserAgent]]:F.customUserAgent},$=runtimeExtensions_resolveRuntimeExtensions(B,_?.extensions||[]);super($),this.config=$,this.middlewareStack.use((0,ev.NQ)(this.config)),this.middlewareStack.use((0,e_.VG)(this.config)),this.middlewareStack.use(dist_es_getHostHeaderPlugin(this.config)),this.middlewareStack.use(loggerMiddleware_getLoggerPlugin(this.config)),this.middlewareStack.use((0,U.eV)(this.config)),this.middlewareStack.use(user_agent_middleware_getUserAgentPlugin(this.config))}destroy(){super.destroy()}};let CognitoIdentityProviderServiceException=class CognitoIdentityProviderServiceException extends eb.sI{constructor(_){super(_),Object.setPrototypeOf(this,CognitoIdentityProviderServiceException.prototype)}};let models_0_InternalErrorException=class models_0_InternalErrorException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InternalErrorException",$fault:"server",..._}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,models_0_InternalErrorException.prototype)}};let models_0_InvalidParameterException=class models_0_InvalidParameterException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidParameterException",$fault:"client",..._}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,models_0_InvalidParameterException.prototype)}};let models_0_NotAuthorizedException=class models_0_NotAuthorizedException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"NotAuthorizedException",$fault:"client",..._}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,models_0_NotAuthorizedException.prototype)}};let models_0_ResourceNotFoundException=class models_0_ResourceNotFoundException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"ResourceNotFoundException",$fault:"client",..._}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,models_0_ResourceNotFoundException.prototype)}};let models_0_TooManyRequestsException=class models_0_TooManyRequestsException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"TooManyRequestsException",$fault:"client",..._}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,models_0_TooManyRequestsException.prototype)}};let UserNotFoundException=class UserNotFoundException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"UserNotFoundException",$fault:"client",..._}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,UserNotFoundException.prototype)}};let InvalidLambdaResponseException=class InvalidLambdaResponseException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidLambdaResponseException",$fault:"client",..._}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,InvalidLambdaResponseException.prototype)}};let models_0_LimitExceededException=class models_0_LimitExceededException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"LimitExceededException",$fault:"client",..._}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,models_0_LimitExceededException.prototype)}};let TooManyFailedAttemptsException=class TooManyFailedAttemptsException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"TooManyFailedAttemptsException",$fault:"client",..._}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,TooManyFailedAttemptsException.prototype)}};let UnexpectedLambdaException=class UnexpectedLambdaException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"UnexpectedLambdaException",$fault:"client",..._}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,UnexpectedLambdaException.prototype)}};let UserLambdaValidationException=class UserLambdaValidationException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"UserLambdaValidationException",$fault:"client",..._}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,UserLambdaValidationException.prototype)}};let CodeDeliveryFailureException=class CodeDeliveryFailureException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"CodeDeliveryFailureException",$fault:"client",..._}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,CodeDeliveryFailureException.prototype)}};let InvalidPasswordException=class InvalidPasswordException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidPasswordException",$fault:"client",..._}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,InvalidPasswordException.prototype)}};let InvalidSmsRoleAccessPolicyException=class InvalidSmsRoleAccessPolicyException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",..._}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,InvalidSmsRoleAccessPolicyException.prototype)}};let InvalidSmsRoleTrustRelationshipException=class InvalidSmsRoleTrustRelationshipException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",..._}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,InvalidSmsRoleTrustRelationshipException.prototype)}};let UsernameExistsException=class UsernameExistsException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"UsernameExistsException",$fault:"client",..._}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,UsernameExistsException.prototype)}};let InvalidUserPoolConfigurationException=class InvalidUserPoolConfigurationException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidUserPoolConfigurationException",$fault:"client",..._}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,InvalidUserPoolConfigurationException.prototype)}};let PasswordResetRequiredException=class PasswordResetRequiredException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"PasswordResetRequiredException",$fault:"client",..._}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,PasswordResetRequiredException.prototype)}};let UserNotConfirmedException=class UserNotConfirmedException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"UserNotConfirmedException",$fault:"client",..._}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,UserNotConfirmedException.prototype)}};let InvalidEmailRoleAccessPolicyException=class InvalidEmailRoleAccessPolicyException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",..._}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,InvalidEmailRoleAccessPolicyException.prototype)}};let CodeMismatchException=class CodeMismatchException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"CodeMismatchException",$fault:"client",..._}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,CodeMismatchException.prototype)}};let ExpiredCodeException=class ExpiredCodeException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"ExpiredCodeException",$fault:"client",..._}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,ExpiredCodeException.prototype)}};let ForbiddenException=class ForbiddenException extends CognitoIdentityProviderServiceException{constructor(_){super({name:"ForbiddenException",$fault:"client",..._}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,ForbiddenException.prototype)}};let models_0_AttributeTypeFilterSensitiveLog=_=>({..._,..._.Value&&{Value:eb.oc}}),AuthenticationResultTypeFilterSensitiveLog=_=>({..._,..._.AccessToken&&{AccessToken:eb.oc},..._.RefreshToken&&{RefreshToken:eb.oc},..._.IdToken&&{IdToken:eb.oc}}),ChangePasswordRequestFilterSensitiveLog=_=>({..._,..._.PreviousPassword&&{PreviousPassword:eb.oc},..._.ProposedPassword&&{ProposedPassword:eb.oc},..._.AccessToken&&{AccessToken:eb.oc}}),ConfirmForgotPasswordRequestFilterSensitiveLog=_=>({..._,..._.ClientId&&{ClientId:eb.oc},..._.SecretHash&&{SecretHash:eb.oc},..._.Username&&{Username:eb.oc},..._.Password&&{Password:eb.oc},..._.UserContextData&&{UserContextData:eb.oc}}),DeleteUserRequestFilterSensitiveLog=_=>({..._,..._.AccessToken&&{AccessToken:eb.oc}}),ForgotPasswordRequestFilterSensitiveLog=_=>({..._,..._.ClientId&&{ClientId:eb.oc},..._.SecretHash&&{SecretHash:eb.oc},..._.UserContextData&&{UserContextData:eb.oc},..._.Username&&{Username:eb.oc}}),GetUserRequestFilterSensitiveLog=_=>({..._,..._.AccessToken&&{AccessToken:eb.oc}}),GetUserResponseFilterSensitiveLog=_=>({..._,..._.Username&&{Username:eb.oc},..._.UserAttributes&&{UserAttributes:_.UserAttributes.map(_=>models_0_AttributeTypeFilterSensitiveLog(_))}}),InitiateAuthRequestFilterSensitiveLog=_=>({..._,..._.AuthParameters&&{AuthParameters:eb.oc},..._.ClientId&&{ClientId:eb.oc},..._.UserContextData&&{UserContextData:eb.oc}}),InitiateAuthResponseFilterSensitiveLog=_=>({..._,..._.Session&&{Session:eb.oc},..._.AuthenticationResult&&{AuthenticationResult:AuthenticationResultTypeFilterSensitiveLog(_.AuthenticationResult)}}),ResendConfirmationCodeRequestFilterSensitiveLog=_=>({..._,..._.ClientId&&{ClientId:eb.oc},..._.SecretHash&&{SecretHash:eb.oc},..._.UserContextData&&{UserContextData:eb.oc},..._.Username&&{Username:eb.oc}}),SignUpRequestFilterSensitiveLog=_=>({..._,..._.ClientId&&{ClientId:eb.oc},..._.SecretHash&&{SecretHash:eb.oc},..._.Username&&{Username:eb.oc},..._.Password&&{Password:eb.oc},..._.UserAttributes&&{UserAttributes:_.UserAttributes.map(_=>models_0_AttributeTypeFilterSensitiveLog(_))},..._.ValidationData&&{ValidationData:_.ValidationData.map(_=>models_0_AttributeTypeFilterSensitiveLog(_))},..._.UserContextData&&{UserContextData:eb.oc}}),se_ChangePasswordCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("ChangePassword");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_ConfirmForgotPasswordCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("ConfirmForgotPassword");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_DeleteUserCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("DeleteUser");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_ForgotPasswordCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("ForgotPassword");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_GetUserCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("GetUser");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_InitiateAuthCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("InitiateAuth");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_ResendConfirmationCodeCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("ResendConfirmationCode");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},se_SignUpCommand=async(_,m)=>{let C=Aws_json1_1_sharedHeaders("SignUp");return Aws_json1_1_buildHttpRpcRequest(m,C,"/",void 0,JSON.stringify((0,eb.F3)(_)))},de_ChangePasswordCommand=async(_,m)=>{if(_.statusCode>=300)return de_ChangePasswordCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_ChangePasswordCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await de_InvalidPasswordExceptionRes(C,m);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Aws_json1_1_de_LimitExceededExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await de_PasswordResetRequiredExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await de_UserNotConfirmedExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_ConfirmForgotPasswordCommand=async(_,m)=>{if(_.statusCode>=300)return de_ConfirmForgotPasswordCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_ConfirmForgotPasswordCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await de_CodeMismatchExceptionRes(C,m);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await de_ExpiredCodeExceptionRes(C,m);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await de_InvalidLambdaResponseExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await de_InvalidPasswordExceptionRes(C,m);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Aws_json1_1_de_LimitExceededExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await de_TooManyFailedAttemptsExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await de_UnexpectedLambdaExceptionRes(C,m);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await de_UserLambdaValidationExceptionRes(C,m);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await de_UserNotConfirmedExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_DeleteUserCommand=async(_,m)=>{if(_.statusCode>=300)return de_DeleteUserCommandError(_,m);await (0,eb.Wg)(_.body,m);let C={$metadata:Aws_json1_1_deserializeMetadata(_)};return C},de_DeleteUserCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await de_PasswordResetRequiredExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await de_UserNotConfirmedExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_ForgotPasswordCommand=async(_,m)=>{if(_.statusCode>=300)return de_ForgotPasswordCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_ForgotPasswordCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await de_CodeDeliveryFailureExceptionRes(C,m);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await de_InvalidEmailRoleAccessPolicyExceptionRes(C,m);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await de_InvalidLambdaResponseExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await de_InvalidSmsRoleAccessPolicyExceptionRes(C,m);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await de_InvalidSmsRoleTrustRelationshipExceptionRes(C,m);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Aws_json1_1_de_LimitExceededExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await de_UnexpectedLambdaExceptionRes(C,m);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await de_UserLambdaValidationExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_GetUserCommand=async(_,m)=>{if(_.statusCode>=300)return de_GetUserCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_GetUserCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await de_PasswordResetRequiredExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await de_UserNotConfirmedExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_InitiateAuthCommand=async(_,m)=>{if(_.statusCode>=300)return de_InitiateAuthCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_InitiateAuthCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await de_InvalidLambdaResponseExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await de_InvalidSmsRoleAccessPolicyExceptionRes(C,m);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await de_InvalidSmsRoleTrustRelationshipExceptionRes(C,m);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await de_InvalidUserPoolConfigurationExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await de_PasswordResetRequiredExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await de_UnexpectedLambdaExceptionRes(C,m);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await de_UserLambdaValidationExceptionRes(C,m);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await de_UserNotConfirmedExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_ResendConfirmationCodeCommand=async(_,m)=>{if(_.statusCode>=300)return de_ResendConfirmationCodeCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_ResendConfirmationCodeCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await de_CodeDeliveryFailureExceptionRes(C,m);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await de_InvalidEmailRoleAccessPolicyExceptionRes(C,m);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await de_InvalidLambdaResponseExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await de_InvalidSmsRoleAccessPolicyExceptionRes(C,m);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await de_InvalidSmsRoleTrustRelationshipExceptionRes(C,m);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await Aws_json1_1_de_LimitExceededExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await de_UnexpectedLambdaExceptionRes(C,m);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await de_UserLambdaValidationExceptionRes(C,m);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await de_UserNotFoundExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_SignUpCommand=async(_,m)=>{if(_.statusCode>=300)return de_SignUpCommandError(_,m);let C=await Aws_json1_1_parseBody(_.body,m),R={};R=(0,eb.F3)(C);let T={$metadata:Aws_json1_1_deserializeMetadata(_),...R};return T},de_SignUpCommandError=async(_,m)=>{let C={..._,body:await Aws_json1_1_parseErrorBody(_.body,m)},R=Aws_json1_1_loadRestJsonErrorCode(_,C.body);switch(R){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await de_CodeDeliveryFailureExceptionRes(C,m);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await de_ForbiddenExceptionRes(C,m);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await Aws_json1_1_de_InternalErrorExceptionRes(C,m);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await de_InvalidEmailRoleAccessPolicyExceptionRes(C,m);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await de_InvalidLambdaResponseExceptionRes(C,m);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await Aws_json1_1_de_InvalidParameterExceptionRes(C,m);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await de_InvalidPasswordExceptionRes(C,m);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await de_InvalidSmsRoleAccessPolicyExceptionRes(C,m);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await de_InvalidSmsRoleTrustRelationshipExceptionRes(C,m);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await Aws_json1_1_de_NotAuthorizedExceptionRes(C,m);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await Aws_json1_1_de_ResourceNotFoundExceptionRes(C,m);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await Aws_json1_1_de_TooManyRequestsExceptionRes(C,m);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await de_UnexpectedLambdaExceptionRes(C,m);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await de_UserLambdaValidationExceptionRes(C,m);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await de_UsernameExistsExceptionRes(C,m);default:let T=C.body;return tL({output:_,parsedBody:T,errorCode:R})}},de_CodeDeliveryFailureExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new CodeDeliveryFailureException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_CodeMismatchExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new CodeMismatchException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_ExpiredCodeExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new ExpiredCodeException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_ForbiddenExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new ForbiddenException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_InternalErrorExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_InternalErrorException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidEmailRoleAccessPolicyExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidEmailRoleAccessPolicyException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidLambdaResponseExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidLambdaResponseException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_InvalidParameterExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_InvalidParameterException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidPasswordExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidPasswordException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidSmsRoleAccessPolicyExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidSmsRoleAccessPolicyException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidSmsRoleTrustRelationshipExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidSmsRoleTrustRelationshipException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_InvalidUserPoolConfigurationExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new InvalidUserPoolConfigurationException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_LimitExceededExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_LimitExceededException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_NotAuthorizedExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_NotAuthorizedException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_PasswordResetRequiredExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new PasswordResetRequiredException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_ResourceNotFoundExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_ResourceNotFoundException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_TooManyFailedAttemptsExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new TooManyFailedAttemptsException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_de_TooManyRequestsExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new models_0_TooManyRequestsException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_UnexpectedLambdaExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new UnexpectedLambdaException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_UserLambdaValidationExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new UserLambdaValidationException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_UsernameExistsExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new UsernameExistsException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_UserNotConfirmedExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new UserNotConfirmedException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},de_UserNotFoundExceptionRes=async(_,m)=>{let C=_.body,R=(0,eb.F3)(C),T=new UserNotFoundException({$metadata:Aws_json1_1_deserializeMetadata(_),...R});return(0,eb.to)(T,C)},Aws_json1_1_deserializeMetadata=_=>({httpStatusCode:_.statusCode,requestId:_.headers["x-amzn-requestid"]??_.headers["x-amzn-request-id"]??_.headers["x-amz-request-id"],extendedRequestId:_.headers["x-amz-id-2"],cfId:_.headers["x-amz-cf-id"]}),Aws_json1_1_collectBodyString=(_,m)=>(0,eb.Wg)(_,m).then(_=>m.utf8Encoder(_)),tL=(0,eb.PC)(CognitoIdentityProviderServiceException),Aws_json1_1_buildHttpRpcRequest=async(_,m,C,T,L)=>{let{hostname:U,protocol:F="https",port:B,path:$}=await _.endpoint(),H={protocol:F,hostname:U,port:B,method:"POST",path:$.endsWith("/")?$.slice(0,-1)+C:$+C,headers:m};return void 0!==T&&(H.hostname=T),void 0!==L&&(H.body=L),new R.aW(H)};function Aws_json1_1_sharedHeaders(_){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${_}`}}let Aws_json1_1_parseBody=(_,m)=>Aws_json1_1_collectBodyString(_,m).then(_=>_.length?JSON.parse(_):{}),Aws_json1_1_parseErrorBody=async(_,m)=>{let C=await Aws_json1_1_parseBody(_,m);return C.message=C.message??C.Message,C},Aws_json1_1_loadRestJsonErrorCode=(_,m)=>{let sanitizeErrorCode=_=>{let m=_;return"number"==typeof m&&(m=m.toString()),m.indexOf(",")>=0&&(m=m.split(",")[0]),m.indexOf(":")>=0&&(m=m.split(":")[0]),m.indexOf("#")>=0&&(m=m.split("#")[1]),m},C=Object.keys(_.headers).find(_=>"x-amzn-errortype"===_.toLowerCase());return void 0!==C?sanitizeErrorCode(_.headers[C]):void 0!==m.code?sanitizeErrorCode(m.code):void 0!==m.__type?sanitizeErrorCode(m.__type):void 0};let SignUpCommand=class SignUpCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,SignUpCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"SignUpCommand",inputFilterSensitiveLog:SignUpRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"SignUp"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_SignUpCommand(_,m)}deserialize(_,m){return de_SignUpCommand(_,m)}};let ResendConfirmationCodeCommand=class ResendConfirmationCodeCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,ResendConfirmationCodeCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"ResendConfirmationCodeCommand",inputFilterSensitiveLog:ResendConfirmationCodeRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"ResendConfirmationCode"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_ResendConfirmationCodeCommand(_,m)}deserialize(_,m){return de_ResendConfirmationCodeCommand(_,m)}};let InitiateAuthCommand=class InitiateAuthCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,InitiateAuthCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"InitiateAuthCommand",inputFilterSensitiveLog:InitiateAuthRequestFilterSensitiveLog,outputFilterSensitiveLog:InitiateAuthResponseFilterSensitiveLog,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"InitiateAuth"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_InitiateAuthCommand(_,m)}deserialize(_,m){return de_InitiateAuthCommand(_,m)}};let GetUserCommand=class GetUserCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,GetUserCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"GetUserCommand",inputFilterSensitiveLog:GetUserRequestFilterSensitiveLog,outputFilterSensitiveLog:GetUserResponseFilterSensitiveLog,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"GetUser"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_GetUserCommand(_,m)}deserialize(_,m){return de_GetUserCommand(_,m)}};let ChangePasswordCommand=class ChangePasswordCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,ChangePasswordCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"ChangePasswordCommand",inputFilterSensitiveLog:ChangePasswordRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"ChangePassword"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_ChangePasswordCommand(_,m)}deserialize(_,m){return de_ChangePasswordCommand(_,m)}};let ForgotPasswordCommand=class ForgotPasswordCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,ForgotPasswordCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"ForgotPasswordCommand",inputFilterSensitiveLog:ForgotPasswordRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"ForgotPassword"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_ForgotPasswordCommand(_,m)}deserialize(_,m){return de_ForgotPasswordCommand(_,m)}};let ConfirmForgotPasswordCommand=class ConfirmForgotPasswordCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,ConfirmForgotPasswordCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"ConfirmForgotPasswordCommand",inputFilterSensitiveLog:ConfirmForgotPasswordRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"ConfirmForgotPassword"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_ConfirmForgotPasswordCommand(_,m)}deserialize(_,m){return de_ConfirmForgotPasswordCommand(_,m)}};let DeleteUserCommand=class DeleteUserCommand extends eb.mY{static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}constructor(_){super(),this.input=_}resolveMiddleware(_,m,C){this.middlewareStack.use((0,eQ.p2)(m,this.serialize,this.deserialize)),this.middlewareStack.use((0,em.a3)(m,DeleteUserCommand.getEndpointParameterInstructions()));let R=_.concat(this.middlewareStack),{logger:T}=m,L={logger:T,clientName:"CognitoIdentityProviderClient",commandName:"DeleteUserCommand",inputFilterSensitiveLog:DeleteUserRequestFilterSensitiveLog,outputFilterSensitiveLog:_=>_,[eX.zK]:{service:"AWSCognitoIdentityProviderService",operation:"DeleteUser"}},{requestHandler:U}=m;return R.resolve(_=>U.handle(_.request,C||{}),L)}serialize(_,m){return se_DeleteUserCommand(_,m)}deserialize(_,m){return de_DeleteUserCommand(_,m)}};var tU=C(47669),tF=C(13594),tB=C(39518),t$=C(30490);let tz="us-east-1",tH=new CognitoIdentityProviderClient({region:tz}),tV="5a3smtdfrf4pu8vt60f5c7ohh5";function signUp(_,m,C){return tF.ZP.log("SkellyAuth.signUp(username: ".concat(_,", password: *****): Called")),(0,tB.f)("event","skelly_sign_up"),new Promise((R,T)=>{let L={ClientId:tV,Username:_,Password:m,UserAttributes:[{Name:"email",Value:_}]};void 0!==C&&L.UserAttributes.push({Name:"locale",Value:C});let U=new SignUpCommand(L);tH.send(U).then(_=>{tF.ZP.log("SkellyAuth.signUp(): Success response:"),console.log(_),(0,tB.f)("event","skelly_sign_up_success",{skelly_event_label:_.UserSub}),R(_.UserSub)}).catch(_=>{tF.ZP.log("SkellyAuth.signUp(): Error"),tF.ZP.log(_),(0,tB.f)("event","skelly_sign_up_error"),T(transformExceptions(_))})})}function resendConfirmationCode(_){return(0,tB.f)("event","skelly_resend_link"),new Promise((m,C)=>{let R=new ResendConfirmationCodeCommand({ClientId:tV,Username:_});tH.send(R).then(_=>{tF.ZP.log("SkellyAuth.resendConfirmationCode(): Response: ",_),m()}).catch(_=>{tF.ZP.log("SkellyAuth.resendConfirmationCode(): Error"),tF.ZP.log(_),C(transformExceptions(_))})})}async function logIn(_,m){tF.ZP.log("SkellyAuth.logIn(): Called"),(0,tB.f)("event","skelly_log_in");try{let C=Math.floor(new Date().getTime()/1e3),R=await (tF.ZP.log("SkellyAuth.logIn(username: ".concat(_,"): Called")),new Promise((C,R)=>{let T=new InitiateAuthCommand({ClientId:tV,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:{USERNAME:_,PASSWORD:m}});tH.send(T).then(_=>{tF.ZP.log("SkellyAuth.logIn(): Success"),C(_)}).catch(_=>{tF.ZP.log("SkellyAuth.logIn(): Error"),tF.ZP.log(_),R(transformExceptions(_))})})),T=await getUser(R.AuthenticationResult.AccessToken),L=globalThis.skelly.reduxStore.dispatch;L((0,tU.Dj)(void 0));let U=C+(R.AuthenticationResult.ExpiresIn||0);L((0,tU.d0)({accessToken:R.AuthenticationResult.AccessToken,validUntil:U,refreshToken:R.AuthenticationResult.RefreshToken,idToken:R.AuthenticationResult.IdToken})),L((0,tU.b6)(_)),L((0,tU.vV)(T.email)),L((0,tU.Fu)(T.emailVerified)),L((0,tU.JF)(T.friendId)),L((0,tU.i_)(T.locale)),"web"!==t$.N&&L((0,tU.av)(tU.zZ.ClosingApolloClientPublicLocal))}catch(_){throw tF.ZP.error("SkellyAuth.logIn(): Error: ".concat(_)),_}}async function getUser(_){return tF.ZP.log("SkellyAuth.getUser(): Called"),new Promise((m,C)=>{let R=new GetUserCommand({AccessToken:_});tH.send(R).then(_=>{tF.ZP.log("SkellyAuth.getUser(): Request was successful");let C={};for(let m of _.UserAttributes||[])switch(m.Name){case"email":C.email=m.Value;break;case"email_verified":void 0!==m.Value&&(C.emailVerified="true"===m.Value);break;case"custom:friend_id":C.friendId=m.Value;break;case"locale":C.locale=m.Value}m(C)}).catch(_=>{tF.ZP.log("SkellyAuth.getUser(): Error"),console.log(_),C(transformExceptions(_))})})}async function getIdToken(){tF.ZP.log("SkellyAuth.getIdToken(): Called");let _=globalThis.skelly.reduxStore.getState(),m=_.account.validUntil;if(void 0!==m&&isValid(m)){let m=_.account.idToken;return m}return void 0===m?tF.ZP.log("SkellyAuth.getIdToken(): No id token is available"):tF.ZP.log("SkellyAuth.getIdToken(): Id token is no longer valid"),(await refreshTokens()).IdToken}async function getAccessToken(){let _=globalThis.skelly.reduxStore.getState();if(!_.account.accessToken)return;let m=_.account.validUntil;return m&&isValid(m)?(tF.ZP.log("SkellyAuth.getAccessToken(): Access token still valid"),_.account.accessToken):(await refreshTokens()).AccessToken}async function getCredentials(){let _=globalThis.skelly.reduxStore.getState(),m=_.account.credentials;if((null==m?void 0:m.expiration)&&isValid(m.expiration))return tF.ZP.log("SkellyAuth.getCredentials(): Returning cached credentials "),{...m,expiration:new Date(m.expiration)};tF.ZP.log("SkellyAuth.getCredentials(): No valid credentials available");let C={clientConfig:{region:tz},identityPoolId:"us-east-1:09c55ee1-9425-4cdd-bf92-0fc693a6ec1f"},R=_.account.idToken;R?(tF.ZP.log("SkellyAuth.getCredentials(): User is logged in (idToken was available)"),C.logins={"cognito-idp.us-east-1.amazonaws.com/us-east-1_BYQjgcNo3":R}):tF.ZP.log("SkellyAuth.getCredentials(): No user is logged in"),tF.ZP.log("SkellyAuth.getCredentials(): Calling fromCognitoIdentityPool");let T=await fromCognitoIdentityPool_fromCognitoIdentityPool(C)();tF.ZP.log("SkellyAuth.getCredentials(): fromCognitoIdentityPool returned credentials");let L=globalThis.skelly.reduxStore.dispatch;return L((0,tU.Dj)({...T,expiration:T.expiration?T.expiration.getTime()/1e3:void 0})),T}async function changePassword(_,m,C){return(0,tB.f)("event","skelly_change_password"),new Promise((R,T)=>{let L=new ChangePasswordCommand({AccessToken:_,PreviousPassword:m,ProposedPassword:C});tH.send(L).then(_=>{R()}).catch(_=>{tF.ZP.log("SkellyAuth.changePassword(): Error"),tF.ZP.log(_),T(transformExceptions(_))})})}function forgotPassword(_){return(0,tB.f)("event","skelly_forgot_password"),new Promise((m,C)=>{let R=new ForgotPasswordCommand({ClientId:tV,Username:_});tH.send(R).then(_=>{tF.ZP.log("SkellyAuth.forgotPassword(): Success. Response: ".concat(JSON.stringify(_))),m()}).catch(_=>{tF.ZP.log("SkellyAuth.forgotPassword(): Error"),tF.ZP.log(_),C(transformExceptions(_))})})}function resetPassword(_,m,C){return new Promise((R,T)=>{let L=new ConfirmForgotPasswordCommand({ClientId:tV,Username:_,ConfirmationCode:m,Password:C});tH.send(L).then(_=>{tF.ZP.log("SkellyAuth.resetPassword(): Success. Response:"),console.log(_),R()}).catch(_=>{tF.ZP.log("SkellyAuth.resetPassword(): Error"),tF.ZP.log(_),T(transformExceptions(_))})})}function isValid(_){if(void 0===_)throw"InvalidFunctionCall";let m=Math.round(new Date().getTime()/1e3);return _-60>m}async function refreshTokens(){let _;tF.ZP.log("SkellyAuth.refreshTokens(): Called");let m=globalThis.skelly.reduxStore.getState(),C=m.account.refreshToken;if(!C)throw"UserNotLoggedIn";let R=new InitiateAuthCommand({ClientId:tV,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:{REFRESH_TOKEN:C}}),T=Math.floor(new Date().getTime()/1e3);try{_=await tH.send(R)}catch(_){throw tF.ZP.error("refreshing token failed"),console.error(_.stack),console.error(_),_}let L=T+(_.AuthenticationResult.ExpiresIn||0),U=globalThis.skelly.reduxStore.dispatch;return U((0,tU.d0)({accessToken:_.AuthenticationResult.AccessToken,validUntil:L,refreshToken:_.AuthenticationResult.RefreshToken,idToken:_.AuthenticationResult.IdToken})),tF.ZP.log("SkellyAuth.refreshToken(): Successfully completed"),_.AuthenticationResult}async function deleteUser(_){return(0,tB.f)("event","skelly_delete_account"),new Promise((m,C)=>{let R=new DeleteUserCommand({AccessToken:_});tH.send(R).then(_=>{tF.ZP.log("SkellyAuth.deleteUser(): Success."),m()}).catch(_=>{tF.ZP.log("SkellyAuth.deleteUser(): Error"),tF.ZP.log(_),C(transformExceptions(_))})})}async function logOut(){tF.ZP.log("SkellyAuth.logOut(): Called"),(0,tB.f)("event","skelly_log_out");let _=globalThis.skelly.reduxStore.dispatch;_((0,tU.av)(tU.zZ.ClosingApolloClientPrivate))}function transformExceptions(_){if(_ instanceof models_0_NotAuthorizedException){if(_.message&&"Incorrect username or password."===_.message)return"IncorrectUsernameOrPassword"}else if(_ instanceof models_0_InvalidParameterException)switch(_.message){case"Missing required parameter PASSWORD":return"MissingPassword";case"Missing required parameter USERNAME":return"MissingUsername";case"Invalid email address format.":return"InvalidEmailAddress"}else if(_ instanceof InvalidPasswordException){if(_.message&&("Password does not conform to policy: Password not long enough"===_.message||"Password did not conform with policy: Password not long enough"===_.message||"Password does not conform to policy: Password must have lowercase characters"===_.message||"Password did not conform with policy: Password must have lowercase characters"===_.message||"Password does not conform to policy: Password must have numeric characters"===_.message||"Password does not conform to policy: Password must have uppercase characters"===_.message||"Password did not conform with policy: Password must have uppercase characters"===_.message))return"PasswordNotPolicyConform"}else if(_ instanceof CodeMismatchException){if(_.message&&"Invalid verification code provided, please try again."===_.message)return"InvalidVerificationCode"}else if(_ instanceof models_0_LimitExceededException){if(_.message&&"Attempt limit exceeded, please try after some time."===_.message)return"AttemptLimitExceeded"}else if(_ instanceof UsernameExistsException){if(_.message&&"User already exists"===_.message)return"UserAlreadyExists"}else if(_ instanceof UserNotConfirmedException)return"UserNotYetConfirmed";return void 0!==_.message?_.message:_.toString()}},55303:function(){},9008:function(_,m,C){_.exports=C(34605)},34155:function(_){var m,C,R,T=_.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(_){if(m===setTimeout)return setTimeout(_,0);if((m===defaultSetTimout||!m)&&setTimeout)return m=setTimeout,setTimeout(_,0);try{return m(_,0)}catch(C){try{return m.call(null,_,0)}catch(C){return m.call(this,_,0)}}}!function(){try{m="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(_){m=defaultSetTimout}try{C="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(_){C=defaultClearTimeout}}();var L=[],U=!1,F=-1;function cleanUpNextTick(){U&&R&&(U=!1,R.length?L=R.concat(L):F=-1,L.length&&drainQueue())}function drainQueue(){if(!U){var _=runTimeout(cleanUpNextTick);U=!0;for(var m=L.length;m;){for(R=L,L=[];++F1)for(var C=1;C_.loc).filter(_=>null!=_));this.source=null!=B?B:null==G?void 0:null===(L=G[0])||void 0===L?void 0:L.source,this.positions=null!=$?$:null==G?void 0:G.map(_=>_.start),this.locations=$&&B?$.map(_=>(0,T.k)(B,_)):null==G?void 0:G.map(_=>(0,T.k)(_.source,_.start));let K=(0,R.y)(null==V?void 0:V.extensions)?null==V?void 0:V.extensions:void 0;this.extensions=null!==(U=null!=q?q:K)&&void 0!==U?U:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=V&&V.stack?Object.defineProperty(this,"stack",{value:V.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,GraphQLError):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let _=this.message;if(this.nodes)for(let m of this.nodes)m.loc&&(_+="\n\n"+(0,L.Q)(m.loc));else if(this.source&&this.locations)for(let m of this.locations)_+="\n\n"+(0,L.z)(this.source,m);return _}toJSON(){let _={message:this.message};return null!=this.locations&&(_.locations=this.locations),null!=this.path&&(_.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(_.extensions=this.extensions),_}};function undefinedIfEmpty(_){return void 0===_||0===_.length?void 0:_}function printError(_){return _.toString()}function formatError(_){return _.toJSON()}},45219:function(_,m,C){"use strict";C.d(m,{h:function(){return syntaxError}});var R=C(28087);function syntaxError(_,m,C){return new R.__(`Syntax Error: ${C}`,{source:_,positions:[m]})}},37826:function(_,m,C){"use strict";function devAssert(_,m){if(!_)throw Error(m)}C.d(m,{a:function(){return devAssert}})},25821:function(_,m,C){"use strict";function inspect(_){return function formatValue(_,m){switch(typeof _){case"string":return JSON.stringify(_);case"function":return _.name?`[function ${_.name}]`:"[function]";case"object":return function(_,m){if(null===_)return"null";if(m.includes(_))return"[Circular]";let C=[...m,_];if("function"==typeof _.toJSON){let m=_.toJSON();if(m!==_)return"string"==typeof m?m:formatValue(m,C)}else if(Array.isArray(_))return function(_,m){if(0===_.length)return"[]";if(m.length>2)return"[Array]";let C=Math.min(10,_.length),R=_.length-C,T=[];for(let R=0;R1&&T.push(`... ${R} more items`),"["+T.join(", ")+"]"}(_,C);return function(_,m){let C=Object.entries(_);if(0===C.length)return"{}";if(m.length>2)return"["+function(_){let m=Object.prototype.toString.call(_).replace(/^\[object /,"").replace(/]$/,"");if("Object"===m&&"function"==typeof _.constructor){let m=_.constructor.name;if("string"==typeof m&&""!==m)return m}return m}(_)+"]";let R=C.map(([_,C])=>_+": "+formatValue(C,m));return"{ "+R.join(", ")+" }"}(_,C)}(_,m);default:return String(_)}}(_,[])}C.d(m,{X:function(){return inspect}})},8306:function(_,m,C){"use strict";C.d(m,{n:function(){return T}});var R=C(25821);let T=globalThis.process&&"production"===globalThis.process.env.NODE_ENV?function(_,m){return _ instanceof m}:function(_,m){if(_ instanceof m)return!0;if("object"==typeof _&&null!==_){var C;let T=m.prototype[Symbol.toStringTag],L=Symbol.toStringTag in _?_[Symbol.toStringTag]:null===(C=_.constructor)||void 0===C?void 0:C.name;if(T===L){let m=(0,R.X)(_);throw Error(`Cannot use ${T} "${m}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`)}}return!1}},29551:function(_,m,C){"use strict";function invariant(_,m){if(!_)throw Error(null!=m?m:"Unexpected invariant triggered.")}C.d(m,{k:function(){return invariant}})},88495:function(_,m,C){"use strict";function isObjectLike(_){return"object"==typeof _&&null!==_}C.d(m,{y:function(){return isObjectLike}})},72380:function(_,m,C){"use strict";var R,T;C.d(m,{UG:function(){return isNode},WU:function(){return Token},Ye:function(){return Location},h8:function(){return L},ku:function(){return R}});let Location=class Location{constructor(_,m,C){this.start=_.start,this.end=m.end,this.startToken=_,this.endToken=m,this.source=C}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};let Token=class Token{constructor(_,m,C,R,T,L){this.kind=_,this.start=m,this.end=C,this.line=R,this.column=T,this.value=L,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};let L={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},U=new Set(Object.keys(L));function isNode(_){let m=null==_?void 0:_.kind;return"string"==typeof m&&U.has(m)}(T=R||(R={})).QUERY="query",T.MUTATION="mutation",T.SUBSCRIPTION="subscription"},87392:function(_,m,C){"use strict";C.d(m,{LZ:function(){return printBlockString},MZ:function(){return isPrintableAsBlockString},wv:function(){return dedentBlockStringLines}});var R=C(68297);function dedentBlockStringLines(_){var m,C;let T=Number.MAX_SAFE_INTEGER,L=null,U=-1;for(let m=0;m<_.length;++m){let F=_[m],B=function(_){let m=0;for(;m<_.length&&(0,R.FD)(_.charCodeAt(m));)++m;return m}(F);B!==F.length&&(L=null!==(C=L)&&void 0!==C?C:m,U=m,0!==m&&B0===m?_:_.slice(T)).slice(null!==(m=L)&&void 0!==m?m:0,U+1)}function isPrintableAsBlockString(_){if(""===_)return!0;let m=!0,C=!1,R=!0,T=!1;for(let L=0;L<_.length;++L)switch(_.codePointAt(L)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:case 13:return!1;case 10:if(m&&!T)return!1;T=!0,m=!0,C=!1;break;case 9:case 32:C||(C=m);break;default:R&&(R=C),m=!1}return!m&&(!R||!T)}function printBlockString(_,m){let C=_.replace(/"""/g,'\\"""'),T=C.split(/\r\n|[\n\r]/g),L=1===T.length,U=T.length>1&&T.slice(1).every(_=>0===_.length||(0,R.FD)(_.charCodeAt(0))),F=C.endsWith('\\"""'),B=_.endsWith('"')&&!F,$=_.endsWith("\\"),H=B||$,V=!(null!=m&&m.minimize)&&(!L||_.length>70||H||U||F),q="",G=L&&(0,R.FD)(_.charCodeAt(0));return(V&&!G||U)&&(q+="\n"),q+=C,(V||H)&&(q+="\n"),'"""'+q+'"""'}},68297:function(_,m,C){"use strict";function isWhiteSpace(_){return 9===_||32===_}function isDigit(_){return _>=48&&_<=57}function isLetter(_){return _>=97&&_<=122||_>=65&&_<=90}function isNameStart(_){return isLetter(_)||95===_}function isNameContinue(_){return isLetter(_)||isDigit(_)||95===_}C.d(m,{FD:function(){return isWhiteSpace},HQ:function(){return isNameContinue},LQ:function(){return isNameStart},X1:function(){return isDigit}})},99878:function(_,m,C){"use strict";var R,T;C.d(m,{B:function(){return R}}),(T=R||(R={})).QUERY="QUERY",T.MUTATION="MUTATION",T.SUBSCRIPTION="SUBSCRIPTION",T.FIELD="FIELD",T.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",T.FRAGMENT_SPREAD="FRAGMENT_SPREAD",T.INLINE_FRAGMENT="INLINE_FRAGMENT",T.VARIABLE_DEFINITION="VARIABLE_DEFINITION",T.SCHEMA="SCHEMA",T.SCALAR="SCALAR",T.OBJECT="OBJECT",T.FIELD_DEFINITION="FIELD_DEFINITION",T.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",T.INTERFACE="INTERFACE",T.UNION="UNION",T.ENUM="ENUM",T.ENUM_VALUE="ENUM_VALUE",T.INPUT_OBJECT="INPUT_OBJECT",T.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"},97359:function(_,m,C){"use strict";var R,T;C.d(m,{h:function(){return R}}),(T=R||(R={})).NAME="Name",T.DOCUMENT="Document",T.OPERATION_DEFINITION="OperationDefinition",T.VARIABLE_DEFINITION="VariableDefinition",T.SELECTION_SET="SelectionSet",T.FIELD="Field",T.ARGUMENT="Argument",T.FRAGMENT_SPREAD="FragmentSpread",T.INLINE_FRAGMENT="InlineFragment",T.FRAGMENT_DEFINITION="FragmentDefinition",T.VARIABLE="Variable",T.INT="IntValue",T.FLOAT="FloatValue",T.STRING="StringValue",T.BOOLEAN="BooleanValue",T.NULL="NullValue",T.ENUM="EnumValue",T.LIST="ListValue",T.OBJECT="ObjectValue",T.OBJECT_FIELD="ObjectField",T.DIRECTIVE="Directive",T.NAMED_TYPE="NamedType",T.LIST_TYPE="ListType",T.NON_NULL_TYPE="NonNullType",T.SCHEMA_DEFINITION="SchemaDefinition",T.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",T.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",T.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",T.FIELD_DEFINITION="FieldDefinition",T.INPUT_VALUE_DEFINITION="InputValueDefinition",T.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",T.UNION_TYPE_DEFINITION="UnionTypeDefinition",T.ENUM_TYPE_DEFINITION="EnumTypeDefinition",T.ENUM_VALUE_DEFINITION="EnumValueDefinition",T.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",T.DIRECTIVE_DEFINITION="DirectiveDefinition",T.SCHEMA_EXTENSION="SchemaExtension",T.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",T.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",T.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",T.UNION_TYPE_EXTENSION="UnionTypeExtension",T.ENUM_TYPE_EXTENSION="EnumTypeExtension",T.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"},92105:function(_,m,C){"use strict";C.d(m,{h:function(){return Lexer},u:function(){return isPunctuatorTokenKind}});var R=C(45219),T=C(72380),L=C(87392),U=C(68297),F=C(74635);let Lexer=class Lexer{constructor(_){let m=new T.WU(F.T.SOF,0,0,0,0);this.source=_,this.lastToken=m,this.token=m,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;let _=this.token=this.lookahead();return _}lookahead(){let _=this.token;if(_.kind!==F.T.EOF)do if(_.next)_=_.next;else{let m=function(_,m){let C=_.source.body,T=C.length,B=m;for(;B=0&&_<=55295||_>=57344&&_<=1114111}function isSupplementaryCodePoint(_,m){return isLeadingSurrogate(_.charCodeAt(m))&&isTrailingSurrogate(_.charCodeAt(m+1))}function isLeadingSurrogate(_){return _>=55296&&_<=56319}function isTrailingSurrogate(_){return _>=56320&&_<=57343}function printCodePointAt(_,m){let C=_.source.body.codePointAt(m);if(void 0===C)return F.T.EOF;if(C>=32&&C<=126){let _=String.fromCodePoint(C);return'"'===_?"'\"'":`"${_}"`}return"U+"+C.toString(16).toUpperCase().padStart(4,"0")}function createToken(_,m,C,R,L){let U=_.line,F=1+C-_.lineStart;return new T.WU(m,C,R,U,F,L)}function readDigits(_,m,C){if(!(0,U.X1)(C))throw(0,R.h)(_.source,m,`Invalid number, expected digit but got: ${printCodePointAt(_,m)}.`);let T=_.source.body,L=m+1;for(;(0,U.X1)(T.charCodeAt(L));)++L;return L}function read16BitHexCode(_,m){return readHexDigit(_.charCodeAt(m))<<12|readHexDigit(_.charCodeAt(m+1))<<8|readHexDigit(_.charCodeAt(m+2))<<4|readHexDigit(_.charCodeAt(m+3))}function readHexDigit(_){return _>=48&&_<=57?_-48:_>=65&&_<=70?_-55:_>=97&&_<=102?_-87:-1}},57867:function(_,m,C){"use strict";C.d(m,{k:function(){return getLocation}});var R=C(29551);let T=/\r\n|[\n\r]/g;function getLocation(_,m){let C=0,L=1;for(let U of _.body.matchAll(T)){if("number"==typeof U.index||(0,R.k)(!1),U.index>=m)break;C=U.index+U[0].length,L+=1}return{line:L,column:m+1-C}}},84275:function(_,m,C){"use strict";C.d(m,{H2:function(){return parseValue},Qc:function(){return parse},gZ:function(){return parseType},tl:function(){return parseConstValue}});var R=C(45219),T=C(72380),L=C(99878),U=C(97359),F=C(92105),B=C(7926),$=C(74635);function parse(_,m){let C=new Parser(_,m);return C.parseDocument()}function parseValue(_,m){let C=new Parser(_,m);C.expectToken($.T.SOF);let R=C.parseValueLiteral(!1);return C.expectToken($.T.EOF),R}function parseConstValue(_,m){let C=new Parser(_,m);C.expectToken($.T.SOF);let R=C.parseConstValueLiteral();return C.expectToken($.T.EOF),R}function parseType(_,m){let C=new Parser(_,m);C.expectToken($.T.SOF);let R=C.parseTypeReference();return C.expectToken($.T.EOF),R}let Parser=class Parser{constructor(_,m={}){let C=(0,B.T)(_)?_:new B.H(_);this._lexer=new F.h(C),this._options=m,this._tokenCounter=0}parseName(){let _=this.expectToken($.T.NAME);return this.node(_,{kind:U.h.NAME,value:_.value})}parseDocument(){return this.node(this._lexer.token,{kind:U.h.DOCUMENT,definitions:this.many($.T.SOF,this.parseDefinition,$.T.EOF)})}parseDefinition(){if(this.peek($.T.BRACE_L))return this.parseOperationDefinition();let _=this.peekDescription(),m=_?this._lexer.lookahead():this._lexer.token;if(m.kind===$.T.NAME){switch(m.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(_)throw(0,R.h)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(m.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(m)}parseOperationDefinition(){let _;let m=this._lexer.token;if(this.peek($.T.BRACE_L))return this.node(m,{kind:U.h.OPERATION_DEFINITION,operation:T.ku.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let C=this.parseOperationType();return this.peek($.T.NAME)&&(_=this.parseName()),this.node(m,{kind:U.h.OPERATION_DEFINITION,operation:C,name:_,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let _=this.expectToken($.T.NAME);switch(_.value){case"query":return T.ku.QUERY;case"mutation":return T.ku.MUTATION;case"subscription":return T.ku.SUBSCRIPTION}throw this.unexpected(_)}parseVariableDefinitions(){return this.optionalMany($.T.PAREN_L,this.parseVariableDefinition,$.T.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:U.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken($.T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken($.T.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let _=this._lexer.token;return this.expectToken($.T.DOLLAR),this.node(_,{kind:U.h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:U.h.SELECTION_SET,selections:this.many($.T.BRACE_L,this.parseSelection,$.T.BRACE_R)})}parseSelection(){return this.peek($.T.SPREAD)?this.parseFragment():this.parseField()}parseField(){let _,m;let C=this._lexer.token,R=this.parseName();return this.expectOptionalToken($.T.COLON)?(_=R,m=this.parseName()):m=R,this.node(C,{kind:U.h.FIELD,alias:_,name:m,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek($.T.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(_){let m=_?this.parseConstArgument:this.parseArgument;return this.optionalMany($.T.PAREN_L,m,$.T.PAREN_R)}parseArgument(_=!1){let m=this._lexer.token,C=this.parseName();return this.expectToken($.T.COLON),this.node(m,{kind:U.h.ARGUMENT,name:C,value:this.parseValueLiteral(_)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let _=this._lexer.token;this.expectToken($.T.SPREAD);let m=this.expectOptionalKeyword("on");return!m&&this.peek($.T.NAME)?this.node(_,{kind:U.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(_,{kind:U.h.INLINE_FRAGMENT,typeCondition:m?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let _=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(_,{kind:U.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(_,{kind:U.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(_){let m=this._lexer.token;switch(m.kind){case $.T.BRACKET_L:return this.parseList(_);case $.T.BRACE_L:return this.parseObject(_);case $.T.INT:return this.advanceLexer(),this.node(m,{kind:U.h.INT,value:m.value});case $.T.FLOAT:return this.advanceLexer(),this.node(m,{kind:U.h.FLOAT,value:m.value});case $.T.STRING:case $.T.BLOCK_STRING:return this.parseStringLiteral();case $.T.NAME:switch(this.advanceLexer(),m.value){case"true":return this.node(m,{kind:U.h.BOOLEAN,value:!0});case"false":return this.node(m,{kind:U.h.BOOLEAN,value:!1});case"null":return this.node(m,{kind:U.h.NULL});default:return this.node(m,{kind:U.h.ENUM,value:m.value})}case $.T.DOLLAR:if(_){if(this.expectToken($.T.DOLLAR),this._lexer.token.kind===$.T.NAME){let _=this._lexer.token.value;throw(0,R.h)(this._lexer.source,m.start,`Unexpected variable "$${_}" in constant value.`)}throw this.unexpected(m)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let _=this._lexer.token;return this.advanceLexer(),this.node(_,{kind:U.h.STRING,value:_.value,block:_.kind===$.T.BLOCK_STRING})}parseList(_){return this.node(this._lexer.token,{kind:U.h.LIST,values:this.any($.T.BRACKET_L,()=>this.parseValueLiteral(_),$.T.BRACKET_R)})}parseObject(_){return this.node(this._lexer.token,{kind:U.h.OBJECT,fields:this.any($.T.BRACE_L,()=>this.parseObjectField(_),$.T.BRACE_R)})}parseObjectField(_){let m=this._lexer.token,C=this.parseName();return this.expectToken($.T.COLON),this.node(m,{kind:U.h.OBJECT_FIELD,name:C,value:this.parseValueLiteral(_)})}parseDirectives(_){let m=[];for(;this.peek($.T.AT);)m.push(this.parseDirective(_));return m}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(_){let m=this._lexer.token;return this.expectToken($.T.AT),this.node(m,{kind:U.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(_)})}parseTypeReference(){let _;let m=this._lexer.token;if(this.expectOptionalToken($.T.BRACKET_L)){let C=this.parseTypeReference();this.expectToken($.T.BRACKET_R),_=this.node(m,{kind:U.h.LIST_TYPE,type:C})}else _=this.parseNamedType();return this.expectOptionalToken($.T.BANG)?this.node(m,{kind:U.h.NON_NULL_TYPE,type:_}):_}parseNamedType(){return this.node(this._lexer.token,{kind:U.h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek($.T.STRING)||this.peek($.T.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("schema");let C=this.parseConstDirectives(),R=this.many($.T.BRACE_L,this.parseOperationTypeDefinition,$.T.BRACE_R);return this.node(_,{kind:U.h.SCHEMA_DEFINITION,description:m,directives:C,operationTypes:R})}parseOperationTypeDefinition(){let _=this._lexer.token,m=this.parseOperationType();this.expectToken($.T.COLON);let C=this.parseNamedType();return this.node(_,{kind:U.h.OPERATION_TYPE_DEFINITION,operation:m,type:C})}parseScalarTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("scalar");let C=this.parseName(),R=this.parseConstDirectives();return this.node(_,{kind:U.h.SCALAR_TYPE_DEFINITION,description:m,name:C,directives:R})}parseObjectTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("type");let C=this.parseName(),R=this.parseImplementsInterfaces(),T=this.parseConstDirectives(),L=this.parseFieldsDefinition();return this.node(_,{kind:U.h.OBJECT_TYPE_DEFINITION,description:m,name:C,interfaces:R,directives:T,fields:L})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany($.T.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany($.T.BRACE_L,this.parseFieldDefinition,$.T.BRACE_R)}parseFieldDefinition(){let _=this._lexer.token,m=this.parseDescription(),C=this.parseName(),R=this.parseArgumentDefs();this.expectToken($.T.COLON);let T=this.parseTypeReference(),L=this.parseConstDirectives();return this.node(_,{kind:U.h.FIELD_DEFINITION,description:m,name:C,arguments:R,type:T,directives:L})}parseArgumentDefs(){return this.optionalMany($.T.PAREN_L,this.parseInputValueDef,$.T.PAREN_R)}parseInputValueDef(){let _;let m=this._lexer.token,C=this.parseDescription(),R=this.parseName();this.expectToken($.T.COLON);let T=this.parseTypeReference();this.expectOptionalToken($.T.EQUALS)&&(_=this.parseConstValueLiteral());let L=this.parseConstDirectives();return this.node(m,{kind:U.h.INPUT_VALUE_DEFINITION,description:C,name:R,type:T,defaultValue:_,directives:L})}parseInterfaceTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("interface");let C=this.parseName(),R=this.parseImplementsInterfaces(),T=this.parseConstDirectives(),L=this.parseFieldsDefinition();return this.node(_,{kind:U.h.INTERFACE_TYPE_DEFINITION,description:m,name:C,interfaces:R,directives:T,fields:L})}parseUnionTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("union");let C=this.parseName(),R=this.parseConstDirectives(),T=this.parseUnionMemberTypes();return this.node(_,{kind:U.h.UNION_TYPE_DEFINITION,description:m,name:C,directives:R,types:T})}parseUnionMemberTypes(){return this.expectOptionalToken($.T.EQUALS)?this.delimitedMany($.T.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("enum");let C=this.parseName(),R=this.parseConstDirectives(),T=this.parseEnumValuesDefinition();return this.node(_,{kind:U.h.ENUM_TYPE_DEFINITION,description:m,name:C,directives:R,values:T})}parseEnumValuesDefinition(){return this.optionalMany($.T.BRACE_L,this.parseEnumValueDefinition,$.T.BRACE_R)}parseEnumValueDefinition(){let _=this._lexer.token,m=this.parseDescription(),C=this.parseEnumValueName(),R=this.parseConstDirectives();return this.node(_,{kind:U.h.ENUM_VALUE_DEFINITION,description:m,name:C,directives:R})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw(0,R.h)(this._lexer.source,this._lexer.token.start,`${getTokenDesc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("input");let C=this.parseName(),R=this.parseConstDirectives(),T=this.parseInputFieldsDefinition();return this.node(_,{kind:U.h.INPUT_OBJECT_TYPE_DEFINITION,description:m,name:C,directives:R,fields:T})}parseInputFieldsDefinition(){return this.optionalMany($.T.BRACE_L,this.parseInputValueDef,$.T.BRACE_R)}parseTypeSystemExtension(){let _=this._lexer.lookahead();if(_.kind===$.T.NAME)switch(_.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(_)}parseSchemaExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let m=this.parseConstDirectives(),C=this.optionalMany($.T.BRACE_L,this.parseOperationTypeDefinition,$.T.BRACE_R);if(0===m.length&&0===C.length)throw this.unexpected();return this.node(_,{kind:U.h.SCHEMA_EXTENSION,directives:m,operationTypes:C})}parseScalarTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let m=this.parseName(),C=this.parseConstDirectives();if(0===C.length)throw this.unexpected();return this.node(_,{kind:U.h.SCALAR_TYPE_EXTENSION,name:m,directives:C})}parseObjectTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let m=this.parseName(),C=this.parseImplementsInterfaces(),R=this.parseConstDirectives(),T=this.parseFieldsDefinition();if(0===C.length&&0===R.length&&0===T.length)throw this.unexpected();return this.node(_,{kind:U.h.OBJECT_TYPE_EXTENSION,name:m,interfaces:C,directives:R,fields:T})}parseInterfaceTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let m=this.parseName(),C=this.parseImplementsInterfaces(),R=this.parseConstDirectives(),T=this.parseFieldsDefinition();if(0===C.length&&0===R.length&&0===T.length)throw this.unexpected();return this.node(_,{kind:U.h.INTERFACE_TYPE_EXTENSION,name:m,interfaces:C,directives:R,fields:T})}parseUnionTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let m=this.parseName(),C=this.parseConstDirectives(),R=this.parseUnionMemberTypes();if(0===C.length&&0===R.length)throw this.unexpected();return this.node(_,{kind:U.h.UNION_TYPE_EXTENSION,name:m,directives:C,types:R})}parseEnumTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let m=this.parseName(),C=this.parseConstDirectives(),R=this.parseEnumValuesDefinition();if(0===C.length&&0===R.length)throw this.unexpected();return this.node(_,{kind:U.h.ENUM_TYPE_EXTENSION,name:m,directives:C,values:R})}parseInputObjectTypeExtension(){let _=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let m=this.parseName(),C=this.parseConstDirectives(),R=this.parseInputFieldsDefinition();if(0===C.length&&0===R.length)throw this.unexpected();return this.node(_,{kind:U.h.INPUT_OBJECT_TYPE_EXTENSION,name:m,directives:C,fields:R})}parseDirectiveDefinition(){let _=this._lexer.token,m=this.parseDescription();this.expectKeyword("directive"),this.expectToken($.T.AT);let C=this.parseName(),R=this.parseArgumentDefs(),T=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let L=this.parseDirectiveLocations();return this.node(_,{kind:U.h.DIRECTIVE_DEFINITION,description:m,name:C,arguments:R,repeatable:T,locations:L})}parseDirectiveLocations(){return this.delimitedMany($.T.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let _=this._lexer.token,m=this.parseName();if(Object.prototype.hasOwnProperty.call(L.B,m.value))return m;throw this.unexpected(_)}node(_,m){return!0!==this._options.noLocation&&(m.loc=new T.Ye(_,this._lexer.lastToken,this._lexer.source)),m}peek(_){return this._lexer.token.kind===_}expectToken(_){let m=this._lexer.token;if(m.kind===_)return this.advanceLexer(),m;throw(0,R.h)(this._lexer.source,m.start,`Expected ${getTokenKindDesc(_)}, found ${getTokenDesc(m)}.`)}expectOptionalToken(_){let m=this._lexer.token;return m.kind===_&&(this.advanceLexer(),!0)}expectKeyword(_){let m=this._lexer.token;if(m.kind===$.T.NAME&&m.value===_)this.advanceLexer();else throw(0,R.h)(this._lexer.source,m.start,`Expected "${_}", found ${getTokenDesc(m)}.`)}expectOptionalKeyword(_){let m=this._lexer.token;return m.kind===$.T.NAME&&m.value===_&&(this.advanceLexer(),!0)}unexpected(_){let m=null!=_?_:this._lexer.token;return(0,R.h)(this._lexer.source,m.start,`Unexpected ${getTokenDesc(m)}.`)}any(_,m,C){this.expectToken(_);let R=[];for(;!this.expectOptionalToken(C);)R.push(m.call(this));return R}optionalMany(_,m,C){if(this.expectOptionalToken(_)){let _=[];do _.push(m.call(this));while(!this.expectOptionalToken(C));return _}return[]}many(_,m,C){this.expectToken(_);let R=[];do R.push(m.call(this));while(!this.expectOptionalToken(C));return R}delimitedMany(_,m){this.expectOptionalToken(_);let C=[];do C.push(m.call(this));while(this.expectOptionalToken(_));return C}advanceLexer(){let{maxTokens:_}=this._options,m=this._lexer.advance();if(void 0!==_&&m.kind!==$.T.EOF&&(++this._tokenCounter,this._tokenCounter>_))throw(0,R.h)(this._lexer.source,m.start,`Document contains more that ${_} tokens. Parsing aborted.`)}};function getTokenDesc(_){let m=_.value;return getTokenKindDesc(_.kind)+(null!=m?` "${m}"`:"")}function getTokenKindDesc(_){return(0,F.u)(_)?`"${_}"`:_}},90850:function(_,m,C){"use strict";C.d(m,{Q:function(){return printLocation},z:function(){return printSourceLocation}});var R=C(57867);function printLocation(_){return printSourceLocation(_.source,(0,R.k)(_.source,_.start))}function printSourceLocation(_,m){let C=_.locationOffset.column-1,R="".padStart(C)+_.body,T=m.line-1,L=_.locationOffset.line-1,U=m.line+L,F=1===m.line?C:0,B=m.column+F,$=`${_.name}:${U}:${B} `,H=R.split(/\r\n|[\n\r]/g),V=H[T];if(V.length>120){let _=Math.floor(B/80),m=B%80,C=[];for(let _=0;_["|",_]),["|","^".padStart(m)],["|",C[_+1]]])}return $+printPrefixedLines([[`${U-1} |`,H[T-1]],[`${U} |`,V],["|","^".padStart(B)],[`${U+1} |`,H[T+1]]])}function printPrefixedLines(_){let m=_.filter(([_,m])=>void 0!==m),C=Math.max(...m.map(([_])=>_.length));return m.map(([_,m])=>_.padStart(C)+(m?" "+m:"")).join("\n")}},7926:function(_,m,C){"use strict";C.d(m,{H:function(){return Source},T:function(){return isSource}});var R=C(37826),T=C(25821),L=C(8306);let Source=class Source{constructor(_,m="GraphQL request",C={line:1,column:1}){"string"==typeof _||(0,R.a)(!1,`Body must be a string. Received: ${(0,T.X)(_)}.`),this.body=_,this.name=m,this.locationOffset=C,this.locationOffset.line>0||(0,R.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,R.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function isSource(_){return(0,L.n)(_,Source)}},74635:function(_,m,C){"use strict";var R,T;C.d(m,{T:function(){return R}}),(T=R||(R={})).SOF="",T.EOF="",T.BANG="!",T.DOLLAR="$",T.AMP="&",T.PAREN_L="(",T.PAREN_R=")",T.SPREAD="...",T.COLON=":",T.EQUALS="=",T.AT="@",T.BRACKET_L="[",T.BRACKET_R="]",T.BRACE_L="{",T.PIPE="|",T.BRACE_R="}",T.NAME="Name",T.INT="Int",T.FLOAT="Float",T.STRING="String",T.BLOCK_STRING="BlockString",T.COMMENT="Comment"},80898:function(_,m,C){"use strict";C.r(m),C.d(m,{default:function(){return L}}),R="undefined"!=typeof self?self:void 0,T=function(_){if("function"!=typeof Promise)throw"Promise support required";var m=_.crypto||_.msCrypto;if(m){var C=m.subtle||m.webkitSubtle;if(C){var R=_.Crypto||m.constructor||Object,T=_.SubtleCrypto||C.constructor||Object;_.CryptoKey||_.Key;var L=_.navigator.userAgent.indexOf("Edge/")>-1,U=!!_.msCrypto&&!L,F=!m.subtle&&!!m.webkitSubtle;if(U||F){var B={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},$={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(_){var R=C[_];C[_]=function(T,L,B){var $,H,V,q,G,K=[].slice.call(arguments);switch(_){case"generateKey":V=alg(T),q=L,G=B;break;case"importKey":V=alg(B),q=K[3],G=K[4],"jwk"===T&&((L=b2jwk(L)).alg||(L.alg=jwkAlg(V)),L.key_ops||(L.key_ops="oct"!==L.kty?"d"in L?G.filter(isPrvKeyUse):G.filter(isPubKeyUse):G.slice()),K[1]=($=b2jwk(L),U&&($.extractable=$.ext,delete $.ext),s2b(unescape(encodeURIComponent(JSON.stringify($)))).buffer));break;case"unwrapKey":V=K[4],q=K[5],G=K[6],K[2]=B._key}if("generateKey"===_&&"HMAC"===V.name&&V.hash)return V.length=V.length||({"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024})[V.hash.name],C.importKey("raw",m.getRandomValues(new Uint8Array(V.length+7>>3)),V,q,G);if(F&&"generateKey"===_&&"RSASSA-PKCS1-v1_5"===V.name&&(!V.modulusLength||V.modulusLength>=2048))return(T=alg(T)).name="RSAES-PKCS1-v1_5",delete T.hash,C.generateKey(T,!0,["encrypt","decrypt"]).then(function(_){return Promise.all([C.exportKey("jwk",_.publicKey),C.exportKey("jwk",_.privateKey)])}).then(function(_){return _[0].alg=_[1].alg=jwkAlg(V),_[0].key_ops=G.filter(isPubKeyUse),_[1].key_ops=G.filter(isPrvKeyUse),Promise.all([C.importKey("jwk",_[0],V,!0,_[0].key_ops),C.importKey("jwk",_[1],V,q,_[1].key_ops)])}).then(function(_){return{publicKey:_[0],privateKey:_[1]}});if((F||U&&"SHA-1"===(V.hash||{}).name)&&"importKey"===_&&"jwk"===T&&"HMAC"===V.name&&"oct"===L.kty)return C.importKey("raw",s2b(a2s(L.k)),B,K[3],K[4]);if(F&&"importKey"===_&&("spki"===T||"pkcs8"===T))return C.importKey("jwk",function(_){var m=b2der(_),C=!1;m.length>2&&(C=!0,m.shift());var R={ext:!0};if("1.2.840.113549.1.1.1"===m[0][0]){var T=["n","e","d","p","q","dp","dq","qi"],L=b2der(m[1]);C&&L.shift();for(var U=0;U2&&(R=!0,L.unshift(new Uint8Array([0]))),C[0][0]="1.2.840.113549.1.1.1",m=L}else throw TypeError("Unsupported key type");return C.push(new Uint8Array(der2b(m)).buffer),R?C.unshift(new Uint8Array([0])):C[1]={tag:3,value:C[1]},new Uint8Array(der2b(C)).buffer}(b2jwk(_))})),B}}),["encrypt","decrypt","sign","verify"].forEach(function(_){var m=C[_];C[_]=function(R,T,L,F){if(U&&(!L.byteLength||F&&!F.byteLength))throw Error("Empy input is not allowed");var B,$=[].slice.call(arguments),H=alg(R);if(U&&"decrypt"===_&&"AES-GCM"===H.name){var V=R.tagLength>>3;$[2]=(L.buffer||L).slice(0,L.byteLength-V),R.tag=(L.buffer||L).slice(L.byteLength-V)}$[1]=T._key;try{B=m.apply(C,$)}catch(_){return Promise.reject(_)}return U&&(B=new Promise(function(m,C){B.onabort=B.onerror=function(_){C(_)},B.oncomplete=function(C){var C=C.target.result;if("encrypt"===_&&C instanceof AesGcmEncryptResult){var R=C.ciphertext,T=C.tag;(C=new Uint8Array(R.byteLength+T.byteLength)).set(new Uint8Array(R),0),C.set(new Uint8Array(T),R.byteLength),C=C.buffer}m(C)}})),B}}),U){var H=C.digest;C.digest=function(_,m){var R;if(!m.byteLength)throw Error("Empy input is not allowed");try{R=H.call(C,_,m)}catch(_){return Promise.reject(_)}return R=new Promise(function(_,m){R.onabort=R.onerror=function(_){m(_)},R.oncomplete=function(m){_(m.target.result)}})},_.crypto=Object.create(m,{getRandomValues:{value:function(_){return m.getRandomValues(_)}},subtle:{value:C}}),_.CryptoKey=CryptoKey}F&&(m.subtle=C,_.Crypto=R,_.SubtleCrypto=T,_.CryptoKey=CryptoKey)}}}function s2a(_){return btoa(_).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function a2s(_){return _+="===",atob((_=_.slice(0,-_.length%4)).replace(/-/g,"+").replace(/_/g,"/"))}function s2b(_){for(var m=new Uint8Array(_.length),C=0;C<_.length;C++)m[C]=_.charCodeAt(C);return m}function b2s(_){return _ instanceof ArrayBuffer&&(_=new Uint8Array(_)),String.fromCharCode.apply(String,_)}function alg(_){var m={name:(_.name||_||"").toUpperCase().replace("V","v")};switch(m.name){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;case"AES-CBC":case"AES-GCM":case"AES-KW":_.length&&(m.length=_.length);break;case"HMAC":_.hash&&(m.hash=alg(_.hash)),_.length&&(m.length=_.length);break;case"RSAES-PKCS1-v1_5":_.publicExponent&&(m.publicExponent=new Uint8Array(_.publicExponent)),_.modulusLength&&(m.modulusLength=_.modulusLength);break;case"RSASSA-PKCS1-v1_5":case"RSA-OAEP":_.hash&&(m.hash=alg(_.hash)),_.publicExponent&&(m.publicExponent=new Uint8Array(_.publicExponent)),_.modulusLength&&(m.modulusLength=_.modulusLength);break;default:throw SyntaxError("Bad algorithm name")}return m}function jwkAlg(_){return({HMAC:{"SHA-1":"HS1","SHA-256":"HS256","SHA-384":"HS384","SHA-512":"HS512"},"RSASSA-PKCS1-v1_5":{"SHA-1":"RS1","SHA-256":"RS256","SHA-384":"RS384","SHA-512":"RS512"},"RSAES-PKCS1-v1_5":{"":"RSA1_5"},"RSA-OAEP":{"SHA-1":"RSA-OAEP","SHA-256":"RSA-OAEP-256"},"AES-KW":{128:"A128KW",192:"A192KW",256:"A256KW"},"AES-GCM":{128:"A128GCM",192:"A192GCM",256:"A256GCM"},"AES-CBC":{128:"A128CBC",192:"A192CBC",256:"A256CBC"}})[_.name][(_.hash||{}).name||_.length||""]}function b2jwk(_){(_ instanceof ArrayBuffer||_ instanceof Uint8Array)&&(_=JSON.parse(decodeURIComponent(escape(b2s(_)))));var m={kty:_.kty,alg:_.alg,ext:_.ext||_.extractable};switch(m.kty){case"oct":m.k=_.k;case"RSA":["n","e","d","p","q","dp","dq","qi","oth"].forEach(function(C){C in _&&(m[C]=_[C])});break;default:throw TypeError("Unsupported key type")}return m}function b2der(_,m){if(_ instanceof ArrayBuffer&&(_=new Uint8Array(_)),m||(m={pos:0,end:_.length}),m.end-m.pos<2||m.end>_.length)throw RangeError("Malformed DER");var C,R=_[m.pos++],T=_[m.pos++];if(T>=128){if(T&=127,m.end-m.pos=128){var F=R,R=4;for(m.splice(T,0,F>>24&255,F>>16&255,F>>8&255,255&F);R>1&&!(F>>24);)F<<=8,R--;R<4&&m.splice(T,4-R),R|=128}return m.splice(T-2,2,C,R),m}function CryptoKey(_,m,C,R){Object.defineProperties(this,{_key:{value:_},type:{value:_.type,enumerable:!0},extractable:{value:void 0===C?_.extractable:C,enumerable:!0},algorithm:{value:void 0===m?_.algorithm:m,enumerable:!0},usages:{value:void 0===R?_.usages:R,enumerable:!0}})}function isPubKeyUse(_){return"verify"===_||"encrypt"===_||"wrapKey"===_}function isPrvKeyUse(_){return"sign"===_||"decrypt"===_||"unwrapKey"===_}},"function"==typeof define&&define.amd?define([],function(){return T(R)}):"object"==typeof module&&module.exports?module.exports=T(R):T(R);var R,T,L=window.crypto},31955:function(_,m,C){"use strict";/*! js-cookie v3.0.5 | MIT */function assign(_){for(var m=1;mm.indexOf(R)&&(C[R]=_[R]);if(null!=_&&"function"==typeof Object.getOwnPropertySymbols)for(var T=0,R=Object.getOwnPropertySymbols(_);Tm.indexOf(R[T])&&Object.prototype.propertyIsEnumerable.call(_,R[T])&&(C[R[T]]=_[R[T]]);return C}function __awaiter(_,m,C,R){return new(C||(C=Promise))(function(T,L){function fulfilled(_){try{step(R.next(_))}catch(_){L(_)}}function rejected(_){try{step(R.throw(_))}catch(_){L(_)}}function step(_){var m;_.done?T(_.value):((m=_.value)instanceof C?m:new C(function(_){_(m)})).then(fulfilled,rejected)}step((R=R.apply(_,m||[])).next())})}function __generator(_,m){var C,R,T,L,U={label:0,sent:function(){if(1&T[0])throw T[1];return T[1]},trys:[],ops:[]};return L={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(L[Symbol.iterator]=function(){return this}),L;function verb(F){return function(B){return function(F){if(C)throw TypeError("Generator is already executing.");for(;L&&(L=0,F[0]&&(U=0)),U;)try{if(C=1,R&&(T=2&F[0]?R.return:F[0]?R.throw||((T=R.return)&&T.call(R),0):R.next)&&!(T=T.call(R,F[1])).done)return T;switch(R=0,T&&(F=[2&F[0],T.value]),F[0]){case 0:case 1:T=F;break;case 4:return U.label++,{value:F[1],done:!1};case 5:U.label++,R=F[1],F=[0];continue;case 7:F=U.ops.pop(),U.trys.pop();continue;default:if(!(T=(T=U.trys).length>0&&T[T.length-1])&&(6===F[0]||2===F[0])){U=0;continue}if(3===F[0]&&(!T||F[1]>T[0]&&F[1]