1var VisitorProfile=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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)return e;if(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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=79)}([function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return o})),n.d(t,"__rest",(function(){return s})),n.d(t,"__decorate",(function(){return a})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return f})),n.d(t,"__createBinding",(function(){return d})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return g})),n.d(t,"__spread",(function(){return v})),n.d(t,"__spreadArrays",(function(){return y})),n.d(t,"__await",(function(){return m})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _}
vendor: 6,144 bytes, lines 1-16
1)),n.d(t,"__makeTemplateObject",(function(){return S})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return E})),n.d(t,"__classPrivateFieldGet",(function(){return C})),n.d(t,"__classPrivateFieldSet",(function(){return I})); 2/*! ***************************************************************************** 3Copyright (c) Microsoft Corporation. 4 5Permission to use, copy, modify, and/or distribute this software for any 6purpose with or without fee is hereby granted. 7 8THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 13OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14PERFORMANCE OF THIS SOFTWARE. 15***************************************************************************** */ 16var 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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(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(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function m(e){return this instanceof m?(this.v=e,this):new m(e)}function b(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof m?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}var n}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[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,i){t[r]=e[r]?function(t){return(n=!n)?{value:m(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 4,879 bytes, lines 16-23
16function A(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 E(e){return e&&e.__esModule?e:{default:e}}function C(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function I(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";(function(e){ 17/*! 18 * The buffer module from node.js, for the browser. 19 * 20 * @author Feross Aboukhadijeh <http://feross.org> 21 * @license MIT 22 */ 23var r=n(81),i=n(82),o=n(83);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):d(e,t);if("Buffer"===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(u.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 B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=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;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=n;o<a;
vendor: 14,534 bytes, line 23
23o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,r){return V(B(t,e.length-n),e,n,r)}function _(e,t,n,r){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return _(e,t,n,r)}function A(e,t,n,r){return V(q(t),e,n,r)}function E(e,t,n,r){return V(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.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}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):g.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new 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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=F(e[o]);return i}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function N(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function U(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||U(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||U(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},u.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<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:B(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function F(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>
vendor: 8,574 bytes, line 23
23-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(88),i=n(90);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=n(91);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!n&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?m.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(b);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,b=b.substr(_.length)}if(n||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===b.substr(0,2);!A||_&&v[_]||(b=b.substr(2),this.slashes=!0)}if(!v[_]&&(A||_&&!y[_])){for(var E,C,I=-1,O=0;O<d.length;O++){-1!==(T=b.indexOf(d[O]))&&(-1===I||T<I)&&(I=T)}-1!==(C=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(E=b.slice(0,C),b=b.slice(C+1),this.auth=decodeURIComponent(E)),I=-1;for(O=0;O<f.length;O++){var T;-1!==(T=b.indexOf(f[O]))&&(-1===I||T<I)&&(I=T)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var k=this.hostname.split(/\./),N=(O=0,k.length);O<N;O++){var M=k[O];if(M&&!M.match(h)){for(var R="",x=0,U=M.length;x<U;x++)M.charCodeAt(x)>127?R+="x":R+=M[x];if(!R.match(h)){var D=k.slice(0,O),j=k.slice(O+1),L=M.match(p);L&&(D.push(L[1]),j.unshift(L[2])),j.length&&(b="/"+j.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+F,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!g[S])for(O=0,N=l.length;O<N;O++){var q=l[O];if(-1!==b.indexOf(q)){var V=encodeURIComponent(q);V===q&&(V=escape(q)),b=b.split(q).join(V)}}var K=b.indexOf("#");-1!==K&&(this.hash=b.substr(K),b=b.slice(0,K));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=m.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var H=this.search||"";this.path=F+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var n=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(n[l]=e[l])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var h=f[d];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||v[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var g=n.pathname||"",m=n.search||"";n.path=g+m}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||n.host&&e.pathname,S=_,A=n.pathname&&n.pathname.split("/")||[],E=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===A[0]?A[0]=n.host:A.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===A[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(E)n.hostname=n.host=A.shift(),(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!A.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=A.slice(-1)[0],I=(n.host||e.host||A.length>1)&&("."===C||".."===C)||""===C,O=0,T=A.length;T>=0;T--)"."===(C=A[T])?A.splice(T,1):".."===C?(A.splice(T,1),O++):O&&(A.splice(T,1),O--);if(!_&&!S)for(;O--;O)A.unshift("..");!_||""===A[0]||A[0]&&"/"===A[0].charAt(0)||A.unshift(""),I&&"/"!==A.join("/").substr(-1)&&A.push("");var P,k=""===A[0]||A[0]&&"/"===A[0].charAt(0);E&&(n.hostname=n.host=k?"":A.length?A.shift():"",(P=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=P.shift(),n.host=n.hostname=P.shift()));return(_=_||n.host&&A.length)&&!k&&A.unshift(""),A.length?n.pathname=A.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"AmplifyClass",(function(){return r.b})),n.d(t,"ClientDevice",(function(){return u})),n.d(t,"ConsoleLogger",(function(){return o.a})),n.d(t,"Logger",(function(){return o.a})),n.d(t,"missingConfig",(function(){return c}
23)),n.d(t,"invalidParameter",(function(){return l})),n.d(t,"Hub",(function(){return f.a})),n.d(t,"I18n",(function(){return y})),n.d(t,"isEmpty",(function(){return m.e})),n.d(t,"sortByField",(function(){return m.k})),n.d(t,"objectLessAttributes",(function(){return m.j})),n.d(t,"filenameToContentType",(function(){return m.c})),n.d(t,"isTextFile",(function(){return m.g})),n.d(t,"generateRandomString",(function(){return m.d})),n.d(t,"makeQuerablePromise",(function(){return m.i})),n.d(t,"isWebWorker",(function(){return m.h})),n.d(t,"browserOrNode",(function(){return m.b})),n.d(t,"transferKeyToLowerCase",(function(){return m.l})),n.d(t,"transferKeyToUpperCase",(function(){return m.m})),n.d(t,"isStrictObject",(function(){return m.f})),n.d(t,"JS",(function(){return m.a})),n.d(t,"Signer",(function(){return b.a})),n.d(t,"parseMobileHubConfig",(function(){return w.b})),n.d(t,"Parser",(function(){return w.a})),n.d(t,"FacebookOAuth",(function(){return _.a})),n.d(t,"GoogleOAuth",(function(){return _.b})),n.d(t,"Linking",(function(){return A})),n.d(t,"AppState",(function(){return E})),n.d(t,"AsyncStorage",(function(){return C})),n.d(t,"Credentials",(function(){return I.a})),n.d(t,"CredentialsClass",(function(){return I.b})),n.d(t,"ServiceWorker",(function(){return O})),n.d(t,"StorageHelper",(function(){return S.b})),n.d(t,"MemoryStorage",(function(){return S.a})),n.d(t,"UniversalStorage",(function(){return T.a})),n.d(t,"Platform",(function(){return i.a})),n.d(t,"getAmplifyUserAgent",(function(){return i.b})),n.d(t,"INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",(function(){return P.a})),n.d(t,"INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",(function(){return P.b})),n.d(t,"USER_AGENT_HEADER",(function(){return P.c})),n.d(t,"Constants",(function(){return N})),n.d(t,"NonRetryableError",(function(){return k.c})),n.d(t,"retry",(function(){return k.f})),n.d(t,"jitteredExponentialRetry",(function(){return k.e})),n.d(t,"Mutex",(function(){return k.b})),n.d(t,"Reachability",(function(){return k.d})),n.d(t,"DateUtils",(function(){return k.a})),n.d(t,"urlSafeEncode",(function(){return k.h})),n.d(t,"urlSafeDecode",(function(){return k.g})),n.d(t,"Amplify",(function(){return r.a}));var r=n(7),i=n(12),o=n(14),s=new o.a("ClientDevice_Browser");function a(){return"undefined"==typeof window?{}:function(){if("undefined"==typeof window)return s.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return s.warn("No navigator object available to get browser client info"),{};var t=e.platform,n=e.product,r=e.vendor,i=e.userAgent,o=e.language,a=function(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var n=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var r=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var i=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var o=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var s=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);if(s)return{type:s[1],version:s[2]};return{type:"",version:""}}(i),u=(c=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()),c&&c[1]||"");var c;return{platform:t,make:n||r,model:a.type,version:a.version,appVersion:[a.type,a.version].join("/"),language:o,timezone:u}}()}var u=function(){function e(){}return e.clientInfo=function(){return a()},e.dimension=function(){return"undefined"==typeof window?(s.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}();function c(e){return new Error("Missing config value of "+e)}function l(e){return new Error("Invalid parameter value of "+e)}var f=n(40),d=new o.a("I18n"),h=function(){function e(e){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},e),this._lang=this._options.language,!this._lang&&"undefined"!=typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),d.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return void 0!==t?t:e;var n=this._lang,r=this.getByLanguage(e,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(e,n.split("-")[0])),r||(void 0!==t?t:e))},e.prototype.getByLanguage=function(e,t,n){if(void 0===n&&(n=null),!t)return n;var r=this._dict[t];return r?r[e]:n},e.prototype.putVocabulariesForLanguage=function(e,t){var n=this._dict[e];n||(n=this._dict[e]={}),Object.assign(n,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map((function(n){t.putVocabulariesForLanguage(n,e[n])}))},e}(),p=new o.a("I18n"),g=null,v=null,y=function(){function e(){}return e.configure=function(t){return p.debug("configure I18n"),t?(g=Object.assign({},g,t.I18n||t),e.createInstance(),g):g},e.getModuleName=function(){return"I18n"},e.createInstance=function(){p.debug("create I18n instance"),v||(v=new h(g))},e.setLanguage=function(t){return e.checkConfig(),v.setLanguage(t)},e.get=function(t,n){return e.checkConfig()?v.get(t,n):void 0===n?t:n},e.putVocabulariesForLanguage=function(t,n){return e.checkConfig(),v.putVocabulariesForLanguage(t,n)},e.putVocabularies=function(t){return e.checkConfig(),v.putVocabularies(t)},e.checkConfig=function(){return v||(v=new h(g)),!0},e}();r.a.register(y);var m=n(5),b=n(59),w=n(49),_=n(16),S=n(13),A={},E={addEventListener:function(e,t){}},C=Object(m.b)().isBrowser?(new S.b).getStorage():void 0,I=n(32),O=function(){function e(){this._logger=new o.a("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===e&&(e="/service-worker.js"),void 0===t&&(t="/"),this._logger.debug("registering "+e),this._logger.debug("registering service worker with scope "+t),new Promise((function(r,i){if(!navigator||!("serviceWorker"
23in navigator))return i(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then((function(e){return e.installing?n._serviceWorker=e.installing:e.waiting?n._serviceWorker=e.waiting:e.active&&(n._serviceWorker=e.active),n._registration=e,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+e),r(e)})).catch((function(e){return n._logger.debug("Service Worker Registration Failed "+e),i(e)}))}))},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise((function(n,r){if(!Object(m.b)().isBrowser)return r(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then((function(r){if(!r)return t._logger.debug("User is NOT subscribed to push"),t._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t._urlB64ToUint8Array(e)}).then((function(e){t._subscription=e,t._logger.debug("User subscribed: "+JSON.stringify(e)),n(e)})).catch((function(e){t._logger.error(e)}));t._subscription=r,t._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)}))}))},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"==typeof e?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",(function(t){var n=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+n),r.a.Analytics&&"function"==typeof r.a.Analytics.record&&r.a.Analytics.record({name:"ServiceWorker",attributes:{state:n}})})),this._serviceWorker.addEventListener("message",(function(t){e._logger.debug("ServiceWorker message event: "+t)}))},e}(),T=n(65),P=n(24),k=n(15),N={userAgent:i.a.userAgent};t.default=r.a},function(e,t,n){"use strict";n.r(t),n.d(t,"AuthenticationDetails",(function(){return r})),n.d(t,"AuthenticationHelper",(function(){return T})),n.d(t,"CognitoAccessToken",(function(){return N})),n.d(t,"CognitoIdToken",(function(){return R})),n.d(t,"CognitoRefreshToken",(function(){return x})),n.d(t,"CognitoUser",(function(){return G})),n.d(t,"CognitoUserAttribute",(function(){return q})),n.d(t,"CognitoUserPool",(function(){return re})),n.d(t,"CognitoUserSession",(function(){return j})),n.d(t,"CookieStorage",(function(){return oe})),n.d(t,"DateHelper",(function(){return B})),n.d(t,"appendToCognitoUserAgent",(function(){return J})),n.d(t,"WordArray",(function(){return h})); 24/*! 25 * Copyright 2016 Amazon.com, 26 * Inc. or its affiliates. All Rights Reserved. 27 * 28 * Licensed under the Amazon Software License (the "License"). 29 * You may not use this file except in compliance with the 30 * License. A copy of the License is located at 31 * 32 * http://aws.amazon.com/asl/ 33 * 34 * or in the "license" file accompanying this file. This file is 35 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 36 * CONDITIONS OF ANY KIND, express or implied. See the License 37 * for the specific language governing permissions and 38 * limitations under the License. 39 */ 40var r=function(){function e(e){var t=e||{},n=t.ValidationData,r=t.Username,i=t.Password,o=t.AuthParameters,s=t.ClientMetadata;this.validationData=n||{},this.authParameters=o||{},this.clientMetadata=s||{},this.username=r,this.password=i}var t=e.prototype;return t.getUsername=function(){return this.username},t.getPassword=function(){return this.password},t.getValidationData=function(){return this.validationData},t.getAuthParameters=function(){return this.authParameters},t.getClientMetadata=function(){return this.clientMetadata},e}(),i=n(1),o=n(6),s=n.n(o),a=(n(38),n(21)),u=n.n(a),c=n(17),l=n.n(c),f=n(67);var d,h=function(){function e(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length}var t=e.prototype;return t.random=function(t){for(var n=[],r=0;r<t;r+=4)n.push(Object(f.a)());return new e(n,t)},t.toString=function(){return function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")}(this)},e}(),p=g;function g(e,t){null!=e&&this.fromString(e,t)}function v(){return new g(null)}var y="undefined"!=typeof navigator;y&&"Microsoft Internet Explorer"==navigator.appName?(g.prototype.am=function(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=a*u+c*s;
vendor: 10,644 bytes, lines 40-57
40i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},d=30):y&&"Netscape"!=navigator.appName?(g.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},d=26):(g.prototype.am=function(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},d=28),g.prototype.DB=d,g.prototype.DM=(1<<d)-1,g.prototype.DV=1<<d;g.prototype.FV=Math.pow(2,52),g.prototype.F1=52-d,g.prototype.F2=2*d-52;var m,b,w=new Array;for(m="0".charCodeAt(0),b=0;b<=9;++b)w[m++]=b;for(m="a".charCodeAt(0),b=10;b<36;++b)w[m++]=b;for(m="A".charCodeAt(0),b=10;b<36;++b)w[m++]=b;function _(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function S(e,t){var n=w[e.charCodeAt(t)];return null==n?-1:n}function A(e){var t=v();return t.fromInt(e),t}function E(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function C(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t} 41/*! 42 * Copyright 2016 Amazon.com, 43 * Inc. or its affiliates. All Rights Reserved. 44 * 45 * Licensed under the Amazon Software License (the "License"). 46 * You may not use this file except in compliance with the 47 * License. A copy of the License is located at 48 * 49 * http://aws.amazon.com/asl/ 50 * 51 * or in the "license" file accompanying this file. This file is 52 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 53 * CONDITIONS OF ANY KIND, express or implied. See the License 54 * for the specific language governing permissions and 55 * limitations under the License. 56 */ 57function I(e){return i.Buffer.from((new h).random(e).toString(),"hex")}C.prototype.convert=function(e){var t=v();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(g.ZERO)>0&&this.m.subTo(t,t),t},C.prototype.revert=function(e){var t=v();return e.copyTo(t),this.reduce(t),t},C.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},C.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},C.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},g.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},g.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;--r>=0;){var s=S(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=n)>=this.DB&&(o-=this.DB))}this.clamp(),i&&g.ZERO.subTo(this,this)},g.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},g.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},g.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},g.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},g.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&o)<<i,t[s-n]=this[s]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},g.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},g.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&g.ZERO.subTo(t,t)},g.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},g.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=v());var o=v(),s=this.s,a=e.s,u=this.DB-E(r[r.t-1]);u>0?(r.lShiftTo(u,o),i.lShiftTo(u,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,l=o[c-1];if(0!=l){var f=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),d=this.FV/f,h=(1<<this.F1)/f,p=1<<this.F2,y=n.t,m=y-c,b=null==t?v():t;for(o.dlShiftTo(m,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),g.ONE.dlShiftTo(c,b),b.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--m>=0;){var w=n[--y]==l?this.DM:Math.floor(n[y]*d+(n[y-1]+p)*h);if((n[y]+=o.am(0,w,n,m,0,c))<w)for(o.dlShiftTo(m,b),n.subTo(b,n);n[y]<--w;)n.subTo(b,n)}null!=t&&(n.drShiftTo(c,t),s!=a&&g.ZERO.subTo(t,t)),n.t=c,n.clamp(),u>0&&n.rShiftTo(u,n),s<0&&g.ZERO.subTo(n,n)}}},g.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},g.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},g.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var n,r=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=_(n));s>=0;)a<t?(n=(this[s]&(1<<a)-1)<<t-a,n|=this[--s]>>(a+=this.DB-t)):(n=this[s]>>(a-=t)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=_(n));return i?o:"0"},g.prototype.negate=function(){var e=v();return g.ZERO.subTo(this,e),e},g.prototype.abs=function(){return this.s<0?this.negate():this},g.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},g.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+E(this[this.t-1]^this.s&this.DM)},g.prototype.mod=function(e){var t=v();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(g.ZERO)>0&&e.subTo(t,t),t},g.prototype.equals=function(e){return 0==this.compareTo(e)},g.prototype.add=function(e){var t=v();return this.addTo(e,t),t},g.prototype.subtract=function(e){var t=v();return this.subTo(e,t),t},g.prototype.multiply=function(e){var t=v();return this.multiplyTo(e,t),t},g.prototype.divide=function(e){var t=v();return this.divRemTo(e,t,null),t},g.prototype.modPow=function(e,t,n){var r,i=e.bitLength(),o=A(1),s=new C(t);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6;var a=new Array,u=3,c=r-1,l=(1<<r)-1;if(a[1]=s.convert(this),r>1){var f=v();for(s.sqrTo(a[1],f);u<=l;)a[u]=v(),s.mulTo(f,a[u-2],a[u]),u+=2}var d,h,p=e.t-1,g=!0,y=v();for(i=E(e[p])-1;p>=0;){for(i>=c?d=e[p]>>i-c&l:(d=(e[p]&(1<<i+1)-1)<<c-i,p>0&&(d|=e[p-1]>>this.DB+i-c)),u=r;0==(1&d);)d>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),g)a[d].copyTo(o),g=!1;else{for(;u>1;)s.sqrTo(o,y),s.sqrTo(y,o),u-=2;u>0?s.sqrTo(o,y):(h=o,o=y,y=h),s.mulTo(y,a[d],o)}for(;p>=0&&0==(e[p]&1<<i);)s.sqrTo(o,y),h=o,o=y,y=h,--i<0&&(i=this.DB-1,--p)}var m=s.revert(o);return n(null,m),m},g.ZERO=A(0),g.ONE=A(1);var O=/^[89a-f]/i,T=function(){function e(e){this.N=new p("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new p("2",16),this.k=new p(this.hexHash(""+this.padHex(this.N)+this.padHex(this.g)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue((function(){})),this.infoBits=i.Buffer.from("Caldera Derived Key","utf8"),this.poolName=e}var t=e.prototype;return t.getSmallAValue=function(){return this.smallAValue},t.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,(function(n,r){n&&e(n,null),t.largeAValue=r,e(null,t.largeAValue)}))},t.generateRandomSmallA=function(){var e=I(128).toString("hex");return new p(e,16)},t.generateRandomString=function(){return I(40).toString("base64")},t.getRandomPassword=function(){return this.randomPassword},t.getSaltDevices=function(){return this.SaltToHashDevices},t.getVerifierDevices=function(){return this.verifierDevices},t.generateHashDevice=function(e,t,n){var r=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),s=I(16).toString("hex");this.SaltToHashDevices=this.padHex(new p(s,16)),this.g.modPow(new p(this.hexHash(this.SaltToHashDevices+o),16),this.N,(function(e,t){e&&n(e,null),r.verifierDevices=r.padHex(t),n(null,null)}))},t.calculateA=function(e,t){var n=this;this.g.modPow(e,this.N,(function(e,r){e&&t(e,null),r.mod(n.N).equals(p.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,r)}
57))},t.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new p(this.UHexHash,16)},t.hash=function(e){var t=e instanceof i.Buffer?s.a.lib.WordArray.create(e):e,n=u()(t).toString();return new Array(64-n.length).join("0")+n},t.hexHash=function(e){return this.hash(i.Buffer.from(e,"hex"))},t.computehkdf=function(e,t){var n=s.a.lib.WordArray.create(i.Buffer.concat([this.infoBits,i.Buffer.from(String.fromCharCode(1),"utf8")])),r=e instanceof i.Buffer?s.a.lib.WordArray.create(e):e,o=t instanceof i.Buffer?s.a.lib.WordArray.create(t):t,a=l()(r,o),u=l()(n,a);return i.Buffer.from(u.toString(),"hex").slice(0,16)},t.getPasswordAuthenticationKey=function(e,t,n,r,o){var s=this;if(n.mod(this.N).equals(p.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,n),this.UValue.equals(p.ZERO))throw new Error("U cannot be zero.");var a=""+this.poolName+e+":"+t,u=this.hash(a),c=new p(this.hexHash(this.padHex(r)+u),16);this.calculateS(c,n,(function(e,t){e&&o(e,null);var n=s.computehkdf(i.Buffer.from(s.padHex(t),"hex"),i.Buffer.from(s.padHex(s.UValue),"hex"));o(null,n)}))},t.calculateS=function(e,t,n){var r=this;this.g.modPow(e,this.N,(function(i,o){i&&n(i,null),t.subtract(r.k.multiply(o)).modPow(r.smallAValue.add(r.UValue.multiply(e)),r.N,(function(e,t){e&&n(e,null),n(null,t.mod(r.N))}))}))},t.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},t.padHex=function(e){if(!(e instanceof p))throw new Error("Not a BigInteger");var t=e.compareTo(p.ZERO)<0,n=e.abs().toString(16);if(n=n.length%2!=0?"0"+n:n,n=O.test(n)?"00"+n:n,t){var r=n.split("").map((function(e){var t=15&~parseInt(e,16);return"0123456789ABCDEF".charAt(t)})).join("");(n=new p(r,16).add(p.ONE).toString(16)).toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},e}(),P=function(){function e(e){this.jwtToken=e||"",this.payload=this.decodePayload()}var t=e.prototype;return t.getJwtToken=function(){return this.jwtToken},t.getExpiration=function(){return this.payload.exp},t.getIssuedAt=function(){return this.payload.iat},t.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(i.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var N=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).AccessToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,k(t,n),r}(P);function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)} 58/*! 59 * Copyright 2016 Amazon.com, 60 * Inc. or its affiliates. All Rights Reserved. 61 * 62 * Licensed under the Amazon Software License (the "License"). 63 * You may not use this file except in compliance with the 64 * License. A copy of the License is located at 65 * 66 * http://aws.amazon.com/asl/ 67 * 68 * or in the "license" file accompanying this file. This file is 69 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 70 * CONDITIONS OF ANY KIND, express or implied. See the License 71 * for the specific language governing permissions and 72 * limitations under the License. 73 */var R=function(e){var t,n;function r(t){var n=(void 0===t?{}:t).IdToken;return e.call(this,n||"")||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n),r}(P),x=function(){function e(e){var t=(void 0===e?{}:e).RefreshToken;this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),U=n(22),D=n.n(U),j=function(){function e(e){var t=void 0===e?{}:e,n=t.IdToken,r=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(null==i||null==n)throw new Error("Id token and Access Token must be present.");this.idToken=n,this.refreshToken=r,this.accessToken=i,this.clockDrift=void 0===o?this.calculateClockDrift():o}var t=e.prototype;return t.getIdToken=function(){return this.idToken},t.getRefreshToken=function(){return this.refreshToken},t.getAccessToken=function(){return this.accessToken},t.getClockDrift=function(){return this.clockDrift},t.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},t.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(),L=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],F=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],B=function(){function e(){}return e.prototype.getNowString=function(){var e=new Date,t=F[e.getUTCDay()],n=L[e.getUTCMonth()],r=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var s=e.getUTCSeconds();return s<10&&(s="0"+s),t+" "+n+" "+r+" "+i+":"+o+":"+s+" UTC "+e.getUTCFullYear()},e}(),q=function(){function e(e){var t=void 0===e?{}:e,n=t.Name,r=t.Value;this.Name=n||"",this.Value=r||""}var t=e.prototype;return t.getValue=function(){return this.Value},t.setValue=function(e){return this.Value=e,this},t.getName=function(){return this.Name},t.setName=function(e){return this.Name=e,this},t.toString=function(){return JSON.stringify(this)},t.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}(),V={},K=function(){function e(){}return e.setItem=function(e,t){return V[e]=t,V[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(V,e)?V[e]:void 0},e.removeItem=function(e){return delete V[e]},e.clear=function(){return V={}},e}(),z=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=K}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),H="undefined"!=typeof navigator?navigator.userAgent:"nodejs",G=function(){function e(e){if(null==e||null==e.Username||null==e.Pool)throw new Error("Username and Pool information are required.");this.username=e.Username||"",this.pool=e.Pool,this.Session=null,this.client=e.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=e.Storage||(new z).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}var t=e.prototype;return t.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},t.getSignInUserSession=function(){return this.signInUserSession},t.getUsername=function(){return this.username},t.getAuthenticationFlowType=function(){return this.authenticationFlowType},t.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},t.initiateAuth=function(e,t){var n=this,r=e.getAuthParameters();r.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,(function(e,r){if(e)return t.onFailure(e);var i=r.ChallengeName,o=r.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(n.Session=r.Session,t.customChallenge(o)):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),t.onSuccess(n.signInUserSession))}))},t.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invali
73d."))},t.authenticateUserDefaultAuth=function(e,t){var n,r,o=this,a=new T(this.pool.getUserPoolId().split("_")[1]),u=new B,c={};null!=this.deviceKey&&(c.DEVICE_KEY=this.deviceKey),c.USERNAME=this.username,a.getLargeAValue((function(f,d){f&&t.onFailure(f),c.SRP_A=d.toString(16),"CUSTOM_AUTH"===o.authenticationFlowType&&(c.CHALLENGE_NAME="SRP_A");var h=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),g={AuthFlow:o.authenticationFlowType,ClientId:o.pool.getClientId(),AuthParameters:c,ClientMetadata:h};o.getUserContextData(o.username)&&(g.UserContextData=o.getUserContextData(o.username)),o.client.request("InitiateAuth",g,(function(c,f){if(c)return t.onFailure(c);var d=f.ChallengeParameters;o.username=d.USER_ID_FOR_SRP,o.userDataKey=o.keyPrefix+"."+o.username+".userData",n=new p(d.SRP_B,16),r=new p(d.SALT,16),o.getCachedDeviceKeyAndPassword(),a.getPasswordAuthenticationKey(o.username,e.getPassword(),n,r,(function(e,n){e&&t.onFailure(e);var r=u.getNowString(),c=s.a.lib.WordArray.create(i.Buffer.concat([i.Buffer.from(o.pool.getUserPoolId().split("_")[1],"utf8"),i.Buffer.from(o.username,"utf8"),i.Buffer.from(d.SECRET_BLOCK,"base64"),i.Buffer.from(r,"utf8")])),p=s.a.lib.WordArray.create(n),g=D.a.stringify(l()(c,p)),v={};v.USERNAME=o.username,v.PASSWORD_CLAIM_SECRET_BLOCK=d.SECRET_BLOCK,v.TIMESTAMP=r,v.PASSWORD_CLAIM_SIGNATURE=g,null!=o.deviceKey&&(v.DEVICE_KEY=o.deviceKey);var y={ChallengeName:"PASSWORD_VERIFIER",ClientId:o.pool.getClientId(),ChallengeResponses:v,Session:f.Session,ClientMetadata:h};o.getUserContextData()&&(y.UserContextData=o.getUserContextData()),function e(t,n){return o.client.request("RespondToAuthChallenge",t,(function(r,i){return r&&"ResourceNotFoundException"===r.code&&-1!==r.message.toLowerCase().indexOf("device")?(v.DEVICE_KEY=null,o.deviceKey=null,o.randomPassword=null,o.deviceGroupKey=null,o.clearCachedDeviceKeyAndPassword(),e(t,n)):n(r,i)}))}(y,(function(e,n){return e?t.onFailure(e):o.authenticateUserInternal(n,a,t)}))}))}))}))},t.authenticateUserPlainUsernamePassword=function(e,t){var n=this,r={};if(r.USERNAME=this.username,r.PASSWORD=e.getPassword(),r.PASSWORD){var i=new T(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),s={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:o};this.getUserContextData(this.username)&&(s.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",s,(function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,i,t)}))}else t.onFailure(new Error("PASSWORD parameter is required"))},t.authenticateUserInternal=function(e,t,n){var r=this,o=e.ChallengeName,s=e.ChallengeParameters;if("SMS_MFA"===o)return this.Session=e.Session,n.mfaRequired(o,s);if("SELECT_MFA_TYPE"===o)return this.Session=e.Session,n.selectMFAType(o,s);if("MFA_SETUP"===o)return this.Session=e.Session,n.mfaSetup(o,s);if("SOFTWARE_TOKEN_MFA"===o)return this.Session=e.Session,n.totpRequired(o,s);if("CUSTOM_CHALLENGE"===o)return this.Session=e.Session,n.customChallenge(s);if("NEW_PASSWORD_REQUIRED"===o){this.Session=e.Session;var a=null,u=null,c=[],l=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(s&&(a=JSON.parse(e.ChallengeParameters.userAttributes),u=JSON.parse(e.ChallengeParameters.requiredAttributes)),u)for(var f=0;f<u.length;f++)c[f]=u[f].substr(l.length);return n.newPasswordRequired(a,c)}if("DEVICE_SRP_AUTH"!==o){this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=o,this.cacheTokens();var d=e.AuthenticationResult.NewDeviceMetadata;if(null==d)return n.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(o){if(o)return n.onFailure(o);var s={Salt:i.Buffer.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:i.Buffer.from(t.getVerifierDevices(),"hex").toString("base64")};r.verifierDevices=s.PasswordVerifier,r.deviceGroupKey=d.DeviceGroupKey,r.randomPassword=t.getRandomPassword(),r.client.request("ConfirmDevice",{DeviceKey:d.DeviceKey,AccessToken:r.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:s,DeviceName:H},(function(t,i){return t?n.onFailure(t):(r.deviceKey=e.AuthenticationResult.
73NewDeviceMetadata.DeviceKey,r.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?n.onSuccess(r.signInUserSession,i.UserConfirmationNecessary):n.onSuccess(r.signInUserSession))}))}))}else this.getDeviceResponse(n)},t.completeNewPasswordChallenge=function(e,t,n,r){var i=this;if(!e)return n.onFailure(new Error("New password is required."));var o=new T(this.pool.getUserPoolId().split("_")[1]),s=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach((function(e){a[s+e]=t[e]})),a.NEW_PASSWORD=e,a.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,t){return e?n.onFailure(e):i.authenticateUserInternal(t,o,n)}))},t.getDeviceResponse=function(e,t){var n=this,r=new T(this.deviceGroupKey),o=new B,a={};a.USERNAME=this.username,a.DEVICE_KEY=this.deviceKey,r.getLargeAValue((function(u,c){u&&e.onFailure(u),a.SRP_A=c.toString(16);var f={ChallengeName:"DEVICE_SRP_AUTH",ClientId:n.pool.getClientId(),ChallengeResponses:a,ClientMetadata:t};n.getUserContextData()&&(f.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",f,(function(t,a){if(t)return e.onFailure(t);var u=a.ChallengeParameters,c=new p(u.SRP_B,16),f=new p(u.SALT,16);r.getPasswordAuthenticationKey(n.deviceKey,n.randomPassword,c,f,(function(t,r){if(t)return e.onFailure(t);var c=o.getNowString(),f=s.a.lib.WordArray.create(i.Buffer.concat([i.Buffer.from(n.deviceGroupKey,"utf8"),i.Buffer.from(n.deviceKey,"utf8"),i.Buffer.from(u.SECRET_BLOCK,"base64"),i.Buffer.from(c,"utf8")])),d=s.a.lib.WordArray.create(r),h=D.a.stringify(l()(f,d)),p={};p.USERNAME=n.username,p.PASSWORD_CLAIM_SECRET_BLOCK=u.SECRET_BLOCK,p.TIMESTAMP=c,p.PASSWORD_CLAIM_SIGNATURE=h,p.DEVICE_KEY=n.deviceKey;var g={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:n.pool.getClientId(),ChallengeResponses:p,Session:a.Session};n.getUserContextData()&&(g.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",g,(function(t,r){return t?e.onFailure(t):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),e.onSuccess(n.signInUserSession))}))}))}))}))},t.confirmRegistration=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.sendCustomChallengeAnswer=function(e,t,n){var r=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new T(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,(function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,o,t)}))},t.sendMFACode=function(e,t,n,r){var o=this,s={};s.USERNAME=this.username,s.SMS_MFA_CODE=e;var a=n||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===a&&(s.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(s.DEVICE_KEY=this.deviceKey);var u={ChallengeName:a,ChallengeResponses:s,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,n){if(e)return t.onFailure(e);
vendor: 4,145 bytes, line 73
73if("DEVICE_SRP_AUTH"!==n.ChallengeName){if(o.signInUserSession=o.getCognitoUserSession(n.AuthenticationResult),o.cacheTokens(),null==n.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(o.signInUserSession);var r=new T(o.pool.getUserPoolId().split("_")[1]);r.generateHashDevice(n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,n.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(e){if(e)return t.onFailure(e);var s={Salt:i.Buffer.from(r.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:i.Buffer.from(r.getVerifierDevices(),"hex").toString("base64")};o.verifierDevices=s.PasswordVerifier,o.deviceGroupKey=n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,o.randomPassword=r.getRandomPassword(),o.client.request("ConfirmDevice",{DeviceKey:n.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:o.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:s,DeviceName:H},(function(e,r){return e?t.onFailure(e):(o.deviceKey=n.AuthenticationResult.NewDeviceMetadata.DeviceKey,o.cacheDeviceKeyAndPassword(),!0===r.UserConfirmationNecessary?t.onSuccess(o.signInUserSession,r.UserConfirmationNecessary):t.onSuccess(o.signInUserSession))}))}))}else o.getDeviceResponse(t)}))},t.changePassword=function(e,t,n,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.setUserMfaPreference=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n(e,null):n(null,"SUCCESS")}))},t.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},t.deleteUser=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},(function(t){return t?e(t,null):(n.clearCachedUser(),e(null,"SUCCESS"))}))},t.updateAttributes=function(e,t,n){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:n},(function(e){return e?t(e,null):r.getUserData((function(){return t(null,"SUCCESS")}),{bypassCache:!0})}))},t.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){if(t)return e(t,null);for(var r=[],i=0;i<n.UserAttributes.length;i++){var o={Name:n.UserAttributes[i].Name,Value:n.UserAttributes[i].Value},s=new q(o);r.push(s)}return e(null,r)}))},t.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()}
73,(function(t,n){return t?e(t,null):e(null,n.MFAOptions)}))},t.createGetUserRequest=function(){return this.client.promisifyRequest("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()})},t.refreshSessionIfPossible=function(e){var t=this;return void 0===e&&(e={}),new Promise((function(n){var r=t.signInUserSession.getRefreshToken();r&&r.getToken()?t.refreshSession(r,n,e.clientMetadata):n()}))},t.getUserData=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var r=this.getUserDataFromCache();if(r)if(this.isFetchUserDataAndTokenRequired(t))this.fetchUserData().then((function(e){return n.refreshSessionIfPossible(t).then((function(){return e}))})).then((function(t){return e(null,t)})).catch(e);else try{return void e(null,JSON.parse(r))}catch(t){return this.clearCachedUserData(),void e(t,null)}else this.fetchUserData().then((function(t){e(null,t)})).catch(e)},t.getUserDataFromCache=function(){return this.storage.getItem(this.userDataKey)},t.isFetchUserDataAndTokenRequired=function(e){var t=(e||{}).bypassCache;return void 0!==t&&t},t.fetchUserData=function(){var e=this;return this.createGetUserRequest().then((function(t){return e.cacheUserData(t),t}))},t.deleteAttributes=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?t(e,null):t(null,"SUCCESS")}))},t.resendConfirmationCode=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",n,(function(t,n){return t?e(t,null):e(null,n)}))},t.getSession=function(e,t){if(void 0===t&&(t={}),null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var n="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,r=n+".idToken",i=n+".accessToken",o=n+".refreshToken",s=n+".clockDrift";if(this.storage.getItem(r)){var a=new R({IdToken:this.storage.getItem(r)}),u=new N({AccessToken:this.storage.getItem(i)}),c=new x({RefreshToken:this.storage.getItem(o)}),l=parseInt(this.storage.getItem(s),0)||0,f=new j({IdToken:a,AccessToken:u,RefreshToken:c,ClockDrift:l});if(f.isValid())return this.signInUserSession=f,e(null,this.signInUserSession);if(!c.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(c,e,t.clientMetadata)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},t.refreshSession=function(e,t,n){var r=this,i=this.pool.wrapRefreshSessionCallback?this.pool.wrapRefreshSessionCallback(t):t,o={};o.REFRESH_TOKEN=e.getToken();var s="CognitoIdentityServiceProvider."+this.pool.getClientId(),a=s+".LastAuthUser";if(this.storage.getItem(a)){this.username=this.storage.getItem(a);var u=s+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(u),o.DEVICE_KEY=this.deviceKey}var c={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:o,ClientMetadata:n};this.getUserContextData()&&(c.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",c,(function(t,n){if(t)return"NotAuthorizedException"===t.code&&r.clearCachedUser(),i(t,null);if(n){var o=n.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),r.signInUserSession=r.getCognitoUserSession(o),r.cacheTokens(),i(null,r.signInUserSession)}}))},t.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},t.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},t.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},t.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()}
73,t.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(n,this.randomPassword),this.storage.setItem(r,this.deviceGroupKey)},t.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(n),this.deviceGroupKey=this.storage.getItem(r))},t.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r)},t.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r),this.storage.removeItem(i),this.storage.removeItem(o)},t.getCognitoUserSession=function(e){var t=new R(e),n=new N(e),r=new x(e);return new j({IdToken:t,AccessToken:n,RefreshToken:r})},t.forgotPassword=function(e,t){var n={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(n.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",n,(function(t,n){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(n):e.onSuccess(n)}))},t.confirmPassword=function(e,t,n,r){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:r};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,(function(e){return e?n.onFailure(e):n.onSuccess()}))},t.getAttributeVerificationCode=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},(function(e,n){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(n):t.onSuccess()}))},t.verifyAttribute=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?n.onFailure(e):n.onSuccess("SUCCESS")}))},t.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},(function(t,n){return t?e.onFailure(t):e.onSuccess(n)}))},t.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},(function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")}))},t.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(n){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(n)}})},t.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},t.listDevices=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));var r={AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e};t&&(r.PaginationToken=t),this.client.request("ListDevices",r,(function(e,t){return e?n.onFailure(e):n.onSuccess(t)}))},t.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(n){return n?e.onFailure(n):(t.clearCachedUser(),e.onSuccess("SUCCESS"))}))},t.signOut=function(){this.signInUserSession=null,this.clearCachedUser()},t.sendMFASelectionAnswer=function(e,t){var n=this,r={};
73r.USERNAME=this.username,r.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,(function(r,i){return r?t.onFailure(r):(n.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.ChallengeName,i.ChallengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.ChallengeName,i.ChallengeParameters):void 0)}))},t.getUserContextData=function(){return this.pool.getUserContextData(this.username)},t.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){return t?e.onFailure(t):e.associateSecretCode(n.SecretCode)})):this.client.request("AssociateSoftwareToken",{Session:this.Session},(function(n,r){return n?e.onFailure(n):(t.Session=r.Session,e.associateSecretCode(r.SecretCode))}))},t.verifySoftwareToken=function(e,t,n){var r=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},(function(e,t){return e?n.onFailure(e):n.onSuccess(t)})):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},(function(e,t){if(e)return n.onFailure(e);r.Session=t.Session;var i={};i.USERNAME=r.username;var o={ChallengeName:"MFA_SETUP",ClientId:r.pool.getClientId(),ChallengeResponses:i,Session:r.Session};r.getUserContextData()&&(o.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",o,(function(e,t){return e?n.onFailure(e):(r.signInUserSession=r.getCognitoUserSession(t.AuthenticationResult),r.cacheTokens(),n.onSuccess(r.signInUserSession))}))}))},e}(); 74/*! 75 * Copyright 2016 Amazon.com, 76 * Inc. or its affiliates. All Rights Reserved. 77 * 78 * Licensed under the Amazon Software License (the "License"). 79 * You may not use this file except in compliance with the 80 * License. A copy of the License is located at 81 * 82 * http://aws.amazon.com/asl/ 83 * 84 * or in the "license" file accompanying this file. This file is 85 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 86 * CONDITIONS OF ANY KIND, express or implied. See the License 87 * for the specific language governing permissions and 88 * limitations under the License. 89 */n(87);function W(){}W.prototype.userAgent="aws-amplify/0.1.x js";var J=function(e){e&&(W.prototype.userAgent&&!W.prototype.userAgent.includes(e)&&(W.prototype.userAgent=W.prototype.userAgent.concat(" ",e)),W.prototype.userAgent&&""!==W.prototype.userAgent||(W.prototype.userAgent=e))},Y=W;function $(e){var t="function"==typeof Map?new Map:void 0;return($=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Q(e,arguments,ee(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),X(r,e)})(e)}function Q(e,t,n){return(Q=Z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&X(i,n.prototype),i}).apply(null,arguments)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){var t,n;function r(t,n,r,i){var o;return(o=e.call(this,t)||this).code=n,o.name=r,o.statusCode=i,o}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,X(t,n),r}($(Error)),ne=function(){function e(e,t,n){this.endpoint=t||"https://cognito-idp."+e+".amazonaws.com/";var r=(n||{}).credentials;this.fetchOptions=r?{credentials:r}:{}}var t=e.prototype;return t.promisifyRequest=function(e,t){var n=this;return new Promise((function(r,i){n.request(e,t,(function(e,t){e?i(new te(e.message,e.code,e.name,e.statusCode)):r(t)}))}
89))},t.request=function(e,t,n){var r,i={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":Y.prototype.userAgent},o=Object.assign({},this.fetchOptions,{headers:i,method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t)});fetch(this.endpoint,o).then((function(e){return r=e,e}),(function(e){if(e instanceof TypeError)throw new Error("Network error");throw e})).then((function(e){return e.json().catch((function(){return{}}))})).then((function(e){if(r.ok)return n(null,e);e;var t=(e.__type||e.code).split("#").pop(),i={code:t,name:t,message:e.message||e.Message||null};return n(i)})).catch((function(e){if(!(r&&r.headers&&r.headers.get("x-amzn-errortype"))){if(e instanceof Error&&"Network error"===e.message){var t={code:"NetworkError",name:e.name,message:e.message};return n(t)}return n(e)}try{var i=r.headers.get("x-amzn-errortype").split(":")[0],o={code:i,name:i,statusCode:r.status,message:r.status?r.status.toString():null};return n(o)}catch(t){return n(e)}}))},e}(),re=function(){function e(e,t){var n=e||{},r=n.UserPoolId,i=n.ClientId,o=n.endpoint,s=n.fetchOptions,a=n.AdvancedSecurityDataCollectionFlag;if(!r||!i)throw new Error("Both UserPoolId and ClientId are required.");if(!/^[\w-]+_.+$/.test(r))throw new Error("Invalid UserPoolId format.");var u=r.split("_")[0];this.userPoolId=r,this.clientId=i,this.client=new ne(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new z).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,n,r,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,(function(t,n){if(t)return i(t,null);var r={Username:e,Pool:s,Storage:s.storage},o={user:new G(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new G(n)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}(),ie=n(19),oe=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var n={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(n.sameSite=this.sameSite),ie.set(e,t,n),ie.get(e)},t.getItem=function(e){return ie.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),ie.remove(e,t)},t.clear=function(){for(var e=ie.get(),t=Object.keys(e).length,n=0;n<t;++n)this.removeItem(Object.keys(e)[n]);return{}},e}()},function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return i})),n.d(t,"k",(function(){return o})),n.d(t,"j",(function(){return s})),n.d(t,"c",(function(){return a})),n.d(t,"g",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return p})),n.d(t,"f",(function(){return g})),n.d(t,"a",(function(){return v}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],i=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var i=e[t],o=n[t];return void 0===o?void 0===i?0:1*r:void 0===i||i<o?-1*r:i>o?1*r:0})),!0},s=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},a=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),i=r.filter((function(e){return n.endsWith("."+e.ext)}));return i.length>0?i[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},l=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},f=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},h=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=n.includes(i)?e[i]:h(e[i],t,n)}return r},p=function(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),!g(e))return e;var r={};for(var i in e){if(e.hasOwnProperty(i))r[t.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=n.includes(i)?e[i]:p(e[i],t,n)}return r},g=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},v=function(){function e(){}return e.isEmpty=i,e.sortByField=o,e.objectLessAttributes=s,e.filenameToContentType=a,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=l,e.isWebWorker=f,e.browserOrNode=d,e.transferKeyToLowerCase=h,e.transferKeyToUpperCase=p,e.isStrictObject=g,e}()}).call(this,n(28))},function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(84)}catch(e){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},u=a.lib={},c=u.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.a
89pply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),f=a.enc={},d=f.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},h=f.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},p=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},g=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*u,o);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(i,f);n=i.splice(0,u),r.sigBytes-=c}return new l.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(u.Hasher=g.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new v.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),r)}).call(this,n(20))},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var r=n(14),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=new r.a("Amplify"),s=function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Logger=r.a,this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEac
89h((function(e){var n=i(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}(),a=new s},function(e,t,n){"use strict";var r=n(51),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(72),i=n.n(r).a;t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));for(var r={},i={},o=0;o<256;o++){var s=o.toString(16).toLowerCase();1===s.length&&(s="0"+s),r[o]=s,i[s]=o}function a(e){for(var t="",n=0;n<e.byteLength;n++)t+=r[e[n]];return t}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r={userAgent:"aws-amplify/3.8.23 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(r.product=navigator.product||"",r.navigator=navigator||null,navigator.product){case"ReactNative":r.userAgent="aws-amplify/3.8.23 react-native",r.isReactNative=!0;break;default:r.userAgent="aws-amplify/3.8.23 js",r.isReactNative=!1}var i=function(){return r.userAgent}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r={},i=function(){function e(){}return e.setItem=function(e,t){return r[e]=t,r[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},e.removeItem=function(e){return delete r[e]},e.clear=function(){return r={}},e}(),o=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=i}}return e.prototype.getStorage=function(){return this.storageWindow},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},o={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},s=function(){function e(e,t){void 0===t&&(t="WARN"),this.name=e,this.level=t}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype._log=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.level;e.LOG_LEVEL&&(i=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(i=window.LOG_LEVEL);var s=o[i],a=o[t];if(a>=s){var u=console.log.bind(console);"ERROR"===t&&console.error&&(u=console.error.bind(console)),"WARN"===t&&console.warn&&(u=console.warn.bind(console));var c="["+t+"] "+this._ts()+" "+this.name;if(1===n.length&&"string"==typeof n[0])u(c+" - "+n[0]);else if(1===n.length)u(c,n[0]);else if("string"==typeof n[0]){var l=n.slice(1);1===l.length&&(l=l[0]),u(c+" - "+n[0],l)}else u(c,n)}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["WARN"],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["ERROR"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["DEBUG"],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["VERBOSE"],e))},e.LOG_LEVEL=null,e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return r.a})),n.d(t,"f",(function(){return r.c})),n.d(t,"e",(function(){return r.b})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return c.a})),n.d(t,"h",(function(){return l.b})),n.d(t,"g",(function(){return l.a}));var r=n(41),i=function(){function e(){this._queue=[],this._pending=!1}return e.prototype.isLocked=function(){return this._pending},e.prototype.acquire=function(){var e=this,t=new Promise((function(t){return e._queue.push(t)}));
89return this._pending||this._dispatchNext(),t},e.prototype.runExclusive=function(e){return this.acquire().then((function(t){var n;try{n=e()}catch(e){throw t(),e}return Promise.resolve(n).then((function(e){return t(),e}),(function(e){throw t(),e}))}))},e.prototype._dispatchNext=function(){this._queue.length>0?(this._pending=!0,this._queue.shift()(this._dispatchNext.bind(this))):this._pending=!1},e}(),o=n(5),s=n(9),a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(){function e(){}return e.prototype.networkMonitor=function(t){if(Object(o.b)().isNode)return s.a.from([{online:!0}]);var n=Object(o.h)()?self:window;return new s.a((function(t){t.next({online:n.navigator.onLine});var r=function(){return t.next({online:!0})},i=function(){return t.next({online:!1})};return n.addEventListener("online",r),n.addEventListener("offline",i),e._observers.push(t),function(){n.removeEventListener("online",r),n.removeEventListener("offline",i),e._observers=e._observers.filter((function(e){return e!==t}))}}))},e._observerOverride=function(t){var n,r,i=function(n){if(n.closed)return e._observers=e._observers.filter((function(e){return e!==n})),"continue";n.next(t)};try{for(var o=a(e._observers),s=o.next();!s.done;s=o.next()){i(s.value)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e._observers=[],e}(),c=n(25),l=n(50); 90/*! 91 * The MIT License (MIT) 92 * 93 * Copyright (c) 2016 Christian Speckner <[email protected]> 94 * 95 * Permission is hereby granted, free of charge, to any person obtaining a copy 96 * of this software and associated documentation files (the "Software"), to deal 97 * in the Software without restriction, including without limitation the rights 98 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 99 * copies of the Software, and to permit persons to whom the Software is 100 * furnished to do so, subject to the following conditions: 101 * 102 * The above copyright notice and this permission notice shall be included in 103 * all copies or substantial portions of the Software. 104 * 105 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 106 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 107 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 108 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 109 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 110 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 111 * THE SOFTWARE. 112 */},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return y}));var r=n(14),i=n(5),o=n(41),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=new r.a("CognitoCredentials"),c=new Promise((function(e,t){return Object(i.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(u.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(u.debug("not in the browser, directly resolved"),e())})),l=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(u.debug("need to wait for the Google SDK loaded"),[4,c]);case 1:e.sent(),this.initialized=!0,u.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(i.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(u.debug("google Auth undefined"),n(new o.a("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(u.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new o.a("Failed to reload google auth response"))}))):n(new o.a("User is not signed in with Google"))})).catch((function(e){u.debug("Failed to refresh google token",e),n(new o.a("Failed to refresh google token"))}))})):(u.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}
112(),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},h=new r.a("CognitoCredentials"),p=new Promise((function(e,t){return Object(i.b)().isBrowser?window.FB?(h.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(h.debug("not in the browser, directly resolved"),e())})),g=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(h.debug("need to wait for the Facebook SDK loaded"),[4,p]);case 1:e.sent(),this.initialized=!0,h.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(i.b)().isBrowser&&(e=window.FB),!e){return h.debug("no fb sdk available"),Promise.reject(new o.a("no fb sdk available"))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,s=1e3*r.expiresIn+(new Date).getTime();if(!i){a="the jwtToken is undefined";h.debug(a),n(new o.a(a))}t({token:i,expires_at:s})}else{var a="no response from facebook when refreshing the jwt token";h.debug(a),n(new o.a(a))}}),{scope:"public_profile,email"})}))},e}(),v=new l,y=new g},function(e,t,n){var r;e.exports=(r=n(6),n(21),n(85),r.HmacSHA256)},function(e,t,n){"use strict"; 113/*! 114 * cookie 115 * Copyright(c) 2012-2014 Roman Shtylman 116 * Copyright(c) 2015 Douglas Christopher Wilson 117 * MIT Licensed 118 */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},i=t||{},s=e.split(o),u=i.decode||r,c=0;c<s.length;c++){var l=s[c],f=l.indexOf("=");if(!(f<0)){var d=l.substr(0,f).trim(),h=l.substr(++f,l.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),null==n[d]&&(n[d]=a(h,u))}}return n},t.serialize=function(e,t,n){var r=n||{},o=r.encode||i;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!s.test(e))throw new TypeError("argument name is invalid");var a=o(t);if(a&&!s.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!s.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!s.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invali
118d");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,i=encodeURIComponent,o=/; */,s=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function a(e,t){try{return t(e)}catch(t){return e}}},function(e,t,n){var r,i; 119/*! 120 * JavaScript Cookie v2.2.1 121 * https://github.com/js-cookie/js-cookie 122 * 123 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 124 * Released under the MIT license 125 */!function(o){if(void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i),!0,e.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2}
125)+/g,decodeURIComponent)}return function n(r){function i(){}function o(t,n,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+n+a}}function s(e,n){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(a[0]);if(u=(r.read||r)(u,c)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(i[c]=u,e===c)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,n){o(t,"",e(n,{expires:-1}))},i.defaults={},i.withConverter=n,i}((function(){}))}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r;e.exports=(r=n(6),function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,s=t.algo,a=[],u=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(a[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++}();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],f=n[6],d=n[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var p=c[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=c[h-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;c[h]=g+c[h-7]+y+c[h-16]}var m=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&l^~a&f)+u[h]+c[h];d=f,f=l,l=a,a=s+w|0,s=o,o=i,i=r,r=w+(b+m)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(l),t.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},function(e,t,n){var r,i,o;e.exports=(o=n(6),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o<n.length;o++)r[n.charCodeAt(o)]=o}var s=n.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return function(e,t,n){for(var r=[],o=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2,u=n[e.charCodeAt(s)]>>>6-s%4*2,c=a|u;r[o>>>2]|=c<<24-o%4*8,o++}return i.create(r,o)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},function(e,t,n){e.exports=n(113)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s}));var r="undefined"!=typeof Symbol&&"function"==typeof Symbol.for,i=r?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER",o=r?Symbol.for("INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER",s="x-amz-user-agent"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i={clockOffset:0,getDateWithClockOffset:function(){return i.clockOffset?new Date((new Date).getTime()+i.clockOffset):new Date},getClockOffset:function(){return i.clockOffset},getHeaderStringFromDate:function(e){return void 0===e&&(e=i.getDateWithClockOffset()),e.toISOString().replace(/[:\-]|\.\d{3}/g,"")},getDateFromHeaderString:function(e){var t=r(e.match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2}).+/),7),n=t[1],i=t[2],o=t[3],s=t[4],a=t[5],u=t[6];return new Date(Date.UTC(Number(n),Number(i)-1,Number(o),Number(s),Number(a),Number(u)))},isClockSkewed:function(e){return Math.abs(e.getTime()-i.getDateWithClockOffset().getTime())>=3e5},isClockSkewError:function(e){if(!e.response||!e.response.headers)return!1;var t=e.response.headers;return Boolean("BadRequestException"===t["x-amzn-errortype"]&&(t.date||t.Date))},setClockOffset:function(e){i.clockOffset=e}}},function(e,t,n){var r=n(133),i=n(134),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}
125),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setVidForUserInfo=t.findVidForUserInfo=t.getVid=t.setVid=t.start=void 0;var u=n(140),c=o(n(33)),l=o(n(30)),f=o(n(31));function d(e){null!=e?(localStorage.setItem("jzl_visitor_id",e),console.log("Saved VID",e)):(localStorage.removeItem("jzl_visitor_id"),console.log("Cleared VID"))}t.start=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){return[2]}))}))},t.setVid=d,t.getVid=function(){var e=window.localStorage.getItem("jzl_visitor_id");return null!=e?console.log("Using VID",e):(d(e=u.v4()),console.log("Created VID",e)),e},t.findVidForUserInfo=function(e,t,n){return s(this,void 0,void 0,(function(){var r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return r={groupId:e,loginIdProvider:{eq:{loginId:t,provider:n}}},[4,c.default.graphql(c.graphqlOperation(l.findLoginIdentity,r))];case 1:return i=a.sent(),null==(o=i.data.findLoginIdentity)||null==o.items?[2,null]:null==(s=o.items.find((function(e){return null!=e})))||null==s.visitorProfile?[2,null]:[2,s.visitorProfile.id]}}))}))},t.setVidForUserInfo=function(e,t,n,r){return s(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return i={input:{groupId:e,loginId:t,provider:n,loginIdentityVisitorProfileId:r}},[4,c.default.graphql(c.graphqlOperation(f.createLoginIdentity,i))];case 1:return o.sent(),[2]}}))}))}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"locateWindow",(function(){return i}));var r={};function i(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:r}},function(e,t,n){"use strict";
125Object.defineProperty(t,"__esModule",{value:!0}),t.findLoginIdentity=t.visitorProfile=t.getLegacyCustomerPortalProfile=t.getAuto5Profile=void 0,t.getAuto5Profile="\n query GetAuto5Profile($id: ID!) {\n getAuto5Profile(id: $id) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.getLegacyCustomerPortalProfile="\n query GetLegacyCustomerPortalProfile($id: ID!) {\n getLegacyCustomerPortalProfile(id: $id) {\n id\n dataJson\n createdAt\n updatedAt\n }\n }\n",t.visitorProfile="\n query VisitorProfile($id: ID!) {\n visitorProfile(id: $id) {\n id\n auto5 {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n loginIdentities {\n items {\n id\n visitorProfile {\n id\n createdAt\n updatedAt\n }\n provider\n loginId\n groupId\n createdAt\n updatedAt\n }\n nextToken\n }\n createdAt\n updatedAt\n }\n }\n",t.findLoginIdentity="\n query FindLoginIdentity(\n $groupId: String\n $loginIdProvider: ModelLoginIdentityLoginIdentitiesIndexCompositeKeyConditionInput\n $sortDirection: ModelSortDirection\n $filter: ModelLoginIdentityFilterInput\n $limit: Int\n $nextToken: String\n ) {\n findLoginIdentity(\n groupId: $groupId\n loginIdProvider: $loginIdProvider\n sortDirection: $sortDirection\n filter: $filter\n limit: $limit\n nextToken: $nextToken\n ) {\n items {\n id\n visitorProfile {\n id\n auto5 {\n id\n createdAt\n updatedAt\n }\n loginIdentities {\n nextToken\n }\n createdAt\n updatedAt\n }\n provider\n loginId\n groupId\n createdAt\n updatedAt\n }\n nextToken\n }\n }\n"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLoginIdentity=t.createVisitorProfile=t.updateLegacyCustomerPortalProfile=t.createLegacyCustomerPortalProfile=t.updateAuto5Profile=t.createAuto5Profile=t.clearAuto5PaymentDetails=t.saveAuto5PaymentDetails=t.clearAuto5VehicleList=t.saveAuto5Vehicle=void 0,t.saveAuto5Vehicle="\n mutation SaveAuto5Vehicle(\n $vid: ID!\n $vin: String!\n $type: SavedVehicleType!\n $set: Boolean!\n $price: Int\n ) {\n saveAuto5Vehicle(\n vid: $vid\n vin: $vin\n type: $type\n set: $set\n price: $price\n ) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.clearAuto5VehicleList="\n mutation ClearAuto5VehicleList($vid: ID!, $type: SavedVehicleType!) {\n clearAuto5VehicleList(vid: $vid, type: $type) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.saveAuto5PaymentDetails="\n mutation SaveAuto5PaymentDetails(\n $vid: ID!\n $aprTier: String\n $apr: Float\n $term: Int\n $downPayment: Int\n ) {\n saveAuto5PaymentDetails(\n vid: $vid\n aprTier: $aprTier\n apr: $apr\
125n term: $term\n downPayment: $downPayment\n ) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.clearAuto5PaymentDetails="\n mutation ClearAuto5PaymentDetails($vid: ID!) {\n clearAuto5PaymentDetails(vid: $vid) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.createAuto5Profile="\n mutation CreateAuto5Profile(\n $input: CreateAuto5ProfileInput!\n $condition: ModelAuto5ProfileConditionInput\n ) {\n createAuto5Profile(input: $input, condition: $condition) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.updateAuto5Profile="\n mutation UpdateAuto5Profile(\n $input: UpdateAuto5ProfileInput!\n $condition: ModelAuto5ProfileConditionInput\n ) {\n updateAuto5Profile(input: $input, condition: $condition) {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n }\n",t.createLegacyCustomerPortalProfile="\n mutation CreateLegacyCustomerPortalProfile(\n $input: CreateLegacyCustomerPortalProfileInput!\n $condition: ModelLegacyCustomerPortalProfileConditionInput\n ) {\n createLegacyCustomerPortalProfile(input: $input, condition: $condition) {\n id\n dataJson\n createdAt\n updatedAt\n }\n }\n",t.updateLegacyCustomerPortalProfile="\n mutation UpdateLegacyCustomerPortalProfile(\n $input: UpdateLegacyCustomerPortalProfileInput!\n $condition: ModelLegacyCustomerPortalProfileConditionInput\n ) {\n updateLegacyCustomerPortalProfile(input: $input, condition: $condition) {\n id\n dataJson\n createdAt\n updatedAt\n }\n }\n",t.createVisitorProfile="\n mutation CreateVisitorProfile(\n $input: CreateVisitorProfileInput!\n $condition: ModelVisitorProfileConditionInput\n ) {\n createVisitorProfile(input: $input, condition: $condition) {\n id\n auto5 {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n loginIdentities {\n items {\n id\n visitorProfile {\n id\n createdAt\n updatedAt\n }\n provider\n loginId\n groupId\n createdAt\n updatedAt\n }\n nextToken\n }\n createdAt\n updatedAt\n }\n }\n",t.createLoginIdentity="\n mutation CreateLoginIdentity(\n $input: CreateLoginIdentityInput!\n $condition: ModelLoginIdentityConditionInput\n ) {\n createLoginIdentity(in
125put: $input, condition: $condition) {\n id\n visitorProfile {\n id\n auto5 {\n id\n recentVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n favoriteVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n compareVehicles {\n vin\n lastKnownPrice\n updatedAt\n }\n paymentDetails {\n aprTier\n apr\n term\n downPayment\n }\n createdAt\n updatedAt\n }\n loginIdentities {\n items {\n id\n provider\n loginId\n groupId\n createdAt\n updatedAt\n }\n nextToken\n }\n createdAt\n updatedAt\n }\n provider\n loginId\n groupId\n createdAt\n updatedAt\n }\n }\n"},function(e,t,n){"use strict";n.d(t,"b",(function(){return Gn})),n.d(t,"a",(function(){return Wn}));var r=n(14),i=n(13),o=n(5),s=n(16),a=n(41),u=n(12),c=n(7),l=n(0),f=function(e,t){return(f=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 d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function p(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}var y,m,b,w,_,S,A,E,C,I,O,T,P,k,N,M,R,x,U,D,j,L,F,B,q,V,K,z,H,G,W,J,Y,$,Q,Z,X,ee,te,ne,re,ie,oe,se,ae,ue,ce,le,fe,de,he,pe,ge,ve,ye,me,be;Object.create;!function(e){e.AUTHENTICATED_ROLE="AuthenticatedRole",e.DENY="Deny"}(y||(y={})),(m||(m={})).filterSensitiveLog=function(e){return h({},e)},(b||(b={})).filterSensitiveLog=function(e){return h({},e)},(w||(w={})).filterSensitiveLog=function(e){return h({},e)},(_||(_={})).filterSensitiveLog=function(e){return h({},e)},(S||(S={})).filterSensitiveLog=function(e){return h({},e)},(A||(A={})).filterSensitiveLog=function(e){return h({},e)},(E||(E={})).filterSensitiveLog=function(e){return h({},e)},(C||(C={})).filterSensitiveLog=function(e){return h({},e)},(I||(I={})).filterSensitiveLog=function(e){return h({},e)},(O||(O={})).filterSensitiveLog=function(e){return h({},e)},function(e){e.ACCESS_DENIED="AccessDenied",e.INTERNAL_SERVER_ERROR="InternalServerError"}(T||(T={})),(P||(P={})).filterSensitiveLog=function(e){return h({},e)},(k||(k={})).filterSensitiveLog=function(e){return h({},e)},(N||(N={})).filterSensitiveLog=function(e){return h({},e)},(M||(M={})).filterSensitiveLog=function(e){return h({},e)},(R||(R={})).filterSensitiveLog=function(e){return h({},e)},(x||(x={})).filterSensitiveLog=function(e){return h({},e)},(U||(U={})).filterSensitiveLog=function(e){return h({},e)},(D||(D={})).filterSensitiveLog=function(e){return h({},e)},(j||(j={})).filterSensitiveLog=function(e){return h({},e)},(L||(L={})).filterSensitiveLog=function(e){return h({},e)},(F||(F={})).filterSensitiveLog=function(e){return h({},e)},(B||(B={})).filterSensitiveLog=function(e){return h({},e)},(q||(q={})).filterSensitiveLog=function(e){return h({},e)},(V||(V={})).filterSensitiveLog=function(e){return h({},e)},(K||(K={})).filterSensitiveLog=function(e){return h({},e)},function(e){e.CONTAINS="Contains",e.EQUALS="Equals",e.NOT_EQUAL="NotEqual",e.STARTS_WITH="StartsWith"}(z||(z={})),(H||(H={})).filterSensitiveLog=function(e){return h({},e)},(G||(G={})).filterSensitiveLog=function(e){return h({},e)},function(e){e.RULES="Rules",e.TOKEN="Token"}(W||(W={})),(J||(J={})).filterSensitiveLog=function(e){return h({},e)},(Y||(Y={})).filterSensitiveLog=function(e){return h({},e)},($||($={})).filterSensitiveLog=function(e){return h({},e)},(Q||(Q={})).filterSensitiveLog=function(e){return h({},e)},(Z||(Z={})).filterSensitiveLog=function(e){return h({},e)},(X||(X={})).filterSensitiveLog=function(e){return h({},e)},(ee||(ee={})).filterSensitiveLog=function(e){return h({},e)},(te||(te={})).filterSensitiveLog=function(e){return h({},e)},(ne||(ne={})).filterSensitiveLog=function(e){return h({},e)},(re||(re={})).filterSensitiveLog=function(e){return h({},e)},(ie||(ie={})).filterSensitiveLog=function(e){return h({},e)},(oe||(oe={})).filterSensitiveLog=function(e){return h({},e)},(se||(se={})).filterSensitiveLog=function(e){return h({},e)}
125,(ae||(ae={})).filterSensitiveLog=function(e){return h({},e)},(ue||(ue={})).filterSensitiveLog=function(e){return h({},e)},(ce||(ce={})).filterSensitiveLog=function(e){return h({},e)},(le||(le={})).filterSensitiveLog=function(e){return h({},e)},(fe||(fe={})).filterSensitiveLog=function(e){return h({},e)},(de||(de={})).filterSensitiveLog=function(e){return h({},e)},(he||(he={})).filterSensitiveLog=function(e){return h({},e)},(pe||(pe={})).filterSensitiveLog=function(e){return h({},e)},(ge||(ge={})).filterSensitiveLog=function(e){return h({},e)},(ve||(ve={})).filterSensitiveLog=function(e){return h({},e)},(ye||(ye={})).filterSensitiveLog=function(e){return h({},e)},(me||(me={})).filterSensitiveLog=function(e){return h({},e)},(be||(be={})).filterSensitiveLog=function(e){return h({},e)};var we=function(){function e(e){this.statusCode=e.statusCode,this.headers=e.headers||{},this.body=e.body}return e.isInstance=function(e){if(!e)return!1;var t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers},e}(),_e=function(){function e(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.substr(-1)?e.protocol+":":e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?"/"+e.path:e.path:"/"}return e.isInstance=function(e){if(!e)return!1;var t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers},e.prototype.clone=function(){var t,n=new e(Object(l.__assign)(Object(l.__assign)({},this),{headers:Object(l.__assign)({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,i=t[n];return Object(l.__assign)(Object(l.__assign)({},e),((r={})[n]=Array.isArray(i)?Object(l.__spread)(i):i,r))}),{}))),n},e}();var Se=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,u,c,l,f,d,p,v,y,m;return g(this,(function(g){switch(g.label){case 0:return r=[h({},e)],m={},[4,Qe(e.body,t)];case 1:switch(n=h.apply(void 0,r.concat([(m.body=g.sent(),m)])),o="UnknownError",o=Ze(e,n.body),o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":return[3,6];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16]}return[3,18];case 2:return s=[{}],[4,Ee(n,t)];case 3:return i=h.apply(void 0,[h.apply(void 0,s.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 4:return a=[{}],[4,Ce(n,t)];case 5:return i=h.apply(void 0,[h.apply(void 0,a.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 6:return u=[{}],[4,Ie(n,t)];case 7:return i=h.apply(void 0,[h.apply(void 0,u.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 8:return c=[{}],[4,Oe(n,t)];case 9:return i=h.apply(void 0,[h.apply(void 0,c.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 10:return l=[{}],[4,Pe(n,t)];case 11:return i=h.apply(void 0,[h.apply(void 0,l.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 12:return f=[{}],[4,ke(n,t)];case 13:return i=h.apply(void 0,[h.apply(void 0,f.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 14:return d=[{}],[4,Ne(n,t)];case 15:return i=h.apply(void 0,[h.apply(void 0,d.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 16:return p=[{}],[4,Me(n,t)];case 17:return i=h.apply(void 0,[h.apply(void 0,p.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 18:v=n.body,o=v.code||v.Code||o,i=h(h({},v),{name:""+o,message:v.message||v.Message||o,$fault:"client",$metadata:Je(e)}),g.label=19;case 19:return y=i.message||i.Message||o,i.message=y,delete i.Message,[2,Promise.reject(Object.assign(new Error(y),i))]}}))}))},Ae=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r,i,o,s,a,u,c,l,f,d,p,v,y,m;return g(this,(function(g){switch(g.label){case 0:return r=[h({},e)],m={},[4,Qe(e.body,t)];case 1:switch(n=h.apply(void 0,r.concat([(m.body=g.sent(),m)])),o="UnknownError",o=Ze(e,n.body),o){case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":return[3,2];case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":return[3,4];case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":return[3,6];case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":return[3,8];case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":return[3,10];case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":return[3,12];case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":return[3,14];case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":return[3,16
125]}return[3,18];case 2:return s=[{}],[4,Ee(n,t)];case 3:return i=h.apply(void 0,[h.apply(void 0,s.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 4:return a=[{}],[4,Ce(n,t)];case 5:return i=h.apply(void 0,[h.apply(void 0,a.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 6:return u=[{}],[4,Oe(n,t)];case 7:return i=h.apply(void 0,[h.apply(void 0,u.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 8:return c=[{}],[4,Te(n,t)];case 9:return i=h.apply(void 0,[h.apply(void 0,c.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 10:return l=[{}],[4,Pe(n,t)];case 11:return i=h.apply(void 0,[h.apply(void 0,l.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 12:return f=[{}],[4,ke(n,t)];case 13:return i=h.apply(void 0,[h.apply(void 0,f.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 14:return d=[{}],[4,Ne(n,t)];case 15:return i=h.apply(void 0,[h.apply(void 0,d.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 16:return p=[{}],[4,Me(n,t)];case 17:return i=h.apply(void 0,[h.apply(void 0,p.concat([g.sent()])),{name:o,$metadata:Je(e)}]),[3,19];case 18:v=n.body,o=v.code||v.Code||o,i=h(h({},v),{name:""+o,message:v.message||v.Message||o,$fault:"client",$metadata:Je(e)}),g.label=19;case 19:return y=i.message||i.Message||o,i.message=y,delete i.Message,[2,Promise.reject(Object.assign(new Error(y),i))]}}))}))},Ee=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=je(n,t),[2,h({name:"ExternalServiceException",$fault:"client",$metadata:Je(e)},r)]}))}))},Ce=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Be(n,t),[2,h({name:"InternalErrorException",$fault:"server",$metadata:Je(e)},r)]}))}))},Ie=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=qe(n,t),[2,h({name:"InvalidIdentityPoolConfigurationException",$fault:"client",$metadata:Je(e)},r)]}))}))},Oe=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ve(n,t),[2,h({name:"InvalidParameterException",$fault:"client",$metadata:Je(e)},r)]}))}))},Te=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ke(n,t),[2,h({name:"LimitExceededException",$fault:"client",$metadata:Je(e)},r)]}))}))},Pe=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=ze(n,t),[2,h({name:"NotAuthorizedException",$fault:"client",$metadata:Je(e)},r)]}))}))},ke=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=He(n,t),[2,h({name:"ResourceConflictException",$fault:"client",$metadata:Je(e)},r)]}))}))},Ne=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=Ge(n,t),[2,h({name:"ResourceNotFoundException",$fault:"client",$metadata:Je(e)},r)]}))}))},Me=function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n=e.body,r=We(n,t),[2,h({name:"TooManyRequestsException",$fault:"client",$metadata:Je(e)},r)]}))}))},Re=function(e,t){return h(h(h({},void 0!==e.CustomRoleArn&&null!==e.CustomRoleArn&&{CustomRoleArn:e.CustomRoleArn}),void 0!==e.IdentityId&&null!==e.IdentityId&&{IdentityId:e.IdentityId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Ue(e.Logins,t)})},xe=function(e,t){return h(h(h({},void 0!==e.AccountId&&null!==e.AccountId&&{AccountId:e.AccountId}),void 0!==e.IdentityPoolId&&null!==e.IdentityPoolId&&{IdentityPoolId:e.IdentityPoolId}),void 0!==e.Logins&&null!==e.Logins&&{Logins:Ue(e.Logins,t)})},Ue=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=v(t,2),i=r[0],o=r[1];return null===o?e:h(h({},e),((n={})[i]=o,n))}),{})},De=function(e,t){return{AccessKeyId:void 0!==e.AccessKeyId&&null!==e.AccessKeyId?e.AccessKeyId:void 0,Expiration:void 0!==e.Expiration&&null!==e.Expiration?new Date(Math.round(1e3*e.Expiration)):void 0,SecretKey:void 0!==e.SecretKey&&null!==e.SecretKey?e.SecretKey:void 0,SessionToken:void 0!==e.SessionToken&&null!==e.SessionToken?e.SessionToken:void 0}},je=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Le=function(e,t){return{Credentials:void 0!==e.Credentials&&null!==e.Credentials?De(e.Credentials):void 0,IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Fe=function(e,t){return{IdentityId:void 0!==e.IdentityId&&null!==e.IdentityId?e.IdentityId:void 0}},Be=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},qe=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ve=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ke=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},ze=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},He=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ge=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},We=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Je=function(e){var t;return{httpStatusCode:e.statusCode,requestId:null!==(t=e.headers["x-amzn-requestid"])&&void 0!==t?t:e.headers["x-amzn-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}},Ye=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},$e=function(e,t,n,r,i){return p(void 0,void 0,void 0,(function(){var o,s,a,u,c,l;return g(this,(function(f){switch(f.label){case 0:return[4,e.endpoint()];case 1:return o=f.sent(),s=o.hostname,a=o.protocol,u=void 0===a?"https":a,c=o.port,l={protocol:u,hostname:s,port:c,method:"POST",path:n,headers:t},void 0!==r&&(l.hostname=r),void 0!==i&&(l.body=i),[2,new _e(l)]}}))}))},Qe=function(e,t){return function(e,t){return Ye(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Ze=function(e,t){var n,r,i=function(e){var t=e;return t.indexOf(":")>
125=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},o=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==o?i(e.headers[o]):void 0!==t.code?i(t.code):void 0!==t.__type?i(t.__type):""},Xe={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},et={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function tt(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i,o;return Object(l.__generator)(this,(function(s){switch(s.label){case 0:return[4,n(r)];case 1:return i=s.sent().response,[4,t(i,e)];case 2:return o=s.sent(),[2,{response:i,output:o}]}}))}))}}}(e,n),Xe),r.add(function(e,t){return function(n,r){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(l.__generator)(this,(function(o){switch(o.label){case 0:return[4,t(r.input,e)];case 1:return i=o.sent(),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:i}))]}}))}))}}}(e,t),et)}}}var nt=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,Object(l.__assign)({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Object(l.__assign)({},e))})),n},i=function(e){var t=[];return e.before.forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(l.__spread)(i(e)))})),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Object(l.__spread)(i(e)))})),t},o=function(){var n,r=[],o=[],s={};return e.forEach((function(e){var t=Object(l.__assign)(Object(l.__assign)({},e),{before:[],after:[]});t.name&&(s[t.name]=t),r.push(t)})),t.forEach((function(e){var t=Object(l.__assign)(Object(l.__assign)({},e),{before:[],after:[]});t.name&&(s[t.name]=t),o.push(t)})),o.forEach((function(e){if(e.toMiddleware){var t=s[e.toMiddleware];if(void 0===t)throw new 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)}})),(n=r,n.sort((function(e,t){return rt[t.step]-rt[e.step]||it[t.priority||"normal"]-it[e.priority||"normal"]}))).map(i).reduce((function(e,t){return e.push.apply(e,Object(l.__spread)(t)),e}),[]).map((function(e){return e.middleware}))},s={add:function(t,r){void 0===r&&(r={});var i=r.name,o=r.override,s=Object(l.__assign)({step:"initialize",priority:"normal",middleware:t},r);if(i){if(n.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=e.findIndex((function(e){return e.name===i})),u=e[a];if(u.step!==s.step||u.priority!==s.priority)throw new Error('"'+i+'" middleware with '+u.priority+" priority in "+u.step+" step cannot be overridden by same-name middleware with "+s.priority+" priority in "+s.step+" step.");e.splice(a,1)}n.add(i)}e.push(s)},addRelativeTo:function(e,r){var i=r.name,o=r.override,s=Object(l.__assign)({middleware:e},r);if(i){if(n.has(i)){if(!o)throw new Error("Duplicate middleware name '"+i+"'");var a=t.findIndex((function(e){return e.name===i})),u=t[a];if(u.toMiddleware!==s.toMiddleware||u.relation!==s.relation)throw new Error('"'+i+'" middleware '+u.relation+' "'+u.toMiddleware+'" middleware cannot be overridden by same-name middleware '+s.relation+' "'+s.toMiddleware+'" middleware.');t.splice(a,1)}n.add(i)}t.push(s)},clone:function(){return r(nt())},use:function(e){e.applyToStack(s)},remove:function(r){return"string"==typeof r?function(r){var i=!1,o=function(e){return!e.name||e.name!==r||(i=!0,n.delete(r),!1)};return e=e.filter(o),t=t.filter(o),i}(r):function(r){var i=!1,o=function(e){return e.middleware!==r||(i=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(o),t=t.filter(o),i}(r)},removeByTag:function(r){var i=!1,o=function(e){var t=e.tags,o=e.name;return!t||!t.includes(r)||(o&&n.delete(o),i=!0,!1)};return e=e.filter(o),t=t.filter(o),i},concat:function(e){var t=r(nt());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var i=Object(l.__values)(o().reverse()),s=i.next();!s.done;s=i.next()){e=(0,s.value)(e,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}};return s},rt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},it={high:3,normal:2,low:1},ot=function(){function e(e){this.middlewareStack=nt(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,r);
125if(!i)return o(e).then((function(e){return e.output}));o(e).then((function(e){return i(null,e.output)}),(function(e){return i(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),st=function(){this.middlewareStack=nt()};var at=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Object(l.__spread)([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};at.prototype=Object.create(String.prototype,{constructor:{value:at,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(at,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Object(l.__extends)(t,e),t.prototype.deserializeJSON=function(){return JSON.parse(e.prototype.toString.call(this))},t.prototype.toJSON=function(){return e.prototype.toString.call(this)},t.fromObject=function(e){return e instanceof t?e:new t(e instanceof String||"string"==typeof e?e:JSON.stringify(e))}}(at);var ut=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return d(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(tt(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetCredentialsForIdentityCommand",inputFilterSensitiveLog:j.filterSensitiveLog,outputFilterSensitiveLog:F.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},r=JSON.stringify(Re(e,t)),[2,$e(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return p(void 0,void 0,void 0,(function(){var n,r,i;return g(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,Se(e,t)]:[4,Qe(e.body,t)];case 1:return n=o.sent(),{},r=Le(n,t),i=h({$metadata:Je(e)},r),[2,Promise.resolve(i)]}}))}))}(e,t)},t}(st),ct=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.tryNextLink=n,r}return Object(l.__extends)(t,e),t}(Error);function lt(e){return Promise.all(Object.keys(e).reduce((function(t,n){var r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((function(e){return[n,e]}))),t}),[])).then((function(e){return e.reduce((function(e,t){var n=Object(l.__read)(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})}))}function ft(e){var t=this;return function(){return Object(l.__awaiter)(t,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,f,d,h,p;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return f=(c=e.client).send,d=ut.bind,p={CustomRoleArn:e.customRoleArn,IdentityId:e.identityId},e.logins?[4,lt(e.logins)]:[3,2];case 1:return h=l.sent(),[3,3];case 2:h=void 0,l.label=3;case 3:return[4,f.apply(c,[new(d.apply(ut,[void 0,(p.Logins=h,p)]))])];case 4:return t=l.sent().Credentials,n=void 0===t?function(){throw new ct("Response from Amazon Cognito contained no credentials")}():t,r=n.AccessKeyId,i=void 0===r?function(){throw new ct("Response from Amazon Cognito contained no access key ID")}():r,o=n.Expiration,s=n.SecretKey,a=void 0===s?function(){throw new ct("Response from Amazon Cognito contained no secret key")}():s,u=n.SessionToken,[2,{identityId:e.identityId,accessKeyId:i,secretAccessKey:a,sessionToken:u,expiration:o}]}}))}))}}var dt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return d(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(tt(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),i={logger:t.logger,clientName:"CognitoIdentityClient",commandName:"GetIdCommand",inputFilterSensitiveLog:q.filterSensitiveLog,outputFilterSensitiveLog:V.filterSensitiveLog},o=t.requestHandler;return r.resolve((function(e){return o.handle(e.request,n||{})}),i)},t.prototype.serialize=function(e,t){return function(e,t){return p(void 0,void 0,void 0,(function(){var n,r;return g(this,(function(i){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"AWSCognitoIdentityService.GetId"},r=JSON.stringify(xe(e,t)),[2,$e(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return p(void 0,void 0,void 0,(function(){var n,r,i;return g(this,(function(o){switch(o.label){case 0:return e.statusCode>=300?[2,Ae(e,t)]:[4,Qe(e.body,t)];case 1:return n=o.sent(),{},r=Fe(n,t),i=h({$metadata:Je(e)},r),[2,Promise.resolve(i)]}}))}))}(e,t)},t}(st),ht=function(){function e(e){void 0===e&&(e="aws:cognito-identity-ids"),this.dbName=e}return e.prototype.getItem=function(e){return this.withObjectStore("readonly",(function(t){var n=t.get(e);return new Promise((function(e){n.onerror=function(){return e(null)},n.onsuccess=function(){return e(n.result?n.result.value:null)}}))})).catch((function(){return null}))},e.prototype.removeItem=function(e){return this.withObjectStore("readwrite",(function(t){var n=t.delete(e);return new Promise((function(e,t){n.onerror=function(){return t(n.error)},n.onsuccess=function(){return e()}}))}))},e.prototype.setItem=function(e,t){return this.withObjectStore("readwrite",(function(n){var r=n.put({id:e,value:t});return new Promise((function(e,t){r.onerror=function(){return t(r.error)},r.onsuccess=function(){return e()}}))}))},e.prototype.getDb=function(){var e=self.indexedDB.open(this.dbName,1);return new Promise((function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)},e.onblocked=function(){n(new Error("Unable to access DB"))},e.onupgradeneeded=function(){var t=e.result;t.onerror=function(){n(new Error("Failed to create object store"))},t.createObjectStore("IdentityIds",{keyPath:"id"})}}))},e.prototype.withObjectStore=function(e,t){return this.getDb().then((function(n){var r=n.transaction("IdentityIds",e);return r.oncomplete=function(){return n.close()},new Promise((function(e,n){r.onerror=function(){return n(r.error)},e(t(r.objectStore("IdentityIds")))})).catch((function(e){throw n.close(),e}))}))},e}(),pt=new(function(){function e(e){void 0===e&&(e={}),this.store=e}return e.prototype.getItem=function(e){return e in this.store?this.store[e]:null},e.prototype.removeItem=function(e){delete this.store[e]},e.prototype.setItem=function(e,t){this.store[e]=t},e}());
125function gt(e){var t=this,n=e.accountId,r=e.cache,i=void 0===r?"object"==typeof self&&self.indexedDB?new ht:"object"==typeof window&&window.localStorage?window.localStorage:pt:r,o=e.client,s=e.customRoleArn,a=e.identityPoolId,u=e.logins,c=e.userIdentifier,f=void 0===c?u&&0!==Object.keys(u).length?void 0:"ANONYMOUS":c,d=f?"aws:cognito-identity-credentials:"+a+":"+f:void 0,h=function(){return Object(l.__awaiter)(t,void 0,void 0,(function(){var e,t,r,c,f,p,g,v,y;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return(t=d)?[4,i.getItem(d)]:[3,2];case 1:t=l.sent(),l.label=2;case 2:return(e=t)?[3,7]:(p=(f=o).send,g=dt.bind,y={AccountId:n,IdentityPoolId:a},u?[4,lt(u)]:[3,4]);case 3:return v=l.sent(),[3,5];case 4:v=void 0,l.label=5;case 5:return[4,p.apply(f,[new(g.apply(dt,[void 0,(y.Logins=v,y)]))])];case 6:r=l.sent().IdentityId,c=void 0===r?function(){throw new ct("Response from Amazon Cognito contained no identity ID")}():r,e=c,d&&Promise.resolve(i.setItem(d,e)).catch((function(){})),l.label=7;case 7:return[2,(h=ft({client:o,customRoleArn:s,logins:u,identityId:e}))()]}}))}))};return function(){return h().catch((function(e){return Object(l.__awaiter)(t,void 0,void 0,(function(){return Object(l.__generator)(this,(function(t){throw d&&Promise.resolve(i.removeItem(d)).catch((function(){})),e}))}))}))}}var vt=n(71),yt=n(69),mt=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,bt)},bt=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var wt=function(){function e(e){var t=(void 0===e?{}:e).requestTimeout;this.requestTimeout=t}return e.prototype.destroy=function(){},e.prototype.handle=function(e,t){var n=(void 0===t?{}:t).abortSignal,r=this.requestTimeout;if(null==n?void 0:n.aborted){var i=new Error("Request aborted");return i.name="AbortError",Promise.reject(i)}var o=e.path;if(e.query){var s=function(e){var t,n,r=[];try{for(var i=Object(l.__values)(Object.keys(e).sort()),o=i.next();!o.done;o=i.next()){var s=o.value,a=e[s];if(s=mt(s),Array.isArray(a))for(var u=0,c=a.length;u<c;u++)r.push(s+"="+mt(a[u]));else{var f=s;(a||"string"==typeof a)&&(f+="="+mt(a)),r.push(f)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r.join("&")}(e.query);s&&(o+="?"+s)}var a=e.port,u=e.method,c=e.protocol+"//"+e.hostname+(a?":"+a:"")+o,f={body:"GET"===u||"HEAD"===u?void 0:e.body,headers:new Headers(e.headers),method:u};"undefined"!=typeof AbortController&&(f.signal=n);var d,h=new Request(c,f),p=[fetch(h).then((function(e){var t,n,r=e.headers,i={};try{for(var o=Object(l.__values)(r.entries()),s=o.next();!s.done;s=o.next()){var a=s.value;i[a[0]]=a[1]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new we({headers:i,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new we({headers:i,statusCode:e.status,body:t})}}))})),(d=r,void 0===d&&(d=0),new Promise((function(e,t){d&&setTimeout((function(){var e=new Error("Request did not complete within "+d+" ms");e.name="TimeoutError",t(e)}),d)})))];return n&&p.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(p)},e}(),_t={},St=new Array(64),At=0,Et="A".charCodeAt(0),Ct="Z".charCodeAt(0);At+Et<=Ct;At++){var It=String.fromCharCode(At+Et);_t[It]=At,St[At]=It}for(At=0,Et="a".charCodeAt(0),Ct="z".charCodeAt(0);At+Et<=Ct;At++){It=String.fromCharCode(At+Et);var Ot=At+26;_t[It]=Ot,St[Ot]=It}for(At=0;At<10;At++){_t[At.toString(10)]=At+52;It=At.toString(10),Ot=At+52;_t[It]=Ot,St[Ot]=It}_t["+"]=62,St[62]="+",_t["/"]=63,St[63]="/";function Tt(e){var t=e.length/4*3;"=="===e.substr(-2)?t-=2:"="===e.substr(-1)&&t--;for(var n=new ArrayBuffer(t),r=new DataView(n),i=0;i<e.length;i+=4){for(var o=0,s=0,a=i,u=i+3;a<=u;a++)"="!==e[a]?(o|=_t[e[a]]<<6*(u-a),s+=6):o>>=6;var c=i/4*3;o>>=s%8;for(var l=Math.floor(s/8),f=0;f<l;f++){var d=8*(l-f-1);r.setUint8(c+f,(o&255<<d)>>d)}}return new Uint8Array(n)}function Pt(e){return new Promise((function(t,n){var r=new FileReader;r.onloadend=function(){var e;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var i=null!==(e=r.result)&&void 0!==e?e:"",o=i.indexOf(","),s=o>-1?o+1:i.length;t(i.substring(s))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)}
125,r.readAsDataURL(e)}))}var kt={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Nt=function(e){return{applyToStack:function(t){t.add(function(e){return function(t,n){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i;return Object(l.__generator)(this,(function(o){return(null===(i=null==e?void 0:e.retryStrategy)||void 0===i?void 0:i.mode)&&(n.userAgent=Object(l.__spread)(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}}(e),kt)}}},Mt=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Rt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],xt=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],Ut=[500,502,503,504],Dt=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||Rt.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},jt=n(68),Lt=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Ft=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return Mt.includes(e.name)}(e)||Dt(e)||function(e){var t;return xt.includes(e.name)||Ut.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Bt=function(){function e(e,t){var n,r,i,o,s,a,u,c;this.maxAttemptsProvider=e,this.mode="standard",this.retryDecider=null!==(n=null==t?void 0:t.retryDecider)&&void 0!==n?n:Ft,this.delayDecider=null!==(r=null==t?void 0:t.delayDecider)&&void 0!==r?r:Lt,this.retryQuota=null!==(i=null==t?void 0:t.retryQuota)&&void 0!==i?i:(s=o=500,a=o,u=function(e){return"TimeoutError"===e.name?10:5},c=function(e){return u(e)<=a},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(e){if(!c(e))throw new Error("No retry token available");var t=u(e);return a-=t,t},releaseRetryTokens:function(e){a+=null!=e?e:1,a=Math.min(a,s)}}))}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return Object(l.__awaiter)(this,void 0,void 0,(function(){var e;return Object(l.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.maxAttemptsProvider()];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),e=3,[3,3];case 3:return[2,e]}}))}))},e.prototype.retry=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,a,u,c;return Object(l.__generator)(this,(function(f){switch(f.label){case 0:return r=0,i=0,[4,this.getMaxAttempts()];case 1:o=f.sent(),s=t.request,_e.isInstance(s)&&(s.headers["amz-sdk-invocation-id"]=Object(jt.v4)()),a=function(){var a,c,f,d,h;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return l.trys.push([0,2,,5]),_e.isInstance(s)&&(s.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+o),[4,e(t)];case 1:return a=l.sent(),c=a.response,f=a.output,u.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=i,[2,{value:{response:c,output:f}}];case 2:return d=l.sent(),r++,u.shouldRetry(d,r,o)?(n=u.retryQuota.retrieveRetryTokens(d),h=u.delayDecider(Dt(d)?500:100,r),i+=h,[4,new Promise((function(e){return setTimeout(e,h)}))]):[3,4];case 3:return l.sent(),[2,"continue"];case 4:throw d.$metadata||(d.$metadata={}),d.$metadata.attempts=r,d.$metadata.totalRetryDelay=i,d;case 5:return[2]}}
125))},u=this,f.label=2;case 2:return[5,a()];case 3:return"object"==typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),qt=function(e){if(void 0===e&&(e=3),"number"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var Vt=n(70),Kt=n.n(Vt);var zt="cognito-identity.{region}.amazonaws.com",Ht=new Set(["af-south-1","ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-south-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Gt=new Set(["cn-north-1","cn-northwest-1"]),Wt=new Set(["us-iso-east-1"]),Jt=new Set(["us-isob-east-1"]),Yt=new Set(["us-gov-east-1","us-gov-west-1"]);var $t,Qt,Zt,Xt,en={apiVersion:"2014-06-30",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"cognito-identity.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"cognito-identity.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"cognito-identity.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"cognito-identity.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"cognito-identity.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"cognito-identity.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"cognito-identity.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"cognito-identity.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"cognito-identity.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"cognito-identity.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"cognito-identity.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"cognito-identity.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"cognito-identity-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"cognito-identity-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-west-1":n={hostname:"cognito-identity-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":n={hostname:"cognito-identity-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"sa-east-1":n={hostname:"cognito-identity.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"cognito-identity.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"cognito-identity.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-west-1":n={hostname:"cognito-identity.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":n={hostname:"cognito-identity.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"cognito-identity.us-west-2.amazonaws.com",partition:"aws"};break;default:Ht.has(e)&&(n={hostname:zt.replace("{region}",e),partition:"aws"}),Gt.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Wt.has(e)&&(n={hostname:"cognito-identity.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Jt.has(e)&&(n={hostname:"cognito-identity.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Yt.has(e)&&(n={hostname:"cognito-identity.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:zt.replace("{region}",e),partition:"aws"})}return Promise.resolve(h({signingService:"cognito-identity"},n))},serviceId:"Cognito Identity",urlParser:function(e){var t,n=new URL(e),r=n.hostname,i=n.pathname,o=n.port,s=n.protocol,a=n.search;return a&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var i=Object(l.__values)(e.split("&")),o=i.next();!o.done;o=i.next()){var s=o.value,a=Object(l.__read)(s.split("="),2),u=a[0],c=a[1],f=void 0===c?null:c;u=decodeURIComponent(u),f&&(f=decodeURIComponent(f)),u in r?Array.isArray(r[u])?r[u].push(f):r[u]=[r[u],f]:r[u]=f}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(a)),{hostname:r,port:o?parseInt(o):void 0,protocol:s,path:i,query:t}}},tn=h(h({},en),{runtime:"browser",base64Decoder:Tt,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,i=0,o=n,s=Math.min(n+3,e.length);o<s;o++)r|=e[o]<<8*(s-o-1),i+=8;var a=Math.ceil(i/6);r<<=6*a-i;for(var u=1;u<=a;u++){var c=6*(a-u);t+=St[(r&63<<c)>>c]}t+="==".slice(0,4-a)}return t},bodyLengthChecker:function(e){if("string"==typeof e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2)}return t}return"number"==typeof e.byteLength?e.byteLength:"number"==typeof e.size?e.size:void 0},credentialDefaultProvider:function(e){return function(){return Promise.reject(new Error("Credential is missing"))}},defaultUserAgentProvider:(Qt={serviceId:en.serviceId,clientVersion:vt.version},Zt=Qt.serviceId,Xt=Qt.clientVersion,function(){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var e,t,n,r,i,o,s,a,u;return Object(l.__generator)(this,(function(c){return e=(null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.userAgent)?Kt.a.parse(window.navigator.userAgent):void 0,t=[["aws-sdk-js",Xt],["os/"+((null===(r=null==e?void 0:e.os)||void 0===r?void 0:r.name)||"other"),null===(i=null==e?void 0:e.os)||void 0===i?void 0:i.version],["lang/js"],["md/browser",(null!==(s=null===(o=null==e?void 0:e.browser)||void 0===o?void 0:o.name)&&void 0!==s?s:"unknown")+"_"+(null!==(u=null===(a=null==e?void 0:e.browser)||void 0===a?void 0:a.version)&&void 0!==u?u:"unknown")]],Zt&&t.push(["api/"+Zt,Xt]),[2,t]}))}
125))}),maxAttempts:3,region:($t="Region is missing",function(){return Promise.reject($t)}),requestHandler:new wt,sha256:yt.Sha256,streamCollector:function(e){return"function"==typeof Blob&&e instanceof Blob?function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n;return Object(l.__generator)(this,(function(r){switch(r.label){case 0:return[4,Pt(e)];case 1:return t=r.sent(),n=Tt(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,i,o,s,a;return Object(l.__generator)(this,(function(u){switch(u.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,u.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return i=u.sent(),o=i.done,(s=i.value)&&(a=t,(t=new Uint8Array(a.length+s.length)).set(a),t.set(s,a.length)),r=o,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},utf8Encoder:function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}),nn=function(e){var t=e.endpoint,n=e.urlParser;if("string"==typeof t){var r=Promise.resolve(n(t));return function(){return r}}if("object"==typeof t){var i=Promise.resolve(t);return function(){return i}}return t},rn=function(e){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var t,n,r,i,o;return Object(l.__generator)(this,(function(s){switch(s.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=s.sent(),!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");return[4,e.regionInfoProvider(r)];case 2:if(!(i=(null!==(o=s.sent())&&void 0!==o?o:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+i)]}}))}))},on=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var sn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},an=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Object(l.__awaiter)(t,void 0,void 0,(function(){var t,i,o,s,a;return Object(l.__generator)(this,(function(u){return t=r.request,_e.isInstance(t)&&(i=t.body,o=t.headers,i&&-1===Object.keys(o).map((function(e){return e.toLowerCase()})).indexOf("content-length")&&void 0!==(s=e(i))&&(t.headers=Object(l.__assign)(Object(l.__assign)({},t.headers),((a={})["content-length"]=String(s),a)))),[2,n(Object(l.__assign)(Object(l.__assign)({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),sn)}}};var un={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},cn=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,i;return Object(l.__generator)(this,(function(o){return _e.isInstance(n.request)?(r=n.request,i=(e.requestHandler.metadata||{}).handlerProtocol,(void 0===i?"":i).indexOf("h2")>=0&&!r.headers[":authority"]?(delete r.headers.host,r.headers[":authority"]=""):r.headers.host||(r.headers.host=r.hostname),[2,t(n)]):[2,t(n)]}))}))}}}(e),un)}}},ln={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},fn=function(e){return{applyToStack:function(e){e.add((function(e,t){return function(n){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var r,i,o,s,a,u,c,f,d;return Object(l.__generator)(this,(function(h){switch(h.label){case 0:return r=t.clientName,i=t.commandName,o=t.inputFilterSensitiveLog,s=t.logger,a=t.outputFilterSensitiveLog,[4,e(n)];case 1:return u=h.sent(),s?("function"==typeof s.info&&(c=u.output,f=c.$metadata,d=Object(l.__rest)(c,["$metadata"]),s.info({clientName:r,commandName:i,input:o(n.input),output:a(d),metadata:f})),[2,u]):[2,u]}}))}))}}),ln)}}},dn=n(10),hn="X-Amz-Date".toLowerCase(),pn=["authorization",hn,"date"],gn="X-Amz
125-Signature".toLowerCase(),vn="X-Amz-Security-Token".toLowerCase(),yn={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},mn=/^proxy-/,bn=/^sec-/,wn="AWS4-HMAC-SHA256-PAYLOAD",_n={},Sn=[];function An(e,t,n){return e+"/"+t+"/"+n+"/aws4_request"}function En(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Cn(e,t,n){var r,i,o=e.headers,s={};try{for(var a=Object(l.__values)(Object.keys(o).sort()),u=a.next();!u.done;u=a.next()){var c=u.value,f=c.toLowerCase();(f in yn||(null==t?void 0:t.has(f))||mn.test(f)||bn.test(f))&&(!n||n&&!n.has(f))||(s[f]=o[c].trim().replace(/\s+/g," "))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return s}function In(e,t){var n=e.headers,r=e.body;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,i,o,s,a,u,c;return Object(l.__generator)(this,(function(f){switch(f.label){case 0:try{for(e=Object(l.__values)(Object.keys(n)),i=e.next();!i.done;i=e.next())if("x-amz-content-sha256"===(o=i.value).toLowerCase())return[2,n[o]]}catch(e){u={error:e}}finally{try{i&&!i.done&&(c=e.return)&&c.call(e)}finally{if(u)throw u.error}}return null!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof r||ArrayBuffer.isView(r)||(d=r,"function"==typeof ArrayBuffer&&d instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(d))?((s=new t).update(r),a=dn.a,[4,s.digest()]):[3,3];case 2:return[2,a.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var d}))}))}function On(e){var t=e.headers,n=e.query,r=Object(l.__rest)(e,["headers","query"]);return Object(l.__assign)(Object(l.__assign)({},r),{headers:Object(l.__assign)({},t),query:n?Tn(n):void 0})}function Tn(e){return Object.keys(e).reduce((function(t,n){var r,i=e[n];return Object(l.__assign)(Object(l.__assign)({},t),((r={})[n]=Array.isArray(i)?Object(l.__spread)(i):i,r))}),{})}function Pn(e){var t,n;e="function"==typeof e.clone?e.clone():On(e);try{for(var r=Object(l.__values)(Object.keys(e.headers)),i=r.next();!i.done;i=r.next()){var o=i.value;pn.indexOf(o.toLowerCase())>-1&&delete e.headers[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function kn(e){return function(e){if("number"==typeof e)return new Date(1e3*e);if("string"==typeof e)return Number(e)?new Date(1e3*Number(e)):new Date(e);return e}(e).toISOString().replace(/\.\d{3}Z$/,"Z")}var Nn=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,i=e.service,o=e.sha256,s=e.uriEscapePath,a=void 0===s||s;this.service=i,this.sha256=o,this.uriEscapePath=a,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=xn(r),this.credentialProvider=Un(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Object(l.__awaiter)(this,void 0,void 0,(function(){var n,r,i,o,s,a,u,c,f,d,h,p,g,v,y,m,b,w,_,S,A,E,C,I;return Object(l.__generator)(this,(function(O){switch(O.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,i=t.expiresIn,o=void 0===i?3600:i,s=t.unsignableHeaders,a=t.unhoistableHeaders,u=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return d=O.sent(),null==c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=O.sent(),O.label=4;case 4:return h=p,g=Mn(r),v=g.longDate,y=g.shortDate,o>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(m=An(y,h,null!=f?f:this.service),b=function(e,t){var n,r,i;void 0===t&&(t={});var o="function"==typeof e.clone?e.clone():On(e),s=o.headers,a=o.query,u=void 0===a?{}:a;try{for(var c=Object(l.__values)(Object.keys(s)),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.toLowerCase();"x-amz-"!==h.substr(0,6)||(null===(i=t.unhoistableHeaders)||void 0===i?void 0:i.has(h))||(u[d]=s[d],delete s[d])}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object(l.__assign)(Object(l.__assign)({},e),{headers:s,query:u})}(Pn(e),{unhoistableHeaders:a}),d.sessionToken&&(b.query["X-Amz-Security-Token"]=d.sessionToken),b.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",b.query["X-Amz-Credential"]=d.accessKeyId+"/"+m,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=o.toString(10),w=Cn(b,s,u),b.query["X-Amz-SignedHeaders"]=Rn(w),_=b.query,S="X-Amz
125-Signature",A=this.getSignature,E=[v,m,this.getSigningKey(d,h,y,f)],C=this.createCanonicalRequest,I=[b,w],[4,In(e,this.sha256)]);case 5:return[4,A.apply(this,E.concat([C.apply(this,I.concat([O.sent()]))]))];case 6:return _[S]=O.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Object(l.__awaiter)(this,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){return"string"==typeof e?[2,this.signString(e,t)]:e.headers&&e.payload?[2,this.signEvent(e,t)]:[2,this.signRequest(e,t)]}))}))},e.prototype.signEvent=function(e,t){var n=e.headers,r=e.payload,i=t.signingDate,o=void 0===i?new Date:i,s=t.priorSignature,a=t.signingRegion,u=t.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var e,t,i,c,f,d,h,p,g,v,y;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return null==a?[3,1]:(t=a,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=l.sent(),l.label=3;case 3:return e=t,i=Mn(o),c=i.shortDate,f=i.longDate,d=An(c,e,null!=u?u:this.service),[4,In({headers:{},body:r},this.sha256)];case 4:return h=l.sent(),(p=new this.sha256).update(n),v=dn.a,[4,p.digest()];case 5:return g=v.apply(void 0,[l.sent()]),y=[wn,f,d,s,g,h].join("\n"),[2,this.signString(y,{signingDate:o,signingRegion:e,signingService:u})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signingRegion,s=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,a,u,c,f,d;return Object(l.__generator)(this,(function(l){switch(l.label){case 0:return[4,this.credentialProvider()];case 1:return t=l.sent(),null==o?[3,2]:(r=o,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=l.sent(),l.label=4;case 4:return n=r,a=Mn(i).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,a,s)];case 5:return(u=new(f.apply(c,[void 0,l.sent()]))).update(e),d=dn.a,[4,u.digest()];case 6:return[2,d.apply(void 0,[l.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,i=void 0===r?new Date:r,o=n.signableHeaders,s=n.unsignableHeaders,a=n.signingRegion,u=n.signingService;return Object(l.__awaiter)(this,void 0,void 0,(function(){var t,n,r,c,f,d,h,p,g,v,y;return Object(l.__generator)(this,(function(m){switch(m.label){case 0:return[4,this.credentialProvider()];case 1:return t=m.sent(),null==a?[3,2]:(r=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=m.sent(),m.label=4;case 4:return n=r,c=Pn(e),f=Mn(i),d=f.longDate,h=f.shortDate,p=An(h,n,null!=u?u:this.service),c.headers[hn]=d,t.sessionToken&&(c.headers[vn]=t.sessionToken),[4,In(c,this.sha256)];case 5:return g=m.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var i=Object(l.__values)(Object.keys(t)),o=i.next();!o.done;o=i.next()){if(e===o.value.toLowerCase())return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",c.headers)&&this.applyChecksum&&(c.headers["x-amz-content-sha256"]=g),v=Cn(c,s,o),[4,this.getSignature(d,p,this.getSigningKey(t,n,h,u),this.createCanonicalRequest(c,v,g))];case 6:return y=m.sent(),c.headers.authorization="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Rn(v)+", Signature="+y,[2,c]}}))}))},e.prototype.createCanonicalRequest=function(e,t,n){var r=Object.keys(t).sort();return e.method+"\n"+this.getCanonicalPath(e)+"\n"+function(e){var t,n,r=e.query,i=void 0===r?{}:r,o=[],s={},a=function(e){if(e.toLowerCase()===gn)return"continue";o.push(e);var t=i[e];"string"==typeof t?s[e]=mt(e)+"="+mt(t):Array.isArray(t)&&(s[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([mt(e)+"="+mt(n)])}),[]).join("&"))};try{for(var u=Object(l.__values)(Object.keys(i).sort()),c=u.next();!c.done;c=u.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return o.map((function(e){return s[e]})).filter((function(e){return e})).join("&")}(e)+"\n"+r.map((function(e){return e+":"+t[e]})).join("\n")+"\n\n"+r.join(";")+"\n"+n},e.prototype.createStringToSign=function(e,t,n){return Object(l.__awaiter)(this,void 0,void 0,(function(){var r,i;return Object(l.__generator)(this,(function(o){switch(o.label){case 0:return(r=ne
125w this.sha256).update(n),[4,r.digest()];case 1:return i=o.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Object(dn.a)(i)]}}))}))},e.prototype.getCanonicalPath=function(e){var t=e.path;return this.uriEscapePath?"/"+encodeURIComponent(t.replace(/^\//,"")).replace(/%2F/g,"/"):t},e.prototype.getSignature=function(e,t,n,r){return Object(l.__awaiter)(this,void 0,void 0,(function(){var i,o,s,a,u;return Object(l.__generator)(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return i=c.sent(),a=(s=this.sha256).bind,[4,n];case 2:return(o=new(a.apply(s,[void 0,c.sent()]))).update(i),u=dn.a,[4,o.digest()];case 3:return[2,u.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,i){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var o,s,a,u,c,f,d,h,p;return Object(l.__generator)(this,(function(g){switch(g.label){case 0:return[4,En(e,t.secretAccessKey,t.accessKeyId)];case 1:if(o=g.sent(),(s=n+":"+r+":"+i+":"+Object(dn.a)(o)+":"+t.sessionToken)in _n)return[2,_n[s]];for(Sn.push(s);Sn.length>50;)delete _n[Sn.shift()];a="AWS4"+t.secretAccessKey,g.label=2;case 2:g.trys.push([2,7,8,9]),u=Object(l.__values)([n,r,i,"aws4_request"]),c=u.next(),g.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,En(e,a,f)]);case 4:a=g.sent(),g.label=5;case 5:return c=u.next(),[3,3];case 6:return[3,9];case 7:return d=g.sent(),h={error:d},[3,9];case 8:try{c&&!c.done&&(p=u.return)&&p.call(u)}finally{if(h)throw h.error}return[7];case 9:return[2,_n[s]=a]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Mn=function(e){var t=kn(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Rn=function(e){return Object.keys(e).sort().join(";")},xn=function(e){if("string"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Un=function(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Dn(e){if("object"==typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var jn=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ln=function(e){var t=Object(l.__read)(e,2),n=t[0],r=t[1],i=n.indexOf("/"),o=n.substring(0,i),s=n.substring(i+1);return"api"===o&&(s=s.toLowerCase()),[o,s,r].filter((function(e){return e&&e.length>0})).map((function(e){return null==e?void 0:e.replace(jn,"_")})).join("/")},Fn={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Bn=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Object(l.__awaiter)(void 0,void 0,void 0,(function(){var i,o,s,a,u,c,f,d;return Object(l.__generator)(this,(function(h){switch(h.label){case 0:return i=r.request,_e.isInstance(i)?(o=i.headers,s=(null===(f=null==t?void 0:t.userAgent)||void 0===f?void 0:f.map(Ln))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return a=h.sent().map(Ln),u=(null===(d=null==n?void 0:n.customUserAgent)||void 0===d?void 0:d.map(Ln))||[],o["x-amz-user-agent"]=Object(l.__spread)(a,s,u).join(" "),c=Object(l.__spread)(a.filter((function(e){return e.startsWith("aws-sdk-")})),u).join(" "),"browser"!==n.runtime&&c&&(o["user-agent"]=o["user-agent"]?o["user-agent"]+" "+c:c),[2,e(Object(l.__assign)(Object(l.__assign)({},r),{request:i}))]}}))}))}}),Fn)}}},qn=function(e){function t(t){var n,r,i=this,o=function(e){var t,n=this,r=Dn(e.credentials||e.credentialDefaultProvider(e)),i=e.signingEscapePath,o=void 0===i||i,s=e.systemClockOffset,a=void 0===s?e.systemClockOffset||0:s,u=e.sha256;return t=e.signer?Dn(e.signer):function(){return Dn(e.region)().then((function(t){return Object(l.__awaiter)(n,void 0,void 0,(function(){return Object(l.__generator)(this,(function(n){switch(n.label){case 0:return[4,e.regionInfoProvider(t)];case 1:return[2,[n.sent()||{},t]]}}))}))})).then((function(t){var n=Object(l.__read)(t,2),i=n[0],s=n[1],a=i.signingRegion,c=i.signingService;return e.signingRegion=e.signingRegion||a||s,e.signingName=e.signingName||c||e.serviceId,new Nn({credentials:r,region:e.signingRegion,service:e.signingName,sha256:u,uriEscapePath:o})}))},Object(l.__assign)(Object(l.__assign)({},e),{systemClockOffset:a,signingEscapePath:o,credentials:r,signer:t})}(function(e){var t;return Object(l.__assign)(Object(l.__assign)({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?nn(e):function(){return rn(e)},isCustomEndpoint:!!e.endpoint})}(function(e){if(!e.region)throw new Error("Region is missing");return Object(l.__assign)(Object(l.__assign)({},e),{region:on(e.region)})}(h(h({},tn),t)))),s=function(e){return Object(l.__assign)(Object(l.__assign)({},e),{customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent})}((r=qt((n=o).maxAttempts),Object(l.__assign)(Object(l.__assign)({},n),{maxAttempts:r,retryStrategy:n.retryStrategy||new Bt(r)})));return(i=e.call(this,s)||this).config=s,i.middlewareStack.use(Nt(i.config)),i.middlewareStack.use(an(i.config)),i.middlewareStack.use(cn(i.config)),i.middlewareStack.use(fn(i.config)),i.middlewareStack.use(Bn(i.config)),i}return d(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ot),Vn=function(){return(Vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}
125,Kn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},zn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Hn=new r.a("Credentials"),Gn=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.Auth=void 0,this.configure(e),this._refreshHandlers.google=s.b.refreshGoogleToken,this._refreshHandlers.facebook=s.a.refreshFacebookToken}return e.prototype.getModuleName=function(){return"Credentials"},e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=Vn(Vn({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new i.b).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return Hn.debug("getting credentials"),this._pickupCredentials()},e.prototype._pickupCredentials=function(){return Hn.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?Hn.debug("getting old cred promise"):(Hn.debug("getting new cred promise"),this._gettingCredPromise=Object(o.i)(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){return Kn(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return zn(this,(function(a){switch(a.label){case 0:if(Hn.debug("checking if credentials exists and not expired"),(e=this._credentials)&&!this._isExpired(e)&&!this._isPastTTL())return Hn.debug("credentials not changed and not expired, directly return"),[2,Promise.resolve(e)];if(Hn.debug("need to get a new credential or refresh the existing one"),t=this.Auth,!(n=void 0===t?c.a.Auth:t)||"function"!=typeof n.currentUserCredentials)return[2,Promise.reject("No Auth module registered in Amplify")];if(this._isExpired(e)||!this._isPastTTL())return[3,6];Hn.debug("ttl has passed but token is not yet expired"),a.label=1;case 1:return a.trys.push([1,5,,6]),[4,n.currentUserPoolUser()];case 2:return r=a.sent(),[4,n.currentSession()];case 3:return i=a.sent(),o=i.refreshToken,[4,new Promise((function(e,t){r.refreshSession(o,(function(n,r){return n?t(n):e(r)}))}))];case 4:return a.sent(),[3,6];case 5:return s=a.sent(),Hn.debug("Error attempting to refreshing the session",s),[3,6];case 6:return[2,n.currentUserCredentials()]}}))}))},e.prototype.refreshFederatedToken=function(e){Hn.debug("Getting federated credentials");var t=e.provider,n=e.user,r=e.token,i=e.identity_id,o=e.expires_at;o=1970===new Date(o).getFullYear()?1e3*o:o;return Hn.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(Hn.debug("token not expired"),this._setCredentialsFromFederation({provider:t,token:r,user:n,identity_id:i,expires_at:o})):this._refreshHandlers[t]&&"function"==typeof this._refreshHandlers[t]?(Hn.debug("getting refreshed jwt token from federation provider"),this._providerRefreshWithRetry({refreshHandler:this._refreshHandlers[t],provider:t,user:n})):(Hn.debug("no refresh handler for provider:",t),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._providerRefreshWithRetry=function(e){var t=this,n=e.refreshHandler,r=e.provider,i=e.user;return Object(a.b)(n,[],1e4).then((function(e){return Hn.debug("refresh federated token sucessfully",e),t._setCredentialsFromFederation({provider:r,token:e.token,user:i,identity_id:e.identity_id,expires_at:e.expires_at})})).catch((function(e){return"string"==typeof e&&0===e.toLowerCase().lastIndexOf("network error",e.length)||t.clear(),Hn.debug("refresh federated token failed",e),Promise.reject("refreshing federation token failed: "+e)}))},e.prototype._isExpired=function(e){if(!e)return Hn.debug("no credentials for expiration check"),!0;Hn.debug("are these credentials expired?",e);var t=Date.now();return e.expiration.getTime()<=t},e.prototype._isPastTTL=function(){return this._nextCredentialsRefresh<=Date.now()},e.prototype._setCredentialsForGuest=function(){return Kn(this,void 0,void 0,(function(){var e,t,n,r,i,o,s,a=this;return zn(this,(function(c){switch(c.label){case 0:if(Hn.debug("setting credentials for guest"),e=this._config,t=e.identityPoolId,n=e.region,e.mandatorySignIn)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!t)return Hn.debug("No Cognito Identity pool provided for unauthenticated access"),[2,Promise.reject("No Cognito Identity pool provided for unauthenticated access")];if(!n)return Hn.debug("region is not configured for getting the credentials"),[2,Promise.reject("region is not configured for getting the credentials")];r=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this._storageSync];case 2:return c.sent(),r=this._storage.getItem("CognitoIdentityId-"+t),this._identityId=r,[3,4];case 3:return i=c.sent(),Hn.debug("Failed to get the cached identityId",i),[3,4];case 4:return o=new qn({region:n,customUserAgent:Object(u.b)()}),s=void 0,s=r?ft({identityId:r,client:o})():function(){return Kn(a,void 0,void 0,(function(){var e;return zn(this,(function(n){switch(n.label){case 0:return[4,o.send(new dt({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,ft({client:o,identityId:e})()]}}))}))}().catch((function(e){return Kn(a,void 0,void 0,(function(){return zn(this,(function(t){throw e}))}))})),[2,this._loadCredentials(s,"guest",!1,null).then((function(e){return e})).catch((function(e){return Kn(a,void 0,void 0,(function(){var n=this;return zn(this,(function(i){return"ResourceNotFoundException"===e.name&&e.message==="Identity '"+r+"' not found."?(Hn.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+t),s=function(){return Kn(n,void 0,void 0,(function(){var e;return zn(this,(function(n){switch(n.label){case 0:return[4,o.send(new dt({IdentityPoolId:t}))];case 1:return e=n.sent().IdentityId,this._identityId=e,[2,ft({client:o,identityId:e})()]}}))}))}().catch((function(e){return Kn(n,void 0,void 0,(function(){return zn(this,(function(t){throw e}))}))})),[2,this._loadCredentials(s,"guest",!1,null)]):[2,e]}))}))}))]}}))}))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,n=e.token,r=e.identity_id,i={google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t;if(!i)return Promise.reject("You must specify a federated provider");var o={};o[i]=n;var s=this._config,a=s.identityPoolId,c=s.region;if(!a)return Hn.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");
125if(!c)return Hn.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var l=new qn({region:c,customUserAgent:Object(u.b)()}),f=void 0;r?f=ft({identityId:r,logins:o,client:l})():f=gt({logins:o,identityPoolId:a,client:l})();return this._loadCredentials(f,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){var t=this;Hn.debug("set credentials from session");var n=e.getIdToken().getJwtToken(),r=this._config,i=r.region,o=r.userPoolId,s=r.identityPoolId;if(!s)return Hn.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");if(!i)return Hn.debug("region is not configured for getting the credentials"),Promise.reject("region is not configured for getting the credentials");var a={};a["cognito-idp."+i+".amazonaws.com/"+o]=n;var c=new qn({region:i,customUserAgent:Object(u.b)()}),l=Kn(t,void 0,void 0,(function(){var e;return zn(this,(function(t){switch(t.label){case 0:return[4,c.send(new dt({IdentityPoolId:s,Logins:a}))];case 1:return e=t.sent().IdentityId,this._identityId=e,[2,ft({client:c,logins:a,identityId:e})()]}}))})).catch((function(e){return Kn(t,void 0,void 0,(function(){return zn(this,(function(t){throw e}))}))}));return this._loadCredentials(l,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var i=this,o=this,s=this._config.identityPoolId;return new Promise((function(a,u){e.then((function(e){return Kn(i,void 0,void 0,(function(){var i,u,c,l,f,d;return zn(this,(function(h){switch(h.label){case 0:if(Hn.debug("Load credentials successfully",e),this._identityId&&!e.identityId&&(e.identityId=this._identityId),o._credentials=e,o._credentials.authenticated=n,o._credentials_source=t,o._nextCredentialsRefresh=(new Date).getTime()+3e6,"federated"===t){i=Object.assign({id:this._credentials.identityId},r.user),u=r.provider,c=r.token,l=r.expires_at,f=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:u,token:c,user:i,expires_at:l,identity_id:f}))}catch(e){Hn.debug("Failed to put federated info into auth storage",e)}}if("guest"!==t)return[3,4];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this._storageSync];case 2:return h.sent(),this._storage.setItem("CognitoIdentityId-"+s,e.identityId),[3,4];case 3:return d=h.sent(),Hn.debug("Failed to cache identityId",d),[3,4];case 4:return a(o._credentials),[2]}}))}))})).catch((function(t){if(t)return Hn.debug("Failed to load credentials",e),Hn.debug("Error loading credentials",t),void u(t)}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(Hn.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return Kn(this,void 0,void 0,(function(){return zn(this,(function(e){return this._credentials=null,this._credentials_source=null,Hn.debug("removing aws-amplify-federatedInfo from storage"),this._storage.removeItem("aws-amplify-federatedInfo"),[2]}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}(),Wn=new Gn(null);c.a.register(Wn)},function(e,t,n){"use strict";var r,i;function o(e){return e&&!!["provider"].find((function(t){return e.hasOwnProperty(t)}))}function s(e){return void 0!==e.redirectSignIn}n.r(t),n.d(t,"API",(function(){return lr})),n.d(t,"APIClass",(function(){return cr})),n.d(t,"graphqlOperation",(function(){return nr})),n.d(t,"GraphQLAuthError",(function(){return Jn})),n.d(t,"GRAPHQL_AUTH_MODE",(function(){return Wn})),function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon",e.Apple="SignInWithApple"}(r||(r={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyC
125hallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default"}(i||(i={}));var a,u=n(14),c=n(40),l=n(32),f=n(49),d=n(65),h=n(13),p=n(5),g=n(50),v=n(7),y=n(4),m=n(2),b=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},w=n(21),_=n.n(w),S=n(22),A=n.n(S),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},C=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},I=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},O=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},T="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",P=function(e,t,n){c.a.dispatch("auth",{event:e,data:t,message:n},"Auth",T)},k=new u.a("OAuth"),N=function(){function e(e){var t=e.config,n=e.cognitoClientId,r=e.scopes,i=void 0===r?[]:r;if(this._urlOpener=t.urlOpener||b,this._config=t,this._cognitoClientId=n,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return e.prototype.isValidScopes=function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))},e.prototype.oauthSignIn=function(e,t,n,i,o,s){void 0===e&&(e="code"),void 0===o&&(o=r.Cognito);var a=this._generateState(32),u=s?a+"-"+Object(g.b)(s):a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(u);var c,l=this._generateRandom(128);c=l,window.sessionStorage.setItem("ouath_pkce_key",c);var f=this._generateChallenge(l),d=this._scopes.join(" "),h="https://"+t+"/oauth2/authorize?"+Object.entries(E(E({redirect_uri:n,response_type:e,client_id:i,identity_provider:o,scope:d,state:u},"code"===e?{code_challenge:f}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map((function(e){var t=O(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&");k.debug("Redirecting to "+h),this._urlOpener(h,n)},e.prototype._handleCodeFlow=function(e){return C(this,void 0,void 0,(function(){var t,n,r,i,o,a,u,c,l,f,d,h,p,g;return I(this,(function(v){switch(v.label){case 0:return t=(Object(m.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=O(t,2),i=r[0],o=r[1];return E(E({},e),((n={})[i]=o,n))}),{code:void 0}).code,n=Object(m.parse)(e).pathname||"/",r=Object(m.parse)(this._config.redirectSignIn).pathname||"/",t&&n===r?(i="https://"+this._config.domain+"/oauth2/token",P("codeFlow",{},"Retrieving tokens from "+i),o=s(this._config)?this._cognitoClientId:this._config.clientID,a=s(this._config)?this._config.redirectSignIn:this._config.redirectUri,y=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),c=E({grant_type:"authorization_code",code:t,client_id:o,redirect_uri:a},(u=y)?{code_verifier:u}:{}),k.debug("Calling token endpoint: "+i+" with",c),l=Object.entries(c).map((function(e){var t=O(e,2),n=t[0],r=t[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&"),[4,fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l})]):[2];case 1:return[4,v.sent().json()];case 2:if(f=v.sent(),d=f.access_token,h=f.refresh_token,p=f.id_token,g=f.error)throw new Error(g);return[2,{accessToken:d,refreshToken:h,idToken:p}]}var y}))}))},e.prototype._handleImplicitFlow=function(e){return C(this,void 0,void 0,(function(){var t,n,r;return I(this,(function(i){return t=(Object(m.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n,r=O(t,2),i=r[0],o=r[1];return E(E({},e),((n={})[i]=o,n))}),{id_token:void 0,access_token:void 0}),n=t.id_token,r=t.access_token,P("implicitFlow",{},"Got tokens from "+e),k.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:r,idToken:n,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return C(this,void 0,void 0,(function(){var t,n,r,i,o,s,a;return I(this,(function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?E(E({},(Object(m.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=O(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})),(Object(m.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=O(t,2),r=n[0],i=n[1];return e[r]=i,e}),{})):{},n=t.error,r=t.error_description,n)throw new Error(r);
125return i=this._validateState(t),k.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,E.apply(void 0,[E.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,E.apply(void 0,[E.apply(void 0,s.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw a=u.sent(),k.error("Error handling auth response.",a),a;case 6:return[2]}}))}))},e.prototype._validateState=function(e){if(e){var t,n=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),r=e.state;if(n&&n!==r)throw new Error("Invalid state in OAuth flow");return r}},e.prototype.signOut=function(){return C(this,void 0,void 0,(function(){var e,t,n;return I(this,(function(r){return e="https://"+this._config.domain+"/logout?",t=s(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=s(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map((function(e){var t=O(e,2);return t[0]+"="+t[1]})).join("&"),P("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),k.debug("Signing out from "+e),[2,this._urlOpener(e)]}))}))},e.prototype._generateState=function(e){for(var t="",n=e,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=r[Math.round(Math.random()*(r.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(_()(e))},e.prototype._base64URL=function(e){return e.toString(A.a).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".length|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=0;r<e.byteLength;r+=1){var i=e[r]%t.length;n.push(t[i])}return n.join("")},e}();!function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty"}(a||(a={}));var M,R=(M=function(e,t){return(M=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(e,t){function n(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),x=new u.a("AuthError"),U=function(e){function t(n){var r=this,i=j[n],o=i.message,s=i.log;return(r=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="AuthError",r.log=s||o,x.error(r.log),r}return R(t,e),t}(Error),D=function(e){function t(n){var r=e.call(this,n)||this;return r.constructor=t,Object.setPrototypeOf(r,t.prototype),r.name="NoUserPoolError",r}return R(t,e),t}(U),j={noConfig:{message:a.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of amplify packages in your node_modules.\n\t\t\t\tRefer to our docs site for help upgrading Amplify packages (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js)\n "},missingAuthConfig:{message:a.DEFAULT_MSG,log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties.\n This error is typically caused by one of the following scenarios:\n\n 1. Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n\n 2. This could also be caused by multiple conflicting versions of amplify packages, see (https://docs.amplify.aws/lib/troubleshooting/upgrading/q/platform/js) for help upgrading Amplify packages.\n "}
125,emptyUsername:{message:a.EMPTY_USERNAME},invalidUsername:{message:a.INVALID_USERNAME},emptyPassword:{message:a.EMPTY_PASSWORD},emptyCode:{message:a.EMPTY_CODE},signUpError:{message:a.SIGN_UP_ERROR,log:"The first parameter should either be non-null string or object"},noMFA:{message:a.NO_MFA},invalidMFA:{message:a.INVALID_MFA},emptyChallengeResponse:{message:a.EMPTY_CHALLENGE},noUserSession:{message:a.NO_USER_SESSION},default:{message:a.DEFAULT_MSG}},L=function(){return(L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},F=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},B=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},q=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},V=new u.a("AuthClass"),K="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",z=function(e,t,n){c.a.dispatch("auth",{event:e,data:t,message:n},"Auth",K)},H=new(function(){function e(e){var t=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.Credentials=l.a,this.wrapRefreshSessionCallback=function(e){return function(t,n){return n?z("tokenRefresh",void 0,"New token retrieved"):z("tokenRefresh_failure",t,"Failed to retrieve new token"),e(t,n)}},this.configure(e),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),c.a.listen("auth",(function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}}))}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};V.debug("configure Auth");var n=Object.assign({},this._config,f.a.parseMobilehubConfig(e).Auth,e);this._config=n;var r=this._config,i=r.userPoolId,o=r.userPoolWebClientId,a=r.cookieStorage,u=r.oauth,c=r.region,l=r.identityPoolId,g=r.mandatorySignIn,v=r.refreshHandlers,m=r.identityPoolRegion,b=r.clientMetadata,w=r.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw V.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=a?new y.CookieStorage(a):e.ssr?new d.a:(new h.b).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var _={UserPoolId:i,ClientId:o,endpoint:w};_.Storage=this._storage,this.userPool=new y.CognitoUserPool(_,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:g,region:m||c,userPoolId:i,identityPoolId:l,refreshHandlers:v,storage:this._storage});var S=u?s(this._config.oauth)?u:u.awsCognito:void 0;if(S){var A=Object.assign({cognitoClientId:o,UserPoolId:i,domain:S.domain,scopes:S.scope,redirectSignIn:S.redirectSignIn,redirectSignOut:S.redirectSignOut,responseType:S.responseType,Storage:this._storage,urlOpener:S.urlOpener,clientMetadata:b},S.options);this._oAuthHandler=new N({scopes:A.scopes,config:A,cognitoClientId:A.cognitoClientId});var E={};!function(e){if(p.a.browserOrNode().isBrowser&&window.location)e({url:window.location.href});else if(!p.a.browserOrNode().isNode)throw new Error("Not supported")}((function(e){var n=e.url;E[n]||(E[n]=!0,t._handleAuthResponse(n))}))}return z("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(!this.userPool)return this.rejectNoUserPool();var o,s=null,a=null,u=[],c=null;if(e&&"string"==typeof e){s=e,a=n?n[0]:null;var l=n?n[1]:null,f=n?n[2]:null;l&&u.push(new y.CognitoUserAttribute({Name:"email",Value:l})),f&&u.push(new y.CognitoUserAttribute({Name:"phone_number",Value:f}))}else{if(!e||"object"!=typeof e)return this.rejectAuthError(i.SignUpError);s=e.username,a=e.password,e&&e.clientMetadata?o=e.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata);var d=e.attributes;d&&Object.keys(d).map((function(e){u.push(new y.CognitoUserAttribute({Name:e,Value:d[e]}))}));var h=e.validationData;h&&(c=[],Object.keys(h).map((function(e){c.push(new y.CognitoUserAttribute({Name:e,Value:h[e]}))})))}return s?a?(V.debug("signUp attrs:",u),V.debug("signUp validation data:",c),new Promise((function(e,n){t.userPool.signUp(s,a,u,c,(function(t,r){t?(z("signUp_failure",t,s+" failed to signup"),n(t)):(z("signUp",r,s+" has signed up successfully"),e(r))}),o)}))):this.rejectAuthError(i.EmptyPassword):this.rejectAuthError(i.EmptyUsername)}
125,e.prototype.confirmSignUp=function(e,t,n){if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);var r,o=this.createCognitoUser(e),s=!n||"boolean"!=typeof n.forceAliasCreation||n.forceAliasCreation;return n&&n.clientMetadata?r=n.clientMetadata:this._config.clientMetadata&&(r=this._config.clientMetadata),new Promise((function(e,n){o.confirmRegistration(t,s,(function(t,r){t?n(t):e(r)}),r)}))},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(e,r){n.resendConfirmationCode((function(t,n){t?r(t):e(n)}),t)}))},e.prototype.signIn=function(e,t,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var r=null,o=null,s={};if("string"==typeof e)r=e,o=t;else{if(!e.username)return this.rejectAuthError(i.InvalidUsername);void 0!==t&&V.warn("The password should be defined under the first parameter object!"),r=e.username,o=e.password,s=e.validationData}if(!r)return this.rejectAuthError(i.EmptyUsername);var a=new y.AuthenticationDetails({Username:r,Password:o,ValidationData:s,ClientMetadata:n});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,n){var r=this,i=this;return{onSuccess:function(o){return F(r,void 0,void 0,(function(){var r,s,a,u;return B(this,(function(c){switch(c.label){case 0:V.debug(o),delete e.challengeName,delete e.challengeParam,c.label=1;case 1:return c.trys.push([1,4,5,9]),[4,this.Credentials.clear()];case 2:return c.sent(),[4,this.Credentials.set(o,"session")];case 3:return r=c.sent(),V.debug("succeed to get cognito credentials",r),[3,9];case 4:return s=c.sent(),V.debug("cannot get cognito credentials",s),[3,9];case 5:return c.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return a=c.sent(),i.user=a,z("signIn",a,"A user "+e.getUsername()+" has been signed in"),t(a),[3,8];case 7:return u=c.sent(),V.error("Failed to get the signed in user",u),n(u),[3,8];case 8:return[7];case 9:return[2]}}
125))}))},onFailure:function(t){V.debug("signIn failure",t),z("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){V.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=n,t(e)},mfaRequired:function(n,r){V.debug("signIn MFA required"),e.challengeName=n,e.challengeParam=r,t(e)},mfaSetup:function(n,r){V.debug("signIn mfa setup",n),e.challengeName=n,e.challengeParam=r,t(e)},newPasswordRequired:function(n,r){V.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:n,requiredAttributes:r},t(e)},totpRequired:function(n,r){V.debug("signIn totpRequired"),e.challengeName=n,e.challengeParam=r,t(e)},selectMFAType:function(n,r){V.debug("signIn selectMFAType",n),e.challengeName=n,e.challengeParam=r,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this;if(this.pendingSignIn)throw new Error("Pending sign-in attempt already in progress");var n=this.createCognitoUser(e.getUsername());return this.pendingSignIn=new Promise((function(r,i){n.authenticateUser(e,t.authCallbacks(n,(function(e){t.pendingSignIn=null,r(e)}),(function(e){t.pendingSignIn=null,i(e)})))})),this.pendingSignIn},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise((function(r,i){n.initiateAuth(e,t.authCallbacks(n,r,i))}))},e.prototype.getMFAOptions=function(e){return new Promise((function(t,n){e.getMFAOptions((function(e,r){if(e)return V.debug("get MFA Options failed",e),void n(e);V.debug("get MFA options success",r),t(r)}))}))},e.prototype.getPreferredMFA=function(e,t){var n=this,r=this;return new Promise((function(i,o){var s=n._config.clientMetadata,a=!!t&&t.bypassCache;e.getUserData((function(e,t){if(e)return V.debug("getting preferred mfa failed",e),void o(e);var n=r._getMfaTypeFromUserData(t);return n?void i(n):void o("invalid MFA Type")}),{bypassCache:a,clientMetadata:s})}))},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var r=e.UserMFASettingList;if(r)0===r.length?t="NOMFA":V.debug("invalid case for getPreferredMFA",e);else t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){return new Promise((function(n,r){e.getUserData((function(e,t){return e?(V.debug("getting user data failed",e),void r(e)):void n(t)}),t)}))},e.prototype.setPreferredMFA=function(e,t){return F(this,void 0,void 0,(function(){var n,r,o,s,a,u;return B(this,(function(c){switch(c.label){case 0:return n=this._config.clientMetadata,[4,this._getUserData(e,{bypassCache:!0,clientMetadata:n})];case 1:switch(r=c.sent(),o=null,s=null,t){case"TOTP":return[3,2];case"SMS":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return s={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return a=r.UserMFASettingList,[4,this._getMfaTypeFromUserData(r)];case 5:if("NOMFA"===(u=c.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)o={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,this.rejectAuthError(i.InvalidMFA)];s={PreferredMfa:!1,Enabled:!1}}return a&&0!==a.length&&a.forEach((function(e){"SMS_MFA"===e?o={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(s={PreferredMfa:!1,Enabled:!1})})),[3,7];case 6:return V.debug("no validmfa method provided"),[2,this.rejectAuthError(i.NoMFA)];case 7:return this,[2,new Promise((function(t,r){e.setUserMfaPreference(o,s,(function(i,o){if(i)return V.debug("Set user mfa preference error",i),r(i);V.debug("Set user mfa success",o),V.debug("Caching the latest user data into local"),e.getUserData((function(e,n){return e?(V.debug("getting user data failed",e),r(e)):t(o)}),{bypassCache:!0,clientMetadata:n})}))}))]}}))}))},e.prototype.disableSMS=function(e){return new Promise((function(t,n){e.disableMFA((function(e,r){if(e)return V.debug("disable mfa failed",e),void n(e);V.debug("disable mfa succeed",r),t(r)}))}))},e.prototype.enableSMS=function(e){return new Promise((function(t,n){e.enableMFA((function(e,r){if(e)return V.debug("enable mfa failed",e),void n(e);V.debug("enable mfa succeed",r),t(r)}))}))},e.prototype.setupTOTP=function(e){return new Promise((function(t,n){e.associateSoftwareToken({onFailure:function(e){V.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){V.debug("associateSoftwareToken sucess",e),t(e)}})}))},e.prototype.verifyTotpToken=function(e,t){return V.debug("verification totp token",e,t),new Promise((function(n,r){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){V.debug("verifyTotpToken failed",e),r(e)},onSuccess:function(t){z("signIn",e,"A user "+e.getUsername()+" has been signed in"),V.debug("verifyTotpToken success",t),n(t)}})}))},e.prototype.confirmSignIn=function(e,t,n,r){var o=this;if(void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyCode);var s=this;return new Promise((function(i,a){e.sendMFACode(t,{onSuccess:function(t){return F(o,void 0,void 0,(function(){var n,r;return B(this,(function(o){switch(o.label){case 0:V.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),V.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),V.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,z("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}}
125))}))},onFailure:function(e){V.debug("confirm signIn failure",e),a(e)}},n,r)}))},e.prototype.completeNewPassword=function(e,t,n,r){var o=this;if(void 0===n&&(n={}),void 0===r&&(r=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyPassword);var s=this;return new Promise((function(i,a){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return F(o,void 0,void 0,(function(){var n,r;return B(this,(function(o){switch(o.label){case 0:V.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,this.Credentials.clear()];case 2:return o.sent(),[4,this.Credentials.set(t,"session")];case 3:return n=o.sent(),V.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=o.sent(),V.debug("cannot get cognito credentials",r),[3,6];case 5:return s.user=e,z("signIn",e,"A user "+e.getUsername()+" has been signed in"),i(e),[7];case 6:return[2]}}))}))},onFailure:function(e){V.debug("completeNewPassword failure",e),z("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),a(e)},mfaRequired:function(t,n){V.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=n,i(e)},mfaSetup:function(t,n){V.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,i(e)},totpRequired:function(t,n){V.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,i(e)}},r)}))},e.prototype.sendCustomChallengeAnswer=function(e,t,n){var r=this;if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(i.EmptyChallengeResponse);return new Promise((function(i,o){e.sendCustomChallengeAnswer(t,r.authCallbacks(e,i,o),n)}))},e.prototype.updateUserAttributes=function(e,t,n){void 0===n&&(n=this._config.clientMetadata);var r=[],i=this;return new Promise((function(o,s){i.userSession(e).then((function(i){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var u={Name:a,Value:t[a]};r.push(u)}e.updateAttributes(r,(function(e,t){return e?s(e):o(t)}),n)}))}))},e.prototype.userAttributes=function(e){var t=this;return new Promise((function(n,r){t.userSession(e).then((function(t){e.getUserAttributes((function(e,t){e?r(e):n(t)}))}))}))},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then((function(e){var n=t.attributesToObject(e),r={},i={};return n.email&&(n.email_verified?i.email=n.email:r.email=n.email),n.phone_number&&(n.phone_number_verified?i.phone_number=n.phone_number:r.phone_number=n.phone_number),{verified:i,unverified:r}}))},e.prototype.currentUserPoolUser=function(e){var t=this;return this.userPool?new Promise((function(n,r){t._storageSync.then((function(){return F(t,void 0,void 0,(function(){var t,i,o=this;return B(this,(function(s){switch(s.label){case 0:return this.isOAuthInProgress()?(V.debug("OAuth signIn in progress, waiting for resolution..."),[4,new Promise((function(e){var t=setTimeout((function(){V.debug("OAuth signIn in progress timeout"),c.a.remove("auth",n),e()}),1e4);function n(r){var i=r.payload.event;"cognitoHostedUI"!==i&&"cognitoHostedUI_failure"!==i||(V.debug("OAuth signIn resolved: "+i),clearTimeout(t),c.a.remove("auth",n),e())}c.a.listen("auth",n)}))]):[3,2];case 1:s.sent(),s.label=2;case 2:return(t=this.userPool.getCurrentUser())?(i=this._config.clientMetadata,t.getSession((function(i,s){return F(o,void 0,void 0,(function(){var o,a,u,c=this;return B(this,(function(l){switch(l.label){case 0:return i?(V.debug("Failed to get the user session",i),r(i),[2]):(o=!!e&&e.bypassCache)?[4,this.Credentials.clear()]:[3,2];case 1:l.sent(),l.label=2;case 2:return a=this._config.clientMetadata,u=s.getAccessToken().decodePayload().scope,(void 0===u?"":u).split(" ").includes("aws.cognito.signin.user.admin")?(t.getUserData((function(e,i){if(e)return V.debug("getting user data failed",e),void("User is disabled."===e.message||"User does not exist."===e.message||"Access Token has been revoked"===e.message?r(e):n(t));for(var o=i.PreferredMfaSetting||"NOMFA",s=[],a=0;a<i.UserAttributes.length;a++){var u={Name:i.UserAttributes[a].Name,Value:i.UserAttributes[a].Value},l=new y.CognitoUserAttribute(u);s.push(l)}var f=c.attributesToObject(s);return Object.assign(t,{attributes:f,preferredMFA:o}),n(t)}),{bypassCache:o,clientMetadata:a}),[2]):(V.debug("Unable to get the user data because the aws.cognito.signin.user.admin is not in the scopes of the access token"),[2,n(t)])}}))}))}),{clientMetadata:i}),[2]):(V.debug("Failed to get user from user pool"),r("No current user"),[2])}}))}))})).catch((function(e){return V.debug("Failed to sync cache info into memory",e),r(e)}))})):this.rejectNoUserPool()},e.prototype.isOAuthInProgress=function(){return this.oAuthFlowInProgress},e.prototype.currentAuthenticatedUser=function(e){return F(this,void 0,void 0,(function(){var t,n,r,i,o;return B(this,(function(s){switch(s.label){case 0:V.debug("getting current authenticated user"),t=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this._storageSync];case 2:return s.sent(),[3,4];case 3:throw n=s.sent(),V.debug("Failed to sync cache info into memory",n),n;case 4:try{(r=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")))&&(t=L(L({},r.user),{token:r.token}))}catch(e){V.debug("cannot load federated user from auth storage")}return t?(this.user=t,V.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:V.debug("get current authenticated userpool user"),i=null,s.label=6;case 6:return s.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return i=s.sent(),[3,9];case 8:return"No userPool"===(o=s.sent())&&V.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),V.debug("The user is not authenticated by the error",o),[2,Promise.reject("The user is not authenticated")];case 9:return this.user=i,[2,this.user]}}
125))}))},e.prototype.currentSession=function(){var e=this;return V.debug("Getting current session"),this.userPool?new Promise((function(t,n){e.currentUserPoolUser().then((function(r){e.userSession(r).then((function(e){t(e)})).catch((function(e){V.debug("Failed to get the current session",e),n(e)}))})).catch((function(e){V.debug("Failed to get the current user",e),n(e)}))})):Promise.reject()},e.prototype.userSession=function(e){if(!e)return V.debug("the user is null"),this.rejectAuthError(i.NoUserSession);var t=this._config.clientMetadata;return new Promise((function(n,r){V.debug("Getting the session from this user:",e),e.getSession((function(t,i){return t?(V.debug("Failed to get the session from user",e),void r(t)):(V.debug("Succeed to get the user session",i),void n(i))}),{clientMetadata:t})}))},e.prototype.currentUserCredentials=function(){return F(this,void 0,void 0,(function(){var e,t,n=this;return B(this,(function(r){switch(r.label){case 0:V.debug("Getting current user credentials"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[3,4];case 3:throw e=r.sent(),V.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){V.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return t?[2,this.Credentials.refreshFederatedToken(t)]:[2,this.currentSession().then((function(e){return V.debug("getting session success",e),n.Credentials.set(e,"session")})).catch((function(e){return V.debug("getting session failed",e),n.Credentials.set(null,"guest")}))]}}))}))},e.prototype.currentCredentials=function(){return V.debug("getting current credentials"),this.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t,n){return void 0===n&&(n=this._config.clientMetadata),new Promise((function(r,i){e.getAttributeVerificationCode(t,{onSuccess:function(){return r()},onFailure:function(e){return i(e)}},n)}))},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise((function(r,i){e.verifyAttribute(t,n,{onSuccess:function(e){r(e)},onFailure:function(e){i(e)}})})):this.rejectAuthError(i.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then((function(n){return t.verifyUserAttribute(n,e)}))},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then((function(r){return n.verifyUserAttributeSubmit(r,e,t)}))},e.prototype.cognitoIdentitySignOut=function(e,t){return F(this,void 0,void 0,(function(){var n,r,i=this;return B(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),V.debug("Failed to sync cache info into memory",n),n;case 3:return r=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(n,o){if(e&&e.global){V.debug("user global sign out",t);var s=i._config.clientMetadata;t.getSession((function(e,s){if(e)return V.debug("failed to get the user session",e),o(e);t.globalSignOut({onSuccess:function(e){if(V.debug("global sign out success"),!r)return n();i.oAuthSignOutRedirect(n,o)},onFailure:function(e){return V.debug("global sign out failed",e),o(e)}})}),{clientMetadata:s})}else{if(V.debug("user sign out",t),t.signOut(),!r)return n();i.oAuthSignOutRedirect(n,o)}}))]}}))}))},e.prototype.oAuthSignOutRedirect=function(e,t){p.a.browserOrNode().isBrowser?this.oAuthSignOutRedirectOrReject(t):this.oAuthSignOutAndResolve(e)},e.prototype.oAuthSignOutAndResolve=function(e){this._oAuthHandler.signOut(),e()},e.prototype.oAuthSignOutRedirectOrReject=function(e){this._oAuthHandler.signOut(),setTimeout((function(){return e("Signout timeout fail")}),3e3)},e.prototype.signOut=function(e){return F(this,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return n.sent(),[3,3];case 2:return n.sent(),V.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return n.sent(),[3,6];case 5:V.debug("no current Cognito user"),n.label=6;case 6:return[3,8];case 7:V.debug("no Congito User pool"),n.label=8;case 8:return z("signOut",this.user,"A user has been signed out"),this.user=null,[2]}}))}))},e.prototype.cleanCachedItems=function(){return F(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:return[4,this.Credentials.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.changePassword=function(e,t,n,r){var i=this;return void 0===r&&(r=this._config.clientMetadata),new Promise((function(o,s){i.userSession(e).then((function(i){e.changePassword(t,n,(function(e,t){return e?(V.debug("change password failure",e),s(e)):o(t)}),r)}))}))},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var n=this.createCognitoUser(e);return new Promise((function(r,i){n.forgotPassword({onSuccess:function(){r()},onFailure:function(t){V.debug("forgot password failure",t),z("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){z("forgotPassword",n,e+" has initiated forgot password flow"),r(t)}},t)}))},e.prototype.forgotPasswordSubmit=function(e,t,n,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);if(!n)return this.rejectAuthError(i.EmptyPassword);var o=this.createCognitoUser(e);return new Promise((function(i,s){o.confirmPassword(t,n,{onSuccess:function(){z("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i()},onFailure:function(t){z("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},r)}))},e.prototype.currentUserInfo=function(){return F(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return B(this,(function(a){switch(a.label){case 0:return(e=this.Credentials.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch((function(e){return V.debug(e)}))];case 1:if(!(s=a.sent()))return[2,null];a.label=2;case 2:return a.trys.push([2,8,,9]),[4,this.userAttributes(s)];case 3:t=a.sent(),n=this.attributesToObject(t),r=null,a.label=4;case 4:return a.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return r=a.sent(),[3,7];case 6:return i=a.sent(),V.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:r?r.identityId:void 0,username:s.getUsername(),attributes:n}];case 8:return o=a.sent(),V.debug("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(s=this.user)||{}]:[2]}}))}))},e.prototype.federatedSignIn=function(e,t,n){return F(this,void 0,void 0,(function(){var i,a,u,c,l,f,d,h,p,g,v;return B(this,(function(y){switch(y.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return o(e)||(m=e)&&["customProvider"].find((function(e){return m.hasOwnProperty(e)}))||function(e){return e&&!!["customState"].find((function(t){return e.hasOwnProperty(t)}))}(e)||void 0===e?(i=e||{provider:r.Cognito},l=o(i)?i.provider:i.customProvider,o(i),a=i.customState,this._config.userPoolId&&(u=s(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,c=s(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,c,u,l,a)),[3,4]):[3,1];case 1:l=e;try{(f=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&V.warn("There is already a signed in user: "+f+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return d=t.token,h=t.identity_id,p=t.expires_at,[4,this.Credentials.set({provider:l,token:d,identity_id:h,user:n,expires_at:p},"federation")];case 2:return g=y.sent(),[4,this.currentAuthenticatedUser()];case 3:return v=y.sent(),z("signIn",v,"A user "+v.username+" has been signed in"),V.debug("federated sign in credentials",g),[2,g];case 4:return[2]}var m}))}))},e.prototype._handleAuthResponse=function(e){return F(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u,c,l,f,d,h,v;return B(this,(function(b){switch(b.label){case 0:if(this.oAuthFlowInProgress)return V.debug("Skipping URL "+e+" current flow in progress"),[2];b.label=1;case 1:if(b.trys.push([1,,8,9]),this.oAuthFlowInProgress=!0,!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(z("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(p.a.browserOrNode().isBrowser?window.location.href:""),n=!!(Object(m.parse)(t).query||"").split("&").map((function(e){return e.split("=")})).find((function(e){var t=q(e,1)[0];return"code"===t||"error"===t})),r=!!(Object(m.parse)(t).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).find((function(e){var t=q(e,1)[0];return"access_token"===t||"error"===t})),!n&&!r)return[3,7];this._storage.setItem("amplify-redirected-from-hosted-ui","true"),b.label=2;case 2:return b.trys.push([2,6,,7]),[4,this._oAuthHandler.handleAuthResponse(t)];case 3:return i=b.sent(),o=i.accessToken,s=i.idToken,a=i.refreshToken,u=i.state,c=new y.CognitoUserSession({IdToken:new y.CognitoIdToken({IdToken:s}),RefreshToken:new y.CognitoRefreshToken({RefreshToken:a}),AccessToken:new y.CognitoAccessToken({AccessToken:o})}),l=void 0,this._config.identityPoolId?[4,this.Credentials.set(c,"session")]:[3,5];
125case 4:l=b.sent(),V.debug("AWS credentials",l),b.label=5;case 5:return f=/-/.test(u),(d=this.createCognitoUser(c.getIdToken().decodePayload()["cognito:username"])).setSignInUserSession(c),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),z("signIn",d,"A user "+d.getUsername()+" has been signed in"),z("cognitoHostedUI",d,"A user "+d.getUsername()+" has been signed in via Cognito Hosted UI"),f&&(h=u.split("-").splice(1).join("-"),z("customOAuthState",Object(g.a)(h),"State for user "+d.getUsername())),[2,l];case 6:return v=b.sent(),V.debug("Error in cognito hosted auth response",v),z("signIn_failure",v,"The OAuth response flow failed"),z("cognitoHostedUI_failure",v,"A failure occurred when returning to the Cognito Hosted UI"),z("customState_failure",v,"A failure occurred when returning state"),[3,7];case 7:return[3,9];case 8:return this.oAuthFlowInProgress=!1,[7];case 9:return[2]}}))}))},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t=this,n={};return e&&e.map((function(e){"email_verified"===e.Name||"phone_number_verified"===e.Name?n[e.Name]=t.isTruthyString(e.Value)||!0===e.Value:n[e.Name]=e.Value})),n},e.prototype.isTruthyString=function(e){return"function"==typeof e.toLowerCase&&"true"===e.toLowerCase()},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var n=this._config.authenticationFlowType,r=new y.CognitoUser(t);return n&&r.setAuthenticationFlowType(n),r},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i.NoConfig:i.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new U(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new D(e))},e}())(null);v.a.register(H);var G={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new h.b).getStorage()};function W(e){var t=0;t=e.length;for(var n=e.length;n>=0;n-=1){var r=e.charCodeAt(n);r>127&&r<=2047?t+=1:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&(n-=1)}return t}function J(){return(new Date).getTime()}function Y(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var $={},Q=(function(){function e(){}e.clear=function(){$={}},e.getItem=function(e){return $[e]||null},e.setItem=function(e,t){$[e]=t},e.removeItem=function(e){delete $[e]}}(),new u.a("StorageCache")),Z=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){Y(this.config.capacityInBytes)||(Q.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=G.capacityInBytes),Y(this.config.itemMaxSize)||(Q.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=G.itemMaxSize),Y(this.config.defaultTTL)||(Q.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=G.defaultTTL),Y(this.config.defaultPriority)||(Q.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=G.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(Q.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=G.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(Q.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=G.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(Q.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=G.warningThreshold);this.config.capacityInBytes>5242880&&(Q.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=G.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:J(),visitedTime:J(),priority:n.priority,expires:n.expires,type:typeof t,byteSize:0};return r.byteSize=W(JSON.stringify(r)),r.byteSize=W(JSON.stringify(r)),r},e.prototype.configure=function(e){return e?(e.keyPrefix&&Q.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),X=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=new u.a("Cache"),te=new(function(e){function t(t){var n=this,r=t?Object.assign({},G,t):G;return(n=e.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return X(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=J(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return J()>=n.expires},t.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(e){this._decreaseCurSizeInBytes(t.byteSize),ee.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var s=JSON.parse(o);n.push(s)}}n.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){ee.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+J()};if(i.priority<1||i.priority>5)ee.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,t,i);if(o.byteSize>this.config.itemMaxSize)ee.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var s=this.config.storage.getItem(r);if(s&&this._removeItem(r,JSON.parse(s).byteSize),this._isCacheFull(o.byteSize)){var a=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var u=this._sizeToPop(o.byteSize);this._popOutItems(a,u)}}this._setItem(r,o)}catch(e){ee.warn("setItem failed! "+e)}}}else ee.warn("The value of item should not be undefined!");else ee.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){ee.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return ee.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return ee.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){ee.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(e){ee.warn("removeItem failed! "+e)}},t.prototype.clear=function(){ee.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){ee.warn("clear failed! "+e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&e.push(n.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==G.keyPrefix||(ee.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=J.toString()),new t(e)},t}(Z)),ne=te;v.a.register(te);var re=n(12),ie=n(25),oe=n(59),se=n(23),ae=n.n(se),ue=function(){return(ue=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}
125,ce=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},le=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},fe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},de=new u.a("RestClient"),he=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=l.a,this._options=e,de.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return e.prototype.ajax=function(e,t,n){return ce(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,l,f,d,h,p,g,v,y=this;return le(this,(function(b){switch(b.label){case 0:return de.debug(t,e),o="us-east-1",s="execute-api",a=void 0,"string"==typeof e?(r=this._parseUrl(e),i=e):(i=e.endpoint,a=e.custom_header,o=e.region,s=e.service,r=this._parseUrl(e.endpoint)),u={method:t,url:i,host:r.host,path:r.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},c={},re.a.isReactNative&&(l=re.a.userAgent||"aws-amplify/0.1.x",c={"User-Agent":l}),f=Object.assign({},n),d=f.response,f.body&&("function"==typeof FormData&&f.body instanceof FormData?(c["Content-Type"]="multipart/form-data",u.data=f.body):(c["Content-Type"]="application/json; charset=UTF-8",u.data=JSON.stringify(f.body))),f.responseType&&(u.responseType=f.responseType),f.withCredentials&&(u.withCredentials=f.withCredentials),f.timeout&&(u.timeout=f.timeout),f.cancellableToken&&(u.cancelToken=f.cancellableToken.token),u.signerServiceInfo=f.signerServiceInfo,"function"!=typeof a?[3,2]:[4,a()];case 1:return p=b.sent(),[3,3];case 2:p=void 0,b.label=3;case 3:return h=p,u.headers=ue(ue(ue({},c),h),f.headers),g=Object(m.parse)(i,!0,!0),g.search,v=fe(g,["search"]),u.url=Object(m.format)(ue(ue({},v),{query:ue(ue({},v.query),f.queryStringParameters||{})})),void 0!==u.headers.Authorization?(u.headers=Object.keys(u.headers).reduce((function(e,t){return u.headers[t]&&(e[t]=u.headers[t]),e}),{}),[2,this._request(u,d)]):[2,this.Credentials.get().then((function(r){return y._signed(ue({},u),r,d,{region:o,service:s}).catch((function(r){if(ie.a.isClockSkewError(r)){var i=r.response.headers,o=i&&(i.date||i.Date),s=new Date(o),a=ie.a.getDateFromHeaderString(u.headers["x-amz-date"]);if(ie.a.isClockSkewed(a,s))return ie.a.setClockOffset(s.getTime()-a.getTime()),y.ajax(e,t,n)}throw r}))}),(function(e){return de.debug("No credentials available, the request will be unsigned"),y._request(u,d)}))]}}))}))},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.cancel=function(e,t){var n=this._cancelTokenMap.get(e);return n&&n.cancel(t),!0},e.prototype.isCancel=function(e){return ae.a.isCancel(e)},e.prototype.getCancellableToken=function(){return ae.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach((function(n){n.name===e&&(r=n.endpoint,"string"==typeof n.region?t._region=n.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"==typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)})),r):r},e.prototype._signed=function(e,t,n,r){var i=r.service,o=r.region,s=e.signerServiceInfo,a=fe(e,["signerServiceInfo"]),u=o||this._region||this._options.region,c=i||this._service||this._options.service,l={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},f={region:u,service:c},d=Object.assign(f,s),h=oe.a.sign(a,l,d);return h.data&&(h.body=h.data),de.debug("Signed Request: ",h),delete h.headers.host,ae()(h).then((function(e){return n?e:e.data}
125)).catch((function(e){throw de.debug(e),e}))},e.prototype._request=function(e,t){return void 0===t&&(t=!1),ae()(e).then((function(e){return t?e:e.data})).catch((function(e){throw de.debug(e),e}))},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}(),pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ge=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},ve=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},ye=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},me=new u.a("RestAPI"),be=function(){function e(e){this._api=null,this.Credentials=l.a,this._options=e,me.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=ye(t,["API"]),o=pe(pe({},i),r);if(me.debug("configure Rest API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var s=o.aws_cloud_logic_custom;o.endpoints="string"==typeof s?JSON.parse(s):s}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)?o.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(me.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?o.endpoints=this._options.endpoints:o.endpoints=[],this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return me.debug("create Rest API instance"),this._api=new he(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.get(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.post(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.put(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.patch(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.del(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.head(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.endpoint=function(e){return ge(this,void 0,void 0,(function(){return ve(this,(function(t){return[2,this._api.endpoint(e)]}))}))},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find((function(t){return t.name===e}));if(!r)throw new Error("API "+e+" does not exist");var i={endpoint:r.endpoint+t};return"string"==typeof r.region?i.region=r.region:"string"==typeof this._options.region&&(i.region=this._options.region),"string"==typeof r.service?i.service=r.service||"execute-api":i.service="execute-api","function"==typeof r.custom_header?i.custom_header=r.custom_header:i.custom_header=void 0,i},e}(),we=new be(null);function _e(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function Se(e,t){var n=e.locationOffset.column-1,r=Ae(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,u=t.column+a,c=r.split(/\r\n|[\n\r]/g);return"".concat(e.name," (").concat(s,":").concat(u,")\n")+function(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=0,r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value[0];n=Math.max(n,u.length)}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return t.map((function(e){var t,r=e[0],i=e[1];return Ae(n-(t=r).length)+t+i})).join("\n")}([["".concat(s-1,": "),c[i-1]],["".concat(s,": "),c[i]],["",Ae(u-1)+"^"],["".concat(s+1,": "),c[i+1]]])}function Ae(e){return Array(e+1).join(" ")}function Ee(e,t,n,r,i,o,s){var a=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,u=n;if(!u&&a){var c=a[0];u=c&&c.loc&&c.loc.source}var l,f=r;!f&&a&&(f=a.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),f&&0===f.length&&(f=void 0),r&&n?l=r.map((function(e){return _e(n,e)})):a&&(l=a.reduce((function(e,t){return t.loc&&e.push(_e(t.loc.source,t.loc.start)),e}),[]));var d=s||o&&o.extensions;Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:l||void 0,enumerable:Boolean(l)},path:{value:i||void 0,enumerable:Boolean(i)},nodes:{value:a||void 0},source:{value:u||void 0},positions:{value:f||void 0},originalError:{value:o},extensions:{value:d||void 0,enumerable:Boolean(d)}}),o&&o.stack?Object.defineProperty(this,"stack",{value:o.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ee):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}v.a.register(we),Ee.prototype=Object.create(Error.prototype,{constructor:{value:Ee},name:{value:"GraphQLError"},toString:{value:function(){return function(e){var t=[];if(e.nodes){var n=!0,r=!1,i=void 0;try{for(var o,s=e.nodes[Symbol.iterator]();!(n=(o=s.next()).done);
125n=!0){var a=o.value;a.loc&&t.push(Se(a.loc.source,_e(a.loc.source,a.loc.start)))}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}else if(e.source&&e.locations){var u=e.source,c=!0,l=!1,f=void 0;try{for(var d,h=e.locations[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;t.push(Se(u,p))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}(this)}}});var Ce={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:["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","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","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Ie={};function Oe(e){return Boolean(e&&"string"==typeof e.kind)}function Te(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}function Pe(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ce,r=void 0,i=Array.isArray(e),o=[e],s=-1,a=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p=++s===o.length,g=p&&0!==a.length;if(p){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),g){if(i)u=u.slice();else{var v={};for(var y in u)u.hasOwnProperty(y)&&(v[y]=u[y]);u=v}for(var m=0,b=0;b<a.length;b++){var w=a[b][0],_=a[b][1];i&&(w-=m),i&&null===_?(u.splice(w,1),m++):u[w]=_}}s=r.index,o=r.keys,a=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?s:o[s]:void 0,null==(u=l?l[c]:h))continue;l&&f.push(c)}var S=void 0;if(!Array.isArray(u)){if(!Oe(u))throw new Error("Invalid AST Node: "+JSON.stringify(u));var A=Te(t,u.kind,p);if(A){if((S=A.call(t,u,c,l,f,d))===Ie)break;if(!1===S){if(!p){f.pop();continue}}else if(void 0!==S&&(a.push([c,S]),!p)){if(!Oe(S)){f.pop();continue}u=S}}}void 0===S&&g&&a.push([c,u]),p?f.pop():(r={inArray:i,index:s,keys:o,edits:a,prev:r},o=(i=Array.isArray(u))?u:n[u.kind]||[],s=-1,a=[],l&&d.push(l),l=u)}while(void 0!==r);return 0!==a.length&&(h=a[a.length-1][1]),h}(e,{leave:ke})}var ke={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Me(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=xe("(",Me(e.variableDefinitions,", "),")"),i=Me(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?Me([t,Me([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+xe(" = ",r)+xe(" ",Me(i," "))},SelectionSet:function(e){return Re(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet;return Me([xe("",t,": ")+n+xe("(",Me(r,", "),")"),Me(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value}
125,FragmentSpread:function(e){return"..."+e.name+xe(" ",Me(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Me(["...",xe("on ",t),Me(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(xe("(",Me(r,", "),")")," ")+"on ".concat(n," ").concat(xe("",Me(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e,t){var n=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'.concat(t?n:Ue(n),'\n"""'):'"""'.concat(n.replace(/"$/,'"\n'),'"""')}(n,"description"===t):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+Me(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Me(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+xe("(",Me(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return Me(["schema",Me(t," "),Re(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:Ne((function(e){return Me(["scalar",e.name,Me(e.directives," ")]," ")})),ObjectTypeDefinition:Ne((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Me(["type",t,xe("implements ",Me(n," & ")),Me(r," "),Re(i)]," ")})),FieldDefinition:Ne((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(n.every((function(e){return-1===e.indexOf("\n")}))?xe("(",Me(n,", "),")"):xe("(\n",Ue(Me(n,"\n")),"\n)"))+": "+r+xe(" ",Me(i," "))})),InputValueDefinition:Ne((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Me([t+": "+n,xe("= ",r),Me(i," ")]," ")})),InterfaceTypeDefinition:Ne((function(e){var t=e.name,n=e.directives,r=e.fields;return Me(["interface",t,Me(n," "),Re(r)]," ")})),UnionTypeDefinition:Ne((function(e){var t=e.name,n=e.directives,r=e.types;return Me(["union",t,Me(n," "),r&&0!==r.length?"= "+Me(r," | "):""]," ")})),EnumTypeDefinition:Ne((function(e){var t=e.name,n=e.directives,r=e.values;return Me(["enum",t,Me(n," "),Re(r)]," ")})),EnumValueDefinition:Ne((function(e){return Me([e.name,Me(e.directives," ")]," ")})),InputObjectTypeDefinition:Ne((function(e){var t=e.name,n=e.directives,r=e.fields;return Me(["input",t,Me(n," "),Re(r)]," ")})),DirectiveDefinition:Ne((function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+(n.every((function(e){return-1===e.indexOf("\n")}))?xe("(",Me(n,", "),")"):xe("(\n",Ue(Me(n,"\n")),"\n)"))+" on "+Me(r," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Me(["extend schema",Me(t," "),Re(n)]," ")},ScalarTypeExtension:function(e){return Me(["extend scalar",e.name,Me(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Me(["extend type",t,xe("implements ",Me(n," & ")),Me(r," "),Re(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Me(["extend interface",t,Me(n," "),Re(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Me(["extend union",t,Me(n," "),r&&0!==r.length?"= "+Me(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Me(["extend enum",t,Me(n," "),Re(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Me(["extend input",t,Me(n," "),Re(r)]," ")}};function Ne(e){return function(t){return Me([t.description,e(t)],"\n")}}function Me(e,t){return e?e.filter((function(e){return e})).join(t||""):""}function Re(e){return e&&0!==e.length?"{\n"+Ue(Me(e,"\n"))+"\n}":""}function xe(e,t,n){return t?e+t+(n||""):""}function Ue(e){return e&&" "+e.replace(/\n/g,"\n ")}function De(e){return(De="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 je(e){return e&&"object"===De(e)?"function"==typeof e.inspect?e.inspect():Array.isArray(e)?"["+e.map(je).join(", ")+"]":"{"+Object.keys(e).map((function(t){return"".concat(t,": ").concat(je(e[t]))})).join(", ")+"}":"string"==typeof e?'"'+e+'"':"function"==typeof e?"[function ".concat(e.name,"]"):String(e)}function Le(e,t){if(!e)throw new Error(t)}function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Be,qe=function(e,t,n){Fe(this,"body",void 0),Fe(this,"name",void 0),Fe(this,"locationOffset",void 0),this.body=e,this.name=t||"GraphQL request",this.locationOffset=n||{line:1,column:1},this.locationOffset.line>0||Le(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||Le(0,"column in locationOffset is 1-indexed and must be positive")};function Ve(e,t,n){return new Ee("Syntax Error: ".concat(n),void 0,e,[t])}function Ke(e){for(var t=e.split(/\r\n|[\n\r]/g),n=null,r=1;r<t.length;r++){var i=t[r],o=ze(i);if(o<i.length&&(null===n||o<n)&&0===(n=o))break}if(n)for(var s=1;s<t.length;s++)t[s]=t[s].slice(n);for(;t.length>0&&He(t[0]);)t.shift();for(;t.length>0&&He(t[t.length-1]);)t.pop();return t.join("\n")}function ze(e){for(var t=0;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;return t}function He(e){return ze(e)===e.length}function Ge(e,t){var n=new Xe(Ye.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:We,lookahead:Je}}function We(){return this.lastToken=this.token,this.token=this.lookahead()}function Je(){var e=this.token;if(e.kind!==Ye.EOF)do{e=e.next||(e.next=tt(this,e))}while(e.kind===Ye.COMMENT);return e}Be=qe,"function"==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(Be.prototype,Symbol.toStringTag,{get:function(){return this.constructor.name}});var Ye=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}
125",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function $e(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}var Qe=String.prototype.charCodeAt,Ze=String.prototype.slice;function Xe(e,t,n,r,i,o,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=o,this.next=null}function et(e){return isNaN(e)?Ye.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function tt(e,t){var n=e.source,r=n.body,i=r.length,o=function(e,t,n){var r=e.length,i=t;for(;i<r;){var o=Qe.call(e,i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++n.line,n.lineStart=i;else{if(13!==o)break;10===Qe.call(e,i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}(r,t.end,e),s=e.line,a=1+o-e.lineStart;if(o>=i)return new Xe(Ye.EOF,i,i,s,a,t);var u=Qe.call(r,o);switch(u){case 33:return new Xe(Ye.BANG,o,o+1,s,a,t);case 35:return function(e,t,n,r,i){var o,s=e.body,a=t;do{o=Qe.call(s,++a)}while(null!==o&&(o>31||9===o));return new Xe(Ye.COMMENT,t,a,n,r,i,Ze.call(s,t+1,a))}(n,o,s,a,t);case 36:return new Xe(Ye.DOLLAR,o,o+1,s,a,t);case 38:return new Xe(Ye.AMP,o,o+1,s,a,t);case 40:return new Xe(Ye.PAREN_L,o,o+1,s,a,t);case 41:return new Xe(Ye.PAREN_R,o,o+1,s,a,t);case 46:if(46===Qe.call(r,o+1)&&46===Qe.call(r,o+2))return new Xe(Ye.SPREAD,o,o+3,s,a,t);break;case 58:return new Xe(Ye.COLON,o,o+1,s,a,t);case 61:return new Xe(Ye.EQUALS,o,o+1,s,a,t);case 64:return new Xe(Ye.AT,o,o+1,s,a,t);case 91:return new Xe(Ye.BRACKET_L,o,o+1,s,a,t);case 93:return new Xe(Ye.BRACKET_R,o,o+1,s,a,t);case 123:return new Xe(Ye.BRACE_L,o,o+1,s,a,t);case 124:return new Xe(Ye.PIPE,o,o+1,s,a,t);case 125:return new Xe(Ye.BRACE_R,o,o+1,s,a,t);
125case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,n,r,i){var o=e.body,s=o.length,a=t+1,u=0;for(;a!==s&&null!==(u=Qe.call(o,a))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++a;return new Xe(Ye.NAME,t,a,n,r,i,Ze.call(o,t,a))}(n,o,s,a,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,o){var s=e.body,a=n,u=t,c=!1;45===a&&(a=Qe.call(s,++u));if(48===a){if((a=Qe.call(s,++u))>=48&&a<=57)throw Ve(e,u,"Invalid number, unexpected digit after 0: ".concat(et(a),"."))}else u=nt(e,u,a),a=Qe.call(s,u);46===a&&(c=!0,a=Qe.call(s,++u),u=nt(e,u,a),a=Qe.call(s,u));69!==a&&101!==a||(c=!0,43!==(a=Qe.call(s,++u))&&45!==a||(a=Qe.call(s,++u)),u=nt(e,u,a));return new Xe(c?Ye.FLOAT:Ye.INT,t,u,r,i,o,Ze.call(s,t,u))}(n,o,u,s,a,t);case 34:return 34===Qe.call(r,o+1)&&34===Qe.call(r,o+2)?function(e,t,n,r,i){var o=e.body,s=t
125+3,a=s,u=0,c="";for(;s<o.length&&null!==(u=Qe.call(o,s));){if(34===u&&34===Qe.call(o,s+1)&&34===Qe.call(o,s+2))return c+=Ze.call(o,a,s),new Xe(Ye.BLOCK_STRING,t,s+3,n,r,i,Ke(c));if(u<32&&9!==u&&10!==u&&13!==u)throw Ve(e,s,"Invalid character within String: ".concat(et(u),"."));92===u&&34===Qe.call(o,s+1)&&34===Qe.call(o,s+2)&&34===Qe.call(o,s+3)?(c+=Ze.call(o,a,s)+'"""',a=s+=4):++s}throw Ve(e,s,"Unterminated string.")}(n,o,s,a,t):function(e,t,n,r,i){var o=e.body,s=t+1,a=s,u=0,c="";for(;s<o.length&&null!==(u=Qe.call(o,s))&&10!==u&&13!==u;){if(34===u)return c+=Ze.call(o,a,s),new Xe(Ye.STRING,t,s+1,n,r,i,c);if(u<32&&9!==u)throw Ve(e,s,"Invalid character within String: ".concat(et(u),"."));if(++s,92===u){switch(c+=Ze.call(o,a,s-1),u=Qe.call(o,s)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var l=(f=Qe.call(o,s+1),d=Qe.call(o,s+2),h=Qe.call(o,s+3),p=Qe.call(o,s+4),rt(f)<<12|rt(d)<<8|rt(h)<<4|rt(p));if(l<0)throw Ve(e,s,"Invalid character escape sequence: "+"\\u".concat(o.slice(s+1,s+5),"."));c+=String.fromCharCode(l),s+=4;break;default:throw Ve(e,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(u),"."))}++s,a=s}}var f,d,h,p;throw Ve(e,s,"Unterminated string.")}(n,o,s,a,t)}throw Ve(n,o,function(e){if(e<32&&9!==e&&10!==e&&13!==e)return"Cannot contain the invalid character ".concat(et(e),".");if(39===e)return"Unexpected single quote character ('), did you mean to use a double quote (\")?";return"Cannot parse the unexpected character ".concat(et(e),".")}(u))}function nt(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=Qe.call(r,++i)}while(o>=48&&o<=57);return i}throw Ve(e,i,"Invalid number, expected digit but got: ".concat(et(o),"."))}function rt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}Xe.prototype.toJSON=Xe.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}};var it=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"}),ot=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function st(e,t){var n="string"==typeof e?new qe(e):e;
125if(!(n instanceof qe))throw new TypeError("Must provide Source. Received: ".concat(je(n)));return function(e){var t=e.token;return{kind:it.DOCUMENT,definitions:Zt(e,Ye.SOF,ut,Ye.EOF),loc:zt(e,t)}}(Ge(n,t||{}))}function at(e){var t=Jt(e,Ye.NAME);return{kind:it.NAME,value:t.value,loc:zt(e,t)}}function ut(e){if(Gt(e,Ye.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return ct(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return kt(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===Ye.NAME)switch(t.value){case"schema":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"schema");var n=It(e,!0),r=Gt(e,Ye.BRACE_L)?Zt(e,Ye.BRACE_L,Rt,Ye.BRACE_R):[];if(0===n.length&&0===r.length)throw $t(e);return{kind:it.SCHEMA_EXTENSION,directives:n,operationTypes:r,loc:zt(e,t)}}(e);case"scalar":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"scalar");var n=at(e),r=It(e,!0);if(0===r.length)throw $t(e);return{kind:it.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:zt(e,t)}}(e);case"type":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"type");var n=at(e),r=xt(e),i=It(e,!0),o=Ut(e);if(0===r.length&&0===i.length&&0===o.length)throw $t(e);return{kind:it.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:zt(e,t)}}(e);case"interface":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"interface");var n=at(e),r=It(e,!0),i=Ut(e);if(0===r.length&&0===i.length)throw $t(e);return{kind:it.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:zt(e,t)}}(e);case"union":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"union");var n=at(e),r=It(e,!0),i=Ft(e);if(0===r.length&&0===i.length)throw $t(e);return{kind:it.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:zt(e,t)}}(e);case"enum":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"enum");var n=at(e),r=It(e,!0),i=Bt(e);if(0===r.length&&0===i.length)throw $t(e);return{kind:it.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:zt(e,t)}}(e);case"input":return function(e){var t=e.token;Yt(e,"extend"),Yt(e,"input");var n=at(e),r=It(e,!0),i=Vt(e);if(0===r.length&&0===i.length)throw $t(e);return{kind:it.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:zt(e,t)}}(e)}throw $t(e,t)}(e)}else{if(Gt(e,Ye.BRACE_L))return ct(e);if(Nt(e))return kt(e)}throw $t(e)}function ct(e){if(Gt(e,Ye.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return lt(e);case"fragment":return function(e){var t=e.token;if(Yt(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:it.FRAGMENT_DEFINITION,name:wt(e),variableDefinitions:dt(e),typeCondition:(Yt(e,"on"),Pt(e)),directives:It(e,!1),selectionSet:gt(e),loc:zt(e,t)};return{kind:it.FRAGMENT_DEFINITION,name:wt(e),typeCondition:(Yt(e,"on"),Pt(e)),directives:It(e,!1),selectionSet:gt(e),loc:zt(e,t)}}(e)}else if(Gt(e,Ye.BRACE_L))return lt(e);throw $t(e)}function lt(e){var t=e.token;if(Gt(e,Ye.BRACE_L))return{kind:it.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:gt(e),loc:zt(e,t)};var n,r=ft(e);return Gt(e,Ye.NAME)&&(n=at(e)),{kind:it.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:dt(e),directives:It(e,!1),selectionSet:gt(e),loc:zt(e,t)}}function ft(e){var t=Jt(e,Ye.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw $t(e,t)}function dt(e){return Gt(e,Ye.PAREN_L)?Zt(e,Ye.PAREN_L,ht,Ye.PAREN_R):[]}function ht(e){var t=e.token;return e.options.experimentalVariableDefinitionDirectives?{kind:it.VARIABLE_DEFINITION,variable:pt(e),type:(Jt(e,Ye.COLON),Tt(e)),defaultValue:Wt(e,Ye.EQUALS)?_t(e,!0):void 0,directives:It(e,!0),loc:zt(e,t)}:{kind:it.VARIABLE_DEFINITION,variable:pt(e),type:(Jt(e,Ye.COLON),Tt(e)),defaultValue:Wt(e,Ye.EQUALS)?_t(e,!0):void 0,loc:zt(e,t)}}function pt(e){var t=e.token;return Jt(e,Ye.DOLLAR),{kind:it.VARIABLE,name:at(e),loc:zt(e,t)}}function gt(e){var t=e.token;return{kind:it.SELECTION_SET,selections:Zt(e,Ye.BRACE_L,vt,Ye.BRACE_R),loc:zt(e,t)}}function vt(e){return Gt(e,Ye.SPREAD)?function(e){var t,n=e.token;if(Jt(e,Ye.SPREAD),Gt(e,Ye.NAME)&&"on"!==e.token.value)return{kind:it.FRAGMENT_SPREAD,name:wt(e),directives:It(e,!1),loc:zt(e,n)};"on"===e.token.value&&(e.advance(),t=Pt(e));return{kind:it.INLINE_FRAGMENT,typeCondition:t,directives:It(e,!1),selectionSet:gt(e),loc:zt(e,n)}}(e):function(e){var t,n,r=e.token,i=at(e);Wt(e,Ye.COLON)?(t=i,n=at(e)):n=i;return{kind:it.FIELD,alias:t,name:n,arguments:yt(e,!1),directives:It(e,!1),selectionSet:Gt(e,Ye.BRACE_L)?gt(e):void 0,loc:zt(e,r)}}(e)}function yt(e,t){var n=t?bt:mt;return Gt(e,Ye.PAREN_L)?Zt(e,Ye.PAREN_L,n,Ye.PAREN_R):[]}function mt(e){var t=e.token;return{kind:it.ARGUMENT,name:at(e),value:(Jt(e,Ye.COLON),_t(e,!1)),loc:zt(e,t)}}function bt(e){var t=e.token;return{kind:it.ARGUMENT,name:at(e),value:(Jt(e,Ye.COLON),At(e)),loc:zt(e,t)}}function wt(e){if("on"===e.token.value)throw $t(e);return at(e)}function _t(e,t){var n=e.token;switch(n.kind){case Ye.BRACKET_L:return function(e,t){var n=e.token,r=t?At:Et;return{kind:it.LIST,values:Qt(e,Ye.BRACKET_L,r,Ye.BRACKET_R),loc:zt(e,n)}}(e,t);case Ye.BRACE_L:return function(e,t){var n=e.token;Jt(e,Ye.BRACE_L);var r=[];for(;!Wt(e,Ye.BRACE_R);)r.push(Ct(e,t));return{kind:it.OBJECT,fields:r,loc:zt(e,n)}}(e,t);case Ye.INT:return e.advance(),{kind:it.INT,value:n.value,loc:zt(e,n)};case Ye.FLOAT:return e.advance(),{kind:it.FLOAT,value:n.value,loc:zt(e,n)};case Ye.STRING:case Ye.BLOCK_STRING:return St(e);case Ye.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:it.BOOLEAN,value:"true"===n.value,loc:zt(e,n)}):"null"===n.value?(e.advance(),{kind:it.NULL,loc:zt(e,n)}):(e.advance(),{kind:it.ENUM,value:n.value,loc:zt(e,n)});case Ye.DOLLAR:if(!t)return pt(e)}throw $t(e)}function St(e){var t=e.token;return e.advance(),{kind:it.STRING,value:t.value,block:t.kind===Ye.BLOCK_STRING,loc:zt(e,t)}}function At(e){return _t(e,!0)}function Et(e){return _t(e,!1)}function Ct(e,t){var n=e.token;return{kind:it.OBJECT_FIELD,name:at(e),value:(Jt(e,Ye.COLON),_t(e,t)),loc:zt(e,n)}}function It(e,t){for(var n=[];Gt(e,Ye.AT);)n.push(Ot(e,t));return n}function Ot(e,t){var n=e.token;return Jt(e,Ye.AT),{kind:it.DIRECTIVE,name:at(e),arguments:yt(e,t),loc:zt(e,n)}}function Tt(e){var t,n=e.token;return Wt(e,Ye.BRACKET_L)?(t=Tt(e),Jt(e,Ye.BRACKET_R),t={kind:it.LIST_TYPE,type:t,loc:zt(e,n)}):t=Pt(e),Wt(e,Ye.BANG)?{kind:it.NON_NULL_TYPE,type:t,loc:zt(e,n)}:t}function Pt(e){var t=e.token;return{kind:it.NAMED_TYPE,name:at(e),loc:zt(e,t)}}function kt(e){var t=Nt(e)?e.lookahead():e.token;if(t.kind===Ye.NAME)switch(t.value){case"schema":return function(e){var t=e.token;Yt(e,"schema");var n=It(e,!0),r=Zt(e,Ye.BRACE_L,Rt,Ye.BRACE_R);return{kind:it.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:zt(e,t)}}(e);case"scalar":return function(e){var t=e.token,n=Mt(e);Yt(e,"scalar");var r=at(e),i=It(e,!0);return{kind:it.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:zt(e,t)}}(e);case"type":return function(e){var t=e.token,n=Mt(e);Yt(e,"type");var r=at(e),i=xt(e),o=It(e,!0),s=Ut(e);return{kind:it.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:s,loc:zt(e,t)}}(e);case"interface":return function(e){var t=e.token,n=Mt(e);Yt(e,"interface");var r=at(e),i=It(e,!0),o=Ut(e);return{kind:it.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:zt(e,t)}}(e);case"union":return function(e){var t=e.token,n=Mt(e);Yt(e,"union");var r=at(e),i=It(e,!0),o=Ft(e);return{kind:it.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:zt(e,t)}}(e);case"enum":return function(e){var t=e.token,n=Mt(e);Yt(e,"enum");var r=at(e),i=It(e,!0),o=Bt(e);return{kind:it.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:zt(e,t)}}(e);case"input":return function(e){var t=e.token,n=Mt(e);Yt(e,"input");var r=at(e),i=It(e,!0),o=Vt(e);return{kind:it.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:zt(e,t)}}(e);case"directive":return function(e){var t=e.token,n=Mt(e);Yt(e,"directive"),Jt(e,Ye.AT);var r=at(e),i=jt(e);Yt(e,"on");var o=function(e){Wt(e,Ye.PIPE);var t=[];do{t.push(Kt(e))}while(Wt(e,Ye.PIPE));return t}(e);return{kind:it.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:zt(e,t)}}(e)}throw $t(e,t)}function Nt(e){return Gt(e,Ye.STRING)||Gt(e,Ye.BLOCK_STRING)}function Mt(e){if(Nt(e))return St(e)}function Rt(e){var t=e.token,n=ft(e);Jt(e,Ye.COLON);var r=Pt(e);return{kind:it.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:zt(e,t)}}function xt(e){var t=[];if("implements"===e.token.value){e.advance(),Wt(e,Ye.AMP);do{t.push(Pt(e))}while(Wt(e,Ye.AMP)||e.options.allowLegacySDLImplementsInterfaces&&Gt(e,Ye.NAME))}return t}function Ut(e){return e.options.allowLegacySDLEmptyFields&&Gt(e,Ye.BRACE_L)&&e.lookahead().kind===Ye.BRACE_R?(e.advance(),e.advance(),[]):Gt(e,Ye.BRACE_L)?Zt(e,Ye.BRACE_L,Dt,Ye.BRACE_R):[]}function Dt(e){var t=e.token,n=Mt(e),r=at(e),i=jt(e);Jt(e,Ye.COLON);var o=Tt(e),s=It(e,!0);return{kind:it.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:s,loc:zt(e,t)}}function jt(e){return Gt(e,Ye.PAREN_L)?Zt(e,Ye.PAREN_L,Lt,Ye.PAREN_R):[]}function Lt(e){var t=e.token,n=Mt(e),r=at(e);Jt(e,Ye.COLON);var i,o=Tt(e);Wt(e,Ye.EQUALS)&&(i=At(e));var s=It(e,!0);return{kind:it.INPUT_VALUE_DEFINITION,description:n,name:r,type:o,defaultValue:i,directives:s,loc:zt(e,t)}}function Ft(e){var t=[];if(Wt(e,Ye.EQUALS)){Wt(e,Ye.PIPE);do{t.push(Pt(e))}while(Wt(e,Ye.PIPE))}return t}function Bt(e){return Gt(e,Ye.BRACE_L)?Zt(e,Ye.BRACE_L,qt,Ye.BRACE_R):[]}function qt(e){var t=e.token,n=Mt(e),r=at(e),i=It(e,!0);return{kind:it.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:zt(e,t)}}function Vt(e){return Gt(e,Ye.BRACE_L)?Zt(e,Ye.BRACE_L,Lt,Ye.BRACE_R):[]}function Kt(e){var t=e.token,n=at(e);
125if(ot.hasOwnProperty(n.value))return n;throw $t(e,t)}function zt(e,t){if(!e.options.noLocation)return new Ht(t,e.lastToken,e.source)}function Ht(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function Gt(e,t){return e.token.kind===t}function Wt(e,t){var n=e.token.kind===t;return n&&e.advance(),n}function Jt(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw Ve(e.source,n.start,"Expected ".concat(t,", found ").concat($e(n)))}function Yt(e,t){var n=e.token;if(n.kind===Ye.NAME&&n.value===t)return e.advance(),n;throw Ve(e.source,n.start,'Expected "'.concat(t,'", found ').concat($e(n)))}function $t(e,t){var n=t||e.token;return Ve(e.source,n.start,"Unexpected ".concat($e(n)))}function Qt(e,t,n,r){Jt(e,t);for(var i=[];!Wt(e,r);)i.push(n(e));return i}function Zt(e,t,n,r){Jt(e,t);for(var i=[n(e)];!Wt(e,r);)i.push(n(e));return i}Ht.prototype.toJSON=Ht.prototype.inspect=function(){return{start:this.start,end:this.end}};var Xt=n(3),en=n(24),tn=n(9),nn=n(73),rn=n(26),on=function(){return(on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},sn=new u.a("AbstractPubSubProvider"),an=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=on(on({},e),this._config),sn.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"PubSub"},Object.defineProperty(e.prototype,"options",{get:function(){return on({},this._config)},enumerable:!0,configurable:!0}),e}(),un=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),cn=function(){return(cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ln=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},fn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},hn=new u.a("MqttOverWSProvider");var pn,gn,vn,yn=function(){function e(){this.promises=new Map}return e.prototype.get=function(e,t){return ln(this,void 0,void 0,(function(){var n;return fn(this,(function(r){return(n=this.promises.get(e))||(n=t(e),this.promises.set(e,n)),[2,n]}))}))},Object.defineProperty(e.prototype,"allClients",{get:function(){return Array.from(this.promises.keys())},enumerable:!0,configurable:!0}),e.prototype.remove=function(e){this.promises.delete(e)},e}(),mn="undefined"!=typeof Symbol?Symbol("topic"):"@@topic",bn=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,cn(cn({},t),{clientId:t.clientId||Object(rn.v4)()}))||this;return n._clientsQueue=new yn,n._topicObservers=new Map,n._clientIdObservers=new Map,n}return un(t,e),Object.defineProperty(t.prototype,"clientId",{get:function(){return this.options.clientId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this.options.aws_pubsub_endpoint},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientsQueue",{get:function(){return this._clientsQueue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSSLEnabled",{get:function(){return!this.options.aws_appsync_dangerously_connect_to_http_endpoint_for_testing},enumerable:!0,configurable:!0}),t.prototype.getTopicForValue=function(e){return"object"==typeof e&&e[mn]},t.prototype.getProviderName=function(){return"MqttOverWSProvider"},t.prototype.onDisconnect=function(e){var t=this,n=e.clientId,r=e.errorCode,i=dn(e,["clientId","errorCode"]);if(0!==r){hn.warn(n,JSON.stringify(cn({errorCode:r},i),null,2));var o=[],s=this._clientIdObservers.get(n);if(!s)return;
125s.forEach((function(e){e.error("Disconnected, error code: "+r),t._topicObservers.forEach((function(t,n){t.delete(e),0===t.size&&o.push(n)}))})),this._clientIdObservers.delete(n),o.forEach((function(e){t._topicObservers.delete(e)}))}},t.prototype.newClient=function(e){var t=e.url,n=e.clientId;return ln(this,void 0,void 0,(function(){var e,r=this;return fn(this,(function(i){switch(i.label){case 0:return hn.debug("Creating new MQTT client",n),(e=new nn.Client(t,n)).onMessageArrived=function(e){var t=e.destinationName,n=e.payloadString;r._onMessage(t,n)},e.onConnectionLost=function(e){var t=e.errorCode,i=dn(e,["errorCode"]);r.onDisconnect(cn({clientId:n,errorCode:t},i))},[4,new Promise((function(t,n){e.connect({useSSL:r.isSSLEnabled,mqttVersion:3,onSuccess:function(){return t(e)},onFailure:n})}))];case 1:return i.sent(),[2,e]}}))}))},t.prototype.connect=function(e,t){return void 0===t&&(t={}),ln(this,void 0,void 0,(function(){var n=this;return fn(this,(function(r){switch(r.label){case 0:return[4,this.clientsQueue.get(e,(function(e){return n.newClient(cn(cn({},t),{clientId:e}))}))];case 1:return[2,r.sent()]}}))}))},t.prototype.disconnect=function(e){return ln(this,void 0,void 0,(function(){var t;return fn(this,(function(n){switch(n.label){case 0:return[4,this.clientsQueue.get(e,(function(){return null}))];case 1:return(t=n.sent())&&t.isConnected()&&t.disconnect(),this.clientsQueue.remove(e),[2]}}))}))},t.prototype.publish=function(e,t){return ln(this,void 0,void 0,(function(){var n,r,i,o;return fn(this,(function(s){switch(s.label){case 0:return n=[].concat(e),r=JSON.stringify(t),[4,this.endpoint];case 1:return i=s.sent(),[4,this.connect(this.clientId,{url:i})];case 2:return o=s.sent(),hn.debug("Publishing to topic(s)",n.join(","),r),n.forEach((function(e){return o.send(e,r)})),[2]}}))}))},t.prototype._onMessage=function(e,t){try{var n=[];this._topicObservers.forEach((function(t,r){(function(e,t){for(var n=e.split("/"),r=n.length,i=t.split("/"),o=0;o<r;++o){var s=n[o],a=i[o];if("#"===s)return i.length>=r;if("+"!==s&&s!==a)return!1}return r===i.length})(r,e)&&n.push(t)}));var r=JSON.parse(t);"object"==typeof r&&(r[mn]=e),n.forEach((function(e){e.forEach((function(e){return e.next(r)}))}))}catch(e){hn.warn("Error handling message",e,t)}},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=[].concat(e);return hn.debug("Subscribing to topic(s)",r.join(",")),new tn.a((function(e){var i;r.forEach((function(t){var r=n._topicObservers.get(t);r||(r=new Set,n._topicObservers.set(t,r)),r.add(e)}));var o=t.clientId,s=void 0===o?n.clientId:o,a=n._clientIdObservers.get(s);return a||(a=new Set),a.add(e),n._clientIdObservers.set(s,a),ln(n,void 0,void 0,(function(){var n,o,a,u;return fn(this,(function(c){switch(c.label){case 0:return void 0!==(n=t.url)?[3,2]:[4,this.endpoint];case 1:return a=c.sent(),[3,3];case 2:a=n,c.label=3;case 3:o=a,c.label=4;case 4:return c.trys.push([4,6,,7]),[4,this.connect(s,{url:o})];case 5:return i=c.sent(),r.forEach((function(e){i.subscribe(e)})),[3,7];case 6:return u=c.sent(),e.error(u),[3,7];case 7:return[2]}}
125))})),function(){return hn.debug("Unsubscribing from topic(s)",r.join(",")),i&&(n._clientIdObservers.get(s).delete(e),0===n._clientIdObservers.get(s).size&&(n.disconnect(s),n._clientIdObservers.delete(s)),r.forEach((function(t){var r=n._topicObservers.get(t)||new Set;r.delete(e),0===r.size&&(n._topicObservers.delete(t),i.isConnected()&&i.unsubscribe(t))}))),null}}))},t}(an),wn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_n=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Sn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},An=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},En=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},Cn=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(En(arguments[t]));return e},In=new u.a("AWSAppSyncProvider"),On=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._topicClient=new Map,t._topicAlias=new Map,t}return wn(t,e),Object.defineProperty(t.prototype,"endpoint",{get:function(){throw new Error("Not supported")},enumerable:!0,configurable:!0}),t.prototype.getProviderName=function(){return"AWSAppSyncProvider"},t.prototype.publish=function(e,t,n){return _n(this,void 0,void 0,(function(){return Sn(this,(function(e){throw new Error("Operation not supported")}))}))},t.prototype._cleanUp=function(e){var t=this;Array.from(this._topicClient.entries()).filter((function(t){return En(t,2)[1].clientId===e})).map((function(e){return En(e,1)[0]})).forEach((function(e){return t._cleanUpForTopic(e)}))},t.prototype._cleanUpForTopic=function(e){this._topicClient.delete(e),this._topicAlias.delete(e)},t.prototype.onDisconnect=function(e){var t=this,n=e.clientId,r=e.errorCode,i=An(e,["clientId","errorCode"]);0!==r&&(Array.from(this._topicClient.entries()).filter((function(e){return En(e,2)[1].clientId===n})).map((function(e){return En(e,1)[0]})).forEach((function(e){t._topicObservers.has(e)&&(t._topicObservers.get(e).forEach((function(e){e.closed||e.error(i)})),t._topicObservers.delete(e))})),this._cleanUp(n))},t.prototype.disconnect=function(t){return _n(this,void 0,void 0,(function(){return Sn(this,(function(n){switch(n.label){case 0:return[4,this.clientsQueue.get(t,(function(){return null}))];case 1:return n.sent(),[4,e.prototype.disconnect.call(this,t)];case 2:return n.sent(),this._cleanUp(t),[2]}}))}))},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=new tn.a((function(r){var i=[].concat(e);return In.debug("Subscribing to topic(s)",i.join(",")),_n(n,void 0,void 0,(function(){var e,n,o,s,a,u=this;return Sn(this,(function(c){switch(c.label){case 0:return i.forEac
125h((function(e){u._topicObservers.has(e)||u._topicObservers.set(e,new Set),u._topicObservers.get(e).add(r)})),e=t.mqttConnections,n=void 0===e?[]:e,o=t.newSubscriptions,s=Object.entries(o).map((function(e){var t=En(e,2),n=t[0];return[t[1].topic,n]})),this._topicAlias=new Map(Cn(Array.from(this._topicAlias.entries()),s)),a=Object.entries(i.reduce((function(e,t){var r=n.find((function(e){return e.topics.indexOf(t)>-1}));if(r){var i=r.client,o=r.url;e[i]||(e[i]={url:o,topics:new Set}),e[i].topics.add(t)}return e}),{})),[4,Promise.all(a.map((function(e){var t=En(e,2),n=t[0],i=t[1],o=i.url,s=i.topics;return _n(u,void 0,void 0,(function(){var e,t,i=this;return Sn(this,(function(a){switch(a.label){case 0:e=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.connect(n,{clientId:n,url:o})];case 2:return e=a.sent(),[3,4];case 3:return t=a.sent(),r.error({message:"Failed to connect",error:t}),r.complete(),[2,void 0];case 4:return s.forEach((function(t){e.isConnected()&&(e.subscribe(t),i._topicClient.set(t,e))})),[2,e]}}))}))})))];case 1:return c.sent(),[2]}}))})),function(){In.debug("Unsubscribing from topic(s)",i.join(",")),i.forEach((function(e){var t=n._topicClient.get(e);t&&t.isConnected()&&(t.unsubscribe(e),n._topicClient.delete(e),Array.from(n._topicClient.values()).some((function(e){return e===t}))||n.disconnect(t.clientId)),n._topicObservers.delete(e)}))}}));return tn.a.from(r).map((function(e){var t=n.getTopicForValue(e),r=n._topicAlias.get(t);return e.data=Object.entries(e.data).reduce((function(e,t){var n=En(t,2),i=n[0],o=n[1];return e[r||i]=o,e}),{}),e}))},t}(bn),Tn=n(1),Pn=n(41),kn=H,Nn=function(){var e=function(t,n){return(e=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])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mn=function(){return(Mn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Rn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},xn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Un=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},Dn=new u.a("AWSAppSyncRealTimeProvider"),jn="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ln=[400,401,403];!function(e){e.GQL_CONNECTION_INIT="connection_init",e.GQL_CONNECTION_ERROR="connection_error",e.GQL_CONNECTION_ACK="connection_ack",e.GQL_START="start",e.GQL_START_ACK="start_ack",e.GQL_DATA="data",e.GQL_CONNECTION_KEEP_ALIVE="ka",e.GQL_STOP="stop",e.GQL_COMPLETE="complete",e.GQL_ERROR="error"}(pn||(pn={}
125)),function(e){e[e.PENDING=0]="PENDING",e[e.CONNECTED=1]="CONNECTED",e[e.FAILED=2]="FAILED"}(gn||(gn={})),function(e){e[e.CLOSED=0]="CLOSED",e[e.READY=1]="READY",e[e.CONNECTING=2]="CONNECTING"}(vn||(vn={}));var Fn,Bn={accept:"application/json, text/javascript","content-encoding":"amz-1.0","content-type":"application/json; charset=UTF-8"},qn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.socketStatus=vn.CLOSED,t.keepAliveTimeout=3e5,t.subscriptionObserverMap=new Map,t.promiseArray=[],t}return Nn(t,e),t.prototype.getProviderName=function(){return"AWSAppSyncRealTimeProvider"},t.prototype.newClient=function(){throw new Error("Not used here")},t.prototype.publish=function(e,t,n){return Rn(this,void 0,void 0,(function(){return xn(this,(function(e){throw new Error("Operation not supported")}))}))},t.prototype.subscribe=function(e,t){var n=this,r=t.appSyncGraphqlEndpoint;return new tn.a((function(e){if(r){var i=Object(rn.v4)();return n._startSubscriptionWithAWSAppSyncRealTime({options:t,observer:e,subscriptionId:i}).catch((function(t){e.error({errors:[Mn({},new Ee(Fn.REALTIME_SUBSCRIPTION_INIT_ERROR+": "+t))]}),e.complete()})),function(){return Rn(n,void 0,void 0,(function(){var e,t;return xn(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,3,4]),[4,this._waitForSubscriptionToBeConnected(i)];case 1:if(n.sent(),!(e=(this.subscriptionObserverMap.get(i)||{}).subscriptionState))return[2];if(e!==gn.CONNECTED)throw new Error("Subscription never connected");return this._sendUnsubscriptionMessage(i),[3,4];case 2:return t=n.sent(),Dn.debug("Error while unsubscribing "+t),[3,4];case 3:return this._removeSubscriptionObserver(i),[7];case 4:return[2]}}
125))}))}}e.error({errors:[Mn({},new Ee("Subscribe only available for AWS AppSync endpoint"))]}),e.complete()}))},Object.defineProperty(t.prototype,"isSSLEnabled",{get:function(){return!this.options.aws_appsync_dangerously_connect_to_http_endpoint_for_testing},enumerable:!0,configurable:!0}),t.prototype._startSubscriptionWithAWSAppSyncRealTime=function(e){var t=e.options,n=e.observer,r=e.subscriptionId;return Rn(this,void 0,void 0,(function(){var e,i,o,s,a,u,c,l,f,d,h,p,g,v,y,m,b,w,_,S,A,E,C,I,O,T,P=this;return xn(this,(function(k){switch(k.label){case 0:return e=t.appSyncGraphqlEndpoint,i=t.authenticationType,o=t.query,s=t.variables,a=t.apiKey,u=t.region,c=t.graphql_headers,l=void 0===c?function(){return{}}:c,f=t.additionalHeaders,d=void 0===f?{}:f,h=gn.PENDING,p={query:o,variables:s},this.subscriptionObserverMap.set(r,{observer:n,query:o,variables:s,subscriptionState:h,startAckTimeoutId:null}),g=JSON.stringify(p),y=[{}],[4,this._awsRealTimeHeaderBasedAuth({apiKey:a,appSyncGraphqlEndpoint:e,authenticationType:i,payload:g,canonicalUri:"",region:u})];case 1:return m=[Mn.apply(void 0,y.concat([k.sent()]))],[4,l()];case 2:v=Mn.apply(void 0,[Mn.apply(void 0,[Mn.apply(void 0,m.concat([k.sent()])),d]),(T={},T[en.c]=Xt.Constants.userAgent,T)]),b={id:r,payload:{data:g,extensions:{authorization:Mn({},v)}},type:pn.GQL_START},w=JSON.stringify(b),k.label=3;case 3:return k.trys.push([3,5,,6]),[4,this._initializeWebSocketConnection({apiKey:a,appSyncGraphqlEndpoint:e,authenticationType:i,region:u})];case 4:return k.sent(),[3,6];case 5:return _=k.sent(),Dn.debug({err:_}),S=_.message,A=void 0===S?"":S,n.error({errors:[Mn({},new Ee(Fn.CONNECTION_FAILED+": "+A))]}),n.complete(),"function"==typeof(E=(this.subscriptionObserverMap.get(r)||{}).subscriptionFailedCallback)&&E(),[2];case 6:return C=this.subscriptionObserverMap.get(r),I=C.subscriptionFailedCallback,O=C.subscriptionReadyCallback,this.subscriptionObserverMap.set(r,{observer:n,subscriptionState:h,variables:s,query:o,subscriptionReadyCallback:O,subscriptionFailedCallback:I,startAckTimeoutId:setTimeout((function(){P._timeoutStartSubscriptionAck.call(P,r)}),15e3)}),this.awsRealTimeSocket&&this.awsRealTimeSocket.send(w),[2]}}))}))},t.prototype._waitForSubscriptionToBeConnected=function(e){return Rn(this,void 0,void 0,(function(){var t=this;return xn(this,(function(n){return this.subscriptionObserverMap.get(e).subscriptionState===gn.PENDING?[2,new Promise((function(n,r){var i=t.subscriptionObserverMap.get(e),o=i.observer,s=i.subscriptionState,a=i.variables,u=i.query;t.subscriptionObserverMap.set(e,{observer:o,subscriptionState:s,variables:a,query:u,subscriptionReadyCallback:n,subscriptionFailedCallback:r})}))]:[2]}))}))},t.prototype._sendUnsubscriptionMessage=function(e){try{if(this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.socketStatus===vn.READY){var t={id:e,type:pn.GQL_STOP},n=JSON.stringify(t);this.awsRealTimeSocket.send(n)}}catch(e){Dn.debug({err:e})}},t.prototype._removeSubscriptionObserver=function(e){this.subscriptionObserverMap.delete(e),setTimeout(this._closeSocketIfRequired.bind(this),1e3)},t.prototype._closeSocketIfRequired=function(){if(!(this.subscriptionObserverMap.size>0))if(this.awsRealTimeSocket)if(this.awsRealTimeSocket.bufferedAmount>0)setTimeout(this._closeSocketIfRequired.bind(this),1e3);else{Dn.debug("closing WebSocket..."),clearTimeout(this.keepAliveTimeoutId);var e=this.awsRealTimeSocket;e.onclose=void 0,e.onerror=void 0,e.close(1e3),this.awsRealTimeSocket=null,this.socketStatus=vn.CLOSED}else this.socketStatus=vn.CLOSED},t.prototype._handleIncomingSubscriptionMessage=function(e){Dn.debug("subscription message from AWS AppSync RealTime: "+e.data);var t=JSON.parse(e.data),n=t.id,r=void 0===n?"":n,i=t.payload,o=t.type,s=this.subscriptionObserverMap.get(r)||{},a=s.observer,u=void 0===a?null:a,l=s.query,f=void 0===l?"":l,d=s.variables,h=void 0===d?{}:d,p=s.startAckTimeoutId,g=s.subscriptionReadyCallback,v=s.subscriptionFailedCallback;if(Dn.debug({id:r,observer:u,query:f,variables:h}),o===pn.GQL_DATA&&i&&i.data)u?u.next(i):Dn.debug("observer not found for id: "+r);else if(o!==pn.GQL_START_ACK){if(o===pn.GQL_CONNECTION_KEEP_ALIVE)return clearTimeout(this.keepAliveTimeoutId),void(this.keepAliveTimeoutId=setTimeout(this._errorDisconnect.bind(this,Fn.TIMEOUT_DISCONNECT),this.keepAliveTimeout));
125if(o===pn.GQL_ERROR){y=gn.FAILED;this.subscriptionObserverMap.set(r,{observer:u,query:f,variables:h,startAckTimeoutId:p,subscriptionReadyCallback:g,subscriptionFailedCallback:v,subscriptionState:y}),u.error({errors:[Mn({},new Ee(Fn.CONNECTION_FAILED+": "+JSON.stringify(i)))]}),clearTimeout(p),u.complete(),"function"==typeof v&&v()}}else{Dn.debug("subscription ready for "+JSON.stringify({query:f,variables:h})),"function"==typeof g&&g(),clearTimeout(p),function(e,t,n){c.a.dispatch("api",{event:e,data:t,message:n},"PubSub",jn)}(Fn.SUBSCRIPTION_ACK,{query:f,variables:h},"Connection established for subscription");var y=gn.CONNECTED;this.subscriptionObserverMap.set(r,{observer:u,query:f,variables:h,startAckTimeoutId:null,subscriptionState:y,subscriptionReadyCallback:g,subscriptionFailedCallback:v})}},t.prototype._errorDisconnect=function(e){Dn.debug("Disconnect error: "+e),this.subscriptionObserverMap.forEach((function(t){var n=t.observer;n&&!n.closed&&n.error({errors:[Mn({},new Ee(e))]})})),this.subscriptionObserverMap.clear(),this.awsRealTimeSocket&&this.awsRealTimeSocket.close(),this.socketStatus=vn.CLOSED},t.prototype._timeoutStartSubscriptionAck=function(e){var t=this.subscriptionObserverMap.get(e)||{},n=t.observer,r=t.query,i=t.variables;n&&(this.subscriptionObserverMap.set(e,{observer:n,query:r,variables:i,subscriptionState:gn.FAILED}),n&&!n.closed&&(n.error({errors:[Mn({},new Ee("Subscription timeout "+JSON.stringify({query:r,variables:i})))]}),n.complete()),Dn.debug("timeoutStartSubscription",JSON.stringify({query:r,variables:i})))},t.prototype._initializeWebSocketConnection=function(e){var t=this,n=e.appSyncGraphqlEndpoint,r=e.authenticationType,i=e.apiKey,o=e.region;if(this.socketStatus!==vn.READY)return new Promise((function(e,s){return Rn(t,void 0,void 0,(function(){var t,a,u,c,l,f,d,h,p,g;return xn(this,(function(v){switch(v.label){case 0:if(this.promiseArray.push({res:e,rej:s}),this.socketStatus!==vn.CLOSED)return[3,5];v.label=1;case 1:return v.trys.push([1,4,,5]),this.socketStatus=vn.CONNECTING,t=this.isSSLEnabled?"wss://":"ws://",a=n.replace("https://",t).replace("http://",t).replace("appsync-api","appsync-realtime-api").replace("gogi-beta","grt-beta"),u="{}",f=(l=JSON).stringify,[4,this._awsRealTimeHeaderBasedAuth({authenticationType:r,payload:u,canonicalUri:"/connect",apiKey:i,appSyncGraphqlEndpoint:n,region:o})];case 2:return c=f.apply(l,[v.sent()]),d=Tn.Buffer.from(c).toString("base64"),h=Tn.Buffer.from(u).toString("base64"),p=a+"?header="+d+"&payload="+h,[4,this._initializeRetryableHandshake({awsRealTimeUrl:p})];case 3:return v.sent(),this.promiseArray.forEach((function(e){var t=e.res;Dn.debug("Notifying connection successful"),t()})),this.socketStatus=vn.READY,this.promiseArray=[],[3,5];case 4:return g=v.sent(),this.promiseArray.forEach((function(e){return(0,e.rej)(g)})),this.promiseArray=[],this.awsRealTimeSocket&&this.awsRealTimeSocket.readyState===WebSocket.OPEN&&this.awsRealTimeSocket.close(3001),this.awsRealTimeSocket=null,this.socketStatus=vn.CLOSED,[3,5];case 5:return[2]}}
125))}))}))},t.prototype._initializeRetryableHandshake=function(e){var t=e.awsRealTimeUrl;return Rn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return Dn.debug("Initializaling retryable Handshake"),[4,Object(Pn.b)(this._initializeHandshake.bind(this),[{awsRealTimeUrl:t}],5e3)];case 1:return e.sent(),[2]}}))}))},t.prototype._initializeHandshake=function(e){var t=e.awsRealTimeUrl;return Rn(this,void 0,void 0,(function(){var e,n,r,i=this;return xn(this,(function(o){switch(o.label){case 0:Dn.debug("Initializing handshake "+t),o.label=1;case 1:return o.trys.push([1,4,,5]),[4,new Promise((function(e,n){var r=new WebSocket(t,"graphql-ws");r.onerror=function(){Dn.debug("WebSocket connection error")},r.onclose=function(){n(new Error("Connection handshake error"))},r.onopen=function(){return i.awsRealTimeSocket=r,e()}}))];case 2:return o.sent(),[4,new Promise((function(e,t){var n=!1;i.awsRealTimeSocket.onerror=function(e){Dn.debug("WebSocket error "+JSON.stringify(e))},i.awsRealTimeSocket.onclose=function(e){Dn.debug("WebSocket closed "+e.reason),t(new Error(JSON.stringify(e)))},i.awsRealTimeSocket.onmessage=function(r){Dn.debug("subscription message from AWS AppSyncRealTime: "+r.data+" ");var o=JSON.parse(r.data),s=o.type,a=o.payload,u=(void 0===a?{}:a).connectionTimeoutMs,c=void 0===u?3e5:u;if(s===pn.GQL_CONNECTION_ACK)return n=!0,i.keepAliveTimeout=c,i.awsRealTimeSocket.onmessage=i._handleIncomingSubscriptionMessage.bind(i),i.awsRealTimeSocket.onerror=function(e){Dn.debug(e),i._errorDisconnect(Fn.CONNECTION_CLOSED)},i.awsRealTimeSocket.onclose=function(e){Dn.debug("WebSocket closed "+e.reason),i._errorDisconnect(Fn.CONNECTION_CLOSED)},void e("Cool, connected to AWS AppSyncRealTime");if(s===pn.GQL_CONNECTION_ERROR){var l=o.payload,f=(void 0===l?{}:l).errors,d=Un(void 0===f?[]:f,1)[0],h=void 0===d?{}:d,p=h.errorType,g=void 0===p?"":p,v=h.errorCode;t({errorType:g,errorCode:void 0===v?0:v})}};var r={type:pn.GQL_CONNECTION_INIT};i.awsRealTimeSocket.send(JSON.stringify(r)),setTimeout(function(){n||t(new Error("Connection timeout: ack from AWSRealTime was not received on 15000 ms"))}.bind(i),15e3)}))];case 3:return o.sent(),[3,5];case 4:throw e=o.sent(),n=e.errorType,r=e.errorCode,Ln.includes(r)?new Pn.a(n):n?new Error(n):e;case 5:return[2]}}
125))}))},t.prototype._awsRealTimeHeaderBasedAuth=function(e){var t=e.authenticationType,n=e.payload,r=e.canonicalUri,i=e.appSyncGraphqlEndpoint,o=e.apiKey,s=e.region;return Rn(this,void 0,void 0,(function(){var e,a,u;return xn(this,(function(c){switch(c.label){case 0:return e={API_KEY:this._awsRealTimeApiKeyHeader.bind(this),AWS_IAM:this._awsRealTimeIAMHeader.bind(this),OPENID_CONNECT:this._awsRealTimeOPENIDHeader.bind(this),AMAZON_COGNITO_USER_POOLS:this._awsRealTimeCUPHeader.bind(this)},"function"!=typeof(a=e[t])?(Dn.debug("Authentication type "+t+" not supported"),[2,""]):(u=m.parse(i).host,[4,a({payload:n,canonicalUri:r,appSyncGraphqlEndpoint:i,apiKey:o,region:s,host:u})]);case 1:return[2,c.sent()]}}))}))},t.prototype._awsRealTimeCUPHeader=function(e){var t=e.host;return Rn(this,void 0,void 0,(function(){return xn(this,(function(e){switch(e.label){case 0:return[4,kn.currentSession()];case 1:return[2,{Authorization:e.sent().getAccessToken().getJwtToken(),host:t}]}}))}))},t.prototype._awsRealTimeOPENIDHeader=function(e){var t=e.host;return Rn(this,void 0,void 0,(function(){var e,n,r;return xn(this,(function(i){switch(i.label){case 0:return[4,ne.getItem("federatedInfo")];case 1:return(n=i.sent())?(e=n.token,[3,4]):[3,2];case 2:return[4,kn.currentAuthenticatedUser()];case 3:(r=i.sent())&&(e=r.token),i.label=4;case 4:if(!e)throw new Error("No federated jwt");return[2,{Authorization:e,host:t}]}}))}))},t.prototype._awsRealTimeApiKeyHeader=function(e){var t=e.apiKey,n=e.host;return Rn(this,void 0,void 0,(function(){var e,r;return xn(this,(function(i){return e=new Date,r=e.toISOString().replace(/[:\-]|\.\d{3}/g,""),[2,{host:n,"x-amz-date":r,"x-api-key":t}]}))}))},t.prototype._awsRealTimeIAMHeader=function(e){var t=e.payload,n=e.canonicalUri,r=e.appSyncGraphqlEndpoint,i=e.region;return Rn(this,void 0,void 0,(function(){var e,o,s;return xn(this,(function(a){switch(a.label){case 0:return e={region:i,service:"appsync"},[4,this._ensureCredentials()];case 1:if(!a.sent())throw new Error("No credentials");return[4,l.a.get().then((function(e){return{secret_key:e.secretAccessKey,access_key:e.accessKeyId,session_token:e.sessionToken}}))];case 2:return o=a.sent(),s={url:""+r+n,data:t,method:"POST",headers:Mn({},Bn)},[2,oe.a.sign(s,o,e).headers]}}))}))},t.prototype._ensureCredentials=function(){return l.a.get().then((function(e){if(!e)return!1;var t=l.a.shear(e);return Dn.debug("set credentials for AWSAppSyncRealTimeProvider",t),!0})).catch((function(e){return Dn.warn("ensure credentials error",e),!1}))},t}(an),Vn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Kn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},zn=Object(p.b)().isNode,Hn=new u.a("PubSub"),Gn=new(function(){function e(e){this._options=e,Hn.debug("PubSub Options",this._options),this._pluggables=[],this.subscribe=this.subscribe.bind(this)}return Object.defineProperty(e.prototype,"awsAppSyncProvider",{get:function(){return this._awsAppSyncProvider||(this._awsAppSyncProvider=new On(this._options)),this._awsAppSyncProvider},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"awsAppSyncRealTimeProvider",{get:function(){return this._awsAppSyncRealTimeProvider||(this._awsAppSyncRealTimeProvider=new qn(this._options)),this._awsAppSyncRealTimeProvider},enumerable:!0,configurable:!0}),e.prototype.getModuleName=function(){return"PubSub"},e.prototype.configure=function(e){var t=this,n=e?e.PubSub||e:{};return Hn.debug("configure PubSub",{opt:n}),this._options=Object.assign({},this._options,n),this._pluggables.map((function(e){return e.configure(t._options)})),this._options},e.prototype.addPluggable=function(e){return Vn(this,void 0,void 0,(function(){return Kn(this,(function(t){return e&&"PubSub"===e.getCategory()?(this._pluggables.push(e),[2,e.configure(this._options)]):[2]}))}))},e.prototype.getProviderByName=function(e){return e===en.a?this.awsAppSyncProvider:e===en.b?this.awsAppSyncRealTimeProvider:this._pluggables.find((function(t){return t.getProviderName()===e}))},e.prototype.getProviders=function(e){void 0===e&&(e={});var t=e.provider;if(!t)return this._pluggables;var n=this.getProviderByName(t);if(!n)throw new Error("Could not find provider named "+t);return[n]},e.prototype.publish=function(e,t,n){return Vn(this,void 0,void 0,(function(){return Kn(this,(function(r){return[2,Promise.all(this.getProviders(n).map((function(r){return r.publish(e,t,n)})))]}))}))},e.prototype.subscribe=function(e,t){if(zn&&this._options&&this._options.ssr)throw new Error("Subscriptions are not supported for Server-Side Rendering (SSR)");Hn.debug("subscribe options",t);var n=this.getProviders(t);return new tn.a((function(r){var i=n.map((function(n){return{provider:n,observable:n.subscribe(e,t)}})).map((function(e){var t=e.provider;return e.observable.subscribe({start:console.error,next:function(e){return r.next({provider:t,value:e})},error:function(e){return r.error({provider:t,error:e})}})}));
125return function(){return i.forEach((function(e){return e.unsubscribe()}))}}))},e}())(null);v.a.register(Gn),function(e){e.CONNECTION_CLOSED="Connection closed",e.CONNECTION_FAILED="Connection failed",e.REALTIME_SUBSCRIPTION_INIT_ERROR="AppSync Realtime subscription init error",e.SUBSCRIPTION_ACK="Subscription ack",e.TIMEOUT_DISCONNECT="Timeout disconnect"}(Fn||(Fn={}));var Wn,Jn,Yn=Gn;!function(e){e.API_KEY="API_KEY",e.AWS_IAM="AWS_IAM",e.OPENID_CONNECT="OPENID_CONNECT",e.AMAZON_COGNITO_USER_POOLS="AMAZON_COGNITO_USER_POOLS"}(Wn||(Wn={})),function(e){e.NO_API_KEY="No api-key configured",e.NO_CURRENT_USER="No current user",e.NO_CREDENTIALS="No credentials",e.NO_FEDERATED_JWT="No federated jwt"}(Jn||(Jn={}));var $n=function(){return($n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Qn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Zn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Xn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},er=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},tr=new u.a("GraphQLAPI"),nr=function(e,t){return void 0===t&&(t={}),{query:e,variables:t}},rr=function(){function e(e){this._api=null,this.Auth=kn,this.Cache=ne,this.Credentials=l.a,this._options=e,tr.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"GraphQLAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=Xn(t,["API"]),o=$n($n({},i),r);return tr.debug("configure GraphQL API",{opt:o}),o.aws_project_region&&(o=Object.assign({},o,{region:o.aws_project_region,header:{}})),void 0!==o.graphql_headers&&"function"!=typeof o.graphql_headers&&(tr.warn("graphql_headers should be a function"),o.graphql_headers=void 0),this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return tr.debug("create Rest instance"),this._options?(this._api=new he(this._options),this._api.Credentials=this.Credentials,!0):Promise.reject("API not configured")},e.prototype._headerBasedAuth=function(e){return Qn(this,void 0,void 0,(function(){var t,n,r,i,o,s,a,u;return Zn(this,(function(c){switch(c.label){case 0:switch(t=this._options,n=t.aws_appsync_authenticationType,r=t.aws_appsync_apiKey,i={},e||n||"AWS_IAM"){case"API_KEY":return[3,1];case"AWS_IAM":return[3,2];case"OPENID_CONNECT":return[3,4];case"AMAZON_COGNITO_USER_POOLS":return[3,11]}return[3,15];case 1:if(!r)throw new Error(Jn.NO_API_KEY);return i={Authorization:null,"X-Api-Key":r},[3,16];case 2:return[4,this._ensureCredentials()];
125case 3:if(!c.sent())throw new Error(Jn.NO_CREDENTIALS);return[3,16];case 4:return c.trys.push([4,9,,10]),o=void 0,[4,ne.getItem("federatedInfo")];case 5:return(s=c.sent())?(o=s.token,[3,8]):[3,6];case 6:return[4,kn.currentAuthenticatedUser()];case 7:(a=c.sent())&&(o=a.token),c.label=8;case 8:if(!o)throw new Error(Jn.NO_FEDERATED_JWT);return i={Authorization:o},[3,10];case 9:throw c.sent(),new Error(Jn.NO_CURRENT_USER);case 10:return[3,16];case 11:return c.trys.push([11,13,,14]),[4,this.Auth.currentSession()];case 12:return u=c.sent(),i={Authorization:u.getAccessToken().getJwtToken()},[3,14];case 13:throw c.sent(),new Error(Jn.NO_CURRENT_USER);case 14:return[3,16];case 15:return i={Authorization:null},[3,16];case 16:return[2,i]}}))}))},e.prototype.getGraphqlOperationType=function(e){var t=st(e);return er(t.definitions,1)[0].operation},e.prototype.graphql=function(e,t){var n=e.query,r=e.variables,i=void 0===r?{}:r,o=e.authMode,s=st("string"==typeof n?n:Pe(n)),a=er(s.definitions.filter((function(e){return"OperationDefinition"===e.kind})),1)[0],u=(void 0===a?{}:a).operation;switch(u){case"query":case"mutation":var c=this._api.getCancellableToken(),l={cancellableToken:c},f=this._graphql({query:s,variables:i,authMode:o},t,l);return this._api.updateRequestToBeCancellable(f,c),f;case"subscription":return this._graphqlSubscribe({query:s,variables:i,authMode:o},t)}throw new Error("invalid operation type: "+u)},e.prototype._graphql=function(e,t,n){var r=e.query,i=e.variables,o=e.authMode;return void 0===t&&(t={}),void 0===n&&(n={}),Qn(this,void 0,void 0,(function(){var e,s,a,u,c,l,f,d,h,p,g,v,y,m,b,w,_,S,A,E,C;return Zn(this,(function(I){switch(I.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:I.sent(),I.label=2;case 2:return e=this._options,s=e.aws_appsync_region,a=e.aws_appsync_graphqlEndpoint,u=e.graphql_headers,c=void 0===u?function(){return{}}:u,l=e.graphql_endpoint,f=e.graphql_endpoint_iam_region,h=[{}],(p=!l)?[4,this._headerBasedAuth(o)]:[3,4];case 3:p=I.sent(),I.label=4;case 4:return g=[$n.apply(void 0,h.concat([p]))],(v=l)?f?[4,this._headerBasedAuth(o)]:[3,6]:[3,8];case 5:return y=I.sent(),[3,7];case 6:y={Authorization:null},I.label=7;case 7:v=y,I.label=8;case 8:return m=[$n.apply(void 0,g.concat([v]))],[4,c({query:r,variables:i})];case 9:if(d=$n.apply(void 0,[$n.apply(void 0,[$n.apply(void 0,m.concat([I.sent()])),t]),!l&&(C={},C["x-amz-user-agent"]=Xt.Constants.userAgent,C)]),b={query:Pe(r),variables:i},w=Object.assign({headers:d,body:b,signerServiceInfo:{service:l?"execute-api":"appsync",region:l?f:s}},n),!(_=l||a))throw{data:{},errors:[new Ee("No graphql endpoint provided.")]};I.label=10;case 10:return I.trys.push([10,12,,13]),[4,this._api.post(_,w)];case 11:return S=I.sent(),[3,13];case 12:if(A=I.sent(),this._api.isCancel(A))throw A;return S={data:{},errors:[new Ee(A.message,null,null,null,null,A)]},[3,13];case 13:if((E=S.errors)&&E.length)throw S;return[2,S]}}))}))},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype._graphqlSubscribe=function(e,t){var n=e.query,r=e.variables,i=e.authMode;void 0===t&&(t={});var o=this._options,s=o.aws_appsync_region,a=o.aws_appsync_graphqlEndpoint,u=o.aws_appsync_authenticationType,c=o.aws_appsync_apiKey,l=o.graphql_headers,f=void 0===l?function(){return{}}:l,d=i||u||"AWS_IAM";if(Yn&&"function"==typeof Yn.subscribe)return Yn.subscribe("",{provider:en.b,appSyncGraphqlEndpoint:a,authenticationType:d,apiKey:c,query:Pe(n),region:s,variables:r,graphql_headers:f,additionalHeaders:t});throw tr.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},e.prototype._ensureCredentials=function(){var e=this;return this.Credentials.get().then((function(t){if(!t)return!1;var n=e.Credentials.shear(t);return tr.debug("set credentials for api",n),!0})).catch((function(e){return tr.warn("ensure credentials error",e),!1}))},e}(),ir=new rr(null);v.a.register(ir);var or=function(){return(or=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}
125,sr=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},ar=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},ur=new u.a("API"),cr=function(){function e(e){this.Auth=H,this.Cache=ne,this.Credentials=l.a,this._options=e,this._restApi=new be(e),this._graphqlApi=new rr(e),ur.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){this._options=Object.assign({},this._options,e),this._restApi.Credentials=this.Credentials,this._graphqlApi.Auth=this.Auth,this._graphqlApi.Cache=this.Cache,this._graphqlApi.Credentials=this.Credentials;var t=this._restApi.configure(this._options),n=this._graphqlApi.configure(this._options);return or(or({},t),n)},e.prototype.get=function(e,t,n){return this._restApi.get(e,t,n)},e.prototype.post=function(e,t,n){return this._restApi.post(e,t,n)},e.prototype.put=function(e,t,n){return this._restApi.put(e,t,n)},e.prototype.patch=function(e,t,n){return this._restApi.patch(e,t,n
125)},e.prototype.del=function(e,t,n){return this._restApi.del(e,t,n)},e.prototype.head=function(e,t,n){return this._restApi.head(e,t,n)},e.prototype.isCancel=function(e){return this._restApi.isCancel(e)},e.prototype.cancel=function(e,t){return this._restApi.cancel(e,t)},e.prototype.endpoint=function(e){return sr(this,void 0,void 0,(function(){return ar(this,(function(t){return[2,this._restApi.endpoint(e)]}))}))},e.prototype.getGraphqlOperationType=function(e){return this._graphqlApi.getGraphqlOperationType(e)},e.prototype.graphql=function(e,t){return this._graphqlApi.graphql(e,t)},e}(),lr=new cr(null);v.a.register(lr);t.default=lr},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(0).__exportStar(n(130),t)},,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),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,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.graphqlOperation=t.AmplifyAPI=t.Amplify=t.onBeforeStart=t.start=t.cognito=t.vid=t.API=t.mutations=t.queries=t.AmazonCognitoIdentity=void 0;var l=o(n(27)),f=o(n(63));t.AmazonCognitoIdentity=o(n(4)),t.queries=o(n(30)),t.mutations=o(n(31)),t.API=o(n(64));var d=c(n(139));t.vid=o(n(27)),t.cognito=o(n(63));var h=c(n(3));t.Amplify=h.default;var p=[],g=null;t.start=function(e){var t=this;return void 0===e&&(e=!0),null==g&&(g=new Promise((function(n){return s(t,void 0,void 0,(function(){var t,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:h.default.configure(d.default),a.label=1;case 1:a.trys.push([1,7,8,13]),t=u(p),a.label=2;case 2:return[4,t.next()];case 3:return(r=a.sent()).done?[3,6]:[4,(0,r.value)()];case 4:a.sent(),a.label=5;case 5:return[3,2];case 6:return[3,13];case 7:return i=a.sent(),o={error:i},[3,13];case 8:return a.trys.push([8,,11,12]),r&&!r.done&&(s=t.return)?[4,s.call(t)]:[3,10];case 9:a.sent(),a.label=10;case 10:return[3,12];case 11:if(o)throw o.error;return[7];
125case 12:return[7];case 13:return e?[4,l.start()]:[3,16];case 14:return a.sent(),[4,f.start()];case 15:a.sent(),a.label=16;case 16:return n(),[2]}}))}))}))),g},t.onBeforeStart=function(e){p.push(e)};var v=n(33);Object.defineProperty(t,"AmplifyAPI",{enumerable:!0,get:function(){return c(v).default}}),Object.defineProperty(t,"graphqlOperation",{enumerable:!0,get:function(){return v.graphqlOperation}})},function(e,t,n){var r;e.exports=(r=n(6),function(){if("function"==typeof ArrayBuffer){var e=r.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e}}(),r.lib.WordArray)},function(e,t,n){"use strict";n.r(t),t.default=function(e,t){return t=t||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(14),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=new r.a("Hub"),u="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var c=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!n)return void a.warn("No listeners for "+e);this.patterns=s(this.patterns.filter((function(e){return e!==n})))}else{var r=this.listeners[e];if(!r)return void a.warn("No listeners for "+e);this.listeners[e]=s(r.filter((function(e){return e.callback!==t})))}},e.prototype.dispatch=function(e,t,n,r){(void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1)&&(r===u||a.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:i({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(e){a.error(e)}},e.prototype.listen=function(e,t,n){var r,i=this;if(void 0===n&&(n="noname"),function(e){return void 0!==e.onHubCapsule}(t))a.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),r=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");r=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:r});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:r})}return function(){i.remove(e,r)}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach((function(r){a.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(e){a.error(e)}})),this.patterns.length>0){if(!n.message)return void a.warn("Cannot perform pattern matching without a message
125key");var s=n.message;this.patterns.forEach((function(t){var n=s.match(t.pattern);if(n){var r=o(n).slice(1),u=i(i({},e),{patternInfo:r});try{t.callback(u)}catch(e){a.error(e)}}}))}},e}())("__default__")},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return h}));var r,i=n(14),o=(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(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e},l=new i.a("Util"),f=function(e){function t(t){var n=e.call(this,t)||this;return n.nonRetryable=!0,n}return o(t,e),t}(Error);function d(e,t,n,r){return void 0===r&&(r=1),s(this,void 0,void 0,(function(){var i,o;return a(this,(function(s){switch(s.label){case 0:if("function"!=typeof e)throw Error("functionToRetry must be a function");l.debug(e.name+" attempt #"+r+" with this vars: "+JSON.stringify(t)),s.label=1;case 1:return s.trys.push([1,3,,8]),[4,e.apply(void 0,c(t))];case 2:return[2,s.sent()];case 3:if(i=s.sent(),l.debug("error on "+e.name,i),(a=i)&&a.nonRetryable)throw l.debug(e.name+" non retryable error",i),i;return o=n(r,t,i),l.debug(e.name+" retrying in "+o+" ms"),!1===o?[3,6]:[4,new Promise((function(e){return setTimeout(e,o)}))];case 4:return s.sent(),[4,d(e,t,n,r+1)];case 5:return[2,s.sent()];case 6:throw i;case 7:return[3,8];case 8:return[2]}var a}))}))}var h=function(e,t,n){return void 0===n&&(n=3e5),d(e,t,function(e){return function(t){var n=100*Math.pow(2,t)+100*Math.random();return!(n>e)&&n}}(n))}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";
125Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(97),i=n(45),o=n(66),s=n(29),a=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,s.locateWindow)().msCrypto.subtle.importKey("raw",u(e),i.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&t(r.result),n(new Error("ImportKey completed without importing key."))},r.onerror=function(){n(new Error("ImportKey failed to import key."))}}))}(e).then((function(e){return(0,s.locateWindow)().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,s.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(new Error("Error encountered updating hash"))},n.process(u(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(new Error("Error encountered finalizing hash"))},e.oncomplete=function(){e.result&&t(new Uint8Array(e.result)),n(new Error("Error encountered finalizing hash"))},e.finish()}))}))},e}();function u(e){return"string"==typeof e?(0,o.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},function(e,t,n){"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])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(47),i=n(45),o=n(29),s=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,o.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),i.SHA_256_HMAC_ALGO,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))}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,o.locateWindow)().crypto.subtle.sign(i.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(i.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,o.locateWindow)().crypto.subtle.digest(i.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=s},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(98);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var i=n(99);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=n(100);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=n(101);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},function(e,t,n){"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,2756
vendor: 6,997 bytes, line 125
125734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=new(n(14).a)("Parser"),i=function(e){var t,n={};if(e.aws_mobile_analytics_app_id){var i={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};n.Analytics=i}return(e.aws_cognito_identity_pool_id||e.aws_user_pools_id)&&(n.Auth={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,identityPoolRegion:e.aws_cognito_region,mandatorySignIn:"enable"===e.aws_mandatory_sign_in}),t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},n.Analytics=Object.assign({},n.Analytics,e.Analytics),n.Auth=Object.assign({},n.Auth,e.Auth),n.Storage=Object.assign({},t),r.debug("parse config",e,"to amplifyconfig",n),n},o=function(){function e(){}return e.parseMobilehubConfig=i,e}()},function(e,t,n){"use strict";function r(e){return e.split("").map((function(e){return e.charCodeAt(0).toString(16).padStart(2,"0")})).join("")}function i(e){return e.match(/.{2}/g).map((function(e){return String.fromCharCode(parseInt(e,16))})).join("")}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(8);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(i(t)+"="+i(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){var r=n(8),i=n(118),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,u={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(a=n(55)),a),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(o)})),e.exports=u}).call(this,n(28))},function(e,t,n){"use strict";var r=n(8),i=n(119),o=n(121),s=n(52),a=n(122),u=n(125),c=n(126),l=n(56);e.exports=function(e){return new Promise((function(t,n){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(p+":"+g)}var v=a(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),s(v,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};i(t,n,o),h=null}},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var y=(e.withCredentials||c(v))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in h&&r.forEach(d,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),f||(f=null),h.send(f)}))}},function(e,t,n){"use strict";var r=n(120);e.exports=function(e,t,n,i,o){var s=new Error(e);return r(s,t,n,i,o)}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=u(void 0,t[e]))})),r.forEach(o,c),r.forEach(s,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=u(void 0,e[i])):n[i]=u(void 0,t[i])})),r.forEach(a,(function(r){r in t?n[r]=u(e[r],t[r]):r in e&&(n[r]=u(void 0,e[r]))}));var l=i.concat(o).concat(s).concat(a),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")}
125,r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(14),i=n(34),o=n(10),s=n(2),a=n(25),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},l=new r.a("Signer"),f=function(e,t){var n=new i.Sha256(e);return n.update(t),n.digestSync()},d=function(e){var t=e||"",n=new i.Sha256;return n.update(t),Object(o.a)(n.digestSync())},h=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},p=function(e){var t,n,r=Object(s.parse)(e.url);return[e.method||"/",encodeURIComponent(r.pathname).replace(/%2F/gi,"/"),(n=r.query,n&&0!==n.length?n.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var n=t[1].replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}));return t[0]+"="+n})).sort((function(e,t){var n=e.split("=")[0],r=t.split("=")[0];return n===r?e<t?-1:1:n<r?-1:1})).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map((function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""),h(e.headers),d(e.data)].join("\n")},g=function(e){var t=(Object(s.parse)(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},v=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},y=function(e,t,n,r){return[e,n,r,d(t)].join("\n")},m=function(e,t,n){l.debug(n);var r=f("AWS4"+e,t),i=f(r,n.region),o=f(i,n.service);return f(o,"aws4_request")},b=function(e,t){return Object(o.a)(f(e,t))},w=function(){function e(){}return e.sign=function(e,t,n){void 0===n&&(n=null),e.headers=e.headers||{};var r=a.a.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),i=r.substr(0,8),o=Object(s.parse)(e.url);e.headers.host=o.host,e.headers["x-amz-date"]=r,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var u=p(e);l.debug(u);var c=n||g(e),f=v(i,c.region,c.service),d=y("AWS4-HMAC-SHA256",u,r,f),w=m(t.secret_key,i,c),_=b(w,d),S=function(e,t,n,r,i){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+i].join(", ")}("AWS4-HMAC-SHA256",t.access_key,f,h(e.headers),_);return e.headers.Authorization=S,e},e.signUrl=function(e,t,n,r){var i="object"==typeof e?e.url:e,o="object"==typeof e?e.method:"GET",l="object"==typeof e?e.body:void 0,f=a.a.getDateWithClockOffset().toISOString().replace(/[:\-]|\.\d{3}/g,""),d=f.substr(0,8),h=Object(s.parse)(i,!0,!0),w=(h.search,c(h,["search"])),_={host:w.host},S=n||g({url:Object(s.format)(w)}),A=S.region,E=S.service,C=v(d,A,E),I=t.session_token&&"iotdevicegateway"!==E,O=u(u(u({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":[t.access_key,C].join("/"),"X-Amz-Date":f.substr(0,16)},I?{"X-Amz-Security-Token":""+t.session_token}:{}),r?{"X-Amz-Expires":""+r}:{}),{"X-Amz-SignedHeaders":Object.keys(_).join(",")}),T=p({method:o,url:Object(s.format)(u(u({},w),{query:u(u({},w.query),O)})),headers:_,data:l}),P=y("AWS4-HMAC-SHA256",T,f,C),k=m(t.secret_key,d,{region:A,service:E}),N=b(k,P),M=u({"X-Amz-Signature":N},t.session_token&&{"X-Amz-Security-Token":t.session_token});return Object(s.format)({protocol:w.protocol,slashes:!0,hostname:w.hostname,port:w.port,pathname:w.pathname,query:u(u(u({},w.query),O),M)})},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!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,2756
125734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.shoppingCart=t.clearPaymentDetails=t.getPaymentDetails=t.setPaymentDetails=t.getShoppingCartValues=t.setCognitoValue=t.setCognitoVehicleValue=t.setCognitoValues=t.ensureVisitorProfile=t.ensureLegacyCustomerPortalProfile=t.ensureAuto5Profile=t.getCognitoValue=t.fetchData=t.refresh=t.start=void 0;var c,l=u(n(135)),f=o(n(30)),d=o(n(31)),h=o(n(33)),p=n(64),g=n(27),v=u(n(136)).default("jazel:customer-portal:cognit-shopping-cart"),y={recent_vins:"recentVehicles",favorite_vins:"favoriteVehicles",compare_vins:"compareVehicles"},m={recent_vins:p.SavedVehicleType.Recent,favorite_vins:p.SavedVehicleType.Favorite,compare_vins:p.SavedVehicleType.Compare};function b(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,w(g.getVid())];case 1:return c=e.sent(),[2]}}))}))}function w(e){return s(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,k(t={vid:e,auto5:{},legacyCustomerPortal:{}})];case 1:return n.sent(),[4,N(t)];case 2:return n.sent(),[2,t]}}))}))}function _(e){void 0===e&&(e="");var t=e.split(";"),n=t[0],r=t[1];if(v("getCognitoValue",n),n in y){var i=c.auto5[y[n]];if(null==i&&(i=[]),"obj"===r)return Promise.resolve(i);var o=i.map((function(e){return e.vin})).join(",");return Promise.resolve(o)}return Promise.resolve(!0)}function S(e,t){return s(this,void 0,void 0,(function(){var n,r,i,o,s,u,l;return a(this,(function(a){switch(a.label){case 0:for(n=!1,r=0,i=Object.entries(y);r<i.length;r++)o=i[r],s=o[0],u=o[1],s in e&&(n=!0,c.auto5[u]=e[s].split(",").map((function(e){return{vin:e}})));return n&&t?(l={id:c.vid}
125,Object.entries(y).forEach((function(t){var n=t[0],r=t[1];if(n in e){v("key",n);var i={};if(null!=c.auto5[r])for(var o=0,s=c.auto5[r];o<s.length;o++){var a=s[o];i[a.vin]=a}l[r]=e[n].split(",").map((function(e){var t=Object.assign({},i[e],{vin:e});return t.lastKnownPrice,null==t.updatedAt&&(t.updatedAt=Math.floor(Date.now()/1e3)),t}))}})),[4,h.default.graphql(h.graphqlOperation(d.updateAuto5Profile,{input:l}))]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))}t.start=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,b()];case 1:return e.sent(),[2]}}))}))},t.refresh=b,t.fetchData=w,t.getCognitoValue=_;var A={visitor_info:"visitorInfo",vehicle_of_interest:"vehicleOfInterest",estimate_payments:"estimatePayments",apply_for_financing:"applyForFinancing",schedule_test_drive:"scheduleTestDrive",trade_in_value:"tradeInValue",active_ui:{json:!1,field:"activeUi"}};function E(e,t){var n;return s(this,void 0,void 0,(function(){var r,i,o,s,u,f,p,g,v,y;return a(this,(function(a){switch(a.label){case 0:for(r=!1,i={},o=0,s=Object.entries(A);o<s.length;o++)if(u=s[o],f=u[0],p=u[1],f in e){if(r=!0,g="string"==typeof p?{json:!0,field:p}:p,v=e[f],g.json)try{v=JSON.parse(v)}catch(e){v={}}i[g.field]=v}return r?(c.legacyCustomerPortal.data=l.default(null!==(n=c.legacyCustomerPortal.data)&&void 0!==n?n:{},i),t?[4,I(c.vid)]:[3,4]):[3,4];case 1:return a.sent(),[4,C(c.vid)];case 2:return a.sent(),(y={id:c.vid}).dataJson=JSON.stringify(c.legacyCustomerPortal.data),[4,h.default.graphql(h.graphqlOperation(d.updateLegacyCustomerPortalProfile,{input:y}))];case 3:a.sent(),a.label=4;case 4:return[2]}}
125))}))}function C(e){return s(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=null,console.log("Checking for CustomerPortalProfile",e),[4,h.default.graphql(h.graphqlOperation(f.getLegacyCustomerPortalProfile,{id:e}))];case 1:if(null==(n=i.sent()))throw new Error("Could not run getLegacyCustomerPortalProfile");return null!=(t=n.data.getLegacyCustomerPortalProfile)?[3,3]:(console.log("CustomerPortalProfile did not exist, creating...",e),[4,h.default.graphql(h.graphqlOperation(d.createLegacyCustomerPortalProfile,{input:{id:e}}))]);case 2:if(null==(r=i.sent()))throw new Error("Could not run createLegacyCustomerPortalProfile");if(console.log("CustomerPortalProfile created",e,r),(t=r.data.createLegacyCustomerPortalProfile).id!==e)throw new Error("Created CustomerPortalProfile has unexpected id: "+t.id);i.label=3;case 3:return console.log("Returning CustomerPortalProfile",e),[2,t]}}))}))}function I(e){return s(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=null,console.log("Checking for VisitorProfile",e),[4,h.default.graphql(h.graphqlOperation(f.visitorProfile,{id:e}))];case 1:if(null==(n=i.sent()))throw new Error("Could not run getVisitorProfile");return null!=(t=n.data.visitorProfile)?[3,3]:(console.log("VisitorProfile did not exist, creating...",e),[4,h.default.graphql(h.graphqlOperation(d.createVisitorProfile,{input:{id:e}}))]);case 2:if(null==(r=i.sent()))throw new Error("Could not run createVisitorProfile");if(console.log("VisitorProfile created",e,r),(t=r.data.createVisitorProfile).id!==e)throw new Error("Created VisitorProfile has unexpected id: "+t.id);i.label=3;case 3:return console.log("Returning VisitorProfile",e),[2,t]}}))}))}function O(e,t){return void 0===t&&(t=!0),s(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,S(e,t)];case 1:return n.sent(),[4,E(e,t)];case 2:return n.sent(),[2]}}))}))}function T(e,t){var n;return s(this,void 0,void 0,(function(){var r,i,o,s,u,l,p,g,b,w,_;return a(this,(function(a){switch(a.label){case 0:return r=e.split(";"),i=r[0],o=r[1],null==(s=m[i])?[2]:(u=t.vin,l=t.value,"*"!==u?[3,3]:l?[3,2]:(b={vid:c.vid,type:s},p=y[i],c.auto5[p]=[],[4,h.default.graphql(h.graphqlOperation(d.clearAuto5VehicleList,b))]));case 1:return w=a.sent(),v("save result",w),[2,w.data.clearAuto5VehicleList];case 2:throw new Error("setCognitoVehicleValue: vin=* only allowed when set=false.");case 3:return p=y[i],c.auto5[p]=null!==(n=c.auto5[p])&&void 0!==n?n:[],g=!1,"update_price"===o&&null==c.auto5[p].find((function(e){return e.vin===u}))&&(g=!0),g?(b={id:c.vid},[4,h.default.graphql(h.graphqlOperation(f.getAuto5Profile,b))]):[3,5];case 4:return[2,(w=a.sent()).data.getAuto5Profile];case 5:return b={vid:c.vid,vin:u,set:l,type:s},null!=t.price&&(b.price=t.price),c.auto5[p]=c.auto5[p].filter((function(e){return e.vin!==u})),t.value&&c.auto5[p].push({vin:u,lastKnownPrice:t.price}),[4,h.default.graphql(h.graphqlOperation(d.saveAuto5Vehicle,b))];case 6:return w=a.sent(),null!=(_=w.data.saveAuto5Vehicle)[p]&&(c.auto5[p]=_[p]),[2,w.data.saveAuto5Vehicle]}}))}))}function P(e,t){return s(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n={})[e]=t,[4,O(n)];case 1:return r.sent(),[2]}}))}))}function k(e){return s(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t={id:e.vid},[4,h.default.graphql(h.graphqlOperation(f.getAuto5Profile,t))];case 1:return n=i.sent(),r=n.data.getAuto5Profile,Object.values(y).forEac
125h((function(t){var n=null==r?void 0:r[t];null==n&&(n=[]),e.auto5[t]=n})),e.auto5.paymentDetails=null==r?void 0:r.paymentDetails,[2]}}))}))}function N(e){return s(this,void 0,void 0,(function(){var t,n,r,i,o,s,u,c,l;return a(this,(function(a){switch(a.label){case 0:return t={id:e.vid},e.legacyCustomerPortal.data={},[4,h.default.graphql(h.graphqlOperation(f.getLegacyCustomerPortalProfile,t))];case 1:n=a.sent(),r=n.data.getLegacyCustomerPortalProfile;try{i=JSON.parse(r.dataJson)}catch(e){i={}}for(o=0,s=Object.values(A);o<s.length;o++)u=s[o],null!=(l=i[(c="string"==typeof u?{json:!0,field:u}:u).field])&&(e.legacyCustomerPortal.data[c.field]=l);return[2]}}))}))}function M(e,t,n,r){return s(this,void 0,void 0,(function(){var i,o,s;return a(this,(function(a){switch(a.label){case 0:return i={vid:c.vid,aprTier:e,apr:t,term:n,downPayment:r},c.auto5.paymentDetails=i,[4,h.default.graphql(h.graphqlOperation(d.saveAuto5PaymentDetails,i))];case 1:return o=a.sent(),null!=(s=o.data.saveAuto5PaymentDetails)&&(c.auto5.paymentDetails=s.paymentDetails),[2,o.data.saveAuto5PaymentDetails]}}))}))}function R(){return s(this,void 0,void 0,(function(){return a(this,(function(e){return[2,Promise.resolve(c.auto5.paymentDetails)]}))}))}function x(){return s(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return e={vid:c.vid},c.auto5.paymentDetails=null,[4,h.default.graphql(h.graphqlOperation(d.clearAuto5PaymentDetails,e))];case 1:return t=n.sent(),v("save result",t),[2,t.data.clearAuto5PaymentDetails]}}))}))}t.ensureAuto5Profile=function(e){return s(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=null,console.log("Checking for Auto5Profile",e),[4,h.default.graphql(h.graphqlOperation(f.getAuto5Profile,{id:e}))];case 1:if(null==(n=i.sent()))throw new Error("Could not run getAuto5Profile");return null!=(t=n.data.getAuto5Profile)?[3,3]:(console.log("Auto5Profile did not exist, creating...",e),[4,h.default.graphql(h.graphqlOperation(d.createAuto5Profile,{input:{id:e}}))]);case 2:if(null==(r=i.sent()))throw new Error("Could not run createAuto5Profile");if(console.log("Auto5Profile created",e,r),(t=r.data.createAuto5Profile).id!==e)throw new Error("Created Auto5Profile has unexpected id: "+t.id);i.label=3;case 3:return console.log("Returning Auto5Profile",e),[2,t]}}))}))},t.ensureLegacyCustomerPortalProfile=C,t.ensureVisitorProfile=I,t.setCognitoValues=O,t.setCognitoVehicleValue=T,t.setCognitoValue=P,t.getShoppingCartValues=function(e){return s(this,void 0,void 0,(function(){var t,n,r,i,o,s,u,l,f;return a(this,(function(a){if((t={}).vid=(n=null!=e?e:c).vid,Object.entries(y).forEach((function(e){var r=e[0],i=e[1],o=n.auto5[i];null==o&&(o=[]),t[r]=o.map((function(e){return e.vin})).join(",")})),null!=n.legacyCustomerPortal.data)for(r=0,i=Object.entries(A);r<i.length;r++)o=i[r],s=o[0],u=o[1],l="string"==typeof u?{json:!0,field:u}:u,null!=(f=n.legacyCustomerPortal.data[l.field])&&(l.json&&(f=JSON.stringify(f)),t[s]=f);return[2,t]}))}))},t.setPaymentDetails=M,t.getPaymentDetails=R,t.clearPaymentDetails=x,t.shoppingCart={name:"cognitoShoppingCart",getShoppingCartValue:_,setShoppingCartValue:P,setShoppingVehicleValue:T,setShoppingCartValues:O,setPaymentDetails:M,getPaymentDetails:R,clearPaymentDetails:x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelSortDirection=t.ModelAttributeTypes=t.SavedVehicleType=void 0,function(e){e.Recent="Recent",e.Favorite="Favorite",e.Compare="Compare"}(t.SavedVehicleType||(t.SavedVehicleType={})),function(e){e.binary="binary",e.binarySet="binarySet",e.bool="bool",e.list="list",e.map="map",e.number="number",e.numberSet="numberSet",e.string="string",e.stringSet="stringSet",e._null="_null"}(t.ModelAttributeTypes||(t.ModelAttributeTypes={})),function(e){e.ASC="ASC",e.DESC="DESC"}(t.ModelSortDirection||(t.ModelSortDirection={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(18);function i(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?r.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),i(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=i(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var i;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=o(o({},this.cookies),((i={})[e]=t,i)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=o(o({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0}
125);this.cookies=o({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}(),a=n(5),u=Object(a.b)().isBrowser,c=function(){function e(e){void 0===e&&(e={}),this.cookies=new s,this.store=u?window.localStorage:Object.create(null),this.cookies=e.req?new s(e.req.headers.cookie):new s,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),e.prototype.clear=function(){var e=this;Array.from(new Array(this.length)).map((function(t,n){return e.key(n)})).forEach((function(t){return e.removeItem(t)}))},e.prototype.getItem=function(e){return this.getLocalItem(e)},e.prototype.getLocalItem=function(e){return Object.prototype.hasOwnProperty.call(this.store,e)?this.store[e]:null},e.prototype.getUniversalItem=function(e){return this.cookies.get(e)},e.prototype.key=function(e){return Object.keys(this.store)[e]},e.prototype.removeItem=function(e){this.removeLocalItem(e),this.removeUniversalItem(e)},e.prototype.removeLocalItem=function(e){delete this.store[e]},e.prototype.removeUniversalItem=function(e){this.cookies.remove(e,{path:"/"})},e.prototype.setItem=function(e,t){switch(this.setLocalItem(e,t),e.split(".").pop()){case"LastAuthUser":case"accessToken":case"idToken":this.setUniversalItem(e,t)}},e.prototype.setLocalItem=function(e,t){this.store[e]=t},e.prototype.setUniversalItem=function(e,t){this.cookies.set(e,t,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return i}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},function(e,t,n){"use strict";(function(e){var r;if(n.d(t,"a",(function(){return i})),"undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==e&&e.crypto&&(r=e.crypto),!r)try{r=n(86)}catch(e){}function i(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}}).call(this,n(20))},function(e,t,n){var r=n(94),i=n(95),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(0).__exportStar)(n(96),t);var r=n(44);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var i=n(46);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return i.Sha256}})},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.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"}
vendor: 6,546 bytes, line 125
125),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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),i=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":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";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 i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,u=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,(n=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}])&&s(t,n),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),o=u(n(94)),s=u(n(95)),a=u(n(17));
vendor: 4,495 bytes, line 125
125function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var d=Object.keys(i),h=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)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(a.default.compareVersions(i,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=c
vendor: 14,314 bytes, line 125
125,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,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=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.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=i.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=i.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=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.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=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(o,e)||i.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=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.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=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.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=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.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=i.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=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.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=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.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=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.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:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.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:o.ENGINE_MAP.Presto},n=i.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:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},
125function(e){e.exports=JSON.parse('{"name":"@aws-sdk/client-cognito-identity","description":"AWS SDK for JavaScript Cognito Identity Client for Node.js, Browser and React Native","version":"3.6.1","scripts":{"clean":"yarn remove-definitions && yarn remove-dist && yarn remove-documentation","build-documentation":"yarn remove-documentation && typedoc ./","prepublishOnly":"yarn build","pretest":"yarn build:cjs","remove-definitions":"rimraf ./types","remove-dist":"rimraf ./dist","remove-documentation":"rimraf ./docs","test:unit":"mocha **/cjs/**/*.spec.js","test:e2e":"mocha **/cjs/**/*.ispec.js && karma start karma.conf.js","test":"yarn test:unit","build:cjs":"tsc -p tsconfig.json","build:es":"tsc -p tsconfig.es.json","build":"yarn build:cjs && yarn build:es","postbuild":"downlevel-dts types types/ts3.4"},"main":"./dist/cjs/index.js","types":"./types/index.d.ts","module":"./dist/es/index.js","browser":{"./runtimeConfig":"./runtimeConfig.browser"},"react-native":{"./runtimeConfig":"./runtimeConfig.native"},"sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"^1.0.0","@aws-crypto/sha256-js":"^1.0.0","@aws-sdk/config-resolver":"3.6.1","@aws-sdk/credential-provider-node":"3.6.1","@aws-sdk/fetch-http-handler":"3.6.1","@aws-sdk/hash-node":"3.6.1","@aws-sdk/invalid-dependency":"3.6.1","@aws-sdk/middleware-content-length":"3.6.1","@aws-sdk/middleware-host-header":"3.6.1","@aws-sdk/middleware-logger":"3.6.1","@aws-sdk/middleware-retry":"3.6.1","@aws-sdk/middleware-serde":"3.6.1","@aws-sdk/middleware-signing":"3.6.1","@aws-sdk/middleware-stack":"3.6.1","@aws-sdk/middleware-user-agent":"3.6.1","@aws-sdk/node-config-provider":"3.6.1","@aws-sdk/node-http-handler":"3.6.1","@aws-sdk/protocol-http":"3.6.1","@aws-sdk/smithy-client":"3.6.1","@aws-sdk/types":"3.6.1","@aws-sdk/url-parser":"3.6.1","@aws-sdk/url-parser-native":"3.6.1","@aws-sdk/util-base64-browser":"3.6.1","@aws-sdk/util-base64-node":"3.6.1","@aws-sdk/util-body-length-browser":"3.6.1","@aws-sdk/util-body-length-node":"3.6.1","@aws-sdk/util-user-agent-browser":"3.6.1","@aws-sdk/util-user-agent-node":"3.6.1","@aws-sdk/util-utf8-browser":"3.6.1","@aws-sdk/util-utf8-node":"3.6.1","tslib":"^2.0.0"},"devDependencies":{"@aws-sdk/client-documentation-generator":"3.6.1","@aws-sdk/client-iam":"3.6.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","downlevel-dts":"0.7.0","jest":"^26.1.0","rimraf":"^3.0.0","typedoc":"^0.19.2","typescript":"~4.1.2"},"engines":{"node":">=10.0.0"},"typesVersions":{"<4.0":{"types/*":["types/ts3.4/*"]}},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cognito-identity","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cognito-identity"}}')},function(e,t,n){e.exports=n(132).Observable},function(e,t,n){(function(t){var n;n=function(){return function(e){var t,n=e.localStorage||(t={},{setItem:function(e,n){t[e]=n},getItem:function(e){return t[e]},removeItem:function(e){delete t[e]}}),r=1,i=2,o=3,s=4,a=5,u=6,c=7,l=8,f=9,d=10,h=11,p=12,g=13,v=14,y=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n)){var r="Unknown property, "+n+". Valid properties are:";for(var i in t)t.hasOwnProperty(i)&&(r=r+" "+i);throw new Error(r)}if(typeof e[n]!==t[n])throw new Error(_(b.INVALID_TYPE,[typeof e[n],n]))}},m=function(e,t){return function(){return e.apply(t,arguments)}},b={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."},BUFFER_FULL:{code:18,text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}},w={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},_=function(e,t){var n=e.text;if(t)for(var r,i,o=0;o<t.length;o++)if(r="{"+o+"}",(i=n.indexOf(r))>0){var s=n.substring(0,i),a=n.substring(i+r.length);
125n=s+t[o]+a}return n},S=[0,6,77,81,73,115,100,112,3],A=[0,4,77,81,84,84,4],E=function(e,t){for(var n in this.type=e,t)t.hasOwnProperty(n)&&(this[n]=t[n])};function C(e,t){var n,r=t,l=e[t],d=l>>4,p=l&=15;t+=1;var g=0,v=1;do{if(t==e.length)return[null,r];g+=(127&(n=e[t++]))*v,v*=128}while(0!=(128&n));var y=t+g;if(y>e.length)return[null,r];var m=new E(d);switch(d){case i:1&e[t++]&&(m.sessionPresent=!0),m.returnCode=e[t++];break;case o:var b=p>>1&3,w=T(e,t),_=N(e,t+=2,w);t+=w,b>0&&(m.messageIdentifier=T(e,t),t+=2);var S=new U(e.subarray(t,y));1==(1&p)&&(S.retained=!0),8==(8&p)&&(S.duplicate=!0),S.qos=b,S.destinationName=_,m.payloadMessage=S;break;case s:case a:case u:case c:case h:m.messageIdentifier=T(e,t);break;case f:m.messageIdentifier=T(e,t),t+=2,m.returnCode=e.subarray(t,y)}return[m,y]}function I(e,t,n){return t[n++]=e>>8,t[n++]=e%256,n}function O(e,t,n,r){return k(e,n,r=I(t,n,r)),r+t}function T(e,t){return 256*e[t]+e[t+1]}function P(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r>2047?(55296<=r&&r<=56319&&(n++,t++),t+=3):r>127?t+=2:t++}return t}function k(e,t,n){for(var r=n,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(55296<=o&&o<=56319){var s=e.charCodeAt(++i);if(isNaN(s))throw new Error(_(b.MALFORMED_UNICODE,[o,s]));o=s-56320+(o-55296<<10)+65536}o<=127?t[r++]=o:o<=2047?(t[r++]=o>>6&31|192,t[r++]=63&o|128):o<=65535?(t[r++]=o>>12&15|224,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>18&7|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return t}function N(e,t,n){for(var r,i="",o=t;o<t+n;){var s=e[o++];if(s<128)r=s;else{var a=e[o++]-128;if(a<0)throw new Error(_(b.MALFORMED_UTF,[s.toString(16),a.toString(16),""]));if(s<224)r=64*(s-192)+a;else{var u=e[o++]-128;if(u<0)throw new Error(_(b.MALFORMED_UTF,[s.toString(16),a.toString(16),u.toString(16)]));if(s<240)r=4096*(s-224)+64*a+u;else{var c=e[o++]-128;if(c<0)throw new Error(_(b.MALFORMED_UTF,[s.toString(16),a.toString(16),u.toString(16),c.toString(16)]));if(!(s<248))throw new Error(_(b.MALFORMED_UTF,[s.toString(16),a.toString(16),u.toString(16),c.toString(16)]));r=262144*(s-240)+4096*a+64*u+c}}}r>65535&&(r-=65536,i+=String.fromCharCode(55296+(r>>10)),r=56320+(1023&r)),i+=String.fromCharCode(r)}return i}E.prototype.encode=function(){var e,t=(15&this.type)<<4,n=0,i=[],s=0;switch(void 0!==this.messageIdentifier&&(n+=2),this.type){case r:switch(this.mqttVersion){case 3:n+=S.length+3;break;case 4:n+=A.length+3}n+=P(this.clientId)+2,void 0!==this.willMessage&&(n+=P(this.willMessage.destinationName)+2,(e=this.willMessage.payloadBytes)instanceof Uint8Array||(e=new Uint8Array(c)),n+=e.byteLength+2),void 0!==this.userName&&(n+=P(this.userName)+2),void 0!==this.password&&(n+=P(this.password)+2);break;case l:t|=2;for(var a=0;a<this.topics.length;a++)i[a]=P(this.topics[a]),n+=i[a]+2;n+=this.requestedQos.length;break;case d:for(t|=2,a=0;a<this.topics.length;a++)i[a]=P(this.topics[a]),n+=i[a]+2;break;case u:t|=2;break;case o:this.payloadMessage.duplicate&&(t|=8),t=t|=this.payloadMessage.qos<<1,this.payloadMessage.retained&&(t|=1),n+=(s=P(this.payloadMessage.destinationName))+2;var c=this.payloadMessage.payloadBytes;n+=c.byteLength,c instanceof ArrayBuffer?c=new Uint8Array(c):c instanceof Uint8Array||(c=new Uint8Array(c.buffer))}var f=function(e){var t=new Array(1),n=0;do{var r=e%128;(e>>=7)>0&&(r|=128),t[n++]=r}while(e>0&&n<4);return t}(n),h=f.length+1,p=new ArrayBuffer(n+h),g=new Uint8Array(p);if(g[0]=t,g.set(f,1),this.type==o)h=O(this.payloadMessage.destinationName,s,g,h);else if(this.type==r){switch(this.mqttVersion){case 3:g.set(S,h),h+=S.length;break;case 4:g.set(A,h),h+=A.length}var v=0;this.cleanSession&&(v=2),void 0!==this.willMessage&&(v|=4,v|=this.willMessage.qos<<3,this.willMessage.retained&&(v|=32)),void 0!==this.userName&&(v|=128),void 0!==this.password&&(v|=64),g[h++]=v,h=I(this.keepAliveInterval,g,h)}switch(void 0!==this.messageIdentifier&&(h=I(this.messageIdentifier,g,h)),this.type){case r:h=O(this.clientId,P(this.clientId),g,h),void 0!==this.willMessage&&(h=O(this.willMessage.destinationName,P(this.willMessage.destinationName),g,h),h=I(e.byteLength,g,h),g.set(e,h),h+=e.byteLength),void 0!==this.userName&&(h=O(this.userName,P(this.userName),g,h)),void 0!==this.password&&(h=O(this.password,P(this.password),g,h));break;case o:g.set(c,h);break;case l:for(a=0;a<this.topics.length;a++)h=O(this.topics[a],i[a],g,h),g[h++]=this.requestedQos[a];break;case d:for(a=0;a<this.topics.length;a++)h=O(this.topics[a],i[a],g,h)}return p};var M=function(e,t){this._client=e,this._keepAliveInterval=1e3*t,this.isReset=!1;var n=new E(p).encode(),r=function(e){return function(){return i.apply(e)}},i=function(){this.isReset?(this.isReset=!1,this._client._trace("Pinger.doPing","send PINGREQ"),this._client.socket.send(n),this.timeout=setTimeout(r(this),this._keepAliveInterval)):(this._client._trace("Pinger.doPing","Timed out"),this._client._disconnected(b.PING_TIMEOUT.code,_(b.PING_TIMEOUT)))};this.reset=function(){this.isReset=!0,clearTimeout(this.timeout),this._keepAliveInterval>0&&(this.timeout=setTimeout(r(this),this._keepAliveInterval))},this.cancel=function(){clearTimeout(this.timeout)}},R=function(e,t,n,r){t||(t=30),this.timeout=setTimeout(function(e,t,n){return function(){return e.apply(t,n)}}(n,e,r),1e3*t),this.cancel=function(){clearTimeout(this.timeout)}}
125,x=function(t,r,i,o,s){if(!("WebSocket"in e)||null===e.WebSocket)throw new Error(_(b.UNSUPPORTED,["WebSocket"]));if(!("ArrayBuffer"in e)||null===e.ArrayBuffer)throw new Error(_(b.UNSUPPORTED,["ArrayBuffer"]));for(var a in this._trace("Paho.Client",t,r,i,o,s),this.host=r,this.port=i,this.path=o,this.uri=t,this.clientId=s,this._wsuri=null,this._localKey=r+":"+i+("/mqtt"!=o?":"+o:"")+":"+s+":",this._msg_queue=[],this._buffered_msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0,n)0!==a.indexOf("Sent:"+this._localKey)&&0!==a.indexOf("Received:"+this._localKey)||this.restore(a)};x.prototype.host=null,x.prototype.port=null,x.prototype.path=null,x.prototype.uri=null,x.prototype.clientId=null,x.prototype.socket=null,x.prototype.connected=!1,x.prototype.maxMessageIdentifier=65536,x.prototype.connectOptions=null,x.prototype.hostIndex=null,x.prototype.onConnected=null,x.prototype.onConnectionLost=null,x.prototype.onMessageDelivered=null,x.prototype.onMessageArrived=null,x.prototype.traceFunction=null,x.prototype._msg_queue=null,x.prototype._buffered_msg_queue=null,x.prototype._connectTimeout=null,x.prototype.sendPinger=null,x.prototype.receivePinger=null,x.prototype._reconnectInterval=1,x.prototype._reconnecting=!1,x.prototype._reconnectTimeout=null,x.prototype.disconnectedPublishing=!1,x.prototype.disconnectedBufferSize=5e3,x.prototype.receiveBuffer=null,x.prototype._traceBuffer=null,x.prototype._MAX_TRACE_ENTRIES=100,x.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(_(b.INVALID_STATE,["already connected"]));if(this.socket)throw new Error(_(b.INVALID_STATE,["already connected"]));this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),this.connectOptions=e,this._reconnectInterval=1,this._reconnecting=!1,e.uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},x.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(_(b.INVALID_STATE,["not connected"]));var n=new E(l);n.topics=e.constructor===Array?e:[e],void 0===t.qos&&(t.qos=0),n.requestedQos=[];for(var r=0;r<n.topics.length;r++)n.requestedQos[r]=t.qos;t.onSuccess&&(n.onSuccess=function(e){t.onSuccess({invocationContext:t.invocationContext,grantedQos:e})}),t.onFailure&&(n.onFailure=function(e){t.onFailure({invocationContext:t.invocationContext,errorCode:e,errorMessage:_(e)})}),t.timeout&&(n.timeOut=new R(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:b.SUBSCRIBE_TIMEOUT.code,errorMessage:_(b.SUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},x.prototype.unsubscribe=function(e,t){if(this._trace("Client.unsubscribe",e,t),!this.connected)throw new Error(_(b.INVALID_STATE,["not connected"]));var n=new E(d);n.topics=e.constructor===Array?e:[e],t.onSuccess&&(n.callback=function(){t.onSuccess({invocationContext:t.invocationContext})}),t.timeout&&(n.timeOut=new R(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:b.UNSUBSCRIBE_TIMEOUT.code,errorMessage:_(b.UNSUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},x.prototype.send=function(e){this._trace("Client.send",e);var t=new E(o);if(t.payloadMessage=e,this.connected)e.qos>0?this._requires_ack(t):this.onMessageDelivered&&(this._notify_msg_sent[t]=this.onMessageDelivered(t.payloadMessage)),this._schedule_message(t);else{if(!this._reconnecting||!this.disconnectedPublishing)throw new Error(_(b.INVALID_STATE,["not connected"]));if(Object.keys(this._sentMessages).length+this._buffered_msg_queue.length>this.disconnectedBufferSize)throw new Error(_(b.BUFFER_FULL,[this.disconnectedBufferSize]));e.qos>0?this._requires_ack(t):(t.sequence=++this._sequence,this._buffered_msg_queue.unshift(t))}},x.prototype.disconnect=function(){if(this._trace("Client.disconnect"),this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),!this.socket)throw new Error(_(b.INVALID_STATE,["not connecting or connected"]));var e=new E(v);this._notify_msg_sent[e]=m(this._disconnected,this),this._schedule_message(e)},x.prototype.getTraceLog=function(){if(null!==this._traceBuffer){for(var e in this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length),this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},x.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@-@BUILDLEVEL@")},x.prototype.stopTrace=function(){delete this._traceBuffer},x.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this._wsuri=e,this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.b
125inaryType="arraybuffer",this.socket.onopen=m(this._on_socket_open,this),this.socket.onmessage=m(this._on_socket_message,this),this.socket.onerror=m(this._on_socket_error,this),this.socket.onclose=m(this._on_socket_close,this),this.sendPinger=new M(this,this.connectOptions.keepAliveInterval),this.receivePinger=new M(this,this.connectOptions.keepAliveInterval),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._connectTimeout=new R(this,this.connectOptions.timeout,this._disconnected,[b.CONNECT_TIMEOUT.code,_(b.CONNECT_TIMEOUT)])},x.prototype._schedule_message=function(e){this._msg_queue.unshift(e),this.connected&&this._process_queue()},x.prototype.store=function(e,t){var r={type:t.type,messageIdentifier:t.messageIdentifier,version:1};switch(t.type){case o:t.pubRecReceived&&(r.pubRecReceived=!0),r.payloadMessage={};for(var i="",s=t.payloadMessage.payloadBytes,a=0;a<s.length;a++)s[a]<=15?i=i+"0"+s[a].toString(16):i+=s[a].toString(16);r.payloadMessage.payloadHex=i,r.payloadMessage.qos=t.payloadMessage.qos,r.payloadMessage.destinationName=t.payloadMessage.destinationName,t.payloadMessage.duplicate&&(r.payloadMessage.duplicate=!0),t.payloadMessage.retained&&(r.payloadMessage.retained=!0),0===e.indexOf("Sent:")&&(void 0===t.sequence&&(t.sequence=++this._sequence),r.sequence=t.sequence);break;default:throw Error(_(b.INVALID_STORED_DATA,[e+this._localKey+t.messageIdentifier,r]))}n.setItem(e+this._localKey+t.messageIdentifier,JSON.stringify(r))},x.prototype.restore=function(e){var t=n.getItem(e),r=JSON.parse(t),i=new E(r.type,r);switch(r.type){case o:for(var s=r.payloadMessage.payloadHex,a=new ArrayBuffer(s.length/2),u=new Uint8Array(a),c=0;s.length>=2;){var l=parseInt(s.substring(0,2),16);s=s.substring(2,s.length),u[c++]=l}var f=new U(u);f.qos=r.payloadMessage.qos,f.destinationName=r.payloadMessage.destinationName,r.payloadMessage.duplicate&&(f.duplicate=!0),r.payloadMessage.retained&&(f.retained=!0),i.payloadMessage=f;break;default:throw Error(_(b.INVALID_STORED_DATA,[e,t]))}0===e.indexOf("Sent:"+this._localKey)?(i.payloadMessage.duplicate=!0,this._sentMessages[i.messageIdentifier]=i):0===e.indexOf("Received:"+this._localKey)&&(this._receivedMessages[i.messageIdentifier]=i)},x.prototype._process_queue=function(){for(var e=null;e=this._msg_queue.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},x.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,this._sentMessages[e.messageIdentifier]=e,e.type===o&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},x.prototype._on_socket_open=function(){var e=new E(r,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},x.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data);for(var t=this._deframeMessages(e.data),n=0;n<t.length;n+=1)this._handleMessage(t[n])},x.prototype._deframeMessages=function(e){var t=new Uint8Array(e),n=[];if(this.receiveBuffer){var r=new Uint8Array(this.receiveBuffer.length+t.length);r.set(this.receiveBuffer),r.set(t,this.receiveBuffer.length),t=r,delete this.receiveBuffer}try{for(var i=0;i<t.length;){var o=C(t,i),s=o[0];if(i=o[1],null===s)break;n.push(s)}i<t.length&&(this.receiveBuffer=t.subarray(i))}catch(e){var a="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(b.INTERNAL_ERROR.code,_(b.INTERNAL_ERROR,[e.message,a]))}return n},x.prototype._handleMessage=function(e){this._trace("Client._handleMessage",e);
125try{switch(e.type){case i:if(this._connectTimeout.cancel(),this._reconnectTimeout&&this._reconnectTimeout.cancel(),this.connectOptions.cleanSession){for(var t in this._sentMessages){var r=this._sentMessages[t];n.removeItem("Sent:"+this._localKey+r.messageIdentifier)}for(var t in this._sentMessages={},this._receivedMessages){var l=this._receivedMessages[t];n.removeItem("Received:"+this._localKey+l.messageIdentifier)}this._receivedMessages={}}if(0!==e.returnCode){this._disconnected(b.CONNACK_RETURNCODE.code,_(b.CONNACK_RETURNCODE,[e.returnCode,w[e.returnCode]]));break}this.connected=!0,this.connectOptions.uris&&(this.hostIndex=this.connectOptions.uris.length);var d=[];for(var p in this._sentMessages)this._sentMessages.hasOwnProperty(p)&&d.push(this._sentMessages[p]);if(this._buffered_msg_queue.length>0)for(var y=null;y=this._buffered_msg_queue.pop();)d.push(y),this.onMessageDelivered&&(this._notify_msg_sent[y]=this.onMessageDelivered(y.payloadMessage));d=d.sort((function(e,t){return e.sequence-t.sequence}));for(var m=0,S=d.length;m<S;m++)if((r=d[m]).type==o&&r.pubRecReceived){var A=new E(u,{messageIdentifier:r.messageIdentifier});this._schedule_message(A)}else this._schedule_message(r);this.connectOptions.onSuccess&&this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext});var C=!1;this._reconnecting&&(C=!0,this._reconnectInterval=1,this._reconnecting=!1),this._connected(C,this._wsuri),this._process_queue();break;case o:this._receivePublish(e);break;case s:(r=this._sentMessages[e.messageIdentifier])&&(delete this._sentMessages[e.messageIdentifier],n.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(r.payloadMessage));break;case a:(r=this._sentMessages[e.messageIdentifier])&&(r.pubRecReceived=!0,A=new E(u,{messageIdentifier:e.messageIdentifier}),this.store("Sent:",r),this._schedule_message(A));break;case u:l=this._receivedMessages[e.messageIdentifier],n.removeItem("Received:"+this._localKey+e.messageIdentifier),l&&(this._receiveMessage(l),delete this._receivedMessages[e.messageIdentifier]);var I=new E(c,{messageIdentifier:e.messageIdentifier});this._schedule_message(I);break;case c:r=this._sentMessages[e.messageIdentifier],delete this._sentMessages[e.messageIdentifier],n.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(r.payloadMessage);break;case f:(r=this._sentMessages[e.messageIdentifier])&&(r.timeOut&&r.timeOut.cancel(),128===e.returnCode[0]?r.onFailure&&r.onFailure(e.returnCode):r.onSuccess&&r.onSuccess(e.returnCode),delete this._sentMessages[e.messageIdentifier]);break;case h:(r=this._sentMessages[e.messageIdentifier])&&(r.timeOut&&r.timeOut.cancel(),r.callback&&r.callback(),delete this._sentMessages[e.messageIdentifier]);break;case g:this.sendPinger.reset();break;case v:this._disconnected(b.INVALID_MQTT_MESSAGE_TYPE.code,_(b.INVALID_MQTT_MESSAGE_TYPE,[e.type]));break;default:this._disconnected(b.INVALID_MQTT_MESSAGE_TYPE.code,_(b.INVALID_MQTT_MESSAGE_TYPE,[e.type]))}}catch(e){var O="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(b.INTERNAL_ERROR.code,_(b.INTERNAL_ERROR,[e.message,O]))}},x.prototype._on_socket_error=function(e){this._reconnecting||this._disconnected(b.SOCKET_ERROR.code,_(b.SOCKET_ERROR,[e.data]))},x.prototype._on_socket_close=function(){this._reconnecting||this._disconnected(b.SOCKET_CLOSE.code,_(b.SOCKET_CLOSE))},x.prototype._socket_send=function(e){if(1==e.type){var t=this._traceMask(e,"password");this._trace("Client._socket_send",t)}else this._trace("Client._socket_send",e);this.socket.send(e.encode()),this.sendPinger.reset()},x.prototype._receivePublish=function(e){switch(e.payloadMessage.qos){case"undefined":case 0:this._receiveMessage(e);break;case 1:var t=new E(s,{messageIdentifier:e.messageIdentifier});this._schedule_message(t),this._receiveMessage(e);break;case 2:this._receivedMessages[e.messageIdentifier]=e,this.store("Received:",e);var n=new E(a,{messageIdentifier:e.messageIdentifier});this._schedule_message(n);break;default:throw Error("Invaild qos="+e.payloadMessage.qos)}},x.prototype._receiveMessage=function(e){this.onMessageArrived&&this.onMessageArrived(e.payloadMessage)},x.prototype._connected=function(e,t){this.onConnected&&this.onConnected(e,t)},x.prototype._reconnect=function(){this._trace("Client._reconnect"),this.connected||(this._reconnecting=!0,this.sendPinger.cancel(),this.receivePinger.cancel(),this._reconnectInterval<128&&(this._reconnectInterval=2*this._reconnectInterval),this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri))},x.prototype._disconnected=function(e,t){if(this._trace("Client._disconnected",e,t),void 0!==e&&this._reconnecting)this._reconnectTimeout=new R(this,this._reconnectInterval,this._reconnect);else if(this.sendPinger.cancel(),this.receivePinger.cancel(),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._msg_queue=[],this._buffered_msg_queue=[],this._notify_msg_sent={},this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,1===this.socket.readyState&&this.socket.close(),delete this.socket),this.connectOptions.uris&&this.hostIndex<this.connectOptions.uris.length-1)this.hostIndex++,this._doConnect(this.connectOptions.uris[this.hostIndex]);else if(void 0===e&&(e=b.OK.code,t=_(b.OK)),this.connected){if(this.connected=!1,this.onConnectionLost&&this.onConnectionLost({errorCode:e,errorMessage:t,reconnect:this.connectOptions.reconnect,uri:this._wsuri}),e!==b.OK.code&&this.connectOptions.reconnect)return this._reconnectInterval=1,void this._reconnect()}else 4===this.connectOptions.mqttVersion&&!1===this.connectOptions.mqttVersionExplicit?(this._trace("Failed to connect V4, dropping back to V3"),this.connectOptions.mqttVersion=3,this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri)):this.connectOptions.onFailure&&this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext,errorCode:e,errorMessage:t})},x.prototype._trace=function(){if(this.traceFunction){var e=Array.prototype.slice.call(arguments);for(var t in e)void 0!==e[t]&&e.splice(t,1,JSON.stringify(e[t]));var n=e.join("");this.traceFunction({severity:"Debug",message:n})}if(null!==this._traceBuffer){t=0;for(var r=arguments.length;t<r;t++)this._traceBuffer.length==this._MAX_TRACE_ENTRIES&&this._traceBuffer.shift(),0===t||void 0===arguments[t]?this._traceBuffer.push(arguments[t]):this._traceBuffer.push(" "+JSON.stringify(arguments[t]))}},x.prototype._traceMask=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=r==t?"******":e[r]);return n};var U=function(e){var t,n;if(!("string"==typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)&&!(e instanceof DataView)))throw _(b.INVALID_ARGUMENT,[e,"newPayload"]);t=e;var r=0,i=!1,o=!1;Object.defineProperties(this,{payloadString:{enumerable:!0,get:function(){return"string"==typeof t?t:N(t,0,t.length)}},payloadBytes:{enumerable:!0,get:function(){if("string"==typeof t){var e=new ArrayBuffer(P(t)),n=new Uint8Array(e);
125return k(t,n,0),n}return t}},destinationName:{enumerable:!0,get:function(){return n},set:function(e){if("string"!=typeof e)throw new Error(_(b.INVALID_ARGUMENT,[e,"newDestinationName"]));n=e}},qos:{enumerable:!0,get:function(){return r},set:function(e){if(0!==e&&1!==e&&2!==e)throw new Error("Invalid argument:"+e);r=e}},retained:{enumerable:!0,get:function(){return i},set:function(e){if("boolean"!=typeof e)throw new Error(_(b.INVALID_ARGUMENT,[e,"newRetained"]));i=e}},topic:{enumerable:!0,get:function(){return n},set:function(e){n=e}},duplicate:{enumerable:!0,get:function(){return o},set:function(e){o=e}}})};return{Client:function(e,t,n,r){var i;if("string"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"host"]));if(2==arguments.length){r=t;var o=(i=e).match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/);if(!o)throw new Error(_(b.INVALID_ARGUMENT,[e,"host"]));e=o[4]||o[2],t=parseInt(o[7]),n=o[8]}else{if(3==arguments.length&&(r=n,n="/mqtt"),"number"!=typeof t||t<0)throw new Error(_(b.INVALID_TYPE,[typeof t,"port"]));if("string"!=typeof n)throw new Error(_(b.INVALID_TYPE,[typeof n,"path"]));var s=-1!==e.indexOf(":")&&"["!==e.slice(0,1)&&"]"!==e.slice(-1);i="ws://"+(s?"["+e+"]":e)+":"+t+n}for(var a=0,u=0;u<r.length;u++){var c=r.charCodeAt(u);55296<=c&&c<=56319&&u++,a++}if("string"!=typeof r||a>65535)throw new Error(_(b.INVALID_ARGUMENT,[r,"clientId"]));var l=new x(i,e,t,n,r);Object.defineProperties(this,{host:{get:function(){return e},set:function(){throw new Error(_(b.UNSUPPORTED_OPERATION))}},port:{get:function(){return t},set:function(){throw new Error(_(b.UNSUPPORTED_OPERATION))}},path:{get:function(){return n},set:function(){throw new Error(_(b.UNSUPPORTED_OPERATION))}},uri:{get:function(){return i},set:function(){throw new Error(_(b.UNSUPPORTED_OPERATION))}},clientId:{get:function(){return l.clientId},set:function(){throw new Error(_(b.UNSUPPORTED_OPERATION))}},onConnected:{get:function(){return l.onConnected},set:function(e){if("function"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"onConnected"]));l.onConnected=e}},disconnectedPublishing:{get:function(){return l.disconnectedPublishing},set:function(e){l.disconnectedPublishing=e}},disconnectedBufferSize:{get:function(){return l.disconnectedBufferSize},set:function(e){l.disconnectedBufferSize=e}},onConnectionLost:{get:function(){return l.onConnectionLost},set:function(e){if("function"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"onConnectionLost"]));l.onConnectionLost=e}},onMessageDelivered:{get:function(){return l.onMessageDelivered},set:function(e){if("function"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"onMessageDelivered"]));l.onMessageDelivered=e}},onMessageArrived:{get:function(){return l.onMessageArrived},set:function(e){if("function"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"onMessageArrived"]));l.onMessageArrived=e}},trace:{get:function(){return l.traceFunction},set:function(e){if("function"!=typeof e)throw new Error(_(b.INVALID_TYPE,[typeof e,"onTrace"]));l.traceFunction=e}}}),this.connect=function(e){if(y(e=e||{},{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",reconnect:"boolean",mqttVersion:"number",mqttVersionExplicit:"boolean",uris:"object"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),e.mqttVersion>4||e.mqttVersion<3)throw new Error(_(b.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0!==e.password&&void 0===e.userName)throw new Error(_(b.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof U))throw new Error(_(b.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload=null,void 0===e.willMessage.destinationName)throw new Error(_(b.INVALID_TYPE,[typeof e.willMessage.destinationName,"connectOptions.willMessage.destinationName"]))}if(void 0===e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(_(b.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(_(b.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,r=0;r<e.hosts.length;r++){if("string"!=typeof e.hosts[r])throw new Error(_(b.INVALID_TYPE,[typeof e.hosts[r],"connectOptions.hosts["+r+"]"]));if(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/.test(e.hosts[r])){if
125(0===r)t=!0;else if(!t)throw new Error(_(b.INVALID_ARGUMENT,[e.hosts[r],"connectOptions.hosts["+r+"]"]))}else if(t)throw new Error(_(b.INVALID_ARGUMENT,[e.hosts[r],"connectOptions.hosts["+r+"]"]))}if(t)e.uris=e.hosts;else{if(!e.ports)throw new Error(_(b.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(!(e.ports instanceof Array))throw new Error(_(b.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(e.hosts.length!==e.ports.length)throw new Error(_(b.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));for(e.uris=[],r=0;r<e.hosts.length;r++){if("number"!=typeof e.ports[r]||e.ports[r]<0)throw new Error(_(b.INVALID_TYPE,[typeof e.ports[r],"connectOptions.ports["+r+"]"]));var o=e.hosts[r],s=e.ports[r],a=-1!==o.indexOf(":");i="ws://"+(a?"["+o+"]":o)+":"+s+n,e.uris.push(i)}}}l.connect(e)},this.subscribe=function(e,t){if("string"!=typeof e&&e.constructor!==Array)throw new Error("Invalid argument:"+e);if(y(t=t||{},{qos:"number",invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("subscribeOptions.timeout specified with no onFailure callback.");if(void 0!==t.qos&&0!==t.qos&&1!==t.qos&&2!==t.qos)throw new Error(_(b.INVALID_ARGUMENT,[t.qos,"subscribeOptions.qos"]));l.subscribe(e,t)},this.unsubscribe=function(e,t){if("string"!=typeof e&&e.constructor!==Array)throw new Error("Invalid argument:"+e);if(y(t=t||{},{invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");l.unsubscribe(e,t)},this.send=function(e,t,n,r){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof U)&&"string"!=typeof e)throw new Error("Invalid argument:"+typeof e);if(void 0===(i=e).destinationName)throw new Error(_(b.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));l.send(i)}else(i=new U(t)).destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=r),l.send(i)},this.publish=function(e,t,n,r){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof U)&&"string"!=typeof e)throw new Error("Invalid argument:"+typeof e);if(void 0===(i=e).destinationName)throw new Error(_(b.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));l.send(i)}else(i=new U(t)).destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=r),l.send(i)},this.disconnect=function(){l.disconnect()},this.getTraceLog=function(){return l.getTraceLog()},this.startTrace=function(){l.startTrace()},this.stopTrace=function(){l.stopTrace()},this.isConnected=function(){return l.connected}},Message:U}}(void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},e.exports=n()}).call(this,n(20))},,,,,,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=(this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t})(n(80));e.exports=o},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.start=t.customerPortal=void 0;var s=o(n(37));t.customerPortal=o(n(37)),t.start=function(){return s.start()}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),l=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>
vendor: 4,787 bytes, line 125
1254,u[l++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(l(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=d,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=d,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),o-=c}return(h?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+h]=255&s,h+=p,s/=256,c-=8);e[n+h-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){var r,i,o,s;e.exports=(r=n(6),o=(i=r).lib.Base,s=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),a=i.words,u=o.words,c=0;c<n;c++)a[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},function(e,t){},function(e,t,n){e.exports=self.fetch||(self.fetch=n(39).default||n(39))},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function g(e){throw new RangeError(d[e])}function v(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+v((e=e.replace(f,".")).split("."),t).join(".")}function m(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function b(e){return v(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))}function S(e){var t,n,r,i,o,s,a,c,l,f,d,p=[],v=e.length,y=0,m=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),p.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<v;){for(o=y,s=1,a=36;i>=v&&g("invalid-input"),((c=(d=e.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((u-y)/s))&&g("overflow"),y+=c*s,!(c<(l=a<=w?1:a>=w+26?26:a-w));a+=36)s>h(u/(f=36-l))&&g("overflow"),s*=f;w=_(y-o,t=p.length+1,0==o),h(y/t)>u-m&&g("overflow"),m+=h(y/t),y%=t,p.splice(y++,0,m)}return b(p)}function A(e){var t,n,r,i,o,s,a,c,l,f,d,v,y,b,S,A=[];for(v=(e=m(e)).length,t=128,n=0,o=72,s=0;s<v;++s)(d=e[s])<128&&A.push(p(d));for(r=i=A.length,i&&A.push("-");r<v;){for(a=u,s=0;s<v;++s)(d=e[s])>=t&&d<a&&(a=d);for(a-t>h((u-n)/(y=r+1))&&g("overflow"),n+=(a-t)*y,t=a,s=0;s<v;++s)if((d=e[s])<t&&++n>u&&g("overflow"),d==t){for(c=n,l=36;!(c<(f=l<=o?1:l>=o+26?26:l-o));
125l+=36)S=c-f,b=36-f,A.push(p(w(f+S%b,0))),c=h(S/b);A.push(p(w(c,0))),o=_(n,y,r==i),n=0,++r}++n,++t}return A.join("")}a={version:"1.4.1",ucs2:{decode:m,encode:b},decode:S,encode:A,toASCII:function(e){return y(e,(function(e){return l.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(89)(e),n(20))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(92),t.encode=t.stringify=n(93)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,d,h,p,g=e[l].replace(a,"%20"),v=g.indexOf(n);v>=0?(f=g.substr(0,v),d=g.substr(v+1)):(f=g,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),r(s,h)?i(s[h])?s[h].push(p):s[h]=[s[h],p]:s[h]=p}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(r(s))+n;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(r(e))})).join(t):a+encodeURIComponent(r(e[s]))})).join(t):a?encodeURIComponent(r(a))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){var r,i,o=n(42),s=n(43),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var h=o();null==f&&(f=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,v=p-a+(g-u)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||p>a)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,u=g,i=d;var y=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var m=p/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>24&15|16,l[c++]=m>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var b=0;b<6;++b)l[c+b]=f[b];return t||s(l)}},function(e,t,n){var r=n(42),i=n(43);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(44),i=n(46),o=n(102),s=n(105),a=n(107),u=n(29),c=function(){function e(e){(0,s.supportsWebCrypto)((0,u.locateWindow)())?this.hash=new i.Sha256(e):(0,a.isMsWindow)((0,u.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new o.Sha256(e)}return e.prototype.update=function(e,t){this.hash.update(e,t)},e.prototype.digest=function(){return this.hash.digest()},e}();t.Sha256=c},function(e,t,n){"use strict";
vendor: 4,525 bytes, line 125
125Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(141),i=void 0!==e&&e.from?function(t){return e.from(t,"utf8")}:r.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)}}).call(this,n(1).Buffer)},function(e,t,n){"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}},function(e,t,n){"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])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Array.from){for(var t=new Uint32Array(e.length);0<e.length;)t[0]=e[0];return t}return Uint32Array.from(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(0).__exportStar)(n(103),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(0),i=n(48),o=n(104),s=n(47),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=(0,s.convertToBuffer)(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!(0,s.isEmptyData)(e)&&!this.error)try{this.hash.update((0,s.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(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,this.digestSync()]}))}))},e}();t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(48),i=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 new 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 new 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 i=this.bufferLength;i<r.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(r.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=u,u=a,a=s+g|0,s=o,o=i,i=n,n=g+v|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,n){"use strict";
125Object.defineProperty(t,"__esModule",{value:!0}),n(0).__exportStar(n(106),t)},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(0),i=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function o(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function s(e){return e&&i.every((function(t){return"function"==typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!o(e)||"object"!=typeof e.crypto.subtle)&&s(e.crypto.subtle)},t.supportsSecureRandom=o,t.supportsSubtleCrypto=s,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(!s(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]}}
vendor: 7,107 bytes, line 125
125))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);r.__exportStar(n(108),t),r.__exportStar(n(109),t),r.__exportStar(n(110),t),r.__exportStar(n(111),t),r.__exportStar(n(112),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var r=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,n=t.getRandomValues,i=t.subtle;return r.map((function(e){return i[e]})).concat(n).every((function(e){return"function"==typeof e}))}return!1}},function(e,t,n){"use strict";var r=n(8),i=n(51),o=n(114),s=n(57);function a(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var u=a(n(54));u.Axios=o,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=n(58),u.CancelToken=n(127),u.isCancel=n(53),u.all=function(e){return Promise.all(e)},u.spread=n(128),u.isAxiosError=n(129),e.exports=u,e.exports.default=u},function(e,t,n){"use strict";var r=n(8),i=n(52),o=n(115),s=n(116),a=n(57);function u(e){this.defaults=e,this.interceptors={request:new o,response:new o}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},u.prototype.getUri=function(e){return e=a(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(a(r||{},{method:e,url:t,data:n}))}})),e.exports=u},function(e,t,n){"use strict";var r=n(8);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(8),i=n(117),o=n(53),s=n(54);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(56);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(8);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(123),i=n(124);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,s={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(s[t]&&i.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},function(e,t,n){"use strict";var r=n(8);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(58);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t,n){"use strict";
125Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(60),o=n(131),s=n(66),a=function(){function e(e){if(this.hash=new o.RawSha256,e){this.outer=new o.RawSha256;var t=function(e){var t=u(e);if(t.byteLength>i.BLOCK_SIZE){var n=new o.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(i.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(i.BLOCK_SIZE);n.set(t);for(var r=0;r<i.BLOCK_SIZE;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(r=0;r<t.byteLength;r++)t[r]=0}}return e.prototype.update=function(e){if(!function(e){if("string"==typeof e)return 0===e.length;return 0===e.byteLength}(e)&&!this.error)try{this.hash.update(u(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}();function u(e){return"string"==typeof e?s.fromUtf8(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(60),i=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 new 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 new 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 i=this.bufferLength;i<r.BLOCK_SIZE;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<r.BLOCK_SIZE-8;i++)t.setUint8(i,0);t.setUint32(r.BLOCK_SIZE-8,Math.floor(e/4294967296),!0),t.setUint32(r.BLOCK_SIZE-4,e),this.hashBuffer(),this.finished=!0}var o=new Uint8Array(r.DIGEST_LENGTH);for(i=0;i<8;i++)o[4*i]=this.state[i]>>>24&255,o[4*i+1]=this.state[i]>>>16&255,o[4*i+2]=this.state[i]>>>8&255,o[4*i+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=0;f<r.BLOCK_SIZE;f++){if(f<16)this.temp[f]=(255&e[4*f])<<24|(255&e[4*f+1])<<16|(255&e[4*f+2])<<8|255&e[4*f+3];else{var d=this.temp[f-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,p=((d=this.temp[f-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(p+this.temp[f-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(l+(r.KEY[f]+this.temp[f]|0)|0)|0,v=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&o^i&o)|0;l=c,c=u,u=a,a=s+g|0,s=o,o=i,i=n,n=g+v|0}t[0]+=n,t[1]+=i,t[2]+=o,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=l},e}();t.RawSha256=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var s=function(){return"function"==typeof Symbol},a=function(e){return s()&&Boolean(Symbol[e])},u=function(e){return a(e)?Symbol[e]:"@@"+e};s()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var c=u("iterator"),l=u("observable"),f=u("species");function d(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function h(e){var t=e.constructor;return void 0!==t&&null===(t=t[f])&&(t=void 0),void 0!==t?t:A}function p(e){return e instanceof A}function g(e){g.log?g.log(e):setTimeout((function(){throw e}))}function v(e){Promise.resolve().then((function(){try{e()}catch(e){g(e)}}))}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=d(t,"unsubscribe");n&&n.call(t)}}catch(e){g(e)}}function m(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function b(e,t,n){e._state="running";var r=e._observer;try{var i=d(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(m(e),!i)throw n;i.call(r,n);break;case"complete":m(e),i&&i.call(r)}}catch(e){g(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function w(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void v((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(b(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)}))):void b(e,t,n);e._queue.push({type:t,value:n})}}var _=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new S(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return o(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(m(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),S=function(){function e(t){r(this,e),this._subscription=t}return o(e,[{key:"next",value:function(e){w(this._subscription,"next",e)}},{key:"error",value:function(e){w(this._subscription,"error",e)}},{key:"complete",value:function(){w(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),A=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return o(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new _(e,this._subscriber)}}
125,{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this),r=arguments.length>1,i=!1,o=arguments[1],s=o;return new n((function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{s=e(s,t)}catch(e){return n.error(e)}else s=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(s),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=h(this);return new i((function(t){var r,o=0;return function e(s){r=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=h(this);return new n((function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){r.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:l,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=d(t,l);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return p(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(a("iterator")&&(r=d(t,c)))return new n((function(e){v((function(){if(!e.closed){var n=!0,i=!1,o=void 0;try{for(var s,a=r.call(t)[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){v((function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"==typeof this?this:e;return new i((function(e){v((function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}}))}))}},{key:f,get:function(){return this}}]),e}();t.Observable=A,s()&&Object.defineProperty(A,Symbol("extensions"),{value:{symbol:l,hostReportError:g},configurable:!0})},function(e,t,n){var r,i,o=n(61),s=n(62),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,l=t||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:i;if(null==f||null==d){var h=o();null==f&&(f=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==d&&(d=i=16383&(h[6]<<8|h[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:u+1,v=p-a+(g-u)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||p>a)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,u=g,i=d;var y=(1e4*(268435455&(p+=122192928e5))+g)%4294967296;l[c++]=y>>>24&255,l[c++]=y>>>16&255,l[c++]=y>>>8&255,l[c++]=255&y;var m=p/4294967296*1e4&268435455;l[c++]=m>>>8&255,l[c++]=255&m,l[c++]=m>>>
12524&15|16,l[c++]=m>>>16&255,l[c++]=d>>>8|128,l[c++]=255&d;for(var b=0;b<6;++b)l[c+b]=f[b];return t||s(l)}},function(e,t,n){var r=n(61),i=n(62);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function s(e,t,n){return e.concat(t).map((function(e){return o(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function u(e,t){try{return t in e}catch(e){return!1}}function c(e,t,n){var r={};return n.isMergeableObject(e)&&a(e).forEach((function(t){r[t]=o(e[t],n)})),a(t).forEach((function(i){(function(e,t){return u(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(u(e,i)&&n.isMergeableObject(t[i])?r[i]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(i,n)(e[i],t[i],n):r[i]=o(t[i],n))})),r}function l(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||s,n.isMergeableObject=n.isMergeableObject||r,n.cloneUnlessOtherwiseSpecified=o;var i=Array.isArray(t);return i===Array.isArray(e)?i?n.arrayMerge(e,t,n):c(e,t,n):o(t,n)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var f=l;e.exports=f},function(e,t,n){(function(r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(137)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(28))},function(e,t,n){e.exports=function(e){function t(e){let n;function o(...e){if(!o.enabled)return;const r=o,i=Number(new Date),s=i-(n||i);r.diff=s,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return n;a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return o.namespace=e,o.enabled=t.enabled(e),o.useColors=t.useColors(),o.color=t.selectColor(e),o.destroy=r,o.extend=i,"function"==typeof t.init&&t.init(o),t.instances.push(o),o}function r(){const e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function i(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){const e=t.instances[n];e.enabled=t.enabled(e.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(138),Object.keys(e).forEach(n=>{t[n]=e[n]}
125),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return s(e,t,o,"day");if(t>=i)return s(e,t,i,"hour");if(t>=r)return s(e,t,r,"minute");if(t>=n)return s(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={aws_project_region:"us-west-2",aws_appsync_graphqlEndpoint:"https://iq6dfgxrsbba3f76edp7snc5ry.appsync-api.us-west-2.amazonaws.com/graphql",aws_appsync_region:"us-west-2",aws_appsync_authenticationType:"API_KEY",aws_appsync_apiKey:"da2-hozqvfjj3fgchljrmerxwtodqu"}},function(e,t,n){"use strict";n.r(t),n.d(t,"v1",(function(){return g})),n.d(t,"v3",(function(){return C})),n.d(t,"v4",(function(){return I})),n.d(t,"v5",(function(){return P})),n.d(t,"NIL",(function(){return k})),n.d(t,"version",(function(){return N})),n.d(t,"validate",(function(){return a})),n.d(t,"stringify",(function(){return d})),n.d(t,"parse",(function(){return v}));var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function o(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var s=/^(?:[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;for(var a=function(e){return"string"==typeof e&&s.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var l,f,d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n},h=0,p=0;var g=function(e,t,n){var r=t&&n||0,i=t||new Array(16),s=(e=e||{}).node||l,a=void 0!==e.clockseq?e.clockseq:f;if(null==s||null==a){var u=e.random||(e.rng||o)();null==s&&(s=l=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=f=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),g=void 0!==e.nsecs?e.nsecs:p+1,v=c-h+(g-p)/1e4;if(v<0&&void 0===e.clockseq&&(a=a+1&16383),(v<0||c>h)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=c,p=g,f=a;var y=(1e4*(268435455&(c+=122192928e5))+g)%4294967296;i[r++]=y>>>24&255,i[r++]=y>>>16&255,i[r++]=y>>>8&255,i[r++]=255&y;var m=c/4294967296*1e4&268435455;i[r++]=m>>>8&255,i[r++]=255&m,i[r++]=m>>>24&15|16,i[r++]=m>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var b=0;b<6;++b)i[r+b]=s[b];return t||d(i)};var v=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var y=function(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=v(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,i){o=o||0;for(var a=0;a<16;++a)i[o+a]=s[a];return i}return d(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function m(e){return 14+(e+64>>>9<<4)+1}function b(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function w(e,t,n,r,i,o){return b((s=b(b(t,e),b(r,o)))<<(a=i)|s>>>32-a,n);var s,a}function _(e,t,n,r,i,o,s){return w(t&n|~t&r,e,t,i,o,s)}function S(e,t,n,r,i,o,s){return w(t&r|n&~r,e,t,i,o,s)}function A(e,t,n,r,i,o,s){return w(t^n^r,e,t,i,o,s)}function E(e,t,n,r,i,o,s){return w(n^(t|~r),e,t,i,o,s)}var C=y("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r=0;r<n;r+=8){var i=e[r>>5]>>>r%32&255,o=parseInt("0123456789abcdef".charAt(i>>>4&15)+"0123456789abcdef".charAt(15&i),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[m(t)-1]=t;
vendor: 3,932 bytes, line 125
125for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,u=r,c=i,l=o;n=_(n,r,i,o,e[s],7,-680876936),o=_(o,n,r,i,e[s+1],12,-389564586),i=_(i,o,n,r,e[s+2],17,606105819),r=_(r,i,o,n,e[s+3],22,-1044525330),n=_(n,r,i,o,e[s+4],7,-176418897),o=_(o,n,r,i,e[s+5],12,1200080426),i=_(i,o,n,r,e[s+6],17,-1473231341),r=_(r,i,o,n,e[s+7],22,-45705983),n=_(n,r,i,o,e[s+8],7,1770035416),o=_(o,n,r,i,e[s+9],12,-1958414417),i=_(i,o,n,r,e[s+10],17,-42063),r=_(r,i,o,n,e[s+11],22,-1990404162),n=_(n,r,i,o,e[s+12],7,1804603682),o=_(o,n,r,i,e[s+13],12,-40341101),i=_(i,o,n,r,e[s+14],17,-1502002290),r=_(r,i,o,n,e[s+15],22,1236535329),n=S(n,r,i,o,e[s+1],5,-165796510),o=S(o,n,r,i,e[s+6],9,-1069501632),i=S(i,o,n,r,e[s+11],14,643717713),r=S(r,i,o,n,e[s],20,-373897302),n=S(n,r,i,o,e[s+5],5,-701558691),o=S(o,n,r,i,e[s+10],9,38016083),i=S(i,o,n,r,e[s+15],14,-660478335),r=S(r,i,o,n,e[s+4],20,-405537848),n=S(n,r,i,o,e[s+9],5,568446438),o=S(o,n,r,i,e[s+14],9,-1019803690),i=S(i,o,n,r,e[s+3],14,-187363961),r=S(r,i,o,n,e[s+8],20,1163531501),n=S(n,r,i,o,e[s+13],5,-1444681467),o=S(o,n,r,i,e[s+2],9,-51403784),i=S(i,o,n,r,e[s+7],14,1735328473),r=S(r,i,o,n,e[s+12],20,-1926607734),n=A(n,r,i,o,e[s+5],4,-378558),o=A(o,n,r,i,e[s+8],11,-2022574463),i=A(i,o,n,r,e[s+11],16,1839030562),r=A(r,i,o,n,e[s+14],23,-35309556),n=A(n,r,i,o,e[s+1],4,-1530992060),o=A(o,n,r,i,e[s+4],11,1272893353),i=A(i,o,n,r,e[s+7],16,-155497632),r=A(r,i,o,n,e[s+10],23,-1094730640),n=A(n,r,i,o,e[s+13],4,681279174),o=A(o,n,r,i,e[s],11,-358537222),i=A(i,o,n,r,e[s+3],16,-722521979),r=A(r,i,o,n,e[s+6],23,76029189),n=A(n,r,i,o,e[s+9],4,-640364487),o=A(o,n,r,i,e[s+12],11,-421815835),i=A(i,o,n,r,e[s+15],16,530742520),r=A(r,i,o,n,e[s+2],23,-995338651),n=E(n,r,i,o,e[s],6,-198630844),o=E(o,n,r,i,e[s+7],10,1126891415),i=E(i,o,n,r,e[s+14],15,-1416354905),r=E(r,i,o,n,e[s+5],21,-57434055),n=E(n,r,i,o,e[s+12],6,1700485571),o=E(o,n,r,i,e[s+3],10,-1894986606),i=E(i,o,n,r,e[s+10],15,-1051523),r=E(r,i,o,n,e[s+1],21,-2054922799),n=E(n,r,i,o,e[s+8],6,1873313359),o=E(o,n,r,i,e[s+15],10,-30611744),i=E(i,o,n,r,e[s+6],15,-1560198380),r=E(r,i,o,n,e[s+13],21,1309151649),n=E(n,r,i,o,e[s+4],6,-145523070),o=E(o,n,r,i,e[s+11],10,-1120210379),i=E(i,o,n,r,e[s+2],15,718787259),r=E(r,i,o,n,e[s+9],21,-343485551),n=b(n,a),r=b(r,u),i=b(i,c),o=b(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(m(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))}));var I=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return d(r)};function O(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function T(e,t){return e<<t|e>>>32-t}var P=y("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),l=0;l<16;++l)c[l]=e[64*u+4*l]<<24|e[64*u+4*l+1]<<16|e[64*u+4*l+2]<<8|e[64*u+4*l+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var d=new Uint32Array(80),h=0;h<16;++h)d[h]=a[f][h];for(var p=16;p<80;++p)d[p]=T(d[p-3]^d[p-8]^d[p-14]^d[p-16],1);for(var g=n[0],v=n[1],y=n[2],m=n[3],b=n[4],w=0;w<80;++w){var _=Math.floor(w/20),S=T(g,5)+O(_,v,y,m)+b+t[_]+d[w]>>>0;b=m,m=y,y=T(v,30)>>>0,v=g,g=S}n[0]=n[0]+g>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+y>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>
125>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),k="00000000-0000-0000-0000-000000000000";var N=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,n){"use strict";n.r(t),n.d(t,"fromUtf8",(function(){return r})),n.d(t,"toUtf8",(function(){return i}));var r=function(e){return"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,63&i|128);else if(n+1<e.length&&55296==(64512&i)&&56320==(64512&e.charCodeAt(n+1))){var o=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n));t.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else t.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(t)}(e)},i=function(e){return"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):function(e){for(var t="",n=0,r=e.length;n<r;n++){var i=e[n];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){var o=e[++n];t+=String.fromCharCode((31&i)<<6|63&o)}else if(240<=i&&i<365){var s="%"+[i,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((15&i)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}}]); 126//# sourceMappingURL=visitor-profile.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.