(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{51204:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},52795:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22385:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},82535:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50148:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if("MSInputMethodContext"in e&&"msCrypto"in e&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map(function(e){return o[e]}).concat(r).every(function(e){return"function"==typeof e})}return!1}},56486:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80767);r.__exportStar(n(51204),t),r.__exportStar(n(52795),t),r.__exportStar(n(22385),t),r.__exportStar(n(82535),t),r.__exportStar(n(50148),t)},80767:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},44209:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(6404),o=n(52960),i=n(4497),a=n(39738),s=n(56486),c=n(56495),u=n(90389),l=function(){function e(e){(0,a.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,c.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,u.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();t.Sha256=l},6404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(10026),o=n(44209),i=n(98143),a=n(56495),s=function(){function e(e){this.secret=e,this.reset()}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then(function(n){return n.onerror=function(){t.operation=Promise.reject(Error("Error encountered updating hash"))},n.process(c(e)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,n){e.onerror=function(){n(Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(Error("Error encountered finalizing hash"))},e.finish()})})},e.prototype.reset=function(){var e;this.secret?(this.operation=(e=this.secret,new Promise(function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",c(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(Error("ImportKey completed without importing key."))},r.onerror=function(){n(Error("ImportKey failed to import key."))}})).then(function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e}();function c(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},16037:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(31279).__exportStar(n(17612),t);var r=n(6404);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(52960);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},10026:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},52960:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(90389),o=n(44209),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();t.Sha256=a},31279:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},49507:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(19882),o=function(){function e(){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 e.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=0;f>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var y=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&c^~s&u)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=u,u=c,c=s,s=a+y|0,a=i,i=o,o=n,n=y+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=c,t[6]+=u,t[7]+=l},e}();t.RawSha256=o},19882:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=9007199254740991},4497:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(53239).__exportStar(n(34666),t)},34666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(53239),o=n(19882),i=n(49507),a=n(90389),s=function(){function e(e){this.secret=e,this.hash=new i.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i.RawSha256,this.secret){this.outer=new i.RawSha256;var e=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(o.BLOCK_SIZE);t.set(e);for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},39738:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(78699).__exportStar(n(89703),t)},89703:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(78699),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!!i(e)&&"object"==typeof e.crypto.subtle&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}})})}},78699:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},67818:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},90389:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(67818);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(45755);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(18457);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(71575);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},45755:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},18457:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},71575:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},25836:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(42455),o=n(61699),i=n(56642),a=n(23787),s=n(19365),c=n(56495),u=n(20458),l=function(){function e(e){(0,a.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,c.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,u.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();t.Sha256=l},42455:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(71317),o=n(25836),i=n(98143),a=n(56495),s=function(){function e(e){this.secret=e,this.reset()}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then(function(n){return n.onerror=function(){t.operation=Promise.reject(Error("Error encountered updating hash"))},n.process(c(e)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,n){e.onerror=function(){n(Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(Error("Error encountered finalizing hash"))},e.finish()})})},e.prototype.reset=function(){var e;this.secret?(this.operation=(e=this.secret,new Promise(function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",c(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(Error("ImportKey completed without importing key."))},r.onerror=function(){n(Error("ImportKey failed to import key."))}})).then(function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e}();function c(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},57381:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(34948).__exportStar(n(8254),t);var r=n(42455);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(61699);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},71317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},61699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(20458),o=n(25836),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();t.Sha256=a},34948:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},33784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(25538),o=function(){function e(){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 e.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=0;f>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var y=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&c^~s&u)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=u,u=c,c=s,s=a+y|0,a=i,i=o,o=n,n=y+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=c,t[6]+=u,t[7]+=l},e}();t.RawSha256=o},25538:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=9007199254740991},56642:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(3917).__exportStar(n(71016),t)},71016:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(3917),o=n(25538),i=n(33784),a=n(20458),s=function(){function e(e){this.secret=e,this.hash=new i.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i.RawSha256,this.secret){this.outer=new i.RawSha256;var e=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(o.BLOCK_SIZE);t.set(e);for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},23787:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(35497).__exportStar(n(20014),t)},20014:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(35497),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!!i(e)&&"object"==typeof e.crypto.subtle&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}})})}},35497:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},51346:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},20458:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(51346);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(32498);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(85276);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(64665);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},32498:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},85276:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},64665:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},14567:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(68770),o=n(47977),i=n(47108),a=n(35755),s=n(93467),c=n(56495),u=n(97664),l=function(){function e(e){(0,a.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,c.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,u.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();t.Sha256=l},68770:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(29055),o=n(14567),i=n(98143),a=n(56495),s=function(){function e(e){this.secret=e,this.reset()}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then(function(n){return n.onerror=function(){t.operation=Promise.reject(Error("Error encountered updating hash"))},n.process(c(e)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,n){e.onerror=function(){n(Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(Error("Error encountered finalizing hash"))},e.finish()})})},e.prototype.reset=function(){var e;this.secret?(this.operation=(e=this.secret,new Promise(function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",c(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(Error("ImportKey completed without importing key."))},r.onerror=function(){n(Error("ImportKey failed to import key."))}})).then(function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e}();function c(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},76505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(77563).__exportStar(n(77358),t);var r=n(68770);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(47977);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},29055:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},47977:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(97664),o=n(14567),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();t.Sha256=a},77563:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},36321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(18280),o=function(){function e(){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 e.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=0;f>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var y=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&c^~s&u)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=u,u=c,c=s,s=a+y|0,a=i,i=o,o=n,n=y+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=c,t[6]+=u,t[7]+=l},e}();t.RawSha256=o},18280:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=9007199254740991},47108:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(10191).__exportStar(n(80009),t)},80009:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(10191),o=n(18280),i=n(36321),a=n(97664),s=function(){function e(e){this.secret=e,this.hash=new i.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i.RawSha256,this.secret){this.outer=new i.RawSha256;var e=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(o.BLOCK_SIZE);t.set(e);for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},35755:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(67223).__exportStar(n(39369),t)},39369:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(67223),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!!i(e)&&"object"==typeof e.crypto.subtle&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}})})}},67223:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},38895:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},97664:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(38895);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(24647);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(35522);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(40976);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},24647:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},35522:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},40976:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},14:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(80330),o=n(26560),i=n(95165),a=n(48871),s=n(66448),c=n(56495),u=n(37421),l=function(){function e(e){(0,a.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,c.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,u.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();t.Sha256=l},80330:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(78659),o=n(14),i=n(98143),a=n(56495),s=function(){function e(e){this.secret=e,this.reset()}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then(function(n){return n.onerror=function(){t.operation=Promise.reject(Error("Error encountered updating hash"))},n.process(c(e)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,n){e.onerror=function(){n(Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(Error("Error encountered finalizing hash"))},e.finish()})})},e.prototype.reset=function(){var e;this.secret?(this.operation=(e=this.secret,new Promise(function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",c(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(Error("ImportKey completed without importing key."))},r.onerror=function(){n(Error("ImportKey failed to import key."))}})).then(function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e}();function c(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},80686:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(61688).__exportStar(n(80418),t);var r=n(80330);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(26560);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},78659:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},26560:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(37421),o=n(14),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();t.Sha256=a},61688:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},43259:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(72758),o=function(){function e(){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 e.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=0;f>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var y=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&c^~s&u)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=u,u=c,c=s,s=a+y|0,a=i,i=o,o=n,n=y+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=c,t[6]+=u,t[7]+=l},e}();t.RawSha256=o},72758:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=9007199254740991},95165:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(13175).__exportStar(n(62035),t)},62035:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(13175),o=n(72758),i=n(43259),a=n(37421),s=function(){function e(e){this.secret=e,this.hash=new i.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i.RawSha256,this.secret){this.outer=new i.RawSha256;var e=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(o.BLOCK_SIZE);t.set(e);for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},48871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(7500).__exportStar(n(28684),t)},28684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(7500),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!!i(e)&&"object"==typeof e.crypto.subtle&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}})})}},7500:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},94276:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},37421:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(94276);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(65499);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(26444);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(416);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},65499:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},26444:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},416:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},33579:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(43039),o=n(47059),i=n(47162),a=n(53453),s=n(32214),c=n(56495),u=n(61558),l=function(){function e(e){(0,a.supportsWebCrypto)((0,c.locateWindow)())?this.hash=new o.Sha256(e):(0,s.isMsWindow)((0,c.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update((0,u.convertToBuffer)(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();t.Sha256=l},43039:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(19982),o=n(33579),i=n(98143),a=n(56495),s=function(){function e(e){this.secret=e,this.reset()}return e.prototype.update=function(e){var t=this;(0,r.isEmptyData)(e)||(this.operation=this.operation.then(function(n){return n.onerror=function(){t.operation=Promise.reject(Error("Error encountered updating hash"))},n.process(c(e)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(e){return new Promise(function(t,n){e.onerror=function(){n(Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(Error("Error encountered finalizing hash"))},e.finish()})})},e.prototype.reset=function(){var e;this.secret?(this.operation=(e=this.secret,new Promise(function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",c(e),o.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(Error("ImportKey completed without importing key."))},r.onerror=function(){n(Error("ImportKey failed to import key."))}})).then(function(e){return(0,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e}();function c(e){return"string"==typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=s},63037:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,n(8397).__exportStar(n(94511),t);var r=n(43039);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(47059);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},19982:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},47059:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(61558),o=n(33579),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!(0,r.isEmptyData)(e)){var t=(0,r.convertToBuffer)(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return(0,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then(function(e){return new Uint8Array(e)})}):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)}).then(function(e){return Promise.resolve(new Uint8Array(e))})},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise(function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e.secret),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},e}();t.Sha256=a},8397:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},54486:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(68094),o=function(){function e(){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 e.prototype.update=function(e){if(this.finished)throw Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>r.MAX_HASHABLE_LENGTH)throw Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===r.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%r.BLOCK_SIZE>=r.BLOCK_SIZE-8){for(var o=this.bufferLength;o>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=0;f>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(p+this.temp[f-7]|0)+(h+this.temp[f-16]|0)}var y=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&c^~s&u)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;l=u,u=c,c=s,s=a+y|0,a=i,i=o,o=n,n=y+g|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=s,t[5]+=c,t[6]+=u,t[7]+=l},e}();t.RawSha256=o},68094:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.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]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=9007199254740991},47162:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(41798).__exportStar(n(5119),t)},5119:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(41798),o=n(68094),i=n(54486),a=n(61558),s=function(){function e(e){this.secret=e,this.hash=new i.RawSha256,this.reset()}return e.prototype.update=function(e){if(!(0,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(e){this.error=e}},e.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()},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new i.RawSha256,this.secret){this.outer=new i.RawSha256;var e=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(this.secret),t=new Uint8Array(o.BLOCK_SIZE);t.set(e);for(var n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},53453:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(9481).__exportStar(n(37773),t)},37773:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsZeroByteGCM=t.supportsSubtleCrypto=t.supportsSecureRandom=t.supportsWebCrypto=void 0;var r=n(9481),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function a(e){return e&&o.every(function(t){return"function"==typeof e[t]})}t.supportsWebCrypto=function(e){return!!i(e)&&"object"==typeof e.crypto.subtle&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}})})}},9481:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},91189:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},61558:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(91189);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(59924);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(26747);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(8919);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},59924:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},26747:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},8919:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;nt=>async n=>{let{request:a}=n;if(!r.aW.isInstance(a)||"node"!==e.runtime||a.headers.hasOwnProperty(i))return t(n);let s=o.env.AWS_LAMBDA_FUNCTION_NAME,c=o.env._X_AMZN_TRACE_ID;return"string"==typeof s&&s.length>0&&"string"==typeof c&&c.length>0&&(a.headers[i]=c),t({...n,request:a})},s={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},c=e=>({applyToStack:t=>{t.add(a(e),s)}})},8794:function(e,t,n){"use strict";n.d(t,{Qj:function(){return p},B1:function(){return G}});var r,o,i={};n.r(i),n.d(i,{getUserAgentPrefix:function(){return p},isVirtualHostableS3Bucket:function(){return S},parseArn:function(){return _},partition:function(){return l},setPartitionInfo:function(){return f},useDefaultPartitionInfo:function(){return d}});var a={};n.r(a),n.d(a,{aws:function(){return i},booleanEquals:function(){return E},getAttr:function(){return O},isSet:function(){return A},isValidHostLabel:function(){return w},not:function(){return C},parseURL:function(){return I},stringEquals:function(){return k},substring:function(){return R},uriEncode:function(){return M}});var s=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","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","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","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","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","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","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","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}');let c=s,u="",l=e=>{let{partitions:t}=c;for(let n of t){let{regions:t,outputs:r}=n;for(let[n,o]of Object.entries(t))if(n===e)return{...r,...o}}for(let n of t){let{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}let n=t.find(e=>"aws"===e.id);if(!n)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},f=(e,t="")=>{c=e,u=t},d=()=>{f(s,"")},p=()=>u,h="endpoints";function y(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${y(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(y).join(", ")})`:JSON.stringify(e,null,2)}class g extends Error{constructor(e){super(e),this.name="EndpointError"}}let m=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}$"),v=e=>m.test(e)||e.startsWith("[")&&e.endsWith("]"),b=RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),w=(e,t=!1)=>{if(!t)return b.test(e);let n=e.split(".");for(let e of n)if(!w(e))return!1;return!0},S=(e,t=!1)=>{if(t){for(let t of e.split("."))if(!S(t))return!1;return!0}return!(!w(e)||e.length<3||e.length>63||e!==e.toLowerCase()||v(e))},_=e=>{let t=e.split(":");if(t.length<6)return null;let[n,r,o,i,a,...s]=t;return"arn"!==n||""===r||""===o||""===s[0]?null:{partition:r,service:o,region:i,accountId:a,resourceId:s[0].includes("/")?s[0].split("/"):s}},E=(e,t)=>e===t,P=e=>{let t=e.split("."),n=[];for(let r of t){let t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new g(`Path: '${e}' does not end with ']'`);let o=r.slice(t+1,-1);if(Number.isNaN(parseInt(o)))throw new g(`Invalid array index: '${o}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(o)}else n.push(r)}return n},O=(e,t)=>P(t).reduce((n,r)=>{if("object"!=typeof n)throw new g(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),A=e=>null!=e,C=e=>!e;var x=n(64370);(r=o||(o={})).AAAA="AAAA",r.A="A";let T={[x.cj.HTTP]:80,[x.cj.HTTPS]:443},I=e=>{let t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){let{hostname:t,port:n,protocol:r="",path:o="",query:i={}}=e,a=new URL(`${r}//${t}${n?`:${n}`:""}${o}`);return a.search=Object.entries(i).map(([e,t])=>`${e}=${t}`).join("&"),a}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let n=t.href,{host:r,hostname:o,pathname:i,protocol:a,search:s}=t;if(s)return null;let c=a.slice(0,-1);if(!Object.values(x.cj).includes(c))return null;let u=v(o),l=n.includes(`${r}:${T[c]}`)||"string"==typeof e&&e.includes(`${r}:${T[c]}`),f=`${r}${l?`:${T[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},k=(e,t)=>e===t,R=(e,t,n,r)=>t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),j=(e,t)=>{let n=[],r={...t.endpointParams,...t.referenceRecord},o=0;for(;o({...t.endpointParams,...t.referenceRecord})[e],L=(e,t,n)=>{if("string"==typeof e)return j(e,n);if(e.fn)return D(e,n);if(e.ref)return N(e,n);throw new g(`'${t}': ${String(e)} is not a string, function or reference.`)},D=({fn:e,argv:t},n)=>{let r=t.map(e=>["boolean","number"].includes(typeof e)?e:L(e,"arg",n));return e.split(".").reduce((e,t)=>e[t],a)(...r)},U=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new g(`'${e}' is already defined in Reference Record.`);let r=D(t,n);return n.logger?.debug?.(h,`evaluateCondition: ${y(t)} = ${y(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},F=(e=[],t)=>{let n={};for(let r of e){let{result:e,toAssign:o}=U(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};o&&(n[o.name]=o.value,t.logger?.debug?.(h,`assign: ${o.name} := ${y(o.value)}`))}return{result:!0,referenceRecord:n}},$=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:r.map(e=>{let r=L(e,"Header value entry",t);if("string"!=typeof r)throw new g(`Header '${n}' value '${r}' is not a string`);return r})}),{}),B=(e,t)=>{if(Array.isArray(e))return e.map(e=>B(e,t));switch(typeof e){case"string":return j(e,t);case"object":if(null===e)throw new g(`Unexpected endpoint property: ${e}`);return z(e,t);case"boolean":return e;default:throw new g(`Unexpected endpoint property type: ${typeof e}`)}},z=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:B(r,t)}),{}),H=(e,t)=>{let n=L(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new g(`Endpoint URL must be a string, got ${typeof n}`)},V=(e,t)=>{let{conditions:n,endpoint:r}=e,{result:o,referenceRecord:i}=F(n,t);if(!o)return;let a={...t,referenceRecord:{...t.referenceRecord,...i}},{url:s,properties:c,headers:u}=r;return t.logger?.debug?.(h,`Resolving endpoint from template: ${y(r)}`),{...void 0!=u&&{headers:$(u,a)},...void 0!=c&&{properties:z(c,a)},url:H(s,a)}},Z=(e,t)=>{let{conditions:n,error:r}=e,{result:o,referenceRecord:i}=F(n,t);if(o)throw new g(L(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},q=(e,t)=>{let{conditions:n,rules:r}=e,{result:o,referenceRecord:i}=F(n,t);if(o)return K(r,{...t,referenceRecord:{...t.referenceRecord,...i}})},K=(e,t)=>{for(let n of e)if("endpoint"===n.type){let e=V(n,t);if(e)return e}else if("error"===n.type)Z(n,t);else if("tree"===n.type){let e=q(n,t);if(e)return e}else throw new g(`Unknown endpoint rule: ${n}`);throw new g("Rules evaluation failed")},G=(e,t)=>{let{endpointParams:n,logger:r}=t,{parameters:o,rules:i}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${y(n)}`);let a=Object.entries(o).filter(([,e])=>null!=e.default).map(([e,t])=>[e,t.default]);if(a.length>0)for(let[e,t]of a)n[e]=n[e]??t;let s=Object.entries(o).filter(([,e])=>e.required).map(([e])=>e);for(let e of s)if(null==n[e])throw new g(`Missing required parameter: '${e}'`);let c=K(i,{endpointParams:n,logger:r,referenceRecord:{}});if(t.endpointParams?.Endpoint)try{let e=new URL(t.endpointParams.Endpoint),{protocol:n,port:r}=e;c.url.protocol=n,c.url.port=r}catch(e){}return t.logger?.debug?.(`${h} Resolved endpoint: ${y(c)}`),c}},56495:function(e,t,n){"use strict";n.r(t),n.d(t,{locateWindow:function(){return o}});let r={};function o(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},98143:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return i},toUtf8:function(){return a}});var r=function(e){for(var t=[],n=0,r=e.length;n>6|192,63&o|128);else if(n+1>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)},o=function(e){for(var t="",n=0,r=e.length;n1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:f(e)?2:d(e)?3:0}function c(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function l(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e){return U&&e instanceof Map}function d(e){return F&&e instanceof Set}function p(e){return e.o||e.t}function h(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=q(e);delete t[H];for(var n=Z(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&a(e,function(e,t){return y(t,!0)},!0)),e}function g(){r(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(e){var t=K[e];return t||r(18,e),t}function b(e,t){t&&(v("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){S(e),e.p.forEach(E),e.p=null}function S(e){e===L&&(L=e.l)}function _(e){return L={p:[],l:L,h:e,m:!0,_:0}}function E(e){var t=e[H];0===t.i||1===t.i?t.j():t.g=!0}function P(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||v("ES5").S(t,e,o),o?(n[H].P&&(w(t),r(4)),i(e)&&(e=O(t,e),t.l||C(t,e)),t.u&&v("Patches").M(n[H].t,e,t.u,t.s)):e=O(t,n,[]),w(t),t.u&&t.v(t.u,t.s),e!==B?e:void 0}function O(e,t,n){if(m(t))return t;var r=t[H];if(!r)return a(t,function(o,i){return A(e,r,t,o,i,n)},!0),t;if(r.A!==e)return t;if(!r.P)return C(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=h(r.k):r.o,i=o,s=!1;3===r.i&&(i=new Set(o),o.clear(),s=!0),a(i,function(t,i){return A(e,r,o,t,i,n,s)}),C(e,o,!1),n&&e.u&&v("Patches").N(r,n,e.u,e.s)}return r.o}function A(e,t,n,r,a,s,l){if(o(a)){var f=O(e,a,s&&t&&3!==t.i&&!c(t.R,r)?s.concat(r):void 0);if(u(n,r,f),!o(f))return;e.m=!1}else l&&n.add(a);if(i(a)&&!m(a)){if(!e.h.D&&e._<1)return;O(e,a),t&&t.A.l||C(e,a)}}function C(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&y(t,n)}function x(e,t){var n=e[H];return(n?p(n):e)[t]}function T(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function I(e){e.P||(e.P=!0,e.l&&I(e.l))}function k(e){e.o||(e.o=h(e.t))}function R(e,t,n){var r,o,i,a,s,c,u,l=f(t)?v("MapSet").F(t,n):d(t)?v("MapSet").T(t,n):e.O?(i=o={i:(r=Array.isArray(t))?1:0,A:n?n.A:L,P:!1,I:!1,R:{},l:n,t:t,k:null,o:null,j:null,C:!1},a=G,r&&(i=[o],a=W),c=(s=Proxy.revocable(i,a)).revoke,u=s.proxy,o.k=u,o.j=c,u):v("ES5").J(t,n);return(n?n.A:L).p.push(l),l}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return h(e)}n.d(t,{xC:function(){return em},oM:function(){return ew}});var j,N,L,D="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),U="undefined"!=typeof Map,F="undefined"!=typeof Set,$="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,B=D?Symbol.for("immer-nothing"):((N={})["immer-nothing"]=!0,N),z=D?Symbol.for("immer-draftable"):"__$immer_draftable",H=D?Symbol.for("immer-state"):"__$immer_state",V=""+Object.prototype.constructor,Z="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,q=Object.getOwnPropertyDescriptors||function(e){var t={};return Z(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},K={},G={get:function(e,t){if(t===H)return e;var n,r,o=p(e);if(!c(o,t))return(r=T(o,t))?"value"in r?r.value:null===(n=r.get)||void 0===n?void 0:n.call(e.k):void 0;var a=o[t];return e.I||!i(a)?a:a===x(e.t,t)?(k(e),e.o[t]=R(e.A.h,a,e)):a},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,n){var r=T(p(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=x(p(e),t),i=null==o?void 0:o[H];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(l(n,o)&&(void 0!==n||c(e.t,t)))return!0;k(e),I(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==x(e.t,t)||t in e.t?(e.R[t]=!1,k(e),I(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=p(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},W={};a(G,function(e,t){W[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),W.deleteProperty=function(e,t){return W.set.call(this,e,t,void 0)},W.set=function(e,t,n){return G.set.call(this,e[0],t,n,e[0])};var Y=new(function(){function e(e){var t=this;this.O=$,this.D=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var a,s=n;return n=e,function(e){var r=this;void 0===e&&(e=s);for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a1?r-1:0),i=1;i=0;n--){var n,r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=v("Patches").$;return o(e)?i(e,t):this.produce(e,function(e){return i(e,t)})},e}()),J=Y.produce;Y.produceWithPatches.bind(Y),Y.setAutoFreeze.bind(Y),Y.setUseProxies.bind(Y),Y.applyPatches.bind(Y),Y.createDraft.bind(Y),Y.finishDraft.bind(Y);var X=n(45217);function Q(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var ee=Q();ee.withExtraArgument=Q,n(34155);var et=(j=function(e,t){return(j=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),en=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;t--){var o=e[t][H];if(!o.P)switch(o.i){case 5:r(o)&&I(o);break;case 4:n(o)&&I(o)}}}function n(e){for(var t=e.t,n=e.k,r=Z(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==H){var a=t[i];if(void 0===a&&!c(t,i))return!0;var s=n[i],u=s&&s[H];if(u?u.t!==a:!l(s,a))return!0}}var f=!!t[H];return r.length!==Z(t).length+(f?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),c=e=>s(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,u=e=>{let{region:t,useFipsEndpoint:n}=e;if(!t)throw Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return c(t);let e=await t();return c(e)},useFipsEndpoint:async()=>{let e="string"==typeof t?t:await t();return!!s(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}}},14912:function(e,t,n){"use strict";n.d(t,{Pg:function(){return w},y7:function(){return u},Jx:function(){return S},Qj:function(){return _},kr:function(){return E},iF:function(){return P}});var r,o,i=n(50761),a=n(44562);class s{constructor(e){if(this.bytes=e,8!==e.byteLength)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x7fffffffffffffff||e<-0x8000000000000000)throw Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);let t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&c(t),new s(t)}valueOf(){let e=this.bytes.slice(0),t=128&e[0];return t&&c(e),parseInt((0,a.N)(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function c(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class u{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){let t=[];for(let n of Object.keys(e)){let r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}let n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":let r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":let o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);let i=new Uint8Array(o.buffer);return i.set(e.value,3),i;case"string":let c=this.fromUtf8(e.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,7),u.setUint16(1,c.byteLength,!1);let l=new Uint8Array(u.buffer);return l.set(c,3),l;case"timestamp":let f=new Uint8Array(9);return f[0]=8,f.set(s.fromNumber(e.value.valueOf()).bytes,1),f;case"uuid":if(!b.test(e.value))throw Error(`Invalid UUID received: ${e.value}`);let d=new Uint8Array(17);return d[0]=9,d.set((0,a.H)(e.value.replace(/\-/g,"")),1),d}}parse(e){let t={},n=0;for(;ne,isEndOfStream:()=>t}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){let n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,o=new Uint8Array(r),a=new DataView(o.buffer,o.byteOffset,o.byteLength),s=new i.Crc32;return a.setUint32(0,r,!1),a.setUint32(4,n.byteLength,!1),a.setUint32(8,s.update(o.subarray(0,8)).digest(),!1),o.set(n,12),o.set(t,n.byteLength+12),a.setUint32(r-4,s.update(o.subarray(8,r-4)).digest(),!1),o}decode(e){let{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw Error("Provided message too short to accommodate event stream message overhead");let r=new DataView(n,t,e),o=r.getUint32(0,!1);if(e!==o)throw Error("Reported message length does not match received message length");let a=r.getUint32(4,!1),s=r.getUint32(8,!1),c=r.getUint32(e-4,!1),u=new i.Crc32().update(new Uint8Array(n,t,8));if(s!==u.digest())throw Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${u.digest()})`);if(u.update(new Uint8Array(n,t+8,e-12)),c!==u.digest())throw Error(`The message checksum (${u.digest()}) did not match the expected value of ${c}`);return{headers:new DataView(n,t+8+4,a),body:new Uint8Array(n,t+8+4+a,o-a-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class S{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let e of this.options.inputStream){let t=this.options.decoder.decode(e);yield t}}}class _{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let e of this.options.messageStream){let t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class E{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let e of this.options.messageStream){let t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class P{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async *asyncIterator(){for await(let e of this.options.inputStream){let t=this.options.serializer(e);yield t}}}},71993:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(55821),o=n(61117),i=n(50761),a=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,o.isEmptyData)(e)||this.crc32.update((0,o.convertToBuffer)(e))},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,function(){return r.__generator(this,function(e){return[2,(0,o.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new i.Crc32},e}();t.AwsCrc32=a},50761:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(55821),o=n(61117);t.crc32=function(e){return new i().update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var o=r.__values(e),i=o.next();!i.done;i=o.next()){var s=i.value;this.checksum=this.checksum>>>8^a[(this.checksum^s)&255]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=(0,o.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]),s=n(71993);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return s.AwsCrc32}})},55821:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return b},__asyncValues:function(){return S},__await:function(){return v},__awaiter:function(){return l},__classPrivateFieldGet:function(){return O},__classPrivateFieldSet:function(){return A},__createBinding:function(){return d},__decorate:function(){return s},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return f},__importDefault:function(){return P},__importStar:function(){return E},__makeTemplateObject:function(){return _},__metadata:function(){return u},__param:function(){return c},__read:function(){return y},__rest:function(){return a},__spread:function(){return g},__spreadArrays:function(){return m},__values:function(){return h}});/*! ***************************************************************************** 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 r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},91728:function(e,t,n){"use strict";var r=n(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(98143),i=void 0!==r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},61117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(91728);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(27948);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(54237);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(57553);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},27948:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},54237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},57553:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;ne||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);let n=this.config.requestTimeout;if(t?.aborted){let e=Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let i=e.path,a=function(e){let t=[];for(let n of Object.keys(e).sort()){let r=e[n];if(n=(0,o.i)(n),Array.isArray(r))for(let e=0,i=r.length;e{let t=e.headers,n={};for(let e of t.entries())n[e[0]]=e[1];let o=void 0!=e.body;return o?{response:new r.Zn({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then(t=>({response:new r.Zn({headers:n,reason:e.statusText,statusCode:e.status,body:t})}))}),function(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{let t=Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)},e)})}(n)];return t&&h.push(new Promise((e,n)=>{t.onabort=()=>{let e=Error("Request aborted");e.name="AbortError",n(e)}})),Promise.race(h)}}var a=n(10687);let s=e=>"function"==typeof Blob&&e instanceof Blob?c(e):u(e);async function c(e){let t=await new Promise((t,n)=>{let r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(Error("Reader aborted too early"));let e=r.result??"",o=e.indexOf(","),i=o>-1?o+1:e.length;t(e.substring(i))},r.onabort=()=>n(Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}),n=(0,a.G)(t);return new Uint8Array(n)}async function u(e){let t=new Uint8Array(0),n=e.getReader(),r=!1;for(;!r;){let{done:e,value:o}=await n.read();if(o){let e=t;(t=new Uint8Array(e.length+o.length)).set(e),t.set(o,e.length)}r=e}return t}},33131:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});let r=e=>()=>Promise.reject(e)},52326:function(e,t,n){"use strict";n.d(t,{VG:function(){return a}});var r=n(88501);let o="content-length",i={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},a=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{let i=t.request;if(r.aW.isInstance(i)){let{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map(e=>e.toLowerCase()).indexOf(o))try{let t=n(e);i.headers={...i.headers,[o]:String(t)}}catch(e){}}return e({...t,request:i})}),i)}})},31974:function(e,t,n){"use strict";n.d(t,{a3:function(){return y},uW:function(){return b}});var r=n(45410);let o=async e=>{let t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),u(t)){if(!0===e.ForcePathStyle)throw Error("Path-style addressing cannot be used with ARN buckets")}else c(t)&&(-1===t.indexOf(".")||String(e.Endpoint).startsWith("http:"))&&t.toLowerCase()===t&&!(t.length<3)||(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},i=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,a=/(\d+\.){3}\d+/,s=/\.\./,c=e=>i.test(e)&&!a.test(e)&&!s.test(e),u=e=>{let[t,n,r,o,i,a]=e.split(":"),s="arn"===t&&e.split(":").length>=6,c=5===[t,n,r,i,a].filter(Boolean).length;if(s&&!c)throw Error(`Invalid ARN: ${e} was an invalid ARN.`);return"arn"===t&&!!n&&!!r&&!!i&&!!a},l=(e,t,n)=>{let r=async()=>{let r=n[e]??n[t];return"function"==typeof r?r():r};return"endpoint"===e||"endpoint"===t?async()=>{let e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){let{protocol:t,hostname:n,port:r,path:o}=e;return`${t}//${n}${r?":"+r:""}${o}`}}return e}:r},f=async(e,t,n,r)=>{let o=await d(e,t,n);if("function"!=typeof n.endpointProvider)throw Error("config.endpointProvider is not set.");let i=n.endpointProvider(o,r);return i},d=async(e,t,n)=>{let r={},i=t?.getEndpointParameterInstructions?.()||{};for(let[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await l(o.name,t,n)();break;default:throw Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await o(r),r},p=({config:e,instructions:t})=>(n,r)=>async o=>{let i=await f(o.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=i,r.authSchemes=i.properties?.authSchemes;let a=r.authSchemes?.[0];return a&&(r.signing_region=a.signingRegion,r.signing_service=a.signingName),n({...o})},h={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:r.JK.name},y=(e,t)=>({applyToStack:n=>{n.addRelativeTo(p({config:e,instructions:t}),h)}});var g=n(59988),m=n(93294);let v=e=>"object"==typeof e?"url"in e?(0,m.e)(e.url):e:(0,m.e)(e),b=e=>{let t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>v(await (0,g.$)(n)()):void 0,o=!!n;return{...e,endpoint:r,tls:t,isCustomEndpoint:o,useDualstackEndpoint:(0,g.$)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,g.$)(e.useFipsEndpoint??!1)}}},11511:function(e,t,n){"use strict";n.d(t,{gn:function(){return d},NQ:function(){return A},BC:function(){return u}});var r,o=n(63660),i=n(88501),a=n(59988);let s="AWS_MAX_ATTEMPTS",c="max_attempts";e=>{let t=e[s];if(!t)return;let n=parseInt(t);if(Number.isNaN(n))throw Error(`Environment variable ${s} mast be a number, got "${t}"`);return n},o.J;let u=e=>{let{retryStrategy:t}=e,n=(0,a.$)(e.maxAttempts??o.J);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;let r=await (0,a.$)(e.retryMode)();return r===o.Ul.ADAPTIVE?new o.AY(n):new o.Uz(n)}}};e=>e.AWS_RETRY_MODE,o.CA;let l=()=>e=>async t=>{let{request:n}=t;return i.aW.isInstance(n)&&(delete n.headers[o.lk],delete n.headers[o.r5]),e(t)},f={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},d=e=>({applyToStack:e=>{e.addRelativeTo(l(),f)}});for(var p=n(87568),h=new Uint8Array(16),y=/^(?:[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=[],m=0;m<256;++m)g.push((m+256).toString(16).substr(1));var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]).toLowerCase();if(!("string"==typeof n&&y.test(n)))throw TypeError("Stringified UUID is invalid");return n},b=function(e,t,n){var o=(e=e||{}).random||(e.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(h)})();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=o[i];return t}return v(o)};let w=e=>e instanceof Error?e:e instanceof Object?Object.assign(Error(),e):"string"==typeof e?Error(e):Error(`AWS SDK error wrapper for ${e}`),S=e=>(t,n)=>async r=>{let a=await e.retryStrategy(),s=await e.maxAttempts();if(!_(a))return a?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",a.mode]]),a.retry(t,r);{let e=await a.acquireInitialRetryToken(n.partition_id),c=Error(),u=0,l=0,{request:f}=r;for(i.aW.isInstance(f)&&(f.headers[o.lk]=b());;)try{i.aW.isInstance(f)&&(f.headers[o.r5]=`attempt=${u+1}; max=${s}`);let{response:n,output:c}=await t(r);return a.recordSuccess(e),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=l,{response:n,output:c}}catch(r){let t=E(r);c=w(r);try{e=await a.refreshRetryTokenForRetry(e,t)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=l,c}u=e.getRetryCount();let n=e.getRetryDelay();l+=n,await new Promise(e=>setTimeout(e,n))}}},_=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,E=e=>{let t={errorType:P(e)},n=C(e.$response);return n&&(t.retryAfterHint=n),t},P=e=>(0,p.pK)(e)?"THROTTLING":(0,p.iH)(e)?"TRANSIENT":(0,p.o7)(e)?"SERVER_ERROR":"CLIENT_ERROR",O={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},A=e=>({applyToStack:t=>{t.add(S(e),O)}}),C=e=>{if(!i.Zn.isInstance(e))return;let t=Object.keys(e.headers).find(e=>"retry-after"===e.toLowerCase());if(!t)return;let n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);let o=new Date(n);return o}},45410:function(e,t,n){"use strict";n.d(t,{p2:function(){return s},JK:function(){return a}});let r=(e,t)=>(n,r)=>async r=>{let{response:o}=await n(r);try{let n=await t(o,e);return{response:o,output:n}}catch(e){throw Object.defineProperty(e,"$response",{value:o}),"$metadata"in e||(e.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object."),e}},o=(e,t)=>(n,r)=>async o=>{let i=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!i)throw Error("No valid endpoint provider available.");let a=await t(o.input,{...e,endpoint:i});return n({...o,request:a})},i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},a={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function s(e,t,n){return{applyToStack:s=>{s.add(r(e,n),i),s.add(o(e,t),a)}}}},8243:function(e,t,n){"use strict";n.d(t,{H:function(){return r}});let r=(e,t,n)=>{let r,o,i;let a=!1,s=async()=>{o||(o=e());try{r=await o,i=!0,a=!1}finally{o=void 0}return r};return void 0===t?async e=>((!i||e?.forceRefresh)&&(r=await s()),r):async e=>((!i||e?.forceRefresh)&&(r=await s()),a||(n&&!n(r)?a=!0:t(r)&&await s()),r)}},88501:function(e,t,n){"use strict";n.d(t,{aW:function(){return r},Zn:function(){return o}}),n(64370);class r{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){return!!e&&"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&"object"==typeof e.query&&"object"==typeof e.headers}clone(){var e;let t=new r({...this,headers:{...this.headers}});return t.query&&(t.query=Object.keys(e=t.query).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})),t}}class o{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){return!!e&&"number"==typeof e.statusCode&&"object"==typeof e.headers}}},87568:function(e,t,n){"use strict";n.d(t,{o7:function(){return u},pK:function(){return s},iH:function(){return c}});let r=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],o=["TimeoutError","RequestTimeout","RequestTimeoutException"],i=[500,502,503,504],a=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],s=e=>e.$metadata?.httpStatusCode===429||r.includes(e.name)||e.$retryable?.throttling==!0,c=e=>o.includes(e.name)||a.includes(e?.code||"")||i.includes(e.$metadata?.httpStatusCode||0),u=e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!c(e))return!0}return!1}},44588:function(e,t,n){"use strict";n.d(t,{KU:function(){return s},mY:function(){return p},vk:function(){return r},oc:function(){return h},sI:function(){return O},F3:function(){return $},Wg:function(){return d},to:function(){return A},CE:function(){return g},Fx:function(){return y},Wh:function(){return m},pY:function(){return v},jv:function(){return I},UI:function(){return R},KX:function(){return P},Is:function(){return F},qn:function(){return M},PC:function(){return x}});class r{trace(){}debug(){}info(){}warn(){}error(){}}let o=()=>{let e=[],t=[],n=new Set,r=e=>e.sort((e,t)=>i[t.step]-i[e.step]||a[t.priority||"normal"]-a[e.priority||"normal"]),s=r=>{let o=!1,i=e=>!e.name||e.name!==r||(o=!0,n.delete(r),!1);return e=e.filter(i),t=t.filter(i),o},c=r=>{let o=!1,i=e=>e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1);return e=e.filter(i),t=t.filter(i),o},u=n=>(e.forEach(e=>{n.add(e.middleware,{...e})}),t.forEach(e=>{n.addRelativeTo(e.middleware,{...e})}),n),l=e=>{let t=[];return e.before.forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...l(e))}),t.push(e),e.after.reverse().forEach(e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...l(e))}),t},f=(n=!1)=>{let o=[],i=[],a={};e.forEach(e=>{let t={...e,before:[],after:[]};t.name&&(a[t.name]=t),o.push(t)}),t.forEach(e=>{let t={...e,before:[],after:[]};t.name&&(a[t.name]=t),i.push(t)}),i.forEach(e=>{if(e.toMiddleware){let t=a[e.toMiddleware];if(void 0===t){if(n)return;throw Error(`${e.toMiddleware} is not found when adding ${e.name||"anonymous"} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}});let s=r(o).map(l).reduce((e,t)=>(e.push(...t),e),[]);return s},d={add:(t,r={})=>{let{name:o,override:i}=r,a={step:"initialize",priority:"normal",middleware:t,...r};if(o){if(n.has(o)){if(!i)throw Error(`Duplicate middleware name '${o}'`);let t=e.findIndex(e=>e.name===o),n=e[t];if(n.step!==a.step||n.priority!==a.priority)throw Error(`"${o}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by same-name middleware with ${a.priority} priority in ${a.step} step.`);e.splice(t,1)}n.add(o)}e.push(a)},addRelativeTo:(e,r)=>{let{name:o,override:i}=r,a={middleware:e,...r};if(o){if(n.has(o)){if(!i)throw Error(`Duplicate middleware name '${o}'`);let e=t.findIndex(e=>e.name===o),n=t[e];if(n.toMiddleware!==a.toMiddleware||n.relation!==a.relation)throw Error(`"${o}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by same-name middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(e,1)}n.add(o)}t.push(a)},clone:()=>u(o()),use:e=>{e.applyToStack(d)},remove:e=>"string"==typeof e?s(e):c(e),removeByTag:r=>{let o=!1,i=e=>{let{tags:t,name:i}=e;return!(t&&t.includes(r))||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:e=>{let t=u(o());return t.use(e),t},applyToStack:u,identify:()=>f(!0).map(e=>e.name+": "+(e.tags||[]).join(",")),resolve:(e,t)=>{for(let n of f().map(e=>e.middleware).reverse())e=n(e,t);return e}};return d},i={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1};class s{constructor(e){this.middlewareStack=o(),this.config=e}send(e,t,n){let r="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,"function"!=typeof t?t:void 0);if(!r)return o(e).then(e=>e.output);o(e).then(e=>r(null,e.output),e=>r(e)).catch(()=>{})}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}var c=n(10687),u=n(68504),l=n(37916);class f extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return"base64"===t?f.mutate((0,c.G)(e)):f.mutate((0,l.$)(e));throw Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,f.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?(0,c.s)(e):(0,u.G)(e)}(this,e)}}n(39627),n(44562);let d=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return f.mutate(e);if(!e)return f.mutate(new Uint8Array);let n=t.streamCollector(e);return f.mutate(await n)};class p{constructor(){this.middlewareStack=o()}}let h="***SensitiveInformation***",y=e=>{if(null!=e){if("string"==typeof e){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&E.warn(_(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw TypeError(`Expected number, got ${typeof e}: ${e}`)}},g=(e,t)=>{if(null==e){if(t)throw TypeError(`Expected a non-null value for ${t}`);throw TypeError("Expected a non-null value")}return e},m=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw TypeError(`Expected object, got ${t}: ${e}`)},v=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return E.warn(_(`Expected string, got ${typeof e}: ${e}`)),String(e);throw TypeError(`Expected string, got ${typeof e}: ${e}`)}},b=e=>"string"==typeof e?y(S(e)):y(e),w=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,S=e=>{let t=e.match(w);if(null===t||t[0].length!==e.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat(e)},_=e=>String(TypeError(e).stack||e).split("\n").slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join("\n"),E={warn:console.warn},P=e=>{let t;if(null!=e){if("number"==typeof e)t=e;else if("string"==typeof e)t=b(e);else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(1e3*t))}};class O extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,O.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}let A=(e,t={})=>{Object.entries(t).filter(([,e])=>void 0!==e).forEach(([t,n])=>{(void 0==e[t]||""===e[t])&&(e[t]=n)});let n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},C=({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{let o=T(e),i=o.httpStatusCode?o.httpStatusCode+"":void 0,a=new n({name:t?.code||t?.Code||r||i||"UnknownError",$fault:"client",$metadata:o});throw A(a,t)},x=e=>({output:t,parsedBody:n,errorCode:r})=>{C({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},T=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),I=e=>{switch(e){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{}}},k=function(){let e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,[null,...arguments]),n=new t;return Object.setPrototypeOf(n,e.prototype),n};function R(e,t,n){let r,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return j(r,t,o=n);o=t}for(let e of Object.keys(o)){if(!Array.isArray(o[e])){r[e]=o[e];continue}N(r,null,o,e)}return r}k.prototype=Object.create(String.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(k,String);let M=(e,t)=>{let n={};for(let r in t)N(n,e,t,r);return n},j=(e,t,n)=>R(e,Object.entries(n).reduce((e,[n,r])=>(Array.isArray(r)?e[n]=r:"function"==typeof r?e[n]=[t,r()]:e[n]=[t,r],e),{})),N=(e,t,n,r)=>{if(null!==t){let o=n[r];"function"==typeof o&&(o=[,o]);let[i=L,a=D,s=r]=o;("function"==typeof i&&i(t[s])||"function"!=typeof i&&i)&&(e[r]=a(t[s]));return}let[o,i]=n[r];if("function"==typeof i){let t;let n=void 0===o&&null!=(t=i()),a="function"==typeof o&&!!o(void 0)||"function"!=typeof o&&!!o;n?e[r]=t:a&&(e[r]=i())}else{let t=void 0===o&&null!=i,n="function"==typeof o&&!!o(i)||"function"!=typeof o&&!!o;(t||n)&&(e[r]=i)}},L=e=>null!=e,D=e=>e;function U(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}let F=(e,t,n,r,o,i)=>{if(null!=t&&void 0!==t[n]){let t=r();if(t.length<=0)throw Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(o,i?t.split("/").map(e=>U(e)).join("/"):U(t))}else throw Error("No value provided for input HTTP label: "+n+".");return e},$=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter(e=>null!=e);if("object"==typeof e){let t={};for(let n of Object.keys(e))null!=e[n]&&(t[n]=$(e[n]));return t}return e}},64370:function(e,t,n){"use strict";var r,o,i,a,s,c,u,l,f,d;n.d(t,{cj:function(){return o}}),(c=r||(r={})).HEADER="header",c.QUERY="query",(u=o||(o={})).HTTP="http",u.HTTPS="https",(l=i||(i={})).MD5="md5",l.CRC32="crc32",l.CRC32C="crc32c",l.SHA1="sha1",l.SHA256="sha256",(f=a||(a={}))[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",(d=s||(s={})).HTTP_0_9="http/0.9",d.HTTP_1_0="http/1.0",d.TDS_8_0="tds/8.0"},93294:function(e,t,n){"use strict";n.d(t,{e:function(){return r}});let r=e=>{let t;if("string"==typeof e)return r(new URL(e));let{hostname:n,pathname:o,port:i,protocol:a,search:s}=e;return s&&(t=function(e){let t={};if(e=e.replace(/^\?/,""))for(let n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:n,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},10687:function(e,t,n){"use strict";n.d(t,{G:function(){return i},s:function(){return a}});let r={},o=Array(64);for(let e=0;e+65<=90;e++){let t=String.fromCharCode(e+65);r[t]=e,o[e]=t}for(let e=0;e+97<=122;e++){let t=String.fromCharCode(e+97),n=e+26;r[t]=n,o[n]=t}for(let e=0;e<10;e++){r[e.toString(10)]=e+52;let t=e.toString(10),n=e+52;r[t]=n,o[n]=t}r["+"]=62,o[62]="+",r["/"]=63,o[63]="/";let i=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;let n=new ArrayBuffer(t),o=new DataView(n);for(let t=0;t>=6;let a=t/4*3;n>>=i%8;let s=Math.floor(i/8);for(let e=0;e>t)}}return new Uint8Array(n)};function a(e){let t="";for(let n=0;n>n]}t+="==".slice(0,4-a)}return t}},90130:function(e,t,n){"use strict";n.d(t,{W:function(){return r}});let r=e=>{if("string"==typeof e){let t=e.length;for(let n=t-1;n>=0;n--){let r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw Error(`Body Length computation failed for ${e}`)}},95419:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(8243),o=n(51206),i=n.n(o);let a=["in-region","cross-region","mobile","standard","legacy"],s=({defaultsMode:e}={})=>(0,r.H)(async()=>{let t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(c()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw Error(`Invalid parameter for "defaultsMode", expect ${a.join(", ")}, got ${t}`)}}),c=()=>{let e="undefined"!=typeof window&&window?.navigator?.userAgent?i().parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t}},44562:function(e,t,n){"use strict";n.d(t,{H:function(){return i},N:function(){return a}});let r={},o={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),r[e]=t,o[t]=e}function i(e){if(e.length%2!=0)throw Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let n=0;n{if("function"==typeof e)return e;let t=Promise.resolve(e);return()=>t}},63660:function(e,t,n){"use strict";n.d(t,{AY:function(){return h},J:function(){return r},CA:function(){return o},lk:function(){return u},r5:function(){return l},Ul:function(){return a},Uz:function(){return p}}),(i=a||(a={})).STANDARD="standard",i.ADAPTIVE="adaptive";let r=3,o=a.STANDARD;var i,a,s=n(87568);class c{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,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(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(e=>setTimeout(e,t))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),(0,s.pK)(e)){let e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){let e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}let u="amz-sdk-invocation-id",l="amz-sdk-request",f=()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},d=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class p{constructor(e){this.maxAttempts=e,this.mode=a.STANDARD,this.capacity=500,this.retryBackoffStrategy=f(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return d({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){let n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){let n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);let r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),o=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,i=this.getCapacityCost(n);return this.capacity-=i,d({retryDelay:o,retryCount:e.getRetryCount()+1,retryCost:i})}throw Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${r}`),r}}shouldRetry(e,t,n){let r=e.getRetryCount()+1;return r=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class h{constructor(e,t){this.maxAttemptsProvider=e,this.mode=a.ADAPTIVE;let{rateLimiter:n}=t??{};this.rateLimiter=n??new c,this.standardRetryStrategy=new p(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}},55388:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r=e=>encodeURIComponent(e).replace(/[!'()*]/g,o),o=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`},37916:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});let r=e=>new TextEncoder().encode(e)},12532:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(37916);let o=e=>"string"==typeof e?(0,r.$)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)},68504:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});let r=e=>new TextDecoder("utf-8").decode(e)},89348:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Role=void 0,(n=t.Role||(t.Role={})).MASTER="MASTER",n.VIEWER="VIEWER"},91055:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigV4RequestSigner=void 0;var r=n(12871),o=r.__importDefault(n(80898)),i=n(92434),a=function(){function e(t,n,r){void 0===r&&(r=e.DEFAULT_SERVICE),this.region=t,this.credentials=n,this.service=r}return e.prototype.getSignedURL=function(t,n,o){return void 0===o&&(o=new Date),r.__awaiter(this,void 0,void 0,function(){var a,s,c,u,l,f,d,p,h,y,g,m,v,b,w,S,_,E,P,O,A;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,i.validateValueNonNil)(this.credentials.accessKeyId,"credentials.accessKeyId"),(0,i.validateValueNonNil)(this.credentials.secretAccessKey,"credentials.secretAccessKey"),a=e.getDateTimeString(o),s=e.getDateString(o),c="wss",u="".concat(c,"://"),!t.startsWith(u))throw Error("Endpoint '".concat(t,"' is not a secure WebSocket endpoint. It should start with '").concat(u,"'."));if(t.includes("?"))throw Error("Endpoint '".concat(t,"' should not contain any query parameters."));return(l=t.indexOf("/",u.length))<0?(f=t.substring(u.length),d="/"):(f=t.substring(u.length,l),d=t.substring(l)),p="host",h="GET",y=s+"/"+this.region+"/"+this.service+"/aws4_request",g=Object.assign({},n,{"X-Amz-Algorithm":e.DEFAULT_ALGORITHM,"X-Amz-Credential":this.credentials.accessKeyId+"/"+y,"X-Amz-Date":a,"X-Amz-Expires":"299","X-Amz-SignedHeaders":p}),this.credentials.sessionToken&&Object.assign(g,{"X-Amz-Security-Token":this.credentials.sessionToken}),m=e.createQueryString(g),v={host:f},b=e.createHeadersString(v),[4,e.sha256("")];case 3:return w=[h,d,m,b,p,r.sent()].join("\n"),[4,e.sha256(w)];case 4:return S=r.sent(),_=[e.DEFAULT_ALGORITHM,a,y,S].join("\n"),[4,this.getSignatureKey(s)];case 5:return E=r.sent(),O=(P=e).toHex,[4,e.hmac(E,_)];case 6:return[4,O.apply(P,[r.sent()])];case 7:return A=Object.assign({},g,{"X-Amz-Signature":r.sent()}),[2,c+"://"+f+d+"?"+e.createQueryString(A)]}})})},e.prototype.getSignatureKey=function(t){return r.__awaiter(this,void 0,void 0,function(){var n,o,i;return r.__generator(this,function(r){switch(r.label){case 0:return[4,e.hmac("AWS4"+this.credentials.secretAccessKey,t)];case 1:return n=r.sent(),[4,e.hmac(n,this.region)];case 2:return o=r.sent(),[4,e.hmac(o,this.service)];case 3:return i=r.sent(),[4,e.hmac(i,"aws4_request")];case 4:return[2,r.sent()]}})})},e.createHeadersString=function(e){return Object.keys(e).map(function(t){return"".concat(t,":").concat(e[t],"\n")}).join()},e.createQueryString=function(e){return Object.keys(e).sort().map(function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))}).join("&")},e.getDateTimeString=function(e){return e.toISOString().replace(/\.\d{3}Z$/,"Z").replace(/[:\-]/g,"")},e.getDateString=function(e){return this.getDateTimeString(e).substring(0,8)},e.sha256=function(e){return r.__awaiter(this,void 0,void 0,function(){var t;return r.__generator(this,function(n){switch(n.label){case 0:return[4,o.default.subtle.digest({name:"SHA-256"},this.toUint8Array(e))];case 1:return t=n.sent(),[2,this.toHex(t)]}})})},e.hmac=function(e,t){return r.__awaiter(this,void 0,void 0,function(){var n,i,a;return r.__generator(this,function(r){switch(r.label){case 0:return n="string"==typeof e?this.toUint8Array(e).buffer:e,i=this.toUint8Array(t).buffer,[4,o.default.subtle.importKey("raw",n,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"])];case 1:return a=r.sent(),[4,o.default.subtle.sign({name:"HMAC",hash:{name:"SHA-256"}},a,i)];case 2:return[2,r.sent()]}})})},e.toUint8Array=function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,o=e.length;rt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var n;(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,o,(t=e[n](t)).done,t.value)})}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function O(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function A(e,t,n){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},79742:function(e,t){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,i=c(e),a=i[0],s=i[1],u=new o((a+s)*3/4-s),l=0,f=s>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,s=r-o;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&i.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},51206:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,(function(t){return e[t]}).bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){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(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[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(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(n),a=Math.max(o,i),s=0,c=e.map([t,n],function(t){var n=a-e.getVersionPrecision(t),r=t+Array(n+1).join(".0");return e.map(r.split("."),function(e){return Array(20-e.length).join("0")+e}).reverse()});for(r&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]1?r-1:0),i=1;i0){var a=Object.keys(n),c=s.default.find(a,function(e){return t.isOS(e)});if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=s.default.find(a,function(e){return t.isPlatform(e)});if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),p=s.default.find(d,function(e){return t.isBrowser(e,!0)});if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(r);return t&&o&&(r=o.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(o,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=u,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=o.default.getFirstMatch(i,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},n=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=o.default.getMacOSVersionName(t),r={name:i.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=o.default.getAndroidVersionName(t),r={name:i.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:i.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=(r=n(17))&&r.__esModule?r:{default:r},i=n(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},n=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},n=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},n=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},n=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=a,e.exports=t.default}})},48764:function(e,t,n){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var r=n(79742),o=n(80645),i=n(5826);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return x(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return I(e).length;default:if(r)return x(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var o,i,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r,o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);for(var i="",a=t;a2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),isNaN(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return -1;n=e.length-1}else if(n<0){if(!o)return -1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return(t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,d=0;d239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:(192&(i=e[o+1]))==128&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],(192&i)==128&&(192&a)==128&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],(192&i)==128&&(192&a)==128&&(192&s)==128&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rn)throw RangeError("Trying to access beyond buffer length")}function S(e,t,n,r,o,i){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw RangeError("Index out of range")}function _(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>(r?o:1-o)*8}function E(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>(r?o:3-o)*8&255}function P(e,t,n,r,o,i){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function O(e,t,n,r,i){return i||P(e,t,n,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,i){return i||P(e,t,n,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,n,r,52,8),n+8}t.lW=c,t.h2=50,c.TYPED_ARRAY_SUPPORT=void 0!==n.g.TYPED_ARRAY_SUPPORT?n.g.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return(l(e),e<=0)?s(null,e):void 0!==t?"string"==typeof n?s(null,e).fill(t,n):s(null,e).fill(t):s(null,e)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!!(null!=e&&e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var i=o-r,a=n-t,s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fg)&&(n=g),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var m=!1;;)switch(r){case"hex":return function(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o.push(n%256),o.push(r);return o}(e,this.length-h),this,h,y);default:if(m)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),m=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},c.prototype.slice=function(e,t){var n,r=this.length;if(e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||w(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||w(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||w(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||w(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||w(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return(t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},c.prototype.readInt16LE=function(e,t){t||w(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||w(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||w(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||w(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||w(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||w(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var o=Math.pow(2,8*n)-1;S(this,e,t,n,o,0)}var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):E(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):E(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);S(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);S(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):E(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):E(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw RangeError("sourceStart out of bounds");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!o){if(n>56319||a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return i}function T(e){for(var t=[],n=0;n=t.length)&&!(o>=e.length);++o)t[o+n]=e[o];return o}},25643:function(e){e.exports=!1},17187:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise(function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&"function"==typeof e.on&&y(e,"error",o,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){if(s(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var o,i,a,u=Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,console&&console.warn&&console.warn(u)}return e}function l(){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 f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var a,s=Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else for(var u=c.length,l=h(c,u),n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},31230:function(e,t,n){"use strict";n.d(t,{HW:function(){return d},J9:function(){return y},Ps:function(){return f},_t:function(){return p},wO:function(){return h}});var r,o=n(97582),i=n(84275),a=new Map,s=new Map,c=!0,u=!1;function l(e){return e.replace(/[\s,]+/g," ").trim()}function f(e){for(var t=[],n=1;n */t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,d=23===o?5960464477539062e-23:0,p=r?0:i-1,h=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+f>=1?t+=d/c:t+=d*Math.pow(2,1-f),t*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=h,a/=256,u-=8);e[n+p-h]|=128*y}},5826:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(71842)}])},71842:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return ov}});var i,a,s=n(85893);n(67294),n(93814);var c=n(57632),u=n(9008),l=n.n(u),f=n(2178),d=n(31955),p=n(62645),h=n(32017);{let e=window.location.pathname;window.onerror=(t,n,r,o,i)=>{p.vU("window.onerror(): msg: ".concat(t,", url: ").concat(n,", lineNo: ").concat(r,", columnNo: ").concat(o)),(0,h.f)("event","skelly_error",{skelly_event_action:"window.onerror",skelly_event_pathname:e,skelly_event_source:n?"".concat(n,"?").concat(r,":").concat(o):void 0,skelly_event_label:t||void 0})},window.onunhandledrejection=t=>{p.vU("window.onunhandledrejection(): event.reason: ".concat(t.reason,",")),(0,h.f)("event","skelly_error",{skelly_event_action:"window.onunhandledrejection",skelly_event_pathname:e,skelly_event_source:"Uncaught (in promise)",skelly_event_label:t.reason?t.reason:void 0})},document.addEventListener("error",t=>{if("string"==typeof t.target.outerHTML){let e=t.target.outerHTML;if(e.includes("adservice.google")||e.includes("www.googletagservices.com")||e.includes("googlesyndication")||e.includes("securepubads.g.doubleclick.net")||e.includes("content.overwolf.com"))return}let n={action:"document.error",pathname:e+t.target&&t.target.baseURI?t.target.baseURI.replace("overwolf-extension://elhafgldkenhhgfkfpcdhemiebkhbgibncgnbnpb",""):"",source:t.target.constructor.name,label:t.target&&t.target.outerHTML?t.target&&t.target.outerHTML:void 0};p.vU("document.error(): ".concat(JSON.stringify(n))),(0,h.f)("event","skelly_error",{...n})},!0)}var y=n(77236),g="persist:",m="persist/FLUSH",v="persist/REHYDRATE",b="persist/PAUSE",w="persist/PERSIST",S="persist/PURGE",_="persist/REGISTER";function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function O(e,t,n,r){r.debug;var o=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(h,["_persist"]);if(f.type===w){var E=!1,P=function(t,n){E||(f.rehydrate(e.key,t,n),E=!0)};if(i&&setTimeout(function(){E||P(void 0,Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},i),c=!1,a||(a=function(e){var t,n=e.blacklist||null,r=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,a="".concat(void 0!==e.keyPrefix?e.keyPrefix:g).concat(e.key),s=e.storage;t=!1===e.serialize?function(e){return e}:"function"==typeof e.serialize?e.serialize:A;var c=e.writeFailHandler||null,u={},l={},f=[],d=null,p=null;function h(){if(0===f.length){d&&clearInterval(d),d=null;return}var e=f.shift(),n=o.reduce(function(t,n){return n.in(t,e,u)},u[e]);if(void 0!==n)try{l[e]=t(n)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}else delete l[e];0===f.length&&(Object.keys(l).forEach(function(e){void 0===u[e]&&delete l[e]}),p=s.setItem(a,t(l)).catch(m))}function y(e){return(!r||-1!==r.indexOf(e)||"_persist"===e)&&(!n||-1===n.indexOf(e))}function m(e){c&&c(e)}return{update:function(e){Object.keys(e).forEach(function(t){y(t)&&u[t]!==e[t]&&-1===f.indexOf(t)&&f.push(t)}),Object.keys(u).forEach(function(t){void 0===e[t]&&y(t)&&-1===f.indexOf(t)&&void 0!==u[t]&&f.push(t)}),null===d&&(d=setInterval(h,i)),u=e},flush:function(){for(;0!==f.length;)h();return p||Promise.resolve()}}}(e)),y)return k({},t(_,f),{_persist:y});if("function"!=typeof f.rehydrate||"function"!=typeof f.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 f.register(e.key),o(e).then(function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,n).then(function(e){P(e)},function(e){P(void 0,e)})},function(e){P(void 0,e)}),k({},t(_,f),{_persist:{version:n,rehydrated:!1}})}if(f.type===S)return s=!0,f.result((d=e.storage,p="".concat(void 0!==e.keyPrefix?e.keyPrefix:g).concat(e.key),d.removeItem(p,T))),k({},t(_,f),{_persist:y});if(f.type===m)return f.result(a&&a.flush()),k({},t(_,f),{_persist:y});if(f.type===b)c=!0;else if(f.type===v){if(s)return k({},_,{_persist:k({},y,{rehydrated:!0})});if(f.key===e.key){var O=t(_,f),C=f.payload;return u(k({},!1!==r&&void 0!==C?r(C,l,O,e):O,{_persist:k({},y,{rehydrated:!0})}))}}if(!y)return t(l,f);var x=t(_,f);return x===_?l:u(k({},x,{_persist:y}))}}var M=n(45217);function j(e){return function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:D,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _:return L({},e,{registry:[].concat(j(e.registry),[t.key])});case v:var n=e.registry.indexOf(t.key),r=j(e.registry);return r.splice(n,1),L({},e,{registry:r,bootstrapped:0===r.length});default:return e}},F=n(91881),$=n(43670),B=n(27526),z=n(66848);let H=(0,y.oM)({name:"webRTC",initialState:{isLocalMediaStreamActive:!1,outgoingCalls:{},incomingCalls:{},connections:{}},reducers:{addIncomingCall:(e,t)=>{p.ZP.log("webRTCSlice.addIncomingCall(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,type:r}=t.payload;e.incomingCalls[n]={type:r,timestamp:Math.round(Date.now()/1e3)}},removeIncomingCall:(e,t)=>{p.ZP.log("webRTCSlice.removeIncomingCall(action: ".concat(JSON.stringify(t.payload),"): Called")),delete e.incomingCalls[t.payload]},acceptIncomingCall:(e,t)=>{p.ZP.log("webRTCSlice.acceptIncomingCall(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,type:r}=t.payload;if(!e.incomingCalls[n]){p.ZP.warn("webRTCSlice.acceptIncomingCall(): No incoming call found");return}eu(e,n,r,e.incomingCalls[n].type),delete e.incomingCalls[n]},addOutgoingCall:(e,t)=>{p.ZP.log("webRTCSlice.addOutgoingCall(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,type:r}=t.payload;e.outgoingCalls[n]={type:r,timestamp:Math.round(Date.now()/1e3)}},removeOutgoingCall:(e,t)=>{p.ZP.log("webRTCSlice.removeOutgoingCall(action: ".concat(t.payload,"): Called")),delete e.outgoingCalls[t.payload]},outgoingCallAccepted:(e,t)=>{p.ZP.log("webRTCSlice.outgoingCallAccepted(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,type:r}=t.payload;if(!e.outgoingCalls[n]){p.ZP.log("webRTCSlice.outgoingCallAccepted(): Retruning as there is no outgoing call with ".concat(n));return}eu(e,n,e.outgoingCalls[n].type,r),delete e.outgoingCalls[n]},localMediaStreamError:(e,t)=>{p.ZP.log("webRTCSlice.localMediaStreamError(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,name:r,message:o}=t.payload;e.localMediaStreamError={name:r,message:o}},setRemoteAudio:(e,t)=>{p.ZP.log("webRTCSlice.setRemoteAudio(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,remoteAudio:r}=t.payload;e.connections[n]?e.connections[n].remoteAudio=r:p.ZP.error("webRTCSlice.setRemoteAudio(): No connection with ".concat(n))},setRemoteVideo:(e,t)=>{p.ZP.log("webRTCSlice.setRemoteVideo(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,remoteVideo:r}=t.payload;e.connections[n]?e.connections[n].remoteVideo=r:p.ZP.error("webRTCSlice.setRemoteVideo(): No connection with ".concat(n))},updateConnectionState:(e,t)=>{p.ZP.log("webRTCSlice.updateConnectionState(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,connectionState:r}=t.payload;e.connections[n]?e.connections[n].state=r:p.ZP.log("webRTCSlice.connectionError(): No connection with ".concat(n))},updateLocalMediaStream:(e,t)=>{let n=t.payload;void 0!==n&&(e.isLocalMediaStreamActive=n),e.localMediaStreamVersion=(e.localMediaStreamVersion||0)+1},setLocalAudio:(e,t)=>{e.localAudio=t.payload},setLocalVideo:(e,t)=>{e.localVideo=t.payload},setLocalScreenSharing:(e,t)=>{e.localScreenSharing=t.payload},setLocalDeafen:(e,t)=>{let n=t.payload;e.localDeafen=n,!0===n&&(e.localAudio=!1)},updateRemoteMediaStream:(e,t)=>{p.ZP.log("webRTCSlice.updateRemoteMediaStream(action: ".concat(JSON.stringify(t.payload),"): Called"));let{friendId:n,isActive:r}=t.payload;e.connections[n]&&(e.connections[n].remoteMediaStreamsVersion=(e.connections[n].remoteMediaStreamsVersion||0)+1,e.connections[n].isRemoteMediaStreamActive=r)},leftCall:(e,t)=>{p.ZP.log("webRTCSlice.leftCall(friend id: ".concat(t.payload,"): Called"));let n=t.payload;delete e.connections[n]},leaveCall:e=>{p.ZP.log("webRTCSlice.leaveCall(): Called"),e.connections={},e.localMediaStreamVersion=(e.localMediaStreamVersion||0)+1,e.isLocalMediaStreamActive=!1,e.localAudio=void 0,e.localVideo=void 0,e.localScreenSharing=void 0,e.localDeafen=void 0}}}),{addIncomingCall:V,removeIncomingCall:Z,acceptIncomingCall:q,addOutgoingCall:K,removeOutgoingCall:G,outgoingCallAccepted:W,localMediaStreamError:Y,setRemoteAudio:J,setRemoteVideo:X,updateConnectionState:Q,updateLocalMediaStream:ee,setLocalAudio:et,setLocalVideo:en,setLocalScreenSharing:er,setLocalDeafen:eo,updateRemoteMediaStream:ei,leftCall:ea,leaveCall:es}=H.actions;var ec=H.reducer;function eu(e,t,n,r){e.connections[t]={isRemoteMediaStreamActive:!1,remoteAudio:!0,remoteVideo:"video"===r,remoteScreenSharing:!1},e.localAudio=!0,e.localVideo="video"===n,e.localScreenSharing=!1,e.localDeafen=!1}var el=n(76883),ef=n(18604),ed=n(84385),ep=n(87449),eh=n(76734);let ey={blacklist:["persist/PERSIST","persist/REHYDRATE"]};var eg=n(66280),em=n(96096),ev=n(44588);class eb extends ev.sI{constructor(e){super(e),Object.setPrototypeOf(this,eb.prototype)}}class ew extends eb{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,ew.prototype),this.Message=e.Message}}let eS={MASTER:"MASTER",VIEWER:"VIEWER"};class e_ extends eb{constructor(e){super({name:"ClientLimitExceededException",$fault:"client",...e}),this.name="ClientLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,e_.prototype),this.Message=e.Message}}class eE extends eb{constructor(e){super({name:"InvalidArgumentException",$fault:"client",...e}),this.name="InvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,eE.prototype),this.Message=e.Message}}class eP extends eb{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,eP.prototype),this.Message=e.Message}}class eO extends eb{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,eO.prototype),this.Message=e.Message}}var eA=n(88501);let eC=e=>t=>async n=>{if(!eA.aW.isInstance(n.request))return t(n);let{request:r}=n,{handlerProtocol:o=""}=e.requestHandler.metadata||{};if(o.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]="";else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)},ex={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},eT=e=>({applyToStack:t=>{t.add(eC(e),ex)}}),eI=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:o,commandName:i,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=s,l=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:d,...p}=r.output;return a?.info?.({clientName:o,commandName:i,input:l(n.input),output:f(p),metadata:d}),r}catch(c){let{clientName:e,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:a}=i,s=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:e,commandName:r,input:s(n.input),error:c,metadata:c.$metadata}),c}},ek={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},eR=e=>({applyToStack:e=>{e.add(eI(),ek)}});var eM=n(71769),ej=n(8243),eN=n(14912),eL=n(44562),eD=n(59988),eU=n(68504),eF=n(37916),e$=n(12532);let eB="X-Amz-Date",ez="X-Amz-Signature",eH="X-Amz-Security-Token",eV="authorization",eZ=eB.toLowerCase(),eq=[eV,eZ,"date"],eK=ez.toLowerCase(),eG="x-amz-content-sha256",eW=eH.toLowerCase(),eY={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},eJ=/^proxy-/,eX=/^sec-/,eQ="AWS4-HMAC-SHA256",e0="aws4_request",e1={},e2=[],e5=(e,t,n)=>`${e}/${t}/${n}/${e0}`,e3=async(e,t,n,r,o)=>{let i=await e6(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${(0,eL.N)(i)}:${t.sessionToken}`;if(a in e1)return e1[a];for(e2.push(a);e2.length>50;)delete e1[e2.shift()];let s=`AWS4${t.secretAccessKey}`;for(let t of[n,r,o,e0])s=await e6(e,s,t);return e1[a]=s},e6=(e,t,n)=>{let r=new e(t);return r.update((0,e$._)(n)),r.digest()},e4=({headers:e},t,n)=>{let r={};for(let o of Object.keys(e).sort()){if(void 0==e[o])continue;let i=o.toLowerCase();(!(i in eY||t?.has(i)||eJ.test(i)||eX.test(i))||n&&(!n||n.has(i)))&&(r[i]=e[o].trim().replace(/\s+/g," "))}return r};var e8=n(55388);let e7=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e).sort()){if(r.toLowerCase()===eK)continue;t.push(r);let o=e[r];"string"==typeof o?n[r]=`${(0,e8.i)(r)}=${(0,e8.i)(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce((e,t)=>e.concat([`${(0,e8.i)(r)}=${(0,e8.i)(t)}`]),[]).sort().join("&"))}return t.map(e=>n[e]).filter(e=>e).join("&")},e9=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),te=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===eG)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||e9(t)){let e=new n;return e.update((0,e$._)(t)),(0,eL.N)(await e.digest())}return"UNSIGNED-PAYLOAD"},tt=(e,t)=>{for(let n of(e=e.toLowerCase(),Object.keys(t)))if(e===n.toLowerCase())return!0;return!1},tn=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?tr(t):void 0}),tr=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{}),to=(e,t={})=>{let{headers:n,query:r={}}="function"==typeof e.clone?e.clone():tn(e);for(let e of Object.keys(n)){let o=e.toLowerCase();"x-amz-"!==o.slice(0,6)||t.unhoistableHeaders?.has(o)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},ti=e=>{for(let t of Object.keys((e="function"==typeof e.clone?e.clone():tn(e)).headers))eq.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ta=e=>ts(e).toISOString().replace(/\.\d{3}Z$/,"Z"),ts=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class tc{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:o,uriEscapePath:i=!0}){this.headerMarshaller=new eN.y7(eU.G,eF.$),this.service=r,this.sha256=o,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,eD.$)(n),this.credentialProvider=(0,eD.$)(t)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,signingRegion:s,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=s??await this.regionProvider(),{longDate:f,shortDate:d}=tu(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let p=e5(d,l,c??this.service),h=to(ti(e),{unhoistableHeaders:i});u.sessionToken&&(h.query[eH]=u.sessionToken),h.query["X-Amz-Algorithm"]=eQ,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${p}`,h.query[eB]=f,h.query["X-Amz-Expires"]=r.toString(10);let y=e4(h,o,a);return h.query["X-Amz-SignedHeaders"]=tl(y),h.query[ez]=await this.getSignature(f,p,this.getSigningKey(u,l,d,c),this.createCanonicalRequest(h,y,await te(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:s,longDate:c}=tu(n),u=e5(s,a,i??this.service),l=await te({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let d=(0,eL.N)(await f.digest()),p=["AWS4-HMAC-SHA256-PAYLOAD",c,u,r,d,l].join("\n");return this.signString(p,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){let o=this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature});return o.then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=tu(t),s=new this.sha256(await this.getSigningKey(o,i,a,r));return s.update((0,e$._)(e)),(0,eL.N)(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let s=o??await this.regionProvider(),c=ti(e),{longDate:u,shortDate:l}=tu(t),f=e5(l,s,i??this.service);c.headers[eZ]=u,a.sessionToken&&(c.headers[eW]=a.sessionToken);let d=await te(c,this.sha256);!tt(eG,c.headers)&&this.applyChecksum&&(c.headers[eG]=d);let p=e4(c,r,n),h=await this.getSignature(u,f,this.getSigningKey(a,s,l,i),this.createCanonicalRequest(c,p,d));return c.headers[eV]=`${eQ} Credential=${a.accessKeyId}/${f}, SignedHeaders=${tl(p)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} ${this.getCanonicalPath(e)} ${e7(e)} ${r.map(e=>`${e}:${t[e]}`).join("\n")} ${r.join(";")} ${n}`}async createStringToSign(e,t,n){let r=new this.sha256;r.update((0,e$._)(n));let o=await r.digest();return`${eQ} ${e} ${t} ${(0,eL.N)(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split("/"))n?.length!==0&&"."!==n&&(".."===n?t.pop():t.push(n));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`,r=encodeURIComponent(n);return r.replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){let o=await this.createStringToSign(e,t,r),i=new this.sha256(await n);return i.update((0,e$._)(o)),(0,eL.N)(await i.digest())}getSigningKey(e,t,n,r){return e3(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}}let tu=e=>{let t=ta(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},tl=e=>Object.keys(e).sort().join(";"),tf=e=>{let t;let n=e.credentials?td(e.credentials):e.credentialDefaultProvider(e),{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;return t=e.signer?(0,eD.$)(e.signer):e.regionInfoProvider?()=>(0,eD.$)(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,o])=>{let{signingRegion:a,signingService:s}=t;e.signingRegion=e.signingRegion||a||o,e.signingName=e.signingName||s||e.serviceId;let c={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},u=e.signerConstructor||tc;return new u(c)}):async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await (0,eD.$)(e.region)(),properties:{}},t);let o=t.signingRegion,a=t.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},c=e.signerConstructor||tc;return new c(s)},{...e,systemClockOffset:o,signingEscapePath:r,credentials:n,signer:t}},td=e=>"function"==typeof e?(0,ej.H)(e,e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5,e=>void 0!==e.expiration):(0,eD.$)(e),tp=e=>new Date(Date.now()+e),th=(e,t)=>Math.abs(tp(t).getTime()-e)>=3e5,ty=(e,t)=>{let n=Date.parse(e);return th(n,t)?n-Date.now():t},tg=e=>(t,n)=>async function(r){if(!eA.aW.isInstance(r.request))return t(r);let o=n.endpointV2?.properties?.authSchemes?.[0],i=o?.name==="sigv4a"?o?.signingRegionSet?.join(","):void 0,a=await e.signer(o),s=await t({...r,request:await a.sign(r.request,{signingDate:tp(e.systemClockOffset),signingRegion:i||n.signing_region,signingService:n.signing_service})}).catch(t=>{let n=t.ServerTime??tm(t.$response);throw n&&(e.systemClockOffset=ty(n,e.systemClockOffset)),t}),c=tm(s.response);return c&&(e.systemClockOffset=ty(c,e.systemClockOffset)),s},tm=e=>eA.Zn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,tv={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},tb=e=>({applyToStack:t=>{t.addRelativeTo(tg(e),tv)}});var tw=n(8794);let tS="user-agent",t_="x-amz-user-agent",tE=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,tP=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,tO=e=>(t,n)=>async r=>{let{request:o}=r;if(!eA.aW.isInstance(o))return t(r);let{headers:i}=o,a=n?.userAgent?.map(tA)||[],s=(await e.defaultUserAgentProvider()).map(tA),c=e?.customUserAgent?.map(tA)||[],u=(0,tw.Qj)(),l=(u?[u]:[]).concat([...s,...a,...c]).join(" "),f=[...s.filter(e=>e.startsWith("aws-sdk-")),...c].join(" ");return"browser"!==e.runtime?(f&&(i[t_]=i[t_]?`${i[tS]} ${f}`:f),i[tS]=l):i[t_]=l,t({...r,request:o})},tA=e=>{let t=e[0].split("/").map(e=>e.replace(tE,"-")).join("/"),n=e[1]?.replace(tP,"-"),r=t.indexOf("/"),o=t.substring(0,r),i=t.substring(r+1);return"api"===o&&(i=i.toLowerCase()),[o,i,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},tC={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},tx=e=>({applyToStack:t=>{t.add(tO(e),tC)}});var tT=n(47860),tI=n(52326),tk=n(31974),tR=n(11511);let tM=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"kinesisvideo"});var tj={i8:"3.388.0"},tN=n(76505),tL=n(51206),tD=n.n(tL);let tU=({serviceId:e,clientVersion:t})=>async()=>{let n="undefined"!=typeof window&&window?.navigator?.userAgent?tD().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};var tF=n(39627),t$=n(33131),tB=n(90130),tz=n(63660),tH=n(93294),tV=n(10687);let tZ="required",tq="argv",tK="PartitionResult",tG="tree",tW="error",tY="endpoint",tJ={[tZ]:!1,type:"String"},tX={[tZ]:!0,default:!1,type:"Boolean"},tQ={ref:"Endpoint"},t0={fn:"booleanEquals",[tq]:[{ref:"UseFIPS"},!0]},t1={fn:"booleanEquals",[tq]:[{ref:"UseDualStack"},!0]},t2={},t5={fn:"booleanEquals",[tq]:[!0,{fn:"getAttr",[tq]:[{ref:tK},"supportsFIPS"]}]},t3={fn:"booleanEquals",[tq]:[!0,{fn:"getAttr",[tq]:[{ref:tK},"supportsDualStack"]}]},t6=[tQ],t4=[t0],t8=[t1],t7={version:"1.0",parameters:{Region:tJ,UseDualStack:tX,UseFIPS:tX,Endpoint:tJ},rules:[{conditions:[{fn:"aws.partition",[tq]:[{ref:"Region"}],assign:tK}],type:tG,rules:[{conditions:[{fn:"isSet",[tq]:t6},{fn:"parseURL",[tq]:t6,assign:"url"}],type:tG,rules:[{conditions:t4,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:tW},{type:tG,rules:[{conditions:t8,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:tW},{endpoint:{url:tQ,properties:t2,headers:t2},type:tY}]}]},{conditions:[t0,t1],type:tG,rules:[{conditions:[t5,t3],type:tG,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:t2,headers:t2},type:tY}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:tW}]},{conditions:t4,type:tG,rules:[{conditions:[t5],type:tG,rules:[{type:tG,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:t2,headers:t2},type:tY}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:tW}]},{conditions:t8,type:tG,rules:[{conditions:[t3],type:tG,rules:[{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:t2,headers:t2},type:tY}]},{error:"DualStack is enabled but this partition does not support DualStack",type:tW}]},{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}",properties:t2,headers:t2},type:tY}]}]},t9=(e,t={})=>(0,tw.B1)(t7,{endpointParams:e,logger:t.logger}),ne=e=>({apiVersion:"2019-12-04",base64Decoder:e?.base64Decoder??tV.G,base64Encoder:e?.base64Encoder??tV.s,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??t9,logger:e?.logger??new ev.vk,serviceId:e?.serviceId??"Kinesis Video Signaling",urlParser:e?.urlParser??tH.e,utf8Decoder:e?.utf8Decoder??eF.$,utf8Encoder:e?.utf8Encoder??eU.G});var nt=n(95419);let nn=e=>{let t=(0,nt.j)(e),n=()=>t().then(ev.jv),r=ne(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??tB.W,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??tU({serviceId:r.serviceId,clientVersion:tj.i8}),maxAttempts:e?.maxAttempts??tz.J,region:e?.region??(0,t$.n)("Region is missing"),requestHandler:e?.requestHandler??new tF.B(n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||tz.CA),sha256:e?.sha256??tN.Sha256,streamCollector:e?.streamCollector??tF.C,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(tT.JY)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(tT.Fh))}};class nr extends ev.KU{constructor(...[e]){let t=nn(e||{}),n=tM(t),r=(0,tT.Xb)(n),o=(0,tk.uW)(r),i=(0,tR.BC)(o),a=tf(i),s={...a,customUserAgent:"string"==typeof a.customUserAgent?[[a.customUserAgent]]:a.customUserAgent};super(s),this.config=s,this.middlewareStack.use((0,tR.NQ)(this.config)),this.middlewareStack.use((0,tI.VG)(this.config)),this.middlewareStack.use(eT(this.config)),this.middlewareStack.use(eR(this.config)),this.middlewareStack.use((0,eM.eV)(this.config)),this.middlewareStack.use(tb(this.config)),this.middlewareStack.use(tx(this.config)),this.middlewareStack.use((0,tR.gn)(this.config))}destroy(){super.destroy()}}var no=n(45410);class ni extends ev.sI{constructor(e){super(e),Object.setPrototypeOf(this,ni.prototype)}}class na extends ni{constructor(e){super({name:"ClientLimitExceededException",$fault:"client",...e}),this.name="ClientLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,na.prototype),this.Message=e.Message}}class ns extends ni{constructor(e){super({name:"InvalidArgumentException",$fault:"client",...e}),this.name="InvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,ns.prototype),this.Message=e.Message}}class nc extends ni{constructor(e){super({name:"InvalidClientException",$fault:"client",...e}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,nc.prototype)}}class nu extends ni{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,nu.prototype),this.Message=e.Message}}class nl extends ni{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,nl.prototype),this.Message=e.Message}}class nf extends ni{constructor(e){super({name:"SessionExpiredException",$fault:"client",...e}),this.name="SessionExpiredException",this.$fault="client",Object.setPrototypeOf(this,nf.prototype)}}let nd=async(e,t)=>{let n;let{hostname:r,protocol:o="https",port:i,path:a}=await t.endpoint(),s=`${a?.endsWith("/")?a.slice(0,-1):a||""}/v1/get-ice-server-config`;return n=JSON.stringify((0,ev.qn)(e,{ChannelARN:[],ClientId:[],Service:[],Username:[]})),new eA.aW({protocol:o,hostname:r,port:i,method:"POST",headers:{"content-type":"application/json"},path:s,body:n})},np=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return nh(e,t);let n=(0,ev.UI)({$metadata:n_(e)}),r=(0,ev.CE)((0,ev.Wh)(await nP(e.body,t)),"body"),o=(0,ev.qn)(r,{IceServerList:ev.F3});return Object.assign(n,o),n},nh=async(e,t)=>{let n={...e,body:await nO(e.body,t)},r=nA(e,n.body);switch(r){case"ClientLimitExceededException":case"com.amazonaws.kinesisvideosignaling#ClientLimitExceededException":throw await ng(n,t);case"InvalidArgumentException":case"com.amazonaws.kinesisvideosignaling#InvalidArgumentException":throw await nm(n,t);case"InvalidClientException":case"com.amazonaws.kinesisvideosignaling#InvalidClientException":throw await nv(n,t);case"NotAuthorizedException":case"com.amazonaws.kinesisvideosignaling#NotAuthorizedException":throw await nb(n,t);case"ResourceNotFoundException":case"com.amazonaws.kinesisvideosignaling#ResourceNotFoundException":throw await nw(n,t);case"SessionExpiredException":case"com.amazonaws.kinesisvideosignaling#SessionExpiredException":throw await nS(n,t);default:let o=n.body;return ny({output:e,parsedBody:o,errorCode:r})}},ny=(0,ev.PC)(ni),ng=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new na({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},nm=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new ns({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},nv=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{message:ev.pY});Object.assign(n,o);let i=new nc({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},nb=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new nu({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},nw=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new nl({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},nS=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{message:ev.pY});Object.assign(n,o);let i=new nf({$metadata:n_(e),...n});return(0,ev.to)(i,e.body)},n_=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),nE=(e,t)=>(0,ev.Wg)(e,t).then(e=>t.utf8Encoder(e)),nP=(e,t)=>nE(e,t).then(e=>e.length?JSON.parse(e):{}),nO=async(e,t)=>{let n=await nP(e,t);return n.message=n.message??n.Message,n},nA=(e,t)=>{let n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=Object.keys(e.headers).find(e=>"x-amzn-errortype"===e.toLowerCase());return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class nC extends ev.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,no.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,tk.a3)(t,nC.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"KinesisVideoSignalingClient",commandName:"GetIceServerConfigCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e})}serialize(e,t){return nd(e,t)}deserialize(e,t){return np(e,t)}}let nx="us-east-1";async function nT(e,t,n,r,o){let i=new nr({region:nx,credentials:{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.SessionToken,expiration:e.Expiration},endpoint:t}),a={ChannelARN:n};r===eS.VIEWER&&(a.ClientId=o),p.ZP.log("webRTC.getIceServers(): params: ".concat(JSON.stringify(a)));let s=await i.send(new nC(a));p.ZP.log("webRTC.getIceServers(): result: ".concat(JSON.stringify(s)));let c=[{urls:"stun:stun.kinesisvideo.".concat(nx,".amazonaws.com:443")}];return s.IceServerList.forEach(e=>c.push({urls:e.Uris,username:e.Username,credential:e.Password})),c}let nI=e=>t=>async n=>{if(!eA.aW.isInstance(n.request))return t(n);let{request:r}=n,{handlerProtocol:o=""}=e.requestHandler.metadata||{};if(o.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]="";else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)},nk={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},nR=e=>({applyToStack:t=>{t.add(nI(e),nk)}}),nM=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:o,commandName:i,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=s,l=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:d,...p}=r.output;return a?.info?.({clientName:o,commandName:i,input:l(n.input),output:f(p),metadata:d}),r}catch(c){let{clientName:e,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:a}=i,s=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:e,commandName:r,input:s(n.input),error:c,metadata:c.$metadata}),c}},nj={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},nN=e=>({applyToStack:e=>{e.add(nM(),nj)}}),nL="X-Amz-Date",nD="X-Amz-Signature",nU="X-Amz-Security-Token",nF="authorization",n$=nL.toLowerCase(),nB=[nF,n$,"date"],nz=nD.toLowerCase(),nH="x-amz-content-sha256",nV=nU.toLowerCase(),nZ={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},nq=/^proxy-/,nK=/^sec-/,nG="AWS4-HMAC-SHA256",nW="aws4_request",nY={},nJ=[],nX=(e,t,n)=>`${e}/${t}/${n}/${nW}`,nQ=async(e,t,n,r,o)=>{let i=await n0(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${(0,eL.N)(i)}:${t.sessionToken}`;if(a in nY)return nY[a];for(nJ.push(a);nJ.length>50;)delete nY[nJ.shift()];let s=`AWS4${t.secretAccessKey}`;for(let t of[n,r,o,nW])s=await n0(e,s,t);return nY[a]=s},n0=(e,t,n)=>{let r=new e(t);return r.update((0,e$._)(n)),r.digest()},n1=({headers:e},t,n)=>{let r={};for(let o of Object.keys(e).sort()){if(void 0==e[o])continue;let i=o.toLowerCase();(!(i in nZ||t?.has(i)||nq.test(i)||nK.test(i))||n&&(!n||n.has(i)))&&(r[i]=e[o].trim().replace(/\s+/g," "))}return r},n2=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e).sort()){if(r.toLowerCase()===nz)continue;t.push(r);let o=e[r];"string"==typeof o?n[r]=`${(0,e8.i)(r)}=${(0,e8.i)(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce((e,t)=>e.concat([`${(0,e8.i)(r)}=${(0,e8.i)(t)}`]),[]).sort().join("&"))}return t.map(e=>n[e]).filter(e=>e).join("&")},n5=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),n3=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===nH)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||n5(t)){let e=new n;return e.update((0,e$._)(t)),(0,eL.N)(await e.digest())}return"UNSIGNED-PAYLOAD"},n6=(e,t)=>{for(let n of(e=e.toLowerCase(),Object.keys(t)))if(e===n.toLowerCase())return!0;return!1},n4=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?n8(t):void 0}),n8=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{}),n7=(e,t={})=>{let{headers:n,query:r={}}="function"==typeof e.clone?e.clone():n4(e);for(let e of Object.keys(n)){let o=e.toLowerCase();"x-amz-"!==o.slice(0,6)||t.unhoistableHeaders?.has(o)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},n9=e=>{for(let t of Object.keys((e="function"==typeof e.clone?e.clone():n4(e)).headers))nB.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},re=e=>rt(e).toISOString().replace(/\.\d{3}Z$/,"Z"),rt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class rn{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:o,uriEscapePath:i=!0}){this.headerMarshaller=new eN.y7(eU.G,eF.$),this.service=r,this.sha256=o,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,eD.$)(n),this.credentialProvider=(0,eD.$)(t)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,signingRegion:s,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=s??await this.regionProvider(),{longDate:f,shortDate:d}=rr(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let p=nX(d,l,c??this.service),h=n7(n9(e),{unhoistableHeaders:i});u.sessionToken&&(h.query[nU]=u.sessionToken),h.query["X-Amz-Algorithm"]=nG,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${p}`,h.query[nL]=f,h.query["X-Amz-Expires"]=r.toString(10);let y=n1(h,o,a);return h.query["X-Amz-SignedHeaders"]=ro(y),h.query[nD]=await this.getSignature(f,p,this.getSigningKey(u,l,d,c),this.createCanonicalRequest(h,y,await n3(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:s,longDate:c}=rr(n),u=nX(s,a,i??this.service),l=await n3({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let d=(0,eL.N)(await f.digest()),p=["AWS4-HMAC-SHA256-PAYLOAD",c,u,r,d,l].join("\n");return this.signString(p,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){let o=this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature});return o.then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=rr(t),s=new this.sha256(await this.getSigningKey(o,i,a,r));return s.update((0,e$._)(e)),(0,eL.N)(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let s=o??await this.regionProvider(),c=n9(e),{longDate:u,shortDate:l}=rr(t),f=nX(l,s,i??this.service);c.headers[n$]=u,a.sessionToken&&(c.headers[nV]=a.sessionToken);let d=await n3(c,this.sha256);!n6(nH,c.headers)&&this.applyChecksum&&(c.headers[nH]=d);let p=n1(c,r,n),h=await this.getSignature(u,f,this.getSigningKey(a,s,l,i),this.createCanonicalRequest(c,p,d));return c.headers[nF]=`${nG} Credential=${a.accessKeyId}/${f}, SignedHeaders=${ro(p)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} ${this.getCanonicalPath(e)} ${n2(e)} ${r.map(e=>`${e}:${t[e]}`).join("\n")} ${r.join(";")} ${n}`}async createStringToSign(e,t,n){let r=new this.sha256;r.update((0,e$._)(n));let o=await r.digest();return`${nG} ${e} ${t} ${(0,eL.N)(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split("/"))n?.length!==0&&"."!==n&&(".."===n?t.pop():t.push(n));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`,r=encodeURIComponent(n);return r.replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){let o=await this.createStringToSign(e,t,r),i=new this.sha256(await n);return i.update((0,e$._)(o)),(0,eL.N)(await i.digest())}getSigningKey(e,t,n,r){return nQ(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}}let rr=e=>{let t=re(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},ro=e=>Object.keys(e).sort().join(";"),ri=e=>{let t;let n=e.credentials?ra(e.credentials):e.credentialDefaultProvider(e),{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;return t=e.signer?(0,eD.$)(e.signer):e.regionInfoProvider?()=>(0,eD.$)(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,o])=>{let{signingRegion:a,signingService:s}=t;e.signingRegion=e.signingRegion||a||o,e.signingName=e.signingName||s||e.serviceId;let c={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},u=e.signerConstructor||rn;return new u(c)}):async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await (0,eD.$)(e.region)(),properties:{}},t);let o=t.signingRegion,a=t.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},c=e.signerConstructor||rn;return new c(s)},{...e,systemClockOffset:o,signingEscapePath:r,credentials:n,signer:t}},ra=e=>"function"==typeof e?(0,ej.H)(e,e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5,e=>void 0!==e.expiration):(0,eD.$)(e),rs=e=>new Date(Date.now()+e),rc=(e,t)=>Math.abs(rs(t).getTime()-e)>=3e5,ru=(e,t)=>{let n=Date.parse(e);return rc(n,t)?n-Date.now():t},rl=e=>(t,n)=>async function(r){if(!eA.aW.isInstance(r.request))return t(r);let o=n.endpointV2?.properties?.authSchemes?.[0],i=o?.name==="sigv4a"?o?.signingRegionSet?.join(","):void 0,a=await e.signer(o),s=await t({...r,request:await a.sign(r.request,{signingDate:rs(e.systemClockOffset),signingRegion:i||n.signing_region,signingService:n.signing_service})}).catch(t=>{let n=t.ServerTime??rf(t.$response);throw n&&(e.systemClockOffset=ru(n,e.systemClockOffset)),t}),c=rf(s.response);return c&&(e.systemClockOffset=ru(c,e.systemClockOffset)),s},rf=e=>eA.Zn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,rd={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},rp=e=>({applyToStack:t=>{t.addRelativeTo(rl(e),rd)}}),rh="user-agent",ry="x-amz-user-agent",rg=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,rm=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,rv=e=>(t,n)=>async r=>{let{request:o}=r;if(!eA.aW.isInstance(o))return t(r);let{headers:i}=o,a=n?.userAgent?.map(rb)||[],s=(await e.defaultUserAgentProvider()).map(rb),c=e?.customUserAgent?.map(rb)||[],u=(0,tw.Qj)(),l=(u?[u]:[]).concat([...s,...a,...c]).join(" "),f=[...s.filter(e=>e.startsWith("aws-sdk-")),...c].join(" ");return"browser"!==e.runtime?(f&&(i[ry]=i[ry]?`${i[rh]} ${f}`:f),i[rh]=l):i[ry]=l,t({...r,request:o})},rb=e=>{let t=e[0].split("/").map(e=>e.replace(rg,"-")).join("/"),n=e[1]?.replace(rm,"-"),r=t.indexOf("/"),o=t.substring(0,r),i=t.substring(r+1);return"api"===o&&(i=i.toLowerCase()),[o,i,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},rw={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},rS=e=>({applyToStack:t=>{t.add(rv(e),rw)}}),r_=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"kinesisvideo"});var rE={i8:"3.388.0"},rP=n(80686);let rO=({serviceId:e,clientVersion:t})=>async()=>{let n="undefined"!=typeof window&&window?.navigator?.userAgent?tD().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r},rA="required",rC="argv",rx="isSet",rT="tree",rI="error",rk="endpoint",rR="PartitionResult",rM={[rA]:!1,type:"String"},rj={[rA]:!0,default:!1,type:"Boolean"},rN={ref:"Endpoint"},rL={fn:"booleanEquals",[rC]:[{ref:"UseFIPS"},!0]},rD={fn:"booleanEquals",[rC]:[{ref:"UseDualStack"},!0]},rU={},rF={fn:"booleanEquals",[rC]:[!0,{fn:"getAttr",[rC]:[{ref:rR},"supportsFIPS"]}]},r$={fn:"booleanEquals",[rC]:[!0,{fn:"getAttr",[rC]:[{ref:rR},"supportsDualStack"]}]},rB=[rL],rz=[rD],rH=[{ref:"Region"}],rV={version:"1.0",parameters:{Region:rM,UseDualStack:rj,UseFIPS:rj,Endpoint:rM},rules:[{conditions:[{fn:rx,[rC]:[rN]}],type:rT,rules:[{conditions:rB,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:rI},{conditions:rz,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:rI},{endpoint:{url:rN,properties:rU,headers:rU},type:rk}]},{conditions:[{fn:rx,[rC]:rH}],type:rT,rules:[{conditions:[{fn:"aws.partition",[rC]:rH,assign:rR}],type:rT,rules:[{conditions:[rL,rD],type:rT,rules:[{conditions:[rF,r$],type:rT,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:rU,headers:rU},type:rk}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:rI}]},{conditions:rB,type:rT,rules:[{conditions:[rF],type:rT,rules:[{endpoint:{url:"https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:rU,headers:rU},type:rk}]},{error:"FIPS is enabled but this partition does not support FIPS",type:rI}]},{conditions:rz,type:rT,rules:[{conditions:[r$],type:rT,rules:[{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:rU,headers:rU},type:rk}]},{error:"DualStack is enabled but this partition does not support DualStack",type:rI}]},{endpoint:{url:"https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}",properties:rU,headers:rU},type:rk}]}]},{error:"Invalid Configuration: Missing Region",type:rI}]},rZ=(e,t={})=>(0,tw.B1)(rV,{endpointParams:e,logger:t.logger}),rq=e=>({apiVersion:"2017-09-30",base64Decoder:e?.base64Decoder??tV.G,base64Encoder:e?.base64Encoder??tV.s,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??rZ,logger:e?.logger??new ev.vk,serviceId:e?.serviceId??"Kinesis Video",urlParser:e?.urlParser??tH.e,utf8Decoder:e?.utf8Decoder??eF.$,utf8Encoder:e?.utf8Encoder??eU.G}),rK=e=>{let t=(0,nt.j)(e),n=()=>t().then(ev.jv),r=rq(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??tB.W,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??rO({serviceId:r.serviceId,clientVersion:rE.i8}),maxAttempts:e?.maxAttempts??tz.J,region:e?.region??(0,t$.n)("Region is missing"),requestHandler:e?.requestHandler??new tF.B(n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||tz.CA),sha256:e?.sha256??rP.Sha256,streamCollector:e?.streamCollector??tF.C,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(tT.JY)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(tT.Fh))}};class rG extends ev.KU{constructor(...[e]){let t=rK(e||{}),n=r_(t),r=(0,tT.Xb)(n),o=(0,tk.uW)(r),i=(0,tR.BC)(o),a=ri(i),s={...a,customUserAgent:"string"==typeof a.customUserAgent?[[a.customUserAgent]]:a.customUserAgent};super(s),this.config=s,this.middlewareStack.use((0,tR.NQ)(this.config)),this.middlewareStack.use((0,tI.VG)(this.config)),this.middlewareStack.use(nR(this.config)),this.middlewareStack.use(nN(this.config)),this.middlewareStack.use((0,eM.eV)(this.config)),this.middlewareStack.use(rp(this.config)),this.middlewareStack.use(rS(this.config))}destroy(){super.destroy()}}class rW{async getKinesisVideoClient(e){if(this.kinesisVideoClient)return this.kinesisVideoClient;let t=new rG({region:"us-east-1",credentials:{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.SessionToken,expiration:e.Expiration}});return this.kinesisVideoClient=t,t}constructor(){this.kinesisVideoClient=void 0}}let rY=async(e,t)=>{let n;let{hostname:r,protocol:o="https",port:i,path:a}=await t.endpoint(),s=`${a?.endsWith("/")?a.slice(0,-1):a||""}/getSignalingChannelEndpoint`;return n=JSON.stringify((0,ev.qn)(e,{ChannelARN:[],SingleMasterChannelEndpointConfiguration:e=>(0,ev.F3)(e)})),new eA.aW({protocol:o,hostname:r,port:i,method:"POST",headers:{"content-type":"application/json"},path:s,body:n})},rJ=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return rX(e,t);let n=(0,ev.UI)({$metadata:r6(e)}),r=(0,ev.CE)((0,ev.Wh)(await r8(e.body,t)),"body"),o=(0,ev.qn)(r,{ResourceEndpointList:ev.F3});return Object.assign(n,o),n},rX=async(e,t)=>{let n={...e,body:await r7(e.body,t)},r=r9(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.kinesisvideo#AccessDeniedException":throw await r0(n,t);case"ClientLimitExceededException":case"com.amazonaws.kinesisvideo#ClientLimitExceededException":throw await r1(n,t);case"InvalidArgumentException":case"com.amazonaws.kinesisvideo#InvalidArgumentException":throw await r2(n,t);case"ResourceInUseException":case"com.amazonaws.kinesisvideo#ResourceInUseException":throw await r5(n,t);case"ResourceNotFoundException":case"com.amazonaws.kinesisvideo#ResourceNotFoundException":throw await r3(n,t);default:let o=n.body;return rQ({output:e,parsedBody:o,errorCode:r})}},rQ=(0,ev.PC)(eb),r0=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new ew({$metadata:r6(e),...n});return(0,ev.to)(i,e.body)},r1=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new e_({$metadata:r6(e),...n});return(0,ev.to)(i,e.body)},r2=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new eE({$metadata:r6(e),...n});return(0,ev.to)(i,e.body)},r5=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new eP({$metadata:r6(e),...n});return(0,ev.to)(i,e.body)},r3=async(e,t)=>{let n=(0,ev.UI)({}),r=e.body,o=(0,ev.qn)(r,{Message:ev.pY});Object.assign(n,o);let i=new eO({$metadata:r6(e),...n});return(0,ev.to)(i,e.body)},r6=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),r4=(e,t)=>(0,ev.Wg)(e,t).then(e=>t.utf8Encoder(e)),r8=(e,t)=>r4(e,t).then(e=>e.length?JSON.parse(e):{}),r7=async(e,t)=>{let n=await r8(e,t);return n.message=n.message??n.Message,n},r9=(e,t)=>{let n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=Object.keys(e.headers).find(e=>"x-amzn-errortype"===e.toLowerCase());return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class oe extends ev.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,no.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,tk.a3)(t,oe.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"KinesisVideoClient",commandName:"GetSignalingChannelEndpointCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rY(e,t)}deserialize(e,t){return rJ(e,t)}}async function ot(e,t,n){p.ZP.log("webRTC.getSignalingChannelEndpoint(): Called");let r=new oe({ChannelARN:t,SingleMasterChannelEndpointConfiguration:{Protocols:["WSS","HTTPS"],Role:n}}),o=await e.send(r);p.ZP.log("webRTC.getSignalingChannelEndpoint(): Result: ".concat(JSON.stringify(o)));let i=o.ResourceEndpointList.reduce((e,t)=>(t.Protocol&&(e[t.Protocol]=t.ResourceEndpoint),e),{});return i}var on=n(99564);let or=navigator.mediaDevices;function oo(){return new MediaStream}var oi=n(68099);class oa{openDataChannel(){var e,t;if((null===(e=this.skellySignalingClient)||void 0===e?void 0:e.getRole())===oi.uU.VIEWER){if(p.ZP.log("peerConnection.openDataChannel(): Called"),this.dataChannel){p.ZP.log("peerConnection.openDataChannel(): Returning, as there is already a data channel");return}this.dataChannel=null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.createDataChannel("skelly-datachannel"),this.setUpDataChannel()}}setUpDataChannel(){let e=this;for(this.dataChannel.onopen=()=>{p.ZP.log("peerConnection.dataChannel.onopen(): Called; sending current status to peer");let t=globalThis.skelly.reduxStore.getState(),n=t.webRTC.localAudio;e.send({update:n?"unmute":"mute"});let r=t.webRTC.localVideo;e.send({update:r?"enableVideo":"disableVideo"})},this.dataChannel.onmessage=t=>{p.ZP.log("peerConnection.dataChannel.onmessage(): Called (".concat(t.data,")")),e.onMessage(JSON.parse(t.data))},this.dataChannel.onerror=e=>{p.ZP.error("peerConnection.dataChannel.onerror(): Called"),p.ZP.error("e.error: ".concat(e.error))},this.dataChannel.onclose=()=>{var t;let n=null===(t=e.rtcPeerConnection)||void 0===t?void 0:t.connectionState;"connected"===n?(p.ZP.log("peerConnection.dataChannel.onclose(): Data channel is being re-opened (as connection is still alive)"),e.openDataChannel()):p.ZP.log("peerConnection.dataChannel.onclose(): Data connection closed (connectionState: ".concat(n,")"))};this.sendPromises.length>0;)this.sendPromises.shift()()}addTrack(e){var t,n,r;p.ZP.log("peerConnection.addTrack(): Adding track to RTC peer connection: ");let o=null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.getSenders();if(o)for(let e of o)p.ZP.log("peerConnection.addTrack(): Track before adding: ",e.track);if(null===(n=this.rtcPeerConnection)||void 0===n||n.addTrack(e),o=null===(r=this.rtcPeerConnection)||void 0===r?void 0:r.getSenders())for(let e of o)p.ZP.log("peerConnection.addTrack(): Track after adding: ",e.track)}async createOffer(){p.ZP.log("peerConnection.createOffer(): Called");try{var e,t,n,r;let o=await (null===(e=this.rtcPeerConnection)||void 0===e?void 0:e.createOffer({}));p.ZP.log("peerConnection.createOffer(): Sending SDP offer to '".concat(this.remoteClientId||"MASTER","'")),await (null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.setLocalDescription(o));let i=null===(n=this.rtcPeerConnection)||void 0===n?void 0:n.localDescription;null===(r=this.skellySignalingClient)||void 0===r||r.sendSdpOffer(i,this.remoteClientId)}catch(e){p.ZP.error("peerConnection.createOffer(): Failed"),p.ZP.error(JSON.stringify(e))}}async setSdpOffer(e){this.processingOffer=!0;try{var t,n,r,o,i;p.ZP.log("peerConnection.setSdpOffer(): Setting remote description"),await (null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.setRemoteDescription(e)),p.ZP.log("peerConnection.setSdpOffer(): Creating answer");let a=await (null===(n=this.rtcPeerConnection)||void 0===n?void 0:n.createAnswer());p.ZP.log("peerConnection.setSdpOffer(): Setting local description"),await (null===(r=this.rtcPeerConnection)||void 0===r?void 0:r.setLocalDescription(a)),null===(i=this.skellySignalingClient)||void 0===i||i.sendSdpAnswer(null===(o=this.rtcPeerConnection)||void 0===o?void 0:o.localDescription,this.remoteClientId),this.flushRemoteIceCandidates()}catch(e){p.ZP.error("peerConnection.setSdpOffer(): Failed"),p.ZP.error(JSON.stringify(e))}this.processingOffer=!1}async setSdpAnswer(e){var t;p.ZP.log("peerConnection.setSdpAnswer(): Received SDP answer from '".concat(this.remoteClientId||"VIEWER","'")),await (null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.setRemoteDescription(e)),this.flushRemoteIceCandidates()}addIceCandidate(e){var t,n,r,o;p.ZP.log("peerConnection.addIceCandidate(): Called (connectionState: ".concat(null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.connectionState,"; remoteDescription: ").concat(!!(null===(n=this.rtcPeerConnection)||void 0===n?void 0:n.remoteDescription),")")),(null===(r=this.rtcPeerConnection)||void 0===r?void 0:r.remoteDescription)?(p.ZP.log("peerConnection.addIceCandidate(): Adding ice candidate to rtcPeerConnection"),null===(o=this.rtcPeerConnection)||void 0===o||o.addIceCandidate(e)):(p.ZP.log("peerConnection.addIceCandidate(): Candidate was added to backlog"),this.remoteIceCandidates.push(e))}flushRemoteIceCandidates(){for(p.ZP.log("peerConnection.flushRemoteIceCandidates(): Called (no. of candidates: ".concat(this.remoteIceCandidates.length,")"));this.remoteIceCandidates.length;){var e;let t=this.remoteIceCandidates.shift();p.ZP.log("peerConnection.flushRemoteIceCandidates(): Adding ice candidate to rtcPeerConnection"),null===(e=this.rtcPeerConnection)||void 0===e||e.addIceCandidate(t)}}mute(){var e;if(p.ZP.log("peerConnection.mute(): Called"),"connected"!==this.connectionState){p.ZP.log("peerConnection.mute(): Returning, as not yet connected");return}console.log("senders");let t=(null===(e=this.rtcPeerConnection)||void 0===e?void 0:e.getSenders())||[];console.log(t),t.forEach(e=>{e.track&&"audio"===e.track.kind&&(e.track.enabled=!1)}),this.send({update:"mute"})}unmute(){var e;if(p.ZP.log("peerConnection.unmute(): Called"),"connected"!==this.connectionState){p.ZP.log("peerConnection.unmute(): Returning, as not yet connected");return}console.log("senders");let t=(null===(e=this.rtcPeerConnection)||void 0===e?void 0:e.getSenders())||[];console.log(t),t.forEach(e=>{var t;(null===(t=e.track)||void 0===t?void 0:t.kind)==="audio"&&(e.track.enabled=!0)}),this.send({update:"unmute"})}disableVideo(){var e;if(p.ZP.log("peerConnection.disableVideo(): Called"),"connected"!==this.connectionState){p.ZP.log("peerConnection.disableVideo(): Returning, as not yet connected");return}console.log("senders");let t=(null===(e=this.rtcPeerConnection)||void 0===e?void 0:e.getSenders())||[];console.log(t);let n=this;t.forEach(e=>{var t,r;(null===(t=e.track)||void 0===t?void 0:t.kind)==="video"&&(null===(r=n.rtcPeerConnection)||void 0===r||r.removeTrack(e))}),this.send({update:"disableVideo"})}enableVideo(e){var t;if(p.ZP.log("peerConnection.enableVideo(): Called"),"connected"!==this.connectionState){p.ZP.log("peerConnection.enableVideo(): Returning, as not yet connected");return}let n=(null===(t=this.rtcPeerConnection)||void 0===t?void 0:t.getSenders())||[],r=!1;n.forEach(e=>{var t;(null===(t=e.track)||void 0===t?void 0:t.kind)==="video"&&(r=!0)}),r?p.ZP.log("peerConnection.enableVideo(): RTC connection already has a video track"):(p.ZP.log("peerConnection.enableVideo(): Adding video track: ",e),this.addTrack(e)),this.send({update:"enableVideo"})}send(e){var t,n;let r=JSON.stringify(e);if(p.ZP.log("peerConnection.dataChannel.send(message: ".concat(r.slice(0,20),"...; readyState: ").concat(null===(t=this.dataChannel)||void 0===t?void 0:t.readyState,"): Called")),(null===(n=this.dataChannel)||void 0===n?void 0:n.readyState)==="open")this.dataChannel.send(r);else{let e=this;new Promise(t=>{e.sendPromises.push(t)}).then(()=>{e.dataChannel.send(r)})}}close(){var e;null===(e=this.rtcPeerConnection)||void 0===e||e.close(),this.rtcPeerConnection=void 0}constructor(e,t,n,r,o,i){this.processingOffer=!1,this.connectionState=void 0,this.remoteIceCandidates=[],this.sendPromises=[],p.ZP.log("peerConnection.constructor(remoteClientId: ".concat(i,"): Called")),this.onMessage=o,i&&(this.remoteClientId=i),this.skellySignalingClient=t,this.rtcPeerConnection=new RTCPeerConnection({iceServers:e});let a=this;this.rtcPeerConnection.onnegotiationneeded=e=>{p.ZP.log("peerConnection.onnegotationneeded(): Called"),a.processingOffer?p.ZP.log("peerConnection.onnegotationneeded(): Returning as offer is being processed"):(p.ZP.log("peerConnection.onnegotationneeded(): Creating offer"),a.createOffer())},this.rtcPeerConnection.ontrack=e=>{var t;p.ZP.log("peerConnection.ontrack(): Received remote ".concat(null==e?void 0:null===(t=e.track)||void 0===t?void 0:t.kind," track from peer")),p.ZP.log("peerConnection.ontrack(): Track: ".concat(JSON.stringify(e.track))),a.remoteClientId?r(e.track,a.remoteClientId):r(e.track)},this.rtcPeerConnection.onicecandidate=async e=>{if(e.candidate){var t;null===(t=this.skellySignalingClient)||void 0===t||t.sendIceCandidate(e.candidate,a.remoteClientId)}else p.ZP.log("peerConnection.onicecandidate(): Received empty local ICE candidate")},this.rtcPeerConnection.onicecandidateerror=e=>{},this.rtcPeerConnection.onconnectionstatechange=()=>{var e,t;let r=a.rtcPeerConnection?a.rtcPeerConnection.connectionState:"closed";p.ZP.log("peerConnection.onconnectionstatechange: state = '".concat(r,"'")),a.connectionState=r,"connected"===r&&(a.openDataChannel(),null===(t=a.rtcPeerConnection)||void 0===t||t.getStats().then(e=>{})),null===(e=a.rtcPeerConnection)||void 0===e||e.connectionState,n(r)},this.rtcPeerConnection.ondatachannel=e=>{p.ZP.log("rtcPeerConnection.ondatachannel(): Called"),a.dataChannel=e.channel,a.setUpDataChannel()}}}(i=a||(a={})).Idle="Idle",i.Opening="Opening",i.OpeningFailed="OpeningFailed",i.Open="Open",i.Closed="Closed";class os{async prepareMaster(e){return this.role=oi.uU.MASTER,this.participants=[this.friendId,e],await this.fetchMasterCredentials(),{channelARN:this.channelARN,credentials:this.credentials}}async fetchMasterCredentials(){let e=await (0,on.tD)(this.participants);if(p.ZP.log("skellySignalingClient.fetchMasterCredentials(): Got signaling channel '".concat(JSON.stringify(e),"'")),e.success)this.channelARN=e.SignalingChannel.channel_arn;else throw e.error;this.credentials=e.Credentials}async prepareViewer(e){p.ZP.log("skellySignalingClient.prepareViewer(channelARN: ".concat(e,"): Called")),this.role=oi.uU.VIEWER,this.channelARN=e;let t=/.+channel\/(.+)\/.+/.exec(this.channelARN);if(!Array.isArray(t)||2!==t.length)throw"Invalid channelARN";return this.channelName=t[1],await this.fetchViewerCredentials(),this.credentials}async fetchViewerCredentials(){let e=await (0,on.wH)(this.channelName);if(p.ZP.log("skellySignalingClient.fetchViewerCredentials(): Result form getSignalingChannelViewer: ".concat(JSON.stringify(e))),!1===e.success)throw e.error;this.credentials=e.Credentials}createSignalingChannel(e,t){p.ZP.log("skellySignalingClient.createSignalingChannel(): Called"),this.channelEndpoint=e,this.systemClockOffset=t,this.createSignalingChannel_()}createSignalingChannel_(){p.ZP.log("skellySignalingClient.createSignalingChannel_(): Called"),this.signalingClient=new oi._r({channelEndpoint:this.channelEndpoint,role:this.role,clientId:this.role===oi.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 e=this;this.signalingClient.on("open",()=>{for(p.ZP.log("skellySignalingClient.onOpen(): Signaling client opened (No. of promises: ".concat(this.signalingClientReadyPromises.length,")")),e.connectionState=a.Open;this.signalingClientReadyPromises.length>0;)this.signalingClientReadyPromises.shift()()}),this.signalingClient.on("close",()=>{p.ZP.log("skellySignalingClient.onClose(): Disconnected from signaling server (connectionState: ".concat(e.connectionState,")"));let t=e.connectionState;switch(e.connectionState=a.Closed,t){case a.OpeningFailed:p.ZP.log("skellySignalingClient.onClose(): Opening failed. Try again with new credentials?!");break;case a.Open:p.ZP.log("skellySignalingClient.onClose(): Re-opening connection"),e.open();break;case a.Closed:p.ZP.log("skellySignalingClient.onClose(): Ordinary closure");break;default:p.ZP.log("skellySignalingClient.onClose(): Unhandled closing")}}),this.signalingClient.on("error",t=>{p.ZP.error("skellySignalingClient.onError(): ".concat(JSON.stringify(t)," (connectionState: ").concat(e.connectionState,")")),p.ZP.error(t),e.connectionState===a.Opening&&(p.ZP.error("skellySignalingClient.onError(): Opening failed"),e.connectionState=a.OpeningFailed),p.ZP.error("skellySignalingClient.onError(): Unhandled error")})}on(e,t){var n;null===(n=this.signalingClient)||void 0===n||n.on(e,t)}async open(){var e;if(p.ZP.log("skellySignalingClient.open(): Called (connection state: ".concat(this.connectionState,")")),this.connectionState!==a.Idle&&this.connectionState!==a.Closed){p.ZP.log("skellySignalingClient.open(): Function called in invalid connection state (connection state: ".concat(this.connectionState,")"));return}this.connectionState=a.Opening;let t=await this.ensureCredentials();t||this.createSignalingChannel_(),p.ZP.log("skellySignalingClient.open(): Opening signaling client"),null===(e=this.signalingClient)||void 0===e||e.open()}async ensureCredentials(){var e,t;let n=new Date(null===(e=this.credentials)||void 0===e?void 0:e.Expiration).getTime()-Date.now()>6e4;return p.ZP.log("skellySignalingClient.ensureCredentials(): Called (expiration: ".concat(null===(t=this.credentials)||void 0===t?void 0:t.Expiration,", valid: ").concat(n,")")),n||(this.role===oi.uU.MASTER?await this.fetchMasterCredentials():await this.fetchViewerCredentials()),n}async awaitOpen(){let e=this;if(this.connectionState!==a.Open)return new Promise(t=>{e.signalingClientReadyPromises.push(t)})}async sendIceCandidate(e,t){for(;this.signalingClient;)try{t?this.signalingClient.sendIceCandidate(e,t):this.signalingClient.sendIceCandidate(e);return}catch(e){p.ZP.error("skellySignalingClient.sendIceCandidate(): Could not send ice candidate (".concat(e.toString(),")")),console.log(e),await this.awaitOpen()}}async sendSdpOffer(e,t){for(;this.signalingClient;)try{if(t){var n;null===(n=this.signalingClient)||void 0===n||n.sendSdpOffer(e,t)}else this.signalingClient.sendSdpOffer(e);return}catch(e){p.ZP.error("skellySignalingClient.sendSdpOffer(): Could not send SDP offer (".concat(JSON.stringify(e),")")),console.log(typeof e),console.log(e),await this.awaitOpen()}}async sendSdpAnswer(e,t){for(p.ZP.log("skellySignalingClient.sendSdpAnswer(): Called (".concat(JSON.stringify(e),")"));this.signalingClient;)try{var n,r;t?null===(n=this.signalingClient)||void 0===n||n.sendSdpAnswer(e,t):null===(r=this.signalingClient)||void 0===r||r.sendSdpAnswer(e);return}catch(e){p.ZP.error("skellySignalingClient.sendSdpAnswer(): Could not send SDP answer (".concat(JSON.stringify(e),")")),console.log(e),console.log(typeof e),console.log(e),await this.awaitOpen()}}close(){var e;for(p.ZP.log("skellySignalingClient.close(): Called"),this.connectionState=a.Closed,null===(e=this.signalingClient)||void 0===e||e.close(),this.signalingClient=void 0;this.signalingClientReadyPromises.length>0;)this.signalingClientReadyPromises.shift()()}getRole(){return this.role}constructor(e){this.signalingClientReadyPromises=[],this.connectionState=a.Idle,this.friendId=e}}function oc(){return globalThis.skelly.reduxStore.getState()}function ou(){return globalThis.skelly.reduxStore.dispatch}function ol(){return globalThis.skelly.reduxStore.getState().account.friendId}function of(){return globalThis.skelly.apolloClient}class od{async start(e){var t,n;p.ZP.log("webRTCMaster.start(): Called");let r=this;this.skellySignalingClient=new os(ol());let{channelARN:o,credentials:i}=await this.skellySignalingClient.prepareMaster(e),a=await this.kinesis.getKinesisVideoClient(i),s=await ot(a,o,eS.MASTER),c=await nT(i,s.HTTPS,o,eS.MASTER);if(!this.skellySignalingClient)throw"SkellySignalingClientClosed";return this.skellySignalingClient.createSignalingChannel(s.WSS,a.config.systemClockOffset),this.skellySignalingClient.on("open",async()=>{p.ZP.log("webRTCMaster.onOpen(): MASTER is connected to signaling channel")}),this.skellySignalingClient.on("sdpOffer",async(e,t)=>{if(p.ZP.log("webRTCMaster.onSdpOffer(): Received SDP offer from '".concat(t,"'")),r.peerConnections[t])p.ZP.log("webRTCMaster.onSdpOffer(): Skipping creation of PeerConnection and adding tracks, as it is a follow-up sdp offer from '".concat(t,"'")),r.peerConnections[t].setSdpOffer(e);else{let n;p.ZP.log("webRTCMaster.onSdpOffer(): Creating new peer connection");let o=new oa(c,r.skellySignalingClient,e=>{p.ZP.log("webRTCMaster.peerConnection(): Connection state = '".concat(e,"'"));let n=globalThis.skelly.reduxStore.dispatch;n(Q({friendId:t,connectionState:e})),r.onConnectionStateChange(e)},r.onRemoteTrack,r.onMessage,t);r.peerConnections[t]=o;try{n=await r.getTracks()}catch(e){p.ZP.error("webRTCMaster.onSdpOffer(): Error getting tracks (".concat(JSON.stringify(e),")")),r.onError(e);return}n.forEach(e=>{p.ZP.log("webRTCMaster.onSdpOffer(): Adding local track '".concat(e.kind,"' to peer connection")),r.peerConnections[t].addTrack(e)}),p.ZP.log("webRTCMaster.onSdpOffer(): Setting SDP offer"),await r.peerConnections[t].setSdpOffer(e)}}),this.skellySignalingClient.on("sdpAnswer",async(e,t)=>{p.ZP.log("webRTCMaster.onSdpAnswer(): Received SDP answer from '".concat(t,"'")),r.peerConnections[t].setSdpAnswer(e)}),null===(t=r.skellySignalingClient)||void 0===t||t.on("iceCandidate",(e,t)=>{var n;p.ZP.log("webRTCMaster.onIceCandidate(): Received ice candidate from ".concat(t)),null===(n=r.peerConnections[t])||void 0===n||n.addIceCandidate(e)}),p.ZP.log("webRTCMaster.start(): Connecting to signaling channel"),await (null===(n=r.skellySignalingClient)||void 0===n?void 0:n.open()),p.ZP.log("webRTCMaster.start(): Successfully completed (i.e. iceServers added and signalingClient opened)"),o}mute(){Object.values(this.peerConnections).forEach(e=>e.mute())}unmute(){Object.values(this.peerConnections).forEach(e=>e.unmute())}disableVideo(){Object.values(this.peerConnections).forEach(e=>e.disableVideo())}enableVideo(e){Object.values(this.peerConnections).forEach(t=>t.enableVideo(e))}callLeft(e){return this.peerConnections[e]&&(this.peerConnections[e].close(),delete this.peerConnections[e]),Object.keys(this.peerConnections).length}close(){p.ZP.log("webRTCMaster.close(): Called");let e=of(),t=ol();p.ZP.log("webRTCMaster.close(): Informing all peers of leaving call");let n=Object.keys(this.peerConnections);n.forEach(n=>{null==e||e.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(t,n),message:"",type:"call_leave"},update:eg.P})}),p.ZP.log("webRTCMaster.close(): Closing signaling channel");let r=this.skellySignalingClient;this.skellySignalingClient=void 0,null==r||r.close(),p.ZP.log("webRTCMaster.close(): Release signalling channel"),(0,on.aH)().then(e=>{p.ZP.log("webRTCMaster.close(): Result from releasing signaling channel (".concat(JSON.stringify(e),")"))}),Object.values(this.peerConnections).forEach(e=>e.close()),this.peerConnections={}}constructor(e,t,n,r,o){this.kinesis=new rW,this.peerConnections={},p.ZP.log("webRTCMaster.constructor() Called"),this.getTracks=e,this.onRemoteTrack=t,this.onConnectionStateChange=n,this.onMessage=r,this.onError=o}}class op{async start(){p.ZP.log("webRTCViewer.start(): Called");let e=this;this.skellySignalingClient=new os(this.friendIdViewer);let t=await this.skellySignalingClient.prepareViewer(this.channelARN),n=await this.kinesis.getKinesisVideoClient(t),r=await ot(n,this.channelARN,eS.VIEWER),o=await nT(t,r.HTTPS,this.channelARN,eS.VIEWER,this.friendIdViewer);await this.skellySignalingClient.createSignalingChannel(r.WSS,n.config.systemClockOffset),this.skellySignalingClient.on("open",async()=>{if(p.ZP.log("webRTCViewer.onOpen(): VIEWER connected to signaling channel (".concat(e.peerConnection?"subsequent open":"first open",")")),!e.peerConnection){let t;let n=new oa(o,e.skellySignalingClient,t=>{p.ZP.log("webRTCViewer.peerConnection(): Connection state = '".concat(t,"'"));let n=globalThis.skelly.reduxStore.dispatch;n(Q({friendId:e.friendIdMaster,connectionState:t})),e.onConnectionStateChange(t)},e.onRemoteTrack,e.onMessage);e.peerConnection=n;try{t=await e.getTracks()}catch(t){p.ZP.log("webRTCViewer.onOpen(): Error getting tracks (".concat(JSON.stringify(t),")")),e.onError(t);return}t.forEach(t=>{var n;p.ZP.log("webRTCViewer.onOpen(): Adding local ".concat(t.kind," track to peer connection")),null===(n=e.peerConnection)||void 0===n||n.addTrack(t)})}}),this.skellySignalingClient.on("sdpOffer",async t=>{var n;p.ZP.log("webRTCViewer.onSdpOffer(): Received SDP offer from 'MASTER'"),await (null===(n=e.peerConnection)||void 0===n?void 0:n.setSdpOffer(t))}),this.skellySignalingClient.on("sdpAnswer",async t=>{var n;p.ZP.log("webRTCViewer.onSdpAnswer(): Received SDP answer from 'MASTER'"),await (null===(n=e.peerConnection)||void 0===n?void 0:n.setSdpAnswer(t))}),this.skellySignalingClient.on("iceCandidate",t=>{var n;p.ZP.log("webRTCViewer.onIceCandidate(): Received ice candidate from MASTER"),null===(n=e.peerConnection)||void 0===n||n.addIceCandidate(t)}),p.ZP.log("webRTCViewer(): Opening signaling connection"),await this.skellySignalingClient.open(),p.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(e){this.peerConnection&&this.peerConnection.enableVideo(e)}close(){var e;p.ZP.log("webRTCViewer.close(): Called"),p.ZP.log("webRTCViewer.close(): Closing peer connections"),null===(e=this.peerConnection)||void 0===e||e.close(),this.peerConnection=void 0,p.ZP.log("webRTCViewer.close(): Closing signaling channel");let t=this.skellySignalingClient;this.skellySignalingClient=void 0,null==t||t.close();let n=of();null==n||n.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(this.friendIdViewer,this.friendIdMaster),message:"",type:"call_leave"},update:eg.P})}constructor(e,t,n,r,o,i,a,s){this.kinesis=new rW,this.peerConnection=void 0,p.ZP.log("webRTCViewer.constructor(channelARN: ".concat(n,") Called")),this.friendIdViewer=e,this.friendIdMaster=t,this.channelARN=n,this.getTracks=r,this.onRemoteTrack=o,this.onConnectionStateChange=i,this.onMessage=a,this.onError=s}}var oh=n(51118);async function oy(e,t,n){p.ZP.log("lambda.sendNotification(recipient: ".concat(e,", notification: ").concat(JSON.stringify(t),", data: ").concat(JSON.stringify(n),"): Called"));let r={recipient:e};t&&(r.notification=t),n&&(r.data=n);let o=await (0,oh.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_mobile_notification",r);return o}var og=n(81981);function om(){let e=oc();return{localAudio:e.webRTC.localAudio,localVideo:e.webRTC.localVideo,localScreenSharing:e.webRTC.localScreenSharing,localDeafen:e.webRTC.localDeafen}}globalThis.skelly={},r||function(){var e,t,n,i,a,s;p.ZP.log("reduxStore.setupStore(): Called");let c=R({key:"account",version:1,storage:eh.Z,blacklist:["loginState"]},F.ZP),u=R({key:"settings",version:1,storage:eh.Z},$.ZP),l={account:c,settings:u,internetConnection:B.ZP,notifications:z.ZP,webRTC:ec,activities:el.ZP,messages:ef.ZP,reactApp:ep.ZP},f=(0,y.xC)({reducer:l,middleware:e=>e({serializableCheck:{ignoredActions:[m,v,b,w,S,_]},immutableCheck:!1}).concat([(0,ed.K3)(ey)])});r=f,p.ZP.log("reduxStore(): Initializing message listener for redux store"),(0,ed.UX)(f),globalThis.skelly.reduxStore=f,t=!1,n=(0,M.MT)(U,D,e&&e.enhancer?e.enhancer:void 0),i=function(e){n.dispatch({type:_,key:e})},a=function(e,r,o){var i={type:v,payload:r,err:o,key:e};f.dispatch(i),n.dispatch(i),t&&s.getState().bootstrapped&&(t(),t=!1)},s=L({},n,{purge:function(){var e=[];return f.dispatch({type:S,result:function(t){e.push(t)}}),Promise.all(e)},flush:function(){var e=[];return f.dispatch({type:m,result:function(t){e.push(t)}}),Promise.all(e)},pause:function(){f.dispatch({type:b})},persist:function(){f.dispatch({type:w,register:i,rehydrate:a})}}),e&&e.manualPersist||s.persist(),o=s,(0,B.S1)(),globalThis.skelly.persistor=o,p.ZP.log("reduxStore.setupStore(): Completed")}(),p.ZP.log("initGlobals(): Instanciating globalThis"),globalThis.skelly.callManager=new class{start(){p.ZP.log("callManager.start(): Called"),this.previousState=om();let e=async e=>{if(this.pipeline.push(e),!this.isProcessing){for(this.isProcessing=!0;this.pipeline.length>0;){let e=this.pipeline.shift();if(this.localStream){var t,n,r,o;if((null===(t=this.previousState)||void 0===t?void 0:t.localVideo)!==(null==e?void 0:e.localVideo)){let t=(null==e?void 0:e.localVideo)===!0;if(t){let e=await this.getVideoTrack();this.webRTCMaster&&this.webRTCMaster.enableVideo(e),Object.values(this.webRTCViewers).forEach(t=>t.enableVideo(e))}else{this.webRTCMaster&&this.webRTCMaster.disableVideo(),Object.values(this.webRTCViewers).forEach(e=>e.disableVideo());let e=this;null===(o=this.userMedia)||void 0===o||o.getTracks().forEach(t=>{if("video"===t.kind){var n;t.stop(),null===(n=e.userMedia)||void 0===n||n.removeTrack(t)}}),this.localStream.getTracks().forEach(t=>{if("video"===t.kind){var n;t.stop(),null===(n=e.localStream)||void 0===n||n.removeTrack(t)}});let t=ou();t(ee())}}if((null===(n=this.previousState)||void 0===n?void 0:n.localAudio)!==(null==e?void 0:e.localAudio)){let t=(null==e?void 0:e.localAudio)===!0;t?(this.webRTCMaster&&this.webRTCMaster.unmute(),Object.values(this.webRTCViewers).forEach(e=>e.unmute())):(this.webRTCMaster&&this.webRTCMaster.mute(),Object.values(this.webRTCViewers).forEach(e=>e.mute()))}(null===(r=this.previousState)||void 0===r?void 0:r.localDeafen)!==(null==e?void 0:e.localDeafen)&&Object.values(this.remoteStreams).forEach(t=>{let n=(null==e?void 0:e.localDeafen)!==!0;t.getAudioTracks().forEach(e=>{e.enabled=n})})}this.previousState=e}this.isProcessing=!1}};globalThis.skelly.reduxStore.subscribe(async()=>e(om())),e(this.previousState)}async openCall(e,t){if(p.ZP.log("callManager.openCall(friendId: ".concat(e.friend_id,", type: ").concat(t,"): Called")),!(null==e?void 0:e.friend_id))return;let n=ol(),r=ou(),o=of();try{this.onOpenCall&&this.onOpenCall(e.friend_id,t),r(K({friendId:e.friend_id,type:t}));let i=await (null==o?void 0:o.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(n,e.friend_id),message:t,type:"call_request"},update:eg.P}));if(p.ZP.log("callManager.openCall(): GraphQL call request returned: ",JSON.stringify(i)),console.log("result",i),e.fcmTokens){let n=oy(e.friend_id,void 0,{message:"call_request",type:t,senderName:(0,og.Jl)(e)});p.ZP.log("callManager.openCall(): Lambda sendNotification request returned: ",JSON.stringify(n))}else p.ZP.log("callManager.openCall(): Callee has no mobile devices",JSON.stringify(i))}catch(e){throw p.ZP.log("callManager.openCall(): Call request failed: ",e),e}}async cancelCall(e){p.ZP.log("callManager.cancelCall(friendId: ".concat(e,"): Called"));let t=ol(),n=ou(),r=of();this.onCancelCall&&this.onCancelCall(e);try{let o=await (null==r?void 0:r.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(t,e),message:"",type:"call_cancel"},update:eg.P}));n(G(e)),p.ZP.log("callManager.cancelCall(): Call request returned: ",o)}catch(e){throw p.ZP.log("callManager.cancelCall(): Call request failed: ",e),e}}async callRejected(e){let t=ou();t(G(e))}async callAccepted(e,t){t=t||"video",p.ZP.log("callManager.callAccepted(friendId: ".concat(e,", type: ").concat(t,"): Called"));let n=ou();this.onCallAccepted&&this.onCallAccepted(e,t),n(W({friendId:e,type:t}));let r=this,o=new od(this.getTracks.bind(this),(e,t)=>{r.onRemoteTrack(e,t)},e=>{r.onConnectionStateChange(o,e)},t=>{r.onMessage(t,e)},t=>{n(Y({friendId:e,name:t.name,message:t.message})),r.freeResources()});this.webRTCMaster=o;let i=await this.webRTCMaster.start(e);await this.sendSignalingChannel(e,i)}async callRequested(e,t,n){var r;p.ZP.log("callManager.callRequest(caller: ".concat(e,", type: ").concat(t,"): Called"));let o=ou();o(V({friendId:e,type:t})),null===(r=this.onCallRequested)||void 0===r||r.call(this,e,t,n)}async callCanceled(e){p.ZP.log("callManager.callCancel(caller: ".concat(e,"): Called"));let t=ou();t(Z(e)),this.onCallCancelled&&this.onCallCancelled(e)}async rejectCall(e){p.ZP.log("callManager.rejectCall(caller: ".concat(e,"): Called"));let t=ol(),n=ou(),r=of();try{n(Z(e));let o=await (null==r?void 0:r.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(e,t),message:"",type:"call_reject"},update:eg.P}));p.ZP.log("callManager.rejectCall(): Call reject returned: ",o)}catch(e){throw p.ZP.log("callManager.rejectCall(): Call reject failed: ",e),e}}async acceptIncomingCall(e,t){p.ZP.log("callManager.acceptIncomingCall(friendId: ".concat(e,", type: ").concat(t,"): Called")),this.freeAllRemoteMedia(),this.freeAllWebRTCViewers(),this.freeWebRTCMaster();let n=ol(),r=ou(),o=of();try{r(q({friendId:e,type:t}));let i=await (null==o?void 0:o.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(e,n),message:t,type:"call_accept"},update:eg.P}));p.ZP.log("callManager.acceptIncomingCall(): Call accept returned: ".concat(JSON.stringify(i)," "))}catch(e){throw p.ZP.log("callManager.acceptIncomingCall(): Call accept failed: ",e),e}}async addSignalingChannel(e,t){p.ZP.log("callManager.addSignalingChannel(caller: ".concat(e,", channelARN: ").concat(t,"): Called"));let n=ol(),r=ou(),o=this,i=new op(n,e,t,this.getTracks.bind(this),(t,n)=>{o.onRemoteTrack(t,e)},e=>{o.onConnectionStateChange(i,e)},t=>{o.onMessage(t,e)},t=>{p.ZP.log("callManager(): WebRTCViewer reported error (".concat(JSON.stringify(t),")")),r(Y({friendId:e,name:t.name,message:t.message})),o.freeResources()});this.webRTCViewers[e]=i;try{await i.start()}catch(e){p.ZP.error("callManager.addSignalingChannel(): Could not start webRTCViewer (".concat(JSON.stringify(e),")")),ou()}}async onConnectionStateChange(e,t){if(p.ZP.log("callManager.onConnectionStateChange(connectionState: ".concat(t,"): Called")),"connected"===t){let t=oc();if(t.webRTC.localAudio?e.unmute():e.mute(),t.webRTC.localVideo){let t=await this.getVideoTrack();e.enableVideo(t)}else e.disableVideo()}}async sendSignalingChannel(e,t){p.ZP.log("callManager.sendSignalingChannel(friendId: ".concat(e,", channelARN: ").concat(t,"): Called"));let n=ol(),r=of();try{let o=await (null==r?void 0:r.mutate({mutation:em.oi,variables:{chatId:(0,em.ns)(n,e),message:"".concat(t),type:"signaling_channel"},update:eg.P}));p.ZP.log("callManager.sendSignalingChannel(): Call request returned: ",JSON.stringify(o))}catch(e){throw p.ZP.log("callManager.sendSignalingChannel(): Call request failed: ",e),e}}async getTracks(){if(p.ZP.log("callManager.getTracks(): Called"),!this.userMedia){let e=oc(),t=e.webRTC.localAudio,n=e.webRTC.localVideo,r={};n&&(r.video={}),t&&(r.audio={noiseSuppression:!0}),p.ZP.log("callManager.getTracks(): Config: ".concat(JSON.stringify(r)));try{this.userMedia=await or.getUserMedia(r),this.localStream=oo(),this.userMedia.getTracks().forEach(e=>{if("video"===e.kind){var t;null===(t=this.localStream)||void 0===t||t.addTrack(e)}});let e=ou();e(ee(!0))}catch(e){throw p.ZP.log("callManager.getTracks(): Error occured: ".concat(JSON.stringify(e))),console.log(e),console.log("e.name: ".concat(e.name)),console.log("e.message: ".concat(e.message)),e}}return this.userMedia.getTracks()}async getVideoTrack(){let e;if(p.ZP.log("callManager.getVideoTrack(): Called"),!this.localStream)throw p.ZP.log("callManager.getVideoTrack(): Returning as there is no local streama"),"NoLocalStream";if(this.localStream.getVideoTracks().forEach(t=>{e=t}),e)return e;try{let t=await or.getUserMedia({video:!0}),n=this;t.getTracks().forEach(t=>{var r,o;e=t,null===(r=n.userMedia)||void 0===r||r.addTrack(t),null===(o=n.localStream)||void 0===o||o.addTrack(t)});let r=ou();r(ee(!0))}catch(e){throw p.ZP.log("callManager.getVideoTrack(): Error occured: ".concat(JSON.stringify(e))),console.log(e),console.log("e.name: ".concat(e.name)),console.log("e.message: ".concat(e.message)),e}return e}onRemoteTrack(e,t){p.ZP.log("callManager.onRemoteTrack(kind: ".concat(e.kind,", remoteClientId: ").concat(t,"): Called")),this.remoteStreams[t]||(this.remoteStreams[t]=oo()),this.remoteStreams[t].addTrack(e);let n=ou();n(ei({friendId:t,isActive:!0}))}onMessage(e,t){p.ZP.log("callManager.onMessage(): Message received (".concat(JSON.stringify(e),")"));let n=ou();switch(e.update){case"mute":n(J({friendId:t,remoteAudio:!1}));break;case"unmute":n(J({friendId:t,remoteAudio:!0}));break;case"disableVideo":n(X({friendId:t,remoteVideo:!1})),this.remoteStreams[t]&&this.remoteStreams[t].getTracks().forEach(e=>{"video"===e.kind&&(e.stop(),this.remoteStreams[t].removeTrack(e))});break;case"enableVideo":n(X({friendId:t,remoteVideo:!0}))}}async callLeft(e){p.ZP.log("callManager.callLeft(friendId: ".concat(e,"): Called"));let t=ou();if(this.remoteStreams[e]&&(t(ea(e)),this.remoteStreams[e].getTracks().forEach(e=>e.stop()),delete this.remoteStreams[e]),this.webRTCMaster){let t=this.webRTCMaster.callLeft(e);0===t&&(this.webRTCMaster.close(),this.webRTCMaster=void 0)}this.webRTCViewers[e]&&(this.webRTCViewers[e].close(),delete this.webRTCViewers[e]),void 0===this.webRTCMaster&&0===Object.keys(this.webRTCViewers).length&&this.userMedia&&(this.userMedia.getTracks().forEach(e=>e.stop()),this.userMedia=void 0,this.localStream=void 0,t(ee(!1))),this.onCallLeft&&this.onCallLeft(e)}leaveCall(){p.ZP.log("callManager.leaveCall(): Called"),this.onLeaveCall&&this.onLeaveCall(),this.freeResources();let e=ou();e(es())}freeResources(){p.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(e=>e.close()),this.webRTCViewers={}}freeLocalMedia(){this.userMedia&&this.userMedia.getTracks().forEach(e=>e.stop()),this.userMedia=void 0,this.localStream=void 0}freeAllRemoteMedia(){Object.values(this.remoteStreams).forEach(e=>{e.getTracks().forEach(e=>e.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,p.ZP.log("CallManager.constructor(): Called")}},null===localStorage.getItem("skelly:installationId")&&(localStorage.setItem("skelly:installationId",(0,c.Z)()),localStorage.setItem("skelly:installationTime",Math.round(new Date().getTime()/1e3).toString())),globalThis.skellyGlobal={},globalThis.skellyGlobal.skellyAudio=new class{subscribe(){p.ZP.log("SkellyAudio.subscribe(): Called");let e={callOngoing:!1},t=this;globalThis.skelly.reduxStore.subscribe(()=>{let n=Object.keys(globalThis.skelly.reduxStore.getState().webRTC.incomingCalls).length>0||Object.keys(globalThis.skelly.reduxStore.getState().webRTC.outgoingCalls).length>0;n!==e.callOngoing&&(n?(p.ZP.log("SkellyAudio.subscribe(): Playing ringtone"),t.playRingtone()):(p.ZP.log("SkellyAudio.subscribe(): Stop playing ringtone"),t.stopRingtone()),e.callOngoing=n)})}playRingtone(){p.ZP.log("Audio.playRingtone(): Called (this.callCounter: ".concat(this.callCounter,")")),this.ringtone.currentTime=0,this.ringtone.play()}stopRingtone(){p.ZP.log("Audio.stopRingtone(): Called (this.callCounter: ".concat(this.callCounter,")")),this.ringtone.pause()}playMatchEnded(){let e=new Audio("/music/matchEnded.mp3");e.onerror=function(e){p.ZP.error("audio.onerror: Ringtone could not be played")},e.play()}constructor(){this.callCounter=0,p.ZP.log("SkellyAudio.constructor(): Called"),this.ringtone=new Audio("/music/ringtone.mp3"),this.ringtone.loop=!0,this.ringtone.onerror=function(e){p.ZP.error("SkellyAudio(): audio.onerror: Ringtone could not be played"),p.ZP.error(e)},p.ZP.log("SkellyAudio.constructor(): Completed")}},globalThis.skellyGlobal.skellyAudio.subscribe();var ov=e=>{let{Component:t,pageProps:n}=e;{let e=d.Z.get("mode");document.body.style.backgroundColor=(0,f.d)(e)}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l(),{children:(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})}),(0,s.jsx)(t,{...n})]})}},32017:function(e,t,n){"use strict";n.d(t,{f:function(){return r}});var r=gtag},51118:function(e,t,n){"use strict";n.d(t,{d:function(){return ny}});var r,o=n(88501);let i=e=>t=>async n=>{if(!o.aW.isInstance(n.request))return t(n);let{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]="";else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)},a={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},s=e=>({applyToStack:t=>{t.add(i(e),a)}}),c=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:o,commandName:i,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=s,l=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:d,...p}=r.output;return a?.info?.({clientName:o,commandName:i,input:l(n.input),output:f(p),metadata:d}),r}catch(c){let{clientName:e,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:a}=i,s=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:e,commandName:r,input:s(n.input),error:c,metadata:c.$metadata}),c}},u={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},l=e=>({applyToStack:e=>{e.add(c(),u)}});var f=n(71769),d=n(8243),p=n(14912),h=n(44562),y=n(59988),g=n(68504),m=n(37916),v=n(12532);let b="X-Amz-Date",w="X-Amz-Signature",S="X-Amz-Security-Token",_="authorization",E=b.toLowerCase(),P=[_,E,"date"],O=w.toLowerCase(),A="x-amz-content-sha256",C=S.toLowerCase(),x={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},T=/^proxy-/,I=/^sec-/,k="AWS4-HMAC-SHA256",R="aws4_request",M={},j=[],N=(e,t,n)=>`${e}/${t}/${n}/${R}`,L=async(e,t,n,r,o)=>{let i=await D(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${(0,h.N)(i)}:${t.sessionToken}`;if(a in M)return M[a];for(j.push(a);j.length>50;)delete M[j.shift()];let s=`AWS4${t.secretAccessKey}`;for(let t of[n,r,o,R])s=await D(e,s,t);return M[a]=s},D=(e,t,n)=>{let r=new e(t);return r.update((0,v._)(n)),r.digest()},U=({headers:e},t,n)=>{let r={};for(let o of Object.keys(e).sort()){if(void 0==e[o])continue;let i=o.toLowerCase();(!(i in x||t?.has(i)||T.test(i)||I.test(i))||n&&(!n||n.has(i)))&&(r[i]=e[o].trim().replace(/\s+/g," "))}return r};var F=n(55388);let $=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e).sort()){if(r.toLowerCase()===O)continue;t.push(r);let o=e[r];"string"==typeof o?n[r]=`${(0,F.i)(r)}=${(0,F.i)(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce((e,t)=>e.concat([`${(0,F.i)(r)}=${(0,F.i)(t)}`]),[]).sort().join("&"))}return t.map(e=>n[e]).filter(e=>e).join("&")},B=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),z=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===A)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||B(t)){let e=new n;return e.update((0,v._)(t)),(0,h.N)(await e.digest())}return"UNSIGNED-PAYLOAD"},H=(e,t)=>{for(let n of(e=e.toLowerCase(),Object.keys(t)))if(e===n.toLowerCase())return!0;return!1},V=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?Z(t):void 0}),Z=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{}),q=(e,t={})=>{let{headers:n,query:r={}}="function"==typeof e.clone?e.clone():V(e);for(let e of Object.keys(n)){let o=e.toLowerCase();"x-amz-"!==o.slice(0,6)||t.unhoistableHeaders?.has(o)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},K=e=>{for(let t of Object.keys((e="function"==typeof e.clone?e.clone():V(e)).headers))P.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},G=e=>W(e).toISOString().replace(/\.\d{3}Z$/,"Z"),W=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Y{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:o,uriEscapePath:i=!0}){this.headerMarshaller=new p.y7(g.G,m.$),this.service=r,this.sha256=o,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,y.$)(n),this.credentialProvider=(0,y.$)(t)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,signingRegion:s,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=s??await this.regionProvider(),{longDate:f,shortDate:d}=J(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let p=N(d,l,c??this.service),h=q(K(e),{unhoistableHeaders:i});u.sessionToken&&(h.query[S]=u.sessionToken),h.query["X-Amz-Algorithm"]=k,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${p}`,h.query[b]=f,h.query["X-Amz-Expires"]=r.toString(10);let y=U(h,o,a);return h.query["X-Amz-SignedHeaders"]=X(y),h.query[w]=await this.getSignature(f,p,this.getSigningKey(u,l,d,c),this.createCanonicalRequest(h,y,await z(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:s,longDate:c}=J(n),u=N(s,a,i??this.service),l=await z({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let d=(0,h.N)(await f.digest()),p=["AWS4-HMAC-SHA256-PAYLOAD",c,u,r,d,l].join("\n");return this.signString(p,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){let o=this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature});return o.then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=J(t),s=new this.sha256(await this.getSigningKey(o,i,a,r));return s.update((0,v._)(e)),(0,h.N)(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let s=o??await this.regionProvider(),c=K(e),{longDate:u,shortDate:l}=J(t),f=N(l,s,i??this.service);c.headers[E]=u,a.sessionToken&&(c.headers[C]=a.sessionToken);let d=await z(c,this.sha256);!H(A,c.headers)&&this.applyChecksum&&(c.headers[A]=d);let p=U(c,r,n),h=await this.getSignature(u,f,this.getSigningKey(a,s,l,i),this.createCanonicalRequest(c,p,d));return c.headers[_]=`${k} Credential=${a.accessKeyId}/${f}, SignedHeaders=${X(p)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} ${this.getCanonicalPath(e)} ${$(e)} ${r.map(e=>`${e}:${t[e]}`).join("\n")} ${r.join(";")} ${n}`}async createStringToSign(e,t,n){let r=new this.sha256;r.update((0,v._)(n));let o=await r.digest();return`${k} ${e} ${t} ${(0,h.N)(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split("/"))n?.length!==0&&"."!==n&&(".."===n?t.pop():t.push(n));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`,r=encodeURIComponent(n);return r.replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){let o=await this.createStringToSign(e,t,r),i=new this.sha256(await n);return i.update((0,v._)(o)),(0,h.N)(await i.digest())}getSigningKey(e,t,n,r){return L(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}}let J=e=>{let t=G(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},X=e=>Object.keys(e).sort().join(";"),Q=e=>{let t;let n=e.credentials?ee(e.credentials):e.credentialDefaultProvider(e),{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;return t=e.signer?(0,y.$)(e.signer):e.regionInfoProvider?()=>(0,y.$)(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,o])=>{let{signingRegion:a,signingService:s}=t;e.signingRegion=e.signingRegion||a||o,e.signingName=e.signingName||s||e.serviceId;let c={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},u=e.signerConstructor||Y;return new u(c)}):async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await (0,y.$)(e.region)(),properties:{}},t);let o=t.signingRegion,a=t.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},c=e.signerConstructor||Y;return new c(s)},{...e,systemClockOffset:o,signingEscapePath:r,credentials:n,signer:t}},ee=e=>"function"==typeof e?(0,d.H)(e,e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5,e=>void 0!==e.expiration):(0,y.$)(e),et=e=>new Date(Date.now()+e),en=(e,t)=>Math.abs(et(t).getTime()-e)>=3e5,er=(e,t)=>{let n=Date.parse(e);return en(n,t)?n-Date.now():t},eo=e=>(t,n)=>async function(r){if(!o.aW.isInstance(r.request))return t(r);let i=n.endpointV2?.properties?.authSchemes?.[0],a=i?.name==="sigv4a"?i?.signingRegionSet?.join(","):void 0,s=await e.signer(i),c=await t({...r,request:await s.sign(r.request,{signingDate:et(e.systemClockOffset),signingRegion:a||n.signing_region,signingService:n.signing_service})}).catch(t=>{let n=t.ServerTime??ei(t.$response);throw n&&(e.systemClockOffset=er(n,e.systemClockOffset)),t}),u=ei(c.response);return u&&(e.systemClockOffset=er(u,e.systemClockOffset)),c},ei=e=>o.Zn.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,ea={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0},es=e=>({applyToStack:t=>{t.addRelativeTo(eo(e),ea)}});var ec=n(8794);let eu="user-agent",el="x-amz-user-agent",ef=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,ed=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ep=e=>(t,n)=>async r=>{let{request:i}=r;if(!o.aW.isInstance(i))return t(r);let{headers:a}=i,s=n?.userAgent?.map(eh)||[],c=(await e.defaultUserAgentProvider()).map(eh),u=e?.customUserAgent?.map(eh)||[],l=(0,ec.Qj)(),f=(l?[l]:[]).concat([...c,...s,...u]).join(" "),d=[...c.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(d&&(a[el]=a[el]?`${a[eu]} ${d}`:d),a[eu]=f):a[el]=f,t({...r,request:i})},eh=e=>{let t=e[0].split("/").map(e=>e.replace(ef,"-")).join("/"),n=e[1]?.replace(ed,"-"),r=t.indexOf("/"),o=t.substring(0,r),i=t.substring(r+1);return"api"===o&&(i=i.toLowerCase()),[o,i,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},ey={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},eg=e=>({applyToStack:t=>{t.add(ep(e),ey)}});var em=n(47860);let ev=e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)});var eb=n(52326),ew=n(31974),eS=n(11511),e_=n(44588);let eE=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"lambda"});var eP={i8:"3.388.0"},eO=n(63037),eA=n(51206),eC=n.n(eA);let ex=({serviceId:e,clientVersion:t})=>async()=>{let n="undefined"!=typeof window&&window?.navigator?.userAgent?eC().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};class eT{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new p.Pg(e,t),this.utfEncoder=e}deserialize(e,t){var n;let r=function(e){let t=0,n=0,r=null,o=null,i=e=>{if("number"!=typeof e)throw Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e);let o=new DataView(r.buffer);o.setUint32(0,e,!1)},a=async function*(){let a=e[Symbol.asyncIterator]();for(;;){let{value:e,done:s}=await a.next();if(s){if(t){if(t===n)yield r;else throw Error("Truncated event message received.")}return}let c=e.length,u=0;for(;u({[Symbol.asyncIterator]:async function*(){let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)return;yield n}}finally{t.releaseLock()}}}),ek=e=>{let t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){let{done:n,value:r}=await t.next();if(n)return e.close();e.enqueue(r)}})};class eR{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new eT({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){let n=eM(e)?eI(e):e;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){let n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?ek(n):n}}let eM=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,ej=e=>new eR(e);var eN=n(39627),eL=n(33131),eD=n(90130),eU=n(63660),eF=n(93294),e$=n(10687);let eB="required",ez="argv",eH="isSet",eV="tree",eZ="error",eq="endpoint",eK="PartitionResult",eG={[eB]:!1,type:"String"},eW={[eB]:!0,default:!1,type:"Boolean"},eY={ref:"Endpoint"},eJ={fn:"booleanEquals",[ez]:[{ref:"UseFIPS"},!0]},eX={fn:"booleanEquals",[ez]:[{ref:"UseDualStack"},!0]},eQ={},e0={fn:"booleanEquals",[ez]:[!0,{fn:"getAttr",[ez]:[{ref:eK},"supportsFIPS"]}]},e1={fn:"booleanEquals",[ez]:[!0,{fn:"getAttr",[ez]:[{ref:eK},"supportsDualStack"]}]},e2=[eJ],e5=[eX],e3=[{ref:"Region"}],e6={version:"1.0",parameters:{Region:eG,UseDualStack:eW,UseFIPS:eW,Endpoint:eG},rules:[{conditions:[{fn:eH,[ez]:[eY]}],type:eV,rules:[{conditions:e2,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:eZ},{type:eV,rules:[{conditions:e5,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:eZ},{endpoint:{url:eY,properties:eQ,headers:eQ},type:eq}]}]},{type:eV,rules:[{conditions:[{fn:eH,[ez]:e3}],type:eV,rules:[{conditions:[{fn:"aws.partition",[ez]:e3,assign:eK}],type:eV,rules:[{conditions:[eJ,eX],type:eV,rules:[{conditions:[e0,e1],type:eV,rules:[{type:eV,rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eQ,headers:eQ},type:eq}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:eZ}]},{conditions:e2,type:eV,rules:[{conditions:[e0],type:eV,rules:[{type:eV,rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:eQ,headers:eQ},type:eq}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:eZ}]},{conditions:e5,type:eV,rules:[{conditions:[e1],type:eV,rules:[{type:eV,rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eQ,headers:eQ},type:eq}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:eZ}]},{type:eV,rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:eQ,headers:eQ},type:eq}]}]}]},{error:"Invalid Configuration: Missing Region",type:eZ}]}]},e4=(e,t={})=>(0,ec.B1)(e6,{endpointParams:e,logger:t.logger}),e8=e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??e$.G,base64Encoder:e?.base64Encoder??e$.s,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??e4,logger:e?.logger??new e_.vk,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??eF.e,utf8Decoder:e?.utf8Decoder??m.$,utf8Encoder:e?.utf8Encoder??g.G});var e7=n(95419);let e9=e=>{let t=(0,e7.j)(e),n=()=>t().then(e_.jv),r=e8(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??eD.W,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ex({serviceId:r.serviceId,clientVersion:eP.i8}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??ej,maxAttempts:e?.maxAttempts??eU.J,region:e?.region??(0,eL.n)("Region is missing"),requestHandler:e?.requestHandler??new eN.B(n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||eU.CA),sha256:e?.sha256??eO.Sha256,streamCollector:e?.streamCollector??eN.C,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(em.JY)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(em.Fh))}};class te extends e_.KU{constructor(...[e]){let t=e9(e||{}),n=eE(t),r=(0,em.Xb)(n),o=(0,ew.uW)(r),i=(0,eS.BC)(o),a=Q(i),c={...a,customUserAgent:"string"==typeof a.customUserAgent?[[a.customUserAgent]]:a.customUserAgent},u=ev(c);super(u),this.config=u,this.middlewareStack.use((0,eS.NQ)(this.config)),this.middlewareStack.use((0,eb.VG)(this.config)),this.middlewareStack.use(s(this.config)),this.middlewareStack.use(l(this.config)),this.middlewareStack.use((0,f.eV)(this.config)),this.middlewareStack.use(es(this.config)),this.middlewareStack.use(eg(this.config))}destroy(){super.destroy()}}var tt=n(45410);class tn extends e_.sI{constructor(e){super(e),Object.setPrototypeOf(this,tn.prototype)}}class tr extends tn{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,tr.prototype),this.Type=e.Type}}class to extends tn{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,to.prototype),this.Type=e.Type}}class ti extends tn{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ti.prototype),this.Type=e.Type,this.Message=e.Message}}class ta extends tn{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,ta.prototype),this.Type=e.Type,this.Message=e.Message}}class ts extends tn{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,ts.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class tc extends tn{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,tc.prototype),this.Type=e.Type,this.Message=e.Message}}class tu extends tn{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,tu.prototype),this.Type=e.Type,this.Message=e.Message}}class tl extends tn{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,tl.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class tf extends tn{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,tf.prototype),this.Type=e.Type,this.Message=e.Message}}class td extends tn{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,td.prototype),this.Type=e.Type,this.Message=e.Message}}class tp extends tn{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,tp.prototype),this.Type=e.Type,this.Message=e.Message}}class th extends tn{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,th.prototype),this.Type=e.Type,this.Message=e.Message}}class ty extends tn{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ty.prototype),this.Type=e.Type,this.Message=e.Message}}class tg extends tn{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.Type=e.Type}}class tm extends tn{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,tm.prototype),this.Type=e.Type,this.Message=e.Message}}class tv extends tn{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,tv.prototype),this.Type=e.Type,this.Message=e.Message}}class tb extends tn{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,tb.prototype),this.Type=e.Type,this.Message=e.Message}}class tw extends tn{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,tw.prototype),this.Type=e.Type,this.Message=e.Message}}class tS extends tn{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,tS.prototype),this.Type=e.Type,this.Message=e.Message}}class t_ extends tn{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,t_.prototype),this.Type=e.Type,this.Message=e.Message}}class tE extends tn{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,tE.prototype),this.Type=e.Type,this.Message=e.Message}}class tP extends tn{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,tP.prototype),this.Type=e.Type,this.Message=e.Message}}class tO extends tn{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,tO.prototype),this.Type=e.Type,this.Message=e.Message}}class tA extends tn{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,tA.prototype),this.Type=e.Type}}class tC extends tn{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,tC.prototype),this.Type=e.Type}}class tx extends tn{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,tx.prototype),this.Type=e.Type,this.Message=e.Message}}class tT extends tn{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,tT.prototype),this.Type=e.Type,this.Message=e.Message}}class tI extends tn{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,tI.prototype),this.Type=e.Type,this.Message=e.Message}}class tk extends tn{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,tk.prototype),this.Type=e.Type,this.Message=e.Message}}class tR extends tn{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,tR.prototype),this.Type=e.Type}}(r||(r={})).visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1]);let tM=e=>({...e,...e.Payload&&{Payload:e_.oc}}),tj=e=>({...e,...e.Payload&&{Payload:e_.oc}}),tN=async(e,t)=>{let n;let{hostname:r,protocol:i="https",port:a,path:s}=await t.endpoint(),c=(0,e_.UI)({},ns,{"content-type":"application/octet-stream","x-amz-invocation-type":e.InvocationType,"x-amz-log-type":e.LogType,"x-amz-client-context":e.ClientContext}),u=`${s?.endsWith("/")?s.slice(0,-1):s||""}/2015-03-31/functions/{FunctionName}/invocations`;u=(0,e_.Is)(u,e,"FunctionName",()=>e.FunctionName,"{FunctionName}",!1);let l=(0,e_.UI)({Qualifier:[,e.Qualifier]});return void 0!==e.Payload&&(n=e.Payload),new o.aW({protocol:i,hostname:r,port:a,method:"POST",headers:c,path:u,query:l,body:n})},tL=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return tD(e,t);let n=(0,e_.UI)({$metadata:ni(e),FunctionError:[,e.headers["x-amz-function-error"]],LogResult:[,e.headers["x-amz-log-result"]],ExecutedVersion:[,e.headers["x-amz-executed-version"]]}),r=await (0,e_.Wg)(e.body,t);return n.Payload=r,(0,e_.UI)(n,{StatusCode:[,e.statusCode]}),n},tD=async(e,t)=>{let n={...e,body:await nu(e.body,t)},r=nl(e,n.body);switch(r){case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await tF(n,t);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await t$(n,t);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await tB(n,t);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await tz(n,t);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await tH(n,t);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await tV(n,t);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await tZ(n,t);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await tq(n,t);case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await tK(n,t);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await tG(n,t);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await tW(n,t);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await tY(n,t);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await tJ(n,t);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await tX(n,t);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await tQ(n,t);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await t0(n,t);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await t1(n,t);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await t2(n,t);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await t5(n,t);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await t3(n,t);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await t6(n,t);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await t4(n,t);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await t8(n,t);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await t7(n,t);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await t9(n,t);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await ne(n,t);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await nt(n,t);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await nn(n,t);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await nr(n,t);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await no(n,t);default:let o=n.body;return tU({output:e,parsedBody:o,errorCode:r})}},tU=(0,e_.PC)(tn),tF=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tc({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t$=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tu({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tB=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{EC2ErrorCode:e_.pY,Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tl({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tz=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tf({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tH=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new td({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tV=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tp({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tZ=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new th({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tq=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new ty({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tK=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new tr({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tG=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new tg({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tW=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tm({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tY=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tv({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tJ=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tb({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tX=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tw({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},tQ=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tS({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t0=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new t_({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t1=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tE({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t2=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tP({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t5=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tO({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t3=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new tA({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t6=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new to({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t4=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new ti({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t8=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new tC({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t7=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new ta({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},t9=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tx({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},ne=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tT({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},nt=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tI({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},nn=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Message:e_.pY,Type:e_.pY});Object.assign(n,o);let i=new tk({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},nr=async(e,t)=>{let n=(0,e_.UI)({retryAfterSeconds:[,e.headers["retry-after"]]}),r=e.body,o=(0,e_.qn)(r,{Reason:e_.pY,Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new ts({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},no=async(e,t)=>{let n=(0,e_.UI)({}),r=e.body,o=(0,e_.qn)(r,{Type:e_.pY,message:e_.pY});Object.assign(n,o);let i=new tR({$metadata:ni(e),...n});return(0,e_.to)(i,e.body)},ni=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),na=(e,t)=>(0,e_.Wg)(e,t).then(e=>t.utf8Encoder(e)),ns=e=>null!=e&&""!==e&&(!Object.getOwnPropertyNames(e).includes("length")||0!=e.length)&&(!Object.getOwnPropertyNames(e).includes("size")||0!=e.size),nc=(e,t)=>na(e,t).then(e=>e.length?JSON.parse(e):{}),nu=async(e,t)=>{let n=await nc(e,t);return n.message=n.message??n.Message,n},nl=(e,t)=>{let n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=Object.keys(e.headers).find(e=>"x-amzn-errortype"===e.toLowerCase());return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class nf extends e_.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,tt.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ew.a3)(t,nf.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"LambdaClient",commandName:"InvokeCommand",inputFilterSensitiveLog:tM,outputFilterSensitiveLog:tj})}serialize(e,t){return tN(e,t)}deserialize(e,t){return tL(e,t)}}var nd=n(48764).lW,np=n(43113),nh=n(62645);async function ny(e,t){var n;nh.ZP.log("lambda.invoke(".concat(e,"): Called (payload: ").concat(JSON.stringify(t),")"));let r=await (0,np.UR)(),o=new te({region:"us-east-1",credentials:r}),i={FunctionName:e},a=await (0,np.hP)();void 0!==a&&(i.ClientContext=nd.from(JSON.stringify({accessToken:a})).toString("base64")),void 0!==t&&(i.Payload=nd.from(JSON.stringify(t)));let s=new nf(i),c=await o.send(s),u=(n=c.Payload,new TextDecoder().decode(n)),l=JSON.parse(u);if(!0===l.success)return l;if(nh.ZP.warn("lambda.invoke(".concat(e,"): Failed ").concat(JSON.stringify(l))),l.message)throw l.message;if(l.errorMessage)throw l.errorMessage;throw l}},99564:function(e,t,n){"use strict";n.d(t,{P4:function(){return i},aH:function(){return s},tD:function(){return o},wH:function(){return a}});var r=n(51118);async function o(e){let t=await (0,r.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_get",e?{participants:e}:void 0);return t}async function i(e,t){let n=await (0,r.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_participants",{channel_name:e,participants:t});return n}async function a(e){let t=await (0,r.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_viewer",{channel_name:e});return t}async function s(){let e=await (0,r.d)("arn:aws:lambda:us-east-1:063451354639:function:skelly_rest_signaling_channel_release");return e}},66280:function(e,t,n){"use strict";function r(e,t){let{data:n}=t;e.modify({id:e.identify({chat_id:n.postMessage.chat_id,__typename:"Messages"}),fields:{messages:e=>[n.postMessage,...e]}})}n.d(t,{P:function(){return r}})},96096:function(e,t,n){"use strict";n.d(t,{$Z:function(){return b},Ux:function(){return p},_U:function(){return d},ec:function(){return y},ns:function(){return g},o6:function(){return v},oi:function(){return m},sc:function(){return h},uF:function(){return w},wi:function(){return S}});var r=n(82729),o=n(31230);function i(){let e=(0,r._)(["\n query getMessages($chatId: String!, $nextToken: String) {\n getMessages(chat_id: $chatId, nextToken: $nextToken) {\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 i=function(){return e},e}function a(){let e=(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 a=function(){return e},e}function s(){let e=(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 s=function(){return e},e}function c(){let e=(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 c=function(){return e},e}function u(){let e=(0,r._)(["\n subscription messageSubscription {\n message {\n auth\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 u=function(){return e},e}function l(){let e=(0,r._)(["\n query getMessagesSeen {\n getMessagesSeen {\n chat_id\n message_id\n }\n }\n"]);return l=function(){return e},e}function f(){let e=(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 f=function(){return e},e}let d=(0,o.Ps)(i());function p(e,t){let n=y(e);return"".concat(n," (").concat(h(e.size)).concat(t?" "+t:"",")")}function h(e){let t=e>1073741824?(e/1073741824).toFixed(1):e>1048576?(e/1048576).toFixed(1):e>1024?(e/1024).toFixed(1):e;return"".concat(t," ").concat(e>1073741824?"GB":e>1048576?"MB":e>1024?"KB":"B")}function y(e){return e.name.slice(37)}function g(e,t){return parseInt(e)>parseInt(t)?"friend#".concat(t,"#").concat(e):"friend#".concat(e,"#").concat(t)}let m=(0,o.Ps)(a()),v=(0,o.Ps)(s()),b=(0,o.Ps)(c());(0,o.Ps)(u());let w=(0,o.Ps)(l()),S=(0,o.Ps)(f())},12401:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});let r="web"},62645:function(e,t,n){"use strict";let r;n.d(t,{ZK:function(){return p},cM:function(){return d},vU:function(){return h}});var o,i,a=n(12401);let s="android"===a.N||"ios"===a.N;function c(e,t,n){s&&(u.push("".concat(e," ").concat(JSON.stringify(t)).concat(n?" | "+JSON.stringify(n):"")),r&&r())}let u=[];(o=i||(i={}))[o.prod=0]="prod",o[o.dev=1]="dev";let l=i.dev;function f(e){return void 0==e||e<=l}function d(e,t,n){f(n)&&(void 0===t?console.log(y(),e):console.log(y(),e,t),c("[log] "+y(),e,t))}function p(e,t,n){f(n)&&(void 0===t?console.warn(y(),e):console.warn(y(),e,t),c("[warn] "+y(),e,t))}function h(e,t,n){f(n)&&(void 0===t?console.error(y(),e):console.error(y(),e,t),c("[error] "+y(),e,t))}function y(){let e=new Date;return e.toString().split(" ")[4]+"."+(100>e.getMilliseconds()?"0":"")+(10>e.getMilliseconds()?"0":"")+e.getMilliseconds()+":"}let g={LogLevel:i,setLogLevel:function(e){l=e},log:d,warn:p,error:h};t.ZP=g},81981:function(e,t,n){"use strict";function r(e,t){var n;let r=Array.isArray(null==e?void 0:e.gamer_names)&&(null==e?void 0:null===(n=e.gamer_names)||void 0===n?void 0:n.length)>0?e.gamer_names.join(", "):void 0;return(null==e?void 0:e.real_name)||r||(null==t?void 0:t.formatMessage({id:"SkellyIdValue"},{friendId:null==e?void 0:e.friend_id}))||(null==e?void 0:e.friend_id)}n.d(t,{Jl:function(){return r}})},91881:function(e,t,n){"use strict";n.d(t,{zZ:function(){return o},ZP:function(){return _},ni:function(){return S},Dj:function(){return w},vV:function(){return y},Fu:function(){return g},JF:function(){return v},i_:function(){return m},av:function(){return p},d0:function(){return b},b6:function(){return h}});var r,o,i=n(77236);function a(e){this.message=e}a.prototype=Error(),a.prototype.name="InvalidCharacterError";var s="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,s="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)&&(s+=String.fromCharCode(255&n>>(-2*o&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function c(e){this.message=e}c.prototype=Error(),c.prototype.name="InvalidTokenError";var u=function(e,t){if("string"!=typeof e)throw new c("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t,n=e.replace(/-/g,"+").replace(/_/g,"/");switch(n.length%4){case 0:break;case 2:n+="==";break;case 3:n+="=";break;default:throw"Illegal base64url string!"}try{return t=n,decodeURIComponent(s(t).replace(/(.)/g,function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return s(n)}}(e.split(".")[n]))}catch(e){throw new c("Invalid token specified: "+e.message)}},l=n(62645);(r=o||(o={})).Initializing="Initializing",r.CreatingApolloClientPrivate="CreatingApolloClientPrivate",r.LoggedIn="LoggedIn",r.ClosingApolloClientPrivate="ClosingApolloClientPrivate",r.CreatingApolloClientPublic="CreatingApolloClientPublic",r.LoggedOut="LoggedOut";let f={loginState:o.Initializing},d=(0,i.oM)({name:"account",initialState:f,reducers:{setLoginState:(e,t)=>{l.ZP.log("accountSlice.setLoginState(".concat(t.payload,"): Called")),e.loginState=t.payload},setUsername:(e,t)=>{l.ZP.log("accountSlice.setUsername(payload: ".concat(t.payload,"): Called")),e.username=t.payload},setEmail:(e,t)=>{l.ZP.log("accountSlice.setEmail(payload: ".concat(t.payload,"): Called")),e.email=t.payload},setEmailVerified:(e,t)=>{l.ZP.log("accountSlice.setEmailVerified(payload: ".concat(t.payload,"): Called")),e.emailVerified=t.payload},setFriendId:(e,t)=>{l.ZP.log("accountSlice.setFriendId(payload: ".concat(t.payload,"): Called")),e.friendId=t.payload},setLocale:(e,t)=>{l.ZP.log("accountSlice.setLocale(payload: ".concat(t.payload,"): Called")),e.locale=t.payload},setTokens:(e,t)=>{l.ZP.log("accountSlice.setTokens(): Called"),e.accessToken=t.payload.accessToken,e.validUntil=t.payload.validUntil;let n=t.payload.idToken;e.idToken=n;var r=u(n);e.isDeveloper=(r["cognito:groups"]||[]).includes("Developer"),t.payload.refreshToken&&(e.refreshToken=t.payload.refreshToken)},setCredentials:(e,t)=>{l.ZP.log("accountSlice.setCredentials(): Called"),e.credentials=t.payload},logOut:e=>{l.ZP.log("accountSlice.logOut(): Called"),e.username=void 0,e.isDeveloper=void 0,e.email=void 0,e.emailVerified=void 0,e.friendId=void 0,e.locale=void 0,e.accessToken=void 0,e.validUntil=void 0,e.idToken=void 0,e.refreshToken=void 0,e.credentials=void 0}}}),{setLoginState:p,setUsername:h,setEmail:y,setEmailVerified:g,setLocale:m,setFriendId:v,setTokens:b,setCredentials:w,logOut:S}=d.actions;var _=d.reducer},76883:function(e,t,n){"use strict";n.d(t,{XO:function(){return a},z6:function(){return c}});var r=n(77236),o=n(62645);let i=(0,r.oM)({name:"activitiesSlice",initialState:{fetchMore:{}},reducers:{fetchMore:(e,t)=>{o.cM("activitiesSlice.fetchMore(action: ".concat(JSON.stringify(t.payload),"): Called")),!0!==e.fetchMore[t.payload]&&(e.fetchMore[t.payload]=!0)},removeFetchMore:(e,t)=>{o.cM("activitiesSlice.removeFetchMore(action: ".concat(JSON.stringify(t.payload),"): Called")),!0===e.fetchMore[t.payload]&&delete e.fetchMore[t.payload]},setActivities:(e,t)=>{let{activities:n,hasMore:r}=t.payload;o.cM("activitiesSlice.setActivities(# of activities: ".concat(n.length,", hasMore: ").concat(r,"): Called")),e.activities=n,e.hasMore=r,e.fetchMore={}}}}),{fetchMore:a,removeFetchMore:s,setActivities:c}=i.actions;t.ZP=i.reducer},27526:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l},S1:function(){return a},iC:function(){return u},HB:function(){return c}});var r=n(77236),o=n(62645);let i={isOnline:window.navigator.onLine},a=()=>{o.ZP.log("internetConnection.slice.init(): initialState (isOnline: ".concat(i.isOnline,") ")),window.addEventListener("online",()=>{globalThis.skelly.reduxStore.dispatch(c(!0)),c(!0)}),window.addEventListener("offline",()=>{globalThis.skelly.reduxStore.dispatch(c(!1))})},s=(0,r.oM)({name:"internetConnection",initialState:i,reducers:{setIsOnline:(e,t)=>{o.cM("internetConnetionSlice.setIsOnline(action: ".concat(JSON.stringify(t.payload),"): Called")),e.isOnline=t.payload},setApolloError:(e,t)=>{o.cM("internetConnetionSlice.setApolloError(action: ".concat(JSON.stringify(t.payload),"): Called")),e.apolloError=t.payload}}}),{setIsOnline:c,setApolloError:u}=s.actions;var l=s.reducer},18604:function(e,t,n){"use strict";n.d(t,{$I:function(){return l},V8:function(){return c},m7:function(){return a}});var r=n(77236),o=n(62645);let i=(0,r.oM)({name:"messages",initialState:{messagesSeenUpToDate:!1},reducers:{setMessagesSeen:(e,t)=>{for(let n of(o.cM("messagesSlice.setMessagesSeen(action: ".concat(JSON.stringify(t.payload),"): Called")),e.chats||(e.chats={}),t.payload)){let t=n.chat_id;e.chats[t]||(e.chats[t]={}),e.chats[t].messageSeen=Math.max(e.chats[t].messageSeen||0,n.message_id)}},setMessageSeen:(e,t)=>{o.cM("messagesSlice.setMessageSeen(action: ".concat(JSON.stringify(t.payload),"): Called")),e.chats||(e.chats={});let{chatId:n,messageSeen:r}=t.payload;e.chats[n]||(e.chats[n]={}),e.chats[n].messageSeen=r},setMessagesUnseen:(e,t)=>{let{chatId:n,messagesUnseen:r}=t.payload;e.chats||(e.chats={}),e.chats[n]||(e.chats[n]={}),e.chats[n].messagesUnseen=r},incMessagesUnseen:(e,t)=>{o.cM("messagesSlice.incMessagesUnseen(action: ".concat(JSON.stringify(t.payload),"): Called"));let{chatId:n}=t.payload;e.chats||(e.chats={}),e.chats[n]||(e.chats[n]={}),e.chats[n].messagesUnseen=(e.chats[n].messagesUnseen||0)+1},setMessagesSeenUpToDate:(e,t)=>{o.cM("messagesSlice.setMessagesSeenUpToDate(action: ".concat(JSON.stringify(t.payload),"): Called")),e.messagesSeenUpToDate=t.payload}}}),{setMessagesSeen:a,setMessageSeen:s,setMessagesUnseen:c,incMessagesUnseen:u,setMessagesSeenUpToDate:l}=i.actions;t.ZP=i.reducer},66848:function(e,t,n){"use strict";n.d(t,{sU:function(){return a},zL:function(){return s}});var r=n(77236),o=n(62645);let i=(0,r.oM)({name:"notifications",initialState:{matchEnded:[]},reducers:{addMatchEnded:(e,t)=>{o.cM("notificationsSlice.addMatchEnded(action: ".concat(JSON.stringify(t.payload),"): Called")),e.matchEnded=[...e.matchEnded,t.payload]},removeMatchEnded:(e,t)=>{o.cM("notificationsSlice.removeMatchEnded(action: ".concat(JSON.stringify(t.payload),"): Called")),e.matchEnded=e.matchEnded.filter(e=>e!==t.payload)}}}),{addMatchEnded:a,removeMatchEnded:s}=i.actions;t.ZP=i.reducer},87449:function(e,t,n){"use strict";n.d(t,{YZ:function(){return u},e:function(){return o},hs:function(){return l},it:function(){return f}});var r,o,i=n(77236),a=n(62645);(r=o||(o={})).Connections="Connections",r.Invitations="Invitations",r.Following="Following",r.Followers="Followers";let s={networkPage:o.Connections},c=(0,i.oM)({name:"reactApp",initialState:s,reducers:{setNetworkPage:(e,t)=>{a.ZP.log("reactAppSlice.setNetworkPage(): Called"),e.networkPage=t.payload},setShowProfile:(e,t)=>{a.ZP.log("reactAppSlice.setNetworkPage(): Called"),e.showProfile=t.payload},setSelectedProfile:(e,t)=>{a.ZP.log("reactAppSlice.setSelectedProfile(): Called"),e.selectedProfile=t.payload}}}),{setNetworkPage:u,setShowProfile:l,setSelectedProfile:f}=c.actions;t.ZP=c.reducer},2178:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var r=n(46008);function o(e){return"dark"===e?r.Kj.dark.background:r.Kj.light.background}},43670:function(e,t,n){"use strict";n.d(t,{ZP:function(){return v},i_:function(){return c},PM:function(){return u},rv:function(){return m},fs:function(){return y},Bk:function(){return g}});var r,o=n(77236),i=n(62645);let a=(null===(r=navigator)||void 0===r?void 0:r.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",s=(0,o.oM)({name:"settings",initialState:{locale:a,mode:void 0,appearance:!1,audioVideo:!1,notifications:!1,launchOverlay:!1,appVersion:!1,subscription:!1,webhooks:!1,myAccount:!1},reducers:{setLocale:(e,t)=>{i.ZP.log("settingsSlice.setLocale(".concat(t.payload,")")),e.locale=t.payload},setMode:(e,t)=>{i.ZP.log("settingsSlice.setMode(".concat(t.payload,")")),e.mode=t.payload},setAppearance:(e,t)=>{i.ZP.log("settingsSlice.setAppearance(".concat(t.payload,")")),e.appearance=t.payload},setAudioVideo:(e,t)=>{i.ZP.log("settingsSlice.setAudioVideo(".concat(t.payload,")")),e.audioVideo=t.payload},setNotifications:(e,t)=>{i.ZP.log("settingsSlice.setNotifications(".concat(t.payload,")")),e.notifications=t.payload},setLaunchOverlay:(e,t)=>{i.ZP.log("settingsSlice.setLaunchOverlay(".concat(t.payload,")")),e.launchOverlay=t.payload},setAppVersion:(e,t)=>{i.ZP.log("settingsSlice.setAppVersion(".concat(t.payload,")")),e.appVersion=t.payload},setSubscription:(e,t)=>{i.ZP.log("settingsSlice.setSubscription(".concat(t.payload,")")),e.subscription=t.payload},setWebhooks:(e,t)=>{i.ZP.log("settingsSlice.setWebhooks(".concat(t.payload,")")),e.webhooks=t.payload},setMyAccount:(e,t)=>{i.ZP.log("settingsSlice.setMyAccount(".concat(t.payload,")")),e.myAccount=t.payload}}}),{setLocale:c,setMode:u,setAppearance:l,setAudioVideo:f,setNotifications:d,setLaunchOverlay:p,setAppVersion:h,setSubscription:y,setWebhooks:g,setMyAccount:m}=s.actions;var v=s.reducer},43113:function(e,t,n){"use strict";n.d(t,{Cp:function(){return oO},h8:function(){return oI},gF:function(){return oA},hP:function(){return oE},UR:function(){return oP},lI:function(){return o_},Ib:function(){return ow},ni:function(){return ok},S5:function(){return ob},c0:function(){return oC},y1:function(){return ov}});var r=n(88501);let o=e=>t=>async n=>{if(!r.aW.isInstance(n.request))return t(n);let{request:o}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]="";else if(!o.headers.host){let e=o.hostname;null!=o.port&&(e+=`:${o.port}`),o.headers.host=e}return t(n)},i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},a=e=>({applyToStack:t=>{t.add(o(e),i)}}),s=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:o,commandName:i,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=s,l=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:d,...p}=r.output;return a?.info?.({clientName:o,commandName:i,input:l(n.input),output:f(p),metadata:d}),r}catch(c){let{clientName:e,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:a}=i,s=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:e,commandName:r,input:s(n.input),error:c,metadata:c.$metadata}),c}},c={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},u=e=>({applyToStack:e=>{e.add(s(),c)}});var l=n(71769),f=n(8243),d=n(14912),p=n(44562),h=n(59988),y=n(68504),g=n(37916),m=n(12532);let v="X-Amz-Date",b="X-Amz-Signature",w="X-Amz-Security-Token",S="authorization",_=v.toLowerCase(),E=[S,_,"date"],P=b.toLowerCase(),O="x-amz-content-sha256",A=w.toLowerCase(),C={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},x=/^proxy-/,T=/^sec-/,I="AWS4-HMAC-SHA256",k="aws4_request",R={},M=[],j=(e,t,n)=>`${e}/${t}/${n}/${k}`,N=async(e,t,n,r,o)=>{let i=await L(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${(0,p.N)(i)}:${t.sessionToken}`;if(a in R)return R[a];for(M.push(a);M.length>50;)delete R[M.shift()];let s=`AWS4${t.secretAccessKey}`;for(let t of[n,r,o,k])s=await L(e,s,t);return R[a]=s},L=(e,t,n)=>{let r=new e(t);return r.update((0,m._)(n)),r.digest()},D=({headers:e},t,n)=>{let r={};for(let o of Object.keys(e).sort()){if(void 0==e[o])continue;let i=o.toLowerCase();(!(i in C||t?.has(i)||x.test(i)||T.test(i))||n&&(!n||n.has(i)))&&(r[i]=e[o].trim().replace(/\s+/g," "))}return r};var U=n(55388);let F=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e).sort()){if(r.toLowerCase()===P)continue;t.push(r);let o=e[r];"string"==typeof o?n[r]=`${(0,U.i)(r)}=${(0,U.i)(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce((e,t)=>e.concat([`${(0,U.i)(r)}=${(0,U.i)(t)}`]),[]).sort().join("&"))}return t.map(e=>n[e]).filter(e=>e).join("&")},$=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),B=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===O)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||$(t)){let e=new n;return e.update((0,m._)(t)),(0,p.N)(await e.digest())}return"UNSIGNED-PAYLOAD"},z=(e,t)=>{for(let n of(e=e.toLowerCase(),Object.keys(t)))if(e===n.toLowerCase())return!0;return!1},H=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?V(t):void 0}),V=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{}),Z=(e,t={})=>{let{headers:n,query:r={}}="function"==typeof e.clone?e.clone():H(e);for(let e of Object.keys(n)){let o=e.toLowerCase();"x-amz-"!==o.slice(0,6)||t.unhoistableHeaders?.has(o)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},q=e=>{for(let t of Object.keys((e="function"==typeof e.clone?e.clone():H(e)).headers))E.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},K=e=>G(e).toISOString().replace(/\.\d{3}Z$/,"Z"),G=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class W{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:o,uriEscapePath:i=!0}){this.headerMarshaller=new d.y7(y.G,g.$),this.service=r,this.sha256=o,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,h.$)(n),this.credentialProvider=(0,h.$)(t)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,signingRegion:s,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=s??await this.regionProvider(),{longDate:f,shortDate:d}=Y(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let p=j(d,l,c??this.service),h=Z(q(e),{unhoistableHeaders:i});u.sessionToken&&(h.query[w]=u.sessionToken),h.query["X-Amz-Algorithm"]=I,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${p}`,h.query[v]=f,h.query["X-Amz-Expires"]=r.toString(10);let y=D(h,o,a);return h.query["X-Amz-SignedHeaders"]=J(y),h.query[b]=await this.getSignature(f,p,this.getSigningKey(u,l,d,c),this.createCanonicalRequest(h,y,await B(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:s,longDate:c}=Y(n),u=j(s,a,i??this.service),l=await B({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let d=(0,p.N)(await f.digest()),h=["AWS4-HMAC-SHA256-PAYLOAD",c,u,r,d,l].join("\n");return this.signString(h,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){let o=this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature});return o.then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=Y(t),s=new this.sha256(await this.getSigningKey(o,i,a,r));return s.update((0,m._)(e)),(0,p.N)(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let s=o??await this.regionProvider(),c=q(e),{longDate:u,shortDate:l}=Y(t),f=j(l,s,i??this.service);c.headers[_]=u,a.sessionToken&&(c.headers[A]=a.sessionToken);let d=await B(c,this.sha256);!z(O,c.headers)&&this.applyChecksum&&(c.headers[O]=d);let p=D(c,r,n),h=await this.getSignature(u,f,this.getSigningKey(a,s,l,i),this.createCanonicalRequest(c,p,d));return c.headers[S]=`${I} Credential=${a.accessKeyId}/${f}, SignedHeaders=${J(p)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} ${this.getCanonicalPath(e)} ${F(e)} ${r.map(e=>`${e}:${t[e]}`).join("\n")} ${r.join(";")} ${n}`}async createStringToSign(e,t,n){let r=new this.sha256;r.update((0,m._)(n));let o=await r.digest();return`${I} ${e} ${t} ${(0,p.N)(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split("/"))n?.length!==0&&"."!==n&&(".."===n?t.pop():t.push(n));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`,r=encodeURIComponent(n);return r.replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){let o=await this.createStringToSign(e,t,r),i=new this.sha256(await n);return i.update((0,m._)(o)),(0,p.N)(await i.digest())}getSigningKey(e,t,n,r){return N(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}}let Y=e=>{let t=K(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},J=e=>Object.keys(e).sort().join(";"),X=e=>{let t;let n=e.credentials?Q(e.credentials):e.credentialDefaultProvider(e),{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;return t=e.signer?(0,h.$)(e.signer):e.regionInfoProvider?()=>(0,h.$)(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,o])=>{let{signingRegion:a,signingService:s}=t;e.signingRegion=e.signingRegion||a||o,e.signingName=e.signingName||s||e.serviceId;let c={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},u=e.signerConstructor||W;return new u(c)}):async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await (0,h.$)(e.region)(),properties:{}},t);let o=t.signingRegion,a=t.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},c=e.signerConstructor||W;return new c(s)},{...e,systemClockOffset:o,signingEscapePath:r,credentials:n,signer:t}},Q=e=>"function"==typeof e?(0,f.H)(e,e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5,e=>void 0!==e.expiration):(0,h.$)(e);var ee=n(8794);let et="user-agent",en="x-amz-user-agent",er=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,eo=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,ei=e=>(t,n)=>async o=>{let{request:i}=o;if(!r.aW.isInstance(i))return t(o);let{headers:a}=i,s=n?.userAgent?.map(ea)||[],c=(await e.defaultUserAgentProvider()).map(ea),u=e?.customUserAgent?.map(ea)||[],l=(0,ee.Qj)(),f=(l?[l]:[]).concat([...c,...s,...u]).join(" "),d=[...c.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(d&&(a[en]=a[en]?`${a[et]} ${d}`:d),a[et]=f):a[en]=f,t({...o,request:i})},ea=e=>{let t=e[0].split("/").map(e=>e.replace(er,"-")).join("/"),n=e[1]?.replace(eo,"-"),r=t.indexOf("/"),o=t.substring(0,r),i=t.substring(r+1);return"api"===o&&(i=i.toLowerCase()),[o,i,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},es={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},ec=e=>({applyToStack:t=>{t.add(ei(e),es)}});var eu=n(47860),el=n(52326),ef=n(31974),ed=n(11511),ep=n(44588);let eh=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"});var ey={i8:"3.388.0"},eg=n(57381),em=n(51206),ev=n.n(em);let eb=({serviceId:e,clientVersion:t})=>async()=>{let n="undefined"!=typeof window&&window?.navigator?.userAgent?ev().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r};var ew=n(39627),eS=n(33131),e_=n(90130),eE=n(63660),eP=n(93294),eO=n(10687);let eA="required",eC="argv",ex="PartitionResult",eT="tree",eI="error",ek="endpoint",eR={[eA]:!1,type:"String"},eM={[eA]:!0,default:!1,type:"Boolean"},ej={ref:"Endpoint"},eN={fn:"booleanEquals",[eC]:[{ref:"UseFIPS"},!0]},eL={fn:"booleanEquals",[eC]:[{ref:"UseDualStack"},!0]},eD={},eU={fn:"booleanEquals",[eC]:[!0,{fn:"getAttr",[eC]:[{ref:ex},"supportsFIPS"]}]},eF={fn:"booleanEquals",[eC]:[!0,{fn:"getAttr",[eC]:[{ref:ex},"supportsDualStack"]}]},e$=[ej],eB=[eN],ez=[eL],eH={version:"1.0",parameters:{Region:eR,UseDualStack:eM,UseFIPS:eM,Endpoint:eR},rules:[{conditions:[{fn:"aws.partition",[eC]:[{ref:"Region"}],assign:ex}],type:eT,rules:[{conditions:[{fn:"isSet",[eC]:e$},{fn:"parseURL",[eC]:e$,assign:"url"}],type:eT,rules:[{conditions:eB,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:eI},{type:eT,rules:[{conditions:ez,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:eI},{endpoint:{url:ej,properties:eD,headers:eD},type:ek}]}]},{conditions:[eN,eL],type:eT,rules:[{conditions:[eU,eF],type:eT,rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eD,headers:eD},type:ek}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:eI}]},{conditions:eB,type:eT,rules:[{conditions:[eU],type:eT,rules:[{type:eT,rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:eD,headers:eD},type:ek}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:eI}]},{conditions:ez,type:eT,rules:[{conditions:[eF],type:eT,rules:[{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:eD,headers:eD},type:ek}]},{error:"DualStack is enabled but this partition does not support DualStack",type:eI}]},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:eD,headers:eD},type:ek}]}]},eV=(e,t={})=>(0,ee.B1)(eH,{endpointParams:e,logger:t.logger}),eZ=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??eO.G,base64Encoder:e?.base64Encoder??eO.s,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??eV,logger:e?.logger??new ep.vk,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??eP.e,utf8Decoder:e?.utf8Decoder??g.$,utf8Encoder:e?.utf8Encoder??y.G});var eq=n(95419);let eK=e=>{let t=(0,eq.j)(e),n=()=>t().then(ep.jv),r=eZ(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??e_.W,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??eb({serviceId:r.serviceId,clientVersion:ey.i8}),maxAttempts:e?.maxAttempts??eE.J,region:e?.region??(0,eS.n)("Region is missing"),requestHandler:e?.requestHandler??new ew.B(n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||eE.CA),sha256:e?.sha256??eg.Sha256,streamCollector:e?.streamCollector??ew.C,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(eu.JY)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(eu.Fh))}};class eG extends ep.KU{constructor(...[e]){let t=eK(e||{}),n=eh(t),r=(0,eu.Xb)(n),o=(0,ef.uW)(r),i=(0,ed.BC)(o),s=X(i),c={...s,customUserAgent:"string"==typeof s.customUserAgent?[[s.customUserAgent]]:s.customUserAgent};super(c),this.config=c,this.middlewareStack.use((0,ed.NQ)(this.config)),this.middlewareStack.use((0,el.VG)(this.config)),this.middlewareStack.use(a(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use((0,l.eV)(this.config)),this.middlewareStack.use(ec(this.config))}destroy(){super.destroy()}}var eW=n(45410);class eY extends ep.sI{constructor(e){super(e),Object.setPrototypeOf(this,eY.prototype)}}class eJ extends eY{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,eJ.prototype)}}class eX extends eY{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,eX.prototype)}}class eQ extends eY{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,eQ.prototype)}}class e0 extends eY{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,e0.prototype)}}class e1 extends eY{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,e1.prototype)}}class e2 extends eY{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,e2.prototype)}}class e5 extends eY{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e5.prototype)}}class e3 extends eY{constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),this.name="ExternalServiceException",this.$fault="client",Object.setPrototypeOf(this,e3.prototype)}}class e6 extends eY{constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),this.name="InvalidIdentityPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,e6.prototype)}}let e4=async(e,t)=>{let n=tm("GetCredentialsForIdentity");return tg(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},e8=async(e,t)=>{let n=tm("GetId");return tg(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},e7=async(e,t)=>{if(e.statusCode>=300)return e9(e,t);let n=await tv(e.body,t),r={};r=td(n,t);let o={$metadata:tp(e),...r};return o},e9=async(e,t)=>{let n={...e,body:await tb(e.body,t)},r=tw(e,n.body);switch(r){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await tn(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await tr(n,t);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await to(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ti(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await ts(n,t);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await tc(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await tu(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await tl(n,t);default:let o=n.body;return ty({output:e,parsedBody:o,errorCode:r})}},te=async(e,t)=>{if(e.statusCode>=300)return tt(e,t);let n=await tv(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:tp(e),...r};return o},tt=async(e,t)=>{let n={...e,body:await tb(e.body,t)},r=tw(e,n.body);switch(r){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await tn(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await tr(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ti(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await ta(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await ts(n,t);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await tc(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await tu(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await tl(n,t);default:let o=n.body;return ty({output:e,parsedBody:o,errorCode:r})}},tn=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e3({$metadata:tp(e),...r});return(0,ep.to)(o,n)},tr=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new eJ({$metadata:tp(e),...r});return(0,ep.to)(o,n)},to=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e6({$metadata:tp(e),...r});return(0,ep.to)(o,n)},ti=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new eX({$metadata:tp(e),...r});return(0,ep.to)(o,n)},ta=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new eQ({$metadata:tp(e),...r});return(0,ep.to)(o,n)},ts=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e0({$metadata:tp(e),...r});return(0,ep.to)(o,n)},tc=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e1({$metadata:tp(e),...r});return(0,ep.to)(o,n)},tu=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e5({$metadata:tp(e),...r});return(0,ep.to)(o,n)},tl=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new e2({$metadata:tp(e),...r});return(0,ep.to)(o,n)},tf=(e,t)=>(0,ep.qn)(e,{AccessKeyId:ep.pY,Expiration:e=>(0,ep.CE)((0,ep.KX)((0,ep.Fx)(e))),SecretKey:ep.pY,SessionToken:ep.pY}),td=(e,t)=>(0,ep.qn)(e,{Credentials:e=>tf(e,t),IdentityId:ep.pY}),tp=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),th=(e,t)=>(0,ep.Wg)(e,t).then(e=>t.utf8Encoder(e)),ty=(0,ep.PC)(eY),tg=async(e,t,n,o,i)=>{let{hostname:a,protocol:s="https",port:c,path:u}=await e.endpoint(),l={protocol:s,hostname:a,port:c,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:t};return void 0!==o&&(l.hostname=o),void 0!==i&&(l.body=i),new r.aW(l)};function tm(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}let tv=(e,t)=>th(e,t).then(e=>e.length?JSON.parse(e):{}),tb=async(e,t)=>{let n=await tv(e,t);return n.message=n.message??n.Message,n},tw=(e,t)=>{let n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=Object.keys(e.headers).find(e=>"x-amzn-errortype"===e.toLowerCase());return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class tS extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,tS.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e})}serialize(e,t){return e8(e,t)}deserialize(e,t){return te(e,t)}}class t_ extends Error{constructor(e,t=!0){super(e),this.tryNextLink=t,this.name="ProviderError",Object.setPrototypeOf(this,t_.prototype)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class tE extends t_{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="CredentialsProviderError",Object.setPrototypeOf(this,tE.prototype)}}class tP extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,tP.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e})}serialize(e,t){return e4(e,t)}deserialize(e,t){return e7(e,t)}}function tO(e){return Promise.all(Object.keys(e).reduce((t,n)=>{let r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then(e=>[n,e])),t},[])).then(e=>e.reduce((e,[t,n])=>(e[t]=n,e),{}))}let tA="IdentityIds";class tC{constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",t=>{let n=t.get(e);return new Promise(e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)})}).catch(()=>null)}removeItem(e){return this.withObjectStore("readwrite",t=>{let n=t.delete(e);return new Promise((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()})})}setItem(e,t){return this.withObjectStore("readwrite",n=>{let r=n.put({id:e,value:t});return new Promise((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()})})}getDb(){let e=self.indexedDB.open(this.dbName,1);return new Promise((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(Error("Unable to access DB"))},e.onupgradeneeded=()=>{let t=e.result;t.onerror=()=>{n(Error("Failed to create object store"))},t.createObjectStore(tA,{keyPath:"id"})}})}withObjectStore(e,t){return this.getDb().then(n=>{let r=n.transaction(tA,e);return r.oncomplete=()=>n.close(),new Promise((e,n)=>{r.onerror=()=>n(r.error),e(t(r.objectStore(tA)))}).catch(e=>{throw n.close(),e})})}}let tx=new class{constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}},tT=e=>(function({accountId:e,cache:t="object"==typeof self&&self.indexedDB?new tC:"object"==typeof window&&window.localStorage?window.localStorage:tx,client:n,customRoleArn:r,identityPoolId:o,logins:i,userIdentifier:a=i&&0!==Object.keys(i).length?void 0:"ANONYMOUS"}){let s=a?`aws:cognito-identity-credentials:${o}:${a}`:void 0,c=async()=>{var a;let u=s&&await t.getItem(s);if(!u){let{IdentityId:r=function(){throw new tE("Response from Amazon Cognito contained no identity ID")}()}=await n.send(new tS({AccountId:e,IdentityPoolId:o,Logins:i?await tO(i):void 0}));u=r,s&&Promise.resolve(t.setItem(s,u)).catch(()=>{})}return a={client:n,customRoleArn:r,logins:i,identityId:u},(c=async()=>{let{Credentials:{AccessKeyId:e=function(){throw new tE("Response from Amazon Cognito contained no access key ID")}(),Expiration:t,SecretKey:n=function(){throw new tE("Response from Amazon Cognito contained no secret key")}(),SessionToken:r}=function(){throw new tE("Response from Amazon Cognito contained no credentials")}()}=await a.client.send(new tP({CustomRoleArn:a.customRoleArn,IdentityId:a.identityId,Logins:a.logins?await tO(a.logins):void 0}));return{identityId:a.identityId,accessKeyId:e,secretAccessKey:n,sessionToken:r,expiration:t}})()};return()=>c().catch(async e=>{throw s&&Promise.resolve(t.removeItem(s)).catch(()=>{}),e})})({...e,client:new eG(e.clientConfig??{})}),tI=e=>t=>async n=>{if(!r.aW.isInstance(n.request))return t(n);let{request:o}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]="";else if(!o.headers.host){let e=o.hostname;null!=o.port&&(e+=`:${o.port}`),o.headers.host=e}return t(n)},tk={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},tR=e=>({applyToStack:t=>{t.add(tI(e),tk)}}),tM=()=>(e,t)=>async n=>{try{let r=await e(n),{clientName:o,commandName:i,logger:a,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=s,l=c??t.inputFilterSensitiveLog,f=u??t.outputFilterSensitiveLog,{$metadata:d,...p}=r.output;return a?.info?.({clientName:o,commandName:i,input:l(n.input),output:f(p),metadata:d}),r}catch(c){let{clientName:e,commandName:r,logger:o,dynamoDbDocumentClientOptions:i={}}=t,{overrideInputFilterSensitiveLog:a}=i,s=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:e,commandName:r,input:s(n.input),error:c,metadata:c.$metadata}),c}},tj={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},tN=e=>({applyToStack:e=>{e.add(tM(),tj)}}),tL="X-Amz-Date",tD="X-Amz-Signature",tU="X-Amz-Security-Token",tF="authorization",t$=tL.toLowerCase(),tB=[tF,t$,"date"],tz=tD.toLowerCase(),tH="x-amz-content-sha256",tV=tU.toLowerCase(),tZ={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},tq=/^proxy-/,tK=/^sec-/,tG="AWS4-HMAC-SHA256",tW="aws4_request",tY={},tJ=[],tX=(e,t,n)=>`${e}/${t}/${n}/${tW}`,tQ=async(e,t,n,r,o)=>{let i=await t0(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${(0,p.N)(i)}:${t.sessionToken}`;if(a in tY)return tY[a];for(tJ.push(a);tJ.length>50;)delete tY[tJ.shift()];let s=`AWS4${t.secretAccessKey}`;for(let t of[n,r,o,tW])s=await t0(e,s,t);return tY[a]=s},t0=(e,t,n)=>{let r=new e(t);return r.update((0,m._)(n)),r.digest()},t1=({headers:e},t,n)=>{let r={};for(let o of Object.keys(e).sort()){if(void 0==e[o])continue;let i=o.toLowerCase();(!(i in tZ||t?.has(i)||tq.test(i)||tK.test(i))||n&&(!n||n.has(i)))&&(r[i]=e[o].trim().replace(/\s+/g," "))}return r},t2=({query:e={}})=>{let t=[],n={};for(let r of Object.keys(e).sort()){if(r.toLowerCase()===tz)continue;t.push(r);let o=e[r];"string"==typeof o?n[r]=`${(0,U.i)(r)}=${(0,U.i)(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce((e,t)=>e.concat([`${(0,U.i)(r)}=${(0,U.i)(t)}`]),[]).sort().join("&"))}return t.map(e=>n[e]).filter(e=>e).join("&")},t5=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),t3=async({headers:e,body:t},n)=>{for(let t of Object.keys(e))if(t.toLowerCase()===tH)return e[t];if(void 0==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||t5(t)){let e=new n;return e.update((0,m._)(t)),(0,p.N)(await e.digest())}return"UNSIGNED-PAYLOAD"},t6=(e,t)=>{for(let n of(e=e.toLowerCase(),Object.keys(t)))if(e===n.toLowerCase())return!0;return!1},t4=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?t8(t):void 0}),t8=e=>Object.keys(e).reduce((t,n)=>{let r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{}),t7=(e,t={})=>{let{headers:n,query:r={}}="function"==typeof e.clone?e.clone():t4(e);for(let e of Object.keys(n)){let o=e.toLowerCase();"x-amz-"!==o.slice(0,6)||t.unhoistableHeaders?.has(o)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},t9=e=>{for(let t of Object.keys((e="function"==typeof e.clone?e.clone():t4(e)).headers))tB.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ne=e=>nt(e).toISOString().replace(/\.\d{3}Z$/,"Z"),nt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class nn{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:o,uriEscapePath:i=!0}){this.headerMarshaller=new d.y7(y.G,g.$),this.service=r,this.sha256=o,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=(0,h.$)(n),this.credentialProvider=(0,h.$)(t)}async presign(e,t={}){let{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,signingRegion:s,signingService:c}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);let l=s??await this.regionProvider(),{longDate:f,shortDate:d}=nr(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let p=tX(d,l,c??this.service),h=t7(t9(e),{unhoistableHeaders:i});u.sessionToken&&(h.query[tU]=u.sessionToken),h.query["X-Amz-Algorithm"]=tG,h.query["X-Amz-Credential"]=`${u.accessKeyId}/${p}`,h.query[tL]=f,h.query["X-Amz-Expires"]=r.toString(10);let y=t1(h,o,a);return h.query["X-Amz-SignedHeaders"]=no(y),h.query[tD]=await this.getSignature(f,p,this.getSigningKey(u,l,d,c),this.createCanonicalRequest(h,y,await t3(e,this.sha256))),h}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:s,longDate:c}=nr(n),u=tX(s,a,i??this.service),l=await t3({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);let d=(0,p.N)(await f.digest()),h=["AWS4-HMAC-SHA256-PAYLOAD",c,u,r,d,l].join("\n");return this.signString(h,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){let o=this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature});return o.then(t=>({message:e.message,signature:t}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=nr(t),s=new this.sha256(await this.getSigningKey(o,i,a,r));return s.update((0,m._)(e)),(0,p.N)(await s.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let s=o??await this.regionProvider(),c=t9(e),{longDate:u,shortDate:l}=nr(t),f=tX(l,s,i??this.service);c.headers[t$]=u,a.sessionToken&&(c.headers[tV]=a.sessionToken);let d=await t3(c,this.sha256);!t6(tH,c.headers)&&this.applyChecksum&&(c.headers[tH]=d);let p=t1(c,r,n),h=await this.getSignature(u,f,this.getSigningKey(a,s,l,i),this.createCanonicalRequest(c,p,d));return c.headers[tF]=`${tG} Credential=${a.accessKeyId}/${f}, SignedHeaders=${no(p)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){let r=Object.keys(t).sort();return`${e.method} ${this.getCanonicalPath(e)} ${t2(e)} ${r.map(e=>`${e}:${t[e]}`).join("\n")} ${r.join(";")} ${n}`}async createStringToSign(e,t,n){let r=new this.sha256;r.update((0,m._)(n));let o=await r.digest();return`${tG} ${e} ${t} ${(0,p.N)(o)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let t=[];for(let n of e.split("/"))n?.length!==0&&"."!==n&&(".."===n?t.pop():t.push(n));let n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`,r=encodeURIComponent(n);return r.replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){let o=await this.createStringToSign(e,t,r),i=new this.sha256(await n);return i.update((0,m._)(o)),(0,p.N)(await i.digest())}getSigningKey(e,t,n,r){return tQ(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw Error("Resolved credential object is not valid")}}let nr=e=>{let t=ne(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},no=e=>Object.keys(e).sort().join(";"),ni=e=>{let t;let n=e.credentials?na(e.credentials):e.credentialDefaultProvider(e),{signingEscapePath:r=!0,systemClockOffset:o=e.systemClockOffset||0,sha256:i}=e;return t=e.signer?(0,h.$)(e.signer):e.regionInfoProvider?()=>(0,h.$)(e.region)().then(async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t]).then(([t,o])=>{let{signingRegion:a,signingService:s}=t;e.signingRegion=e.signingRegion||a||o,e.signingName=e.signingName||s||e.serviceId;let c={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},u=e.signerConstructor||nn;return new u(c)}):async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await (0,h.$)(e.region)(),properties:{}},t);let o=t.signingRegion,a=t.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||a||e.serviceId;let s={...e,credentials:n,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},c=e.signerConstructor||nn;return new c(s)},{...e,systemClockOffset:o,signingEscapePath:r,credentials:n,signer:t}},na=e=>"function"==typeof e?(0,f.H)(e,e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5,e=>void 0!==e.expiration):(0,h.$)(e),ns="user-agent",nc="x-amz-user-agent",nu=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,nl=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,nf=e=>(t,n)=>async o=>{let{request:i}=o;if(!r.aW.isInstance(i))return t(o);let{headers:a}=i,s=n?.userAgent?.map(nd)||[],c=(await e.defaultUserAgentProvider()).map(nd),u=e?.customUserAgent?.map(nd)||[],l=(0,ee.Qj)(),f=(l?[l]:[]).concat([...c,...s,...u]).join(" "),d=[...c.filter(e=>e.startsWith("aws-sdk-")),...u].join(" ");return"browser"!==e.runtime?(d&&(a[nc]=a[nc]?`${a[ns]} ${d}`:d),a[ns]=f):a[nc]=f,t({...o,request:i})},nd=e=>{let t=e[0].split("/").map(e=>e.replace(nu,"-")).join("/"),n=e[1]?.replace(nl,"-"),r=t.indexOf("/"),o=t.substring(0,r),i=t.substring(r+1);return"api"===o&&(i=i.toLowerCase()),[o,i,n].filter(e=>e&&e.length>0).reduce((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}},"")},np={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},nh=e=>({applyToStack:t=>{t.add(nf(e),np)}}),ny=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"});var ng={i8:"3.388.0"},nm=n(16037);let nv=({serviceId:e,clientVersion:t})=>async()=>{let n="undefined"!=typeof window&&window?.navigator?.userAgent?ev().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.0"],[`os/${n?.os?.name||"other"}`,n?.os?.version],["lang/js"],["md/browser",`${n?.browser?.name??"unknown"}_${n?.browser?.version??"unknown"}`]];return e&&r.push([`api/${e}`,t]),r},nb="required",nw="argv",nS="isSet",n_="tree",nE="error",nP="endpoint",nO="PartitionResult",nA={[nb]:!1,type:"String"},nC={[nb]:!0,default:!1,type:"Boolean"},nx={ref:"Endpoint"},nT={fn:"booleanEquals",[nw]:[{ref:"UseFIPS"},!0]},nI={fn:"booleanEquals",[nw]:[{ref:"UseDualStack"},!0]},nk={},nR={fn:"booleanEquals",[nw]:[!0,{fn:"getAttr",[nw]:[{ref:nO},"supportsFIPS"]}]},nM={fn:"booleanEquals",[nw]:[!0,{fn:"getAttr",[nw]:[{ref:nO},"supportsDualStack"]}]},nj=[nT],nN=[nI],nL=[{ref:"Region"}],nD={version:"1.0",parameters:{Region:nA,UseDualStack:nC,UseFIPS:nC,Endpoint:nA},rules:[{conditions:[{fn:nS,[nw]:[nx]}],type:n_,rules:[{conditions:nj,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:nE},{type:n_,rules:[{conditions:nN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:nE},{endpoint:{url:nx,properties:nk,headers:nk},type:nP}]}]},{type:n_,rules:[{conditions:[{fn:nS,[nw]:nL}],type:n_,rules:[{conditions:[{fn:"aws.partition",[nw]:nL,assign:nO}],type:n_,rules:[{conditions:[nT,nI],type:n_,rules:[{conditions:[nR,nM],type:n_,rules:[{type:n_,rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:nk,headers:nk},type:nP}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:nE}]},{conditions:nj,type:n_,rules:[{conditions:[nR],type:n_,rules:[{type:n_,rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:nk,headers:nk},type:nP}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:nE}]},{conditions:nN,type:n_,rules:[{conditions:[nM],type:n_,rules:[{type:n_,rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:nk,headers:nk},type:nP}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:nE}]},{type:n_,rules:[{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:nk,headers:nk},type:nP}]}]}]},{error:"Invalid Configuration: Missing Region",type:nE}]}]},nU=(e,t={})=>(0,ee.B1)(nD,{endpointParams:e,logger:t.logger}),nF=e=>({apiVersion:"2016-04-18",base64Decoder:e?.base64Decoder??eO.G,base64Encoder:e?.base64Encoder??eO.s,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??nU,logger:e?.logger??new ep.vk,serviceId:e?.serviceId??"Cognito Identity Provider",urlParser:e?.urlParser??eP.e,utf8Decoder:e?.utf8Decoder??g.$,utf8Encoder:e?.utf8Encoder??y.G}),n$=e=>{let t=(0,eq.j)(e),n=()=>t().then(ep.jv),r=nF(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??e_.W,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??nv({serviceId:r.serviceId,clientVersion:ng.i8}),maxAttempts:e?.maxAttempts??eE.J,region:e?.region??(0,eS.n)("Region is missing"),requestHandler:e?.requestHandler??new ew.B(n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||eE.CA),sha256:e?.sha256??nm.Sha256,streamCollector:e?.streamCollector??ew.C,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(eu.JY)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(eu.Fh))}};class nB extends ep.KU{constructor(...[e]){let t=n$(e||{}),n=ny(t),r=(0,eu.Xb)(n),o=(0,ef.uW)(r),i=(0,ed.BC)(o),a=ni(i),s={...a,customUserAgent:"string"==typeof a.customUserAgent?[[a.customUserAgent]]:a.customUserAgent};super(s),this.config=s,this.middlewareStack.use((0,ed.NQ)(this.config)),this.middlewareStack.use((0,el.VG)(this.config)),this.middlewareStack.use(tR(this.config)),this.middlewareStack.use(tN(this.config)),this.middlewareStack.use((0,l.eV)(this.config)),this.middlewareStack.use(nh(this.config))}destroy(){super.destroy()}}class nz extends ep.sI{constructor(e){super(e),Object.setPrototypeOf(this,nz.prototype)}}class nH extends nz{constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),this.name="InternalErrorException",this.$fault="server",Object.setPrototypeOf(this,nH.prototype)}}class nV extends nz{constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),this.name="InvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,nV.prototype)}}class nZ extends nz{constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,nZ.prototype)}}class nq extends nz{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,nq.prototype)}}class nK extends nz{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,nK.prototype)}}class nG extends nz{constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),this.name="UserNotFoundException",this.$fault="client",Object.setPrototypeOf(this,nG.prototype)}}class nW extends nz{constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),this.name="InvalidLambdaResponseException",this.$fault="client",Object.setPrototypeOf(this,nW.prototype)}}class nY extends nz{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,nY.prototype)}}class nJ extends nz{constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),this.name="TooManyFailedAttemptsException",this.$fault="client",Object.setPrototypeOf(this,nJ.prototype)}}class nX extends nz{constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),this.name="UnexpectedLambdaException",this.$fault="client",Object.setPrototypeOf(this,nX.prototype)}}class nQ extends nz{constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),this.name="UserLambdaValidationException",this.$fault="client",Object.setPrototypeOf(this,nQ.prototype)}}class n0 extends nz{constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),this.name="CodeDeliveryFailureException",this.$fault="client",Object.setPrototypeOf(this,n0.prototype)}}class n1 extends nz{constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),this.name="InvalidPasswordException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype)}}class n2 extends nz{constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidSmsRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,n2.prototype)}}class n5 extends nz{constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),this.name="InvalidSmsRoleTrustRelationshipException",this.$fault="client",Object.setPrototypeOf(this,n5.prototype)}}class n3 extends nz{constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),this.name="UsernameExistsException",this.$fault="client",Object.setPrototypeOf(this,n3.prototype)}}class n6 extends nz{constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),this.name="InvalidUserPoolConfigurationException",this.$fault="client",Object.setPrototypeOf(this,n6.prototype)}}class n4 extends nz{constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),this.name="PasswordResetRequiredException",this.$fault="client",Object.setPrototypeOf(this,n4.prototype)}}class n8 extends nz{constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),this.name="UserNotConfirmedException",this.$fault="client",Object.setPrototypeOf(this,n8.prototype)}}class n7 extends nz{constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),this.name="InvalidEmailRoleAccessPolicyException",this.$fault="client",Object.setPrototypeOf(this,n7.prototype)}}class n9 extends nz{constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),this.name="CodeMismatchException",this.$fault="client",Object.setPrototypeOf(this,n9.prototype)}}class re extends nz{constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),this.name="ExpiredCodeException",this.$fault="client",Object.setPrototypeOf(this,re.prototype)}}class rt extends nz{constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),this.name="ForbiddenException",this.$fault="client",Object.setPrototypeOf(this,rt.prototype)}}let rn=e=>({...e,...e.Value&&{Value:ep.oc}}),rr=e=>({...e,...e.AccessToken&&{AccessToken:ep.oc},...e.RefreshToken&&{RefreshToken:ep.oc},...e.IdToken&&{IdToken:ep.oc}}),ro=e=>({...e,...e.PreviousPassword&&{PreviousPassword:ep.oc},...e.ProposedPassword&&{ProposedPassword:ep.oc},...e.AccessToken&&{AccessToken:ep.oc}}),ri=e=>({...e,...e.ClientId&&{ClientId:ep.oc},...e.SecretHash&&{SecretHash:ep.oc},...e.Username&&{Username:ep.oc},...e.Password&&{Password:ep.oc}}),ra=e=>({...e,...e.AccessToken&&{AccessToken:ep.oc}}),rs=e=>({...e,...e.ClientId&&{ClientId:ep.oc},...e.SecretHash&&{SecretHash:ep.oc},...e.Username&&{Username:ep.oc}}),rc=e=>({...e,...e.AccessToken&&{AccessToken:ep.oc}}),ru=e=>({...e,...e.Username&&{Username:ep.oc},...e.UserAttributes&&{UserAttributes:e.UserAttributes.map(e=>rn(e))}}),rl=e=>({...e,...e.AuthParameters&&{AuthParameters:ep.oc},...e.ClientId&&{ClientId:ep.oc}}),rf=e=>({...e,...e.AuthenticationResult&&{AuthenticationResult:rr(e.AuthenticationResult)}}),rd=e=>({...e,...e.ClientId&&{ClientId:ep.oc},...e.SecretHash&&{SecretHash:ep.oc},...e.Username&&{Username:ep.oc}}),rp=e=>({...e,...e.ClientId&&{ClientId:ep.oc},...e.SecretHash&&{SecretHash:ep.oc},...e.Username&&{Username:ep.oc},...e.Password&&{Password:ep.oc},...e.UserAttributes&&{UserAttributes:e.UserAttributes.map(e=>rn(e))},...e.ValidationData&&{ValidationData:e.ValidationData.map(e=>rn(e))}}),rh=async(e,t)=>{let n=ot("ChangePassword");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},ry=async(e,t)=>{let n=ot("ConfirmForgotPassword");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rg=async(e,t)=>{let n=ot("DeleteUser");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rm=async(e,t)=>{let n=ot("ForgotPassword");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rv=async(e,t)=>{let n=ot("GetUser");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rb=async(e,t)=>{let n=ot("InitiateAuth");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rw=async(e,t)=>{let n=ot("ResendConfirmationCode");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},rS=async(e,t)=>{let n=ot("SignUp");return oe(t,n,"/",void 0,JSON.stringify((0,ep.F3)(e)))},r_=async(e,t)=>{if(e.statusCode>=300)return rE(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rE=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await rq(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await rY(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await rX(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await r6(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rP=async(e,t)=>{if(e.statusCode>=300)return rO(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rO=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"CodeMismatchException":case"com.amazonaws.cognitoidentityprovider#CodeMismatchException":throw await rF(n,t);case"ExpiredCodeException":case"com.amazonaws.cognitoidentityprovider#ExpiredCodeException":throw await r$(n,t);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await rV(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await rq(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await rY(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyFailedAttemptsException":case"com.amazonaws.cognitoidentityprovider#TooManyFailedAttemptsException":throw await r0(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await r2(n,t);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await r5(n,t);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await r6(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rA=async(e,t)=>{if(e.statusCode>=300)return rC(e,t);await (0,ep.Wg)(e.body,t);let n={$metadata:r8(e)};return n},rC=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await rX(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await r6(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rx=async(e,t)=>{if(e.statusCode>=300)return rT(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rT=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await rU(n,t);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await rH(n,t);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await rV(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await rK(n,t);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await rG(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await rY(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await r2(n,t);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await r5(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rI=async(e,t)=>{if(e.statusCode>=300)return rk(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rk=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await rX(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await r6(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rR=async(e,t)=>{if(e.statusCode>=300)return rM(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rM=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await rV(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await rK(n,t);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await rG(n,t);case"InvalidUserPoolConfigurationException":case"com.amazonaws.cognitoidentityprovider#InvalidUserPoolConfigurationException":throw await rW(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"PasswordResetRequiredException":case"com.amazonaws.cognitoidentityprovider#PasswordResetRequiredException":throw await rX(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await r2(n,t);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await r5(n,t);case"UserNotConfirmedException":case"com.amazonaws.cognitoidentityprovider#UserNotConfirmedException":throw await r6(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rj=async(e,t)=>{if(e.statusCode>=300)return rN(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rN=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await rU(n,t);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await rH(n,t);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await rV(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await rK(n,t);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await rG(n,t);case"LimitExceededException":case"com.amazonaws.cognitoidentityprovider#LimitExceededException":throw await rY(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await r2(n,t);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await r5(n,t);case"UserNotFoundException":case"com.amazonaws.cognitoidentityprovider#UserNotFoundException":throw await r4(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rL=async(e,t)=>{if(e.statusCode>=300)return rD(e,t);let n=await on(e.body,t),r={};r=(0,ep.F3)(n);let o={$metadata:r8(e),...r};return o},rD=async(e,t)=>{let n={...e,body:await or(e.body,t)},r=oo(e,n.body);switch(r){case"CodeDeliveryFailureException":case"com.amazonaws.cognitoidentityprovider#CodeDeliveryFailureException":throw await rU(n,t);case"ForbiddenException":case"com.amazonaws.cognitoidentityprovider#ForbiddenException":throw await rB(n,t);case"InternalErrorException":case"com.amazonaws.cognitoidentityprovider#InternalErrorException":throw await rz(n,t);case"InvalidEmailRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidEmailRoleAccessPolicyException":throw await rH(n,t);case"InvalidLambdaResponseException":case"com.amazonaws.cognitoidentityprovider#InvalidLambdaResponseException":throw await rV(n,t);case"InvalidParameterException":case"com.amazonaws.cognitoidentityprovider#InvalidParameterException":throw await rZ(n,t);case"InvalidPasswordException":case"com.amazonaws.cognitoidentityprovider#InvalidPasswordException":throw await rq(n,t);case"InvalidSmsRoleAccessPolicyException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleAccessPolicyException":throw await rK(n,t);case"InvalidSmsRoleTrustRelationshipException":case"com.amazonaws.cognitoidentityprovider#InvalidSmsRoleTrustRelationshipException":throw await rG(n,t);case"NotAuthorizedException":case"com.amazonaws.cognitoidentityprovider#NotAuthorizedException":throw await rJ(n,t);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentityprovider#ResourceNotFoundException":throw await rQ(n,t);case"TooManyRequestsException":case"com.amazonaws.cognitoidentityprovider#TooManyRequestsException":throw await r1(n,t);case"UnexpectedLambdaException":case"com.amazonaws.cognitoidentityprovider#UnexpectedLambdaException":throw await r2(n,t);case"UserLambdaValidationException":case"com.amazonaws.cognitoidentityprovider#UserLambdaValidationException":throw await r5(n,t);case"UsernameExistsException":case"com.amazonaws.cognitoidentityprovider#UsernameExistsException":throw await r3(n,t);default:let o=n.body;return r9({output:e,parsedBody:o,errorCode:r})}},rU=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n0({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rF=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n9({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r$=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new re({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rB=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new rt({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rz=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nH({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rH=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n7({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rV=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nW({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rZ=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nV({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rq=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n1({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rK=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n2({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rG=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n5({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rW=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n6({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rY=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nY({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rJ=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nZ({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rX=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n4({$metadata:r8(e),...r});return(0,ep.to)(o,n)},rQ=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nq({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r0=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nJ({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r1=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nK({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r2=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nX({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r5=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nQ({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r3=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n3({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r6=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new n8({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r4=async(e,t)=>{let n=e.body,r=(0,ep.F3)(n),o=new nG({$metadata:r8(e),...r});return(0,ep.to)(o,n)},r8=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),r7=(e,t)=>(0,ep.Wg)(e,t).then(e=>t.utf8Encoder(e)),r9=(0,ep.PC)(nz),oe=async(e,t,n,o,i)=>{let{hostname:a,protocol:s="https",port:c,path:u}=await e.endpoint(),l={protocol:s,hostname:a,port:c,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:t};return void 0!==o&&(l.hostname=o),void 0!==i&&(l.body=i),new r.aW(l)};function ot(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}}let on=(e,t)=>r7(e,t).then(e=>e.length?JSON.parse(e):{}),or=async(e,t)=>{let n=await on(e,t);return n.message=n.message??n.Message,n},oo=(e,t)=>{let n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=Object.keys(e.headers).find(e=>"x-amzn-errortype"===e.toLowerCase());return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class oi extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,oi.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"SignUpCommand",inputFilterSensitiveLog:rp,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rS(e,t)}deserialize(e,t){return rL(e,t)}}class oa extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,oa.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"ResendConfirmationCodeCommand",inputFilterSensitiveLog:rd,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rw(e,t)}deserialize(e,t){return rj(e,t)}}class os extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,os.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"InitiateAuthCommand",inputFilterSensitiveLog:rl,outputFilterSensitiveLog:rf})}serialize(e,t){return rb(e,t)}deserialize(e,t){return rR(e,t)}}class oc extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,oc.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"GetUserCommand",inputFilterSensitiveLog:rc,outputFilterSensitiveLog:ru})}serialize(e,t){return rv(e,t)}deserialize(e,t){return rI(e,t)}}class ou extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,ou.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"ChangePasswordCommand",inputFilterSensitiveLog:ro,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rh(e,t)}deserialize(e,t){return r_(e,t)}}class ol extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,ol.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"ForgotPasswordCommand",inputFilterSensitiveLog:rs,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rm(e,t)}deserialize(e,t){return rx(e,t)}}class of extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,of.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"ConfirmForgotPasswordCommand",inputFilterSensitiveLog:ri,outputFilterSensitiveLog:e=>e})}serialize(e,t){return ry(e,t)}deserialize(e,t){return rP(e,t)}}class od extends ep.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(e){super(),this.input=e}resolveMiddleware(e,t,n){this.middlewareStack.use((0,eW.p2)(t,this.serialize,this.deserialize)),this.middlewareStack.use((0,ef.a3)(t,od.getEndpointParameterInstructions()));let r=e.concat(this.middlewareStack),{logger:o}=t,{requestHandler:i}=t;return r.resolve(e=>i.handle(e.request,n||{}),{logger:o,clientName:"CognitoIdentityProviderClient",commandName:"DeleteUserCommand",inputFilterSensitiveLog:ra,outputFilterSensitiveLog:e=>e})}serialize(e,t){return rg(e,t)}deserialize(e,t){return rA(e,t)}}var op=n(91881),oh=n(62645);let oy="us-east-1",og=new nB({region:oy}),om="5a3smtdfrf4pu8vt60f5c7ohh5";function ov(e,t,n){return oh.ZP.log("SkellyAuth.signUp(username: ".concat(e,", password: *****): Called")),new Promise((r,o)=>{let i={ClientId:om,Username:e,Password:t,UserAttributes:[{Name:"email",Value:e}]};void 0!==n&&i.UserAttributes.push({Name:"locale",Value:n});let a=new oi(i);og.send(a).then(e=>{oh.ZP.log("SkellyAuth.signUp(): Success response:"),console.log(e),r(e.UserSub)}).catch(e=>{oh.ZP.log("SkellyAuth.signUp(): Error"),oh.ZP.log(e),o(oR(e))})})}function ob(e){return new Promise((t,n)=>{let r=new oa({ClientId:om,Username:e});og.send(r).then(e=>{oh.ZP.log("SkellyAuth.resendConfirmationCode(): Response: ",e),t()}).catch(e=>{oh.ZP.log("SkellyAuth.resendConfirmationCode(): Error"),oh.ZP.log(e),n(oR(e))})})}async function ow(e,t){oh.ZP.log("useLogIn.logIn(): Called");try{let n=Math.floor(new Date().getTime()/1e3),r=await (oh.ZP.log("SkellyAuth.logIn(username: ".concat(e,"): Called")),new Promise((n,r)=>{let o=new os({ClientId:om,AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:{USERNAME:e,PASSWORD:t}});og.send(o).then(e=>{oh.ZP.log("SkellyAuth.logIn(): Success"),n(e)}).catch(e=>{oh.ZP.log("SkellyAuth.logIn(): Error"),oh.ZP.log(e),r(oR(e))})})),o=await oS(r.AuthenticationResult.AccessToken),i=n+(r.AuthenticationResult.ExpiresIn||0),a=globalThis.skelly.reduxStore.dispatch;a((0,op.d0)({accessToken:r.AuthenticationResult.AccessToken,validUntil:i,refreshToken:r.AuthenticationResult.RefreshToken,idToken:r.AuthenticationResult.IdToken})),a((0,op.b6)(e)),a((0,op.vV)(o.email)),a((0,op.Fu)(o.emailVerified)),a((0,op.JF)(o.friendId)),a((0,op.i_)(o.locale)),a((0,op.av)(op.zZ.CreatingApolloClientPrivate))}catch(e){throw oh.ZP.error("SkellyAuth.logIn(): Error: ".concat(e)),e}}async function oS(e){return oh.ZP.log("SkellyAuth.getUser(): Called"),new Promise((t,n)=>{let r=new oc({AccessToken:e});og.send(r).then(e=>{oh.ZP.log("SkellyAuth.getUser(): Success response: ",e);let n={};for(let t of e.UserAttributes||[])switch(t.Name){case"email":n.email=t.Value;break;case"email_verified":void 0!==t.Value&&(n.emailVerified="true"===t.Value);break;case"custom:friend_id":n.friendId=t.Value;break;case"locale":n.locale=t.Value}t(n)}).catch(e=>{oh.ZP.log("SkellyAuth.getUser(): Error"),console.log(e),n(oR(e))})})}async function o_(){oh.ZP.log("SkellyAuth.getIdToken(): Called");let e=globalThis.skelly.reduxStore.getState(),t=e.account.validUntil;if(void 0!==t&&ox(t)){let t=e.account.idToken;return t}return void 0===t?oh.ZP.log("SkellyAuth.getIdToken(): No id token is available"):oh.ZP.log("SkellyAuth.getIdToken(): Id token is no longer valid"),(await oT()).IdToken}async function oE(){let e=globalThis.skelly.reduxStore.getState(),t=e.account.valid;return void 0!==t&&ox(t)?(oh.ZP.log("SkellyAuth: Tokens no longer valid. Refreshing tokens"),e.account.accessToken):(await oT()).AccessToken}async function oP(){let e=globalThis.skelly.reduxStore.getState(),t=e.account.credentials;if((null==t?void 0:t.expiration)&&ox(t.expiration))return oh.ZP.log("SkellyAuth.getCredentials(): Returning cached credentials "),{...t,expiration:new Date(t.expiration)};oh.ZP.log("SkellyAtuh.getCredentials(): Credentials expired. Fetching new ones");let n={clientConfig:{region:oy},identityPoolId:"us-east-1:09c55ee1-9425-4cdd-bf92-0fc693a6ec1f"},r=e.account.idToken;r?(oh.ZP.log("SkellyAuth.getCredentials(): User is logged in (idToken was available)"),n.logins={"cognito-idp.us-east-1.amazonaws.com/us-east-1_BYQjgcNo3":r}):oh.ZP.log("SkellyAuth.getCredentials(): No user is logged in"),oh.ZP.log("SkellyAuth.getCredentials(): Calling fromCognitoIdentityPool");let o=await tT(n)();oh.ZP.log("SkellyAuth.getCredentials(): fromCognitoIdentityPool returned credentials");let i=globalThis.skelly.reduxStore.dispatch;return i((0,op.Dj)({...o,expiration:o.expiration?o.expiration.getTime()/1e3:void 0})),o}async function oO(e,t,n){return new Promise((r,o)=>{let i=new ou({AccessToken:e,PreviousPassword:t,ProposedPassword:n});og.send(i).then(e=>{r()}).catch(e=>{oh.ZP.log("SkellyAuth.changePassword(): Error"),oh.ZP.log(e),o(oR(e))})})}function oA(e){return new Promise((t,n)=>{let r=new ol({ClientId:om,Username:e});og.send(r).then(e=>{oh.ZP.log("SkellyAuth.forgotPassword(): Success. Response: ".concat(JSON.stringify(e))),t()}).catch(e=>{oh.ZP.log("SkellyAuth.forgotPassword(): Error"),oh.ZP.log(e),n(oR(e))})})}function oC(e,t,n){return new Promise((r,o)=>{let i=new of({ClientId:om,Username:e,ConfirmationCode:t,Password:n});og.send(i).then(e=>{oh.ZP.log("SkellyAuth.resetPassword(): Success. Response:"),console.log(e),r()}).catch(e=>{oh.ZP.log("SkellyAuth.resetPassword(): Error"),oh.ZP.log(e),o(oR(e))})})}function ox(e){if(void 0===e)throw"InvalidFunctionCall";let t=Math.round(new Date().getTime()/1e3);return e-60>t}async function oT(){let e;oh.ZP.log("SkellyAuth.refreshTokens(): Called");let t=globalThis.skelly.reduxStore.getState(),n=t.account.refreshToken;if(!n)throw"UserNotLoggedIn";let r=new os({ClientId:om,AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:{REFRESH_TOKEN:n}}),o=Math.floor(new Date().getTime()/1e3);try{e=await og.send(r)}catch(e){throw oh.ZP.error("refreshing token failed"),console.error(e),e}let i=o+(e.AuthenticationResult.ExpiresIn||0),a=globalThis.skelly.reduxStore.dispatch;return a((0,op.d0)({accessToken:e.AuthenticationResult.AccessToken,validUntil:i,refreshToken:e.AuthenticationResult.RefreshToken,idToken:e.AuthenticationResult.IdToken})),oh.ZP.log("SkellyAuth.refreshToken(): Successfully completed"),e.AuthenticationResult}async function oI(e){return new Promise((t,n)=>{let r=new od({AccessToken:e});og.send(r).then(e=>{oh.ZP.log("SkellyAuth.deleteUser(): Success. Response:"),console.log(e),t()}).catch(e=>{oh.ZP.log("SkellyAuth.deleteUser(): Error"),oh.ZP.log(e),n(oR(e))})})}async function ok(){oh.ZP.log("SkellyAuth.logOut(): Called");let e=globalThis.skelly.reduxStore.dispatch;e((0,op.av)(op.zZ.ClosingApolloClientPrivate))}function oR(e){if(e instanceof nZ){if(e.message&&"Incorrect username or password."===e.message)return"IncorrectUsernameOrPassword"}else if(e instanceof nV)switch(e.message){case"Missing required parameter PASSWORD":return"MissingPassword";case"Missing required parameter USERNAME":return"MissingUsername";case"Invalid email address format.":return"InvalidEmailAddress"}else if(e instanceof n1){if(e.message&&("Password does not conform to policy: Password not long enough"===e.message||"Password did not conform with policy: Password not long enough"===e.message||"Password does not conform to policy: Password must have lowercase characters"===e.message||"Password did not conform with policy: Password must have lowercase characters"===e.message||"Password does not conform to policy: Password must have numeric characters"===e.message||"Password does not conform to policy: Password must have uppercase characters"===e.message||"Password did not conform with policy: Password must have uppercase characters"===e.message))return"PasswordNotPolicyConform"}else if(e instanceof n9){if(e.message&&"Invalid verification code provided, please try again."===e.message)return"InvalidVerificationCode"}else if(e instanceof nY){if(e.message&&"Attempt limit exceeded, please try after some time."===e.message)return"AttemptLimitExceeded"}else if(e instanceof n3){if(e.message&&"User already exists"===e.message)return"UserAlreadyExists"}else if(e instanceof n8)return"UserNotYetConfirmed";return void 0!==e.message?e.message:e.toString()}},93814:function(){},9008:function(e,t,n){e.exports=n(42636)},34155:function(e){var t,n,r,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],u=!1,l=-1;function f(){u&&r&&(u=!1,r.length?c=r.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(r=c,c=[];++l1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:c,p=(e=u.predicate,t=u.blacklist,n=u.whitelist,s=function(){return!0},e&&"function"==typeof e?s=e:Array.isArray(t)?s=function(e){return 0>t.indexOf(e.type)}:Array.isArray(n)&&(s=function(e){return n.indexOf(e.type)>=0}),s),h=new r.BroadcastChannel(u.channel,u.broadcastChannelOption),y=u.prepareState||c.prepareState,g=null;return function(e){var t=e.getState,n=e.dispatch;return function(e){return function(r){if(g||(g=new d({channel:h,dispatch:n,allowed:p})),r&&!r.$uuid){var s=(r.$uuid=l(),r.$wuid=f,r);o=s.$uuid;try{if(r.type===a)return t()&&(s.payload=y(t()),h.postMessage(s)),e(r);(p(s)||r.type===i)&&h.postMessage(s)}catch(e){console.error("Your browser doesn't support cross tab communication")}}return e(Object.assign(r,{$isSync:void 0!==r.$isSync&&r.$isSync}))}}}},t.UX=function(e){(0,e.dispatch)({type:"&_INIT_MESSAGE_LISTENER"})}},50525:function(e,t,n){"use strict";n.r(t),n.d(t,{BroadcastChannel:function(){return O},beLeader:function(){return V},clearNodeFolder:function(){return A},createLeaderElection:function(){return Z},enforceOptions:function(){return C}});var r,o=n(34155);function i(e){return e||(e=0),new Promise(function(t){return setTimeout(t,e)})}function a(){return Math.random().toString(36).substring(2)}var s=0,c=0;function u(){var e=new Date().getTime();return e===s?1e3*e+ ++c:(s=e,c=0,1e3*e)}var l="[object process]"===Object.prototype.toString.call(void 0!==o?o:0),f=function(){function e(e){this.ttl=e,this.set=new Set,this.timeMap=new Map}return e.prototype.has=function(e){return this.set.has(e)},e.prototype.add=function(e){var t=this;this.timeMap.set(e,d()),this.set.add(e),setTimeout(function(){(function(e){for(var t=d()-e.ttl,n=e.set[Symbol.iterator]();;){var r=n.next().value;if(!r||!(e.timeMap.get(r)0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}var h="messages";function y(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function g(e){var t,n,r,o;return e.closed||!e.messagesCallback?Promise.resolve():(t=e.db,n=e.lastCursorId,r=t.transaction(h).objectStore(h),o=[],new Promise(function(e){(function(){try{var e=IDBKeyRange.bound(n+1,1/0);return r.openCursor(e)}catch(e){return r.openCursor()}})().onsuccess=function(t){var r=t.target.result;r?r.value.ide.lastCursorId&&(e.lastCursorId=t.id),t}).filter(function(t){return!(t.uuid===e.uuid||e.eMIs.has(t.id))&&!(t.data.time0||e._addEL.internal.length>0}function I(e,t,n){e._addEL[t].push(n),function(e){if(!e._iL&&T(e)){var t=function(t){e._addEL[t.type].forEach(function(e){t.time>=e.time&&e.fn(t.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}(e)}function k(e,t,n){e._addEL[t]=e._addEL[t].filter(function(e){return e!==n}),function(e){if(e._iL&&!T(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}O._pubkey=!0,O.prototype={postMessage:function(e){if(this.closed)throw Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed");return x(this,"message",e)},postInternal:function(e){return x(this,"internal",e)},set onmessage(fn){var R={time:this.method.microSeconds(),fn:fn};k(this,"message",this._onML),fn&&"function"==typeof fn?(this._onML=R,I(this,"message",R)):this._onML=null},addEventListener:function(e,t){I(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){var n=this._addEL[e].find(function(e){return e.fn===t});k(this,e,n)},close:function(){var e=this;if(!this.closed){this.closed=!0;var t=this._prepP?this._prepP:Promise.resolve();return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(e){return e()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};var M=n(25643),j=n.n(M),N=n(199),L=n.n(N),D=j()?L():{add:function(e){if("function"==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope);else{if("function"!=typeof window.addEventListener)return;window.addEventListener("beforeunload",function(){e()},!0),window.addEventListener("unload",function(){e()},!0)}}},U=new Set,F=!1;function $(){var e=[];return U.forEach(function(t){e.push(t()),U.delete(t)}),Promise.all(e)}var B={add:function(e){if(F||(F=!0,D.add($)),"function"!=typeof e)throw Error("Listener is no function");return U.add(e),{remove:function(){return U.delete(e)},run:function(){return U.delete(e),e()}}},runAll:$,removeAll:function(){U.clear()},getSize:function(){return U.size}},z=function(e,t){this._channel=e,this._options=t,this.isLeader=!1,this.isDead=!1,this.token=a(),this._isApl=!1,this._reApply=!1,this._unl=[],this._lstns=[],this._invs=[],this._dpL=function(){},this._dpLC=!1};function H(e,t){var n={context:"leader",action:t,token:e.token};return e._channel.postInternal(n)}function V(e){e.isLeader=!0;var t=B.add(function(){return e.die()});e._unl.push(t);var n=function(t){"leader"===t.context&&"apply"===t.action&&H(e,"tell"),"leader"!==t.context||"tell"!==t.action||e._dpLC||(e._dpLC=!0,e._dpL(),H(e,"tell"))};return e._channel.addEventListener("internal",n),e._lstns.push(n),H(e,"tell")}function Z(e,t){if(e._leaderElector)throw Error("BroadcastChannel already has a leader-elector");(n=t)||(n={}),(n=JSON.parse(JSON.stringify(n))).fallbackInterval||(n.fallbackInterval=3e3),n.responseTime||(n.responseTime=e.method.averageResponseTime(e.options)),t=n;var n,r=new z(e,t);return e._befC.push(function(){return r.die()}),e._leaderElector=r,r}z.prototype={applyOnce:function(){var e=this;if(this.isLeader||this.isDead)return Promise.resolve(!1);if(this._isApl)return this._reApply=!0,Promise.resolve(!1);this._isApl=!0;var t=!1,n=[],r=function(r){"leader"===r.context&&r.token!=e.token&&(n.push(r),"apply"===r.action&&r.token>e.token&&(t=!0),"tell"===r.action&&(t=!0))};return this._channel.addEventListener("internal",r),H(this,"apply").then(function(){return i(e._options.responseTime)}).then(function(){return t?Promise.reject(Error()):H(e,"apply")}).then(function(){return i(e._options.responseTime)}).then(function(){return t?Promise.reject(Error()):H(e)}).then(function(){return V(e)}).then(function(){return!0}).catch(function(){return!1}).then(function(t){return(e._channel.removeEventListener("internal",r),e._isApl=!1,!t&&e._reApply)?(e._reApply=!1,e.applyOnce()):t})},awaitLeadership:function(){var e;return this._aLP||(this._aLP=(e=this,e.isLeader?Promise.resolve():new Promise(function(t){var n=!1;function r(){n||(n=!0,clearInterval(o),e._channel.removeEventListener("internal",i),t(!0))}e.applyOnce().then(function(){e.isLeader&&r()});var o=setInterval(function(){e.applyOnce().then(function(){e.isLeader&&r()})},e._options.fallbackInterval);e._invs.push(o);var i=function(t){"leader"===t.context&&"death"===t.action&&e.applyOnce().then(function(){e.isLeader&&r()})};e._channel.addEventListener("internal",i),e._lstns.push(i)}))),this._aLP},set onduplicate(fn){this._dpL=fn},die:function(){var e=this;if(!this.isDead)return this.isDead=!0,this._lstns.forEach(function(t){return e._channel.removeEventListener("internal",t)}),this._invs.forEach(function(e){return clearInterval(e)}),this._unl.forEach(function(e){e.remove()}),H(this,"death")}}},45217:function(e,t,n){"use strict";n.d(t,{md:function(){return p},UY:function(){return f},qC:function(){return d},MT:function(){return l}});var r=n(4942);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;te.loc).filter(e=>null!=e));this.source=null!=l?l:null==y?void 0:null===(i=y[0])||void 0===i?void 0:i.source,this.positions=null!=f?f:null==y?void 0:y.map(e=>e.start),this.locations=f&&l?f.map(e=>(0,o.k)(l,e)):null==y?void 0:y.map(e=>(0,o.k)(e.source,e.start));let g=(0,r.y)(null==p?void 0:p.extensions)?null==p?void 0:p.extensions:void 0;this.extensions=null!==(c=null!=h?h:g)&&void 0!==c?c: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!=p&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let t of this.nodes)t.loc&&(e+="\n\n"+(0,i.Q)(t.loc));else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+(0,i.z)(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function s(e){return void 0===e||0===e.length?void 0:e}function c(e){return e.toString()}function u(e){return e.toJSON()}},45219:function(e,t,n){"use strict";n.d(t,{h:function(){return o}});var r=n(28087);function o(e,t,n){return new r.__(`Syntax Error: ${n}`,{source:e,positions:[t]})}},37826:function(e,t,n){"use strict";function r(e,t){if(!e)throw Error(t)}n.d(t,{a:function(){return r}})},25821:function(e,t,n){"use strict";function r(e){return function e(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,n){if(null===t)return"null";if(n.includes(t))return"[Circular]";let r=[...n,t];if("function"==typeof t.toJSON){let n=t.toJSON();if(n!==t)return"string"==typeof n?n:e(n,r)}else if(Array.isArray(t))return function(t,n){if(0===t.length)return"[]";if(n.length>2)return"[Array]";let r=Math.min(10,t.length),o=t.length-r,i=[];for(let o=0;o1&&i.push(`... ${o} more items`),"["+i.join(", ")+"]"}(t,r);return function(t,n){let r=Object.entries(t);if(0===r.length)return"{}";if(n.length>2)return"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(t)+"]";let o=r.map(([t,r])=>t+": "+e(r,n));return"{ "+o.join(", ")+" }"}(t,r)}(t,n);default:return String(t)}}(e,[])}n.d(t,{X:function(){return r}})},8306:function(e,t,n){"use strict";n.d(t,{n:function(){return o}});var r=n(25821);let o=globalThis.process&&"production"===globalThis.process.env.NODE_ENV?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var n;let o=t.prototype[Symbol.toStringTag],i=Symbol.toStringTag in e?e[Symbol.toStringTag]:null===(n=e.constructor)||void 0===n?void 0:n.name;if(o===i){let t=(0,r.X)(e);throw Error(`Cannot use ${o} "${t}" 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(e,t,n){"use strict";function r(e,t){if(!e)throw Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{k:function(){return r}})},88495:function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}n.d(t,{y:function(){return r}})},72380:function(e,t,n){"use strict";var r,o;n.d(t,{UG:function(){return u},WU:function(){return a},Ye:function(){return i},h8:function(){return s},ku:function(){return r}});class i{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class a{constructor(e,t,n,r,o,i){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=o,this.value=i,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 s={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"]},c=new Set(Object.keys(s));function u(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&c.has(t)}(o=r||(r={})).QUERY="query",o.MUTATION="mutation",o.SUBSCRIPTION="subscription"},87392:function(e,t,n){"use strict";n.d(t,{LZ:function(){return a},MZ:function(){return i},wv:function(){return o}});var r=n(68297);function o(e){var t,n;let o=Number.MAX_SAFE_INTEGER,i=null,a=-1;for(let t=0;t0===t?e:e.slice(o)).slice(null!==(t=i)&&void 0!==t?t:0,a+1)}function i(e){if(""===e)return!0;let t=!0,n=!1,r=!0,o=!1;for(let i=0;i1&&o.slice(1).every(e=>0===e.length||(0,r.FD)(e.charCodeAt(0))),s=n.endsWith('\\"""'),c=e.endsWith('"')&&!s,u=e.endsWith("\\"),l=c||u,f=!(null!=t&&t.minimize)&&(!i||e.length>70||l||a||s),d="",p=i&&(0,r.FD)(e.charCodeAt(0));return(f&&!p||a)&&(d+="\n"),d+=n,(f||l)&&(d+="\n"),'"""'+d+'"""'}},68297:function(e,t,n){"use strict";function r(e){return 9===e||32===e}function o(e){return e>=48&&e<=57}function i(e){return e>=97&&e<=122||e>=65&&e<=90}function a(e){return i(e)||95===e}function s(e){return i(e)||o(e)||95===e}n.d(t,{FD:function(){return r},HQ:function(){return s},LQ:function(){return a},X1:function(){return o}})},99878:function(e,t,n){"use strict";var r,o;n.d(t,{B:function(){return r}}),(o=r||(r={})).QUERY="QUERY",o.MUTATION="MUTATION",o.SUBSCRIPTION="SUBSCRIPTION",o.FIELD="FIELD",o.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",o.FRAGMENT_SPREAD="FRAGMENT_SPREAD",o.INLINE_FRAGMENT="INLINE_FRAGMENT",o.VARIABLE_DEFINITION="VARIABLE_DEFINITION",o.SCHEMA="SCHEMA",o.SCALAR="SCALAR",o.OBJECT="OBJECT",o.FIELD_DEFINITION="FIELD_DEFINITION",o.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",o.INTERFACE="INTERFACE",o.UNION="UNION",o.ENUM="ENUM",o.ENUM_VALUE="ENUM_VALUE",o.INPUT_OBJECT="INPUT_OBJECT",o.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"},97359:function(e,t,n){"use strict";var r,o;n.d(t,{h:function(){return r}}),(o=r||(r={})).NAME="Name",o.DOCUMENT="Document",o.OPERATION_DEFINITION="OperationDefinition",o.VARIABLE_DEFINITION="VariableDefinition",o.SELECTION_SET="SelectionSet",o.FIELD="Field",o.ARGUMENT="Argument",o.FRAGMENT_SPREAD="FragmentSpread",o.INLINE_FRAGMENT="InlineFragment",o.FRAGMENT_DEFINITION="FragmentDefinition",o.VARIABLE="Variable",o.INT="IntValue",o.FLOAT="FloatValue",o.STRING="StringValue",o.BOOLEAN="BooleanValue",o.NULL="NullValue",o.ENUM="EnumValue",o.LIST="ListValue",o.OBJECT="ObjectValue",o.OBJECT_FIELD="ObjectField",o.DIRECTIVE="Directive",o.NAMED_TYPE="NamedType",o.LIST_TYPE="ListType",o.NON_NULL_TYPE="NonNullType",o.SCHEMA_DEFINITION="SchemaDefinition",o.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",o.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",o.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",o.FIELD_DEFINITION="FieldDefinition",o.INPUT_VALUE_DEFINITION="InputValueDefinition",o.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",o.UNION_TYPE_DEFINITION="UnionTypeDefinition",o.ENUM_TYPE_DEFINITION="EnumTypeDefinition",o.ENUM_VALUE_DEFINITION="EnumValueDefinition",o.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",o.DIRECTIVE_DEFINITION="DirectiveDefinition",o.SCHEMA_EXTENSION="SchemaExtension",o.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",o.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",o.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",o.UNION_TYPE_EXTENSION="UnionTypeExtension",o.ENUM_TYPE_EXTENSION="EnumTypeExtension",o.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"},92105:function(e,t,n){"use strict";n.d(t,{h:function(){return c},u:function(){return u}});var r=n(45219),o=n(72380),i=n(87392),a=n(68297),s=n(74635);class c{constructor(e){let t=new o.WU(s.T.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;let e=this.token=this.lookahead();return e}lookahead(){let e=this.token;if(e.kind!==s.T.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let n=e.source.body,o=n.length,c=t;for(;c=0&&e<=55295||e>=57344&&e<=1114111}function f(e,t){return d(e.charCodeAt(t))&&p(e.charCodeAt(t+1))}function d(e){return e>=55296&&e<=56319}function p(e){return e>=56320&&e<=57343}function h(e,t){let n=e.source.body.codePointAt(t);if(void 0===n)return s.T.EOF;if(n>=32&&n<=126){let e=String.fromCodePoint(n);return'"'===e?"'\"'":`"${e}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function y(e,t,n,r,i){let a=e.line,s=1+n-e.lineStart;return new o.WU(t,n,r,a,s,i)}function g(e,t,n){if(!(0,a.X1)(n))throw(0,r.h)(e.source,t,`Invalid number, expected digit but got: ${h(e,t)}.`);let o=e.source.body,i=t+1;for(;(0,a.X1)(o.charCodeAt(i));)++i;return i}function m(e,t){return v(e.charCodeAt(t))<<12|v(e.charCodeAt(t+1))<<8|v(e.charCodeAt(t+2))<<4|v(e.charCodeAt(t+3))}function v(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}},57867:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(29551);let o=/\r\n|[\n\r]/g;function i(e,t){let n=0,i=1;for(let a of e.body.matchAll(o)){if("number"==typeof a.index||(0,r.k)(!1),a.index>=t)break;n=a.index+a[0].length,i+=1}return{line:i,column:t+1-n}}},84275:function(e,t,n){"use strict";n.d(t,{H2:function(){return f},Qc:function(){return l},gZ:function(){return p},tl:function(){return d}});var r=n(45219),o=n(72380),i=n(99878),a=n(97359),s=n(92105),c=n(7926),u=n(74635);function l(e,t){let n=new h(e,t);return n.parseDocument()}function f(e,t){let n=new h(e,t);n.expectToken(u.T.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(u.T.EOF),r}function d(e,t){let n=new h(e,t);n.expectToken(u.T.SOF);let r=n.parseConstValueLiteral();return n.expectToken(u.T.EOF),r}function p(e,t){let n=new h(e,t);n.expectToken(u.T.SOF);let r=n.parseTypeReference();return n.expectToken(u.T.EOF),r}class h{constructor(e,t={}){let n=(0,c.T)(e)?e:new c.H(e);this._lexer=new s.h(n),this._options=t,this._tokenCounter=0}parseName(){let e=this.expectToken(u.T.NAME);return this.node(e,{kind:a.h.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:a.h.DOCUMENT,definitions:this.many(u.T.SOF,this.parseDefinition,u.T.EOF)})}parseDefinition(){if(this.peek(u.T.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===u.T.NAME){switch(t.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(e)throw(0,r.h)(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){let e;let t=this._lexer.token;if(this.peek(u.T.BRACE_L))return this.node(t,{kind:a.h.OPERATION_DEFINITION,operation:o.ku.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType();return this.peek(u.T.NAME)&&(e=this.parseName()),this.node(t,{kind:a.h.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(u.T.NAME);switch(e.value){case"query":return o.ku.QUERY;case"mutation":return o.ku.MUTATION;case"subscription":return o.ku.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(u.T.PAREN_L,this.parseVariableDefinition,u.T.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:a.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(u.T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(u.T.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(u.T.DOLLAR),this.node(e,{kind:a.h.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:a.h.SELECTION_SET,selections:this.many(u.T.BRACE_L,this.parseSelection,u.T.BRACE_R)})}parseSelection(){return this.peek(u.T.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t;let n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(u.T.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:a.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(u.T.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(u.T.PAREN_L,t,u.T.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,n=this.parseName();return this.expectToken(u.T.COLON),this.node(t,{kind:a.h.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(u.T.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(u.T.NAME)?this.node(e,{kind:a.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:a.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token;return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:a.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:a.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(e){let t=this._lexer.token;switch(t.kind){case u.T.BRACKET_L:return this.parseList(e);case u.T.BRACE_L:return this.parseObject(e);case u.T.INT:return this.advanceLexer(),this.node(t,{kind:a.h.INT,value:t.value});case u.T.FLOAT:return this.advanceLexer(),this.node(t,{kind:a.h.FLOAT,value:t.value});case u.T.STRING:case u.T.BLOCK_STRING:return this.parseStringLiteral();case u.T.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:a.h.BOOLEAN,value:!0});case"false":return this.node(t,{kind:a.h.BOOLEAN,value:!1});case"null":return this.node(t,{kind:a.h.NULL});default:return this.node(t,{kind:a.h.ENUM,value:t.value})}case u.T.DOLLAR:if(e){if(this.expectToken(u.T.DOLLAR),this._lexer.token.kind===u.T.NAME){let e=this._lexer.token.value;throw(0,r.h)(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:a.h.STRING,value:e.value,block:e.kind===u.T.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:a.h.LIST,values:this.any(u.T.BRACKET_L,()=>this.parseValueLiteral(e),u.T.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:a.h.OBJECT,fields:this.any(u.T.BRACE_L,()=>this.parseObjectField(e),u.T.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,n=this.parseName();return this.expectToken(u.T.COLON),this.node(t,{kind:a.h.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(u.T.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(u.T.AT),this.node(t,{kind:a.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e;let t=this._lexer.token;if(this.expectOptionalToken(u.T.BRACKET_L)){let n=this.parseTypeReference();this.expectToken(u.T.BRACKET_R),e=this.node(t,{kind:a.h.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(u.T.BANG)?this.node(t,{kind:a.h.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:a.h.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(u.T.STRING)||this.peek(u.T.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.many(u.T.BRACE_L,this.parseOperationTypeDefinition,u.T.BRACE_R);return this.node(e,{kind:a.h.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(u.T.COLON);let n=this.parseNamedType();return this.node(e,{kind:a.h.OPERATION_TYPE_DEFINITION,operation:t,type:n})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:a.h.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:a.h.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(u.T.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(u.T.BRACE_L,this.parseFieldDefinition,u.T.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(u.T.COLON);let o=this.parseTypeReference(),i=this.parseConstDirectives();return this.node(e,{kind:a.h.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:i})}parseArgumentDefs(){return this.optionalMany(u.T.PAREN_L,this.parseInputValueDef,u.T.PAREN_R)}parseInputValueDef(){let e;let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(u.T.COLON);let o=this.parseTypeReference();this.expectOptionalToken(u.T.EQUALS)&&(e=this.parseConstValueLiteral());let i=this.parseConstDirectives();return this.node(t,{kind:a.h.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:e,directives:i})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:a.h.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:a.h.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(u.T.EQUALS)?this.delimitedMany(u.T.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:a.h.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o})}parseEnumValuesDefinition(){return this.optionalMany(u.T.BRACE_L,this.parseEnumValueDefinition,u.T.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:a.h.ENUM_VALUE_DEFINITION,description:t,name:n,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,`${y(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:a.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(u.T.BRACE_L,this.parseInputValueDef,u.T.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===u.T.NAME)switch(e.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(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),n=this.optionalMany(u.T.BRACE_L,this.parseOperationTypeDefinition,u.T.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:a.h.SCHEMA_EXTENSION,directives:t,operationTypes:n})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:a.h.SCALAR_TYPE_EXTENSION,name:t,directives:n})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:a.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:a.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.h.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.h.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:a.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(u.T.AT);let n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let i=this.parseDirectiveLocations();return this.node(e,{kind:a.h.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:i})}parseDirectiveLocations(){return this.delimitedMany(u.T.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(i.B,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new o.Ye(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw(0,r.h)(this._lexer.source,t.start,`Expected ${g(e)}, found ${y(t)}.`)}expectOptionalToken(e){let t=this._lexer.token;return t.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===u.T.NAME&&t.value===e)this.advanceLexer();else throw(0,r.h)(this._lexer.source,t.start,`Expected "${e}", found ${y(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===u.T.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return(0,r.h)(this._lexer.source,t.start,`Unexpected ${y(t)}.`)}any(e,t,n){this.expectToken(e);let r=[];for(;!this.expectOptionalToken(n);)r.push(t.call(this));return r}optionalMany(e,t,n){if(this.expectOptionalToken(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(n));return e}return[]}many(e,t,n){this.expectToken(e);let r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(e,t){this.expectOptionalToken(e);let n=[];do n.push(t.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==u.T.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw(0,r.h)(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function y(e){let t=e.value;return g(e.kind)+(null!=t?` "${t}"`:"")}function g(e){return(0,s.u)(e)?`"${e}"`:e}},90850:function(e,t,n){"use strict";n.d(t,{Q:function(){return o},z:function(){return i}});var r=n(57867);function o(e){return i(e.source,(0,r.k)(e.source,e.start))}function i(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,c=1===t.line?n:0,u=t.column+c,l=`${e.name}:${s}:${u} `,f=r.split(/\r\n|[\n\r]/g),d=f[o];if(d.length>120){let e=Math.floor(u/80),t=u%80,n=[];for(let e=0;e["|",e]),["|","^".padStart(t)],["|",n[e+1]]])}return l+a([[`${s-1} |`,f[o-1]],[`${s} |`,d],["|","^".padStart(u)],[`${s+1} |`,f[o+1]]])}function a(e){let t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}},7926:function(e,t,n){"use strict";n.d(t,{H:function(){return a},T:function(){return s}});var r=n(37826),o=n(25821),i=n(8306);class a{constructor(e,t="GraphQL request",n={line:1,column:1}){"string"==typeof e||(0,r.a)(!1,`Body must be a string. Received: ${(0,o.X)(e)}.`),this.body=e,this.name=t,this.locationOffset=n,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 s(e){return(0,i.n)(e,a)}},74635:function(e,t,n){"use strict";var r,o;n.d(t,{T:function(){return r}}),(o=r||(r={})).SOF="",o.EOF="",o.BANG="!",o.DOLLAR="$",o.AMP="&",o.PAREN_L="(",o.PAREN_R=")",o.SPREAD="...",o.COLON=":",o.EQUALS="=",o.AT="@",o.BRACKET_L="[",o.BRACKET_R="]",o.BRACE_L="{",o.PIPE="|",o.BRACE_R="}",o.NAME="Name",o.INT="Int",o.FLOAT="Float",o.STRING="String",o.BLOCK_STRING="BlockString",o.COMMENT="Comment"},80898:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}}),r="undefined"!=typeof self?self:void 0,o=function(e){if("function"!=typeof Promise)throw"Promise support required";var t=e.crypto||e.msCrypto;if(t){var n=t.subtle||t.webkitSubtle;if(n){var r=e.Crypto||t.constructor||Object,o=e.SubtleCrypto||n.constructor||Object;e.CryptoKey||e.Key;var i=e.navigator.userAgent.indexOf("Edge/")>-1,a=!!e.msCrypto&&!i,s=!t.subtle&&!!t.webkitSubtle;if(a||s){var c={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},u={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(e){var r=n[e];n[e]=function(o,i,c){var u,l,b,E,P,O=[].slice.call(arguments);switch(e){case"generateKey":b=y(o),E=i,P=c;break;case"importKey":b=y(c),E=O[3],P=O[4],"jwk"===o&&((i=m(i)).alg||(i.alg=g(b)),i.key_ops||(i.key_ops="oct"!==i.kty?"d"in i?P.filter(_):P.filter(S):P.slice()),O[1]=(u=m(i),a&&(u.extractable=u.ext,delete u.ext),p(unescape(encodeURIComponent(JSON.stringify(u)))).buffer));break;case"unwrapKey":b=O[4],E=O[5],P=O[6],O[2]=c._key}if("generateKey"===e&&"HMAC"===b.name&&b.hash)return b.length=b.length||({"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024})[b.hash.name],n.importKey("raw",t.getRandomValues(new Uint8Array(b.length+7>>3)),b,E,P);if(s&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===b.name&&(!b.modulusLength||b.modulusLength>=2048))return(o=y(o)).name="RSAES-PKCS1-v1_5",delete o.hash,n.generateKey(o,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([n.exportKey("jwk",e.publicKey),n.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=g(b),e[0].key_ops=P.filter(S),e[1].key_ops=P.filter(_),Promise.all([n.importKey("jwk",e[0],b,!0,e[0].key_ops),n.importKey("jwk",e[1],b,E,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((s||a&&"SHA-1"===(b.hash||{}).name)&&"importKey"===e&&"jwk"===o&&"HMAC"===b.name&&"oct"===i.kty)return n.importKey("raw",p(d(i.k)),c,O[3],O[4]);if(s&&"importKey"===e&&("spki"===o||"pkcs8"===o))return n.importKey("jwk",function(e){var t=v(e),n=!1;t.length>2&&(n=!0,t.shift());var r={ext:!0};if("1.2.840.113549.1.1.1"===t[0][0]){var o=["n","e","d","p","q","dp","dq","qi"],i=v(t[1]);n&&i.shift();for(var a=0;a2&&(r=!0,i.unshift(new Uint8Array([0]))),n[0][0]="1.2.840.113549.1.1.1",t=i}else throw TypeError("Unsupported key type");return n.push(new Uint8Array(b(t)).buffer),r?n.unshift(new Uint8Array([0])):n[1]={tag:3,value:n[1]},new Uint8Array(b(n)).buffer}(m(e))})),c}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=n[e];n[e]=function(r,o,i,s){if(a&&(!i.byteLength||s&&!s.byteLength))throw Error("Empy input is not allowed");var c,u=[].slice.call(arguments),l=y(r);if(a&&"decrypt"===e&&"AES-GCM"===l.name){var f=r.tagLength>>3;u[2]=(i.buffer||i).slice(0,i.byteLength-f),r.tag=(i.buffer||i).slice(i.byteLength-f)}u[1]=o._key;try{c=t.apply(n,u)}catch(e){return Promise.reject(e)}return a&&(c=new Promise(function(t,n){c.onabort=c.onerror=function(e){n(e)},c.oncomplete=function(n){var n=n.target.result;if("encrypt"===e&&n instanceof AesGcmEncryptResult){var r=n.ciphertext,o=n.tag;(n=new Uint8Array(r.byteLength+o.byteLength)).set(new Uint8Array(r),0),n.set(new Uint8Array(o),r.byteLength),n=n.buffer}t(n)}})),c}}),a){var l=n.digest;n.digest=function(e,t){var r;if(!t.byteLength)throw Error("Empy input is not allowed");try{r=l.call(n,e,t)}catch(e){return Promise.reject(e)}return r=new Promise(function(e,t){r.onabort=r.onerror=function(e){t(e)},r.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:n}}),e.CryptoKey=w}s&&(t.subtle=n,e.Crypto=r,e.SubtleCrypto=o,e.CryptoKey=w)}}}function f(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function d(e){return e+="===",atob((e=e.slice(0,-e.length%4)).replace(/-/g,"+").replace(/_/g,"/"))}function p(e){for(var t=new Uint8Array(e.length),n=0;ne.length)throw RangeError("Malformed DER");var n,r=e[t.pos++],o=e[t.pos++];if(o>=128){if(o&=127,t.end-t.pos=128){var s=r,r=4;for(t.splice(o,0,s>>24&255,s>>16&255,s>>8&255,255&s);r>1&&!(s>>24);)s<<=8,r--;r<4&&t.splice(o,4-r),r|=128}return t.splice(o-2,2,n,r),t}function w(e,t,n,r){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===n?e.extractable:n,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===r?e.usages:r,enumerable:!0}})}function S(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function _(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}},"function"==typeof define&&define.amd?define([],function(){return o(r)}):"object"==typeof module&&module.exports?module.exports=o(r):o(r);var r,o,i=window.crypto},31955:function(e,t,n){"use strict";/*! js-cookie v3.0.5 | MIT */function r(e){for(var t=1;tt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function s(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]