1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9405],{56315:function(e,t,n){"use strict";n.d(t,{c:function(){return J}});var r=n(35069),o=n(20490),i=n(85389),a=n(25387),u=n(81484),s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e},f=[],l=function(){function e(e,t){this.context=e,this.methodName=t,this._originalMethod=e[t].bind(e)}return e.add=function(e,t,n){d(e,t).set(n)},e.remove=function(e,t){d(e,t).remove()},e.prototype.set=function(e){var t=this;this.context[this.methodName]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t._originalMethod.apply(t,c(n)))}},e.prototype.remove=function(){this.context[this.methodName]=this._originalMethod},e}();function d(e,t){var n=f.filter((function(n){return n.context===e&&n.methodName===t}))[0];return n||(n=new l(e,t),f.push(n)),n}var p=n(59222),h=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},y=new r.k("PageViewTracker"),g="aws-amplify-analytics-prevUrl",b={enable:!1,provider:"AWSPinpoint",getUrl:function(){return p.JS.browserOrNode().isBrowser?window.location.origin+window.location.pathname:""}},m=function(){function e(e,t){y.debug("initialize pageview tracker with opts",t),this._config=Object.assign({},b,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),"SPA"===this._config.type?this._pageViewTrackSPA():this._pageViewTrackDefault()}return e.prototype.configure=function(e){return Object.assign(this._config,e),"SPA"===this._config.type&&this._pageViewTrackSPA(),this._config},e.prototype._isSameUrl=function(){return sessionStorage.getItem(g)===this._config.getUrl()&&(y.debug("the url is same"),!0)},e.prototype._pageViewTrackDefault=function(){return h(this,void 0,void 0,(function(){var e,t,n,r;return v(this,(function(o){switch(o.label){case 0:return p.JS.browserOrNode().isBrowser&&window.addEventListener&&window.sessionStorage?(e=this._config.getUrl(),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(y.debug("not in the supported web enviroment"),[2]);case 1:return n=o.sent(),[3,3];case 2:n=this._config.attributes,o.label=3;case 3:return t=n,r=Object.assign({url:e},t),this._config.enable&&!this._isSameUrl()&&(this._tracker({name:this._config.eventName||"pageView",attributes:r},this._config.provider).catch((function(e){y.debug("Failed to record the page view event",e)})),sessionStorage.setItem(g,e)),[2]}}))}))},e.prototype._trackFunc=function(){return h(this,void 0,void 0,(function(){var e,t,n,r;return v(this,(function(o){switch(o.label){case 0:return p.JS.browserOrNode().isBrowser&&window.addEventListener&&history.pushState&&window.sessionStorage?(e=this._config.getUrl(),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(y.debug("not in the supported web enviroment"),[2]);case 1:return n=o.sent(),[3,3];case 2:n=this._config.attributes,o.label=3;case 3:return t=n,r=Object.assign({url:e},t),this._isSameUrl()||(this._tracker({name:this._config.eventName||"pageView",attributes:r},this._config.provider).catch((function(e){y.debug("Failed to record the page view event",e)})),sessionStorage.setItem(g,e)),[2]}}))}))},e.prototype._pageViewTrackSPA=function(){p.JS.browserOrNode().isBrowser&&window.addEventListener&&history.pushState?this._config.enable&&!this._hasEnabled?(l.add(history,"pushState",this._trackFunc),l.add(history,"replaceState",this._trackFunc),window.addEventListener("popstate",this._trackFunc),this._trackFunc(),this._hasEnabled=!0):(l.remove(history,"pushState"),l.remove(history,"replaceState"),window.removeEventListener("popstate",this._trackFunc),this._hasEnabled=!1):y.debug("not in the supported web enviroment")},e}(),w=p.JS.browserOrNode().isBrowser&&window.Element?window.Element.prototype:null,_=w?w.matches||w.matchesSelector||w.webkitMatchesSelector||w.mozMatchesSelector||w.msMatchesSelector||w.oMatchesSelector:null;function S(e,t){if(e&&1===e.nodeType&&t){if("string"===typeof t||1===t.nodeType)return e===t||E(e,t);if("length"in t)for(var n=0,r=void 0;r=t[n];n++)if(e===r||E(e,r))return!0}return!1}function E(e,t){if("string"!==typeof t)return!1;if(_)return _.call(e,t);for(var n=e.parentNode.querySelectorAll(t),r=0,o=void 0;o=n[r];r++)if(o===e)return!0;return!1}function O(e,t,n,r,o){void 0===o&&(o={});var i=function(e){var t;if(o.composed&&"function"===typeof e.composedPath)for(var i=e.composedPath(),a=0,u=void 0;u=i[a];a++)1===u.nodeType&&S(u,n)&&(t=u);else t=function(e,t,n){if(void 0===n&&(n=!1),e&&1===e.nodeType&&t)for(var r,o=(n?[e]:[]).concat(function(e){for(var t=[],n=e;n&&n.parentNode&&1===n.parentNode.nodeType;)n=n.parentNode,t.push(n);return t}(e)),i=0;r=o[i];i++)if(S(r,t))return r}(e.target,n,!0);t&&r.call(t,e,t)};return e.addEventListener(t,i,o.useCapture),{destroy:function(){e.removeEventListener(t,i,o.useCapture)}}}
1var x=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},P=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},A=new r.k("EventTracker"),T={enable:!1,events:["click"],selectorPrefix:"data-amplify-analytics-",provider:"AWSPinpoint"},I=function(){function e(e,t){p.JS.browserOrNode().isBrowser&&window.addEventListener?(this._config=Object.assign({},T,t),this._tracker=e,this._delegates={},this._trackFunc=this._trackFunc.bind(this),A.debug("initialize pageview tracker with opts",this._config),this.configure(this._config)):A.debug("not in the supported web environment")}return e.prototype.configure=function(e){var t=this;if(Object.assign(this._config,e),this._config.enable){if(this._config.enable&&0===Object.keys(this._delegates).length){var n="["+this._config.selectorPrefix+"on]";this._config.events.forEach((function(e){t._delegates[e]=O(document,e,n,t._trackFunc,{composed:!0,useCapture:!0})}))}}else Object.keys(this._delegates).forEach((function(e){"function"===typeof t._delegates[e].destroy&&t._delegates[e].destroy()})),this._delegates={};return this._config},e.prototype._trackFunc=function(e,t){return x(this,void 0,void 0,(function(){var n,r,o,i,a,u,s;return P(this,(function(c){switch(c.label){case 0:return n={},r=t.getAttribute(this._config.selectorPrefix+"on").split(/\s*,\s*/),o=t.getAttribute(this._config.selectorPrefix+"name"),(i=t.getAttribute(this._config.selectorPrefix+"attrs"))&&i.split(/\s*,\s*/).forEach((function(e){var t=e.trim().split(/\s*:\s*/);n[t[0]]=t[1]})),"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return u=c.sent(),[3,3];case 2:u=this._config.attributes,c.label=3;case 3:return a=u,s=Object.assign({type:e.type,target:e.target.localName+" with id "+e.target.id},a,n),A.debug("events needed to be recorded",r),A.debug("attributes needed to be attached",n),r.indexOf(e.type)<0?(A.debug("event "+e.type+" is not selected to be recorded"),[2]):(this._tracker({name:o||"event",attributes:s},this._config.provider).catch((function(t){A.debug("Failed to record the "+e.type+" event', "+t)})),[2])}}))}))},e}(),k=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},C=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},j=new r.k("SessionTracker"),L={enable:!1,provider:"AWSPinpoint"},R=!1,M=function(){function e(e,t){this._config=Object.assign({},L,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),this._trackBeforeUnload=this._trackBeforeUnload.bind(this),this.configure(this._config)}return e.prototype._envCheck=function(){if(!p.JS.browserOrNode().isBrowser)return!1;if(!document||!document.addEventListener)return j.debug("not in the supported web environment"),!1;if("undefined"!==typeof document.hidden)this._hidden="hidden",this._visibilityChange="visibilitychange";else if("undefined"!==typeof document.msHidden)this._hidden="msHidden",this._visibilityChange="msvisibilitychange";else{if("undefined"===typeof document.webkitHidden)return j.debug("not in the supported web environment"),!1;this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"}return!0},e.prototype._trackFunc=function(){return k(this,void 0,void 0,(function(){var e,t,n;return C(this,(function(r){switch(r.label){case 0:return"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return t=r.sent(),[3,3];case 2:t=this._config.attributes,r.label=3;case 3:return e=t,n=Object.assign({},e),document.visibilityState===this._hidden?this._tracker({name:"_session.stop",attributes:n},this._config.provider).catch((function(e){j.debug("record session stop event failed.",e)})):this._tracker({name:"_session.start",attributes:n},this._config.provider).catch((function(e){j.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype._trackBeforeUnload=function(e){var t=this;("function"===typeof this._config.attributes?Promise.resolve(this._config.attributes()):Promise.resolve(this._config.attributes)).then((function(e){var n=Object.assign({},e);t._tracker({name:"_session.stop",attributes:n,immediate:!0},t._config.provider).catch((function(e){j.debug("record session stop event failed.",e)}))}
1))},e.prototype._sendInitialEvent=function(){return k(this,void 0,void 0,(function(){var e,t,n;return C(this,(function(r){switch(r.label){case 0:return R?(j.debug("the start session has been sent when the page is loaded"),[2]):(R=!0,"function"!==typeof this._config.attributes?[3,2]:[4,this._config.attributes()]);case 1:return t=r.sent(),[3,3];case 2:t=this._config.attributes,r.label=3;case 3:return e=t,n=Object.assign({},e),this._tracker({name:"_session.start",attributes:n},this._config.provider).catch((function(e){j.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype.configure=function(e){return this._envCheck()?(Object.assign(this._config,e),this._config.enable&&!this._hasEnabled?(this._sendInitialEvent(),document.addEventListener(this._visibilityChange,this._trackFunc,!1),window.addEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!0):!this._config.enable&&this._hasEnabled&&(document.removeEventListener(this._visibilityChange,this._trackFunc,!1),window.removeEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!1),this._config):this._config},e}(),D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},D.apply(this,arguments)},N=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},U=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},H=new r.k("AnalyticsClass"),q="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",B={pageView:m,event:I,session:M},z=null,F=function(){function e(){this._config={},this._pluggables=[],this._disabled=!1,this._trackers={},z=this,this.record=this.record.bind(this),o.Xb.listen("auth",V),o.Xb.listen("storage",V),o.Xb.listen("analytics",V)}return e.prototype.getModuleName=function(){return"Analytics"},e.prototype.configure=function(e){var t=this;if(!e)return this._config;H.debug("configure Analytics",e);var n,r,a,s=i._b.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,s.Analytics,e),this._config.disabled&&(this._disabled=!0),void 0===this._config.autoSessionRecord&&(this._config.autoSessionRecord=!0),this._pluggables.forEach((function(e){var n="AWSPinpoint"!==e.getProviderName()||t._config.AWSPinpoint?t._config[e.getProviderName()]:t._config;e.configure(D({disabled:t._config.disabled,autoSessionRecord:t._config.autoSessionRecord},n))})),0===this._pluggables.length&&this.addPluggable(new u.Y),n="configured",r=null,a="The Analytics category has been configured successfully",o.Xb.dispatch("analytics",{event:n,data:r,message:a},"Analytics",q),H.debug("current configuration",this._config),this._config},e.prototype.addPluggable=function(e){if(e&&"Analytics"===e.getCategory()){this._pluggables.push(e);var t="AWSPinpoint"!==e.getProviderName()||this._config.AWSPinpoint?this._config[e.getProviderName()]:this._config,n=D({disabled:this._config.disabled},t);return e.configure(n),n}},e.prototype.getPluggable=function(e){for(var t=0;t<this._pluggables.length;t+=1){var n=this._pluggables[t];if(n.getProviderName()===e)return n}return H.debug("No plugin found with providerName",e),null},e.prototype.removePluggable=function(e){for(var t=0;t<this._pluggables.length&&this._pluggables[t].getProviderName()!==e;)t+=1;return t===this._pluggables.length?void H.debug("No plugin found with providerName",e):void this._pluggables.splice(t,t+1)},e.prototype.disable=function(){this._disabled=!0},e.prototype.enable=function(){this._disabled=!1},e.prototype.startSession=function(e){return N(this,void 0,void 0,(function(){var t;return U(this,(function(n){return t={event:{name:"_session.start"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.stopSession=function(e){return N(this,void 0,void 0,(function(){var t;return U(this,(function(n){return t={event:{name:"_session.stop"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.record=function(e,t,n){return N(this,void 0,void 0,(function(){var r;return U(this,(function(o){return r=null,r="string"===typeof e?{event:{name:e,attributes:t,metrics:n},provider:"AWSPinpoint"}:{event:e,provider:t},[2,this._sendEvent(r)]}))}))},e.prototype.updateEndpoint=function(e,t){return N(this,void 0,void 0,(function(){var n;return U(this,(function(r){return n=D(D({},e),{name:"_update_endpoint"}),[2,this.record(n,t)]}))}))},e.prototype._sendEvent=function(e){var t=this;if(this._disabled)return H.debug("Analytics has been disabled"),Promise.resolve();var n=e.provider?e.provider:"AWSPinpoint";
1return new Promise((function(r,o){t._pluggables.forEach((function(t){t.getProviderName()===n&&t.record(e,{resolve:r,reject:o})}))}))},e.prototype.autoTrack=function(e,t){if(B[e]){"session"===e&&(this._config.autoSessionRecord=t.enable);var n=this._trackers[e];n?n.configure(t):this._trackers[e]=new B[e](this.record,t)}else H.debug("invalid tracker type")},e}(),G=!1,K=!1,W=!1,V=function(e){var t=e.channel,n=e.payload;switch(H.debug("on hub capsule "+t,n),t){case"auth":$(n);break;case"storage":Z(n);break;case"analytics":Y(n)}},Z=function(e){var t=e.data,n=t.attrs,r=t.metrics;n&&W&&z.record({name:"Storage",attributes:n,metrics:r}).catch((function(e){H.debug("Failed to send the storage event automatically",e)}))},$=function(e){var t=e.event;if(t){var n=function(e){return N(void 0,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:if(!K||!W)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,z.record({name:"_userauth."+e})];case 2:return[2,n.sent()];case 3:return t=n.sent(),H.debug("Failed to send the "+e+" event automatically",t),[3,4];case 4:return[2]}}
1))}))};switch(t){case"signIn":return n("sign_in");case"signUp":return n("sign_up");case"signOut":return n("sign_out");case"signIn_failure":return n("auth_fail");case"configured":(K=!0)&&W&&X()}}},Y=function(e){var t=e.event;if(t&&"pinpointProvider_configured"===t)W=!0,K&&W&&X()},X=function(){var e=z.configure();!G&&e.autoSessionRecord&&(z.updateEndpoint({immediate:!0}).catch((function(e){H.debug("Failed to update the endpoint",e)})),G=!0),z.autoTrack("session",{enable:e.autoSessionRecord})},J=new F;a.dQ.register(J)},17024:function(e,t,n){"use strict";n.d(t,{s:function(){return vo}});var r=n(35069),o=n(87653),i=n(70655);var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function u(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 s(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(s(arguments[t]));return e}var f=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,a({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,a({},e))})),n},o=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,c(o(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,c(o(e)))})),t},i=function(){var n,r=[],i=[],u={};return e.forEach((function(e){var t=a(a({},e),{before:[],after:[]});t.name&&(u[t.name]=t),r.push(t)})),t.forEach((function(e){var t=a(a({},e),{before:[],after:[]});t.name&&(u[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=u[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 l[t.step]-l[e.step]||d[t.priority||"normal"]-d[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,c(t)),e}),[]).map((function(e){return e.middleware}))},s={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,u=a({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=e.findIndex((function(e){return e.name===o})),c=e[s];if(c.step!==u.step||c.priority!==u.priority)throw new Error('"'+o+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+u.priority+" priority in "+u.step+" step.");e.splice(s,1)}n.add(o)}e.push(u)},addRelativeTo:function(e,r){var o=r.name,i=r.override,u=a({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var s=t.findIndex((function(e){return e.name===o})),c=t[s];if(c.toMiddleware!==u.toMiddleware||c.relation!==u.relation)throw new Error('"'+o+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+u.relation+' "'+u.toMiddleware+'" middleware.');t.splice(s,1)}n.add(o)}t.push(u)},clone:function(){return r(f())},use:function(e){e.applyToStack(s)},remove:function(r){return"string"===typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(f());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=u(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return s},l={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},d={high:3,normal:2,low:1},p=function(){function e(e){this.middlewareStack=f(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!==typeof t?t:void 0,o="function"===typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);
1if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),h=function(){this.middlewareStack=f()},v=function(e,t){return v=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])},v(e,t)};function y(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}var b=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,g([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};b.prototype=Object.create(String.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(b,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(function(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(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))}}(b);var m,w,_,S,E,O,x,P,A,T,I,k,C,j,L,R,M,D,N,U,H,q,B,z,F,G,K,W,V,Z,$,Y,X,J,Q,ee,te,ne,re,oe,ie,ae,ue,se,ce,fe,le,de,pe,he,ve,ye,ge,be,me,we,_e,Se,Ee,Oe,xe,Pe,Ae,Te,Ie,ke,Ce,je,Le,Re,Me,De,Ne,Ue,He,qe,Be,ze,Fe,Ge,Ke,We,Ve,Ze,$e,Ye,Xe,Je,Qe,et,tt,nt,rt,ot,it,at,ut,st,ct,ft,lt,dt="***SensitiveInformation***";!function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(m||(m={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(w||(w={})),function(e){e.GZIP="GZIP",e.HADOOP_SNAPPY="HADOOP_SNAPPY",e.SNAPPY="Snappy",e.UNCOMPRESSED="UNCOMPRESSED",e.ZIP="ZIP"}(_||(_={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(S||(S={})),function(e){e.GZIP="GZIP",e.NONE="NONE"}(E||(E={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(O||(O={})),function(e){e.AWS_OWNED_CMK="AWS_OWNED_CMK",e.CUSTOMER_MANAGED_CMK="CUSTOMER_MANAGED_CMK"}(x||(x={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(P||(P={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(A||(A={})),function(e){e.BUFFER_INTERVAL_IN_SECONDS="BufferIntervalInSeconds",e.BUFFER_SIZE_IN_MB="BufferSizeInMBs",e.LAMBDA_ARN="LambdaArn",e.LAMBDA_NUMBER_OF_RETRIES="NumberOfRetries",e.ROLE_ARN="RoleArn"}(T||(T={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(I||(I={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(k||(k={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(C||(C={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(j||(j={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(L||(L={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(R||(R={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(M||(M={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(D||(D={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(N||(N={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(U||(U={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(H||(H={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(q||(q={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(B||(B={})),function(e){e.NONE="NONE",e.SNAPPY="SNAPPY",e.ZLIB="ZLIB"}(z||(z={})),function(e){e.V0_11="V0_11",e.V0_12="V0_12"}(F||(F={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(G||(G={})),function(e){e.GZIP="GZIP",e.SNAPPY="SNAPPY",e.UNCOMPRESSED="UNCOMPRESSED"}(K||(K={})),function(e){e.V1="V1",e.V2="V2"}(W||(W={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(V||(V={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Z||(Z={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}($||($={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Y||(Y={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(X||(X={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(J||(J={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Q||(Q={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.Url&&{Url:dt}),e.AccessKey&&{AccessKey:dt})}}(ee||(ee={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.AttributeName&&{AttributeName:dt}),e.AttributeValue&&{AttributeValue:dt})}}(te||(te={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)({},e),e.CommonAttributes&&{CommonAttributes:e.CommonAttributes.map((function(e){return te.filterSensitiveLog(e)}))})}}(ne||(ne={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(re||(re={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.EndpointConfiguration&&{EndpointConfiguration:ee.filterSensitiveLog(e.EndpointConfiguration)}),e.RequestConfiguration&&{RequestConfiguration:ne.filterSensitiveLog(e.RequestConfiguration)})}}(oe||(oe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ae||(ae={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.Username&&{Username:dt}),e.Password&&{Password:dt})}}(ue||(ue={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ce||(ce={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(fe||(fe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.RedshiftDestinationConfiguration&&{RedshiftDestinationConfiguration:ue.filterSensitiveLog(e.RedshiftDestinationConfiguration)}),e.HttpEndpointDestinationConfiguration&&{HttpEndpointDestinationConfiguration:oe.filterSensitiveLog(e.HttpEndpointDestinationConfiguration)})}}(le||(le={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(de||(de={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(pe||(pe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(he||(he={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ve||(ve={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(me||(me={})),function(e){e.CREATE_ENI_FAILED="CREATE_ENI_FAILED",e.CREATE_KMS_GRANT_FAILED="CREATE_KMS_GRANT_FAILED",e.DELETE_ENI_FAILED="DELETE_ENI_FAILED",e.DISABLED_KMS_KEY="DISABLED_KMS_KEY",e.ENI_ACCESS_DENIED="ENI_ACCESS_DENIED",e.INVALID_KMS_KEY="INVALID_KMS_KEY",e.KMS_ACCESS_DENIED="KMS_ACCESS_DENIED",e.KMS_KEY_NOT_FOUND="KMS_KEY_NOT_FOUND",e.KMS_OPT_IN_REQUIRED="KMS_OPT_IN_REQUIRED",e.RETIRE_KMS_GRANT_FAILED="RETIRE_KMS_GRANT_FAILED",e.SECURITY_GROUP_ACCESS_DENIED="SECURITY_GROUP_ACCESS_DENIED",e.SECURITY_GROUP_NOT_FOUND="SECURITY_GROUP_NOT_FOUND",e.SUBNET_ACCESS_DENIED="SUBNET_ACCESS_DENIED",e.SUBNET_NOT_FOUND="SUBNET_NOT_FOUND",e.UNKNOWN_ERROR="UNKNOWN_ERROR"}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(_e||(_e={})),function(e){e.DISABLED="DISABLED",e.DISABLING="DISABLING",e.DISABLING_FAILED="DISABLING_FAILED",e.ENABLED="ENABLED",e.ENABLING="ENABLING",e.ENABLING_FAILED="ENABLING_FAILED"}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ee||(Ee={})),function(e){e.ACTIVE="ACTIVE",e.CREATING="CREATING",e.CREATING_FAILED="CREATING_FAILED",e.DELETING="DELETING",e.DELETING_FAILED="DELETING_FAILED"}(Oe||(Oe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(xe||(xe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ae||(Ae={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)({},e),e.Url&&{Url:dt})}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.EndpointConfiguration&&{EndpointConfiguration:Ie.filterSensitiveLog(e.EndpointConfiguration)}),e.RequestConfiguration&&{RequestConfiguration:ne.filterSensitiveLog(e.RequestConfiguration)})}}(ke||(ke={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)({},e),e.Username&&{Username:dt})}}(Ce||(Ce={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(je||(je={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.RedshiftDestinationDescription&&{RedshiftDestinationDescription:Ce.filterSensitiveLog(e.RedshiftDestinationDescription)}),e.HttpEndpointDestinationDescription&&{HttpEndpointDestinationDescription:ke.filterSensitiveLog(e.HttpEndpointDestinationDescription)})}}(Le||(Le={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Re||(Re={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Me||(Me={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)({},e),e.Destinations&&{Destinations:e.Destinations.map((function(e){return Le.filterSensitiveLog(e)}))})}}(De||(De={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ne||(Ne={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)({},e),e.DeliveryStreamDescription&&{DeliveryStreamDescription:De.filterSensitiveLog(e.DeliveryStreamDescription)})}}(Ue||(Ue={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(He||(He={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(qe||(qe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Be||(Be={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ze||(ze={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Fe||(Fe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ge||(Ge={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ke||(Ke={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(We||(We={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ve||(Ve={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ze||(Ze={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}($e||($e={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Ye||(Ye={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Xe||(Xe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Je||(Je={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(Qe||(Qe={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(et||(et={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(tt||(tt={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(nt||(nt={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(rt||(rt={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ot||(ot={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(it||(it={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(at||(at={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.EndpointConfiguration&&{EndpointConfiguration:ee.filterSensitiveLog(e.EndpointConfiguration)}),e.RequestConfiguration&&{RequestConfiguration:ne.filterSensitiveLog(e.RequestConfiguration)})}}(ut||(ut={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.Username&&{Username:dt}),e.Password&&{Password:dt})}}(st||(st={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(ct||(ct={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},e),e.RedshiftDestinationUpdate&&{RedshiftDestinationUpdate:st.filterSensitiveLog(e.RedshiftDestinationUpdate)}),e.HttpEndpointDestinationUpdate&&{HttpEndpointDestinationUpdate:ut.filterSensitiveLog(e.HttpEndpointDestinationUpdate)})}}(ft||(ft={})),function(e){e.filterSensitiveLog=function(e){return(0,i.__assign)({},e)}}(lt||(lt={}));var pt=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}();var ht=function(){return ht=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ht.apply(this,arguments)};function vt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var yt=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(ht(ht({},this),{headers:ht({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return ht(ht({},e),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(vt(arguments[t]));return e}(o):o,r))}),{}))),n},e}();var gt=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,a,u,s,c,f,l,d,p;return(0,i.__generator)(this,(function(h){switch(h.label){case 0:return r=[(0,i.__assign)({},e)],p={},[4,Rt(e.body,t)];case 1:switch(n=i.__assign.apply(void 0,r.concat([(p.body=h.sent(),p)])),a="UnknownError",a=Mt(e,n.body),a){case"InvalidArgumentException":case"com.amazonaws.firehose#InvalidArgumentException":return[3,2];case"InvalidKMSResourceException":case"com.amazonaws.firehose#InvalidKMSResourceException":return[3,4];case"ResourceNotFoundException":case"com.amazonaws.firehose#ResourceNotFoundException":return[3,6];case"ServiceUnavailableException":case"com.amazonaws.firehose#ServiceUnavailableException":return[3,8]}return[3,10];case 2:return u=[{}],[4,bt(n,t)];case 3:return o=i.__assign.apply(void 0,[i.__assign.apply(void 0,u.concat([h.sent()])),{name:a,$metadata:Ct(e)}]),[3,11];case 4:return s=[{}],[4,mt(n,t)];case 5:return o=i.__assign.apply(void 0,[i.__assign.apply(void 0
1,s.concat([h.sent()])),{name:a,$metadata:Ct(e)}]),[3,11];case 6:return c=[{}],[4,wt(n,t)];case 7:return o=i.__assign.apply(void 0,[i.__assign.apply(void 0,c.concat([h.sent()])),{name:a,$metadata:Ct(e)}]),[3,11];case 8:return f=[{}],[4,_t(n,t)];case 9:return o=i.__assign.apply(void 0,[i.__assign.apply(void 0,f.concat([h.sent()])),{name:a,$metadata:Ct(e)}]),[3,11];case 10:l=n.body,a=l.code||l.Code||a,o=(0,i.__assign)((0,i.__assign)({},l),{name:""+a,message:l.message||l.Message||a,$fault:"client",$metadata:Ct(e)}),h.label=11;case 11:return d=o.message||o.Message||a,o.message=d,delete o.Message,[2,Promise.reject(Object.assign(new Error(d),o))]}}))}))},bt=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,i.__generator)(this,(function(o){return n=e.body,r=xt(n,t),[2,(0,i.__assign)({name:"InvalidArgumentException",$fault:"client",$metadata:Ct(e)},r)]}))}))},mt=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,i.__generator)(this,(function(o){return n=e.body,r=Pt(n,t),[2,(0,i.__assign)({name:"InvalidKMSResourceException",$fault:"client",$metadata:Ct(e)},r)]}))}))},wt=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,i.__generator)(this,(function(o){return n=e.body,r=It(n,t),[2,(0,i.__assign)({name:"ResourceNotFoundException",$fault:"client",$metadata:Ct(e)},r)]}))}))},_t=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,i.__generator)(this,(function(o){return n=e.body,r=kt(n,t),[2,(0,i.__assign)({name:"ServiceUnavailableException",$fault:"server",$metadata:Ct(e)},r)]}))}))},St=function(e,t){return(0,i.__assign)((0,i.__assign)({},void 0!==e.DeliveryStreamName&&null!==e.DeliveryStreamName&&{DeliveryStreamName:e.DeliveryStreamName}),void 0!==e.Records&&null!==e.Records&&{Records:Et(e.Records,t)})},Et=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:Ot(e,t)}))},Ot=function(e,t){return(0,i.__assign)({},void 0!==e.Data&&null!==e.Data&&{Data:t.base64Encoder(e.Data)})},xt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Pt=function(e,t){return{code:void 0!==e.code&&null!==e.code?e.code:void 0,message:void 0!==e.message&&null!==e.message?e.message:void 0}},At=function(e,t){return{Encrypted:void 0!==e.Encrypted&&null!==e.Encrypted?e.Encrypted:void 0,FailedPutCount:void 0!==e.FailedPutCount&&null!==e.FailedPutCount?e.FailedPutCount:void 0,RequestResponses:void 0!==e.RequestResponses&&null!==e.RequestResponses?Tt(e.RequestResponses,t):void 0}},Tt=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{ErrorCode:void 0!==e.ErrorCode&&null!==e.ErrorCode?e.ErrorCode:void 0,ErrorMessage:void 0!==e.ErrorMessage&&null!==e.ErrorMessage?e.ErrorMessage:void 0,RecordId:void 0!==e.RecordId&&null!==e.RecordId?e.RecordId:void 0}}(e)}))},It=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},kt=function(e,t){return{message:void 0!==e.message&&null!==e.message?e.message:void 0}},Ct=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"]}},jt=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},Lt=function(e,t,n,r,o){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var a,u,s,c,f,l;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,e.endpoint()];case 1:return a=i.sent(),u=a.hostname,s=a.protocol,c=void 0===s?"https":s,f=a.port,l={protocol:c,hostname:u,port:f,method:"POST",path:n,headers:t},void 0!==r&&(l.hostname=r),void 0!==o&&(l.body=o),[2,new yt(l)]}}))}))},Rt=function(e,t){return jt(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},Mt=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>
1=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""};var Dt=function(){return Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dt.apply(this,arguments)};function Nt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Ut(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ht={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},qt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Bt(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Nt(void 0,void 0,void 0,(function(){var o,i;return Ut(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),Ht),r.add(function(e,t){return function(n,r){return function(r){return Nt(void 0,void 0,void 0,(function(){var o;return Ut(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Dt(Dt({},r),{request:o}))]}}))}))}}}(e,t),qt)}}}var zt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,i.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Bt(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"FirehoseClient",commandName:"PutRecordBatchCommand",inputFilterSensitiveLog:Ye.filterSensitiveLog,outputFilterSensitiveLog:Je.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,i.__generator)(this,(function(o){return n={"content-type":"application/x-amz-json-1.1","x-amz-target":"Firehose_20150804.PutRecordBatch"},r=JSON.stringify(St(e,t)),[2,Lt(t,n,"/",void 0,r)]}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:return e.statusCode>=300?[2,gt(e,t)]:[4,Rt(e.body,t)];case 1:return n=a.sent(),r=At(n,t),o=(0,i.__assign)({$metadata:Ct(e)},r),[2,Promise.resolve(o)]}}))}))}(e,t)},t}(h),Ft=n(64298);function Gt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Kt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Wt(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 Vt(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.")}var Zt=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,$t)},$t=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Yt=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?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Vt(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=Zt(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+Zt(u[s]));else{var f=a;(u||"string"===typeof u)&&(f+="="+Zt(u)),r.push(f)}}}
1catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,f={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!==typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Wt(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new pt({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new pt({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];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}(),Xt={},Jt=new Array(64),Qt=0,en="A".charCodeAt(0),tn="Z".charCodeAt(0);Qt+en<=tn;Qt++){var nn=String.fromCharCode(Qt+en);Xt[nn]=Qt,Jt[Qt]=nn}for(Qt=0,en="a".charCodeAt(0),tn="z".charCodeAt(0);Qt+en<=tn;Qt++){nn=String.fromCharCode(Qt+en);var rn=Qt+26;Xt[nn]=rn,Jt[rn]=nn}for(Qt=0;Qt<10;Qt++){Xt[Qt.toString(10)]=Qt+52;nn=Qt.toString(10),rn=Qt+52;Xt[nn]=rn,Jt[rn]=nn}Xt["+"]=62,Jt[62]="+",Xt["/"]=63,Jt[63]="/";function on(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),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=Xt[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function an(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 o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var un=function(){return un=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},un.apply(this,arguments)};function sn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function cn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function fn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var ln=function(e){return function(t,n){return function(r){return sn(void 0,void 0,void 0,(function(){var o;return cn(this,(function(i){return(null===(o=null===e||void 0===e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(fn(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},dn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pn=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],hn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],vn=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],yn=[500,502,503,504],gn=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||hn.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},bn=n(5477),mn=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},wn=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return pn.includes(e.name)}(e)||gn(e)||function(e){var t;return vn.includes(e.name)||yn.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},_n="standard",Sn=function(){function e(e,t){var n,r,o;
1this.maxAttemptsProvider=e,this.mode=_n,this.retryDecider=null!==(n=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==n?n:wn,this.delayDecider=null!==(r=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==r?r:mn,this.retryQuota=null!==(o=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==o?o:function(e){var t=e,n=e,r=function(e){return"TimeoutError"===e.name?10:5},o=function(e){return r(e)<=n};return Object.freeze({hasRetryTokens:o,retrieveRetryTokens:function(e){if(!o(e))throw new Error("No retry token available");var t=r(e);return n-=t,t},releaseRetryTokens:function(e){n+=null!==e&&void 0!==e?e:1,n=Math.min(n,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return sn(this,void 0,void 0,(function(){var e;return cn(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 sn(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return cn(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,yt.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=(0,bn.v4)()),u=function(){var u,c,f,l,d;return cn(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,5]),yt.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=p.sent(),c=u.response,f=u.output,s.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=p.sent(),r++,s.shouldRetry(l,r,i)?(n=s.retryQuota.retrieveRetryTokens(l),d=s.delayDecider(gn(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return p.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}
1))},s=this,f.label=2;case 2:return[5,u()];case 3:return"object"===typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),En=function(e){if(void 0===e&&(e=3),"number"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function On(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function xn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Pn=n(51206),An=n.n(Pn),Tn=n(55912),In="firehose.{region}.amazonaws.com",kn=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"]),Cn=new Set(["cn-north-1","cn-northwest-1"]),jn=new Set(["us-iso-east-1"]),Ln=new Set(["us-isob-east-1"]),Rn=new Set(["us-gov-east-1","us-gov-west-1"]);function Mn(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 Dn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Nn,Un={apiVersion:"2015-08-04",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"af-south-1":n={hostname:"firehose.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":n={hostname:"firehose.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":n={hostname:"firehose.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"firehose.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"firehose.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"firehose.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"firehose.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"firehose.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"firehose.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":n={hostname:"firehose.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"firehose.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"firehose.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":n={hostname:"firehose.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"firehose.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"firehose.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"firehose.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"firehose-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"firehose-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-gov-east-1":n={hostname:"firehose-fips.us-gov-east-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-east-1"};break;case"fips-us-gov-west-1":n={hostname:"firehose-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-1":n={hostname:"firehose-fips.us-west-1.amazonaws.com",partition:"aws",signingRegion:"us-west-1"};break;case"fips-us-west-2":n={hostname:"firehose-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"me-south-1":n={hostname:"firehose.me-south-1.amazonaws.com",partition:"aws"};break;case"sa-east-1":n={hostname:"firehose.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"firehose.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"firehose.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":n={hostname:"firehose.us-gov-east-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-gov-west-1":n={hostname:"firehose.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-west-1":n={hostname:"firehose.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"firehose.us-west-2.amazonaws.com",partition:"aws"};break;default:kn.has(e)&&(n={hostname:In.replace("{region}",e),partition:"aws"}),Cn.has(e)&&(n={hostname:"firehose.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),jn.has(e)&&(n={hostname:"firehose.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Ln.has(e)&&(n={hostname:"firehose.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Rn.has(e)&&(n={hostname:"firehose.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:In.replace("{region}",e),partition:"aws"})}return Promise.resolve((0,i.__assign)({signingService:"firehose"},n))},serviceId:"Firehose",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Mn(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Dn(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;
1u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(f){t={error:f}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},Hn=(0,i.__assign)((0,i.__assign)({},Un),{runtime:"browser",base64Decoder:on,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=Jt[(r&63<<c)>>c]}t+="==".slice(0,4-u)}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:function(e){var t=e.serviceId,n=e.clientVersion;return function(){return On(void 0,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return xn(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?An().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null===e||void 0===e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null===e||void 0===e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(s=null===(u=null===e||void 0===e?void 0:e.browser)||void 0===u?void 0:u.name)&&void 0!==s?s:"unknown")+"_"+(null!==(f=null===(c=null===e||void 0===e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}}({serviceId:Un.serviceId,clientVersion:"3.6.1"}),maxAttempts:3,region:(Nn="Region is missing",function(){return Promise.reject(Nn)}),requestHandler:new Yt,sha256:Ft.Sha256,streamCollector:function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return Gt(this,void 0,void 0,(function(){var t,n;return Kt(this,(function(r){switch(r.label){case 0:return[4,an(e)];case 1:return t=r.sent(),n=on(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Gt(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return Kt(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:Tn.fromUtf8,utf8Encoder:Tn.toUtf8});var qn=function(){return qn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qn.apply(this,arguments)};function Bn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function zn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Fn=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 o=Promise.resolve(t);return function(){return o}}return t},Gn=function(e){return Bn(void 0,void 0,void 0,(function(){var t,n,r,o,i;return zn(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.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(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},Kn=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var Wn=function(){return Wn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wn.apply(this,arguments)};
1function Vn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Zn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var $n="content-length";var Yn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Xn=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Vn(t,void 0,void 0,(function(){var t,o,i,a,u;return Zn(this,(function(s){return t=r.request,yt.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf($n)&&void 0!==(a=e(o))&&(t.headers=Wn(Wn({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(Wn(Wn({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),Yn)}}};function Jn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Qn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var er={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},tr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Jn(void 0,void 0,void 0,(function(){var r,o;return Qn(this,(function(i){return yt.isInstance(n.request)?(r=n.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).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),er)}}};function nr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function rr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var or=function(){return function(e,t){return function(n){return nr(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,f,l;return rr(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.
1inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"===typeof a.info&&(c=s.output,f=c.$metadata,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(l),metadata:f})),[2,s]):[2,s]}}))}))}}},ir={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var ar=function(){return ar=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ar.apply(this,arguments)};function ur(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function sr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function cr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var fr=function(){return fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fr.apply(this,arguments)};function lr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function dr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function pr(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 hr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}for(var vr={},yr={},gr=0;gr<256;gr++){var br=gr.toString(16).toLowerCase();1===br.length&&(br="0"+br),vr[gr]=br,yr[br]=gr}function mr(e){for(var t="",n=0;n<e.byteLength;n++)t+=vr[e[n]];return t}var wr="X-Amz-Date",_r="X-Amz-Signature",Sr="X-Amz-Security-Token",Er="authorization",Or=wr.toLowerCase(),xr=[Er,Or,"date"],Pr=_r.toLowerCase(),Ar="x-amz-content-sha256",Tr=Sr.toLowerCase(),Ir={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}
1,kr=/^proxy-/,Cr=/^sec-/,jr="AWS4-HMAC-SHA256",Lr="AWS4-HMAC-SHA256-PAYLOAD",Rr="aws4_request",Mr={},Dr=[];function Nr(e,t,n){return e+"/"+t+"/"+n+"/"+Rr}function Ur(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Hr(e,t,n){var r,o,i=e.headers,a={};try{for(var u=pr(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,f=c.toLowerCase();(f in Ir||(null===t||void 0===t?void 0:t.has(f))||kr.test(f)||Cr.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}function qr(e,t){var n=e.headers,r=e.body;return lr(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return dr(this,(function(f){switch(f.label){case 0:try{for(e=pr(Object.keys(n)),o=e.next();!o.done;o=e.next())if((i=o.value).toLowerCase()===Ar)return[2,n[i]]}catch(d){s={error:d}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return void 0!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"===typeof r||ArrayBuffer.isView(r)||(l=r,"function"===typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),u=mr,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function Br(e){var t=e.headers,n=e.query,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return fr(fr({},r),{headers:fr({},t),query:n?zr(n):void 0})}function zr(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return fr(fr({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(hr(arguments[t]));return e}(o):o,r))}),{})}function Fr(e){var t,n;e="function"===typeof e.clone?e.clone():Br(e);try{for(var r=pr(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;xr.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Gr(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 Kr=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=Zr(r),this.credentialProvider=$r(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),lr(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x;return dr(this,(function(P){switch(P.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=P.sent(),null===c||void 0===c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=P.sent(),P.label=4;case 4:return d=p,h=Wr(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=Nr(y,d,null!==f&&void 0!==f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"===typeof e.clone?e.clone():Br(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=pr(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[l]=a[l],delete a[l])}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return fr(fr({},e),{headers:a,query:s})}(Fr(e),{unhoistableHeaders:u}),l.sessionToken&&(b.query[Sr]=l.sessionToken),b.query["X-Amz-Algorithm"]=jr,b.query["X-Amz-Credential"]=l.accessKeyId+"/"+g,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=i.toString(10),m=Hr(b,a,s),b.query["X-Amz-SignedHeaders"]=Vr(m),w=b.query,_=_r,S=this.getSignature,E=[v,g,this.get
1SigningKey(l,d,y,f)],O=this.createCanonicalRequest,x=[b,m],[4,qr(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,x.concat([P.sent()]))]))];case 6:return w[_]=P.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return lr(this,void 0,void 0,(function(){return dr(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,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return lr(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,p,h,v,y;return dr(this,(function(g){switch(g.label){case 0:return null===u||void 0===u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,o=Wr(i),c=o.shortDate,f=o.longDate,l=Nr(c,e,null!==s&&void 0!==s?s:this.service),[4,qr({headers:{},body:r},this.sha256)];case 4:return d=g.sent(),(p=new this.sha256).update(n),v=mr,[4,p.digest()];case 5:return h=v.apply(void 0,[g.sent()]),y=[Lr,f,l,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return lr(this,void 0,void 0,(function(){var t,n,r,u,s,c,f,l;return dr(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null===i||void 0===i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=Wr(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(f.apply(c,[void 0,d.sent()]))).update(e),l=mr,[4,s.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return lr(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,p,h,v,y;return dr(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===u||void 0===u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Fr(e),f=Wr(o),l=f.longDate,d=f.shortDate,p=Nr(d,n,null!==s&&void 0!==s?s:this.service),c.headers[Or]=l,t.sessionToken&&(c.headers[Tr]=t.sessionToken),[4,qr(c,this.sha256)];case 5:return h=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=pr(Object.keys(t)),i=o.next();!i.done;i=o.next())if(e===i.value.toLowerCase())return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(Ar,c.headers)&&this.applyChecksum&&(c.headers[Ar]=h),v=Hr(c,a,i),[4,this.getSignature(l,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=g.sent(),c.headers[Er]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Vr(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,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===Pr)return"continue";i.push(e);var t=o[e];"string"===typeof t?a[e]=Zt(e)+"="+Zt(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Zt(e)+"="+Zt(n)])}),[]).join("&"))};try{for(var s=pr(Object.keys(o).sort()),c=s.next();!c.done;c=s.next())u(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[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 lr(this,void 0,void 0,(function(){var r,o;return dr(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+mr(o)]}}))}))},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 lr(this,void 0,void 0,(function(){var o,i,a,u,s;return dr(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=mr,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return lr(void 0,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p;return dr(this,(function(h){switch(h.label){case 0:return[4,Ur(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+mr(i)+":"+t.sessionToken)in Mr)return[2,Mr[a]];for(Dr.push(a);Dr.length>50;)delete Mr[Dr.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=pr([n,r,o,Rr]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,Ur(e,u,f)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];
1case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,Mr[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Wr=function(e){var t=Gr(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Vr=function(e){return Object.keys(e).sort().join(";")},Zr=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},$r=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Yr(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Xr=function(e){return new Date(Date.now()+e)};function Jr(e){return function(t,n){return function(r){return ur(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d;return sr(this,(function(p){switch(p.label){case 0:return yt.isInstance(r.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=p.sent(),[3,3];case 2:i=e.signer,p.label=3;case 3:return o=i,u=t,s=[ar({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[ar.apply(void 0,s.concat([(d.request=p.sent(),d)]))])];case 5:return a=p.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),h=l,v=e.systemClockOffset,Math.abs(Xr(v).getTime()-h)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var h,v}))}))}}}var Qr={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var eo=function(){return eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eo.apply(this,arguments)};function to(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function no(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function ro(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function oo(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ro(arguments[t]));return e}var io="user-agent",ao=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,uo=function(e){var t=ro(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null===e||void 0===e?void 0:e.replace(ao,"_")})).join("/")},so={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},co=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return to(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,f,l;return no(this,(function(d){switch(d.label){case 0:return o=r.request,yt.isInstance(o)?(i=o.headers,a=(null===(f=null===t||void 0===t?void 0:t.userAgent)||void 0===f?void 0:f.map(uo))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=d.sent().map(uo),s=(null===(l=null===n||void 0===n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(uo))||[],i["x-amz-user-agent"]=oo(u,a,s).join(" "),c=oo(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i[io]=i[io]?i[io]+" "+c:c),[2,e(eo(eo({},r),{request:o}))]}}))}))}}),so)}}},fo=function(e){function t(t){var n,r,o=this,a=function(e){if(!e.region)throw new Error("Region is missing");return qn(qn({},e),{region:Kn(e.region)})}((0,i.__assign)((0,i.__assign)({},Hn),t)),u=function(e){var t;return qn(qn({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Fn(e):function(){return Gn(e)},isCustomEndpoint:!!e.endpoint})}(a),s=function(e){var t,n=this,r=Yr(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?Yr(e.signer):function(){return Yr(e.region)().then((function(t){return ur(n,void 0,void 0,(function(){return sr(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=cr(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new Kr({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},ar(ar({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(u),c=function(e){var t=En(e.maxAttempts);return un(un({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new Sn(t)})}(s),f=eo(eo({},n=c),{customUserAgent:"string"===typeof n.customUserAgent?[[n.customUserAgent]]:n.customUserAgent});return(o=e.call(this,f)||this).config=f,o.middlewareStack.use((r=o.config,{applyToStack:function(e){e.addRelativeTo(Jr(r),Qr)}})),o.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(ln(e),dn)}}}(o.config)),o.middlewareStack.use(Xn(o.config)),o.middlewareStack.use(tr(o.config)),o.middlewareStack.use((o.config,{applyToStack:function(e){e.add(or(),ir)}})),o.middlewareStack.use(co(o.config)),o}return(0,i.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(p),lo=n(19921),po=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])},e(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)}}
1(),ho=new r.k("AWSKineisFirehoseProvider"),vo=function(e){function t(t){return e.call(this,t)||this}return po(t,e),t.prototype.getProviderName=function(){return"AWSKinesisFirehose"},t.prototype._sendEvents=function(e){var t=this;if(0!==e.length){var n=e[0],r=n.config,o=n.credentials;if(!this._init(r,o))return!1;var i={};e.map((function(e){var t=e.event,n=t.streamName,r=t.data;void 0===i[n]&&(i[n]=[]);var o=r&&"string"!==typeof r?JSON.stringify(r):r,a={Data:(0,lo.$)(o)};i[n].push(a)})),Object.keys(i).map((function(e){ho.debug("putting records to kinesis",e,"with records",i[e]),t._kinesisFirehose.send(new zt({Records:i[e],DeliveryStreamName:e})).then((function(t){return ho.debug("Upload records to stream",e)})).catch((function(e){return ho.debug("Failed to upload records to Kinesis",e)}))}))}},t.prototype._init=function(e,t){if(ho.debug("init clients"),this._kinesisFirehose&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return ho.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var n=e.region;return this._initFirehose(n,t)},t.prototype._initFirehose=function(e,t){return ho.debug("initialize kinesis firehose with credentials",t),this._kinesisFirehose=new fo({apiVersion:"2015-08-04",region:e,credentials:t}),!0},t}(o.s)},87653:function(e,t,n){"use strict";n.d(t,{s:function(){return io}});var r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x,P,A,T,I,k,C,j,L,R,M,D,N,U,H,q,B,z,F,G,K,W,V,Z,$,Y,X,J,Q,ee,te,ne,re,oe,ie,ae,ue,se,ce,fe,le,de,pe,he,ve,ye,ge,be,me,we,_e,Se,Ee,Oe,xe,Pe,Ae,Te,Ie,ke,Ce=n(35069),je=n(92752),Le=n(71883),Re=n(70655);!function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(r||(r={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(o||(o={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(i||(i={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(a||(a={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(u||(u={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(s||(s={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(c||(c={})),function(e){e.ACTIVE="ACTIVE",e.CREATING="CREATING",e.DELETING="DELETING"}(f||(f={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(l||(l={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(d||(d={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(p||(p={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(h||(h={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(v||(v={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(y||(y={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(g||(g={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(b||(b={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(m||(m={})),function(e){e.KMS="KMS",e.NONE="NONE"}(w||(w={})),function(e){e.ALL="ALL",e.INCOMING_BYTES="IncomingBytes",e.INCOMING_RECORDS="IncomingRecords",e.ITERATOR_AGE_MILLISECONDS="IteratorAgeMilliseconds",e.OUTGOING_BYTES="OutgoingBytes",e.OUTGOING_RECORDS="OutgoingRecords",e.READ_PROVISIONED_THROUGHPUT_EXCEEDED="ReadProvisionedThroughputExceeded",e.WRITE_PROVISIONED_THROUGHPUT_EXCEEDED="WriteProvisionedThroughputExceeded"}(_||(_={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(S||(S={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(E||(E={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(O||(O={})),function(e){e.ACTIVE="ACTIVE",e.CREATING="CREATING",e.DELETING="DELETING",e.UPDATING="UPDATING"}(x||(x={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(P||(P={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(A||(A={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(T||(T={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(I||(I={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(k||(k={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(C||(C={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(j||(j={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(L||(L={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(R||(R={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(M||(M={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(D||(D={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(N||(N={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(U||(U={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(H||(H={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(q||(q={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(B||(B={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(z||(z={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(F||(F={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(G||(G={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(K||(K={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(W||(W={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(V||(V={})),function(e){e.AFTER_SEQUENCE_NUMBER="AFTER_SEQUENCE_NUMBER",e.AT_SEQUENCE_NUMBER="AT_SEQUENCE_NUMBER",e.AT_TIMESTAMP="AT_TIMESTAMP",e.LATEST="LATEST",e.TRIM_HORIZON="TRIM_HORIZON"}(Z||(Z={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}($||($={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(Y||(Y={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(X||(X={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(J||(J={})),function(e){e.AFTER_SHARD_ID="AFTER_SHARD_ID",e.AT_LATEST="AT_LATEST",e.AT_TIMESTAMP="AT_TIMESTAMP",e.AT_TRIM_HORIZON="AT_TRIM_HORIZON",e.FROM_TIMESTAMP="FROM_TIMESTAMP",e.FROM_TRIM_HORIZON="FROM_TRIM_HORIZON"}(Q||(Q={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ee||(ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(te||(te={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ne||(ne={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(re||(re={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(oe||(oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ae||(ae={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ue||(ue={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ce||(ce={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(fe||(fe={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(le||(le={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(de||(de={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(pe||(pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(he||(he={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ve||(ve={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(me||(me={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(_e||(_e={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(Ee||(Ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(Oe||(Oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(xe||(xe={})),function(e){e.visit=function(e,t){return void 0!==e.SubscribeToShardEvent?t.SubscribeToShardEvent(e.SubscribeToShardEvent):void 0!==e.ResourceNotFoundException?t.ResourceNotFoundException(e.ResourceNotFoundException):void 0!==e.ResourceInUseException?t.ResourceInUseException(e.ResourceInUseException):void 0!==e.KMSDisabledException?t.KMSDisabledException(e.KMSDisabledException):void 0!==e.KMSInvalidStateException?t.KMSInvalidStateException(e.KMSInvalidStateException):void 0!==e.KMSAccessDeniedException?t.KMSAccessDeniedException(e.KMSAccessDeniedException):void 0!==e.KMSNotFoundException?t.KMSNotFoundException(e.KMSNotFoundException):void 0!==e.KMSOptInRequired?t.KMSOptInRequired(e.KMSOptInRequired):void 0!==e.KMSThrottlingException?t.KMSThrottlingException(e.KMSThrottlingException):void 0!==e.InternalFailureException?t.InternalFailureException(e.InternalFailureException):t._(e.$unknown[0],e.$unknown[1])},e.filterSensitiveLog=function(e){var t;return void 0!==e.SubscribeToShardEvent?{SubscribeToShardEvent:xe.filterSensitiveLog(e.SubscribeToShardEvent)}:void 0!==e.ResourceNotFoundException?{ResourceNotFoundException:u.filterSensitiveLog(e.ResourceNotFoundException)}:void 0!==e.ResourceInUseException?{ResourceInUseException:a.filterSensitiveLog(e.ResourceInUseException)}:void 0!==e.KMSDisabledException?{KMSDisabledException:z.filterSensitiveLog(e.KMSDisabledException)}:void 0!==e.KMSInvalidStateException?{KMSInvalidStateException:F.filterSensitiveLog(e.KMSInvalidStateException)}:void 0!==e.KMSAccessDeniedException?{KMSAccessDeniedException:B.filterSensitiveLog(e.KMSAccessDeniedException)}:void 0!==e.KMSNotFoundException?{KMSNotFoundException:G.filterSensitiveLog(e.KMSNotFoundException)}:void 0!==e.KMSOptInRequired?{KMSOptInRequired:K.filterSensitiveLog(e.KMSOptInRequired)}:void 0!==e.KMSThrottlingException?{KMSThrottlingException:W.filterSensitiveLog(e.KMSThrottlingException)}:void 0!==e.InternalFailureException?{InternalFailureException:J.filterSensitiveLog(e.InternalFailureException)}:void 0!==e.$unknown?((t={})[e.$unknown[0]]="UNKNOWN",t):void 0}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)((0,Re.__assign)({},e),e.EventStream&&{EventStream:"STREAMING_CONTENT"})}}(Ae||(Ae={})),function(e){e.UNIFORM_SCALING="UNIFORM_SCALING"}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Re.__assign)({},e)}}(ke||(ke={}));var Me=n(25800);var De=function(){return De=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},De.apply(this,arguments)};
1function Ne(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Ue(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var He={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},qe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Be(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Ne(void 0,void 0,void 0,(function(){var o,i;return Ue(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),He),r.add(function(e,t){return function(n,r){return function(r){return Ne(void 0,void 0,void 0,(function(){var o;return Ue(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(De(De({},r),{request:o}))]}}))}))}}}(e,t),qe)}}}var ze=function(){return ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ze.apply(this,arguments)};function Fe(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 Ge(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Ke(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ge(arguments[t]));return e}var We=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,ze({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,ze({},e))})),n},o=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,Ke(o(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,Ke(o(e)))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=ze(ze({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=ze(ze({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[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 Ve[t.step]-Ve[e.step]||Ze[t.priority||"normal"]-Ze[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,Ke(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=ze({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=e.findIndex((function(e){return e.name===o})),s=e[u];if(s.step!==a.step||s.priority!==a.priority)throw new Error('"'+o+'" middleware with '+s.priority+" priority in "+s.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(u,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=ze({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=t.findIndex((function(e){return e.name===o})),s=t[u];
1if(s.toMiddleware!==a.toMiddleware||s.relation!==a.relation)throw new Error('"'+o+'" middleware '+s.relation+' "'+s.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(u,1)}n.add(o)}t.push(a)},clone:function(){return r(We())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"===typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(We());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=Fe(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},Ve={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ze={high:3,normal:2,low:1},$e=function(){function e(e){this.middlewareStack=We(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!==typeof t?t:void 0,o="function"===typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Ye=function(){this.middlewareStack=We()},Xe=function(e,t){return Xe=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])},Xe(e,t)};function Je(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Qe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Je(arguments[t]));return e}var et=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Qe([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};et.prototype=Object.create(String.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(et,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(function(e,t){function n(){this.constructor=e}Xe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(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))}}(et);var tt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,Re.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(Be(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"KinesisClient",commandName:"PutRecordsCommand",inputFilterSensitiveLog:he.filterSensitiveLog,outputFilterSensitiveLog:ye.f
1ilterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return(0,Me.L5)(e,t)},t.prototype.deserialize=function(e,t){return(0,Me.NS)(e,t)},t}(Ye),nt=n(29594),rt=n(77577);function ot(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.")}for(var it={},at={},ut=0;ut<256;ut++){var st=ut.toString(16).toLowerCase();1===st.length&&(st="0"+st),it[ut]=st,at[st]=ut}function ct(e){for(var t="",n=0;n<e.byteLength;n++)t+=it[e[n]];return t}var ft=function(){function e(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return e.fromNumber=function(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var n=new Uint8Array(8),r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&<(n),new e(n)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&<(e),parseInt(ct(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function lt(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}var dt,pt=function(){function e(e,t){this.toUtf8=e,this.fromUtf8=t}return e.prototype.format=function(e){var t,n,r,o,i=[];try{for(var a=ot(Object.keys(e)),u=a.next();!u.done;u=a.next()){var s=u.value,c=this.fromUtf8(s);i.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(e[s]))}}catch(v){t={error:v}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var f=new Uint8Array(i.reduce((function(e,t){return e+t.byteLength}),0)),l=0;try{for(var d=ot(i),p=d.next();!p.done;p=d.next()){var h=p.value;f.set(h,l),l+=h.byteLength}}catch(y){r={error:y}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return f},e.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":var o=new DataView(new ArrayBuffer(3+e.value.byteLength));o.setUint8(0,6),o.setUint16(1,e.value.byteLength,!1);var i=new Uint8Array(o.buffer);return i.set(e.value,3),i;case"string":var a=this.fromUtf8(e.value),u=new DataView(new ArrayBuffer(3+a.byteLength));u.setUint8(0,7),u.setUint16(1,a.byteLength,!1);var s=new Uint8Array(u.buffer);return s.set(a,3),s;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(ft.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Et.test(e.value))throw new Error("Invalid UUID received: "+e.value);var f=new Uint8Array(17);return f[0]=9,f.set(function(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2){var r=e.substr(n,2).toLowerCase();if(!(r in at))throw new Error("Cannot decode unrecognized sequence "+r+" as hexadecimal");t[n/2]=at[r]}return t}(e.value.replace(/\-/g,"")),1),f}},e.prototype.parse=function(e){for(var t={},n=0;n<e.byteLength;){var r=e.getUint8(n++),o=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[o]={type:ht,value:!0};break;case 1:t[o]={type:ht,value:!1};break;case 2:t[o]={type:vt,value:e.getInt8(n++)};break;case 3:t[o]={type:yt,value:e.getInt16(n,!1)},n+=2;break;case 4:t[o]={type:gt,value:e.getInt32(n,!1)},n+=4;break;case 5:t[o]={type:bt,value:new ft(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:var i=e.getUint16(n,!1);n+=2,t[o]={type:mt,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:var a=e.getUint16(n,!1);
1n+=2,t[o]={type:wt,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,a))},n+=a;break;case 8:t[o]={type:_t,value:new Date(new ft(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:var u=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[o]={type:St,value:ct(u.subarray(0,4))+"-"+ct(u.subarray(4,6))+"-"+ct(u.subarray(6,8))+"-"+ct(u.subarray(8,10))+"-"+ct(u.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},e}();!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(dt||(dt={}));var ht="boolean",vt="byte",yt="short",gt="integer",bt="long",mt="binary",wt="string",_t="timestamp",St="uuid",Et=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var Ot=function(){function e(e,t){this.headerMarshaller=new pt(e,t)}return e.prototype.marshall=function(e){var t=e.headers,n=e.body,r=this.headerMarshaller.format(t),o=r.byteLength+n.byteLength+16,i=new Uint8Array(o),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=new rt.Crc32;return a.setUint32(0,o,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,u.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),a.setUint32(o-4,u.update(i.subarray(8,o-4)).digest(),!1),i},e.prototype.unmarshall=function(e){var t=function(e){var t=e.byteLength,n=e.byteOffset,r=e.buffer;if(t<16)throw new Error("Provided message too short to accommodate event stream message overhead");var o=new DataView(r,n,t),i=o.getUint32(0,!1);if(t!==i)throw new Error("Reported message length does not match received message length");var a=o.getUint32(4,!1),u=o.getUint32(8,!1),s=o.getUint32(t-4,!1),c=(new rt.Crc32).update(new Uint8Array(r,n,8));if(u!==c.digest())throw new Error("The prelude checksum specified in the message ("+u+") does not match the calculated CRC32 checksum ("+c.digest()+")");if(c.update(new Uint8Array(r,n+8,t-12)),s!==c.digest())throw new Error("The message checksum ("+c.digest()+") did not match the expected value of "+s);return{headers:new DataView(r,n+8+4,a),body:new Uint8Array(r,n+8+4+a,i-a-16)}}(e),n=t.headers,r=t.body;return{headers:this.headerMarshaller.parse(n),body:r}},e.prototype.formatHeaders=function(e){return this.headerMarshaller.format(e)},e}();function xt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Pt(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 At(e){return this instanceof At?(this.v=e,this):new At(e)}function Tt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof At?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function It(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Pt(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}var kt=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventMarshaller=new Ot(t,n),this.utfEncoder=t}return e.prototype.deserialize=function(e,t){var n=function(e){var t,n=0,r=0,o=null,i=null,a=function(e){if("number"!==typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);n=e,r=4,o=new Uint8Array(e),new DataView(o.buffer).setUint32(0,e,!1)};return(t={})[Symbol.asyncIterator]=function(){return Tt(this,arguments,(function(){var t,u,s,c,f,l,d,p;return xt(this,(function(h){switch(h.label){case 0:t=e[Symbol.asyncIterator](),h.label=1;case 1:return[4,At(t.next())];case 2:return u=h.sent(),s=u.value,u.done?n?[3,4]:[4,At(void 0)]:[3,10];case 3:return[2,h.sent()];case 4:return n!==r?[3,7]:[4,At(o)];case 5:return[4,h.sent()];case 6:return h.sent(),[3,8];case 7:throw new Error("Truncated event message received.");case 8:return[4,At(void 0)];case 9:return[2,h.sent()];case 10:c=s.length,f=0,h.label=11;case 11:if(!(f<c))return[3,15];if(!o){if(l=c-f,i||(i=new Uint8Array(4)),d=Math.min(4-r,l),i.set(s.slice(f,f+d),r),f+=d,(r+=d)<4)return[3,15];a(new DataView(i.buffer).getUint32(0,!1)),i=null}return p=Math.min(n-r,c-f),o.set(s.slice(f,f+p),r),r+=p,f+=p,n&&n===r?[4,At(o)]:[3,14];case 12:return[4,h.sent()];case 13:h.sent(),o=null,n=0,r=0,h.label=14;case 14:return[3,11];case 15:return[3,1];case 16:return[2]}}
1))}))},t}(e),r=function(e,t){var n;return(n={})[Symbol.asyncIterator]=function(){return Tt(this,arguments,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b;return xt(this,(function(m){switch(m.label){case 0:m.trys.push([0,12,13,18]),n=It(e),m.label=1;case 1:return[4,At(n.next())];case 2:if((r=m.sent()).done)return[3,11];if(o=r.value,i=t.eventMarshaller.unmarshall(o),"error"!==(a=i.headers[":message-type"].value))return[3,3];throw(u=new Error(i.headers[":error-message"].value||"UnknownError")).name=i.headers[":error-code"].value,u;case 3:return"exception"!==a?[3,5]:(s=i.headers[":exception-type"].value,(v={})[s]=i,c=v,[4,At(t.deserializer(c))]);case 4:if((f=m.sent()).$unknown)throw(l=new Error(t.toUtf8(i.body))).name=s,l;throw f[s];case 5:return"event"!==a?[3,9]:((y={})[i.headers[":event-type"].value]=i,d=y,[4,At(t.deserializer(d))]);case 6:return(p=m.sent()).$unknown?[3,10]:[4,At(p)];case 7:return[4,m.sent()];case 8:return m.sent(),[3,10];case 9:throw Error("Unrecognizable event type: "+i.headers[":event-type"].value);case 10:return[3,1];case 11:return[3,18];case 12:return h=m.sent(),g={error:h},[3,18];case 13:return m.trys.push([13,,16,17]),r&&!r.done&&(b=n.return)?[4,At(b.call(n))]:[3,15];case 14:m.sent(),m.label=15;case 15:return[3,17];case 16:if(g)throw g.error;return[7];case 17:return[7];case 18:return[2]}}
1))}))},n}(n,{eventMarshaller:this.eventMarshaller,deserializer:t,toUtf8:this.utfEncoder});return r},e.prototype.serialize=function(e,t){var n,r=this;return(n={})[Symbol.asyncIterator]=function(){return Tt(this,arguments,(function(){var n,o,i,a,u,s;return xt(this,(function(c){switch(c.label){case 0:c.trys.push([0,7,8,13]),n=It(e),c.label=1;case 1:return[4,At(n.next())];case 2:return(o=c.sent()).done?[3,6]:(i=o.value,[4,At(r.eventMarshaller.marshall(t(i)))]);case 3:return[4,c.sent()];case 4:c.sent(),c.label=5;case 5:return[3,1];case 6:return[3,13];case 7:return a=c.sent(),u={error:a},[3,13];case 8:return c.trys.push([8,,11,12]),o&&!o.done&&(s=n.return)?[4,At(s.call(n))]:[3,10];case 9:c.sent(),c.label=10;case 10:return[3,12];case 11:if(u)throw u.error;return[7];case 12:return[7];case 13:return[4,At(new Uint8Array(0))];case 14:return[4,c.sent()];case 15:return c.sent(),[2]}}))}))},n},e}();function Ct(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function jt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Lt(e){return this instanceof Lt?(this.v=e,this):new Lt(e)}function Rt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof Lt?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}var Mt=function(){function e(e){var t=e.utf8Encoder,n=e.utf8Decoder;this.eventMarshaller=new Ot(t,n),this.universalMarshaller=new kt({utf8Decoder:n,utf8Encoder:t})}return e.prototype.deserialize=function(e,t){var n=Dt(e)?function(e){var t;return(t={})[Symbol.asyncIterator]=function(){return Rt(this,arguments,(function(){var t,n,r,o;return jt(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,Lt(t.read())];case 3:return n=i.sent(),r=n.done,o=n.value,r?[4,Lt(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,Lt(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}
1))}))},t}(e):e;return this.universalMarshaller.deserialize(n,t)},e.prototype.serialize=function(e,t){var n=this.universalMarshaller.serialize(e,t);return"function"===typeof ReadableStream?function(e){var t=e[Symbol.asyncIterator]();return new ReadableStream({pull:function(e){return Ct(this,void 0,void 0,(function(){var n,r,o;return jt(this,(function(i){switch(i.label){case 0:return[4,t.next()];case 1:return n=i.sent(),r=n.done,o=n.value,r?[2,e.close()]:(e.enqueue(o),[2])}}))}))}})}(n):n},e}(),Dt=function(e){return"function"===typeof ReadableStream&&e instanceof ReadableStream};function Nt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Ut(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Ht(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.")}var qt=n(48321);function Bt(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.")}var zt=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Ft)},Ft=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Gt=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?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Bt(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=zt(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+zt(u[s]));else{var f=a;(u||"string"===typeof u)&&(f+="="+zt(u)),r.push(f)}}}
1catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,f={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!==typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Ht(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new qt.Zn({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new qt.Zn({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];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}(),Kt={},Wt=new Array(64),Vt=0,Zt="A".charCodeAt(0),$t="Z".charCodeAt(0);Vt+Zt<=$t;Vt++){var Yt=String.fromCharCode(Vt+Zt);Kt[Yt]=Vt,Wt[Vt]=Yt}for(Vt=0,Zt="a".charCodeAt(0),$t="z".charCodeAt(0);Vt+Zt<=$t;Vt++){Yt=String.fromCharCode(Vt+Zt);var Xt=Vt+26;Kt[Yt]=Xt,Wt[Xt]=Yt}for(Vt=0;Vt<10;Vt++){Kt[Vt.toString(10)]=Vt+52;Yt=Vt.toString(10),Xt=Vt+52;Kt[Yt]=Xt,Wt[Xt]=Yt}Kt["+"]=62,Wt[62]="+",Kt["/"]=63,Wt[63]="/";function Jt(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),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=Kt[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function Qt(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 o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var en=function(){return en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},en.apply(this,arguments)};function tn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function nn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function rn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var on=function(e){return function(t,n){return function(r){return tn(void 0,void 0,void 0,(function(){var o;return nn(this,(function(i){return(null===(o=null===e||void 0===e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(rn(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},an={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},un=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],sn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],cn=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],fn=[500,502,503,504],ln=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||sn.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},dn=n(59263),pn=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},hn=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return un.includes(e.name)}(e)||ln(e)||function(e){var t;return cn.includes(e.name)||fn.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},vn="standard",yn=function(){function e(e,t){var n,r,o;
1this.maxAttemptsProvider=e,this.mode=vn,this.retryDecider=null!==(n=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==n?n:hn,this.delayDecider=null!==(r=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==r?r:pn,this.retryQuota=null!==(o=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==o?o:function(e){var t=e,n=e,r=function(e){return"TimeoutError"===e.name?10:5},o=function(e){return r(e)<=n};return Object.freeze({hasRetryTokens:o,retrieveRetryTokens:function(e){if(!o(e))throw new Error("No retry token available");var t=r(e);return n-=t,t},releaseRetryTokens:function(e){n+=null!==e&&void 0!==e?e:1,n=Math.min(n,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return tn(this,void 0,void 0,(function(){var e;return nn(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 tn(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return nn(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];
1case 1:i=f.sent(),a=t.request,qt.aW.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=(0,dn.v4)()),u=function(){var u,c,f,l,d;return nn(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,5]),qt.aW.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=p.sent(),c=u.response,f=u.output,s.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=p.sent(),r++,s.shouldRetry(l,r,i)?(n=s.retryQuota.retrieveRetryTokens(l),d=s.delayDecider(ln(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return p.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}))},s=this,f.label=2;case 2:return[5,u()];case 3:return"object"===typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),gn=function(e){if(void 0===e&&(e=3),"number"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function bn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function mn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var wn=n(51206),_n=n.n(wn),Sn=n(8230),En="kinesis.{region}.amazonaws.com",On=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"]),xn=new Set(["cn-north-1","cn-northwest-1"]),Pn=new Set(["us-iso-east-1"]),An=new Set(["us-isob-east-1"]),Tn=new Set(["us-gov-east-1","us-gov-west-1"]);function In(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 kn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Cn,jn={apiVersion:"2013-12-02",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"af-south-1":n={hostname:"kinesis.af-south-1.amazonaws.com",partition:"aws"};break;case"ap-east-1":n={hostname:"kinesis.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":n={hostname:"kinesis.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"kinesis.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"kinesis.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"kinesis.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"kinesis.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"kinesis.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"kinesis.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":n={hostname:"kinesis.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"kinesis.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"kinesis.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-south-1":n={hostname:"kinesis.eu-south-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"kinesis.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"kinesis.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"kinesis.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-east-1":n={hostname:"kinesis-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"fips-us-east-2":n={hostname:"kinesis-fips.us-east-2.amazonaws.com",partition:"aws",signingRegion:"us-east-2"};break;case"fips-us-west-1":n={hostname:"kinesis-fips.us-west-1.amazonaws.com",partition:"aws",signingRegion:"us-west-1"};break;case"fips-us-west-2":n={hostname:"kinesis-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"me-south-1":n={hostname:"kinesis.me-south-1.amazonaws.com",partition:"aws"};break;case"sa-east-1":n={hostname:"kinesis.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"kinesis.us-east-1.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"kinesis.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":n={hostname:"kinesis.us-gov-east-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-east-1"};break;case"us-gov-west-1":n={hostname:"kinesis.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"us-iso-east-1":n={hostname:"kinesis.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":n={hostname:"kinesis.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":n={hostname:"kinesis.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"kinesis.us-west-2.amazonaws.com",partition:"aws"};break;default:On.has(e)&&(n={hostname:En.replace("{region}",e),partition:"aws"}),xn.has(e)&&(n={hostname:"kinesis.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Pn.has(e)&&(n={hostname:"kinesis.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),An.has(e)&&(n={hostname:"kinesis.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Tn.has(e)&&(n={hostname:"kinesis.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:En.replace("{region}",e),partition:"aws"})}return Promise.resolve((0,Re.__assign)({signingService:"kinesis"},n))},serviceId:"Kinesis",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=In(e.split("&")),i=o.next();!i.done;i=o.next()){var a=kn(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;
1u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(f){t={error:f}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},Ln=(0,Re.__assign)((0,Re.__assign)({},jn),{runtime:"browser",base64Decoder:Jt,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=Wt[(r&63<<c)>>c]}t+="==".slice(0,4-u)}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:function(e){var t=e.serviceId,n=e.clientVersion;return function(){return bn(void 0,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return mn(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?_n().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null===e||void 0===e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null===e||void 0===e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(s=null===(u=null===e||void 0===e?void 0:e.browser)||void 0===u?void 0:u.name)&&void 0!==s?s:"unknown")+"_"+(null!==(f=null===(c=null===e||void 0===e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}}({serviceId:jn.serviceId,clientVersion:"3.6.1"}),eventStreamSerdeProvider:function(e){return new Mt(e)},maxAttempts:3,region:(Cn="Region is missing",function(){return Promise.reject(Cn)}),requestHandler:new Gt,sha256:nt.Sha256,streamCollector:function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return Nt(this,void 0,void 0,(function(){var t,n;return Ut(this,(function(r){switch(r.label){case 0:return[4,Qt(e)];case 1:return t=r.sent(),n=Jt(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Nt(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return Ut(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:Sn.fromUtf8,utf8Encoder:Sn.toUtf8});var Rn=function(){return Rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Rn.apply(this,arguments)};function Mn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Dn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var 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 o=Promise.resolve(t);return function(){return o}}return t},Un=function(e){return Mn(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Dn(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.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(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},Hn=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var qn=function(){return qn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},qn.apply(this,arguments)};var Bn=function(){return Bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Bn.apply(this,arguments)};
1function zn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Fn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Gn="content-length";var Kn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Wn=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return zn(t,void 0,void 0,(function(){var t,o,i,a,u;
1return Fn(this,(function(s){return t=r.request,qt.aW.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf(Gn)&&void 0!==(a=e(o))&&(t.headers=Bn(Bn({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(Bn(Bn({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),Kn)}}};function Vn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Zn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var $n={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Yn=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return Vn(void 0,void 0,void 0,(function(){var r,o;return Zn(this,(function(i){return qt.aW.isInstance(n.request)?(r=n.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).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),$n)}}};function Xn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Jn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Qn=function(){return function(e,t){return function(n){return Xn(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,f,l;return Jn(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"===typeof a.info&&(c=s.output,f=c.$metadata,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}
1(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(l),metadata:f})),[2,s]):[2,s]}}))}))}}},er={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var tr=function(){return tr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tr.apply(this,arguments)};function nr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function rr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function or(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var ir=function(){return ir=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ir.apply(this,arguments)};function ar(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ur(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function sr(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 cr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var fr="X-Amz-Date",lr="X-Amz-Signature",dr="X-Amz-Security-Token",pr="authorization",hr=fr.toLowerCase(),vr=[pr,hr,"date"],yr=lr.toLowerCase(),gr="x-amz-content-sha256",br=dr.toLowerCase(),mr={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},wr=/^proxy-/,_r=/^sec-/,Sr="AWS4-HMAC-SHA256",Er="AWS4-HMAC-SHA256-PAYLOAD",Or="aws4_request",xr={},Pr=[];function Ar(e,t,n){return e+"/"+t+"/"+n+"/"+Or}function Tr(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Ir(e,t,n){var r,o,i=e.headers,a={};try{for(var u=sr(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,f=c.toLowerCase();(f in mr||(null===t||void 0===t?void 0:t.has(f))||wr.test(f)||_r.test(f))&&(!n||n&&
1!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}function kr(e,t){var n=e.headers,r=e.body;return ar(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return ur(this,(function(f){switch(f.label){case 0:try{for(e=sr(Object.keys(n)),o=e.next();!o.done;o=e.next())if((i=o.value).toLowerCase()===gr)return[2,n[i]]}catch(d){s={error:d}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return void 0!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"===typeof r||ArrayBuffer.isView(r)||(l=r,"function"===typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),u=ct,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function Cr(e){var t=e.headers,n=e.query,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return ir(ir({},r),{headers:ir({},t),query:n?jr(n):void 0})}function jr(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return ir(ir({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cr(arguments[t]));return e}(o):o,r))}),{})}function Lr(e){var t,n;e="function"===typeof e.clone?e.clone():Cr(e);try{for(var r=sr(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;vr.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Rr(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 Mr=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=Ur(r),this.credentialProvider=Hr(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),ar(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x;return ur(this,(function(P){switch(P.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expiresIn,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=P.sent(),null===c||void 0===c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=P.sent(),P.label=4;case 4:return d=p,h=Dr(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=Ar(y,d,null!==f&&void 0!==f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"===typeof e.clone?e.clone():Cr(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=sr(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[l]=a[l],delete a[l])}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return ir(ir({},e),{headers:a,query:s})}(Lr(e),{unhoistableHeaders:u}),l.sessionToken&&(b.query[dr]=l.sessionToken),b.query["X-Amz-Algorithm"]=Sr,b.query["X-Amz-Credential"]=l.accessKeyId+"/"+g,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=i.toString(10),m=Ir(b,a,s),b.query["X-Amz-SignedHeaders"]=Nr(m),w=b.query,_=lr,S=this.getSignature,E=[v,g,this.getSigningKey(l,d,y,f)],O=this.createCanonicalRequest,x=[b,m],[4,kr(e,this.sha256)]);
1case 5:return[4,S.apply(this,E.concat([O.apply(this,x.concat([P.sent()]))]))];case 6:return w[_]=P.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return ar(this,void 0,void 0,(function(){return ur(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,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return ar(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,p,h,v,y;return ur(this,(function(g){switch(g.label){case 0:return null===u||void 0===u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,o=Dr(i),c=o.shortDate,f=o.longDate,l=Ar(c,e,null!==s&&void 0!==s?s:this.service),[4,kr({headers:{},body:r},this.sha256)];case 4:return d=g.sent(),(p=new this.sha256).update(n),v=ct,[4,p.digest()];case 5:return h=v.apply(void 0,[g.sent()]),y=[Er,f,l,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return ar(this,void 0,void 0,(function(){var t,n,r,u,s,c,f,l;return ur(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null===i||void 0===i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=Dr(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(f.apply(c,[void 0,d.sent()]))).update(e),l=ct,[4,s.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return ar(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,p,h,v,y;return ur(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===u||void 0===u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Lr(e),f=Dr(o),l=f.longDate,d=f.shortDate,p=Ar(d,n,null!==s&&void 0!==s?s:this.service),c.headers[hr]=l,t.sessionToken&&(c.headers[br]=t.sessionToken),[4,kr(c,this.sha256)];case 5:return h=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=sr(Object.keys(t)),i=o.next();!i.done;i=o.next())if(e===i.value.toLowerCase())return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(gr,c.headers)&&this.applyChecksum&&(c.headers[gr]=h),v=Ir(c,a,i),[4,this.getSignature(l,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=g.sent(),c.headers[pr]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Nr(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,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===yr)return"continue";i.push(e);var t=o[e];"string"===typeof t?a[e]=zt(e)+"="+zt(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([zt(e)+"="+zt(n)])}),[]).join("&"))};try{for(var s=sr(Object.keys(o).sort()),c=s.next();!c.done;c=s.next())u(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[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 ar(this,void 0,void 0,(function(){var r,o;return ur(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+ct(o)]}}))}))},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 ar(this,void 0,void 0,(function(){var o,i,a,u,s;return ur(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=ct,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return ar(void 0,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p;return ur(this,(function(h){switch(h.label){case 0:return[4,Tr(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+ct(i)+":"+t.sessionToken)in xr)return[2,xr[a]];for(Pr.push(a);Pr.length>50;)delete xr[Pr.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=sr([n,r,o,Or]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,Tr(e,u,f)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];
1case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,xr[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Dr=function(e){var t=Rr(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Nr=function(e){return Object.keys(e).sort().join(";")},Ur=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Hr=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function qr(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Br=function(e){return new Date(Date.now()+e)};function zr(e){return function(t,n){return function(r){return nr(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d;return rr(this,(function(p){switch(p.label){case 0:return qt.aW.isInstance(r.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=p.sent(),[3,3];case 2:i=e.signer,p.label=3;case 3:return o=i,u=t,s=[tr({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[tr.apply(void 0,s.concat([(d.request=p.sent(),d)]))])];case 5:return a=p.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),h=l,v=e.systemClockOffset,Math.abs(Br(v).getTime()-h)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var h,v}))}))}}}var Fr={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Gr=function(){return Gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Gr.apply(this,arguments)};function Kr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Wr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Vr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Zr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Vr(arguments[t]));return e}var $r="user-agent",Yr=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Xr=function(e){var t=Vr(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null===e||void 0===e?void 0:e.replace(Yr,"_")})).join("/")},Jr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Qr=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Kr(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,f,l;return Wr(this,(function(d){switch(d.label){case 0:return o=r.request,qt.aW.
1isInstance(o)?(i=o.headers,a=(null===(f=null===t||void 0===t?void 0:t.userAgent)||void 0===f?void 0:f.map(Xr))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=d.sent().map(Xr),s=(null===(l=null===n||void 0===n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(Xr))||[],i["x-amz-user-agent"]=Zr(u,a,s).join(" "),c=Zr(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i[$r]=i[$r]?i[$r]+" "+c:c),[2,e(Gr(Gr({},r),{request:o}))]}}))}))}}),Jr)}}},eo=function(e){function t(t){var n,r,o=this,i=function(e){if(!e.region)throw new Error("Region is missing");return Rn(Rn({},e),{region:Hn(e.region)})}((0,Re.__assign)((0,Re.__assign)({},Ln),t)),a=function(e){var t;return Rn(Rn({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Nn(e):function(){return Un(e)},isCustomEndpoint:!!e.endpoint})}(i),u=function(e){var t,n=this,r=qr(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?qr(e.signer):function(){return qr(e.region)().then((function(t){return nr(n,void 0,void 0,(function(){return rr(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=or(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new Mr({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},tr(tr({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(a),s=function(e){var t=gn(e.maxAttempts);return en(en({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new yn(t)})}(u),c=function(e){return qn(qn({},e),{eventStreamMarshaller:e.eventStreamSerdeProvider(e)})}(Gr(Gr({},n=s),{customUserAgent:"string"===typeof n.customUserAgent?[[n.customUserAgent]]:n.customUserAgent}));return(o=e.call(this,c)||this).config=c,o.middlewareStack.use((r=o.config,{applyToStack:function(e){e.addRelativeTo(zr(r),Fr)}})),o.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(on(e),an)}}}(o.config)),o.middlewareStack.use(Wn(o.config)),o.middlewareStack.use(Yn(o.config)),o.middlewareStack.use((o.config,{applyToStack:function(e){e.add(Qn(),er)}})),o.middlewareStack.use(Qr(o.config)),o}return(0,Re.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}($e),to=n(19921),no=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},ro=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},oo=new Ce.k("AWSKinesisProvider"),io=function(){function e(e){this._buffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||1e3,this._config.flushSize=this._config.flushSize||100,this._config.flushInterval=this._config.flushInterval||5e3,this._config.resendLimit=this._config.resendLimit||5,this._setupTimer()}return e.prototype._setupTimer=function(){var e=this;this._timer&&clearInterval(this._timer);var t=this._config,n=t.flushSize,r=t.flushInterval;this._timer=setInterval((function(){for(var t=e._buffer.length<n?e._buffer.length:n,r=[],o=0;o<t;o+=1){var i=e._buffer.shift();r.push(i)}e._sendFromBuffer(r)}),r)},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AWSKinesis"},e.prototype.configure=function(e){oo.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),this._setupTimer(),this._config},e.prototype.record=function(e){return no(this,void 0,void 0,(function(){var t;return ro(this,(function(n){switch(n.label){case 0:return[4,this._getCredentials()];case 1:return(t=n.sent())?(Object.assign(e,{config:this._config,credentials:t}),[2,this._putToBuffer(e)]):[2,Promise.resolve(!1)]}}))}))},e.prototype.updateEndpoint=function(){return oo.debug("updateEndpoint is not implemented in Kinesis provider"),Promise.resolve(!0)},e.prototype._putToBuffer=function(e){return this._buffer.length<1e3?(this._buffer.push(e),Promise.resolve(!0)):(oo.debug("exceed analytics events buffer size"),Promise.reject(!1))},e.prototype._sendFromBuffer=function(e){for(var t=this,n=[],r=null,o=[],i=0;i<e.length;i+=1){var a=e[i].credentials;
10===i?(o.push(e[i]),r=a):a.sessionToken===r.sessionToken&&a.identityId===r.identityId?(oo.debug("no change for cred, put event in the same group"),o.push(e[i])):(n.push(o),(o=[]).push(e[i]),r=a)}n.push(o),n.map((function(e){t._sendEvents(e)}))},e.prototype._sendEvents=function(e){var t=this;if(0!==e.length){var n=e[0],r=n.config,o=n.credentials;if(!this._init(r,o))return!1;var i={};e.map((function(e){var t=e.event,n=t.streamName;void 0===i[n]&&(i[n]=[]);var r=t.data&&"string"!==typeof t.data?JSON.stringify(t.data):t.data,a={Data:(0,to.$)(r),PartitionKey:t.partitionKey||"partition-"+o.identityId};i[n].push(a)})),Object.keys(i).map((function(e){return no(t,void 0,void 0,(function(){var t,n;return ro(this,(function(r){switch(r.label){case 0:oo.debug("putting records to kinesis with records",i[e]),r.label=1;case 1:return r.trys.push([1,3,,4]),t=new tt({Records:i[e],StreamName:e}),[4,this._kinesis.send(t)];case 2:return r.sent(),oo.debug("Upload records to stream",e),[3,4];case 3:return n=r.sent(),oo.debug("Failed to upload records to Kinesis",n),[3,4];case 4:return[2]}}
1))}))}))}},e.prototype._init=function(e,t){if(oo.debug("init clients"),this._kinesis&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return oo.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var n=e.region,r=e.endpoint;return this._initKinesis(n,r,t)},e.prototype._initKinesis=function(e,t,n){return oo.debug("initialize kinesis with credentials",n),this._kinesis=new eo({region:e,credentials:n,customUserAgent:(0,je.Zm)(),endpoint:t}),!0},e.prototype._getCredentials=function(){var e=this;return Le.cN.get().then((function(t){return t?(oo.debug("set credentials for analytics",e._config.credentials),Le.cN.shear(t)):null})).catch((function(e){return oo.debug("ensure credentials error",e),null}))},e}()},81484:function(e,t,n){"use strict";n.d(t,{Y:function(){return Do}});var r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x,P,A,T,I,k,C,j,L,R,M,D,N,U,H,q,B,z,F,G,K,W,V,Z,$,Y,X,J,Q,ee,te,ne,re,oe,ie,ae,ue,se,ce,fe,le,de,pe,he,ve,ye,ge,be,me,we,_e,Se,Ee,Oe,xe,Pe,Ae,Te,Ie,ke,Ce,je,Le,Re,Me,De,Ne,Ue,He,qe,Be,ze,Fe,Ge,Ke,We,Ve,Ze,$e,Ye,Xe,Je,Qe,et,tt,nt,rt,ot,it,at,ut,st,ct,ft,lt,dt,pt,ht,vt,yt,gt,bt,mt,wt,_t,St,Et,Ot,xt,Pt=n(20490),At=n(35069),Tt=n(52633),It=n(885),kt=n(59222),Ct=n(92752),jt=n(71883),Lt=n(70655);!function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(r||(r={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(o||(o={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(i||(i={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(a||(a={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(u||(u={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(s||(s={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(c||(c={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(f||(f={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(l||(l={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(d||(d={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(p||(p={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(h||(h={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(v||(v={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(y||(y={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(g||(g={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(b||(b={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(m||(m={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(w||(w={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(_||(_={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(S||(S={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(E||(E={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(O||(O={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(x||(x={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(P||(P={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(A||(A={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(T||(T={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(I||(I={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(k||(k={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(C||(C={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(j||(j={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(L||(L={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(R||(R={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(M||(M={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(D||(D={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(N||(N={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(U||(U={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(H||(H={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(q||(q={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(B||(B={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(z||(z={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(F||(F={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(G||(G={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(K||(K={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(W||(W={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(V||(V={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Z||(Z={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}($||($={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Y||(Y={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(X||(X={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(J||(J={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Q||(Q={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ee||(ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(te||(te={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ne||(ne={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(re||(re={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(oe||(oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ie||(ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ae||(ae={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ue||(ue={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(se||(se={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ce||(ce={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(fe||(fe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(le||(le={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(de||(de={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(pe||(pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(he||(he={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ve||(ve={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ye||(ye={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ge||(ge={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(be||(be={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(me||(me={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(we||(we={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(_e||(_e={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Se||(Se={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ee||(Ee={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Oe||(Oe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(xe||(xe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Pe||(Pe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ae||(Ae={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Te||(Te={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ie||(Ie={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ke||(ke={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ce||(Ce={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(je||(je={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Le||(Le={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Re||(Re={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Me||(Me={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(De||(De={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ne||(Ne={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ue||(Ue={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(He||(He={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(qe||(qe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Be||(Be={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ze||(ze={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Fe||(Fe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ge||(Ge={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ke||(Ke={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(We||(We={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ve||(Ve={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ze||(Ze={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}($e||($e={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ye||(Ye={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Xe||(Xe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Je||(Je={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Qe||(Qe={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(et||(et={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(tt||(tt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(nt||(nt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(rt||(rt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ot||(ot={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(it||(it={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(at||(at={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ut||(ut={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(st||(st={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ct||(ct={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ft||(ft={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(lt||(lt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(dt||(dt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(pt||(pt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(ht||(ht={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(vt||(vt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(yt||(yt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(gt||(gt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(bt||(bt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(mt||(mt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(wt||(wt={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(_t||(_t={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(St||(St={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Et||(Et={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(Ot||(Ot={})),function(e){e.filterSensitiveLog=function(e){return(0,Lt.__assign)({},e)}}(xt||(xt={}));var Rt=n(19279);var Mt=function(){return Mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Mt.apply(this,arguments)};
1function Dt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Nt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ut={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ht={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function qt(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return Dt(void 0,void 0,void 0,(function(){var o,i;return Nt(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),Ut),r.add(function(e,t){return function(n,r){return function(r){return Dt(void 0,void 0,void 0,(function(){var o;return Nt(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(Mt(Mt({},r),{request:o}))]}}))}))}}}(e,t),Ht)}}}var Bt=n(76330),zt=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,Lt.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qt(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"PinpointClient",commandName:"PutEventsCommand",inputFilterSensitiveLog:pe.filterSensitiveLog,outputFilterSensitiveLog:he.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return(0,Rt.u7H)(e,t)},t.prototype.deserialize=function(e,t){return(0,Rt.zZu)(e,t)},t}(Bt.mY),Ft=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,Lt.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(qt(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"PinpointClient",commandName:"UpdateEndpointCommand",inputFilterSensitiveLog:Ye.filterSensitiveLog,outputFilterSensitiveLog:Xe.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return(0,Rt.Oje)(e,t)},t.prototype.deserialize=function(e,t){return(0,Rt.XyP)(e,t)},t}(Bt.mY),Gt=n(94391);function Kt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Wt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Vt(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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.")}var Zt=n(43813);function $t(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.")}var Yt=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,Xt)},Xt=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var Jt=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?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=$t(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=Yt(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+Yt(u[s]));else{var f=a;(u||"string"===typeof u)&&(f+="="+Yt(u)),r.push(f)}}}
1catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,f={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!==typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=Vt(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new Zt.Zn({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new Zt.Zn({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];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}(),Qt={},en=new Array(64),tn=0,nn="A".charCodeAt(0),rn="Z".charCodeAt(0);tn+nn<=rn;tn++){var on=String.fromCharCode(tn+nn);Qt[on]=tn,en[tn]=on}for(tn=0,nn="a".charCodeAt(0),rn="z".charCodeAt(0);tn+nn<=rn;tn++){on=String.fromCharCode(tn+nn);var an=tn+26;Qt[on]=an,en[an]=on}for(tn=0;tn<10;tn++){Qt[tn.toString(10)]=tn+52;on=tn.toString(10),an=tn+52;Qt[on]=an,en[an]=on}Qt["+"]=62,en[62]="+",Qt["/"]=63,en[63]="/";function un(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),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=Qt[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function sn(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 o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var cn=function(){return cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cn.apply(this,arguments)};function fn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ln(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function dn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var pn=function(e){return function(t,n){return function(r){return fn(void 0,void 0,void 0,(function(){var o;return ln(this,(function(i){return(null===(o=null===e||void 0===e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(dn(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},hn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},vn=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],yn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],gn=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],bn=[500,502,503,504],mn=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||yn.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},wn=n(49755),_n=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},Sn=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return vn.includes(e.name)}(e)||mn(e)||function(e){var t;return gn.includes(e.name)||bn.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},En="standard",On=function(){function e(e,t){var n,r,o;
1this.maxAttemptsProvider=e,this.mode=En,this.retryDecider=null!==(n=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==n?n:Sn,this.delayDecider=null!==(r=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==r?r:_n,this.retryQuota=null!==(o=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==o?o:function(e){var t=e,n=e,r=function(e){return"TimeoutError"===e.name?10:5},o=function(e){return r(e)<=n};return Object.freeze({hasRetryTokens:o,retrieveRetryTokens:function(e){if(!o(e))throw new Error("No retry token available");var t=r(e);return n-=t,t},releaseRetryTokens:function(e){n+=null!==e&&void 0!==e?e:1,n=Math.min(n,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return fn(this,void 0,void 0,(function(){var e;return ln(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 fn(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return ln(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,Zt.aW.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=(0,wn.v4)()),u=function(){var u,c,f,l,d;return ln(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,5]),Zt.aW.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=p.sent(),c=u.response,f=u.output,s.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=p.sent(),r++,s.shouldRetry(l,r,i)?(n=s.retryQuota.retrieveRetryTokens(l),d=s.delayDecider(mn(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return p.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}
1))},s=this,f.label=2;case 2:return[5,u()];case 3:return"object"===typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),xn=function(e){if(void 0===e&&(e=3),"number"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Pn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function An(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Tn=n(51206),In=n.n(Tn),kn=n(36811),Cn="pinpoint.{region}.amazonaws.com",jn=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"]),Ln=new Set(["cn-north-1","cn-northwest-1"]),Rn=new Set(["us-iso-east-1"]),Mn=new Set(["us-isob-east-1"]),Dn=new Set(["us-gov-east-1","us-gov-west-1"]);function Nn(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 Un(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Hn,qn={apiVersion:"2016-12-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"pinpoint.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-northeast-2":n={hostname:"pinpoint.ap-northeast-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-south-1":n={hostname:"pinpoint.ap-south-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-southeast-1":n={hostname:"pinpoint.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ap-southeast-2":n={hostname:"pinpoint.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"ca-central-1":n={hostname:"pinpoint.ca-central-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-central-1":n={hostname:"pinpoint.eu-central-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-west-1":n={hostname:"pinpoint.eu-west-1.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"eu-west-2":n={hostname:"pinpoint.eu-west-2.amazonaws.com",partition:"aws",signingService:"mobiletargeting"};break;case"fips-us-east-1":n={hostname:"pinpoint-fips.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;
1case"fips-us-gov-west-1":n={hostname:"pinpoint-fips.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"fips-us-west-2":n={hostname:"pinpoint-fips.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;case"us-east-1":n={hostname:"pinpoint.us-east-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"us-gov-west-1":n={hostname:"pinpoint.us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"us-west-2":n={hostname:"pinpoint.us-west-2.amazonaws.com",partition:"aws",signingRegion:"us-west-2"};break;default:jn.has(e)&&(n={hostname:Cn.replace("{region}",e),partition:"aws",signingService:"mobiletargeting"}),Ln.has(e)&&(n={hostname:"pinpoint.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Rn.has(e)&&(n={hostname:"pinpoint.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Mn.has(e)&&(n={hostname:"pinpoint.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),Dn.has(e)&&(n={hostname:"pinpoint.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov",signingService:"mobiletargeting"}),void 0===n&&(n={hostname:Cn.replace("{region}",e),partition:"aws",signingService:"mobiletargeting"})}return Promise.resolve((0,Lt.__assign)({signingService:"mobiletargeting"},n))},serviceId:"Pinpoint",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=Nn(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Un(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;
1u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(f){t={error:f}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},Bn=(0,Lt.__assign)((0,Lt.__assign)({},qn),{runtime:"browser",base64Decoder:un,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=en[(r&63<<c)>>c]}t+="==".slice(0,4-u)}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:function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Pn(void 0,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return An(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?In().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null===e||void 0===e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null===e||void 0===e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(s=null===(u=null===e||void 0===e?void 0:e.browser)||void 0===u?void 0:u.name)&&void 0!==s?s:"unknown")+"_"+(null!==(f=null===(c=null===e||void 0===e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}}({serviceId:qn.serviceId,clientVersion:"3.6.1"}),maxAttempts:3,region:(Hn="Region is missing",function(){return Promise.reject(Hn)}),requestHandler:new Jt,sha256:Gt.Sha256,streamCollector:function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return Kt(this,void 0,void 0,(function(){var t,n;return Wt(this,(function(r){switch(r.label){case 0:return[4,sn(e)];case 1:return t=r.sent(),n=un(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Kt(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return Wt(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:kn.fromUtf8,utf8Encoder:kn.toUtf8});var zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zn.apply(this,arguments)};function Fn(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Gn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Kn=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 o=Promise.resolve(t);return function(){return o}}return t},Wn=function(e){return Fn(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Gn(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.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(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},Vn=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var Zn=function(){return Zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Zn.apply(this,arguments)};
1function $n(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Yn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Xn="content-length";var Jn={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Qn=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return $n(t,void 0,void 0,(function(){var t,o,i,a,u;return Yn(this,(function(s){return t=r.request,Zt.aW.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf(Xn)&&void 0!==(a=e(o))&&(t.headers=Zn(Zn({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(Zn(Zn({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),Jn)}}};function er(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function tr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var nr={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},rr=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return er(void 0,void 0,void 0,(function(){var r,o;return tr(this,(function(i){return Zt.aW.isInstance(n.request)?(r=n.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).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),nr)}}};function or(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ir(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var ar=function(){return function(e,t){return function(n){return or(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,f,l;return ir(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.
1inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"===typeof a.info&&(c=s.output,f=c.$metadata,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(l),metadata:f})),[2,s]):[2,s]}}))}))}}},ur={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var sr=function(){return sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},sr.apply(this,arguments)};function cr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function fr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function lr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var dr=function(){return dr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dr.apply(this,arguments)};function pr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function hr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function vr(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 yr(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}for(var gr={},br={},mr=0;mr<256;mr++){var wr=mr.toString(16).toLowerCase();1===wr.length&&(wr="0"+wr),gr[mr]=wr,br[wr]=mr}function _r(e){for(var t="",n=0;n<e.byteLength;n++)t+=gr[e[n]];return t}var Sr="X-Amz-Date",Er="X-Amz-Signature",Or="X-Amz-Security-Token",xr="authorization",Pr=Sr.toLowerCase(),Ar=[xr,Pr,"date"],Tr=Er.toLowerCase(),Ir="x-amz-content-sha256",kr=Or.toLowerCase(),Cr={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},jr=/^proxy-/,Lr=/^sec-/,Rr="AWS4-HMAC-SHA256",Mr="AWS4-HMAC-SHA256-PAYLOAD",Dr="aws4_request",Nr={},Ur=[];function Hr(e,t,n){return e+"/"+t+"/"+n+"/"+Dr}function qr(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Br(e,t,n){var r,o,i=e.headers,a={};try{for(var u=vr(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,f=c.toLowerCase();(f in Cr||(null===t||void 0===t?void 0:t.has(f))||jr.test(f)||Lr.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}function zr(e,t){var n=e.headers,r=e.body;return pr(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return hr(this,(function(f){switch(f.label){case 0:try{for(e=vr(Object.keys(n)),o=e.next();!o.done;o=e.next())if((i=o.value).toLowerCase()===Ir)return[2,n[i]]}catch(d){s={error:d}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return void 0!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"===typeof r||ArrayBuffer.isView(r)||(l=r,"function"===typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),u=_r,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function Fr(e){var t=e.headers,n=e.query,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return dr(dr({},r),{headers:dr({},t),query:n?Gr(n):void 0})}function Gr(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return dr(dr({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(yr(arguments[t]));return e}(o):o,r))}),{})}function Kr(e){var t,n;e="function"===typeof e.clone?e.clone():Fr(e);try{for(var r=vr(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;Ar.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function Wr(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 Vr=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=Yr(r),this.credentialProvider=Xr(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),pr(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x;return hr(this,(function(P){switch(P.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expires
1In,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=P.sent(),null===c||void 0===c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=P.sent(),P.label=4;case 4:return d=p,h=Zr(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=Hr(y,d,null!==f&&void 0!==f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"===typeof e.clone?e.clone():Fr(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=vr(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[l]=a[l],delete a[l])}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return dr(dr({},e),{headers:a,query:s})}(Kr(e),{unhoistableHeaders:u}),l.sessionToken&&(b.query[Or]=l.sessionToken),b.query["X-Amz-Algorithm"]=Rr,b.query["X-Amz-Credential"]=l.accessKeyId+"/"+g,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=i.toString(10),m=Br(b,a,s),b.query["X-Amz-SignedHeaders"]=$r(m),w=b.query,_=Er,S=this.getSignature,E=[v,g,this.getSigningKey(l,d,y,f)],O=this.createCanonicalRequest,x=[b,m],[4,zr(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,x.concat([P.sent()]))]))];case 6:return w[_]=P.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return pr(this,void 0,void 0,(function(){return hr(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,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return pr(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,p,h,v,y;return hr(this,(function(g){switch(g.label){case 0:return null===u||void 0===u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,o=Zr(i),c=o.shortDate,f=o.longDate,l=Hr(c,e,null!==s&&void 0!==s?s:this.service),[4,zr({headers:{},body:r},this.sha256)];case 4:return d=g.sent(),(p=new this.sha256).update(n),v=_r,[4,p.digest()];case 5:return h=v.apply(void 0,[g.sent()]),y=[Mr,f,l,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return pr(this,void 0,void 0,(function(){var t,n,r,u,s,c,f,l;return hr(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null===i||void 0===i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=Zr(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(f.apply(c,[void 0,d.sent()]))).update(e),l=_r,[4,s.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return pr(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,p,h,v,y;return hr(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===u||void 0===u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Kr(e),f=Zr(o),l=f.longDate,d=f.shortDate,p=Hr(d,n,null!==s&&void 0!==s?s:this.service),c.headers[Pr]=l,t.sessionToken&&(c.headers[kr]=t.sessionToken),[4,zr(c,this.sha256)];case 5:return h=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=vr(Object.keys(t)),i=o.next();!i.done;i=o.next())if(e===i.value.toLowerCase())return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(Ir,c.headers)&&this.applyChecksum&&(c.headers[Ir]=h),v=Br(c,a,i),[4,this.get
1Signature(l,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=g.sent(),c.headers[xr]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+$r(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,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===Tr)return"continue";i.push(e);var t=o[e];"string"===typeof t?a[e]=Yt(e)+"="+Yt(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([Yt(e)+"="+Yt(n)])}),[]).join("&"))};try{for(var s=vr(Object.keys(o).sort()),c=s.next();!c.done;c=s.next())u(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[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 pr(this,void 0,void 0,(function(){var r,o;return hr(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+_r(o)]}}))}))},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 pr(this,void 0,void 0,(function(){var o,i,a,u,s;return hr(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=_r,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return pr(void 0,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p;return hr(this,(function(h){switch(h.label){case 0:return[4,qr(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+_r(i)+":"+t.sessionToken)in Nr)return[2,Nr[a]];for(Ur.push(a);Ur.length>50;)delete Nr[Ur.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=vr([n,r,o,Dr]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,qr(e,u,f)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,Nr[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Zr=function(e){var t=Wr(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},$r=function(e){return Object.keys(e).sort().join(";")},Yr=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},Xr=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Jr(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var Qr=function(e){return new Date(Date.now()+e)};function eo(e){return function(t,n){return function(r){return cr(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d;return fr(this,(function(p){switch(p.label){case 0:return Zt.aW.isInstance(r.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=p.sent(),[3,3];case 2:i=e.signer,p.label=3;case 3:return o=i,u=t,s=[sr({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[sr.apply(void 0,s.concat([(d.request=p.sent(),d)]))])];case 5:return a=p.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),h=l,v=e.systemClockOffset,Math.abs(Qr(v).getTime()-h)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var h,v}))}))}}}var to={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var no=function(){return no=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},no.apply(this,arguments)};
1function ro(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function oo(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function io(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function ao(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(io(arguments[t]));return e}var uo="user-agent",so=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,co=function(e){var t=io(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null===e||void 0===e?void 0:e.replace(so,"_")})).join("/")},fo={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},lo=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return ro(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,f,l;return oo(this,(function(d){switch(d.label){case 0:return o=r.request,Zt.aW.isInstance(o)?(i=o.headers,a=(null===(f=null===t||void 0===t?void 0:t.userAgent)||void 0===f?void 0:f.map(co))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=d.sent().map(co),s=(null===(l=null===n||void 0===n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(co))||[],i["x-amz-user-agent"]=ao(u,a,s).join(" "),c=ao(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i[uo]=i[uo]?i[uo]+" "+c:c),[2,e(no(no({},r),{request:o}))]}}))}))}}),fo)}}},po=function(e){function t(t){var n,r,o=this,i=function(e){if(!e.region)throw new Error("Region is missing");return zn(zn({},e),{region:Vn(e.region)})}((0,Lt.__assign)((0,Lt.__assign)({},Bn),t)),a=function(e){var t;return zn(zn({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Kn(e):function(){return Wn(e)},isCustomEndpoint:!!e.endpoint})}(i),u=function(e){var t,n=this,r=Jr(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?Jr(e.signer):function(){return Jr(e.region)().then((function(t){return cr(n,void 0,void 0,(function(){return fr(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=lr(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new Vr({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},sr(sr({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(a),s=function(e){var t=xn(e.maxAttempts);return cn(cn({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new On(t)})}(u),c=no(no({},n=s),{customUserAgent:"string"===typeof n.customUserAgent?[[n.customUserAgent]]:n.customUserAgent});return(o=e.call(this,c)||this).config=c,o.middlewareStack.use((r=o.config,{applyToStack:function(e){e.addRelativeTo(eo(r),to)}})),o.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(pn(e),hn)}}}(o.config)),o.middlewareStack.use(Qn(o.config)),o.middlewareStack.use(rr(o.config)),o.middlewareStack.use((o.config,{applyToStack:function(e){e.add(ar(),ur)}})),o.middlewareStack.use(lo(o.config)),o}return(0,Lt.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(Bt.KU),ho=n(7895),vo=n(15885),yo=function(e,t,n,r){return new(n||(n=Prom
1ise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},go=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},bo=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},mo=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(bo(arguments[t]));return e},wo=new At.k("EventsBuffer"),_o=[429,500],So=[202],Eo=function(){function e(e,t){this._pause=!1,this._flush=!1,wo.debug("Instantiating buffer with config:",t),this._buffer=[],this._client=e,this._config=t,this._sendBatch=this._sendBatch.bind(this),this._startLoop()}return e.prototype.push=function(e){var t;if(this._buffer>this._config.bufferSize)return wo.debug("Exceeded analytics events buffer size"),e.handlers.reject(new Error("Exceeded the size of analytics events buffer"));var n=((t={})[e.params.event.eventId]=e,t);this._buffer.push(n)},e.prototype.pause=function(){this._pause=!0},e.prototype.resume=function(){this._pause=!1},e.prototype.updateClient=function(e){this._client=e},e.prototype.flush=function(){this._flush=!0},e.prototype._startLoop=function(){this._interval&&clearInterval(this._interval);var e=this._config.flushInterval;this._interval=setInterval(this._sendBatch,e)},e.prototype._sendBatch=function(){var e=this._buffer.length;if(this._flush&&!e&&clearInterval(this._interval),!this._pause&&e){var t=this._config.flushSize,n=Math.min(t,e),r=this._buffer.splice(0,n);this._putEvents(r)}},e.prototype._putEvents=function(e){return yo(this,void 0,void 0,(function(){var t,n,r,o,i;return go(this,(function(a){switch(a.label){case 0:t=this._bufferToMap(e),n=this._generateBatchEventParams(t),a.label=1;case 1:return a.trys.push([1,3,,4]),r=new zt(n),[4,this._client.send(r)];case 2:return o=a.sent(),this._processPutEventsSuccessResponse(o,t),[3,4];case 3:return i=a.sent(),[2,this._handlePutEventsFailure(i,t)];case 4:return[2]}}
1))}))},e.prototype._generateBatchEventParams=function(e){var t={ApplicationId:"",EventsRequest:{BatchItem:{}}};return Object.values(e).forEach((function(e){var n=e.params,r=n.event,o=n.timestamp,i=n.config,a=r.name,u=r.attributes,s=r.metrics,c=r.eventId,f=r.session,l=i.appId,d=i.endpointId,p=t.EventsRequest.BatchItem;t.ApplicationId=t.ApplicationId||l,p[d]||(p[d]={Endpoint:{},Events:{}}),p[d].Events[c]={EventType:a,Timestamp:new Date(o).toISOString(),Attributes:u,Metrics:s,Session:f}})),t},e.prototype._handlePutEventsFailure=function(e,t){wo.debug("_putEvents Failed: ",e);var n=e.$metadata&&e.$metadata.httpStatusCode;if(_o.includes(n)){var r=Object.values(t);this._retry(r)}else;},e.prototype._processPutEventsSuccessResponse=function(e,t){var n=e.EventsResponse.Results,r=[];Object.entries(n).forEach((function(e){var n=bo(e,2),o=n[0],i=n[1].EventsItemResponse;Object.entries(i).forEach((function(e){var n,i,a=bo(e,2),u=a[0],s=a[1],c=s.StatusCode,f=s.Message,l=t[u],d={EventsResponse:{Results:(n={},n[o]={EventsItemResponse:(i={},i[u]={StatusCode:c,Message:f},i)},n)}};if(So.includes(c))l.handlers.resolve(d);else{if(!_o.includes(c)){var p=l.params.event.name;return wo.error("event "+u+" : "+p+" failed with error: "+f),l.handlers.reject(d)}r.push(l)}}))})),r.length&&this._retry(r)},e.prototype._retry=function(e){var t,n=[];e.forEach((function(e){var t,r=e.params,o=r.event,i=o.eventId,a=o.name;if(r.resendLimit-- >0)return wo.debug("resending event "+i+" : "+a+" with "+r.resendLimit+" retry attempts remaining"),void n.push((t={},t[i]=e,t));wo.debug("no retry attempts remaining for event "+i+" : "+a)})),(t=this._buffer).unshift.apply(t,mo(n))},e.prototype._bufferToMap=function(e){return e.reduce((function(e,t){var n=bo(Object.entries(t),1),r=bo(n[0],2),o=r[0],i=r[1];return e[o]=i,e}),{})},e}(),Oo=function(){return Oo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Oo.apply(this,arguments)},xo=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Po=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ao=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},To="undefined"!==typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Io=function(e,t){Pt.Xb.dispatch("analytics",{event:e,data:t},"Analytics",To)},ko=new At.k("AWSPinpointProvider"),Co=[429,500],jo=[202],Lo="_update_endpoint",Ro="_session.stop",Mo="undefined"!==typeof navigator&&navigator&&"function"===typeof navigator.sendBeacon,Do=function(){function e(e){this._endpointGenerating=!0,this._endpointUpdateInProgress=!1,this._buffer=null,this._endpointBuffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||1e3,this._config.flushSize=this._config.flushSize||100,this._config.flushInterval=this._config.flushInterval||5e3,this._config.resendLimit=this._config.resendLimit||5,this._clientInfo=Tt._.clientInfo()}return e.prototype.getCategory=function(){return e.category},e.prototype.getProviderName=function(){return e.providerName},e.prototype.configure=function(e){var t=this;ko.debug("configure Analytics",e);var n=e||{};if(this._config=Object.assign({},this._config,n),this._endpointGenerating=!!e.autoSessionRecord,this._config.appId&&!this._config.disabled)if(this._config.endpointId)Io("pinpointProvider_configured",null);else{var r=this.getProviderName()+"_"+this._config.appId;this._getEndpointId(r).then((function(e){ko.debug("setting endpoint id from the cache",e),t._config.endpointId=e,Io("pinpointProvider_configured",null)})).catch((function(e){ko.debug("Failed to generate endpointId",e)}))}else this._flushBuffer();return this._config},e.prototype.record=function(e,t){return xo(this,void 0,void 0,(function(){var n,r;return Po(this,(function(o){switch(o.label){case 0:return ko.debug("_public re
1cord",e),[4,this._getCredentials()];case 1:return(n=o.sent())&&this._config.appId&&this._config.region?(this._initClients(n),r=(new Date).getTime(),this._generateSession(e),e.event.eventId=(0,vo.v1)(),Object.assign(e,{timestamp:r,config:this._config}),e.event.immediate?[2,this._send(e,t)]:(this._putToBuffer(e,t),[2])):(ko.debug("cannot send events without credentials, applicationId or region"),[2,t.reject(new Error("No credentials, applicationId or region"))])}}))}))},e.prototype._sendEndpointUpdate=function(e){return xo(this,void 0,void 0,(function(){var t;return Po(this,(function(n){switch(n.label){case 0:return this._endpointUpdateInProgress?(this._endpointBuffer.push(e),[2]):(this._endpointUpdateInProgress=!0,[4,this._updateEndpoint(e)]);case 1:return n.sent(),t=this._endpointBuffer.shift(),this._endpointUpdateInProgress=!1,t&&this._sendEndpointUpdate(t),[2]}}))}))},e.prototype._putToBuffer=function(e,t){e.event.name!==Lo?this._buffer&&this._buffer.push({params:e,handlers:t}):this._sendEndpointUpdate({params:e,handlers:t})},e.prototype._generateSession=function(e){this._sessionId=this._sessionId||(0,vo.v1)();var t=e.event;switch(t.name){case"_session.start":this._sessionStartTimestamp=(new Date).getTime(),this._sessionId=(0,vo.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()};break;case Ro:var n=(new Date).getTime();this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||(0,vo.v1)(),t.session={Id:this._sessionId,Duration:n-this._sessionStartTimestamp,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString(),StopTimestamp:new Date(n).toISOString()},this._sessionId=void 0,this._sessionStartTimestamp=void 0;break;default:this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||(0,vo.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()}}},e.prototype._send=function(e,t){return xo(this,void 0,void 0,(function(){return Po(this,(function(n){switch(e.event.name){case Lo:return[2,this._updateEndpoint({params:e,handlers:t})];case Ro:return[2,this._pinpointSendStopSession(e,t)];default:return[2,this._pinpointPutEvents(e,t)]}return[2]}))}))},e.prototype._generateBatchItemContext=function(e){var t,n=e.event,r=e.timestamp,o=e.config,i=n.name,a=n.attributes,u=n.metrics,s=n.eventId,c=n.session,f=o.appId,l=o.endpointId,d={ApplicationId:f,EventsRequest:{BatchItem:{}}},p={Endpoint:{}};return p.Events=((t={})[s]={EventType:i,Timestamp:new Date(r).toISOString(),Attributes:a,Metrics:u,Session:c},t),d.EventsRequest.BatchItem[l]=p,d},e.prototype._pinpointPutEvents=function(e,t){return xo(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d;return Po(this,(function(p){switch(p.label){case 0:n=e.event.eventId,r=e.config.endpointId,o=this._generateBatchItemContext(e),i=new zt(o),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this.pinpointClient.send(i)];case 2:return a=p.sent(),u=r,s=n,c=a.EventsResponse.Results[u].EventsItemResponse[s],f=c.StatusCode,l=c.Message,jo.includes(f)?(ko.debug("record event success. ",a),[2,t.resolve(a)]):Co.includes(f)?(this._retry(e,t),[3,4]):(ko.error("Event "+n+" is not accepted, the error is "+l),[2,t.reject(a)]);case 3:return d=p.sent(),this._eventError(d),[2,t.reject(d)];case 4:return[2]}}
1))}))},e.prototype._pinpointSendStopSession=function(e,t){if(Mo){var n=this._generateBatchItemContext(e),r=this._config.region,o=n.ApplicationId,i=n.EventsRequest,a={secret_key:this._config.credentials.secretAccessKey,access_key:this._config.credentials.accessKeyId,session_token:this._config.credentials.sessionToken},u="https://pinpoint."+r+".amazonaws.com/v1/apps/"+o+"/events/legacy",s=JSON.stringify(i),c={url:u,body:s,method:"POST"},f={region:r,service:"mobiletargeting"},l=It.E.signUrl(c,a,f,null);return navigator.sendBeacon(l,s)?t.resolve("sendBeacon success"):t.reject("sendBeacon failure")}this._pinpointPutEvents(e,t)},e.prototype._retry=function(e,t){var n=e.config.resendLimit;e.resendLimit="number"===typeof e.resendLimit?e.resendLimit:n,e.resendLimit-- >0?(ko.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._pinpointPutEvents(e,t)):ko.debug("retry times used up for event "+e.eventName)},e.prototype._updateEndpoint=function(e){return xo(this,void 0,void 0,(function(){var t,n,r,o,i,a,u,s,c,f,l,d;return Po(this,(function(p){switch(p.label){case 0:t=e.params,n=e.handlers,r=t.config,o=t.event,i=r.appId,a=r.endpointId,u=this._endpointRequest(r,kt.JS.transferKeyToLowerCase(o,[],["attributes","userAttributes","Attributes","UserAttributes"])),s={ApplicationId:i,EndpointId:a,EndpointRequest:u},p.label=1;case 1:return p.trys.push([1,3,,4]),c=new Ft(s),[4,this.pinpointClient.send(c)];case 2:return f=p.sent(),ko.debug("updateEndpoint success",f),this._endpointGenerating=!1,this._resumeBuffer(),n.resolve(f),[2];case 3:return l=p.sent(),d={err:l,update_params:s,endpointObject:e},[2,this._handleEndpointUpdateFailure(d)];case 4:return[2]}}
1))}))},e.prototype._handleEndpointUpdateFailure=function(e){return xo(this,void 0,void 0,(function(){var t,n,r;return Po(this,(function(o){return t=e.err,n=e.endpointObject,r=t.$metadata&&t.$metadata.httpStatusCode,ko.debug("updateEndpoint error",t),403===r?[2,this._handleEndpointUpdateForbidden(e)]:Co.includes(r)?(!0,[2,this._retryEndpointUpdate(n,true)]):(ko.error("updateEndpoint failed",t),n.handlers.reject(t),[2])}))}))},e.prototype._handleEndpointUpdateForbidden=function(e){var t=e.err,n=e.endpointObject,r=t.code,o=t.retryable;if("ExpiredTokenException"!==r&&!o)return n.handlers.reject(t);this._retryEndpointUpdate(n)},e.prototype._retryEndpointUpdate=function(e,t){void 0===t&&(t=!1),ko.debug("_retryEndpointUpdate",e);var n=e.params,r=n.config.resendLimit;if(n.resendLimit="number"===typeof n.resendLimit?n.resendLimit:r,n.resendLimit-- >0)return ko.debug("resending endpoint update "+n.event.eventId+" with "+n.resendLimit+" retry attempts remaining"),void(this._endpointBuffer.length?this._endpointBuffer.unshift(e):this._updateEndpoint(e));ko.warn("resending endpoint update "+n.event.eventId+" failed after "+n.config.resendLimit+" attempts"),this._endpointGenerating&&ko.error("Initial endpoint update failed. ")},e.prototype._initClients=function(e){return xo(this,void 0,void 0,(function(){var t,n;return Po(this,(function(r){return ko.debug("init clients"),this.pinpointClient&&this._config.credentials&&this._config.credentials.sessionToken===e.sessionToken&&this._config.credentials.identityId===e.identityId?(ko.debug("no change for aws credentials, directly return from init"),[2]):(t=this._config.credentials?this._config.credentials.identityId:null,this._config.credentials=e,n=this._config.region,ko.debug("init clients with credentials",e),this.pinpointClient=new po({region:n,credentials:e,customUserAgent:(0,Ct.Zm)()}),this.pinpointClient.middlewareStack.addRelativeTo((function(e){return function(t){return delete t.request.headers["amz-sdk-invocation-id"],delete t.request.headers["amz-sdk-request"],e(t)}}),{step:"finalizeRequest",relation:"after",toMiddleware:"retryMiddleware"}),this._bufferExists()&&t===e.identityId?this._updateBufferClient():this._initBuffer(),this._customizePinpointClientReq(),[2])}))}))},e.prototype._bufferExists=function(){return this._buffer&&this._buffer instanceof Eo},e.prototype._initBuffer=function(){this._bufferExists()&&this._flushBuffer(),this._buffer=new Eo(this.pinpointClient,this._config),this._endpointGenerating&&this._buffer.pause()},e.prototype._updateBufferClient=function(){this._bufferExists()&&this._buffer.updateClient(this.pinpointClient)},e.prototype._flushBuffer=function(){this._bufferExists()&&(this._buffer.flush(),this._buffer=null)},e.prototype._resumeBuffer=function(){this._bufferExists()&&this._buffer.resume()},e.prototype._customizePinpointClientReq=function(){},e.prototype._getEndpointId=function(e){return xo(this,void 0,void 0,(function(){var t;return Po(this,(function(n){switch(n.label){case 0:return[4,ho.ZP.getItem(e)];case 1:return t=n.sent(),ko.debug("endpointId from cache",t,"type",typeof t),t||(t=(0,vo.v1)(),ho.ZP.setItem(e,t)),[2,t]}}))}))},e.prototype._endpointRequest=function(e,t){var n=e.credentials,r=this._clientInfo||{},o=e.clientContext||{},i=e.endpoint||{},a={appVersion:r.appVersion,make:r.make,model:r.model,modelVersion:r.version,platform:r.platform},u=(o.clientId,o.appTitle,o.appVersionName,o.appVersionCode,o.appPackageName,Ao(o,["clientId","appTitle","appVersionName","appVersionCode","appPackageName"])),s=t.address?"android"===r.platform?"GCM":"APNS":void 0,c=Oo(Oo(Oo({channelType:s,requestId:(0,vo.v1)(),effectiveDate:(new Date).toISOString()},i),t),{attributes:Oo(Oo({},i.attributes),t.attributes),demographic:Oo(Oo(Oo(Oo({},a),u),i.demographic),t.demographic),location:Oo(Oo({},i.location),t.location),metrics:Oo(Oo({},i.metrics),t.metrics),user:{userId:t.userId||i.userId||n.identityId,userAttributes:Oo(Oo({},i.userAttributes),t.userAttributes)}}),f=(c.userId,c.userAttributes,c.name,c.session,c.eventId,c.immediate,Ao(c,["userId","userAttributes","name","session","eventId","immediate"]));return kt.JS.transferKeyToUpperCase(f,[],["metrics","userAttributes","attributes"])},e.prototype._eventError=function(e){ko.error("record event failed.",e),ko.warn('Please ensure you have updated your Pinpoint IAM Policy with the Action: "mobiletargeting:PutEvents" in order to record events')},e.prototype._getCredentials=function(){return xo(this,void 0,void 0,(function(){var e,t;return Po(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,jt.cN.get()];case 1:return(e=n.sent())?(ko.debug("set credentials for analytics",e),[2,jt.cN.shear(e)]):[2,null];case 2:return t=n.sent(),ko.debug("ensure credentials error",t),[2,null];case 3:return[2]}}
1))}))},e.category="Analytics",e.providerName="AWSPinpoint",e}()},14412:function(e,t,n){"use strict";n.d(t,{C:function(){return Mn}});var r,o,i,a,u,s,c,f,l=n(35069),d=n(59222),p=n(92752),h=n(71883),v=n(70655);!function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(r||(r={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(o||(o={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(i||(i={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(a||(a={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(u||(u={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(s||(s={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(c||(c={})),function(e){e.filterSensitiveLog=function(e){return(0,v.__assign)({},e)}}(f||(f={}));var y=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}();var g=function(){return g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)};function b(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var m=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(g(g({},this),{headers:g({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return g(g({},e),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}(o):o,r))}),{}))),n},e}();var w=function(){return w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},w.apply(this,arguments)};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.")}function S(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function E(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(S(arguments[t]));return e}var O=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,w({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,w({},e))})),n},o=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,E(o(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,E(o(e)))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=w(w({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=w(w({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[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 x[t.step]-x[e.step]||P[t.priority||"normal"]-P[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,E(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=w({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=e.findIndex((function(e){return e.name===o})),s=e[u];if(s.step!==a.step||s.priority!==a.priority)throw new Error('"'+o+'" middleware with '+s.priority+" priority in "+s.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(u,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=w({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=t.findIndex((function(e){return e.name===o})),s=t[u];
1if(s.toMiddleware!==a.toMiddleware||s.relation!==a.relation)throw new Error('"'+o+'" middleware '+s.relation+' "'+s.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(u,1)}n.add(o)}t.push(a)},clone:function(){return r(O())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"===typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(O());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=_(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},x={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},P={high:3,normal:2,low:1},A=function(){function e(e){this.middlewareStack=O(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!==typeof t?t:void 0,o="function"===typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),T=function(){this.middlewareStack=O()},I=function(e,t){return I=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])},I(e,t)};function k(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(k(arguments[t]));return e}var j=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,C([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};j.prototype=Object.create(String.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(j,String);var L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(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))},t}(j),R=function(e,t){return(0,v.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return(0,v.__generator)(this,(function(f){switch(f.label){case 0:return r=[(0,v.__assign)({},e)],c={},[4,q(e.body,t)];case 1:switch(n=v.__assign.apply(void 0,r.concat([(c.body=f.sent(),c)])),i="UnknownError",i=B(e,n.body),i){case"InvalidInputException":case"com.amazonaws.personalizeevents#InvalidInputException":return[3,2]}return[3,4];case 2:return a=[{}],[4,M(n,t)];case 3:return o=v.__assign.apply(void 0,[v.__assign.apply(void 0,a.concat([f.sent()])),{name:i,$metadata:U(e)}]),[3,5];case 4:u=n.body,i=u.code||u.Code||i,o=(0,v.__assign)((0,v.__assign)({},u),{name:""+i,message:u.message||u.Message||i,$fault:"client",$metadata:U(e)}),f.label=5;case 5:return s=o.message||o.Message||i,o.message=s,delete o.Message,[2,Promise.reject(Object.assign(new Error(s),o))]}}))}))},M=function(e,t){return(0,v.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,v.__generator)(this,(function(r){return t={name:"InvalidInputException",$fault:"client",$metadata:U(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}
1))},D=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return(0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)({},void 0!==e.eventId&&null!==e.eventId&&{eventId:e.eventId}),void 0!==e.eventType&&null!==e.eventType&&{eventType:e.eventType}),void 0!==e.eventValue&&null!==e.eventValue&&{eventValue:e.eventValue}),void 0!==e.impression&&null!==e.impression&&{impression:N(e.impression,t)}),void 0!==e.itemId&&null!==e.itemId&&{itemId:e.itemId}),void 0!==e.properties&&null!==e.properties&&{properties:L.fromObject(e.properties)}),void 0!==e.recommendationId&&null!==e.recommendationId&&{recommendationId:e.recommendationId}),void 0!==e.sentAt&&null!==e.sentAt&&{sentAt:Math.round(e.sentAt.getTime()/1e3)})}(e,t)}))},N=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:e}))},U=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"]}},H=function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)},q=function(e,t){return function(e,t){return H(e,t).then((function(e){return t.utf8Encoder(e)}))}(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},B=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""};var z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},z.apply(this,arguments)};function F(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function G(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var K={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},W={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function V(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return F(void 0,void 0,void 0,(function(){var o,i;return G(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),K),r.add(function(e,t){return function(n,r){return function(r){return F(void 0,void 0,void 0,(function(){var o;return G(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(z(z({},r),{request:o}))]}}))}))}}}(e,t),W)}}}var Z=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,v.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(V(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"PersonalizeEventsClient",commandName:"PutEventsCommand",inputFilterSensitiveLog:i.filterSensitiveLog,outputFilterSensitiveLog:function(e){return e}},a=t.requestHandler;return r.resolve((function(e){return a.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return(0,v.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return(0,v.__generator)(this,(function(f){switch(f.label){case 0:return n={"content-type":"application/json"},r="/events",o=JSON.stringify((0,v.__assign)((0,v.__assign)((0,v.__assign)((0,v.__assign)({},void 0!==e.eventList&&null!==e.eventList&&{eventList:D(e.eventList,t)}),void 0!==e.sessionId&&null!==e.sessionId&&{sessionId:e.sessionId}),void 0!==e.trackingId&&null!==e.trackingId&&{trackingId:e.trackingId}),void 0!==e.userId&&null!==e.userId&&{userId:e.userId})),[4,t.endpoint()];case 1:return i=f.sent(),a=i.hostname,u=i.protocol,s=void 0===u?"https":u,c=i.port,[2,new m({protocol:s,hostname:a,port:c,method:"POST",headers:n,path:r,body:o})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,v.__awaiter)(void 0,void 0,void 0,(function(){var n;return(0,v.__generator)(this,(function(r){switch(r.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,R(e,t)]:(n={$metadata:U(e)},[4,H(e.body,t)]);case 1:return r.sent(),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(T),$=n(84199);
1function Y(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function X(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function J(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 Q(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.")}var ee=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,te)},te=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var ne=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?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=Q(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=ee(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+ee(u[s]));else{var f=a;(u||"string"===typeof u)&&(f+="="+ee(u)),r.push(f)}}}
1catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,f={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!==typeof AbortController&&(f.signal=n);var l,d=new Request(c,f),p=[fetch(d).then((function(e){var t,n,r=e.headers,o={};try{for(var i=J(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new y({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new y({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];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}(),re={},oe=new Array(64),ie=0,ae="A".charCodeAt(0),ue="Z".charCodeAt(0);ie+ae<=ue;ie++){var se=String.fromCharCode(ie+ae);re[se]=ie,oe[ie]=se}for(ie=0,ae="a".charCodeAt(0),ue="z".charCodeAt(0);ie+ae<=ue;ie++){se=String.fromCharCode(ie+ae);var ce=ie+26;re[se]=ce,oe[ce]=se}for(ie=0;ie<10;ie++){re[ie.toString(10)]=ie+52;se=ie.toString(10),ce=ie+52;re[se]=ce,oe[ce]=se}re["+"]=62,oe[62]="+",re["/"]=63,oe[63]="/";function fe(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),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=re[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function le(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 o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var de=function(){return de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},de.apply(this,arguments)};function pe(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function he(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function ve(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var ye=function(e){return function(t,n){return function(r){return pe(void 0,void 0,void 0,(function(){var o;return he(this,(function(i){return(null===(o=null===e||void 0===e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ve(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},ge={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},be=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],me=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],we=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],_e=[500,502,503,504],Se=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||me.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},Ee=n(57686),Oe=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},xe=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return be.includes(e.name)}(e)||Se(e)||function(e){var t;return we.includes(e.name)||_e.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},Pe="standard",Ae=function(){function e(e,t){var n,r,o;
1this.maxAttemptsProvider=e,this.mode=Pe,this.retryDecider=null!==(n=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==n?n:xe,this.delayDecider=null!==(r=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==r?r:Oe,this.retryQuota=null!==(o=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==o?o:function(e){var t=e,n=e,r=function(e){return"TimeoutError"===e.name?10:5},o=function(e){return r(e)<=n};return Object.freeze({hasRetryTokens:o,retrieveRetryTokens:function(e){if(!o(e))throw new Error("No retry token available");var t=r(e);return n-=t,t},releaseRetryTokens:function(e){n+=null!==e&&void 0!==e?e:1,n=Math.min(n,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return pe(this,void 0,void 0,(function(){var e;return he(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 pe(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return he(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,m.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=(0,Ee.v4)()),u=function(){var u,c,f,l,d;return he(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,5]),m.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=p.sent(),c=u.response,f=u.output,s.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=p.sent(),r++,s.shouldRetry(l,r,i)?(n=s.retryQuota.retrieveRetryTokens(l),d=s.delayDecider(Se(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return p.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}
1))},s=this,f.label=2;case 2:return[5,u()];case 3:return"object"===typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),Te=function(e){if(void 0===e&&(e=3),"number"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function Ie(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ke(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ce=n(51206),je=n.n(Ce),Le=n(70167),Re="personalize-events.{region}.amazonaws.com",Me=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"]),De=new Set(["cn-north-1","cn-northwest-1"]),Ne=new Set(["us-iso-east-1"]),Ue=new Set(["us-isob-east-1"]),He=new Set(["us-gov-east-1","us-gov-west-1"]);function qe(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 Be(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var ze,Fe={apiVersion:"2018-03-22",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;return Me.has(e)&&(n={hostname:Re.replace("{region}",e),partition:"aws"}),De.has(e)&&(n={hostname:"personalize-events.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),Ne.has(e)&&(n={hostname:"personalize-events.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),Ue.has(e)&&(n={hostname:"personalize-events.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),He.has(e)&&(n={hostname:"personalize-events.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:Re.replace("{region}",e),partition:"aws"}),Promise.resolve((0,v.__assign)({signingService:"personalize"},n))},serviceId:"Personalize Events",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=qe(e.split("&")),i=o.next();!i.done;i=o.next()){var a=Be(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;
1u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(f){t={error:f}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},Ge=(0,v.__assign)((0,v.__assign)({},Fe),{runtime:"browser",base64Decoder:fe,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=oe[(r&63<<c)>>c]}t+="==".slice(0,4-u)}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:function(e){var t=e.serviceId,n=e.clientVersion;return function(){return Ie(void 0,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return ke(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?je().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null===e||void 0===e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null===e||void 0===e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(s=null===(u=null===e||void 0===e?void 0:e.browser)||void 0===u?void 0:u.name)&&void 0!==s?s:"unknown")+"_"+(null!==(f=null===(c=null===e||void 0===e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}}({serviceId:Fe.serviceId,clientVersion:"3.6.1"}),maxAttempts:3,region:(ze="Region is missing",function(){return Promise.reject(ze)}),requestHandler:new ne,sha256:$.Sha256,streamCollector:function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return Y(this,void 0,void 0,(function(){var t,n;return X(this,(function(r){switch(r.label){case 0:return[4,le(e)];case 1:return t=r.sent(),n=fe(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return Y(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return X(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:Le.fromUtf8,utf8Encoder:Le.toUtf8});var Ke=function(){return Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ke.apply(this,arguments)};function We(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Ve(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ze=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 o=Promise.resolve(t);return function(){return o}}return t},$e=function(e){return We(void 0,void 0,void 0,(function(){var t,n,r,o,i;return Ve(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.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(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},Ye=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var Xe=function(){return Xe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xe.apply(this,arguments)};
1function Je(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Qe(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var et="content-length";var tt={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},nt=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return Je(t,void 0,void 0,(function(){var t,o,i,a,u;return Qe(this,(function(s){return t=r.request,m.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf(et)&&void 0!==(a=e(o))&&(t.headers=Xe(Xe({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(Xe(Xe({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),tt)}}};function rt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ot(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var it={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},at=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return rt(void 0,void 0,void 0,(function(){var r,o;return ot(this,(function(i){return m.isInstance(n.request)?(r=n.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).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),it)}}};function ut(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function st(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var ct=function(){return function(e,t){return function(n){return ut(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,f,l;return st(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.
1inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"===typeof a.info&&(c=s.output,f=c.$metadata,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(l),metadata:f})),[2,s]):[2,s]}}))}))}}},ft={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var lt=function(){return lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lt.apply(this,arguments)};function dt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function pt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function ht(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var vt=function(){return vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},vt.apply(this,arguments)};function yt(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function gt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function bt(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 mt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}for(var wt={},_t={},St=0;St<256;St++){var Et=St.toString(16).toLowerCase();1===Et.length&&(Et="0"+Et),wt[St]=Et,_t[Et]=St}function Ot(e){for(var t="",n=0;n<e.byteLength;n++)t+=wt[e[n]];return t}var xt="X-Amz-Date",Pt="X-Amz-Signature",At="X-Amz-Security-Token",Tt="authorization",It=xt.toLowerCase(),kt=[Tt,It,"date"],Ct=Pt.toLowerCase(),jt="x-amz-content-sha256",Lt=At.toLowerCase(),Rt={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},Mt=/^proxy-/,Dt=/^sec-/,Nt="AWS4-HMAC-SHA256",Ut="AWS4-HMAC-SHA256-PAYLOAD",Ht="aws4_request",qt={},Bt=[];function zt(e,t,n){return e+"/"+t+"/"+n+"/"+Ht}function Ft(e,t,n){var r=new e(t);return r.update(n),r.digest()}function Gt(e,t,n){var r,o,i=e.headers,a={};try{for(var u=bt(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,f=c.toLowerCase();(f in Rt||(null===t||void 0===t?void 0:t.has(f))||Mt.test(f)||Dt.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}function Kt(e,t){var n=e.headers,r=e.body;return yt(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return gt(this,(function(f){switch(f.label){case 0:try{for(e=bt(Object.keys(n)),o=e.next();!o.done;o=e.next())if((i=o.value).toLowerCase()===jt)return[2,n[i]]}catch(d){s={error:d}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return void 0!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"===typeof r||ArrayBuffer.isView(r)||(l=r,"function"===typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),u=Ot,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function Wt(e){var t=e.headers,n=e.query,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return vt(vt({},r),{headers:vt({},t),query:n?Vt(n):void 0})}function Vt(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return vt(vt({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(mt(arguments[t]));return e}(o):o,r))}),{})}function Zt(e){var t,n;e="function"===typeof e.clone?e.clone():Wt(e);try{for(var r=bt(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;kt.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function $t(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 Yt=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=Qt(r),this.credentialProvider=en(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),yt(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x;return gt(this,(function(P){switch(P.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expires
1In,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=P.sent(),null===c||void 0===c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=P.sent(),P.label=4;case 4:return d=p,h=Xt(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=zt(y,d,null!==f&&void 0!==f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"===typeof e.clone?e.clone():Wt(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=bt(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[l]=a[l],delete a[l])}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return vt(vt({},e),{headers:a,query:s})}(Zt(e),{unhoistableHeaders:u}),l.sessionToken&&(b.query[At]=l.sessionToken),b.query["X-Amz-Algorithm"]=Nt,b.query["X-Amz-Credential"]=l.accessKeyId+"/"+g,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=i.toString(10),m=Gt(b,a,s),b.query["X-Amz-SignedHeaders"]=Jt(m),w=b.query,_=Pt,S=this.getSignature,E=[v,g,this.getSigningKey(l,d,y,f)],O=this.createCanonicalRequest,x=[b,m],[4,Kt(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,x.concat([P.sent()]))]))];case 6:return w[_]=P.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return yt(this,void 0,void 0,(function(){return gt(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,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return yt(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,p,h,v,y;return gt(this,(function(g){switch(g.label){case 0:return null===u||void 0===u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,o=Xt(i),c=o.shortDate,f=o.longDate,l=zt(c,e,null!==s&&void 0!==s?s:this.service),[4,Kt({headers:{},body:r},this.sha256)];case 4:return d=g.sent(),(p=new this.sha256).update(n),v=Ot,[4,p.digest()];case 5:return h=v.apply(void 0,[g.sent()]),y=[Ut,f,l,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return yt(this,void 0,void 0,(function(){var t,n,r,u,s,c,f,l;return gt(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null===i||void 0===i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=Xt(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(f.apply(c,[void 0,d.sent()]))).update(e),l=Ot,[4,s.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return yt(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,p,h,v,y;return gt(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===u||void 0===u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=Zt(e),f=Xt(o),l=f.longDate,d=f.shortDate,p=zt(d,n,null!==s&&void 0!==s?s:this.service),c.headers[It]=l,t.sessionToken&&(c.headers[Lt]=t.sessionToken),[4,Kt(c,this.sha256)];case 5:return h=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=bt(Object.keys(t)),i=o.next();!i.done;i=o.next())if(e===i.value.toLowerCase())return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(jt,c.headers)&&this.applyChecksum&&(c.headers[jt]=h),v=Gt(c,a,i),[4,this.get
1Signature(l,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=g.sent(),c.headers[Tt]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+Jt(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,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===Ct)return"continue";i.push(e);var t=o[e];"string"===typeof t?a[e]=ee(e)+"="+ee(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([ee(e)+"="+ee(n)])}),[]).join("&"))};try{for(var s=bt(Object.keys(o).sort()),c=s.next();!c.done;c=s.next())u(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[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 yt(this,void 0,void 0,(function(){var r,o;return gt(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+Ot(o)]}}))}))},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 yt(this,void 0,void 0,(function(){var o,i,a,u,s;return gt(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=Ot,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return yt(void 0,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p;return gt(this,(function(h){switch(h.label){case 0:return[4,Ft(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+Ot(i)+":"+t.sessionToken)in qt)return[2,qt[a]];for(Bt.push(a);Bt.length>50;)delete qt[Bt.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=bt([n,r,o,Ht]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,Ft(e,u,f)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,qt[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),Xt=function(e){var t=$t(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},Jt=function(e){return Object.keys(e).sort().join(";")},Qt=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},en=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function tn(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var nn=function(e){return new Date(Date.now()+e)};function rn(e){return function(t,n){return function(r){return dt(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d;return pt(this,(function(p){switch(p.label){case 0:return m.isInstance(r.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=p.sent(),[3,3];case 2:i=e.signer,p.label=3;case 3:return o=i,u=t,s=[lt({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[lt.apply(void 0,s.concat([(d.request=p.sent(),d)]))])];case 5:return a=p.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),h=l,v=e.systemClockOffset,Math.abs(nn(v).getTime()-h)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var h,v}))}))}}}var on={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var an=function(){return an=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},an.apply(this,arguments)};
1function un(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function sn(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function cn(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function fn(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cn(arguments[t]));return e}var ln,dn,pn,hn="user-agent",vn=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,yn=function(e){var t=cn(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null===e||void 0===e?void 0:e.replace(vn,"_")})).join("/")},gn={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 un(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,f,l;return sn(this,(function(d){switch(d.label){case 0:return o=r.request,m.isInstance(o)?(i=o.headers,a=(null===(f=null===t||void 0===t?void 0:t.userAgent)||void 0===f?void 0:f.map(yn))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=d.sent().map(yn),s=(null===(l=null===n||void 0===n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(yn))||[],i["x-amz-user-agent"]=fn(u,a,s).join(" "),c=fn(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i[hn]=i[hn]?i[hn]+" "+c:c),[2,e(an(an({},r),{request:o}))]}}))}))}}),gn)}}},mn=function(e){function t(t){var n,r,o=this,i=function(e){if(!e.region)throw new Error("Region is missing");return Ke(Ke({},e),{region:Ye(e.region)})}((0,v.__assign)((0,v.__assign)({},Ge),t)),a=function(e){var t;return Ke(Ke({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?Ze(e):function(){return $e(e)},isCustomEndpoint:!!e.endpoint})}(i),u=function(e){var t,n=this,r=tn(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?tn(e.signer):function(){return tn(e.region)().then((function(t){return dt(n,void 0,void 0,(function(){return pt(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=ht(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new Yt({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},lt(lt({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(a),s=function(e){var t=Te(e.maxAttempts);return de(de({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new Ae(t)})}(u),c=an(an({},n=s),{customUserAgent:"string"===typeof n.customUserAgent?[[n.customUserAgent]]:n.customUserAgent});return(o=e.call(this,c)||this).config=c,o.middlewareStack.use((r=o.config,{applyToStack:function(e){e.addRelativeTo(rn(r),on)}})),o.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(ye(e),ge)}}}(o.config)),o.middlewareStack.use(nt(o.config)),o.middlewareStack.use(at(o.config)),o.middlewareStack.use((o.config,{applyToStack:function(e){e.add(ct(),ft)}})),o.middlewareStack.use(bn(o.config)),o}return(0,v.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}
1(A),wn=n(41609),_n=n.n(wn),Sn=n(18446),En=n.n(Sn),On=n(15885),xn=n(7895),Pn="_awsct_uid",An="_awsct_sid",Tn=(new l.k("AmazonPersonalizeProvider"),function(){function e(e){void 0===e&&(e=""),this._isBrowser=d.JS.browserOrNode().isBrowser,this._timerKey=(0,On.v1)().substr(0,15),this._refreshTimer()}return e.prototype._refreshTimer=function(){this._timer&&clearInterval(this._timer);var e=this;this._timer=setInterval((function(){e._timerKey=(0,On.v1)().substr(0,15)}),3e4)},e.prototype.storeValue=function(e,t){var n=new Date,r=new Date;r.setTime(n.getTime()+6048e5),xn.ZP.setItem(this._getCachePrefix(e),t,{expires:r.getTime()})},e.prototype.retrieveValue=function(e){return xn.ZP.getItem(this._getCachePrefix(e))},e.prototype._getCachePrefix=function(e){return this._isBrowser?e+"."+window.location.host:"peronslize"},e.prototype.getTimerKey=function(){return this._timerKey},e.prototype.updateSessionInfo=function(e,t){var n=t.userId,r=t.sessionId;if(this._isRequireNewSession(e,n,r)){var o=(0,On.v1)();this.storeValue(Pn,e),this.storeValue(An,o),t.sessionId=o}else this._isRequireUpdateSessionInfo(e,n,r)&&this.storeValue(Pn,e);t.userId=e},e.prototype._isRequireUpdateSessionInfo=function(e,t,n){return!_n()(n)&&_n()(t)&&!_n()(e)},e.prototype.retrieveSessionInfo=function(e){var t={};return t.trackingId=e,t.sessionId=this.retrieveValue(An),t.userId=this.retrieveValue(Pn),_n()(t.sessionId)&&(t.sessionId=(0,On.v1)(),this.storeValue(An,t.sessionId)),this.storeValue("_awsct",e),t},e.prototype._isRequireNewSession=function(e,t,n){var r=_n()(n),o=_n()(e)&&!_n()(t),i=!_n()(e)&&!_n()(t)&&!En()(e,t);return r||o||i},e}());!function(e){e.PLAY="play",e.PAUSE="pause",e.ENDED="Ended"}(ln||(ln={})),function(e){e.IFRAME="IFRAME",e.VIDEO="VIDEO",e.AUDIO="AUDIO"}(dn||(dn={})),function(e){e.PLAY="Play",e.ENDED="Ended",e.PAUSE="Pause",e.TIME_WATCHED="TimeWatched"}(pn||(pn={}));var In=function(){function e(e,t){var n;this.eventActionMapping=((n={})[pn.ENDED]=this.endedEventAction.bind(this),n[pn.PLAY]=this.playEventAction.bind(this),n[pn.PAUSE]=this.pauseEventAction.bind(this),n);var r=e.eventData;this._params=e,this._mediaElement=document.getElementById(r.properties.domElementId),this._started=!1,this._provider=t,{IFRAME:this._iframeMediaTracker,VIDEO:this._html5MediaTracker,AUDIO:this._html5MediaTracker}[this._mediaElement.tagName].bind(this)(),this._initYoutubeFrame()}return e.prototype._initYoutubeFrame=function(){this._youTubeIframeLoader={src:"https://www.youtube.com/iframe_api",loading:!1,loaded:!1,listeners:[],load:function(e){var t=this;if(this.listeners.push(e),this.loaded)setTimeout((function(){t.done()}));else if(!this.loading){this.loading=!0,window.onYouTubeIframeAPIReady=function(){t.loaded=!0,t.done()};var n=document.createElement("script");n.type="text/javascript",n.src=this.src,document.body.appendChild(n)}},done:function(){for(delete window.onYouTubeIframeAPIReady;this.listeners.length;)this.listeners.pop()(window.YT)}}},e.prototype._iframeMediaTracker=function(){var e=this;setInterval((function(){e._started&&e.recordEvent(dn.IFRAME,pn.TIME_WATCHED)}),3e3),this._youTubeIframeLoader.load((function(t){e._iframePlayer=new t.Player(e._mediaElement.id,{events:{onStateChange:e._onPlayerStateChange.bind(e)}})}))},e.prototype._onPlayerStateChange=function(e){var t={0:pn.ENDED,1:pn.PLAY,2:pn.PAUSE}[e.data];t&&this.eventActionMapping[t](dn.IFRAME)},e.prototype._html5MediaTracker=function(){var e=this;setInterval((function(){e._started&&e.recordEvent(dn.VIDEO,pn.TIME_WATCHED)}),3e3),this._mediaElement.addEventListener(ln.PLAY,(function(){e.eventActionMapping[pn.PLAY](dn.VIDEO)}),!1),this._mediaElement.addEventListener(ln.PAUSE,(function(){e.eventActionMapping[pn.PAUSE](dn.VIDEO)}),!1),this._mediaElement.addEventListener(ln.ENDED,(function(){e.eventActionMapping[pn.ENDED](dn.VIDEO)}),!1)},e.prototype.playEventAction=function(e){this._started=!0,this.recordEvent(e,pn.PLAY)},e.prototype.pauseEventAction=function(e){this._started=!1,this.recordEvent(e,pn.PAUSE)},e.prototype.endedEventAction=function(e){this._started=!1,this.recordEvent(e,pn.ENDED)},e.prototype.recordEvent=function(e,t){var n=Object.assign({},this._params),r=n.eventData;r.eventType=t,e===dn.VIDEO?(r.properties.timestamp=this._mediaElement.currentTime,r.properties.duration=this._mediaElement.duration):(r.properties.timestamp=this._financial(this._iframePlayer.getCurrentTime()),r.properties.duration=this._financial(this._iframePlayer.getDuration()));var o=parseFloat(r.properties.timestamp)/parseFloat(r.properties.duration);r.properties.eventValue=Number(o.toFixed(4)),delete r.properties.domElementId,this._provider.putToBuffer(n)},e.prototype._financial=function(e){return Number.parseFloat(e).toFixed(4)},e}(),kn=n(27361),Cn=n.n(kn),jn=function(e,t,n,r){return new(n||(n=Prom
1ise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Ln=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Rn=new l.k("AmazonPersonalizeProvider"),Mn=function(){function e(e){this._buffer=[],this._config=e||{},this._config.flushSize=this._config.flushSize>0&&this._config.flushSize<=10?this._config.flushSize:5,this._config.flushInterval=this._config.flushInterval||5e3,this._sessionManager=new Tn,_n()(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._isBrowser=d.JS.browserOrNode().isBrowser,this._setupTimer()}return e.prototype._setupTimer=function(){this._timer&&clearInterval(this._timer);var e=this._config.flushInterval,t=this;this._timer=setInterval((function(){t._sendFromBuffer()}),e)},e.prototype.record=function(e){return jn(this,void 0,void 0,(function(){var t,n,r,o,i;return Ln(this,(function(a){switch(a.label){case 0:return[4,this._getCredentials()];case 1:return(t=a.sent())?(Object.assign(e,{config:this._config,credentials:t,sentAt:new Date}),n=e.event,r=n.eventType,o=n.properties,"Identify"===r?(this._sessionManager.updateSessionInfo(o&&o.userId?o.userId:"",this._sessionInfo),[2]):(_n()(e.event.userId)||this._sessionManager.updateSessionInfo(e.event.userId,this._sessionInfo),i=this.generateRequestParam
1s(e,this._sessionInfo),"MediaAutoTrack"!==r?[3,7]:this._isBrowser?_n()(Cn()(i,"eventData.properties.domElementId",null))?[3,3]:[4,this.isElementFullyLoaded(this.loadElement,i.eventData.properties.domElementId,500,5)]:[3,5])):[2,Promise.resolve(!1)];case 2:return a.sent()?new In(i,this):Rn.debug("Cannot find the media element."),[3,4];case 3:Rn.debug("Missing domElementId field in 'properties' for MediaAutoTrack event type."),a.label=4;case 4:return[3,6];case 5:Rn.debug("MediaAutoTrack only for browser"),a.label=6;case 6:return[2];case 7:return[2,this.putToBuffer(i)]}}))}))},e.prototype.loadElement=function(e){return new Promise((function(t,n){return document.getElementById(e)&&document.getElementById(e).clientHeight?t(!0):n(!0)}))},e.prototype.isElementFullyLoaded=function(e,t,n,r){var o=this;return new Promise((function(i,a){return e(t).then(i).catch((function(u){return r-1>0?(s=n,new Promise((function(e){return setTimeout(e,s)}))).then(o.isElementFullyLoaded.bind(null,e,t,n,r-1)).then(i).catch(a):a(u);var s}))}))},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AmazonPersonalize"},e.prototype.configure=function(e){Rn.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),_n()(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._setupTimer(),this._config}
1,e.prototype.generateRequestParams=function(e,t){var n={},r=e.event,o=r.eventType,i=r.properties;return n.eventData={eventType:o,properties:i},n.sessionInfo=t,n.sentAt=e.sentAt,n.credentials=e.credentials,n.config=e.config,n},e.prototype._sendEvents=function(e){var t=e.length;if(0!==t){var n=e[0],r=n.config,o=n.credentials,i=n.sessionInfo;if(!this._init(r,o))return!1;if(t>0){for(var a=[],u=0;u<t;u+=1){var s=e.shift(),c=this._generateSingleRecordPayload(s,i);a.push(c)}var f={};f.trackingId=i.trackingId,f.sessionId=i.sessionId,f.userId=i.userId,f.eventList=[],a.forEach((function(e){f.eventList.push(e)}));var l=new Z(f);this._personalize.send(l,(function(e){e?Rn.debug("Failed to call putEvents in Personalize",e):Rn.debug("Put events")}))}}else Rn.debug("events array is empty, directly return")},e.prototype.putToBuffer=function(e){return this._buffer.length<this._config.flushSize?this._buffer.push(e):(this._buffer.push(e),this._sendFromBuffer()),Promise.resolve(!0)},e.prototype._sendFromBuffer=function(){var e=this,t=this._buffer.length;if(!(t<=0)){for(var n=[],r=null,o=[],i=0;i<t;i+=1){var a=this._buffer.shift(),u=a.credentials,s=a.sessionInfo;0===i?(o.push(a),r=u):En()(s,this._sessionInfo)&&u.sessionToken===r.sessionToken&&u.identityId===r.identityId?(Rn.debug("no change for cred, put event in the same group"),o.push(a)):(n.push(o),(o=[]).push(a),r=u,this._sessionInfo=s)}n.push(o),n.map((function(t){e._sendEvents(t)}))}},e.prototype._generateSingleRecordPayload=function(e,t){var n=e.eventData,r=e.sentAt,o={};return o.sentAt=r,o.properties=n.properties&&JSON.stringify(n.properties),o.eventId=this._sessionManager.getTimerKey()+t.sessionId,o.eventType=n.eventType,o},e.prototype._init=function(e,t){if(Rn.debug("init clients"),this._personalize&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return Rn.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var n=e.region;return Rn.debug("initialize personalize with credentials",t),this._personalize=new mn({region:n,credentials:t,customUserAgent:(0,p.Zm)()}),!0},e.prototype._getCredentials=function(){var e=this;return h.cN.get().then((function(t){return t?(Rn.debug("set credentials for analytics",e._config.credentials),h.cN.shear(t)):null})).catch((function(e){return Rn.debug("ensure credentials error",e),null}))},e}()},19921:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)}},15885:function(e,t,n){var r=n(18010),o=n(15705),i=o;i.v1=r,i.v4=o,e.exports=i},61901:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},54478:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},18010:function(e,t,n){var r,o,i=n(54478),a=n(61901),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},15705:function(e,t,n){var r=n(54478),o=n(61901);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},8219:function(e,t,n){"use strict";var r=n(10552);t.ZP=r.b},52633:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=new(n(35069).k)("ClientDevice_Browser");function o(){return"undefined"===typeof window?{}:function(){if("undefined"===typeof window)return r.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return r.warn("No navigator object available to get browser client info"),{};var t=e.platform,n=e.product,o=e.vendor,i=e.userAgent,a=e.language,u=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 o=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};
1var i=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var a=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);if(a)return{type:a[1],version:a[2]};return{type:"",version:""}}(i),s=function(){var e=/\(([A-Za-z\s].*)\)/.exec((new Date).toString());return e&&e[1]||""}();return{platform:t,make:n||o,model:u.type,version:u.version,appVersion:[u.type,u.version].join("/"),language:a,timezone:s}}()}var i=function(){function e(){}return e.clientInfo=function(){return o()},e.dimension=function(){return"undefined"===typeof window?(r.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}()},21195:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(35069),o=n(59222),i=n(25387),a=function(){function e(){this._logger=new r.k("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,o){if(!navigator||!("serviceWorker"in navigator))return o(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),o(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(!(0,o.lC)().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),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);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),i.dQ.Analytics&&"function"===typeof i.dQ.Analytics.record&&i.dQ.Analytics.record({name:"ServiceWorker",attributes:{state:n}})})),this._serviceWorker.addEventListener("message",(function(t){e._logger.debug("ServiceWorker message event: "+t)}))},e}()},97578:function(e,t,n){"use strict";n.d(t,{KT:function(){return An}});var r=n(35069),o=n(59222),i=n(20490),a=n(25387);function u(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function s(e){return!!e&&!!e[X]}function c(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return!t||t===Object.prototype}(e)||Array.isArray(e)||!!e[Y]||!!e.constructor[Y]||y(e)||g(e))}function f(e,t,n){void 0===n&&(n=!1),0===l(e)?(n?Object.keys:J)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function l(e){var t=e[X];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:y(e)?2:g(e)?3:0}function d(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){return 2===l(e)?e.get(t):e[t]}function h(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function v(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function y(e){return W&&e instanceof Map}function g(e){return V&&e instanceof Set}function b(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Q(e);delete t[X];for(var n=J(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function w(e,t){return void 0===t&&(t=!1),S(e)||s(e)||!c(e)||(l(e)>1&&(e.set=e.add=e.clear=e.delete=_),Object.freeze(e),t&&f(e,(function(e,t){return w(t,!0)}),!0)),e}function _(){u(2)}function S(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function E(e){var t=ee[e];return t||u(18,e),t}function O(e,t){ee[e]||(ee[e]=t)}function x(){return G}function P(e,t){t&&(E("Patches"),e.u=[],e.s=[],e.v=t)}function A(e){T(e),e.p.forEach(k),e.p=null}function T(e){e===G&&(G=e.l)}function I(e){return G={p:[],l:G,h:e,m:!0,_:0}}function k(e){var t=e[X];0===t.i||1===t.i?t.j():t.g=!0}function C(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||E("ES5").S(t,e,r),r?(n[X].P&&(A(t),u(4)),c(e)&&(e=j(t,e),t.l||R(t,e)),t.u&&E("Patches").M(n[X],e,t.u,t.s)):e=j(t,n,[]),A(t),t.u&&t.v(t.u,t.s),e!==$?e:void 0}function j(e,t,n){if(S(t))return t;var r=t[X];if(!r)return f(t,(function(o,i){return L(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return R(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=m(r.k):r.o;f(3===r.i?new Set(o):o,(function(t,i){return L(e,r,o,t,i,n)})),R(e,o,!1),n&&e.u&&E("Patches").R(r,n,e.u,e.s)}return r.o}
1function L(e,t,n,r,o,i){if(s(o)){var a=j(e,o,i&&t&&3!==t.i&&!d(t.D,r)?i.concat(r):void 0);if(h(n,r,a),!s(a))return;e.m=!1}if(c(o)&&!S(o)){if(!e.h.N&&e._<1)return;j(e,o),t&&t.A.l||R(e,o)}}function R(e,t,n){void 0===n&&(n=!1),e.h.N&&e.m&&w(t,n)}function M(e,t){var n=e[X];return(n?b(n):e)[t]}function D(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function N(e){e.P||(e.P=!0,e.l&&N(e.l))}function U(e){e.o||(e.o=m(e.t))}function H(e,t,n){var r=y(t)?E("MapSet").T(t,n):g(t)?E("MapSet").F(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:x(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=te;n&&(o=[r],i=ne);var a=Proxy.revocable(o,i),u=a.revoke,s=a.proxy;return r.k=s,r.j=u,s}(t,n):E("ES5").J(t,n);return(n?n.A:x()).p.push(r),r}function q(e){return s(e)||u(22,e),function e(t){if(!c(t))return t;var n,r=t[X],o=l(t);if(r){if(!r.P&&(r.i<4||!E("ES5").K(r)))return r.t;r.I=!0,n=B(t,o),r.I=!1}else n=B(t,o);return f(n,(function(t,o){r&&p(r.t,t)===o||h(n,t,e(o))})),3===o?new Set(n):n}(e)}function B(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function z(){function e(t){if(!c(t))return t;if(Array.isArray(t))return t.map(e);if(y(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(g(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return n}function t(t){return s(t)?e(t):t}var n="add";O("Patches",{$:function(t,r){return r.forEach((function(r){for(var o=r.path,i=r.op,a=t,s=0;s<o.length-1;s++){var c=l(a),f=o[s];0!==c&&1!==c||"__proto__"!==f&&"constructor"!==f||u(24),"function"==typeof a&&"prototype"===f&&u(24),"object"!=typeof(a=p(a,f))&&u(15,o.join("/"))}var d=l(a),h=e(r.value),v=o[o.length-1];switch(i){case"replace":switch(d){case 2:return a.set(v,h);case 3:u(16);default:return a[v]=h}case n:switch(d){case 1:return a.splice(v,0,h);case 2:return a.set(v,h);case 3:return a.add(h);default:return a[v]=h}case"remove":switch(d){case 1:return a.splice(v,1);case 2:return a.delete(v);case 3:return a.delete(r.value);default:return delete a[v]}default:u(17,i)}})),t},R:function(e,r,o,i){switch(e.i){case 0:case 4:case 2:return function(e,r,o,i){var a=e.t,u=e.o;f(e.D,(function(e,s){var c=p(a,e),f=p(u,e),l=s?d(a,e)?"replace":n:"remove";if(c!==f||"replace"!==l){var h=r.concat(e);o.push("remove"===l?{op:l,path:h}:{op:l,path:h,value:f}),i.push(l===n?{op:"remove",path:h}:"remove"===l?{op:n,path:h,value:t(c)}:{op:"replace",path:h,value:t(c)})}}))}(e,r,o,i);case 5:case 1:return function(e,r,o,i){var a=e.t,u=e.D,s=e.o;if(s.length<a.length){var c=[s,a];a=c[0],s=c[1];var f=[i,o];o=f[0],i=f[1]}for(var l=0;l<a.length;l++)if(u[l]&&s[l]!==a[l]){var d=r.concat([l]);o.push({op:"replace",path:d,value:t(s[l])}),i.push({op:"replace",path:d,value:t(a[l])})}for(var p=a.length;p<s.length;p++){var h=r.concat([p]);o.push({op:n,path:h,value:t(s[p])})}a.length<s.length&&i.push({op:"replace",path:r.concat(["length"]),value:a.length})}(e,r,o,i);case 3:return function(e,t,r,o){var i=e.t,a=e.o,u=0;i.forEach((function(e){if(!a.has(e)){var i=t.concat([u]);r.push({op:"remove",path:i,value:e}),o.unshift({op:n,path:i,value:e})}u++})),u=0,a.forEach((function(e){if(!i.has(e)){var a=t.concat([u]);r.push({op:n,path:a,value:e}),o.unshift({op:"remove",path:a,value:e})}u++}))}(e,r,o,i)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t}),r.push({op:"replace",path:[],value:e.t})}})}var F,G,K="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),W="undefined"!=typeof Map,V="undefined"!=typeof Set,Z="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,$=K?Symbol.for("immer-nothing"):((F={})["immer-nothing"]=!0,F),Y=K?Symbol.for("immer-draftable"):"__$immer_draftable",X=K?Symbol.for("immer-state"):"__$immer_state",J=("undefined"!=typeof Symbol&&Symbol.iterator,"undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames),Q=Object.getOwnPropertyDescriptors||function(e){var t={};return J(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ee={},te={get:function(e,t){if(t===X)return e;var n=b(e);if(!d(n,t))return function(e,t,n){var r,o=D(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!c(r)?r:r===M(e.t,t)?(U(e),e.o[t]=H(e.A.h,r,e)):r},has:function(e,t){return t in b(e)},ownKeys:function(e){return Reflect.ownKeys(b(e))},set:function(e,t,n){var r=D(b(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=M(b(e),t),i=null==o?void 0:o[X];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(v(n,o)&&(void 0!==n||d(e.t,t)))return!0;U(e),N(e)}return e.o[t]=n,e.D[t]=!0,!0},deleteProperty:function(e,t){return void 0!==M(e.t,t)||t in e.t?(e.D[t]=!1,U(e),N(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=b(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){u(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){u(12)}},ne={};f(te,(function(e,t){ne[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ne.deleteProperty=function(e,t){return te.deleteProperty.call(this,e[0],t)},ne.set=function(e,t,n){return te.set.call(this,e[0],t,n,e[0])};var re=function(){function e(e){this.O=Z,this.N=!0,"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var t=e.prototype;return t.produce=function(e,t,n){if("function"==typeof e&&"function"!=typeof t){var r=t;t=e;var o=this;return function(e){var n=this;void 0===e&&(e=r);for(var i=arguments.length,a=Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return o.produce(e,(function(e){var r;return(r=t).call.apply(r,[n,e].concat(a))}))}}var i;if("function"!=typeof t&&u(6),void 0!==n&&"function"!=typeof n&&u(7),c(e)){var a=I(this),s=H(this,e,void 0),f=!0;try{i=t(s),f=!1}finally{f?A(a):T(a)}return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return P(a,n),C(e,a)}),(function(e){throw A(a),e})):(P(a,n),C(i,a))}if(!e||"object"!=typeof e){if((i=t(e))===$)return;return void 0===i&&(i=e),this.N&&w(i,!0),i}u(21,e)},t.produceWithPatches=function(e,t){var n,r,o=this;return"function"==typeof e?function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return o.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(r))}))}:[this.produce(e,t,(function(e,t){n=e,r=t})),n,r]},t.createDraft=function(e){c(e)||u(8),s(e)&&(e=q(e));var t=I(this),n=H(this,e,void 0);return n[X].C=!0,T(t),n},t.finishDraft=function(e,t){var n=(e&&e[X]).A;return P(n,t),C(void 0,n)},t.setAutoFreeze=function(e){this.N=e},t.setUseProxies=function(e){e&&!Z&&u(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=E("Patches").$;return s(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}(),oe=new re,ie=(oe.produce,oe.produceWithPatches.bind(oe),oe.setAutoFreeze.bind(oe)),ae=(oe.setUseProxies.bind(oe),oe.applyPatches.bind(oe),oe.createDraft.bind(oe),oe.f
1inishDraft.bind(oe),n(98029),n(99904)),ue=n(3550),se=n(68006),ce=n(79561),fe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},le=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},de=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},pe=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(de(arguments[t]));return e};function he(e){return"private"!==e.allow||e.provider?"public"!==e.allow||e.provider?e.provider:ce.j6.API_KEY:ce.j6.USER_POOLS}function ve(e){var t=e.rules,n=e.currentUser,r=new Set;return t.forEach((function(e){switch(e.allow){case"groups":case"owner":n&&("userPools"===e.provider?r.add(se.s.AMAZON_COGNITO_USER_POOLS):"oidc"===e.provider&&r.add(se.s.OPENID_CONNECT));break;case"private":n&&(e.provider&&"userPools"!==e.provider?"iam"===e.provider&&r.add(se.s.AWS_IAM):r.add(se.s.AMAZON_COGNITO_USER_POOLS));break;case"public":"iam"===e.provider?r.add(se.s.AWS_IAM):e.provider&&"apiKey"!==e.provider||r.add(se.s.API_KEY)}})),Array.from(r)}var ye,ge,be=function(e){var t=e.schema,n=e.modelName;return fe(void 0,void 0,void 0,(function(){var e,r,o,i;return le(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,ue.ZP.currentAuthenticatedUser()];case 1:return e=a.sent(),[3,3];case 2:return a.sent(),[3,3];case 3:return(r=t.namespaces.user.models[n].attributes)&&(o=r.find((function(e){return"auth"===e.type}))).properties&&o.properties.rules?(i=function(e){var t=["owner","groups","private","public"],n=["userPools","oidc","iam","apiKey"];return pe(e).sort((function(e,r){return e.allow===r.allow?n.indexOf(he(e))-n.indexOf(he(r)):t.indexOf(e.allow)-t.indexOf(r.allow)}))}(o.properties.rules),[2,ve({currentUser:e,rules:i})]):[2,[]]}}))}))},me=function(){return[]},we=n(36460),_e=n(3581),Se=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)}));return this._pending||this._dispatchNext(),t},e.prototype.runExclusive=function(e){return this.acquire().then((function(t){var n;try{n=e()}catch(r){throw t(),r}return Promise.resolve(n).then((function(e){return t(),e}),(function(e){throw t(),e}))}))},e.prototype._dispatchNext=function(){this._queue.length>
10?(this._pending=!0,this._queue.shift()(this._dispatchNext.bind(this))):this._pending=!1},e}(),Ee=Se,Oe=n(71404),xe=n.n(Oe),Pe=n(85256),Ae=function(){return(0,o.lC)().isBrowser&&window.indexedDB||(0,o.n2)()&&self.indexedDB?n(82887).Z:new(0,n(4936).l)},Te=function(){return Te=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Te.apply(this,arguments)},Ie=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},ke=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ce=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},je=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Le=new r.k("DataStore"),Re=function(){function e(e,t,n,r,o,i){this.schema=e,this.namespaceResolver=t,this.getModelConstructorByModelName=n,this.modelInstanceCreator=r,this.adapter=o,this.sessionId=i,this.adapter=Ae(),this.pushStream=new(xe())}return e.getNamespace=function(){return{name:Pe.P_,relationships:{},enums:{},models:{},nonModels:{}}},e.prototype.init=function(){return Ie(this,void 0,void 0,(function(){var e,t;return ke(this,(function(n){switch(n.label){case 0:return void 0===this.initialized?[3,2]:[4,this.initialized];case 1:case 3:return n.sent(),[2];case 2:return Le.debug("Starting Storage"),this.initialized=new Promise((function(n,r){e=n,t=r})),this.adapter.setUp(this.schema,this.namespaceResolver,this.modelInstanceCreator,this.getModelConstructorByModelName,this.sessionId).then(e,t),[4,this.initialized]}}))}))},e.prototype.save=function(e,t,n,r){return Ie(this,void 0,void 0,(function(){var o,i=this;return ke(this,(function(a){switch(a.label){case 0:return[4,this.init()];case 1:return a.sent(),[4,this.adapter.save(e,t)];case 2:return(o=a.sent()).forEach((function(a){var u,s=je(a,2),c=s[0],f=s[1],l=!!n;if(f===ce.HP.UPDATE&&!l&&null===(u=i.getUpdateMutationInput(e,c,r)))return o;var d=u||c,p=Object.getPrototypeOf(c).constructor;i.pushStream.next({model:p,opType:f,element:d,mutator:n,condition:we.OY.getPredicates(t,!1)})})),[2,o]}}))}))},e.prototype.delete=function(e,t,n){return Ie(this,void 0,void 0,(function(){var r,o,i,a,u=this;return ke(this,(function(s){switch(s.label){case 0:return[4,this.init()];case 1:return s.sent(),[4,this.adapter.delete(e,t)];case 2:return a=je.apply(void 0,[s.sent(),2]),o=a[0],r=a[1],i=new Set(o.map((function(e){return e.id}))),(0,Pe.hK)(e)||Array.isArray(r)||(r=[r]),r.forEach((function(r){var o,a=Object.getPrototypeOf(r).constructor;(0,Pe.hK)(e)||(o=i.has(r.id)?we.OY.getPredicates(t,!1):void 0),u.pushStream.next({model:a,opType:ce.HP.DELETE,element:r,mutator:n,condition:o})})),[2,[o,r]]}}))}))},e.prototype.query=function(e,t,n){return Ie(this,void 0,void 0,(function(){return ke(this,(function(r){switch(r.label){case 0:return[4,this.init()];case 1:return r.sent(),[4,this.adapter.query(e,t,n)];case 2:return[2,r.sent()]}}))}))},e.prototype.queryOne=function(e,t){return void 0===t&&(t=ce.fI.FIRST),Ie(this,void 0,void 0,(function(){return ke(this,(function(n){switch(n.label){case 0:return[4,this.init()];case 1:return n.sent(),[4,this.adapter.queryOne(e,t)];case 2:return[2,n.sent()]}}))}))},e.prototype.observe=function(e,t,n){var r=!e,o=we.OY.getPredicates(t,!1)||{},i=o.predicates,a=o.type,u=!!i,s=this.pushStream.observable.filter((function(e){var t=e.mutator;return!n||t!==n})).map((function(e){e.mutator;return Ce(e,["mutator"])}));return r||(s=s.filter((function(t){var n=t.model,r=t.element;return e===n&&(!u||(0,Pe.u8)(r,a,i))}))),s},e.prototype.clear=function(e){return void 0===e&&(e=!0),Ie(this,void 0,void 0,(function(){return ke(this,(function(t){switch(t.label){case 0:return this.initialized=void 0,[4,this.adapter.clear()];case 1:return t.sent(),e&&this.pushStream.complete(),[2]}}))}))},e.prototype.batchSave=function(e,t,n){return Ie(this,void 0,void 0,(function(){var r,o=this;return ke(this,(function(i){switch(i.label){case 0:return[4,this.init()];case 1:return i.sent(),[4,this.adapter.batchSave(e,t)];
1case 2:return(r=i.sent()).forEach((function(t){var r=je(t,2),i=r[0],a=r[1];o.pushStream.next({model:e,opType:a,element:i,mutator:n,condition:void 0})})),[2,r]}}))}))},e.prototype.getUpdateMutationInput=function(e,t,n){if(!(n&&n.length))return null;var r=je(n,2),o=r[0],i=r[1],a={},u=o.map((function(e){return e.path&&e.path[0]})),s=Object.getPrototypeOf(e).constructor,c=this.namespaceResolver(s),f=this.schema.namespaces[c].models[s.name].fields;if(u.forEach((function(e){var n=(0,ce.Fr)(f[e].association)||e;(0,Pe.Vg)(i[n],t[n])||(a[n]=t[n])})),0===Object.keys(a).length)return null;var l=t.id,d=t._version,p=t._lastChangedAt,h=t._deleted;return Te(Te({},a),{id:l,_version:d,_lastChangedAt:p,_deleted:h})},e}(),Me=function(){function e(e,t,n,r,o,i){this.mutex=new Ee,this.storage=new Re(e,t,n,r,o,i)}return e.prototype.runExclusive=function(e){return this.mutex.runExclusive(e.bind(this,this.storage))},e.prototype.save=function(e,t,n,r){return Ie(this,void 0,void 0,(function(){return ke(this,(function(o){return[2,this.runExclusive((function(o){return o.save(e,t,n,r)}))]}))}))},e.prototype.delete=function(e,t,n){return Ie(this,void 0,void 0,(function(){return ke(this,(function(r){return[2,this.runExclusive((function(r){if((0,Pe.hK)(e)){var o=e;return r.delete(o,t,n)}var i=e;return r.delete(i,t,n)}))]}))}))},e.prototype.query=function(e,t,n){return Ie(this,void 0,void 0,(function(){return ke(this,(function(r){return[2,this.runExclusive((function(r){return r.query(e,t,n)}))]}))}))},e.prototype.queryOne=function(e,t){return void 0===t&&(t=ce.fI.FIRST),Ie(this,void 0,void 0,(function(){return ke(this,(function(n){return[2,this.runExclusive((function(n){return n.queryOne(e,t)}))]}))}))},e.getNamespace=function(){return Re.getNamespace()},e.prototype.observe=function(e,t,n){return this.storage.observe(e,t,n)},e.prototype.clear=function(){return Ie(this,void 0,void 0,(function(){return ke(this,(function(e){switch(e.label){case 0:return[4,this.storage.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.batchSave=function(e,t){return this.storage.batchSave(e,t)},e.prototype.init=function(){return Ie(this,void 0,void 0,(function(){return ke(this,(function(e){return[2,this.storage.init()]}))}))},e}(),De=n(15174),Ne=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.")},Ue=(new(function(){function e(){}return e.prototype.networkMonitor=function(t){if((0,o.lC)().isNode)return ae.Z.from([{online:!0}]);var n=(0,o.n2)()?self:window;return new ae.Z((function(t){t.next({online:n.navigator.onLine});var r=function(){return t.next({online:!0})},o=function(){return t.next({online:!1})};return n.addEventListener("online",r),n.addEventListener("offline",o),e._observers.push(t),function(){n.removeEventListener("online",r),n.removeEventListener("offline",o),e._observers=e._observers.filter((function(e){return e!==t}))}}))},e._observerOverride=function(t){var n,r,o=function(n){if(n.closed)return e._observers=e._observers.filter((function(e){return e!==n})),"continue";n.next(t)};try{for(var i=Ne(e._observers),a=i.next();!a.done;a=i.next()){o(a.value)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e._observers=[],e}())).networkMonitor(),He=function(){return He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},He.apply(this,arguments)},qe=(new r.k("DataStore"),function(){function e(){this.connectionStatus={online:!1}}return e.prototype.status=function(){var e=this;if(this.observer)throw new Error("Subscriber already exists");return new ae.Z((function(t){return e.observer=t,e.subscription=Ue.subscribe((function(n){var r=n.online;e.connectionStatus.online=r;var o=He({},e.connectionStatus);t.next(o)})),function(){e.unsubscribe()}}))},e.prototype.unsubscribe=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.socketDisconnected=function(){var e=this;this.observer&&"function"===typeof this.observer.next&&(this.observer.next({online:!1}),setTimeout((function(){var t=He({},e.connectionStatus);e.observer.next(t)}),5e3))},e}
1()),Be=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},ze=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Fe=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Ge=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.")},Ke=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Fe(arguments[t]));return e},We=function(){function e(e,t){this.outbox=e,this.ownSymbol=t}return e.prototype.merge=function(e,t){return Be(this,void 0,void 0,(function(){var n,r,o,i,a;return ze(this,(function(u){switch(u.label){case 0:return[4,this.outbox.getForModel(e,t)];case 1:return r=u.sent(),o=t._deleted,0!==r.length?[3,5]:o?(n=ce.HP.DELETE,[4,e.delete(t,void 0,this.ownSymbol)]):[3,3];case 2:return u.sent(),[3,5];case 3:return[4,e.save(t,void 0,this.ownSymbol)];case 4:i=Fe.apply(void 0,[u.sent(),1]),a=Fe(i[0],2),n=a[1],u.label=5;case 5:return[2,n]}}))}))},e.prototype.mergePage=function(e,t,n){return Be(this,void 0,void 0,(function(){var r,o,i,a,u,s,c;return ze(this,(function(f){switch(f.label){case 0:r=new Map;try{for(o=Ge(n),i=o.next();!i.done;i=o.next())a=i.value,r.set(a.id,a)}catch(l){s={error:l}}finally{try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}}return u=Ke(r.values()),[4,e.batchSave(t,u,this.ownSymbol)];case 1:return[2,f.sent()]}}))}))},e}(),Ve=function(){return Ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ve.apply(this,arguments)},Ze=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},$e=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ye=new r.k("DataStore");!function(e){e.LIST="query",e.CREATE="mutation",e.UPDATE="mutation",e.DELETE="mutation",e.GET="query"}(ye||(ye={})),function(e){e.CREATE="Create",e.UPDATE="Update",e.DELETE="Delete",e.GET="Get"}(ge||(ge={}));var Xe={_version:void 0,_lastChangedAt:void 0,_deleted:void 0},Je=Object.keys(Xe);function Qe(e,t){var n=et(t),r=function(e,t){var n=[];
1return Object.values(t.fields).forEach((function(t){var r=t.name,o=t.type;if((0,ce.$v)(o)){var i=e.nonModels[o.nonModel],a=Object.values(et(i)).map((function(e){return e.name})),u=[];Object.values(i.fields).forEach((function(t){var n=t.type,r=t.name;if((0,ce.$v)(n)){var o=e.nonModels[n.nonModel];u.push(r+" { "+Qe(e,o)+" }")}})),n.push(r+" { "+a.join(" ")+" "+u.join(" ")+" }")}})),n}(e,t),o=function(e,t){var n=function(e){var t=[];(0,ce.aQ)(e)&&e.attributes&&e.attributes.forEach((function(e){if(e.properties&&e.properties.rules){var n=e.properties.rules.find((function(e){return"owner"===e.allow}));n&&n.ownerField&&t.push(n.ownerField)}}));return t}(e);if(!t.owner&&n.includes("owner"))return["owner"];return[]}(t,n),i=Object.values(n).map((function(e){return e.name})).concat(o).concat(r);return(0,ce.aQ)(t)&&(i=i.concat(Je).concat(function(e){var t=[];return Object.values(e.fields).filter((function(e){var t=e.association;return t&&Object.keys(t).length})).forEach((function(e){var n=e.name,r=e.association,o=r.connectionType;switch(o){case"HAS_ONE":case"HAS_MANY":break;case"BELONGS_TO":(0,ce.Fr)(r)&&t.push(n+" { id _deleted }");break;default:(0,Pe.y0)(o)}})),t}(t))),i.join("\n")}function et(e){var t=e.fields;return Object.values(t).filter((function(e){return!(!(0,ce.BV)(e.type)&&!(0,ce.g5)(e.type))})).reduce((function(e,t){return e[t.name]=t,e}),{})}function tt(e,t,n){var r,o,i=Qe(e,t),a=t.name,u=t.pluralName,s=" ",c=" ";switch(n){case"LIST":r="sync"+u,s="($limit: Int, $nextToken: String, $lastSync: AWSTimestamp, $filter: Model"+a+"FilterInput)",c="(limit: $limit, nextToken: $nextToken, lastSync: $lastSync, filter: $filter)",i="items {\n\t\t\t\t\t\t\t"+i+"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextToken\n\t\t\t\t\t\tstartedAt";break;case"CREATE":r="create"+a,s="($input: Create"+a+"Input!)",c="(input: $input)",o=ge.CREATE;break;case"UPDATE":r="update"+a,s="($input: Update"+a+"Input!, $condition: Model"+a+"ConditionInput)",c="(input: $input, condition: $condition)",o=ge.UPDATE;break;case"DELETE":r="delete"+a,s="($input: Delete"+a+"Input!, $condition: Model"+a+"ConditionInput)",c="(input: $input, condition: $condition)",o=ge.DELETE;break;case"GET":r="get"+a,s="($id: ID!)",c="(id: $id)",o=ge.GET;break;default:(0,Pe.y0)(n)}return[[o,r,ye[n]+" operation"+s+"{\n\t\t"+r+c+"{\n\t\t\t"+i+"\n\t\t}\n\t}"]]}function nt(e,t,n,r,o,i,a,u,s){var c;switch(n){case ce.HP.INSERT:c=ge.CREATE;break;case ce.HP.UPDATE:c=ge.UPDATE;break;case ce.HP.DELETE:c=ge.DELETE;break;default:(0,Pe.y0)(n)}return u(a,Ve(Ve({},s?{id:s}:{}),{data:JSON.stringify(o),modelId:o.id,model:r.name,operation:c,condition:JSON.stringify(i)}))}function rt(e){var t={};return e&&Array.isArray(e.predicates)?(e.predicates.forEach((function(e){var n;if((0,ce.w5)(e)){var r=e.field,o=e.operator,i=e.operand;if("id"===r)return;t[r]=((n={})[o]=i,n)}else t[e.type]=rt(e)})),t):t}function ot(e){var t={};if(!e||!Array.isArray(e.predicates))return t;var n=e.type,r=e.predicates,o="and"===n||"or"===n;t[n]=o?[]:{};var i=function(e){return o?t[n].push(e):t[n]=e};return r.forEach((function(e){var t,n;if((0,ce.w5)(e)){var r=e.field,o=e.operator,a=e.operand,u=((t={})[r]=((n={})[o]=a,n),t);i(u)}else i(ot(e))})),t}function it(e,t){var n=e[t.groupClaim]||[];if("string"===typeof n){var r=void 0;try{r=JSON.parse(n)}catch(o){r=n}n=[].concat(r)}return n}function at(e){var t=e.authModeStrategy,n=e.defaultAuthMode,r=e.modelName,o=e.schema;return Ze(this,void 0,void 0,(function(){var e,i,a,u=this;return $e(this,(function(s){switch(s.label){case 0:e=Object.values(ce.Z1),i={CREATE:[],READ:[],UPDATE:[],DELETE:[]},s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(e.map((function(e){return Ze(u,void 0,void 0,(function(){var a;return $e(this,(function(u){switch(u.label){case 0:return[4,t({schema:o,modelName:r,operation:e})];case 1:return"string"===typeof(a=u.sent())?i[e]=[a]:Array.isArray(a)&&a.length?i[e]=a:i[e]=[n],[2]}}))}))})))];case 2:return s.sent(),[3,4];case 3:return a=s.sent(),Ye.debug("Error getting auth modes for model: "+r,a),[3,4];case 4:return[2,i]}}))}))}function ut(e){var t,n=["Request failed with status code 401","Request failed with status code 403"];return e&&e.errors?t=e.errors.find((function(e){return n.includes(e.message)})):e&&e.message&&(t=e),t?t.message:null}function st(e){var t=Object.values(se.j);return e&&e.message&&t.find((function(t){return e.message.includes(t)}))||null}var ct,ft,lt=function(){return lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lt.apply(this,arguments)}
1,dt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},pt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},ht=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},vt=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},yt=function(){function e(e,t,n,r){this.schema=e,this.MutationEvent=t,this.modelInstanceCreator=n,this.ownSymbol=r}return e.prototype.enqueue=function(e,t){return dt(this,void 0,void 0,(function(){var n=this;return pt(this,(function(r){return e.runExclusive((function(e){return dt(n,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l=this;return pt(this,(function(d){switch(d.label){case 0:return n=this.schema.namespaces[Pe.J3].models.MutationEvent,r=we.OY.createFromExisting(n,(function(e){return e.modelId("eq",t.modelId).id("ne",l.inProgressMutationEventId)})),[4,e.query(this.MutationEvent,r)];case 1:return o=vt.apply(void 0,[d.sent(),1]),void 0!==(i=o[0])?[3,3]:[4,e.save(t,void 0,this.ownSymbol)];case 2:return d.sent(),[2];case 3:return a=t.operation,i.operation!==ge.CREATE?[3,8]:a!==ge.DELETE?[3,5]:[4,e.delete(this.MutationEvent,r)];case 4:return d.sent(),[3,7];case 5:return u=this.mergeUserFields(i,t),[4,e.save(this.MutationEvent.copyOf(i,(function(e){e.data=u.data})),void 0,this.ownSymbol)];case 6:d.sent(),d.label=7;case 7:return[3,12];case 8:return s=t.condition,c=JSON.parse(s),f=void 0,0!==Object.keys(c).length?[3,10]:(f=this.mergeUserFields(i,t),[4,e.delete(this.MutationEvent,r)]);case 9:d.sent(),d.label=10;case 10:return f=f||t,[4,e.save(f,void 0,this.ownSymbol)];case 11:d.sent(),d.label=12;case 12:return[2]}}
1))}))})),[2]}))}))},e.prototype.dequeue=function(e,t,n){return dt(this,void 0,void 0,(function(){var r;return pt(this,(function(o){switch(o.label){case 0:return[4,this.peek(e)];case 1:return r=o.sent(),t?[4,this.syncOutboxVersionsOnDequeue(e,t,r,n)]:[3,3];case 2:o.sent(),o.label=3;case 3:return[4,e.delete(r)];case 4:return o.sent(),this.inProgressMutationEventId=void 0,[2,r]}}))}))},e.prototype.peek=function(e){return dt(this,void 0,void 0,(function(){var t;return pt(this,(function(n){switch(n.label){case 0:return[4,e.queryOne(this.MutationEvent,ce.fI.FIRST)];case 1:return t=n.sent(),this.inProgressMutationEventId=t?t.id:void 0,[2,t]}}))}))},e.prototype.getForModel=function(e,t){return dt(this,void 0,void 0,(function(){var n;return pt(this,(function(r){switch(r.label){case 0:return n=this.schema.namespaces[Pe.J3].models.MutationEvent,[4,e.query(this.MutationEvent,we.OY.createFromExisting(n,(function(e){return e.modelId("eq",t.id)})))];case 1:return[2,r.sent()]}}))}))},e.prototype.getModelIds=function(e){return dt(this,void 0,void 0,(function(){var t,n;return pt(this,(function(r){switch(r.label){case 0:return[4,e.query(this.MutationEvent)];case 1:return t=r.sent(),n=new Set,t.forEach((function(e){var t=e.modelId;return n.add(t)})),[2,n]}}))}))},e.prototype.syncOutboxVersionsOnDequeue=function(e,t,n,r){return dt(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d,p=this;return pt(this,(function(h){switch(h.label){case 0:return n.operation!==r?[2]:(o=t._version,i=t._lastChangedAt,t._deleted,a=ht(t,["_version","_lastChangedAt","_deleted"]),(u=JSON.parse(n.data))?(u._version,u._lastChangedAt,u._deleted,s=ht(u,["_version","_lastChangedAt","_deleted"]),(0,Pe.Vg)(a,s,!0)?(c=this.schema.namespaces[Pe.J3].models.MutationEvent,f=we.OY.createFromExisting(c,(function(e){return e.modelId("eq",t.id).id("ne",p.inProgressMutationEventId)})),[4,e.query(this.MutationEvent,f)]):[2]):[2]);case 1:return(l=h.sent()).length?(d=l.map((function(e){var t=JSON.parse(e.data),n=lt(lt({},t),{_version:o,_lastChangedAt:i});return p.MutationEvent.copyOf(e,(function(e){e.data=JSON.stringify(n)}))})),[4,e.delete(this.MutationEvent,f)]):[2];case 2:return h.sent(),[4,Promise.all(d.map((function(t){return dt(p,void 0,void 0,(function(){return pt(this,(function(n){switch(n.label){case 0:return[4,e.save(t,void 0,this.ownSymbol)];case 1:return[2,n.sent()]}}))}))})))];case 3:return h.sent(),[2]}}))}))},e.prototype.mergeUserFields=function(e,t){var n=JSON.parse(e.data),r=n._version,o=n.id,i=n._lastChangedAt,a=n._deleted,u=ht(n,["_version","id","_lastChangedAt","_deleted"]),s=JSON.parse(t.data),c=(s.id,s._version,s._lastChangedAt,s._deleted,ht(s,["id","_version","_lastChangedAt","_deleted"])),f=JSON.stringify(lt(lt({id:o,_version:r,_lastChangedAt:i,_deleted:a},u),c));return this.modelInstanceCreator(this.MutationEvent,lt(lt({},t),{data:f}))},e}(),gt=n(8219),bt=n(7262),mt=function(){return mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},mt.apply(this,arguments)},wt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},_t=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},St=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},Et=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Ot=new r.k("DataStore"),xt=function(){function e(e,t,n,r,o,i,a,u,s,c){void 0===a&&(a={}),this.schema=e,this.storage=t,this.userClasses=n,this.outbox=r,this.modelInstanceCreator=o,this.MutationEvent=i,this.amplifyConfig=a,this.authModeStrategy=u,this.conflictHandler=s,this.errorHandler=c,this.typeQuery=new WeakMap,this.processing=!1,this.generateQueries()}return e.prototype.generateQueries=function(){var e=this;
1Object.values(this.schema.namespaces).forEach((function(t){Object.values(t.models).filter((function(e){return e.syncable})).forEach((function(n){var r=Et(tt(t,n,"CREATE"),1)[0],o=Et(tt(t,n,"UPDATE"),1)[0],i=Et(tt(t,n,"DELETE"),1)[0];e.typeQuery.set(n,[r,o,i])}))}))},e.prototype.isReady=function(){return void 0!==this.observer},e.prototype.start=function(){var e=this;return new ae.Z((function(t){return e.observer=t,e.resume(),function(){e.pause()}}))},e.prototype.resume=function(){return wt(this,void 0,void 0,(function(){var e,t,n,r,o,i=this;return _t(this,(function(a){switch(a.label){case 0:if(this.processing||!this.isReady())return[2];this.processing=!0,t=Pe.xR,n=function(){var n,o,a,u,s,c,f,l,d,p,h,v,y,g,b,m;return _t(this,(function(w){switch(w.label){case 0:n=e.model,o=e.operation,a=e.data,u=e.condition,s=r.userClasses[n],c=void 0,f=void 0,l=void 0,w.label=1;case 1:return w.trys.push([1,4,,5]),[4,at({authModeStrategy:r.authModeStrategy,defaultAuthMode:r.amplifyConfig.aws_appsync_authenticationType,modelName:n,schema:r.schema})];case 2:return d=w.sent(),p=d[o.toUpperCase()],h=0,v=function(){return wt(i,void 0,void 0,(function(){var r,i;return _t(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,4]),Ot.debug("Attempting mutation with authMode: "+p[h]),[4,this.jitteredRetry(t,n,o,a,u,s,this.MutationEvent,e,p[h])];case 1:return r=c.sent(),Ot.debug("Mutation sent successfully with authMode: "+p[h]),[2,r];case 2:if(i=c.sent(),++h>=p.length)throw Ot.debug("Mutation failed with authMode: "+p[h-1]),i;return Ot.debug("Mutation failed with authMode: "+p[h-1]+". Retrying with authMode: "+p[h]),[4,v()];case 3:return[2,c.sent()];case 4:return[2]}}
1))}))},[4,v()];case 3:return m=Et.apply(void 0,[w.sent(),3]),c=m[0],f=m[1],l=m[2],[3,5];case 4:return"Offline"===(y=w.sent()).message||"RetryMutation"===y.message?[2,"continue"]:[3,5];case 5:return void 0!==c?[3,7]:(Ot.debug("done retrying"),[4,r.storage.runExclusive((function(e){return wt(i,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return[4,this.outbox.dequeue(e)];case 1:return t.sent(),[2]}}))}))}))]);case 6:return w.sent(),[2,"continue"];case 7:return g=c.data[f],b=!1,[4,r.storage.runExclusive((function(e){return wt(i,void 0,void 0,(function(){return _t(this,(function(t){switch(t.label){case 0:return[4,this.outbox.dequeue(e,g,o)];case 1:return t.sent(),[4,this.outbox.peek(e)];case 2:return b=void 0!==t.sent(),[2]}}))}))}))];case 8:return w.sent(),r.observer.next({operation:o,modelDefinition:l,model:g,hasMore:b}),[2]}}))},r=this,a.label=1;case 1:return(o=this.processing)?[4,this.outbox.peek(this.storage)]:[3,3];case 2:o=void 0!==(e=a.sent()),a.label=3;case 3:return o?[5,n()]:[3,5];case 4:return a.sent(),[3,1];case 5:return this.pause(),[2]}}))}))},e.prototype.jitteredRetry=function(e,t,n,r,o,i,a,u,s){return wt(this,void 0,void 0,(function(){var c=this;return _t(this,(function(f){switch(f.label){case 0:return[4,(0,bt.Xm)((function(t,n,r,o,i,a,u){return wt(c,void 0,void 0,(function(){var c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x,P,A,T,I,k,C,j;return _t(this,(function(L){switch(L.label){case 0:c=Et(this.createQueryVariables(e,t,n,r,o),5),f=c[0],l=c[1],d=c[2],p=c[3],h=c[4],v={query:f,variables:l,authMode:s},y=0,g=this.opTypeFromTransformerOperation(n),L.label=1;case 1:return L.trys.push([1,3,,15]),[4,gt.ZP.graphql(v)];case 2:return[2,[L.sent(),p,h]];case 3:if(!((b=L.sent()).errors&&b.errors.length>0))return[3,13];if(m=Et(b.errors,1),w=m[0],_=w.originalError,S=(void 0===_?{}:_).code,E=void 0===S?null:S,"Unauthorized"===w.errorType)throw new bt.V2("Unauthorized");if("Network Error"===w.message||"ECONNABORTED"===E){if(!this.processing)throw new bt.V2("Offline");throw new Error("Network Error")}return"ConflictUnhandled"!==w.errorType?[3,11]:(y++,O=void 0,y>10?(O=ce.K5,[3,7]):[3,4]);case 4:return L.trys.push([4,6,,7]),[4,this.conflictHandler({modelConstructor:i,localModel:this.modelInstanceCreator(i,l.input),remoteModel:this.modelInstanceCreator(i,w.data),operation:g,attempts:y})];case 5:return O=L.sent(),[3,7];case 6:return x=L.sent(),Ot.warn("conflict trycatch",x),[3,15];case 7:return O!==ce.K5?[3,9]:(P=Et(tt(this.schema.namespaces[e],h,"GET"),1),A=Et(P[0],3),T=A[1],I=A[2],[4,gt.ZP.graphql({query:I,variables:{id:l.input.id},authMode:s})]);case 8:return[2,[L.sent(),T,h]];case 9:return k=this.schema.namespaces[e],C=nt(k.relationships,0,g,i,O,d,a,this.modelInstanceCreator,u.id),[4,this.storage.save(C)];case 10:throw L.sent(),new bt.V2("RetryMutation");case 11:try{this.errorHandler({localModel:this.modelInstanceCreator(i,l.input),message:w.message,operation:n,errorType:w.errorType,errorInfo:w.errorInfo,remoteModel:w.data?this.modelInstanceCreator(i,w.data):null})}catch(R){Ot.warn("failed to execute errorHandler",R)}finally{return[2,w.data?[{data:(j={},j[p]=w.data,j)},p,h]:[]]}L.label=12;case 12:return[3,14];case 13:throw new bt.V2(b);case 14:return[3,15];case 15:if(v)return[3,1];L.label=16;case 16:return[2]}}
1))}))}),[t,n,r,o,i,a,u])];case 1:return[2,f.sent()]}}))}))},e.prototype.createQueryVariables=function(e,t,n,r,o){var i=this.schema.namespaces[e].models[t],a=this.typeQuery.get(i),u=Et(a.find((function(e){return Et(e,1)[0]===n})),3),s=u[1],c=u[2],f=JSON.parse(r),l=f._version,d=St(f,["_version"]),p=n===ge.DELETE?{id:d.id}:Object.values(i.fields).filter((function(e){var t=e.name,r=e.type,o=e.association;return(0,ce.I7)(r)?!(!(0,ce.Fr)(o)||"BELONGS_TO"!==o.connectionType):n!==ge.UPDATE||d.hasOwnProperty(t)})).map((function(e){var t=e.name,n=e.type,r=e.association,o=t,i=d[t];return(0,ce.I7)(n)&&(0,ce.Fr)(r)&&(o=r.targetName,i=d[o]),[o,i]})).reduce((function(e,t){var n=Et(t,2),r=n[0],o=n[1];return e[r]=o,e}),{}),h=mt(mt({},p),{_version:l}),v=JSON.parse(o);return[c,mt({input:h},n===ge.CREATE?{}:{condition:Object.keys(v).length>0?v:null}),v,s,i]},e.prototype.opTypeFromTransformerOperation=function(e){switch(e){case ge.CREATE:return ce.HP.INSERT;case ge.DELETE:return ce.HP.DELETE;case ge.UPDATE:return ce.HP.UPDATE;case ge.GET:break;default:(0,Pe.y0)(e)}},e.prototype.pause=function(){this.processing=!1},e}(),Pt=n(7895),At=n(48764).Buffer,Tt=function(){return Tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Tt.apply(this,arguments)},It=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},kt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ct=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},jt=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ct(arguments[t]));return e},Lt=new r.k("DataStore");!function(e){e.CONNECTED="CONNECTED"}(ct||(ct={})),function(e){e[e.none=0]="none",e[e.unauth=1]="unauth",e[e.auth=2]="auth"}(ft||(ft={}));var Rt,Mt=function(){function e(e,t,n,r){void 0===n&&(n={}),this.schema=e,this.syncPredicates=t,this.amplifyConfig=n,this.authModeStrategy=r,this.typeQuery=new WeakMap,this.buffer=[]}return e.prototype.buildSubscription=function(e,t,n,r,o,i,a){var u=this.amplifyConfig.aws_appsync_authenticationType,s=this.getAuthorizationInfo(t,r,u,o,i,a)||{},c=s.isOwner,f=s.ownerField,l=s.ownerValue,d=Ct(function(e,t,n,r,o){var i=Qe(e,t),a=t.name,u=(t.pluralName,"on"+n+a),s="",c="";return r&&(s="($"+o+": String!)",c="("+o+": $"+o+")"),[n,u,"subscription operation"+s+"{\n\t\t\t"+u+c+"{\n\t\t\t\t"+i+"\n\t\t\t}\n\t\t}"]}(e,t,n,c,f),3);return{authMode:a,opType:d[0],opName:d[1],query:d[2],isOwner:c,ownerField:f,ownerValue:l}},e.prototype.getAuthorizationInfo=function(e,t,n,r,o,i){void 0===r&&(r={}),void 0===o&&(o={});var a=function(e){var t=([].concat(e.attributes).find((function(e){return e&&"auth"===e.type}))||{}).properties,n=(void 0===t?{}:t).rules,r=[];
1return(void 0===n?[]:n).forEach((function(t){var n=t.identityClaim,o=void 0===n?"cognito:username":n,i=t.ownerField,a=void 0===i?"owner":i,u=t.operations,s=void 0===u?["create","update","delete","read"]:u,c=t.provider,f=void 0===c?"userPools":c,l=t.groupClaim,d=void 0===l?"cognito:groups":l,p=t.allow,h=void 0===p?"iam":p,v=t.groups,y=void 0===v?[]:v,g="owner"===h;if(s.includes("read")||g){var b={identityClaim:o,ownerField:a,provider:f,groupClaim:d,authStrategy:h,groups:y,areSubscriptionsPublic:!1};if(g){var m=([].concat(e.attributes).find((function(e){return e&&"model"===e.type}))||{}).properties,w=(void 0===m?{}:m).subscriptions,_=(void 0===w?{}:w).level,S=void 0===_?"on":_;b.areSubscriptionsPublic=!s.includes("read")||"public"===S}g?r.push(b):r.unshift(b)}})),r}(e);if(i===se.s.AWS_IAM&&a.find((function(e){return"private"===e.authStrategy&&"iam"===e.provider}))&&t===ft.unauth)return null;var u,s=a.filter((function(e){return"groups"===e.authStrategy&&["userPools","oidc"].includes(e.provider)}));return i!==se.s.AMAZON_COGNITO_USER_POOLS&&i!==se.s.OPENID_CONNECT||!s.find((function(e){var t=it(r,e),n=it(o,e);return jt(t,n).find((function(t){return e.groups.find((function(e){return e===t}))}))}))?((i===se.s.AMAZON_COGNITO_USER_POOLS?a.filter((function(e){return"owner"===e.authStrategy&&"userPools"===e.provider})):[]).forEach((function(e){var t=r[e.identityClaim];t&&(u={authMode:se.s.AMAZON_COGNITO_USER_POOLS,isOwner:!e.areSubscriptionsPublic,ownerField:e.ownerField,ownerValue:t})})),u||((i===se.s.OPENID_CONNECT?a.filter((function(e){return"owner"===e.authStrategy&&"oidc"===e.provider})):[]).forEach((function(e){var t=o[e.identityClaim];t&&(u={authMode:se.s.OPENID_CONNECT,isOwner:!e.areSubscriptionsPublic,ownerField:e.ownerField,ownerValue:t})})),u||{authMode:i||n,isOwner:!1})):{authMode:i,isOwner:!1}},e.prototype.hubQueryCompletionListener=function(e,t){t.payload.event===De.un.SUBSCRIPTION_ACK&&e()},e.prototype.start=function(){var e=this,t=new ae.Z((function(t){var n,r,o=[],a={},u=ft.none;return It(e,void 0,void 0,(function(){var e,s,c,f,l,d,p,h,v,y,g=this;return kt(this,(function(b){switch(b.label){case 0:return b.trys.push([0,2,,3]),[4,ue.ZP.currentCredentials()];case 1:return e=b.sent(),u=e.authenticated?ft.auth:ft.unauth,[3,3];case 2:return b.sent(),[3,3];case 3:return b.trys.push([3,5,,6]),[4,ue.ZP.currentSession()];case 4:return s=b.sent(),n=s.getIdToken().decodePayload(),[3,6];case 5:return b.sent(),[3,6];case 6:if(b.trys.push([6,11,,12]),c=this.amplifyConfig,f=c.aws_cognito_region,l=c.Auth,!f||l&&!l.region)throw"Auth is not configured";return d=void 0,[4,Pt.ZP.getItem("federatedInfo")];case 7:return(p=b.sent())?(d=p.token,[3,10]):[3,8];case 8:return[4,ue.ZP.currentAuthenticatedUser()];case 9:(h=b.sent())&&(d=h.token),b.label=10;case 10:return d&&(v=d.split(".")[1],r=JSON.parse(At.from(v,"base64").toString("utf8"))),[3,12];case 11:return y=b.sent(),Lt.debug("error getting OIDC JWT",y),[3,12];case 12:return Object.values(this.schema.namespaces).forEach((function(e){Object.values(e.models).filter((function(e){return e.syncable})).forEach((function(s){return It(g,void 0,void 0,(function(){var c,f,l,d,p,h,v,y,g=this;return kt(this,(function(b){switch(b.label){case 0:return[4,at({authModeStrategy:this.authModeStrategy,defaultAuthMode:this.amplifyConfig.aws_appsync_authenticationType,modelName:s.name,schema:this.schema})];case 1:return c=b.sent(),f=c.READ,a=Tt(Tt({},a),((h={})[s.name]=((v={})[ge.CREATE]=[],v[ge.UPDATE]=[],v[ge.DELETE]=[],v),h)),l=[ge.CREATE,ge.UPDATE,ge.DELETE],(y={})[ge.CREATE]=0,y[ge.UPDATE]=0,y[ge.DELETE]=0,d=y,p=function(c){var l=g.buildSubscription(e,s,c,u,n,r,f[d[c]]),h=l.opType,v=l.opName,y=l.query,b=l.isOwner,m=l.ownerField,w=l.ownerValue,_=l.authMode,S={};if(b){if(!w)return void t.error("Owner field required, sign in is needed in order to perform this operation");S[m]=w}Lt.debug("Attempting "+c+" subscription with authMode: "+f[d[c]]);var E,O=gt.ZP.graphql(Tt({query:y,variables:S},{authMode:_}));a[s.name][h].push(O.map((function(e){return e.value})).subscribe({next:function(e){var t=e.data,n=e.errors;if(Array.isArray(n)&&n.length>0){var r=n.map((function(e){return e.message}));return Lt.warn("Skipping incoming subscription. Messages: "+r.join("\n")),void g.drainBuffer()}var o=we.OY.getPredicates(g.syncPredicates.get(s),!1),i=t[v];g.passesPredicateValidation(i,o)&&g.pushToBuffer(h,s,i),g.drainBuffer()},error:function(e){var n=e.error,r=Ct((void 0===n?{errors:[]}:n).errors,1)[0],o=(void 0===r?{}:r).message,i=void 0===o?"":o;if(i.includes(De.un.REALTIME_SUBSCRIPTION_INIT_ERROR)||i.includes(De.un.CONNECTION_FAILED))return a[s.name][h].forEac
1h((function(e){return e.unsubscribe()})),a[s.name][h]=[],d[c]++,d[c]>=f.length?(Lt.debug(c+" subscription failed with authMode: "+f[d[c]-1]),void Lt.warn("subscriptionError",i)):(Lt.debug(c+" subscription failed with authMode: "+f[d[c]-1]+". Retrying with authMode: "+f[d[c]]),void p(c));Lt.warn("subscriptionError",i),"function"===typeof E&&E(),i.includes('"errorType":"Unauthorized"')||i.includes('"errorType":"OperationDisabled"')||t.error(i)}})),o.push(It(g,void 0,void 0,(function(){var e,t=this;return kt(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){E=n,e=t.hubQueryCompletionListener.bind(t,n),i.Xb.listen("api",e)}))];case 1:return n.sent(),i.Xb.remove("api",e),[2]}}))})))},l.forEach((function(e){return p(e)})),[2]}}))}))}))})),Promise.all(o).then((function(){return t.next(ct.CONNECTED)})),[2]}}))})),function(){Object.keys(a).map((function(e){a[e][ge.CREATE].forEach((function(e){return e.unsubscribe()})),a[e][ge.UPDATE].forEach((function(e){return e.unsubscribe()})),a[e][ge.DELETE].forEach((function(e){return e.unsubscribe()}))}))}}));return[t,new ae.Z((function(t){return e.dataObserver=t,e.drainBuffer(),function(){e.dataObserver=null}}))]},e.prototype.passesPredicateValidation=function(e,t){if(!t)return!0;var n=t.predicates,r=t.type;return(0,Pe.u8)(e,r,n)},e.prototype.pushToBuffer=function(e,t,n){this.buffer.push([e,t,n])},e.prototype.drainBuffer=function(){var e=this;this.dataObserver&&(this.buffer.forEach((function(t){return e.dataObserver.next(t)})),this.buffer=[])},e}(),Dt=function(){return Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Dt.apply(this,arguments)},Nt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Ut=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ht=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},qt=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.")},Bt={items:[],nextToken:null,startedAt:null},zt=new r.k("DataStore"),Ft=function(){function e(e,t,n,r,o,i){void 0===t&&(t=1e4),void 0===n&&(n=1e3),void 0===o&&(o={}),this.schema=e,this.maxRecordsToSync=t,this.syncPageSize=n,this.syncPredicates=r,this.amplifyConfig=o,this.authModeStrategy=i,this.typeQuery=new WeakMap,this.generateQueries()}return e.prototype.generateQueries=function(){var e=this;
1Object.values(this.schema.namespaces).forEach((function(t){Object.values(t.models).filter((function(e){return e.syncable})).forEach((function(n){var r=Ht(tt(t,n,"LIST"),1),o=Ht(r[0]).slice(1);e.typeQuery.set(n,o)}))}))},e.prototype.graphqlFilterFromPredicate=function(e){if(!this.syncPredicates)return null;var t=we.OY.getPredicates(this.syncPredicates.get(e),!1);return t?ot(t):null},e.prototype.retrievePage=function(e,t,n,r,o){return void 0===r&&(r=null),Nt(this,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p,h,v,y,g,b=this;return Ut(this,(function(m){switch(m.label){case 0:return i=Ht(this.typeQuery.get(e),2),a=i[0],u=i[1],s={limit:r,nextToken:n,lastSync:t,filter:o},[4,at({authModeStrategy:this.authModeStrategy,defaultAuthMode:this.amplifyConfig.aws_appsync_authenticationType,modelName:e.name,schema:this.schema})];case 1:return c=m.sent(),f=c.READ,l=0,d=function(){return Nt(b,void 0,void 0,(function(){var t,n,r,o;return Ut(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),zt.debug("Attempting sync with authMode: "+f[l]),[4,this.jitteredRetry({query:u,variables:s,opName:a,modelDefinition:e,authMode:f[l]})];case 1:return t=i.sent(),zt.debug("Sync successful with authMode: "+f[l]),[2,t];case 2:if(n=i.sent(),++l>=f.length){if(r=f[l-1],zt.debug("Sync failed with authMode: "+r,n),st(n)||ut(n))return zt.warn("User is unauthorized to query "+a+" with auth mode "+r+". No data could be returned."),[2,{data:(o={},o[a]=Bt,o)}];throw n}return zt.debug("Sync failed with authMode: "+f[l-1]+". Retrying with authMode: "+f[l]),[4,d()];case 3:return[2,i.sent()];case 4:return[2]}}
1))}))},[4,d()];case 2:return p=m.sent().data,h=p[a],v=h.items,y=h.nextToken,g=h.startedAt,[2,{nextToken:y,startedAt:g,items:v}]}}))}))},e.prototype.partialDataFeatureFlagEnabled=function(){try{var e=sessionStorage.getItem("datastorePartialData");return Boolean(e)}catch(t){return!1}},e.prototype.jitteredRetry=function(e){var t=e.query,n=e.variables,r=e.opName,o=e.modelDefinition,a=e.authMode;return Nt(this,void 0,void 0,(function(){var e=this;return Ut(this,(function(u){switch(u.label){case 0:return[4,(0,bt.Xm)((function(t,n){return Nt(e,void 0,void 0,(function(){var e,u,s,c;return Ut(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,gt.ZP.graphql({query:t,variables:n,authMode:a})];case 1:return[2,f.sent()];case 2:if(e=f.sent(),u=st(e)||ut(e))throw new bt.V2(u);if(s=Boolean(e&&e.data&&e.data[r]&&e.data[r].items),this.partialDataFeatureFlagEnabled()){if(s)return(c=e).data[r].items=c.data[r].items.filter((function(e){return null!==e})),e.errors&&i.Xb.dispatch("datastore",{event:"syncQueriesPartialSyncError",data:{errors:e.errors,modelName:o.name}}),[2,c];throw e}if(e&&e.errors&&e.errors.some((function(e){return"Unauthorized"===e.errorType})))return c=e,s?c.data[r].items=c.data[r].items.filter((function(e){return null!==e})):c.data[r]=Dt(Dt({},Bt),c.data[r]),zt.warn("queryError","User is unauthorized to query "+r+", some items could not be returned."),[2,c];throw e;case 3:return[2]}}
1))}))}),[t,n])];case 1:return[2,u.sent()]}}))}))},e.prototype.start=function(e){var t=this,n=!0,r=void 0!==this.maxRecordsToSync?this.maxRecordsToSync:1e4,o=void 0!==this.syncPageSize?this.syncPageSize:1e3,i=new Map,a=new ae.Z((function(a){var u=Object.values(t.schema.namespaces).reduce((function(t,n){var r,o;try{for(var i=qt(Array.from(n.modelTopologicalOrdering.keys())),a=i.next();!a.done;a=i.next()){var u=a.value,s=e.get(n.models[u]);t.set(n.models[u],s)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return t}),new Map),s=Array.from(u.entries()).filter((function(e){return Ht(e,1)[0].syncable})).map((function(e){var u=Ht(e,2),s=u[0],c=Ht(u[1],2),f=c[0],l=c[1];return Nt(t,void 0,void 0,(function(){var e,t,u,c,d,p,h,v,y,g=this;return Ut(this,(function(b){switch(b.label){case 0:return e=!1,t=null,u=null,c=null,d=0,p=this.graphqlFilterFromPredicate(s),h=this.schema.namespaces[f].modelTopologicalOrdering.get(s.name),v=h.map((function(e){return i.get(f+"_"+e)})),y=new Promise((function(i){return Nt(g,void 0,void 0,(function(){var h,y;return Ut(this,(function(g){switch(g.label){case 0:return[4,Promise.all(v)];case 1:g.sent(),g.label=2;case 2:return n?(h=Math.min(r-d,o),[4,this.retrievePage(s,l,t,h,p)]):[2];case 3:y=g.sent(),c=y.items,t=y.nextToken,u=y.startedAt,d+=c.length,e=null===t||d>=r,a.next({namespace:f,modelDefinition:s,items:c,done:e,startedAt:u,isFullSync:!l}),g.label=4;case 4:if(!e)return[3,2];g.label=5;case 5:return i(),[2]}}))}))})),i.set(f+"_"+s.name,y),[4,y];case 1:return b.sent(),[2]}}))}))}));return Promise.all(s).then((function(){a.complete()})),function(){n=!1}}));return a},e}(),Gt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Kt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Wt=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Vt=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.")},Zt=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Wt(arguments[t]));return e},$t=(0,o.lC)().isNode,Yt=new r.k("DataStore"),Xt=Symbol("sync");!function(e){e.SYNC_ENGINE_STORAGE_SUBSCRIBED="storageSubscribed",e.SYNC_ENGINE_SUBSCRIPTIONS_ESTABLISHED="subscriptionsEstablished",e.SYNC_ENGINE_SYNC_QUERIES_STARTED="syncQueriesStarted",e.SYNC_ENGINE_SYNC_QUERIES_READY="syncQueriesReady",e.SYNC_ENGINE_MODEL_SYNCED="modelSynced",e.SYNC_ENGINE_OUTBOX_MUTATION_ENQUEUED="outboxMutationEnqueued",e.SYNC_ENGINE_OUTBOX_MUTATION_PROCESSED="outboxMutationProcessed",e.SYNC_ENGINE_OUTBOX_STATUS="outboxStatus",e.SYNC_ENGINE_NETWORK_STATUS="networkStatus",e.SYNC_ENGINE_READY="ready"}(Rt||(Rt={}));var Jt=function(){function e(e,t,n,r,o,i,a,u,s,c,f,l,d){void 0===l&&(l={}),this.schema=e,this.namespaceResolver=t,this.modelClasses=n,this.userModelClasses=r,this.storage=o,this.modelInstanceCreator=i,this.maxRecordsToSync=a,this.syncPageSize=u,this.syncPredicates=f,this.amplifyConfig=l,this.authModeStrategy=d,this.online=!1;var p=this.modelClasses.MutationEvent;this.outbox=new yt(this.schema,p,i,Xt),this.modelMerger=new We(this.outbox,Xt),this.syncQueriesProcessor=new Ft(this.schema,this.maxRecordsToSync,this.syncPageSize,this.syncPredicates,this.amplifyConfig,this.authModeStrategy),this.subscriptionsProcessor=new Mt(this.schema,this.syncPredicates,this.amplifyConfig,this.authModeStrategy),this.mutationsProcessor=new xt(this.schema,this.storage,this.userModelClasses,this.outbox,this.modelInstanceCreator,p,this.amplifyConfig,this.authModeStrategy,s,c),this.datastoreConnectivity=new qe}return e.prototype.start=function(e){var t=this;return new ae.Z((function(n){Yt.log("starting sync engine...");var r=[];return Gt(t,void 0,void 0,(function(){var t,o,i,a=this;return Kt(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,this.setupModels(e)];case 1:return u.sent(),[3,3];case 2:return t=u.sent(),n.error(t),[2];case 3:return o=new Promise((function(e){a.datastoreConnectivity.status().subscribe((function(t){var o=t.online;return Gt(a,void 0,void 0,(function(){var t,i,a,u,s,c=this;return Kt(this,(function(f){switch(f.label){case 0:return!o||this.online?[3,10]:(this.online=o,n.next({type:Rt.SYNC_ENGINE_NETWORK_STATUS,data:{active:this.online}}
1),i=void 0,$t?(Yt.warn("Realtime disabled when in a server-side environment"),[3,6]):[3,1]);case 1:s=Wt(this.subscriptionsProcessor.start(),2),t=s[0],i=s[1],f.label=2;case 2:return f.trys.push([2,4,,5]),[4,new Promise((function(e,n){var o=t.subscribe({next:function(t){t===ct.CONNECTED&&e()},error:function(e){n(e),c.disconnectionHandler()(e)}});r.push(o)}))];case 3:return f.sent(),[3,5];case 4:return a=f.sent(),n.error(a),[2];case 5:Yt.log("Realtime ready"),n.next({type:Rt.SYNC_ENGINE_SUBSCRIPTIONS_ESTABLISHED}),f.label=6;case 6:return f.trys.push([6,8,,9]),[4,new Promise((function(e,t){var o=c.syncQueriesObservable().subscribe({next:function(t){t.type===Rt.SYNC_ENGINE_SYNC_QUERIES_READY&&e(),n.next(t)},complete:function(){e()},error:function(e){t(e)}});o&&r.push(o)}))];case 7:return f.sent(),[3,9];case 8:return u=f.sent(),n.error(u),[2];case 9:return r.push(this.mutationsProcessor.start().subscribe((function(e){var t=e.modelDefinition,r=e.model,o=e.hasMore,i=c.userModelClasses[t.name],a=c.modelInstanceCreator(i,r);c.storage.runExclusive((function(e){return c.modelMerger.merge(e,a)})),n.next({type:Rt.SYNC_ENGINE_OUTBOX_MUTATION_PROCESSED,data:{model:i,element:a}}),n.next({type:Rt.SYNC_ENGINE_OUTBOX_STATUS,data:{isEmpty:!o}})}))),$t||r.push(i.subscribe((function(e){var t=Wt(e,3),n=(t[0],t[1]),r=t[2],o=c.userModelClasses[n.name],i=c.modelInstanceCreator(o,r);c.storage.runExclusive((function(e){return c.modelMerger.merge(e,i)}))}))),[3,11];case 10:o||(this.online=o,n.next({type:Rt.SYNC_ENGINE_NETWORK_STATUS,data:{active:this.online}}),r.forEach((function(e){return e.unsubscribe()})),r=[]),f.label=11;case 11:return e(),[2]}}))}))}))})),this.storage.observe(null,null,Xt).filter((function(e){var t=e.model;return!0===a.getModelDefinition(t).syncable})).subscribe({next:function(e){var t=e.opType,r=e.model,i=e.element,u=e.condition;return Gt(a,void 0,void 0,(function(){var e,a,s,c;return Kt(this,(function(f){switch(f.label){case 0:return e=this.schema.namespaces[this.namespaceResolver(r)],a=this.modelClasses.MutationEvent,s=rt(u),c=nt(e.relationships,this.getModelDefinition(r),t,r,i,s,a,this.modelInstanceCreator),[4,this.outbox.enqueue(this.storage,c)];case 1:return f.sent(),n.next({type:Rt.SYNC_ENGINE_OUTBOX_MUTATION_ENQUEUED,data:{model:r,element:i}}),n.next({type:Rt.SYNC_ENGINE_OUTBOX_STATUS,data:{isEmpty:!1}}),[4,o];case 2:return f.sent(),this.online&&this.mutationsProcessor.resume(),[2]}}))}))}}),n.next({type:Rt.SYNC_ENGINE_STORAGE_SUBSCRIBED}),[4,this.outbox.peek(this.storage)];case 4:return i=void 0===u.sent(),n.next({type:Rt.SYNC_ENGINE_OUTBOX_STATUS,data:{isEmpty:i}}),[4,o];case 5:return u.sent(),n.next({type:Rt.SYNC_ENGINE_READY}),[2]}}))})),function(){r.forEach((function(e){return e.unsubscribe()}))}}))},e.prototype.getModelsMetadataWithNextFullSync=function(e){return Gt(this,void 0,void 0,(function(){var t,n=this;return Kt(this,(function(r){switch(r.label){case 0:return t=Map.bind,[4,this.getModelsMetadata()];case 1:return[2,new(t.apply(Map,[void 0,r.sent().map((function(t){var r=t.namespace,o=t.model,i=t.lastSync,a=t.lastFullSync,u=t.fullSyncInterval,s=(t.lastSyncPredicate,!a||a+u<e?0:i);return[n.schema.namespaces[r].models[o],[r,s]]}))]))]}}))}))},e.prototype.syncQueriesObservable=function(){var e=this;return this.online?new ae.Z((function(t){var n,r;return Gt(e,void 0,void 0,(function(){var e,o,i=this;return Kt(this,(function(a){switch(a.label){case 0:e=function(){var e,a,u,s,c,f,l,d,p;return Kt(this,(function(h){switch(h.label){case 0:return e=new WeakMap,[4,o.getModelsMetadataWithNextFullSync(Date.now())];case 1:return a=h.sent(),u=new Set(a.keys()),[4,new Promise((function(r){n=i.syncQueriesProcessor.start(a).subscribe({next:function(o){var a=o.namespace,p=o.modelDefinition,h=o.items,v=o.done,y=o.startedAt,g=o.isFullSync;return Gt(i,void 0,void 0,(function(){var o,i,b,m,w,_,S=this;return Kt(this,(function(E){switch(E.label){case 0:return o=this.userModelClasses[p.name],e.has(o)||(e.set(o,{new:0,updated:0,deleted:0}),f=(0,Pe.Iz)(),d=void 0===d?y:Math.max(d,y)),[4,this.storage.runExclusive((function(t){return Gt(S,void 0,void 0,(function(){var n,r,i,a,u,s,c,f,l,d,p,v,y,g,b;return Kt(this,(function(m){switch(m.label){case 0:return[4,this.outbox.getModelIds(t)];case 1:n=m.sent(),r=[],i=h.filter((function(e){return!n.has(e.id)||(r.push(e),!1)})),a=[],m.label=2;case 2:m.trys.push([2,7,8,9]),u=Vt(r),s=u.next(),m.label=3;case 3:return s.done?[3,6]:(c=s.value,[4,this.modelMerger.merge(t,c)]);case 4:void 0!==(f=m.sent())&&a.push([c,f]),m.label=5;case 5:return s=u.next(),[3,3];case 6:return[3,9];case 7:return l=m.sent(),g={error:l},[3,9];case 8:try{s&&!s.done&&(b=u.return)&&b.call(u)}finally{if(g)throw g.error}
1return[7];case 9:return p=(d=a.push).apply,v=[a],[4,this.modelMerger.mergePage(t,o,i)];case 10:return p.apply(d,v.concat([Zt.apply(void 0,[m.sent()])])),y=e.get(o),a.forEach((function(e){var t=Wt(e,2)[1];switch(t){case ce.HP.INSERT:y.new++;break;case ce.HP.UPDATE:y.updated++;break;case ce.HP.DELETE:y.deleted++;break;default:(0,Pe.y0)(t)}})),[2]}}))}))}))];case 1:return E.sent(),v?(i=p.name,[4,this.getModelMetadata(a,i)]):[3,4];case 2:return b=E.sent(),m=b.lastFullSync,w=b.fullSyncInterval,c=w,s=void 0===s?m:Math.max(s,g?y:m),b=this.modelClasses.ModelMetadata.copyOf(b,(function(e){e.lastSync=y,e.lastFullSync=g?y:b.lastFullSync})),[4,this.storage.save(b,void 0,Xt)];case 3:E.sent(),_=e.get(o),t.next({type:Rt.SYNC_ENGINE_MODEL_SYNCED,data:{model:o,isFullSync:g,isDeltaSync:!g,counts:_}}),u.delete(p),0===u.size&&(l=(0,Pe.Iz)()-f,r(),t.next({type:Rt.SYNC_ENGINE_SYNC_QUERIES_READY}),n.unsubscribe()),E.label=4;case 4:return[2]}}))}))},error:function(e){t.error(e)}}),t.next({type:Rt.SYNC_ENGINE_SYNC_QUERIES_STARTED,data:{models:Array.from(u).map((function(e){return e.name}))}})}))];case 2:return h.sent(),p=s+c-(d+l),Yt.debug("Next fullSync in "+p/1e3+" seconds. ("+new Date(Date.now()+p)+")"),[4,new Promise((function(e){r=setTimeout(e,p)}))];case 3:return h.sent(),[2]}}))},o=this,a.label=1;case 1:return t.closed?[3,3]:[5,e()];case 2:return a.sent(),[3,1];case 3:return[2]}}
1))})),function(){n&&n.unsubscribe(),r&&clearTimeout(r)}})):ae.Z.of()},e.prototype.disconnectionHandler=function(){var e=this;return function(t){De.un.CONNECTION_CLOSED!==t&&De.un.TIMEOUT_DISCONNECT!==t||e.datastoreConnectivity.socketDisconnected()}},e.prototype.unsubscribeConnectivity=function(){this.datastoreConnectivity.unsubscribe()},e.prototype.setupModels=function(e){return Gt(this,void 0,void 0,(function(){var t,n,r,o,i,a,u,s,c,f,l,d,p,h=this;return Kt(this,(function(v){switch(v.label){case 0:t=e.fullSyncInterval,n=this.modelClasses.ModelMetadata,r=[],Object.values(this.schema.namespaces).forEach((function(e){Object.values(e.models).filter((function(e){return e.syncable})).forEach((function(t){r.push([e.name,t])}))})),i=r.map((function(e){var r=Wt(e,2),i=r[0],a=r[1];return Gt(h,void 0,void 0,(function(){var e,r,u,s,c,f,l,d,p;return Kt(this,(function(h){switch(h.label){case 0:return[4,this.getModelMetadata(i,a.name)];case 1:return e=h.sent(),r=we.OY.getPredicates(this.syncPredicates.get(a),!1),u=r?JSON.stringify(r):null,void 0!==e?[3,3]:[4,this.storage.save(this.modelInstanceCreator(n,{model:a.name,namespace:i,lastSync:null,fullSyncInterval:t,lastFullSync:null,lastSyncPredicate:u}),void 0,Xt)];case 2:return f=Wt.apply(void 0,[h.sent(),1]),l=Wt(f[0],1),o=l[0],[3,5];case 3:return s=e.lastSyncPredicate?e.lastSyncPredicate:null,c=s!==u,[4,this.storage.save(this.modelClasses.ModelMetadata.copyOf(e,(function(e){e.fullSyncInterval=t,c&&(e.lastSync=null,e.lastFullSync=null,e.lastSyncPredicate=u)})))];case 4:d=Wt.apply(void 0,[h.sent(),1]),p=Wt(d[0],1),o=p[0],h.label=5;case 5:return[2,o]}}))}))})),a={},v.label=1;case 1:return v.trys.push([1,6,7,8]),[4,Promise.all(i)];case 2:u=Vt.apply(void 0,[v.sent()]),s=u.next(),v.label=3;case 3:if(s.done)return[3,5];c=s.value,f=c.model,a[f]=c,v.label=4;case 4:return s=u.next(),[3,3];case 5:return[3,8];case 6:return l=v.sent(),d={error:l},[3,8];case 7:try{s&&!s.done&&(p=u.return)&&p.call(u)}finally{if(d)throw d.error}return[7];case 8:return[2,a]}}))}))},e.prototype.getModelsMetadata=function(){return Gt(this,void 0,void 0,(function(){var e;return Kt(this,(function(t){switch(t.label){case 0:return e=this.modelClasses.ModelMetadata,[4,this.storage.query(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.getModelMetadata=function(e,t){return Gt(this,void 0,void 0,(function(){var n,r,o;return Kt(this,(function(i){switch(i.label){case 0:return n=this.modelClasses.ModelMetadata,r=we.OY.createFromExisting(this.schema.namespaces[Pe.J3].models[n.name],(function(n){return n.namespace("eq",e).model("eq",t)})),[4,this.storage.query(n,r,{page:0,limit:1})];case 1:return o=Wt.apply(void 0,[i.sent(),1]),[2,o[0]]}}))}))},e.prototype.getModelDefinition=function(e){var t=this.namespaceResolver(e);return this.schema.namespaces[t].models[e.name]},e.getNamespace=function(){return{name:Pe.J3,relationships:{},enums:{OperationType:{name:"OperationType",values:["CREATE","UPDATE","DELETE"]}},nonModels:{},models:{MutationEvent:{name:"MutationEvent",pluralName:"MutationEvents",syncable:!1,fields:{id:{name:"id",type:"ID",isRequired:!0,isArray:!1},model:{name:"model",type:"String",isRequired:!0,isArray:!1},data:{name:"data",type:"String",isRequired:!0,isArray:!1},modelId:{name:"modelId",type:"String",isRequired:!0,isArray:!1},operation:{name:"operation",type:{enum:"Operationtype"},isArray:!1,isRequired:!0},condition:{name:"condition",type:"String",isArray:!1,isRequired:!0}}},ModelMetadata:{name:"ModelMetadata",pluralName:"ModelsMetadata",syncable:!1,fields:{id:{name:"id",type:"ID",isRequired:!0,isArray:!1},namespace:{name:"namespace",type:"String",isRequired:!0,isArray:!1},model:{name:"model",type:"String",isRequired:!0,isArray:!1},lastSync:{name:"lastSync",type:"Int",isRequired:!1,isArray:!1},lastFullSync:{name:"lastFullSync",type:"Int",isRequired:!1,isArray:!1},fullSyncInterval:{name:"fullSyncInterval",type:"Int",isRequired:!0,isArray:!1}}}}}},e}(),Qt=function(){return Qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Qt.apply(this,arguments)}
1,en=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},tn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},nn=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},rn=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};ie(!0),z();var on,an,un,sn,cn,fn=new r.k("DataStore"),ln=((0,Pe.c6)(Date.now()),o.JS.browserOrNode().isNode),dn="schemaVersion",pn=new WeakMap,hn=new WeakMap,vn=function(e){var t=pn.get(e);return on.namespaces[t].models[e.name]},yn=function(e){return(0,Pe.hK)(e)&&pn.has(e)},gn=function(e){return pn.get(e)},bn=new WeakSet;function mn(e,t){return bn.add(t),new e(t)}var wn;function _n(e){return"string"===typeof e}function Sn(e){var t=e.localModel,n=e.modelConstructor,r=e.remoteModel._version;return mn(n,Qt(Qt({},t),{_version:r}))}function En(e){fn.warn(e)}function On(e,t){var n;switch(e){case Pe.cG:n=sn[t];break;case Pe.xR:n=un[t];break;case Pe.J3:n=an[t];break;case Pe.P_:n=cn[t];break;default:(0,Pe.y0)(e)}if(yn(n))return n;var r="Model name is not valid for namespace. modelName: "+t+", namespace: "+e;throw fn.error(r),new Error(r)}function xn(e,t){return en(this,void 0,void 0,(function(){var n,r,o=this;return tn(this,(function(i){switch(i.label){case 0:return n=sn.Setting,r=on.namespaces[Pe.cG].models.Setting,[4,e.runExclusive((function(e){return en(o,void 0,void 0,(function(){var o,i;return tn(this,(function(a){switch(a.label){case 0:return[4,e.query(n,we.OY.createFromExisting(r,(function(e){return e.key("eq",dn)})),{page:0,limit:1})];case 1:return o=rn.apply(void 0,[a.sent(),1]),void 0===(i=o[0])||void 0===i.value?[3,4]:JSON.parse(i.value)===t?[3,3]:[4,e.clear(!1)];case 2:a.sent(),a.label=3;case 3:return[3,6];case 4:return[4,e.save(mn(n,{key:dn,value:JSON.stringify(t)}))];case 5:a.sent(),a.label=6;case 6:return[2]}}
1))}))}))];case 1:return i.sent(),[2]}}))}))}var Pn=function(){function e(){var e=this;this.amplifyConfig={},this.syncPredicates=new WeakMap,this.start=function(){return en(e,void 0,void 0,(function(){var e,t,n,r=this;return tn(this,(function(o){switch(o.label){case 0:return void 0!==this.initialized?[3,1]:(fn.debug("Starting DataStore"),this.initialized=new Promise((function(e,t){r.initResolve=e,r.initReject=t})),[3,3]);case 1:return[4,this.initialized];case 2:return o.sent(),[2];case 3:return this.storage=new Me(on,gn,On,mn,void 0,this.sessionId),[4,this.storage.init()];case 4:return o.sent(),[4,xn(this.storage,on.version)];case 5:return o.sent(),(e=this.amplifyConfig.aws_appsync_graphqlEndpoint)?(fn.debug("GraphQL endpoint available",e),t=this,[4,this.processSyncExpressions()]):[3,7];case 6:return t.syncPredicates=o.sent(),this.sync=new Jt(on,gn,an,un,this.storage,mn,this.maxRecordsToSync,this.syncPageSize,this.conflictHandler,this.errorHandler,this.syncPredicates,this.amplifyConfig,this.authModeStrategy),n=1e3*this.fullSyncInterval*60,wn=this.sync.start({fullSyncInterval:n}).subscribe({next:function(e){var t=e.type,n=e.data;t===(ln?Rt.SYNC_ENGINE_SYNC_QUERIES_READY:Rt.SYNC_ENGINE_STORAGE_SUBSCRIBED)&&r.initResolve(),i.Xb.dispatch("datastore",{event:t,data:n})},error:function(e){fn.warn("Sync error",e),r.initReject()}}),[3,8];case 7:fn.warn("Data won't be synchronized. No GraphQL endpoint configured. Did you forget `Amplify.configure(awsconfig)`?",{config:this.amplifyConfig}),this.initResolve(),o.label=8;case 8:return[4,this.initialized];case 9:return o.sent(),[2]}}))}))},this.query=function(t,n,r){return en(e,void 0,void 0,(function(){var e,o,i,a,u;return tn(this,(function(s){switch(s.label){case 0:return[4,this.start()];case 1:if(s.sent(),!yn(t))throw e="Constructor is not for a valid model",fn.error(e,{modelConstructor:t}),new Error(e);return"string"===typeof n&&void 0!==r&&fn.warn("Pagination is ignored when querying by id"),o=vn(t),i=_n(n)?we.OY.createForId(o,n):(0,we.i)(n)?void 0:we.OY.createFromExisting(o,n),a=this.processPagination(o,r),fn.debug("params ready",{modelConstructor:t,predicate:we.OY.getPredicates(i,!1),pagination:Qt(Qt({},a),{sort:_e.c.getPredicates(a&&a.sort,!1)})}),[4,this.storage.query(t,i,a)];case 2:return u=s.sent(),[2,_n(n)?u[0]:u]}}))}))},this.save=function(t,n){return en(e,void 0,void 0,(function(){var e,r,o,i,a,u,s=this;return tn(this,(function(c){switch(c.label){case 0:return[4,this.start()];case 1:if(c.sent(),e=hn.get(t),r=t?t.constructor:void 0,!yn(r))throw o="Object is not an instance of a valid model",fn.error(o,{model:t}),new Error(o);return i=vn(r),a=we.OY.createFromExisting(i,n),[4,this.storage.runExclusive((function(n){return en(s,void 0,void 0,(function(){return tn(this,(function(o){switch(o.label){case 0:return[4,n.save(t,a,void 0,e)];case 1:return o.sent(),[2,n.query(r,we.OY.createForId(i,t.id))]}}))}))}))];case 2:return u=rn.apply(void 0,[c.sent(),1]),[2,u[0]]}}))}))},this.setConflictHandler=function(t){var n=t.DataStore;return n?n.conflictHandler:e.conflictHandler===Sn&&t.conflictHandler?t.conflictHandler:e.conflictHandler||Sn},this.setErrorHandler=function(t){var n=t.DataStore;return n?n.errorHandler:e.errorHandler===En&&t.errorHandler?t.errorHandler:e.errorHandler||En},this.delete=function(t,n){return en(e,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return tn(this,(function(l){switch(l.label){case 0:return[4,this.start()];case 1:if(l.sent(),!t)throw s="Model or Model Constructor required",fn.error(s,{modelOrConstructor:t}),new Error(s);if(!yn(t))return[3,3];if(i=t,!n)throw s="Id to delete or criteria required. Do you want to delete all? Pass Predicates.ALL",fn.error(s,{idOrCriteria:n}),new Error(s);if("string"===typeof n)e=we.OY.createForId(vn(i),n);else if(!(e=we.OY.createFromExisting(vn(i),n))||!we.OY.isValidPredicate(e))throw s="Criteria required. Do you want to delete all? Pass Predicates.ALL",fn.error(s,{condition:e}),new Error(s);return[4,this.storage.delete(i,e)];case 2:return r=rn.apply(void 0,[l.sent(),1]),[2,r[0]];case 3:if(o=t,i=Object.getPrototypeOf(o||{}).constructor,!yn(i))throw s="Object is not an instance of a valid model",fn.error(s,{model:o}),new Error(s);if(a=vn(i),u=we.OY.createForId(a,o.id),n){if("function"!==typeof n)throw s="Invalid criteria",fn.error(s,{idOrCriteria:n}),new Error(s);e=n(u)}else e=u;return[4,this.storage.delete(o,e)];case 4:return c=rn.apply(void 0,[l.sent(),1]),f=rn(c[0],1),[2,f[0]]}}))}))},this.observe=function(t,n){var r,o=t&&yn(t)?t:void 0;if(t&&void 0===o){var i=t,a=i&&Object.getPrototypeOf(i).constructor;if(yn(a))return n&&fn.warn("idOrCriteria is ignored when using a model instance",{model:i,idOrCriteria:n}),e.observe(a,i.id);var u="The model is not an instance of a PersistentModelConstructor";throw fn.error(u,{model:i}),new Error(u)}if(void 0!==n&&void 0===o){u="Cannot provide criteria without a modelConstructor";throw fn.error(u,n),new Error(u)}if(o&&!yn(o)){u="Constructor is not for a valid model";throw fn.error(u,{modelConstructor:o}),new Error(u)}return r="string"===typeof n?we.OY.createForId(vn(o),n):o&&we.OY.createFromExisting(vn(o),n),new ae.Z((function(t){var n;return en(e,void 0,void 0,(function(){return tn(this,(function(e){switch(e.label){case 0:return[4,this.start()];case 1:return e.sent(),n=this.storage.observe(o,r).filter((function(e){var t=e.model;return gn(t)===Pe.xR})).subscribe(t),[2]}}))})),function(){n&&n.unsubscribe()}}))},this.configure=function(t){void 0===t&&(t={});var n=t.DataStore,r=t.authModeStrategyType,o=(t.conflictHandler,t.errorHandler,t.maxRecordsToSync),i=t.syncPageSize,a=t.fullSyncInterval,u=t.syncExpressions,s=nn(t,["DataStore","authModeStrategyType","conflictHandler","errorHandler","maxRecordsToSync","syncPageSize","fullSyncInterval","syncExpressions"]);
1switch(e.amplifyConfig=Qt(Qt({},s),e.amplifyConfig),e.conflictHandler=e.setConflictHandler(t),e.errorHandler=e.setErrorHandler(t),n&&n.authModeStrategyType||r||ce.sE.DEFAULT){case ce.sE.MULTI_AUTH:e.authModeStrategy=be;break;case ce.sE.DEFAULT:default:e.authModeStrategy=me}e.syncExpressions=n&&n.syncExpressions||e.syncExpressions||u,e.maxRecordsToSync=n&&n.maxRecordsToSync||e.maxRecordsToSync||o,e.syncPageSize=n&&n.syncPageSize||e.syncPageSize||i,e.fullSyncInterval=n&&n.fullSyncInterval||e.fullSyncInterval||a||1440,e.sessionId=e.retrieveSessionId()},this.clear=function(){return en(this,void 0,void 0,(function(){return tn(this,(function(e){switch(e.label){case 0:return void 0===this.storage?[2]:(wn&&!wn.closed&&wn.unsubscribe(),[4,this.storage.clear()]);case 1:return e.sent(),this.sync&&this.sync.unsubscribeConnectivity(),this.initialized=void 0,this.storage=void 0,this.sync=void 0,this.syncPredicates=new WeakMap,[2]}}))}))},this.stop=function(){return en(this,void 0,void 0,(function(){return tn(this,(function(e){switch(e.label){case 0:return void 0===this.initialized?[3,2]:[4,this.start()];case 1:e.sent(),e.label=2;case 2:return wn&&!wn.closed&&wn.unsubscribe(),this.sync&&this.sync.unsubscribeConnectivity(),this.initialized=void 0,this.sync=void 0,[2]}}))}))}}return e.prototype.getModuleName=function(){return"DataStore"},e.prototype.processPagination=function(e,t){var n,r=t||{},o=r.limit,i=r.page,a=r.sort;if(void 0!==o||void 0!==i||void 0!==a){if(void 0!==i&&void 0===o)throw new Error("Limit is required when requesting a page");if(void 0!==i){if("number"!==typeof i)throw new Error("Page should be a number");if(i<0)throw new Error("Page can't be negative")}if(void 0!==o){if("number"!==typeof o)throw new Error("Limit should be a number");if(o<0)throw new Error("Limit can't be negative")}return a&&(n=_e.c.createFromExisting(e,t.sort)),{limit:o,page:i,sort:n}}},e.prototype.processSyncExpressions=function(){return en(this,void 0,void 0,(function(){var e,t=this;return tn(this,(function(n){switch(n.label){case 0:return this.syncExpressions&&this.syncExpressions.length?[4,Promise.all(this.syncExpressions.map((function(e){return en(t,void 0,void 0,(function(){var t,n,r,o,i,a;return tn(this,(function(u){switch(u.label){case 0:return[4,e];case 1:return t=u.sent(),n=t.modelConstructor,r=t.conditionProducer,o=vn(n),[4,this.unwrapPromise(r)];case 2:return i=u.sent(),(0,we.i)(i)?[2,[o,null]]:(a=this.createFromCondition(o,i),[2,[o,a]])}}))}))})))]:[2,new WeakMap];case 1:return e=n.sent(),[2,this.weakMapFromEntries(e)]}}))}))},e.prototype.createFromCondition=function(e,t){try{return we.OY.createFromExisting(e,t)}catch(n){throw fn.error("Error creating Sync Predicate"),n}},e.prototype.unwrapPromise=function(e){return en(this,void 0,void 0,(function(){var t;return tn(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:if((t=n.sent())instanceof TypeError)return[2,e];throw t;case 3:return[2]}}
1))}))},e.prototype.weakMapFromEntries=function(e){return e.reduce((function(e,t){var n=rn(t,2),r=n[0],o=n[1];if(e.has(r)){var i=r.name;return fn.warn("You can only utilize one Sync Expression per model.\n Subsequent sync expressions for the "+i+" model will be ignored."),e}return o&&e.set(r,o),e}),new WeakMap)},e.prototype.retrieveSessionId=function(){try{var e=sessionStorage.getItem("datastoreSessionId");if(e){var t=this.amplifyConfig.aws_appsync_graphqlEndpoint.split("/")[2];return e+"-"+rn(t.split("."),1)[0]}}catch(n){return}},e}(),An=new Pn;a.dQ.register(An)},36460:function(e,t,n){"use strict";n.d(t,{OY:function(){return u},gA:function(){return a},i:function(){return i}});var r=n(85256),o=new WeakSet;function i(e){return o.has(e)}Symbol("A predicate that matches all records");var a=function(){function e(){}return Object.defineProperty(e,"ALL",{get:function(){var e=function(e){return e};return o.add(e),e},enumerable:!0,configurable:!0}),e}(),u=function(){function e(){}return e.createPredicateBuilder=function(t){var n,o=t.name,i=new Set(Object.keys(t.fields)),a=new Proxy({},n={get:function(t,a,u){var s=a;switch(s){case"and":case"or":case"not":return function(t){var r={type:s,predicates:[]},o=new Proxy({},n);return e.predicateGroupsMap.set(o,r),t(o),e.predicateGroupsMap.get(u).predicates.push(r),u};default:(0,r.y0)(s,!1)}var c=a;if(!i.has(c))throw new Error("Invalid field for model. field: "+c+", model: "+o);return function(t,n){return e.predicateGroupsMap.get(u).predicates.push({field:c,operator:t,operand:n}),u}}});return e.predicateGroupsMap.set(a,{type:"and",predicates:[]}),a},e.isValidPredicate=function(t){return e.predicateGroupsMap.has(t)},e.getPredicates=function(t,n){if(void 0===n&&(n=!0),n&&!e.isValidPredicate(t))throw new Error("The predicate is not valid");return e.predicateGroupsMap.get(t)},e.createFromExisting=function(t,n){if(n&&t)return n(e.createPredicateBuilder(t))},e.createForId=function(t,n){return e.createPredicateBuilder(t).id("eq",n)},e.predicateGroupsMap=new WeakMap,e}()},3581:function(e,t,n){"use strict";n.d(t,{c:function(){return r}});var r=function(){function e(){}return e.createPredicateBuilder=function(t){var n=t.name,r=new Set(Object.keys(t.fields)),o=new Proxy({},{get:function(t,o,i){var a=o;if(!r.has(a))throw new Error("Invalid field for model. field: "+a+", model: "+n);return function(t){return e.sortPredicateGroupsMap.get(i).push({field:a,sortDirection:t}),i}}});return e.sortPredicateGroupsMap.set(o,[]),o},e.isValidPredicate=function(t){return e.sortPredicateGroupsMap.has(t)},e.getPredicates=function(t,n){if(void 0===n&&(n=!0),n&&!e.isValidPredicate(t))throw new Error("The predicate is not valid");return e.sortPredicateGroupsMap.get(t)},e.createFromExisting=function(t,n){if(n&&t)return n(e.createPredicateBuilder(t))},e.sortPredicateGroupsMap=new WeakMap,e}()},4936:function(e,t,n){"use strict";n.d(t,{l:function(){return x}});var r=n(35069),o=n(79561),i=n(85256),a=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},s=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},c=function(){var e=this;this.db=new Map,this.getAllKeys=function(){return a(e,void 0,void 0,(function(){return u(this,(function(e){return[2,Array.from(this.db.keys())]}))}))},this.multiGet=function(t){return a(e,void 0,void 0,(function(){var e=this;return u(this,(function(n){return[2,t.reduce((function(t,n){return t.push([n,e.db.get(n)]),t}),[])]}))}))},this.multiRemove=function(t,n){return a(e,void 0,void 0,(function(){var e=this;return u(this,(function(r){return t.forEach((function(t){return e.db.delete(t)})),n(),[2]}))}
1))},this.multiSet=function(t,n){return a(e,void 0,void 0,(function(){var e=this;return u(this,(function(r){return t.forEach((function(t){var n=s(t,2),r=n[0],o=n[1];e.setItem(r,o)})),n(),[2]}))}))},this.setItem=function(t,n){return a(e,void 0,void 0,(function(){return u(this,(function(e){return[2,this.db.set(t,n)]}))}))},this.removeItem=function(t){return a(e,void 0,void 0,(function(){return u(this,(function(e){return[2,this.db.delete(t)]}))}))},this.getItem=function(t){return a(e,void 0,void 0,(function(){return u(this,(function(e){return[2,this.db.get(t)]}))}))}};var f=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},l=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},d=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.")},p=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},h="@AmplifyDatastore",v="Data",y=new Map,g=function(){function e(){this._collectionInMemoryIndex=new Map,this.storage=new c}return e.prototype.getCollectionIndex=function(e){return this._collectionInMemoryIndex.has(e)||this._collectionInMemoryIndex.set(e,new Map),this._collectionInMemoryIndex.get(e)},e.prototype.getMonotonicFactory=function(e){return y.has(e)||y.set(e,(0,i.c6)()),y.get(e)},e.prototype.init=function(){return f(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,u,s,c,f,y,g,b,m,w,_,S,E,O;return l(this,(function(l){switch(l.label){case 0:return this._collectionInMemoryIndex.clear(),[4,this.storage.getAllKeys()];case 1:e=l.sent(),t=[],l.label=2;case 2:l.trys.push([2,12,13,14]),n=d(e),r=n.next(),l.label=3;case 3:return r.done?[3,11]:(o=r.value,i=p(o.split("::"),5),a=i[0],u=i[1],s=i[2],c=i[3],f=i[4],a!==h?[3,10]:s!==v?[3,9]:(y=void 0,void 0!==f?[3,7]:(g=c,b=this.getMonotonicFactory(u)(),m=this.getLegacyKeyForItem(u,g),w=this.getKeyForItem(u,g,b),[4,this.storage.getItem(m)])));case 4:return _=l.sent(),[4,this.storage.setItem(w,_)];case 5:return l.sent(),[4,this.storage.removeItem(m)];case 6:return l.sent(),y=b,[3,8];case 7:y=c,l.label=8;case 8:return this.getCollectionIndex(u).set(f,y),[3,10];case 9:"Collection"===s&&t.push(o),l.label=10;case 10:return r=n.next(),[3,3];case 11:return[3,14];case 12:return S=l.sent(),E={error:S},[3,14];case 13:try{r&&!r.done&&(O=n.return)&&O.call(n)}finally{if(E)throw E.error}return[7];case 14:return t.length>0?[4,this.storage.multiRemove(t)]:[3,16];case 15:l.sent(),l.label=16;case 16:return[2]}}
1))}))},e.prototype.save=function(e,t){return f(this,void 0,void 0,(function(){var n,r;return l(this,(function(o){switch(o.label){case 0:return n=this.getCollectionIndex(t).get(e.id)||this.getMonotonicFactory(t)(),r=this.getKeyForItem(t,e.id,n),this.getCollectionIndex(t).set(e.id,n),[4,this.storage.setItem(r,JSON.stringify(e))];case 1:return o.sent(),[2]}}))}))},e.prototype.batchSave=function(e,t){return f(this,void 0,void 0,(function(){var n,r,i,a,u,s,c,f,h,v,y,g,b,m,w,_,S,E,O,x,P,A=this;return l(this,(function(l){switch(l.label){case 0:if(0===t.length)return[2,[]];n=[],r=this.getCollectionIndex(e),i=new Set,a=new Set,u=[],s={};try{for(c=d(t),f=c.next();!f.done;f=c.next())h=f.value,v=h.id,y=h._deleted,g=r.get(v)||this.getMonotonicFactory(e)(),S=this.getKeyForItem(e,v,g),u.push(S),s[S]={ulid:g,model:h},y?i.add(S):a.add(S)}catch(T){E={error:T}}finally{try{f&&!f.done&&(O=c.return)&&O.call(c)}finally{if(E)throw E.error}}return[4,this.storage.multiGet(u)];case 1:return b=l.sent(),m=b.filter((function(e){return!!p(e,2)[1]})).reduce((function(e,t){var n=p(t,1)[0];return e.add(n)}),new Set),[4,new Promise((function(e,t){if(0!==i.size){var n=Array.from(i);n.forEach((function(e){return r.delete(s[e].model.id)})),A.storage.multiRemove(n,(function(n){n&&n.length>0?t(n):e()}))}else e()}))];case 2:return l.sent(),[4,new Promise((function(e,t){if(0!==a.size){var n=Array.from(a).map((function(e){return[e,JSON.stringify(s[e].model)]}));a.forEach((function(e){var t=s[e],n=t.model.id,o=t.ulid;r.set(n,o)})),A.storage.multiSet(n,(function(n){n&&n.length>0?t(n):e()}))}else e()}))];case 3:l.sent();try{for(w=d(u),_=w.next();!_.done;_=w.next())S=_.value,i.has(S)&&m.has(S)?n.push([s[S].model,o.HP.DELETE]):a.has(S)&&n.push([s[S].model,m.has(S)?o.HP.UPDATE:o.HP.INSERT])}catch(I){x={error:I}}finally{try{_&&!_.done&&(P=w.return)&&P.call(w)}finally{if(x)throw x.error}}return[2,n]}}))}))},e.prototype.get=function(e,t){return f(this,void 0,void 0,(function(){var n,r,o;return l(this,(function(i){switch(i.label){case 0:return n=this.getCollectionIndex(t).get(e),r=this.getKeyForItem(t,e,n),[4,this.storage.getItem(r)];case 1:return o=i.sent(),[2,o&&JSON.parse(o)]}}))}))},e.prototype.getOne=function(e,t){return f(this,void 0,void 0,(function(){var n,r,i,a,u,s,c;return l(this,(function(f){switch(f.label){case 0:return n=this.getCollectionIndex(t),r=p(e===o.fI.FIRST?function(){var e,t,r,o,i;try{for(var a=d(n),u=a.next();!u.done;u=a.next()){o=(r=p(u.value,2))[0],i=r[1];break}}catch(s){e={error:s}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return[o,i]}():function(){var e,t,r,o,i;try{for(var a=d(n),u=a.next();!u.done;u=a.next())o=(r=p(u.value,2))[0],i=r[1]}catch(s){e={error:s}}finally{try{u&&!u.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}return[o,i]}(),2),i=r[0],a=r[1],u=this.getKeyForItem(t,i,a),(c=u)?[4,this.storage.getItem(u)]:[3,2];case 1:c=f.sent(),f.label=2;case 2:return[2,(s=c)&&JSON.parse(s)||void 0]}}))}))},e.prototype.getAll=function(e,t){return f(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,h,v,y,g,b,m,w,_,S,E;return l(this,(function(l){switch(l.label){case 0:n=this.getCollectionIndex(e),o=(r=t||{}).page,i=void 0===o?0:o,a=r.limit,u=void 0===a?0:a,s=Math.max(0,i*u)||0,c=u>0?s+u:void 0,f=[],h=0;try{for(v=d(n),y=v.next();!y.done&&(g=p(y.value,2),b=g[0],m=g[1],++h<=s||(f.push(this.getKeyForItem(e,b,m)),h!==c));y=v.next());}catch(O){S={error:O}}finally{try{y&&!y.done&&(E=v.return)&&E.call(v)}finally{if(S)throw S.error}}return[4,this.storage.multiGet(f)];case 1:return w=l.sent(),_=w.filter((function(e){return p(e,2)[1]})).map((function(e){var t=p(e,2)[1];return JSON.parse(t)})),[2,_]}}))}))},e.prototype.delete=function(e,t){return f(this,void 0,void 0,(function(){var n,r;return l(this,(function(o){switch(o.label){case 0:return n=this.getCollectionIndex(t).get(e),r=this.getKeyForItem(t,e,n),this.getCollectionIndex(t).delete(e),[4,this.storage.removeItem(r)];case 1:return o.sent(),[2]}}))}))},e.prototype.clear=function(){return f(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return[4,this.storage.getAllKeys()];case 1:return e=n.sent(),t=e.filter((function(e){return e.startsWith(h)})),[4,this.storage.multiRemove(t)];case 2:return n.sent(),this._collectionInMemoryIndex.clear(),[2]}}))}))},e.prototype.getKeyForItem=function(e,t,n){return this.getKeyPrefixForStoreItems(e)+"::"+n+"::"+t},e.prototype.getLegacyKeyForItem=function(e,t){return this.getKeyPrefixForStoreItems(e)+"::"+t},e.prototype.getKeyPrefixForStoreItems=function(e){return h+"::"+e+"::"+v},e}(),b=n(36460),m=n(3581),w=function(e,t,n,r){return new(n||(n=Prom
1ise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},_=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},S=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 E?E(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,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},E=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.")},O=new r.k("DataStore"),x=function(){function e(){}return e.prototype.getStorenameForModel=function(e){var t=this.namespaceResolver(e),n=e.name;return this.getStorename(t,n)},e.prototype.getStorename=function(e,t){return e+"_"+t},e.prototype.setUp=function(e,t,n,r){return w(this,void 0,void 0,(function(){var o,i=this;return _(this,(function(a){switch(a.label){case 0:return this.initPromise?[3,1]:(this.initPromise=new Promise((function(e,t){i.resolve=e,i.reject=t})),[3,3]);case 1:return[4,this.initPromise];case 2:return a.sent(),[2];case 3:this.schema=e,this.namespaceResolver=t,this.modelInstanceCreator=n,this.getModelConstructorByModelName=r,a.label=4;case 4:return a.trys.push([4,7,,8]),this.db?[3,6]:(this.db=new g,[4,this.db.init()]);case 5:a.sent(),this.resolve(),a.label=6;case 6:return[3,8];case 7:return o=a.sent(),this.reject(o),[3,8];case 8:return[2]}}
1))}))},e.prototype.save=function(e,t){var n,r;return w(this,void 0,void 0,(function(){var a,u,s,c,f,l,d,p,h,v,y,g,m,w,E,x,P,A,T,I,k,C,j=this;return _(this,(function(_){switch(_.label){case 0:return a=Object.getPrototypeOf(e).constructor,u=this.getStorenameForModel(a),s=(0,i.jl)(a.name,e,this.schema.namespaces[this.namespaceResolver(a)],this.modelInstanceCreator,this.getModelConstructorByModelName),c=this.namespaceResolver(a),f=new Set,l=Object.values(s).map((function(e){var t=e.modelName,n=e.item,r=e.instance,o=j.getStorename(c,t);return f.add(o),{storeName:o,item:n,instance:r}})),[4,this.db.get(e.id,u)];case 1:if(d=_.sent(),t&&d&&(p=b.OY.getPredicates(t),h=p.predicates,v=p.type,!(0,i.u8)(d,v,h)))throw y="Conditional update failed",O.error(y,{model:d,condition:h}),new Error(y);g=[],_.label=2;case 2:_.trys.push([2,9,10,15]),m=S(l),_.label=3;case 3:return[4,m.next()];case 4:return(w=_.sent()).done?[3,8]:(E=w.value,x=E.storeName,P=E.item,A=E.instance,T=P.id,[4,this.db.get(T,x)]);case 5:return I=_.sent(),k=I?o.HP.UPDATE:o.HP.INSERT,T!==e.id&&k!==o.HP.INSERT?[3,7]:[4,this.db.save(P,x)];case 6:_.sent(),g.push([A,k]),_.label=7;case 7:return[3,3];case 8:return[3,15];case 9:return C=_.sent(),n={error:C},[3,15];case 10:return _.trys.push([10,,13,14]),w&&!w.done&&(r=m.return)?[4,r.call(m)]:[3,12];case 11:_.sent(),_.label=12;case 12:return[3,14];case 13:if(n)throw n.error;return[7];case 14:return[7];case 15:return[2,g]}}))}))},e.prototype.load=function(e,t,n){var r,o,a,u,s,c,f,l,d,p;return w(this,void 0,void 0,(function(){var h,v,y,g,b,m,w,E,O,x,P,A,T,I,k,C,j,L,R=this;return _(this,(function(_){switch(_.label){case 0:if(h=this.schema.namespaces[e],v=h.relationships[t].relationTypes,y=v.map((function(t){var n=t.modelName;return R.getStorename(e,n)})),g=this.getModelConstructorByModelName(e,t),0===y.length)return[2,n.map((function(e){return R.modelInstanceCreator(g,e)}))];_.label=1;case 1:_.trys.push([1,34,35,40]),b=S(v),_.label=2;case 2:return[4,b.next()];case 3:if((m=_.sent()).done)return[3,33];switch(w=m.value,E=w.fieldName,O=w.modelName,x=w.targetName,P=w.relationType,A=this.getStorename(e,O),T=this.getModelConstructorByModelName(e,O),P){case"HAS_ONE":return[3,4];case"BELONGS_TO":return[3,17];case"HAS_MANY":return[3,30]}return[3,31];case 4:_.trys.push([4,10,11,16]),r=S(n),_.label=5;case 5:return[4,r.next()];case 6:return(o=_.sent()).done?[3,9]:(k=o.value)[E]?[4,this.db.get(k[E],A)]:[3,8];case 7:C=_.sent(),k[E]=C&&this.modelInstanceCreator(T,C),_.label=8;case 8:return[3,5];case 9:return[3,16];case 10:return I=_.sent(),f={error:I},[3,16];case 11:return _.trys.push([11,,14,15]),o&&!o.done&&(l=r.return)?[4,l.call(r)]:[3,13];case 12:_.sent(),_.label=13;case 13:return[3,15];case 14:if(f)throw f.error;return[7];case 15:return[7];case 16:return[3,32];case 17:_.trys.push([17,23,24,29]),a=S(n),_.label=18;case 18:return[4,a.next()];case 19:return(u=_.sent()).done?[3,22]:(k=u.value)[x]?[4,this.db.get(k[x],A)]:[3,21];case 20:C=_.sent(),k[E]=C&&this.modelInstanceCreator(T,C),delete k[x],_.label=21;case 21:return[3,18];case 22:return[3,29];case 23:return j=_.sent(),d={error:j},[3,29];case 24:return _.trys.push([24,,27,28]),u&&!u.done&&(p=a.return)?[4,p.call(a)]:[3,26];case 25:_.sent(),_.label=26;case 26:return[3,28];case 27:if(d)throw d.error;return[7];case 28:return[7];case 29:case 30:return[3,32];case 31:return(0,i.y0)(P),[3,32];case 32:return[3,2];case 33:return[3,40];case 34:return L=_.sent(),s={error:L},[3,40];case 35:return _.trys.push([35,,38,39]),m&&!m.done&&(c=b.return)?[4,c.call(b)]:[3,37];case 36:_.sent(),_.label=37;case 37:return[3,39];case 38:if(s)throw s.error;return[7];case 39:return[7];case 40:return[2,n.map((function(e){return R.modelInstanceCreator(g,e)}))]}}))}))},e.prototype.query=function(e,t,n){return w(this,void 0,void 0,(function(){var r,o,i,a,u,s,c,f=this;return _(this,(function(l){switch(l.label){case 0:return r=this.getStorenameForModel(e),o=this.namespaceResolver(e),i=t&&b.OY.getPredicates(t),a=i&&this.idFromPredicate(i),u=n&&n.sort,s=n&&n.limit,[4,w(f,void 0,void 0,(function(){var e,t,o;return _(this,(function(c){switch(c.label){case 0:return a?[4,this.getById(r,a)]:[3,2];case 1:return[2,(e=c.sent())?[e]:[]];case 2:return i?[4,this.filterOnPredicate(r,i)]:[3,4];case 3:return t=c.sent(),[2,this.inMemoryPagination(t,n)];case 4:return u||s?[4,this.getAll(r)]:[3,6];case 5:return o=c.sent(),[2,this.inMemoryPagination(o,n)];case 6:return[2,this.getAll(r)]}}))}))];case 1:return c=l.sent(),[4,this.load(o,e.name,c)];case 2:return[2,l.sent()]}}))}))},e.prototype.getById=function(e,t){return w(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,this.db.get(t,e)];case 1:return[2,n.sent()]}}))}))},e.prototype.getAll=function(e){return w(this,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return[4,this.db.getAll(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.idFromPredicate=function(e){var t=e.predicates,n=1===t.length&&t.find((function(e){return(0,o.w5)(e)&&"id"===e.field&&"eq"===e.operator}));return n&&n.operand},e.prototype.filterOnPredicate=function(e,t){return w(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(a){switch(a.label){case 0:return n=t.predicates,r=t.type,[4,this.getAll(e)];case 1:return o=a.sent(),[2,n?o.filter((function(e){return(0,i.u8)(e,r,n)})):o]}}))}))},e.prototype.inMemoryPagination=function(e,t){if(t&&e.length>1){if(t.sort){var n=m.c.getPredicates(t.sort);if(n.length){var r=(0,i.z8)(n);e.sort(r)}}var o=t.page,a=void 0===o?0:o,u=t.limit,s=void 0===u?0:u,c=Math.max(0,a*s)||0,f=s>0?c+s:e.length;return e.slice(c,f)}return e},e.prototype.queryOne=function(e,t){return void 0===t&&(t=o.fI.FIRST),w(this,void 0,void 0,(function(){var n,r;return _(this,(function(o){switch(o.label){case 0:return n=this.getStorenameForModel(e),[4,this.db.getOne(t,n)];case 1:return[2,(r=o.sent())&&this.modelInstanceCreator(e,r)]}}))}))},e.prototype.delete=function(e,t){return w(this,void 0,void 0,(function(){var n,r,o,a,u,s,c,f,l,d,p,h,v;return _(this,(function(y){switch(y.label){case 0:return n=[],(0,i.hK)(e)?(a=e,u=this.namespaceResolver(a),[4,this.query(a,t)]):[3,8];case 1:return r=y.sent(),h=this.schema.namespaces[u].relationships[a.name].relationTypes,void 0===t?[3,4]:[4,this.deleteTraverse(h,r,a.name,u,n)];case 2:return y.sent(),[4,this.deleteItem(n)];case 3:return y.sent(),v=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[r,v]];case 4:return[4,this.deleteTraverse(h,r,a.name,u,n)];case 5:return y.sent(),[4,this.deleteItem(n)];case 6:return y.sent(),v=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[r,v]];case 7:return[3,15];
1case 8:return o=e,a=Object.getPrototypeOf(o).constructor,u=this.namespaceResolver(a),s=this.getStorenameForModel(a),t?[4,this.db.get(o.id,s)]:[3,11];case 9:if(void 0===(c=y.sent()))return p="Model instance not found in storage",O.warn(p,{model:o}),[2,[[o],[]]];if(f=b.OY.getPredicates(t),l=f.predicates,d=f.type,!(0,i.u8)(c,d,l))throw p="Conditional update failed",O.error(p,{model:c,condition:l}),new Error(p);return h=this.schema.namespaces[u].relationships[a.name].relationTypes,[4,this.deleteTraverse(h,[o],a.name,u,n)];case 10:return y.sent(),[3,13];case 11:return h=this.schema.namespaces[u].relationships[a.name].relationTypes,[4,this.deleteTraverse(h,[o],a.name,u,n)];case 12:y.sent(),y.label=13;case 13:return[4,this.deleteItem(n)];case 14:return y.sent(),v=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[[o],v]];case 15:return[2]}}))}))},e.prototype.deleteItem=function(e){var t,n,r,o,i,a;return w(this,void 0,void 0,(function(){var u,s,c,f,l,d,p,h,v;return _(this,(function(y){switch(y.label){case 0:y.trys.push([0,17,18,23]),t=S(e),y.label=1;case 1:return[4,t.next()];case 2:if((n=y.sent()).done)return[3,16];u=n.value,s=u.storeName,c=u.items,y.label=3;case 3:y.trys.push([3,9,10,15]),f=S(c),y.label=4;case 4:return[4,f.next()];case 5:return(l=y.sent()).done?[3,8]:(d=l.value)?"object"!==typeof d?[3,7]:(p=d.id,[4,this.db.delete(p,s)]):[3,7];case 6:y.sent(),y.label=7;case 7:return[3,4];case 8:return[3,15];case 9:return h=y.sent(),i={error:h},[3,15];case 10:return y.trys.push([10,,13,14]),l&&!l.done&&(a=f.return)?[4,a.call(f)]:[3,12];case 11:y.sent(),y.label=12;case 12:return[3,14];case 13:if(i)throw i.error;return[7];case 14:return[7];case 15:return[3,1];case 16:return[3,23];case 17:return v=y.sent(),r={error:v},[3,23];case 18:return y.trys.push([18,,21,22]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,20];case 19:y.sent(),y.label=20;case 20:return[3,22];case 21:if(r)throw r.error;return[7];
1case 22:return[7];case 23:return[2]}}))}))},e.prototype.deleteTraverse=function(e,t,n,r,o){var a,u,s,c,f,l,d,p,h,v,y,g;return w(this,void 0,void 0,(function(){var b,m,w,E,O,x,P,A,T,I,k,C,j,L,R,M=this;return _(this,(function(_){switch(_.label){case 0:_.trys.push([0,35,36,41]),a=S(e),_.label=1;case 1:return[4,a.next()];case 2:if((u=_.sent()).done)return[3,34];switch(b=u.value,m=b.relationType,w=b.modelName,E=b.targetName,O=this.getStorename(r,w),x=(0,i.rw)(this.schema.namespaces[r].relationships[w].relationTypes,n)||(0,i.NA)(this.schema.namespaces[r].relationships[w].indexes,b.associatedWith),m){case"HAS_ONE":return[3,3];case"HAS_MANY":return[3,17];case"BELONGS_TO":return[3,31]}return[3,32];case 3:_.trys.push([3,10,11,16]),s=S(t),_.label=4;case 4:return[4,s.next()];case 5:return(c=_.sent()).done?[3,9]:(k=c.value,P=x||"byId",A=E in k?k[E]:k.id,[4,this.db.getAll(O)]);case 6:return C=_.sent(),T=C.filter((function(e){return e[P]===A})),[4,this.deleteTraverse(this.schema.namespaces[r].relationships[w].relationTypes,T,w,r,o)];case 7:_.sent(),_.label=8;case 8:return[3,4];case 9:return[3,16];case 10:return I=_.sent(),h={error:I},[3,16];case 11:return _.trys.push([11,,14,15]),c&&!c.done&&(v=s.return)?[4,v.call(s)]:[3,13];case 12:_.sent(),_.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return[3,33];case 17:_.trys.push([17,24,25,30]),f=S(t),_.label=18;case 18:return[4,f.next()];case 19:return(l=_.sent()).done?[3,23]:(k=l.value,[4,this.db.getAll(O)]);case 20:return C=_.sent(),j=C.filter((function(e){return e[x]===k.id})),[4,this.deleteTraverse(this.schema.namespaces[r].relationships[w].relationTypes,j,w,r,o)];case 21:_.sent(),_.label=22;case 22:return[3,18];case 23:return[3,30];case 24:return L=_.sent(),y={error:L},[3,30];case 25:return _.trys.push([25,,28,29]),l&&!l.done&&(g=f.return)?[4,g.call(f)]:[3,27];case 26:_.sent(),_.label=27;case 27:return[3,29];case 28:if(y)throw y.error;return[7];case 29:return[7];case 30:case 31:return[3,33];case 32:return(0,i.y0)(m),[3,33];case 33:return[3,1];case 34:return[3,41];case 35:return R=_.sent(),d={error:R},[3,41];case 36:return _.trys.push([36,,39,40]),u&&!u.done&&(p=a.return)?[4,p.call(a)]:[3,38];case 37:_.sent(),_.label=38;case 38:return[3,40];case 39:if(d)throw d.error;return[7];case 40:return[7];case 41:return o.push({storeName:this.getStorename(r,n),items:t.map((function(e){return M.modelInstanceCreator(M.getModelConstructorByModelName(r,n),e)}))}),[2]}}))}))},e.prototype.clear=function(){return w(this,void 0,void 0,(function(){return _(this,(function(e){switch(e.label){case 0:return[4,this.db.clear()];case 1:return e.sent(),this.db=void 0,this.initPromise=void 0,[2]}}))}))},e.prototype.batchSave=function(e,t){return w(this,void 0,void 0,(function(){var n,r,o,a,u,s,c,f,l,d,p;return _(this,(function(h){switch(h.label){case 0:n=e.name,r=this.namespaceResolver(e),o=this.getStorename(r,n),a=[],u=function(t){var n=t.id,r=(0,i.jl)(e.name,s.modelInstanceCreator(e,t),s.schema.namespaces[s.namespaceResolver(e)],s.modelInstanceCreator,s.getModelConstructorByModelName).find((function(e){return e.instance.id===n})).instance;a.push(r)},s=this;try{for(c=E(t),f=c.next();!f.done;f=c.next())l=f.value,u(l)}catch(v){d={error:v}}finally{try{f&&!f.done&&(p=c.return)&&p.call(c)}finally{if(d)throw d.error}}return[4,this.db.batchSave(o,a)];case 1:return[2,h.sent()]}}))}))},e}();new x},82887:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(35069);let o,i;const a=new WeakMap,u=new WeakMap,s=new WeakMap,c=new WeakMap,f=new WeakMap;let l={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return u.get(e);if("objectStoreNames"===t)return e.objectStoreNames||s.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return h(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(v(this),t),h(a.get(this))}:function(...t){return h(e.apply(v(this),t))}:function(t,...n){const r=e.call(v(this),t,...n);return s.set(r,t.sort?t.sort():[t]),h(r)}}function p(e){return"function"===typeof e?d(e):(e instanceof IDBTransaction&&function(e){if(u.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",i),e.removeEventListener("abort",i)},o=()=>{t(),r()},i=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",o),e.addEventListener("error",i),e.addEventListener("abort",i)}));u.set(e,t)}(e),t=e,(o||(o=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some((e=>t instanceof e))?new Proxy(e,l):e);var t}function h(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",o),e.removeEventListener("error",i)},o=()=>{t(h(e.result)),r()},i=()=>{n(e.error),r()};e.addEventListener("success",o),e.addEventListener("error",i)}));return t.then((t=>{t instanceof IDBCursor&&a.set(t,e)}
1)).catch((()=>{})),f.set(t,e),t}(e);if(c.has(e))return c.get(e);const t=p(e);return t!==e&&(c.set(e,t),f.set(t,e)),t}const v=e=>f.get(e);function y(e,t,{blocked:n,upgrade:r,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),u=h(a);return r&&a.addEventListener("upgradeneeded",(e=>{r(h(a.result),e.oldVersion,e.newVersion,h(a.transaction))})),n&&a.addEventListener("blocked",(()=>n())),u.then((e=>{i&&e.addEventListener("close",(()=>i())),o&&e.addEventListener("versionchange",(()=>o()))})).catch((()=>{})),u}function g(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(()=>t())),h(n).then((()=>{}))}const b=["get","getKey","getAll","getAllKeys","count"],m=["put","add","delete","clear"],w=new Map;function _(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!==typeof t)return;if(w.get(t))return w.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=m.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!o&&!b.includes(n))return;const i=async function(e,...t){const i=this.transaction(e,o?"readwrite":"readonly");let a=i.store;r&&(a=a.index(t.shift()));const u=await a[n](...t);return o&&await i.done,u};return w.set(t,i),i}l=(e=>({...e,get:(t,n,r)=>_(t,n)||e.get(t,n,r),has:(t,n)=>!!_(t,n)||e.has(t,n)}))(l);var S=n(36460),E=n(3581),O=n(79561),x=n(85256),P=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},T=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 I?I(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,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}},I=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.")},k=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},C=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(k(arguments[t]));return e},j=new r.k("DataStore"),L="amplify-datastore",R=new(function(){function e(){this.dbName=L}return e.prototype.checkPrivate=function(){return P(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,(0,x.D0)().then((function(e){return e}))];case 1:return e.sent()?(j.error("IndexedDB not supported in this browser's private mode"),[2,Promise.reject("IndexedDB not supported in this browser's private mode")]):[2,Promise.resolve()]}}))}))},e.prototype.getStorenameForModel=function(e){var t=this.namespaceResolver(e),n=e.name;
1return this.getStorename(t,n)},e.prototype.getStorename=function(e,t){return e+"_"+t},e.prototype.setUp=function(e,t,n,r,o){return P(this,void 0,void 0,(function(){var i,a,u=this;return A(this,(function(s){switch(s.label){case 0:return[4,this.checkPrivate()];case 1:return s.sent(),this.initPromise?[3,2]:(this.initPromise=new Promise((function(e,t){u.resolve=e,u.reject=t})),[3,4]);case 2:return[4,this.initPromise];case 3:s.sent(),s.label=4;case 4:o&&(this.dbName=L+"-"+o),this.schema=e,this.namespaceResolver=t,this.modelInstanceCreator=n,this.getModelConstructorByModelName=r,s.label=5;case 5:return s.trys.push([5,8,,9]),this.db?[3,7]:(2,i=this,[4,y(this.dbName,2,{upgrade:function(t,n,r,o){return P(u,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p,h,v,y,g=this;return A(this,(function(b){switch(b.label){case 0:if(0===n)return Object.keys(e.namespaces).forEach((function(n){var r=e.namespaces[n];Object.keys(r.models).forEach((function(e){var r=g.getStorename(n,e),o=t.createObjectStore(r,{autoIncrement:!0});g.schema.namespaces[n].relationships[e].indexes.forEach((function(e){return o.createIndex(e,e)})),o.createIndex("byId","id",{unique:!0})}))})),[2];if(1!==n||2!==r)return[3,16];b.label=1;case 1:b.trys.push([1,14,,15]),b.label=2;case 2:b.trys.push([2,11,12,13]),i=I(o.objectStoreNames),a=i.next(),b.label=3;case 3:return a.done?[3,10]:(u=a.value,s=o.objectStore(u),c="tmp_"+u,s.name=c,(f=t.createObjectStore(u,{keyPath:void 0,autoIncrement:!0})).createIndex("byId","id",{unique:!0}),[4,s.openCursor()]);case 4:l=b.sent(),d=0,b.label=5;case 5:return l&&l.value?[4,f.put(l.value)]:[3,8];case 6:return b.sent(),[4,l.continue()];case 7:return l=b.sent(),d++,[3,5];case 8:t.deleteObjectStore(c),j.debug(d+" "+u+" records migrated"),b.label=9;case 9:return a=i.next(),[3,3];case 10:return[3,13];case 11:return p=b.sent(),v={error:p},[3,13];case 12:try{a&&!a.done&&(y=i.return)&&y.call(i)}finally{if(v)throw v.error}return[7];case 13:return[3,15];case 14:throw h=b.sent(),j.error("Error migrating IndexedDB data",h),o.abort(),h;case 15:case 16:return[2]}}
1))}))}})]);case 6:i.db=s.sent(),this.resolve(),s.label=7;case 7:return[3,9];case 8:return a=s.sent(),this.reject(a),[3,9];case 9:return[2]}}))}))},e.prototype._get=function(e,t){return P(this,void 0,void 0,(function(){var n,r;return A(this,(function(o){switch(o.label){case 0:return"string"===typeof e?(r=e,n=this.db.transaction(r,"readonly").store.index("byId")):n=e.index("byId"),[4,n.get(t)];case 1:return[2,o.sent()]}}))}))},e.prototype.save=function(e,t){var n,r;return P(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,E,P,I,k,L,R,M,D,N=this;return A(this,(function(A){switch(A.label){case 0:return[4,this.checkPrivate()];case 1:return A.sent(),o=Object.getPrototypeOf(e).constructor,i=this.getStorenameForModel(o),a=(0,x.jl)(o.name,e,this.schema.namespaces[this.namespaceResolver(o)],this.modelInstanceCreator,this.getModelConstructorByModelName),u=this.namespaceResolver(o),s=new Set,c=Object.values(a).map((function(e){var t=e.modelName,n=e.item,r=e.instance,o=N.getStorename(u,t);return s.add(o),{storeName:o,item:n,instance:r}})),f=this.db.transaction(C([i],Array.from(s.values())),"readwrite"),l=f.objectStore(i),[4,this._get(l,e.id)];case 2:if(d=A.sent(),t&&d&&(p=S.OY.getPredicates(t),h=p.predicates,v=p.type,!(0,x.u8)(d,v,h)))throw y="Conditional update failed",j.error(y,{model:d,condition:h}),new Error(y);g=[],A.label=3;case 3:A.trys.push([3,11,12,17]),b=T(c),A.label=4;case 4:return[4,b.next()];case 5:return(m=A.sent()).done?[3,10]:(w=m.value,_=w.storeName,E=w.item,P=w.instance,I=f.objectStore(_),k=E.id,[4,this._get(I,k)]);case 6:return L=A.sent(),R=void 0===L?O.HP.INSERT:O.HP.UPDATE,k!==e.id&&R!==O.HP.INSERT?[3,9]:[4,I.index("byId").getKey(E.id)];case 7:return M=A.sent(),[4,I.put(E,M)];case 8:A.sent(),g.push([P,R]),A.label=9;case 9:return[3,4];case 10:return[3,17];case 11:return D=A.sent(),n={error:D},[3,17];case 12:return A.trys.push([12,,15,16]),m&&!m.done&&(r=b.return)?[4,r.call(b)]:[3,14];case 13:A.sent(),A.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[4,f.done];case 18:return A.sent(),[2,g]}}))}))},e.prototype.load=function(e,t,n){var r,o,i,a,u,s,c,f,l,d;return P(this,void 0,void 0,(function(){var p,h,v,y,g,b,m,w,_,S,E,O,P,I,k,j,L,R,M,D=this;return A(this,(function(A){switch(A.label){case 0:if(p=this.schema.namespaces[e],h=p.relationships[t].relationTypes,v=h.map((function(t){var n=t.modelName;return D.getStorename(e,n)})),y=this.getModelConstructorByModelName(e,t),0===v.length)return[2,n.map((function(e){return D.modelInstanceCreator(y,e)}))];g=this.db.transaction(C(v),"readonly"),A.label=1;case 1:A.trys.push([1,34,35,40]),b=T(h),A.label=2;case 2:return[4,b.next()];case 3:if((m=A.sent()).done)return[3,33];switch(w=m.value,_=w.fieldName,S=w.modelName,E=w.targetName,O=this.getStorename(e,S),P=g.objectStore(O),I=this.getModelConstructorByModelName(e,S),w.relationType){case"HAS_ONE":return[3,4];case"BELONGS_TO":return[3,17];case"HAS_MANY":return[3,30]}return[3,31];case 4:A.trys.push([4,10,11,16]),r=T(n),A.label=5;case 5:return[4,r.next()];case 6:return(o=A.sent()).done?[3,9]:(j=o.value)[_]?[4,this._get(P,j[_])]:[3,8];case 7:L=A.sent(),j[_]=L&&this.modelInstanceCreator(I,L),A.label=8;case 8:return[3,5];case 9:return[3,16];case 10:return k=A.sent(),c={error:k},[3,16];case 11:return A.trys.push([11,,14,15]),o&&!o.done&&(f=r.return)?[4,f.call(r)]:[3,13];case 12:A.sent(),A.label=13;case 13:return[3,15];case 14:if(c)throw c.error;return[7];case 15:return[7];case 16:return[3,32];case 17:A.trys.push([17,23,24,29]),i=T(n),A.label=18;case 18:return[4,i.next()];case 19:return(a=A.sent()).done?[3,22]:(j=a.value)[E]?[4,this._get(P,j[E])]:[3,21];case 20:L=A.sent(),j[_]=L&&this.modelInstanceCreator(I,L),delete j[E],A.label=21;case 21:return[3,18];case 22:return[3,29];case 23:return R=A.sent(),l={error:R},[3,29];case 24:return A.trys.push([24,,27,28]),a&&!a.done&&(d=i.return)?[4,d.call(i)]:[3,26];case 25:A.sent(),A.label=26;case 26:return[3,28];case 27:if(l)throw l.error;return[7];case 28:return[7];case 29:case 30:return[3,32];case 31:return(0,x.y0)(w.relationType),[3,32];case 32:return[3,2];case 33:return[3,40];case 34:return M=A.sent(),u={error:M},[3,40];case 35:return A.trys.push([35,,38,39]),m&&!m.done&&(s=b.return)?[4,s.call(b)]:[3,37];case 36:A.sent(),A.label=37;case 37:return[3,39];case 38:if(u)throw u.error;return[7];
1case 39:return[7];case 40:return[2,n.map((function(e){return D.modelInstanceCreator(y,e)}))]}}))}))},e.prototype.query=function(e,t,n){return P(this,void 0,void 0,(function(){var r,o,i,a,u,s,c,f=this;return A(this,(function(l){switch(l.label){case 0:return[4,this.checkPrivate()];case 1:return l.sent(),r=this.getStorenameForModel(e),o=this.namespaceResolver(e),i=t&&S.OY.getPredicates(t),a=i&&this.idFromPredicate(i),u=n&&n.sort,s=n&&n.limit,[4,P(f,void 0,void 0,(function(){var e,t,o;return A(this,(function(c){switch(c.label){case 0:return a?[4,this.getById(r,a)]:[3,2];case 1:return[2,(e=c.sent())?[e]:[]];case 2:return i?[4,this.filterOnPredicate(r,i)]:[3,4];case 3:return t=c.sent(),[2,this.inMemoryPagination(t,n)];case 4:return u?[4,this.getAll(r)]:[3,6];case 5:return o=c.sent(),[2,this.inMemoryPagination(o,n)];case 6:return s?[2,this.enginePagination(r,n)]:[2,this.getAll(r)]}}))}))];case 2:return c=l.sent(),[4,this.load(o,e.name,c)];case 3:return[2,l.sent()]}}))}))},e.prototype.getById=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this._get(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.getAll=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,this.db.getAll(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.idFromPredicate=function(e){var t=e.predicates,n=1===t.length&&t.find((function(e){return(0,O.w5)(e)&&"id"===e.field&&"eq"===e.operator}));return n&&n.operand},e.prototype.filterOnPredicate=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){switch(i.label){case 0:return n=t.predicates,r=t.type,[4,this.getAll(e)];case 1:return o=i.sent(),[2,n?o.filter((function(e){return(0,x.u8)(e,r,n)})):o]}}))}))},e.prototype.inMemoryPagination=function(e,t){if(t&&e.length>1){if(t.sort){var n=E.c.getPredicates(t.sort);if(n.length){var r=(0,x.z8)(n);e.sort(r)}}var o=t.page,i=void 0===o?0:o,a=t.limit,u=void 0===a?0:a,s=Math.max(0,i*u)||0,c=u>0?s+u:e.length;return e.slice(s,c)}return e},e.prototype.enginePagination=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f;return A(this,(function(l){switch(l.label){case 0:return t?(r=t.page,o=void 0===r?0:r,i=t.limit,a=void 0===i?0:i,u=Math.max(0,o*a)||0,[4,this.db.transaction(e).objectStore(e).openCursor()]):[3,7];case 1:return(s=l.sent())&&u>0?[4,s.advance(u)]:[3,3];case 2:l.sent(),l.label=3;case 3:c=[],f="number"===typeof a&&a>0,l.label=4;case 4:return s&&s.value?(c.push(s.value),f&&c.length===a?[3,6]:[4,s.continue()]):[3,6];case 5:return s=l.sent(),[3,4];case 6:return n=c,[3,9];case 7:return[4,this.db.getAll(e)];case 8:n=l.sent(),l.label=9;case 9:return[2,n]}}))}))},e.prototype.queryOne=function(e,t){return void 0===t&&(t=O.fI.FIRST),P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){switch(i.label){case 0:return[4,this.checkPrivate()];case 1:return i.sent(),n=this.getStorenameForModel(e),[4,this.db.transaction([n],"readonly").objectStore(n).openCursor(void 0,t===O.fI.FIRST?"next":"prev")];case 2:return r=i.sent(),[2,(o=r?r.value:void 0)&&this.modelInstanceCreator(e,o)]}}))}))},e.prototype.delete=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y;return A(this,(function(g){switch(g.label){case 0:return[4,this.checkPrivate()];case 1:return g.sent(),n=[],(0,x.hK)(e)?(i=e,a=this.namespaceResolver(i),u=this.getStorenameForModel(i),[4,this.query(i,t)]):[3,9];case 2:return r=g.sent(),v=this.schema.namespaces[a].relationships[i.name].relationTypes,void 0===t?[3,5]:[4,this.deleteTraverse(v,r,i.name,a,n)];case 3:return g.sent(),[4,this.deleteItem(n)];case 4:return g.sent(),y=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[r,y]];case 5:return[4,this.deleteTraverse(v,r,i.name,a,n)];case 6:return g.sent(),[4,this.db.transaction([u],"readwrite").objectStore(u).clear()];case 7:return g.sent(),y=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[r,y]];case 8:return[3,17];case 9:return o=e,i=Object.getPrototypeOf(o).constructor,a=this.namespaceResolver(i),u=this.getStorenameForModel(i),t?(s=this.db.transaction([u],"readwrite"),c=s.objectStore(u),[4,this._get(c,o.id)]):[3,13];case 10:if(void 0===(f=g.sent()))return h="Model instance not found in storage",j.warn(h,{model:o}),[2,[[o],[]]];if(l=S.OY.getPredicates(t),d=l.predicates,p=l.type,!(0,x.u8)(f,p,d))throw h="Conditional update failed",j.error(h,{model:f,condition:d}),new Error(h);return[4,s.done];case 11:return g.sent(),v=this.schema.namespaces[a].relationships[i.name].relationTypes,[4,this.deleteTraverse(v,[o],i.name,a,n)];case 12:return g.sent(),[3,15];case 13:return v=this.schema.namespaces[a].relationships[i.name].relationTypes,[4,this.deleteTraverse(v,[o],i.name,a,n)];case 14:g.sent(),g.label=15;case 15:return[4,this.deleteItem(n)];case 16:return g.sent(),y=n.reduce((function(e,t){var n=t.items;return e.concat(n)}),[]),[2,[[o],y]];case 17:return[2]}}
1))}))},e.prototype.deleteItem=function(e){var t,n,r,o,i,a;return P(this,void 0,void 0,(function(){var u,s,c,f,l,d,p,h,v,y,g,b;return A(this,(function(m){switch(m.label){case 0:u=e.map((function(e){return e.storeName})),s=this.db.transaction(C(u),"readwrite"),m.label=1;case 1:m.trys.push([1,22,23,28]),t=T(e),m.label=2;case 2:return[4,t.next()];case 3:if((n=m.sent()).done)return[3,21];c=n.value,f=c.storeName,l=c.items,d=s.objectStore(f),m.label=4;case 4:m.trys.push([4,14,15,20]),p=T(l),m.label=5;case 5:return[4,p.next()];case 6:return(h=m.sent()).done?[3,13]:(v=h.value)?(y=void 0,"object"!==typeof v?[3,8]:[4,d.index("byId").getKey(v.id)]):[3,12];case 7:return y=m.sent(),[3,10];case 8:return[4,d.index("byId").getKey(v.toString())];case 9:y=m.sent(),m.label=10;case 10:return void 0===y?[3,12]:[4,d.delete(y)];case 11:m.sent(),m.label=12;case 12:return[3,5];case 13:return[3,20];case 14:return g=m.sent(),i={error:g},[3,20];case 15:return m.trys.push([15,,18,19]),h&&!h.done&&(a=p.return)?[4,a.call(p)]:[3,17];case 16:m.sent(),m.label=17;case 17:return[3,19];case 18:if(i)throw i.error;return[7];case 19:return[7];case 20:return[3,2];case 21:return[3,28];case 22:return b=m.sent(),r={error:b},[3,28];case 23:return m.trys.push([23,,26,27]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,25];case 24:m.sent(),m.label=25;case 25:return[3,27];case 26:if(r)throw r.error;return[7];case 27:return[7];case 28:return[2]}}
1))}))},e.prototype.deleteTraverse=function(e,t,n,r,o){var i,a,u,s,c,f,l,d,p,h,v,y;return P(this,void 0,void 0,(function(){var g,b,m,w,_,S,E,O,P,I,k,C,j,L,R=this;return A(this,(function(A){switch(A.label){case 0:A.trys.push([0,35,36,41]),i=T(e),A.label=1;case 1:return[4,i.next()];case 2:if((a=A.sent()).done)return[3,34];switch(g=a.value,b=g.relationType,g.fieldName,m=g.modelName,w=g.targetName,_=this.getStorename(r,m),S=(0,x.rw)(this.schema.namespaces[r].relationships[m].relationTypes,n)||(0,x.NA)(this.schema.namespaces[r].relationships[m].indexes,g.associatedWith),b){case"HAS_ONE":return[3,3];case"HAS_MANY":return[3,17];case"BELONGS_TO":return[3,31]}return[3,32];case 3:A.trys.push([3,10,11,16]),u=T(t),A.label=4;case 4:return[4,u.next()];case 5:return(s=A.sent()).done?[3,9]:(k=s.value,E=S||"byId",O=w in k?k[w]:k.id,[4,this.db.transaction(_,"readwrite").objectStore(_).index(E).get(O)]);case 6:return P=A.sent(),[4,this.deleteTraverse(this.schema.namespaces[r].relationships[m].relationTypes,P?[P]:[],m,r,o)];case 7:A.sent(),A.label=8;case 8:return[3,4];case 9:return[3,16];case 10:return I=A.sent(),p={error:I},[3,16];case 11:return A.trys.push([11,,14,15]),s&&!s.done&&(h=u.return)?[4,h.call(u)]:[3,13];case 12:A.sent(),A.label=13;case 13:return[3,15];case 14:if(p)throw p.error;return[7];case 15:return[7];case 16:return[3,33];case 17:A.trys.push([17,24,25,30]),c=T(t),A.label=18;case 18:return[4,c.next()];case 19:return(f=A.sent()).done?[3,23]:(k=f.value,[4,this.db.transaction(_,"readwrite").objectStore(_).index(S).getAll(k.id)]);case 20:return C=A.sent(),[4,this.deleteTraverse(this.schema.namespaces[r].relationships[m].relationTypes,C,m,r,o)];case 21:A.sent(),A.label=22;case 22:return[3,18];case 23:return[3,30];case 24:return j=A.sent(),v={error:j},[3,30];case 25:return A.trys.push([25,,28,29]),f&&!f.done&&(y=c.return)?[4,y.call(c)]:[3,27];case 26:A.sent(),A.label=27;case 27:return[3,29];case 28:if(v)throw v.error;return[7];case 29:return[7];case 30:case 31:return[3,33];case 32:return(0,x.y0)(b),[3,33];case 33:return[3,1];case 34:return[3,41];case 35:return L=A.sent(),l={error:L},[3,41];case 36:return A.trys.push([36,,39,40]),a&&!a.done&&(d=i.return)?[4,d.call(i)]:[3,38];case 37:A.sent(),A.label=38;case 38:return[3,40];case 39:if(l)throw l.error;return[7];case 40:return[7];case 41:return o.push({storeName:this.getStorename(r,n),items:t.map((function(e){return R.modelInstanceCreator(R.getModelConstructorByModelName(r,n),e)}))}),[2]}}))}))},e.prototype.clear=function(){return P(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,this.checkPrivate()];case 1:return e.sent(),this.db.close(),[4,g(this.dbName)];case 2:return e.sent(),this.db=void 0,this.initPromise=void 0,[2]}}))}))},e.prototype.batchSave=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p;return A(this,(function(h){switch(h.label){case 0:return 0===t.length?[2,[]]:[4,this.checkPrivate()];case 1:h.sent(),n=[],r=this.getStorenameForModel(e),o=this.db.transaction(r,"readwrite"),i=o.store,a=function(t){var r,o,a,s,c;return A(this,(function(f){switch(f.label){case 0:return r=(0,x.jl)(e.name,u.modelInstanceCreator(e,t),u.schema.namespaces[u.namespaceResolver(e)],u.modelInstanceCreator,u.getModelConstructorByModelName),o=t.id,a=t._deleted,[4,i.index("byId").getKey(o)];case 1:return s=f.sent(),a?[3,3]:(c=r.find((function(e){return e.instance.id===o})).instance,n.push([c,s?O.HP.UPDATE:O.HP.INSERT]),[4,i.put(c,s)]);case 2:return f.sent(),[3,5];case 3:return n.push([t,O.HP.DELETE]),s?[4,i.delete(s)]:[3,5];case 4:f.sent(),f.label=5;case 5:return[2]}}
1))},u=this,h.label=2;case 2:h.trys.push([2,7,8,9]),s=I(t),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[5,a(f)]);case 4:h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[4,o.done];case 10:return h.sent(),[2,n]}}))}))},e}())},79561:function(e,t,n){"use strict";n.d(t,{$v:function(){return b},BV:function(){return y},Fr:function(){return v},G9:function(){return _},HP:function(){return a},I7:function(){return g},K5:function(){return E},S6:function(){return S},Sr:function(){return s},Z1:function(){return f},aQ:function(){return h},fI:function(){return u},g5:function(){return m},j6:function(){return o},sE:function(){return c},w5:function(){return w}});var r,o,i,a,u,s,c,f,l=n(85256),d=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},p=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};function h(e){return e&&void 0!==e.pluralName}function v(e){return e&&e.targetName}function y(e){return e&&void 0!==i[e]}function g(e){return!(!e||!e.model)}function b(e){return!(!e||!e.nonModel)}function m(e){return!(!e||!e.enum)}function w(e){return e&&void 0!==e.field}function _(e){return e&&void 0!==e.type}function S(e,t){return d(this,void 0,void 0,(function(){return p(this,(function(n){return[2,{modelConstructor:e,conditionProducer:t}]}))}))}!function(e){e.OWNER="owner",e.GROUPS="groups",e.PRIVATE="private",e.PUBLIC="public"}(r||(r={})),function(e){e.USER_POOLS="userPools",e.OIDC="oidc",e.IAM="iam",e.API_KEY="apiKey"}(o||(o={})),function(e){e[e.ID=0]="ID",e[e.String=1]="String",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Boolean=4]="Boolean",e[e.AWSDate=5]="AWSDate",e[e.AWSTime=6]="AWSTime",e[e.AWSDateTime=7]="AWSDateTime",e[e.AWSTimestamp=8]="AWSTimestamp",e[e.AWSEmail=9]="AWSEmail",e[e.AWSJSON=10]="AWSJSON",e[e.AWSURL=11]="AWSURL",e[e.AWSPhone=12]="AWSPhone",e[e.AWSIPAddress=13]="AWSIPAddress"}(i||(i={})),function(e){e.getJSType=function(e){switch(e){case"Boolean":return"boolean";case"ID":case"String":case"AWSDate":case"AWSTime":case"AWSDateTime":case"AWSEmail":case"AWSJSON":case"AWSURL":case"AWSPhone":case"AWSIPAddress":return"string";case"Int":case"Float":case"AWSTimestamp":return"number";default:(0,l.y0)(e)}},e.getValidationFunction=function(e){switch(e){case"AWSDate":return l.pP;case"AWSTime":return l.Ro;case"AWSDateTime":return l.wp;case"AWSTimestamp":return l.D7;case"AWSEmail":return l.M9;case"AWSJSON":return l.nd;case"AWSURL":return l.Zu;case"AWSPhone":return l.iA;case"AWSIPAddress":return l.mY;default:return}}}(i||(i={})),function(e){e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(a||(a={})),function(e){e[e.FIRST=0]="FIRST",e[e.LAST=1]="LAST"}(u||(u={})),function(e){e.ASCENDING="ASCENDING",e.DESCENDING="DESCENDING"}(s||(s={})),function(e){e.DEFAULT="DEFAULT",e.MULTI_AUTH="MULTI_AUTH"}(c||(c={})),function(e){e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE"}(f||(f={}));var E=Symbol("DISCARD")},85256:function(e,t,n){"use strict";n.d(t,{cG:function(){return L},P_:function(){return D},J3:function(){return M},xR:function(){return R},y0:function(){return O},rw:function(){return k},NA:function(){return C},Iz:function(){return q},pP:function(){return F},wp:function(){return K},M9:function(){return V},mY:function(){return X},nd:function(){return Z},iA:function(){return Y},Ro:function(){return G},D7:function(){return W},Zu:function(){return $},hK:function(){return A},D0:function(){return N},c6:function(){return H},z8:function(){return B},jl:function(){return I},u8:function(){return x},Vg:function(){return z}});var r=n(48764);function o(e){var t=new Error(e);return t.source="ulid",t}var i="0123456789ABCDEFGHJKMNPQRSTVWXYZ",a=i.length,u=Math.pow(2,48)-1;function s(e,t,n){return t>e.length-1?e:e.substr(0,t)+n+e.substr(t+1)}function c(e){var t=Math.floor(e()*a);return t===a&&(t=a-1),i.charAt(t)}function f(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>u)throw o("cannot encode time greater than "+u);if(e<0)throw o("time must be positive");if(!1===Number.isInteger(e))throw o("time must be an integer");for(var n=void 0,r="";t>0;t--)r=i.charAt(n=e%a)+r,e=(e-n)/a;return r}function l(e,t){for(var n="";e>0;e--)n=c(t)+n;return n}function d(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];t||(t="undefined"!==typeof window?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var e=new Uint8Array(1);return r.getRandomValues(e),e[0]/255};try{var i=n(94788);return function(){return i.randomBytes(1).readUInt8()/255}}catch(a){}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch(a){}return function(){return Math.random()}}throw o("secure crypto unusable, insecure Math.random not allowed")}function p(e){e||(e=d());var t=0,n=void 0;return function(r){if(isNaN(r)&&(r=Date.now()),r<=t){var u=n=function(e){for(var t=void 0,n=e.length,r=void 0,u=void 0,c=a-1;!t&&n-- >=0;){if(r=e[n],-1===(u=i.indexOf(r)))throw o("incorrectly encoded string");u!==c?t=s(e,n,i[u+1]):e=s(e,n,i[0])}if("string"===typeof t)return t;throw o("cannot increment this string")}(n);return f(t,10)+u}t=r;var c=n=l(16,e);return f(r,10)+c}}h||(h=d());var h,v,y=n(98029),g=n(79561),b=n(940),m=function(e,t,n,r){return new(n||(n=Prom
1ise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},w=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},_=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},S=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.")},E=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e},O=function(e,t){if(void 0===t&&(t=!0),t)throw new Error("Invalid "+e)},x=function(e,t,n){var r,o=!1;if(0===n.length)return!0;switch(t){case"not":r="every",o=!0;break;case"and":r="every";break;case"or":r="some";break;default:O(t)}var i=n[r]((function(t){if((0,g.w5)(t)){var n=t.field,r=t.operator,o=t.operand,i=e[n];return P(i,r,o)}if((0,g.G9)(t)){var a=t.type,u=t.predicates;return x(e,a,u)}throw new Error("Not a predicate or group")}));return o?!i:i},P=function(e,t,n){switch(t){case"ne":return e!==n;case"eq":return e===n;case"le":return e<=n;case"lt":return e<n;case"ge":return e>=n;case"gt":return e>n;case"between":var r=_(n,2),o=r[0],i=r[1];return e>=o&&e<=i;case"beginsWith":return e.startsWith(n);case"contains":return e.indexOf(n)>-1;case"notContains":return-1===e.indexOf(n);default:return O(t,!1),!1}},A=function(e){return e&&"function"===typeof e.copyOf},T=new WeakMap,I=function(e,t,n,r,o){var i=n.relationships,a=o(n.name,e),u=i[e],s=[],c=a.copyOf(t,(function(e){u.relationTypes.forEach((function(i){var a=o(n.name,i.modelName);switch(i.relationType){case"HAS_ONE":if(t[i.fieldName]){var u=void 0;try{u=r(a,t[i.fieldName])}catch(c){}s.push({modelName:i.modelName,item:t[i.fieldName],instance:u}),e[i.fieldName]=e[i.fieldName].id}break;case"BELONGS_TO":if(t[i.fieldName]){u=void 0;try{u=r(a,t[i.fieldName])}catch(c){}e[i.fieldName]._deleted||s.push({modelName:i.modelName,item:t[i.fieldName],instance:u})}e[i.targetName]=e[i.fieldName]?e[i.fieldName].id:null,delete e[i.fieldName];break;case"HAS_MANY":break;default:O(i.relationType)}}))}));s.unshift({modelName:e,item:c,instance:c}),T.has(n)||T.set(n,Array.from(n.modelTopologicalOrdering.keys()));var f=T.get(n);return s.sort((function(e,t){return f.indexOf(e.modelName)-f.indexOf(t.modelName)})),s},k=function(e,t){var n="";return e.some((function(e){e.modelName===t&&(n=e.targetName)})),n},C=function(e,t){return e.find((function(e){return e===t}))};!function(e){e.DATASTORE="datastore",e.USER="user",e.SYNC="sync",e.STORAGE="storage"}(v||(v={}));var j,L=v.DATASTORE,R=v.USER,M=v.SYNC,D=v.STORAGE,N=function(){return new Promise((function(e){var t,n=(0,y.v4)(),r=function(){j=!1,e(!0)},o=function(){return m(void 0,void 0,void 0,(function(){return w(this,(function(r){switch(r.label){case 0:return t&&t.result&&"function"===typeof t.result.close?[4,t.result.close()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[4,indexedDB.deleteDatabase(n)];case 3:return r.sent(),j=!0,[2,e(!1)]}}))}))};return!0===j?o():!1===j||null===indexedDB?r():((t=indexedDB.open(n)).onerror=r,void(t.onsuccess=o))}))},U=function(){return(e=1,r.Buffer.from((new b.Ic).random(e).toString(),"hex")).readUInt8(0)/255;var e};function H(e){var t=p(U);return function(){return t(e)}}function q(){return"undefined"!==typeof performance&&performance&&"function"===typeof performance.now?0|performance.now():Date.now()}function B(e){return function(t,n){var r,o;try{for(var i=S(e),a=i.next();!a.done;a=i.next()){var u=a.value,s=u.field,c=u.sortDirection===g.Sr.ASCENDING?1:-1;if(t[s]<n[s])return-1*c;if(t[s]>
1n[s])return 1*c}}catch(f){r={error:f}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return 0}}function z(e,t,n){var r,o;void 0===n&&(n=!1);var i,a,u=e,s=t;if(u instanceof Object&&!(s instanceof Object)||!(u instanceof Object)&&s instanceof Object)return!1;if(!(u instanceof Object))return!(!n||(i=u,a=s,void 0!==i&&null!==i||void 0!==a&&null!==a))||u===s;if(Array.isArray(u)&&!Array.isArray(s)||Array.isArray(s)&&!Array.isArray(u))return!1;u instanceof Set&&s instanceof Set&&(u=E(u),s=E(s)),u instanceof Map&&s instanceof Map&&(u=Object.fromEntries(u),s=Object.fromEntries(s));var c=Object.keys(u),f=Object.keys(s);if(c.length!==f.length&&(!n||Array.isArray(u)))return!1;var l=c.length>=f.length?c:f;try{for(var d=S(l),p=d.next();!p.done;p=d.next()){var h=p.value;if(!z(u[h],s[h],n))return!1}}catch(v){r={error:v}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return!0}var F=function(e){return!!/^\d{4}-\d{2}-\d{2}(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},G=function(e){return!!/^\d{2}:\d{2}(:\d{2}(.\d+)?)?(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},K=function(e){return!!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(.\d+)?)?(Z|[+-]\d{2}:\d{2}($|:\d{2}))?$/.exec(e)},W=function(e){return!!/^\d+$/.exec(String(e))},V=function(e){return!!/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.exec(e)},Z=function(e){try{return JSON.parse(e),!0}catch(t){return!1}},$=function(e){try{return!!new URL(e)}catch(t){return!1}},Y=function(e){return!!/^\+?\d[\d\s-]+$/.exec(e)},X=function(e){return!!/((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$))$/.exec(e)}},98029:function(e,t,n){var r=n(28144),o=n(27520),i=o;i.v1=r,i.v4=o,e.exports=i},3163:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},71831:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},28144:function(e,t,n){var r,o,i=n(71831),a=n(3163),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},27520:function(e,t,n){var r=n(71831),o=n(3163);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},35211:function(e,t,n){"use strict";n.d(t,{y:function(){return Dr}});var r=n(35069),o=n(25387),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=new r.k("AbstractInteractionsProvider"),u=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=i(i({},this._config),e),a.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return i({},this._config)},enumerable:!0,configurable:!0}),e}(),s=n(70655),c=n(57752);
1function f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(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.")}var p=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}();var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var y=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(h(h({},this),{headers:h({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,o=t[n];return h(h({},e),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}(o):o,r))}),{}))),n},e}();function g(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.")}var b=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,m)},m=function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()};for(var w=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?void 0:n.aborted){var o=new Error("Request aborted");return o.name="AbortError",Promise.reject(o)}var i=e.path;if(e.query){var a=function(e){var t,n,r=[];try{for(var o=g(Object.keys(e).sort()),i=o.next();!i.done;i=o.next()){var a=i.value,u=e[a];if(a=b(a),Array.isArray(u))for(var s=0,c=u.length;s<c;s++)r.push(a+"="+b(u[s]));else{var f=a;(u||"string"===typeof u)&&(f+="="+b(u)),r.push(f)}}}
1catch(l){t={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r.join("&")}(e.query);a&&(i+="?"+a)}var u=e.port,s=e.method,c=e.protocol+"//"+e.hostname+(u?":"+u:"")+i,f={body:"GET"===s||"HEAD"===s?void 0:e.body,headers:new Headers(e.headers),method:s};"undefined"!==typeof AbortController&&(f.signal=n);var l,h=new Request(c,f),v=[fetch(h).then((function(e){var t,n,r=e.headers,o={};try{for(var i=d(r.entries()),a=i.next();!a.done;a=i.next()){var u=a.value;o[u[0]]=u[1]}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return void 0!==e.body?{response:new p({headers:o,statusCode:e.status,body:e.body})}:e.blob().then((function(t){return{response:new p({headers:o,statusCode:e.status,body:t})}}))})),(l=r,void 0===l&&(l=0),new Promise((function(e,t){l&&setTimeout((function(){var e=new Error("Request did not complete within "+l+" ms");e.name="TimeoutError",t(e)}),l)})))];return n&&v.push(new Promise((function(e,t){n.onabort=function(){var e=new Error("Request aborted");e.name="AbortError",t(e)}}))),Promise.race(v)},e}(),_={},S=new Array(64),E=0,O="A".charCodeAt(0),x="Z".charCodeAt(0);E+O<=x;E++){var P=String.fromCharCode(E+O);_[P]=E,S[E]=P}for(E=0,O="a".charCodeAt(0),x="z".charCodeAt(0);E+O<=x;E++){P=String.fromCharCode(E+O);var A=E+26;_[P]=A,S[A]=P}for(E=0;E<10;E++){_[E.toString(10)]=E+52;P=E.toString(10),A=E+52;_[P]=A,S[A]=P}_["+"]=62,S[62]="+",_["/"]=63,S[63]="/";function T(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),o=0;o<e.length;o+=4){for(var i=0,a=0,u=o,s=o+3;u<=s;u++)"="!==e[u]?(i|=_[e[u]]<<6*(s-u),a+=6):i>>=6;var c=o/4*3;i>>=a%8;for(var f=Math.floor(a/8),l=0;l<f;l++){var d=8*(f-l-1);r.setUint8(c+l,(i&255<<d)>>d)}}return new Uint8Array(n)}function I(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 o=null!==(e=r.result)&&void 0!==e?e:"",i=o.indexOf(","),a=i>-1?i+1:o.length;t(o.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}var k=function(){return k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},k.apply(this,arguments)};function C(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function j(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function L(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var R=function(e){return function(t,n){return function(r){return C(void 0,void 0,void 0,(function(){var o;return j(this,(function(i){return(null===(o=null===e||void 0===e?void 0:e.retryStrategy)||void 0===o?void 0:o.mode)&&(n.userAgent=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(L(arguments[t]));return e}(n.userAgent||[],[["cfg/retry-mode",e.retryStrategy.mode]])),[2,e.retryStrategy.retry(t,r)]}))}))}}},M={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},D=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],N=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],U=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],H=[500,502,503,504],q=function(e){var t,n;return 429===(null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||N.includes(e.name)||1==(null===(n=e.$retryable)||void 0===n?void 0:n.throttling)},B=n(7164),z=function(e,t){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,t)*e))},F=function(e){return!!e&&(function(e){return void 0!==e.$retryable}(e)||function(e){return D.includes(e.name)}(e)||q(e)||function(e){var t;return U.includes(e.name)||H.includes((null===(t=e.$metadata)||void 0===t?void 0:t.httpStatusCode)||0)}(e))},G="standard",K=function(){function e(e,t){var n,r,o;
1this.maxAttemptsProvider=e,this.mode=G,this.retryDecider=null!==(n=null===t||void 0===t?void 0:t.retryDecider)&&void 0!==n?n:F,this.delayDecider=null!==(r=null===t||void 0===t?void 0:t.delayDecider)&&void 0!==r?r:z,this.retryQuota=null!==(o=null===t||void 0===t?void 0:t.retryQuota)&&void 0!==o?o:function(e){var t=e,n=e,r=function(e){return"TimeoutError"===e.name?10:5},o=function(e){return r(e)<=n};return Object.freeze({hasRetryTokens:o,retrieveRetryTokens:function(e){if(!o(e))throw new Error("No retry token available");var t=r(e);return n-=t,t},releaseRetryTokens:function(e){n+=null!==e&&void 0!==e?e:1,n=Math.min(n,t)}})}(500)}return e.prototype.shouldRetry=function(e,t,n){return t<n&&this.retryDecider(e)&&this.retryQuota.hasRetryTokens(e)},e.prototype.getMaxAttempts=function(){return C(this,void 0,void 0,(function(){var e;return j(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 C(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c;return j(this,(function(f){switch(f.label){case 0:return r=0,o=0,[4,this.getMaxAttempts()];case 1:i=f.sent(),a=t.request,y.isInstance(a)&&(a.headers["amz-sdk-invocation-id"]=(0,B.v4)()),u=function(){var u,c,f,l,d;return j(this,(function(p){switch(p.label){case 0:return p.trys.push([0,2,,5]),y.isInstance(a)&&(a.headers["amz-sdk-request"]="attempt="+(r+1)+"; max="+i),[4,e(t)];case 1:return u=p.sent(),c=u.response,f=u.output,s.retryQuota.releaseRetryTokens(n),f.$metadata.attempts=r+1,f.$metadata.totalRetryDelay=o,[2,{value:{response:c,output:f}}];case 2:return l=p.sent(),r++,s.shouldRetry(l,r,i)?(n=s.retryQuota.retrieveRetryTokens(l),d=s.delayDecider(q(l)?500:100,r),o+=d,[4,new Promise((function(e){return setTimeout(e,d)}))]):[3,4];case 3:return p.sent(),[2,"continue"];case 4:throw l.$metadata||(l.$metadata={}),l.$metadata.attempts=r,l.$metadata.totalRetryDelay=o,l;case 5:return[2]}}
1))},s=this,f.label=2;case 2:return[5,u()];case 3:return"object"===typeof(c=f.sent())?[2,c.value]:[3,2];case 4:return[2]}}))}))},e}(),W=function(e){if(void 0===e&&(e=3),"number"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function V(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Z(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var $=n(51206),Y=n.n($),X=n(64294),J="runtime.lex.{region}.amazonaws.com",Q=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"]),ee=new Set(["cn-north-1","cn-northwest-1"]),te=new Set(["us-iso-east-1"]),ne=new Set(["us-isob-east-1"]),re=new Set(["us-gov-east-1","us-gov-west-1"]);function oe(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 ie(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var ae,ue={apiVersion:"2016-11-28",disableHostPrefix:!1,logger:{},regionInfoProvider:function(e,t){var n=void 0;switch(e){case"ap-northeast-1":n={hostname:"runtime.lex.ap-northeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-1":n={hostname:"runtime.lex.ap-southeast-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"ap-southeast-2":n={hostname:"runtime.lex.ap-southeast-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-central-1":n={hostname:"runtime.lex.eu-central-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-1":n={hostname:"runtime.lex.eu-west-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"eu-west-2":n={hostname:"runtime.lex.eu-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-east-1":n={hostname:"runtime.lex.us-east-1.amazonaws.com",partition:"aws",signingService:"lex"};break;case"us-west-2":n={hostname:"runtime.lex.us-west-2.amazonaws.com",partition:"aws",signingService:"lex"};break;default:Q.has(e)&&(n={hostname:J.replace("{region}",e),partition:"aws",signingService:"lex"}),ee.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com.cn".replace("{region}",e),partition:"aws-cn"}),te.has(e)&&(n={hostname:"runtime.lex.{region}.c2s.ic.gov".replace("{region}",e),partition:"aws-iso"}),ne.has(e)&&(n={hostname:"runtime.lex.{region}.sc2s.sgov.gov".replace("{region}",e),partition:"aws-iso-b"}),re.has(e)&&(n={hostname:"runtime.lex.{region}.amazonaws.com".replace("{region}",e),partition:"aws-us-gov"}),void 0===n&&(n={hostname:J.replace("{region}",e),partition:"aws",signingService:"lex"})}return Promise.resolve((0,s.__assign)({signingService:"lex"},n))},serviceId:"Lex Runtime Service",urlParser:function(e){var t,n=new URL(e),r=n.hostname,o=n.pathname,i=n.port,a=n.protocol,u=n.search;return u&&(t=function(e){var t,n,r={};if(e=e.replace(/^\?/,""))try{for(var o=oe(e.split("&")),i=o.next();!i.done;i=o.next()){var a=ie(i.value.split("="),2),u=a[0],s=a[1],c=void 0===s?null:s;
1u=decodeURIComponent(u),c&&(c=decodeURIComponent(c)),u in r?Array.isArray(r[u])?r[u].push(c):r[u]=[r[u],c]:r[u]=c}}catch(f){t={error:f}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(u)),{hostname:r,port:i?parseInt(i):void 0,protocol:a,path:o,query:t}}},se=(0,s.__assign)((0,s.__assign)({},ue),{runtime:"browser",base64Decoder:T,base64Encoder:function(e){for(var t="",n=0;n<e.length;n+=3){for(var r=0,o=0,i=n,a=Math.min(n+3,e.length);i<a;i++)r|=e[i]<<8*(a-i-1),o+=8;var u=Math.ceil(o/6);r<<=6*u-o;for(var s=1;s<=u;s++){var c=6*(u-s);t+=S[(r&63<<c)>>c]}t+="==".slice(0,4-u)}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:function(e){var t=e.serviceId,n=e.clientVersion;return function(){return V(void 0,void 0,void 0,(function(){var e,r,o,i,a,u,s,c,f;return Z(this,(function(l){return e=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)?Y().parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",n],["os/"+((null===(i=null===e||void 0===e?void 0:e.os)||void 0===i?void 0:i.name)||"other"),null===(a=null===e||void 0===e?void 0:e.os)||void 0===a?void 0:a.version],["lang/js"],["md/browser",(null!==(s=null===(u=null===e||void 0===e?void 0:e.browser)||void 0===u?void 0:u.name)&&void 0!==s?s:"unknown")+"_"+(null!==(f=null===(c=null===e||void 0===e?void 0:e.browser)||void 0===c?void 0:c.version)&&void 0!==f?f:"unknown")]],t&&r.push(["api/"+t,n]),[2,r]}))}))}}({serviceId:ue.serviceId,clientVersion:"3.6.1"}),maxAttempts:3,region:(ae="Region is missing",function(){return Promise.reject(ae)}),requestHandler:new w,sha256:c.Sha256,streamCollector:function(e){return"function"===typeof Blob&&e instanceof Blob?function(e){return f(this,void 0,void 0,(function(){var t,n;return l(this,(function(r){switch(r.label){case 0:return[4,I(e)];case 1:return t=r.sent(),n=T(t),[2,new Uint8Array(n)]}}))}))}(e):function(e){return f(this,void 0,void 0,(function(){var t,n,r,o,i,a,u;return l(this,(function(s){switch(s.label){case 0:t=new Uint8Array(0),n=e.getReader(),r=!1,s.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=s.sent(),i=o.done,(a=o.value)&&(u=t,(t=new Uint8Array(u.length+a.length)).set(u),t.set(a,u.length)),r=i,[3,1];case 3:return[2,t]}}))}))}(e)},utf8Decoder:X.fromUtf8,utf8Encoder:X.toUtf8});var ce=function(){return ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ce.apply(this,arguments)};function fe(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function le(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var de=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 o=Promise.resolve(t);return function(){return o}}return t},pe=function(e){return fe(void 0,void 0,void 0,(function(){var t,n,r,o,i;return le(this,(function(a){switch(a.label){case 0:return t=e.tls,n=void 0===t||t,[4,e.region()];case 1:if(r=a.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(!(o=(null!==(i=a.sent())&&void 0!==i?i:{}).hostname))throw new Error("Cannot resolve hostname from client config");return[2,e.urlParser((n?"https:":"http:")+"//"+o)]}}))}))},he=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};var ve=function(){return ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ve.apply(this,arguments)};
1function ye(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function ge(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var be="content-length";var me={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},we=function(e){return{applyToStack:function(t){t.add(function(e){var t=this;return function(n){return function(r){return ye(t,void 0,void 0,(function(){var t,o,i,a,u;return ge(this,(function(s){return t=r.request,y.isInstance(t)&&(o=t.body,i=t.headers,o&&-1===Object.keys(i).map((function(e){return e.toLowerCase()})).indexOf(be)&&void 0!==(a=e(o))&&(t.headers=ve(ve({},t.headers),((u={})["content-length"]=String(a),u)))),[2,n(ve(ve({},r),{request:t}))]}))}))}}}(e.bodyLengthChecker),me)}}};function _e(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Se(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ee={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Oe=function(e){return{applyToStack:function(t){t.add(function(e){return function(t){return function(n){return _e(void 0,void 0,void 0,(function(){var r,o;return Se(this,(function(i){return y.isInstance(n.request)?(r=n.request,(void 0===(o=(e.requestHandler.metadata||{}).handlerProtocol)?"":o).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),Ee)}}};function xe(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Pe(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Ae=function(){return function(e,t){return function(n){return xe(void 0,void 0,void 0,(function(){var r,o,i,a,u,s,c,f,l;return Pe(this,(function(d){switch(d.label){case 0:return r=t.clientName,o=t.commandName,i=t.
1inputFilterSensitiveLog,a=t.logger,u=t.outputFilterSensitiveLog,[4,e(n)];case 1:return s=d.sent(),a?("function"===typeof a.info&&(c=s.output,f=c.$metadata,l=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(c,["$metadata"]),a.info({clientName:r,commandName:o,input:i(n.input),output:u(l),metadata:f})),[2,s]):[2,s]}}))}))}}},Te={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0};var Ie=function(){return Ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ie.apply(this,arguments)};function ke(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Ce(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function je(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var Le=function(){return Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Le.apply(this,arguments)};function Re(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function Me(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function De(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 Ne(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}for(var Ue={},He={},qe=0;qe<256;qe++){var Be=qe.toString(16).toLowerCase();1===Be.length&&(Be="0"+Be),Ue[qe]=Be,He[Be]=qe}function ze(e){for(var t="",n=0;n<e.byteLength;n++)t+=Ue[e[n]];return t}var Fe="X-Amz-Date",Ge="X-Amz-Signature",Ke="X-Amz-Security-Token",We="authorization",Ve=Fe.toLowerCase(),Ze=[We,Ve,"date"],$e=Ge.toLowerCase(),Ye="x-amz-content-sha256",Xe=Ke.toLowerCase(),Je={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},Qe=/^proxy-/,et=/^sec-/,tt="AWS4-HMAC-SHA256",nt="AWS4-HMAC-SHA256-PAYLOAD",rt="aws4_request",ot={},it=[];function at(e,t,n){return e+"/"+t+"/"+n+"/"+rt}function ut(e,t,n){var r=new e(t);return r.update(n),r.digest()}function st(e,t,n){var r,o,i=e.headers,a={};try{for(var u=De(Object.keys(i).sort()),s=u.next();!s.done;s=u.next()){var c=s.value,f=c.toLowerCase();(f in Je||(null===t||void 0===t?void 0:t.has(f))||Qe.test(f)||et.test(f))&&(!n||n&&!n.has(f))||(a[f]=i[c].trim().replace(/\s+/g," "))}}catch(l){r={error:l}}finally{try{s&&!s.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return a}function ct(e,t){var n=e.headers,r=e.body;return Re(this,void 0,void 0,(function(){var e,o,i,a,u,s,c;return Me(this,(function(f){switch(f.label){case 0:try{for(e=De(Object.keys(n)),o=e.next();!o.done;o=e.next())if((i=o.value).toLowerCase()===Ye)return[2,n[i]]}catch(d){s={error:d}}finally{try{o&&!o.done&&(c=e.return)&&c.call(e)}finally{if(s)throw s.error}}return void 0!=r?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"===typeof r||ArrayBuffer.isView(r)||(l=r,"function"===typeof ArrayBuffer&&l instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(l))?((a=new t).update(r),u=ze,[4,a.digest()]):[3,3];case 2:return[2,u.apply(void 0,[f.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}var l}))}))}function ft(e){var t=e.headers,n=e.query,r=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["headers","query"]);return Le(Le({},r),{headers:Le({},t),query:n?lt(n):void 0})}function lt(e){return Object.keys(e).reduce((function(t,n){var r,o=e[n];return Le(Le({},t),((r={})[n]=Array.isArray(o)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ne(arguments[t]));return e}(o):o,r))}),{})}function dt(e){var t,n;e="function"===typeof e.clone?e.clone():ft(e);try{for(var r=De(Object.keys(e.headers)),o=r.next();!o.done;o=r.next()){var i=o.value;Ze.indexOf(i.toLowerCase())>-1&&delete e.headers[i]}}catch(a){t={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function pt(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 ht=function(){function e(e){var t=e.applyChecksum,n=e.credentials,r=e.region,o=e.service,i=e.sha256,a=e.uriEscapePath,u=void 0===a||a;this.service=o,this.sha256=i,this.uriEscapePath=u,this.applyChecksum="boolean"!==typeof t||t,this.regionProvider=gt(r),this.credentialProvider=bt(n)}return e.prototype.presign=function(e,t){return void 0===t&&(t={}),Re(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l,d,p,h,v,y,g,b,m,w,_,S,E,O,x;return Me(this,(function(P){switch(P.label){case 0:return n=t.signingDate,r=void 0===n?new Date:n,o=t.expires
1In,i=void 0===o?3600:o,a=t.unsignableHeaders,u=t.unhoistableHeaders,s=t.signableHeaders,c=t.signingRegion,f=t.signingService,[4,this.credentialProvider()];case 1:return l=P.sent(),null===c||void 0===c?[3,2]:(p=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:p=P.sent(),P.label=4;case 4:return d=p,h=vt(r),v=h.longDate,y=h.shortDate,i>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(g=at(y,d,null!==f&&void 0!==f?f:this.service),b=function(e,t){var n,r,o;void 0===t&&(t={});var i="function"===typeof e.clone?e.clone():ft(e),a=i.headers,u=i.query,s=void 0===u?{}:u;try{for(var c=De(Object.keys(a)),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.toLowerCase();"x-amz-"!==d.substr(0,6)||(null===(o=t.unhoistableHeaders)||void 0===o?void 0:o.has(d))||(s[l]=a[l],delete a[l])}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Le(Le({},e),{headers:a,query:s})}(dt(e),{unhoistableHeaders:u}),l.sessionToken&&(b.query[Ke]=l.sessionToken),b.query["X-Amz-Algorithm"]=tt,b.query["X-Amz-Credential"]=l.accessKeyId+"/"+g,b.query["X-Amz-Date"]=v,b.query["X-Amz-Expires"]=i.toString(10),m=st(b,a,s),b.query["X-Amz-SignedHeaders"]=yt(m),w=b.query,_=Ge,S=this.getSignature,E=[v,g,this.getSigningKey(l,d,y,f)],O=this.createCanonicalRequest,x=[b,m],[4,ct(e,this.sha256)]);case 5:return[4,S.apply(this,E.concat([O.apply(this,x.concat([P.sent()]))]))];case 6:return w[_]=P.sent(),[2,b]}}))}))},e.prototype.sign=function(e,t){return Re(this,void 0,void 0,(function(){return Me(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,o=t.signingDate,i=void 0===o?new Date:o,a=t.priorSignature,u=t.signingRegion,s=t.signingService;return Re(this,void 0,void 0,(function(){var e,t,o,c,f,l,d,p,h,v,y;return Me(this,(function(g){switch(g.label){case 0:return null===u||void 0===u?[3,1]:(t=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:t=g.sent(),g.label=3;case 3:return e=t,o=vt(i),c=o.shortDate,f=o.longDate,l=at(c,e,null!==s&&void 0!==s?s:this.service),[4,ct({headers:{},body:r},this.sha256)];case 4:return d=g.sent(),(p=new this.sha256).update(n),v=ze,[4,p.digest()];case 5:return h=v.apply(void 0,[g.sent()]),y=[nt,f,l,a,h,d].join("\n"),[2,this.signString(y,{signingDate:i,signingRegion:e,signingService:s})]}}))}))},e.prototype.signString=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signingRegion,a=n.signingService;return Re(this,void 0,void 0,(function(){var t,n,r,u,s,c,f,l;return Me(this,(function(d){switch(d.label){case 0:return[4,this.credentialProvider()];case 1:return t=d.sent(),null===i||void 0===i?[3,2]:(r=i,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=d.sent(),d.label=4;case 4:return n=r,u=vt(o).shortDate,f=(c=this.sha256).bind,[4,this.getSigningKey(t,n,u,a)];case 5:return(s=new(f.apply(c,[void 0,d.sent()]))).update(e),l=ze,[4,s.digest()];case 6:return[2,l.apply(void 0,[d.sent()])]}}))}))},e.prototype.signRequest=function(e,t){var n=void 0===t?{}:t,r=n.signingDate,o=void 0===r?new Date:r,i=n.signableHeaders,a=n.unsignableHeaders,u=n.signingRegion,s=n.signingService;return Re(this,void 0,void 0,(function(){var t,n,r,c,f,l,d,p,h,v,y;return Me(this,(function(g){switch(g.label){case 0:return[4,this.credentialProvider()];case 1:return t=g.sent(),null===u||void 0===u?[3,2]:(r=u,[3,4]);case 2:return[4,this.regionProvider()];case 3:r=g.sent(),g.label=4;case 4:return n=r,c=dt(e),f=vt(o),l=f.longDate,d=f.shortDate,p=at(d,n,null!==s&&void 0!==s?s:this.service),c.headers[Ve]=l,t.sessionToken&&(c.headers[Xe]=t.sessionToken),[4,ct(c,this.sha256)];case 5:return h=g.sent(),!function(e,t){var n,r;e=e.toLowerCase();try{for(var o=De(Object.keys(t)),i=o.next();!i.done;i=o.next())if(e===i.value.toLowerCase())return!0}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}(Ye,c.headers)&&this.applyChecksum&&(c.headers[Ye]=h),v=st(c,a,i),[4,this.get
1Signature(l,p,this.getSigningKey(t,n,d,s),this.createCanonicalRequest(c,v,h))];case 6:return y=g.sent(),c.headers[We]="AWS4-HMAC-SHA256 Credential="+t.accessKeyId+"/"+p+", SignedHeaders="+yt(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,o=void 0===r?{}:r,i=[],a={},u=function(e){if(e.toLowerCase()===$e)return"continue";i.push(e);var t=o[e];"string"===typeof t?a[e]=b(e)+"="+b(t):Array.isArray(t)&&(a[e]=t.slice(0).sort().reduce((function(t,n){return t.concat([b(e)+"="+b(n)])}),[]).join("&"))};try{for(var s=De(Object.keys(o).sort()),c=s.next();!c.done;c=s.next())u(c.value)}catch(f){t={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i.map((function(e){return a[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 Re(this,void 0,void 0,(function(){var r,o;return Me(this,(function(i){switch(i.label){case 0:return(r=new this.sha256).update(n),[4,r.digest()];case 1:return o=i.sent(),[2,"AWS4-HMAC-SHA256\n"+e+"\n"+t+"\n"+ze(o)]}}))}))},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 Re(this,void 0,void 0,(function(){var o,i,a,u,s;return Me(this,(function(c){switch(c.label){case 0:return[4,this.createStringToSign(e,t,r)];case 1:return o=c.sent(),u=(a=this.sha256).bind,[4,n];case 2:return(i=new(u.apply(a,[void 0,c.sent()]))).update(o),s=ze,[4,i.digest()];case 3:return[2,s.apply(void 0,[c.sent()])]}}))}))},e.prototype.getSigningKey=function(e,t,n,r){return function(e,t,n,r,o){return Re(void 0,void 0,void 0,(function(){var i,a,u,s,c,f,l,d,p;return Me(this,(function(h){switch(h.label){case 0:return[4,ut(e,t.secretAccessKey,t.accessKeyId)];case 1:if(i=h.sent(),(a=n+":"+r+":"+o+":"+ze(i)+":"+t.sessionToken)in ot)return[2,ot[a]];for(it.push(a);it.length>50;)delete ot[it.shift()];u="AWS4"+t.secretAccessKey,h.label=2;case 2:h.trys.push([2,7,8,9]),s=De([n,r,o,rt]),c=s.next(),h.label=3;case 3:return c.done?[3,6]:(f=c.value,[4,ut(e,u,f)]);case 4:u=h.sent(),h.label=5;case 5:return c=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),d={error:l},[3,9];case 8:try{c&&!c.done&&(p=s.return)&&p.call(s)}finally{if(d)throw d.error}return[7];case 9:return[2,ot[a]=u]}}))}))}(this.sha256,e,n,t,r||this.service)},e}(),vt=function(e){var t=pt(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.substr(0,8)}},yt=function(e){return Object.keys(e).sort().join(";")},gt=function(e){if("string"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e},bt=function(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e};function mt(e){if("object"===typeof e){var t=Promise.resolve(e);return function(){return t}}return e}var wt=function(e){return new Date(Date.now()+e)};function _t(e){return function(t,n){return function(r){return ke(this,void 0,void 0,(function(){var o,i,a,u,s,c,f,l,d;return Ce(this,(function(p){switch(p.label){case 0:return y.isInstance(r.request)?"function"!==typeof e.signer?[3,2]:[4,e.signer()]:[2,t(r)];case 1:return i=p.sent(),[3,3];case 2:i=e.signer,p.label=3;case 3:return o=i,u=t,s=[Ie({},r)],d={},[4,o.sign(r.request,{signingDate:new Date(Date.now()+e.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,u.apply(void 0,[Ie.apply(void 0,s.concat([(d.request=p.sent(),d)]))])];case 5:return a=p.sent(),c=a.response.headers,(f=c&&(c.date||c.Date))&&(l=Date.parse(f),h=l,v=e.systemClockOffset,Math.abs(wt(v).getTime()-h)>=3e5&&(e.systemClockOffset=l-Date.now())),[2,a]}var h,v}))}))}}}var St={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};var Et=function(){return Et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Et.apply(this,arguments)};
1function Ot(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function xt(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function Pt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function At(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Pt(arguments[t]));return e}var Tt="user-agent",It=/[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,kt=function(e){var t=Pt(e,2),n=t[0],r=t[1],o=n.indexOf("/"),i=n.substring(0,o),a=n.substring(o+1);return"api"===i&&(a=a.toLowerCase()),[i,a,r].filter((function(e){return e&&e.length>0})).map((function(e){return null===e||void 0===e?void 0:e.replace(It,"_")})).join("/")},Ct={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},jt=function(e){return{applyToStack:function(t){var n;t.add((n=e,function(e,t){return function(r){return Ot(void 0,void 0,void 0,(function(){var o,i,a,u,s,c,f,l;return xt(this,(function(d){switch(d.label){case 0:return o=r.request,y.isInstance(o)?(i=o.headers,a=(null===(f=null===t||void 0===t?void 0:t.userAgent)||void 0===f?void 0:f.map(kt))||[],[4,n.defaultUserAgentProvider()]):[2,e(r)];case 1:return u=d.sent().map(kt),s=(null===(l=null===n||void 0===n?void 0:n.customUserAgent)||void 0===l?void 0:l.map(kt))||[],i["x-amz-user-agent"]=At(u,a,s).join(" "),c=At(u.filter((function(e){return e.startsWith("aws-sdk-")})),s).join(" "),"browser"!==n.runtime&&c&&(i[Tt]=i[Tt]?i[Tt]+" "+c:c),[2,e(Et(Et({},r),{request:o}))]}}))}))}}),Ct)}}};var Lt=function(){return Lt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Lt.apply(this,arguments)};function Rt(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 Mt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Dt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Mt(arguments[t]));return e}var Nt=function(){var e=[],t=[],n=new Set,r=function(n){return e.forEach((function(e){n.add(e.middleware,Lt({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,Lt({},e))})),n},o=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,Dt(o(e)))}
1)),t.push(e),e.after.reverse().forEach((function(e){0===e.before.length&&0===e.after.length?t.push(e):t.push.apply(t,Dt(o(e)))})),t},i=function(){var n,r=[],i=[],a={};return e.forEach((function(e){var t=Lt(Lt({},e),{before:[],after:[]});t.name&&(a[t.name]=t),r.push(t)})),t.forEach((function(e){var t=Lt(Lt({},e),{before:[],after:[]});t.name&&(a[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=a[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 Ut[t.step]-Ut[e.step]||Ht[t.priority||"normal"]-Ht[e.priority||"normal"]}))).map(o).reduce((function(e,t){return e.push.apply(e,Dt(t)),e}),[]).map((function(e){return e.middleware}))},a={add:function(t,r){void 0===r&&(r={});var o=r.name,i=r.override,a=Lt({step:"initialize",priority:"normal",middleware:t},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=e.findIndex((function(e){return e.name===o})),s=e[u];if(s.step!==a.step||s.priority!==a.priority)throw new Error('"'+o+'" middleware with '+s.priority+" priority in "+s.step+" step cannot be overridden by same-name middleware with "+a.priority+" priority in "+a.step+" step.");e.splice(u,1)}n.add(o)}e.push(a)},addRelativeTo:function(e,r){var o=r.name,i=r.override,a=Lt({middleware:e},r);if(o){if(n.has(o)){if(!i)throw new Error("Duplicate middleware name '"+o+"'");var u=t.findIndex((function(e){return e.name===o})),s=t[u];if(s.toMiddleware!==a.toMiddleware||s.relation!==a.relation)throw new Error('"'+o+'" middleware '+s.relation+' "'+s.toMiddleware+'" middleware cannot be overridden by same-name middleware '+a.relation+' "'+a.toMiddleware+'" middleware.');t.splice(u,1)}n.add(o)}t.push(a)},clone:function(){return r(Nt())},use:function(e){e.applyToStack(a)},remove:function(r){return"string"===typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=r(Nt());return t.use(e),t},applyToStack:r,resolve:function(e,t){var n,r;try{for(var o=Rt(i().reverse()),a=o.next();!a.done;a=o.next()){e=(0,a.value)(e,t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}};return a},Ut={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ht={high:3,normal:2,low:1},qt=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,o="function"===typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),Bt=function(){this.middlewareStack=Nt()};function zt(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}var Ft=function(e,t){return Ft=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])},Ft(e,t)};function Gt(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Kt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Gt(arguments[t]));return e}var Wt=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,Kt([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};Wt.prototype=Object.create(String.prototype,{constructor:{value:Wt,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Wt,String);var Vt,Zt,$t,Yt,Xt,Jt,Qt,en,tn,nn,rn,on,an,un,sn,cn,fn,ln,dn,pn,hn,vn,yn,gn,bn,mn,wn,_n,Sn,En,On,xn,Pn,An,Tn,In,kn,Cn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}Ft(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(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))},t}(Wt),jn="***SensitiveInformation***",Ln=function(e){function t(t){var n,r,o=this,i=function(e){if(!e.region)throw new Error("Region is missing");return ce(ce({},e),{region:he(e.region)})}((0,s.__assign)((0,s.__assign)({},se),t)),a=function(e){var t;return ce(ce({},e),{tls:null===(t=e.tls)||void 0===t||t,endpoint:e.endpoint?de(e):function(){return pe(e)},isCustomEndpoint:!!e.endpoint})}(i),u=function(e){var t,n=this,r=mt(e.credentials||e.credentialDefaultProvider(e)),o=e.signingEscapePath,i=void 0===o||o,a=e.systemClockOffset,u=void 0===a?e.systemClockOffset||0:a,s=e.sha256;return t=e.signer?mt(e.signer):function(){return mt(e.region)().then((function(t){return ke(n,void 0,void 0,(function(){return Ce(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=je(t,2),o=n[0],a=n[1],u=o.signingRegion,c=o.signingService;return e.signingRegion=e.signingRegion||u||a,e.signingName=e.signingName||c||e.serviceId,new ht({credentials:r,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:i})}))},Ie(Ie({},e),{systemClockOffset:u,signingEscapePath:i,credentials:r,signer:t})}(a),c=function(e){var t=W(e.maxAttempts);return k(k({},e),{maxAttempts:t,retryStrategy:e.retryStrategy||new K(t)})}(u),f=Et(Et({},n=c),{customUserAgent:"string"===typeof n.customUserAgent?[[n.customUserAgent]]:n.customUserAgent});return(o=e.call(this,f)||this).config=f,o.middlewareStack.use((r=o.config,{applyToStack:function(e){e.addRelativeTo(_t(r),St)}})),o.middlewareStack.use(function(e){return{applyToStack:function(t){t.add(R(e),M)}}}(o.config)),o.middlewareStack.use(we(o.config)),o.middlewareStack.use(Oe(o.config)),o.middlewareStack.use((o.config,{applyToStack:function(e){e.add(Ae(),Te)}})),o.middlewareStack.use(jt(o.config)),o}return(0,s.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(qt);!function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Vt||(Vt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)({},e),e.parameters&&{parameters:jn})}}(Zt||(Zt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}($t||($t={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Yt||(Yt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Xt||(Xt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Jt||(Jt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Qt||(Qt={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(en||(en={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(tn||(tn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(nn||(nn={})),function(e){e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(rn||(rn={})),function(e){e.COMPOSITE="Composite",e.CUSTOM_PAYLOAD="CustomPayload",e.PLAIN_TEXT="PlainText",e.SSML="SSML"}(on||(on={})),function(e){e.CLOSE="Close",e.CONFIRM_INTENT="ConfirmIntent",e.DELEGATE="Delegate",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot"}(an||(an={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.slots&&{slots:jn}),e.message&&{message:jn})}}(un||(un={})),function(e){e.CONFIRMED="Confirmed",e.DENIED="Denied",e.NONE="None"}(sn||(sn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)({},e),e.slots&&{slots:jn})}}(cn||(cn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return cn.filterSensitiveLog(e)}))}),e.sessionAttributes&&{sessionAttributes:jn}),e.dialogAction&&{dialogAction:un.filterSensitiveLog(e.dialogAction)}),e.activeContexts&&{activeContexts:jn})}}(fn||(fn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(ln||(ln={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(dn||(dn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(pn||(pn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(hn||(hn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.sessionAttributes&&{sessionAttributes:jn}),e.requestAttributes&&{requestAttributes:jn}),e.activeContexts&&{activeContexts:jn})}}(vn||(vn={})),function(e){e.CONFIRM_INTENT="ConfirmIntent",e.ELICIT_INTENT="ElicitIntent",e.ELICIT_SLOT="ElicitSlot",e.FAILED="Failed",e.FULFILLED="Fulfilled",e.READY_FOR_FULFILLMENT="ReadyForFulfillment"}(yn||(yn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.message&&{message:jn}),e.activeContexts&&{activeContexts:jn})}}(gn||(gn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(bn||(bn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(mn||(mn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.sessionAttributes&&{sessionAttributes:jn}),e.requestAttributes&&{requestAttributes:jn}),e.inputText&&{inputText:jn}),e.activeContexts&&{activeContexts:jn})}}(wn||(wn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(_n||(_n={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)({},e),e.slots&&{slots:jn})}}(Sn||(Sn={})),function(e){e.GENERIC="application/vnd.amazonaws.card.generic"}(En||(En={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(On||(On={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(xn||(xn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(Pn||(Pn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)({},e)}}(An||(An={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.alternativeIntents&&{alternativeIntents:e.alternativeIntents.map((function(e){return Sn.filterSensitiveLog(e)}))}),e.slots&&{slots:jn}),e.sessionAttributes&&{sessionAttributes:jn}),e.message&&{message:jn}),e.activeContexts&&{activeContexts:jn})}}(Tn||(Tn={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.sessionAttributes&&{sessionAttributes:jn}),e.dialogAction&&{dialogAction:un.filterSensitiveLog(e.dialogAction)}),e.recentIntentSummaryView&&{recentIntentSummaryView:e.recentIntentSummaryView.map((function(e){return cn.filterSensitiveLog(e)}))}),e.activeContexts&&{activeContexts:jn})}}(In||(In={})),function(e){e.filterSensitiveLog=function(e){return(0,s.__assign)((0,s.__assign)((0,s.__assign)({},e),e.message&&{message:jn}),e.activeContexts&&{activeContexts:jn})}}(kn||(kn={}));var Rn=n(48764).Buffer,Mn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,c,f,l,d,p,h,v,y,g,b,m,w;return(0,s.__generator)(this,(function(_){switch(_.label){case 0:return r=[(0,s.__assign)({},e)],w={},[4,dr(e.body,t)];case 1:switch(n=s.__assign.apply(void 0,r.concat([(w.body=_.sent(),w)])),i="UnknownError",i=pr(e,n.body),i){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotAcceptableException":case"com.amazonaws.lexruntimeservice#NotAcceptableException":return[3,16
1];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,18];case"RequestTimeoutException":case"com.amazonaws.lexruntimeservice#RequestTimeoutException":return[3,20];case"UnsupportedMediaTypeException":case"com.amazonaws.lexruntimeservice#UnsupportedMediaTypeException":return[3,22]}return[3,24];case 2:return a=[{}],[4,Nn(n,t)];case 3:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,a.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 4:return u=[{}],[4,Un(n,t)];case 5:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,u.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 6:return c=[{}],[4,Hn(n,t)];case 7:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,c.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 8:return f=[{}],[4,qn(n,t)];case 9:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,f.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 10:return l=[{}],[4,Bn(n,t)];case 11:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,l.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 12:return d=[{}],[4,zn(n,t)];case 13:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,d.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 14:return p=[{}],[4,Fn(n,t)];case 15:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,p.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 16:return h=[{}],[4,Gn(n,t)];case 17:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,h.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 18:return v=[{}],[4,Kn(n,t)];case 19:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,v.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 20:return y=[{}],[4,Wn(n,t)];case 21:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,y.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 22:return g=[{}],[4,Vn(n,t)];case 23:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,g.concat([_.sent()])),{name:i,$metadata:cr(e)}]),[3,25];case 24:b=n.body,i=b.code||b.Code||i,o=(0,s.__assign)((0,s.__assign)({},b),{name:""+i,message:b.message||b.Message||i,$fault:"client",$metadata:cr(e)}),_.label=25;case 25:return m=o.message||o.Message||i,o.message=m,delete o.Message,[2,Promise.reject(Object.assign(new Error(m),o))]}}))}))},Dn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,c,f,l,d,p,h,v,y,g;return(0,s.__generator)(this,(function(b){switch(b.label){case 0:return r=[(0,s.__assign)({},e)],g={},[4,dr(e.body,t)];case 1:switch(n=s.__assign.apply(void 0,r.concat([(g.body=b.sent(),g)])),i="UnknownError",i=pr(e,n.body),i){case"BadGatewayException":case"com.amazonaws.lexruntimeservice#BadGatewayException":return[3,2];case"BadRequestException":case"com.amazonaws.lexruntimeservice#BadRequestException":return[3,4];case"ConflictException":case"com.amazonaws.lexruntimeservice#ConflictException":return[3,6];case"DependencyFailedException":case"com.amazonaws.lexruntimeservice#DependencyFailedException":return[3,8];case"InternalFailureException":case"com.amazonaws.lexruntimeservice#InternalFailureException":return[3,10];case"LimitExceededException":case"com.amazonaws.lexruntimeservice#LimitExceededException":return[3,12];case"LoopDetectedException":case"com.amazonaws.lexruntimeservice#LoopDetectedException":return[3,14];case"NotFoundException":case"com.amazonaws.lexruntimeservice#NotFoundException":return[3,16]}return[3,18];case 2:return a=[{}],[4,Nn(n,t)];case 3:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,a.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 4:return u=[{}],[4,Un(n,t)];case 5:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,u.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 6:return c=[{}],[4,Hn(n,t)];case 7:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,c.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 8:return f=[{}],[4,qn(n,t)];case 9:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,f.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 10:return l=[{}],[4,Bn(n,t)];case 11:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,l.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 12:return d=[{}],[4,zn(n,t)];case 13:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,d.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 14:return p=[{}],[4,Fn(n,t)];case 15:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,p.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 16:return h=[{}],[4,Kn(n,t)];case 17:return o=s.__assign.apply(void 0,[s.__assign.apply(void 0,h.concat([b.sent()])),{name:i,$metadata:cr(e)}]),[3,19];case 18:v=n.body,i=v.code||v.Code||i,o=(0,s.__assign)((0,s.__assign)({},v),{name:""+i,message:v.message||v.Message||i,$fault:"client",$metadata:cr(e)}),b.label=19;case 19:return y=o.message||o.Message||i,o.message=y,delete o.Message,[2,Promise.reject(Object.assign(new Error(y),o))]}}))}))},Nn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"BadGatewayException",$fault:"server",$metadata:cr(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}
1))},Un=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"BadRequestException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Hn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"ConflictException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},qn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"DependencyFailedException",$fault:"client",$metadata:cr(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},Bn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"InternalFailureException",$fault:"server",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},zn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"LimitExceededException",$fault:"client",$metadata:cr(e),message:void 0,retryAfterSeconds:void 0},void 0!==e.headers["retry-after"]&&(t.retryAfterSeconds=e.headers["retry-after"]),void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Fn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"LoopDetectedException",$fault:"server",$metadata:cr(e),Message:void 0},void 0!==(n=e.body).Message&&null!==n.Message&&(t.Message=n.Message),[2,t]}))}))},Gn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"NotAcceptableException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Kn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"NotFoundException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Wn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"RequestTimeoutException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Vn=function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var t,n;return(0,s.__generator)(this,(function(r){return t={name:"UnsupportedMediaTypeException",$fault:"client",$metadata:cr(e),message:void 0},void 0!==(n=e.body).message&&null!==n.message&&(t.message=n.message),[2,t]}))}))},Zn=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=(0,s.__read)(t,2),o=r[0],i=r[1];return null===i?e:(0,s.__assign)((0,s.__assign)({},e),((n={})[o]=i,n))}),{})},$n=function(e,t){return e.filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return(0,s.__assign)((0,s.__assign)((0,s.__assign)({},void 0!==e.name&&null!==e.name&&{name:e.name}),void 0!==e.parameters&&null!==e.parameters&&{parameters:Zn(e.parameters,t)}),void 0!==e.timeToLive&&null!==e.timeToLive&&{timeToLive:Yn(e.timeToLive,t)})}(e,t)}))},Yn=function(e,t){return(0,s.__assign)((0,s.__assign)({},void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds&&{timeToLiveInSeconds:e.timeToLiveInSeconds}),void 0!==e.turnsToLive&&null!==e.turnsToLive&&{turnsToLive:e.turnsToLive})},Xn=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=(0,s.__read)(t,2),o=r[0],i=r[1];return null===i?e:(0,s.__assign)((0,s.__assign)({},e),((n={})[o]=i,n))}),{})},Jn=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=(0,s.__read)(t,2),o=r[0],i=r[1];return null===i?e:(0,s.__assign)((0,s.__assign)({},e),((n={})[o]=i,n))}),{})},Qn=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{name:void 0!==e.name&&null!==e.name?e.name:void 0,parameters:void 0!==e.parameters&&null!==e.parameters?Jn(e.parameters,t):void 0,timeToLive:void 0!==e.timeToLive&&null!==e.timeToLive?er(e.timeToLive,t):void 0}}(e,t)}))},er=function(e,t){return{timeToLiveInSeconds:void 0!==e.timeToLiveInSeconds&&null!==e.timeToLiveInSeconds?e.timeToLiveInSeconds:void 0,turnsToLive:void 0!==e.turnsToLive&&null!==e.turnsToLive?e.turnsToLive:void 0}},tr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{attachmentLinkUrl:void 0!==e.attachmentLinkUrl&&null!==e.attachmentLinkUrl?e.attachmentLinkUrl:void 0,buttons:void 0!==e.buttons&&null!==e.buttons?or(e.buttons,t):void 0,imageUrl:void 0!==e.imageUrl&&null!==e.imageUrl?e.imageUrl:void 0,subTitle:void 0!==e.subTitle&&null!==e.subTitle?e.subTitle:void 0,title:void 0!==e.title&&null!==e.title?e.title:void 0}}(e,t)}))},nr=function(e,t){return{score:void 0!==e.score&&null!==e.score?e.score:void 0}},rr=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:ir(e,t)}))},or=function(e,t){return(e||[]).filter((function(e){return null!=e})).map((function(e){return null===e?null:function(e,t){return{text:void 0!==e.text&&null!==e.text?e.text:void 0,value:void 0!==e.value&&null!==e.value?e.value:void 0}}(e)}))},ir=function(e,t){return{intentName:void 0!==e.intentName&&null!==e.intentName?e.intentName:void 0,nluIntentConfidence:void 0!==e.nluIntentConfidence&&null!==e.nluIntentConfidence?nr(e.nluIntentConfidence,t):void 0,slots:void 0!==e.slots&&null!==e.slots?sr(e.slots,t):void 0}},ar=function(e,t){return{contentType:void 0!==e.contentType&&null!==e.contentType?e.contentType:void 0,genericAttachments:void 0!==e.genericAttachments&&null!==e.genericAttachments?tr(e.genericAttachments,t):void 0,version:void 0!==e.version&&null!==e.version?e.version:void 0}}
1,ur=function(e,t){return{sentimentLabel:void 0!==e.sentimentLabel&&null!==e.sentimentLabel?e.sentimentLabel:void 0,sentimentScore:void 0!==e.sentimentScore&&null!==e.sentimentScore?e.sentimentScore:void 0}},sr=function(e,t){return Object.entries(e).reduce((function(e,t){var n,r=(0,s.__read)(t,2),o=r[0],i=r[1];return null===i?e:(0,s.__assign)((0,s.__assign)({},e),((n={})[o]=i,n))}),{})},cr=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"]}},fr=function(e,t){return function(e,t){return void 0===e&&(e=new Uint8Array),e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array)}(e,t).then((function(e){return t.utf8Encoder(e)}))},lr=function(e){return void 0!==e&&null!==e&&""!==e&&(!Object.getOwnPropertyNames(e).includes("length")||0!=e.length)&&(!Object.getOwnPropertyNames(e).includes("size")||0!=e.size)},dr=function(e,t){return fr(e,t).then((function(e){return e.length?JSON.parse(e):{}}))},pr=function(e,t){var n,r,o=function(e){var t=e;return t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(n=e.headers,r="x-amzn-errortype",Object.keys(n).find((function(e){return e.toLowerCase()===r.toLowerCase()})));return void 0!==i?o(e.headers[i]):void 0!==t.code?o(t.code):void 0!==t.__type?o(t.__type):""};var hr=function(){return hr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hr.apply(this,arguments)};function vr(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function yr(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var gr={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},br={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function mr(e,t,n){return{applyToStack:function(r){r.add(function(e,t){return function(n,r){return function(r){return vr(void 0,void 0,void 0,(function(){var o,i;return yr(this,(function(a){switch(a.label){case 0:return[4,n(r)];case 1:return o=a.sent().response,[4,t(o,e)];case 2:return i=a.sent(),[2,{response:o,output:i}]}}))}))}}}(e,n),gr),r.add(function(e,t){return function(n,r){return function(r){return vr(void 0,void 0,void 0,(function(){var o;return yr(this,(function(i){switch(i.label){case 0:return[4,t(r.input,e)];case 1:return o=i.sent(),[2,n(hr(hr({},r),{request:o}))]}}))}))}}}(e,t),br)}}}var wr=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,s.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(mr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostTextCommand",inputFilterSensitiveLog:wn.filterSensitiveLog,outputFilterSensitiveLog:Tn.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,c,f,l;return(0,s.__generator)(this,(function(d){switch(d.label){case 0:if(n={"content-type":"application/json"},r="/bot/{botName}/alias/{botAlias}/user/{userId}/text",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((o=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(r=r.replace("{botName}",zt(o)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");
1if((o=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(r=r.replace("{botAlias}",zt(o)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((o=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return r=r.replace("{userId}",zt(o)),i=JSON.stringify((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({},void 0!==e.activeContexts&&null!==e.activeContexts&&{activeContexts:$n(e.activeContexts,t)}),void 0!==e.inputText&&null!==e.inputText&&{inputText:e.inputText}),void 0!==e.requestAttributes&&null!==e.requestAttributes&&{requestAttributes:Xn(e.requestAttributes,t)}),void 0!==e.sessionAttributes&&null!==e.sessionAttributes&&{sessionAttributes:Xn(e.sessionAttributes,t)})),[4,t.endpoint()];case 1:return a=d.sent(),u=a.hostname,c=a.protocol,f=void 0===c?"https":c,l=a.port,[2,new y({protocol:f,hostname:u,port:l,method:"POST",headers:n,path:r,body:i})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,s.__generator)(this,(function(o){switch(o.label){case 0:return 200!==e.statusCode&&e.statusCode>=300?[2,Dn(e,t)]:(n={$metadata:cr(e),activeContexts:void 0,alternativeIntents:void 0,botVersion:void 0,dialogState:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,responseCard:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},[4,dr(e.body,t)]);case 1:return void 0!==(r=o.sent()).activeContexts&&null!==r.activeContexts&&(n.activeContexts=Qn(r.activeContexts,t)),void 0!==r.alternativeIntents&&null!==r.alternativeIntents&&(n.alternativeIntents=rr(r.alternativeIntents,t)),void 0!==r.botVersion&&null!==r.botVersion&&(n.botVersion=r.botVersion),void 0!==r.dialogState&&null!==r.dialogState&&(n.dialogState=r.dialogState),void 0!==r.intentName&&null!==r.intentName&&(n.intentName=r.intentName),void 0!==r.message&&null!==r.message&&(n.message=r.message),void 0!==r.messageFormat&&null!==r.messageFormat&&(n.messageFormat=r.messageFormat),void 0!==r.nluIntentConfidence&&null!==r.nluIntentConfidence&&(n.nluIntentConfidence=nr(r.nluIntentConfidence,t)),void 0!==r.responseCard&&null!==r.responseCard&&(n.responseCard=ar(r.responseCard,t)),void 0!==r.sentimentResponse&&null!==r.sentimentResponse&&(n.sentimentResponse=ur(r.sentimentResponse,t)),void 0!==r.sessionAttributes&&null!==r.sessionAttributes&&(n.sessionAttributes=sr(r.sessionAttributes,t)),void 0!==r.sessionId&&null!==r.sessionId&&(n.sessionId=r.sessionId),void 0!==r.slotToElicit&&null!==r.slotToElicit&&(n.slotToElicit=r.slotToElicit),void 0!==r.slots&&null!==r.slots&&(n.slots=sr(r.slots,t)),[2,Promise.resolve(n)]}}))}))}(e,t)},t}(Bt),_r=function(e){function t(t){var n=e.call(this)||this;return n.input=t,n}return(0,s.__extends)(t,e),t.prototype.resolveMiddleware=function(e,t,n){this.middlewareStack.use(mr(t,this.serialize,this.deserialize));var r=e.concat(this.middlewareStack),o={logger:t.logger,clientName:"LexRuntimeServiceClient",commandName:"PostContentCommand",inputFilterSensitiveLog:vn.filterSensitiveLog,outputFilterSensitiveLog:gn.filterSensitiveLog},i=t.requestHandler;return r.resolve((function(e){return i.handle(e.request,n||{})}),o)},t.prototype.serialize=function(e,t){return function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r,o,i,a,u,c,f,l;return(0,s.__generator)(this,(function(d){switch(d.label){case 0:if(n=(0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)((0,s.__assign)({"content-type":"application/octet-stream","x-amz-content-sha256":"UNSIGNED-PAYLOAD"},lr(e.sessionAttributes)&&{"x-amz-lex-session-attributes":Rn.from(Cn.fromObject(e.sessionAttributes)).toString("base64")}),lr(e.requestAttributes)&&{"x-amz-lex-request-attributes":Rn.from(Cn.fromObject(e.requestAttributes)).toString("base64")}),lr(e.contentType)&&{"content-type":e.contentType}),lr(e.accept)&&{accept:e.accept}),lr(e.activeContexts)&&{"x-amz-lex-active-contexts":Rn.from(Cn.fromObject(e.activeContexts)).toString("base64")}),r="/bot/{botName}/alias/{botAlias}/user/{userId}/content",void 0===e.botName)throw new Error("No value provided for input HTTP label: botName.");if((o=e.botName).length<=0)throw new Error("Empty value provided for input HTTP label: botName.");if(r=r.replace("{botName}",zt(o)),void 0===e.botAlias)throw new Error("No value provided for input HTTP label: botAlias.");
1if((o=e.botAlias).length<=0)throw new Error("Empty value provided for input HTTP label: botAlias.");if(r=r.replace("{botAlias}",zt(o)),void 0===e.userId)throw new Error("No value provided for input HTTP label: userId.");if((o=e.userId).length<=0)throw new Error("Empty value provided for input HTTP label: userId.");return r=r.replace("{userId}",zt(o)),void 0!==e.inputStream&&(i=e.inputStream),[4,t.endpoint()];case 1:return a=d.sent(),u=a.hostname,c=a.protocol,f=void 0===c?"https":c,l=a.port,[2,new y({protocol:f,hostname:u,port:l,method:"POST",headers:n,path:r,body:i})]}}))}))}(e,t)},t.prototype.deserialize=function(e,t){return function(e,t){return(0,s.__awaiter)(void 0,void 0,void 0,(function(){var n,r;return(0,s.__generator)(this,(function(o){return 200!==e.statusCode&&e.statusCode>=300?[2,Mn(e,t)]:(n={$metadata:cr(e),activeContexts:void 0,alternativeIntents:void 0,audioStream:void 0,botVersion:void 0,contentType:void 0,dialogState:void 0,inputTranscript:void 0,intentName:void 0,message:void 0,messageFormat:void 0,nluIntentConfidence:void 0,sentimentResponse:void 0,sessionAttributes:void 0,sessionId:void 0,slotToElicit:void 0,slots:void 0},void 0!==e.headers["content-type"]&&(n.contentType=e.headers["content-type"]),void 0!==e.headers["x-amz-lex-intent-name"]&&(n.intentName=e.headers["x-amz-lex-intent-name"]),void 0!==e.headers["x-amz-lex-nlu-intent-confidence"]&&(n.nluIntentConfidence=new Cn(Rn.from(e.headers["x-amz-lex-nlu-intent-confidence"],"base64").toString("ascii"))),void 0!==e.headers["x-amz-lex-alternative-intents"]&&(n.alternativeIntents=new Cn(Rn.from(e.headers["x-amz-lex-alternative-intents"],"base64").toString("ascii"))),void 0!==e.headers["x-amz-lex-slots"]&&(n.slots=new Cn(Rn.from(e.headers["x-amz-lex-slots"],"base64").toString("ascii"))),void 0!==e.headers["x-amz-lex-session-attributes"]&&(n.sessionAttributes=new Cn(Rn.from(e.headers["x-amz-lex-session-attributes"],"base64").toString("ascii"))),void 0!==e.headers["x-amz-lex-sentiment"]&&(n.sentimentResponse=e.headers["x-amz-lex-sentiment"]),void 0!==e.headers["x-amz-lex-message"]&&(n.message=e.headers["x-amz-lex-message"]),void 0!==e.headers["x-amz-lex-message-format"]&&(n.messageFormat=e.headers["x-amz-lex-message-format"]),void 0!==e.headers["x-amz-lex-dialog-state"]&&(n.dialogState=e.headers["x-amz-lex-dialog-state"]),void 0!==e.headers["x-amz-lex-slot-to-elicit"]&&(n.slotToElicit=e.headers["x-amz-lex-slot-to-elicit"]),void 0!==e.headers["x-amz-lex-input-transcript"]&&(n.inputTranscript=e.headers["x-amz-lex-input-transcript"]),void 0!==e.headers["x-amz-lex-bot-version"]&&(n.botVersion=e.headers["x-amz-lex-bot-version"]),void 0!==e.headers["x-amz-lex-session-id"]&&(n.sessionId=e.headers["x-amz-lex-session-id"]),void 0!==e.headers["x-amz-lex-active-contexts"]&&(n.activeContexts=new Cn(Rn.from(e.headers["x-amz-lex-active-contexts"],"base64").toString("ascii"))),r=e.body,n.audioStream=r,[2,Promise.resolve(n)])}))}))}(e,t)},t}(Bt),Sr=n(71883),Er=n(92752),Or=function(e){if(e instanceof Blob||e instanceof ReadableStream)return new Response(e).arrayBuffer().then((function(e){return new Uint8Array(e)}));throw new Error("Readable is not supported.")},xr=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])},e(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)}}(),Pr=function(){return Pr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Pr.apply(this,arguments)},Ar=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Tr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Ir=new r.k("AWSLexProvider"),kr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n._botsCompleteCallback={},n}return xr(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.reportBotStatus=function(e,t){var n=this;Ir.debug("postContent state",e.dialogState),"ReadyForFulfillment"!==e.dialogState&&"Fulfilled"!==e.dialogState||("function"===typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t](null,{slots:e.slots})}),0),this._config&&"function"===typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete(null,{slots:e.slots})}),0)),"Failed"===e.dialogState&&("function"===typeof this._botsCompleteCallback[t]&&setTimeout((function(){return n._botsCompleteCallback[t]("Bot conversation failed")}),0),this._config&&"function"===typeof this._config[t].onComplete&&setTimeout((function(){return n._config[t].onComplete("Bot c
1onversation failed")}),0))},t.prototype.sendMessage=function(e,t){return Ar(this,void 0,void 0,(function(){var n,r,o,i,a,u,s,c,f,l;return Tr(this,(function(d){switch(d.label){case 0:return this._config[e]?[4,Sr.cN.get()]:[2,Promise.reject("Bot "+e+" does not exist")];case 1:if(!(n=d.sent()))return[2,Promise.reject("No credentials")];if(this.lexRuntimeServiceClient=new Ln({region:this._config[e].region,credentials:n,customUserAgent:(0,Er.Zm)()}),"string"!==typeof t)return[3,6];r={botAlias:this._config[e].alias,botName:e,inputText:t,userId:n.identityId},Ir.debug("postText to lex",t),d.label=2;case 2:return d.trys.push([2,4,,5]),o=new wr(r),[4,this.lexRuntimeServiceClient.send(o)];case 3:return c=d.sent(),this.reportBotStatus(c,e),[2,c];case 4:return i=d.sent(),[2,Promise.reject(i)];case 5:return[3,11];case 6:a=t.content,u=t.options.messageType,r="voice"===u?{botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000",inputStream:a,userId:n.identityId,accept:"audio/mpeg"}:{botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:a,userId:n.identityId,accept:"audio/mpeg"},Ir.debug("postContent to lex",t),d.label=7;case 7:return d.trys.push([7,10,,11]),s=new _r(r),[4,this.lexRuntimeServiceClient.send(s)];case 8:return c=d.sent(),[4,Or(c.audioStream)];case 9:return f=d.sent(),this.reportBotStatus(c,e),[2,Pr(Pr({},c),{audioStream:f})];case 10:return l=d.sent(),[2,Promise.reject(l)];case 11:return[2]}}
1))}))},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new ErrorEvent("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(u),Cr=function(){return Cr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cr.apply(this,arguments)},jr=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},Lr=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Rr=new r.k("Interactions"),Mr=function(){function e(e){this._options=e,Rr.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,n=e?e.Interactions||e:{};Rr.debug("configure Interactions",{opt:n}),this._options=Cr(Cr({bots:{}},n),n.Interactions);var r=this._options.aws_bots_config,o=this._options.bots;return!Object.keys(o).length&&r&&Array.isArray(r)&&r.forEach((function(e){t._options.bots[e.name]=e})),!this._pluggables.AWSLexProvider&&o&&Object.keys(o).map((function(e){return o[e]})).find((function(e){return!e.providerName||"AWSLexProvider"===e.providerName}))&&(this._pluggables.AWSLexProvider=new kr),Object.keys(this._pluggables).map((function(e){t._pluggables[e].configure(t._options.bots)})),this._options},e.prototype.addPluggable=function(e){if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Bot "+e.getProviderName()+" already plugged");return e.configure(this._options.bots),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return jr(this,void 0,void 0,(function(){var n;return Lr(this,(function(r){switch(r.label){case 0:if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");if(n=this._options.bots[e].providerName||"AWSLexProvider",!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");return[4,this._pluggables[n].sendMessage(e,t)];case 1:return[2,r.sent()]}}))}))},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var n=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");this._pluggables[n].onComplete(e,t)},e}(),Dr=new Mr(null);o.dQ.register(Dr)},13117:function(e,t,n){"use strict";n.d(t,{x:function(){return c}});var r=n(35069),o=n(25387),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},u=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e},s=new r.k("Predictions"),c=new(function(){function e(e){this._options=e,this._convertPluggables=[],this._identifyPluggables=[],this._interpretPluggables=[]}return e.prototype.getModuleName=function(){return"Predictions"},e.prototype.addPluggable=function(e){if(this.getPluggable(e.getProviderName()))throw new Error("Pluggable with name "+e.getProviderName()+" has already been added.");var t=!1;this.implementsConvertPluggable(e)&&(this._convertPluggables.push(e),t=!0),this.implementsIdentifyPluggable(e)&&(this._identifyPluggables.push(e),t=!0),this.implementsInterpretPluggable(e)&&(this._interpretPluggables.push(e),t=!0),t&&this.configurePluggable(e)},e.prototype.getPluggable=function(e){var t=this.getAllProviders().find((function(t){return t.getProviderName()===e}));return void 0===t?(s.debug("No plugin found with providerName=>",e),null):t},e.prototype.removePluggable=function(e){this._convertPluggables=this._convertPluggables.filter((function(t){return t.getProviderName()!==e})),this._identifyPluggables=this._identifyPluggables.filter((function(t){return t.getProviderName()!==e})),this._interpretPluggables=this._interpretPluggables.filter((function(t){return t.getProviderName()!==e}))},e.prototype.configure=function(e){var t=this,n=e?e.predictions||e:{};n=i(i({},n),e),this._options=Object.assign({},this._options,n),s.debug("configure Predictions",this._options),this.getAllProviders().forEac
1h((function(e){return t.configurePluggable(e)}))},e.prototype.interpret=function(e,t){return this.getPluggableToExecute(this._interpretPluggables,t).interpret(e)},e.prototype.convert=function(e,t){return this.getPluggableToExecute(this._convertPluggables,t).convert(e)},e.prototype.identify=function(e,t){return this.getPluggableToExecute(this._identifyPluggables,t).identify(e)},e.prototype.getPluggableToExecute=function(e,t){if(t&&t.providerName)return u(e).find((function(e){return e.getProviderName()===t.providerName}));if(1===e.length)return e[0];throw new Error("More than one or no providers are configured, Either specify a provider name or configure exactly one provider")},e.prototype.getAllProviders=function(){return u(this._convertPluggables,this._identifyPluggables,this._interpretPluggables)},e.prototype.configurePluggable=function(e){var t=Object.assign({},this._options.predictions,this._options[e.getCategory().toLowerCase()]);e.configure(t)},e.prototype.implementsConvertPluggable=function(e){return e&&"function"===typeof e.convert},e.prototype.implementsIdentifyPluggable=function(e){return e&&"function"===typeof e.identify},e.prototype.implementsInterpretPluggable=function(e){return e&&"function"===typeof e.interpret},e}())({});o.dQ.register(c)},55823:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)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 o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1)),r(n(2)),r(n(3)),r(n(4)),r(n(5)),r(n(6)),r(n(7)),r(n(8)),r(n(9)),r(n(10)),r(n(11)),r(n(12)),r(n(13))},function(e,t,n){e.exports={a:"Anchor__a___1_Iz8"}},function(e,t,n){e.exports={button:"Button__button___vS7Mv",signInButton:"Button__signInButton___3bUH-",googleSignInButton:"Button__googleSignInButton___1YiCu",signInButtonIcon:"Button__signInButtonIcon___ihN75",auth0SignInButton:"Button__auth0SignInButton___znnCj",facebookSignInButton:"Button__facebookSignInButton___34Txh",amazonSignInButton:"Button__amazonSignInButton___2EMtl",oAuthSignInButton:"Button__oAuthSignInButton___3UGOl",signInButtonContent:"Button__signInButtonContent___xqTXJ"}},function(e,t,n){e.exports={formContainer:"Form__formContainer___1GA3x",formSection:"Form__formSection___1PPvW",formField:"Form__formField___38Ikl",formRow:"Form__formRow___2mwRs"}},function(e,t,n){e.exports={hint:"Hint__hint___2XngB"}},function(e,t,n){e.exports={input:"Input__input___3e_bf",inputLabel:"Input__inputLabel___3VF0S",label:"Input__label___23sO8",radio:"Input__radio___2hllK"}},function(e,t,n){e.exports={navBar:"Nav__navBar___xtCFA",navRight:"Nav__navRight___1QG2J",nav:"Nav__nav___2Dx2Y",navItem:"Nav__navItem___1LtFQ"}},function(e,t,n){e.exports={photoPickerButton:"PhotoPicker__photoPickerButton___2XdVn",photoPlaceholder:"PhotoPicker__photoPlaceholder___2JXO4",photoPlaceholderIcon:"PhotoPicker__photoPlaceholderIcon___3Et71"}},function(e,t,n){e.exports={container:"Section__container___3YYTG",actionRow:"Section__actionRow___2LWSU",sectionHeader:"Section__sectionHeader___2djyg",sectionHeaderHint:"Section__sectionHeaderHint___3Wxdc",sectionBody:"Section__sectionBody___ihqqd",sectionHeaderContent:"Section__sectionHeaderContent___1UCqa",sectionFooter:"Section__sectionFooter___1T54C",sectionFooterPrimaryContent:"Section__sectionFooterPrimaryContent___2r9ZX",sectionFooterSecondaryContent:"Section__sectionFooterSecondaryContent___Nj41Q"}},function(e,t,n){e.exports={selectInput:"SelectInput__selectInput___3efO4"}},function(e,t,n){e.exports={strike:"Strike__strike___1XV1b",strikeContent:"Strike__strikeContent___10gLb"}},function(e,t,n){e.exports={toast:"Toast__toast___XXr3v",toastClose:"Toast__toastClose___18lU4"}},function(e,t,n){e.exports={totpQrcode:"Totp__totpQrcode___1crLx"}},function(e,t,n){e.exports={sumerianSceneContainer:"XR__sumerianSceneContainer___3nVMt",sumerianScene:"XR__sumerianScene___2Tt7-",loadingOverlay:"XR__loadingOverlay___IbqcI",loadingContainer:"XR__loadingContainer___2Itxb",loadingLogo:"XR__loadingLogo___Ub7xQ",loadingSceneName:"XR__loadingSceneName___3__ne",loadingBar:"XR__loadingBar___2vcke",loadingBarFill:"XR__loadingBarFill___3M-D9",sceneErrorText:"XR__sceneErrorText___2y0tp",sce
1neBar:"XR__sceneBar___2ShrP",sceneName:"XR__sceneName___1ApHr",sceneActions:"XR__sceneActions___7plGs",actionButton:"XR__actionButton___2poIM",tooltip:"XR__tooltip___UYyhn",actionIcon:"XR__actionIcon___2qnd2",autoShowTooltip:"XR__autoShowTooltip___V1QH7"}}])},60633:function(e,t,n){"use strict";n.d(t,{XR:function(){return k}});var r=n(35069),o=n(25387),i=n(12679),a=n(71883),u=n(885),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)},c=new r.k("AbstractXRProvider"),f=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=s(s({},e),this._config),c.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"XR"},Object.defineProperty(e.prototype,"options",{get:function(){return s({},this._config)},enumerable:!0,configurable:!0}),e}(),l=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])},e(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)}}(),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(Error),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t}(d),m=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])},e(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)}}(),w=function(){return w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},w.apply(this,arguments)},_=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},S=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},E=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.")},O=new r.k("SumerianProvider"),x=function(e){function t(t){return void 0===t&&(t={}),e.call(this,t)||this}return m(t,e),t.prototype.getProviderName=function(){return"SumerianProvider"},t.prototype.loadScript=function(e){return _(this,void 0,void 0,(function(){return S(this,(function(t){return[2,new Promise((function(t,n){var r=document.createElement("script");r.src=e,r.addEventListener("load",(function(e){t()})),r.addEventListener("error",(function(t){n(new Error("Failed to load script: "+e))})),document.head.appendChild(r)}))]}))}))},t.prototype.loadScene=function(e,t,n){return _(this,void 0,void 0,(function(){var r,o,s,c,f,l,d,p,h,v,b,m,_,x,P,A,T,I,k,C,j,L,R,M,D,N,U;return S(this,(function(S){switch(S.label){case 0:if(!e)throw l="No scene name passed into loadScene",O.error(l),new g(l);if(!t)throw l="No dom element id passed into loadScene",O.error(l),new y(l);if(!(r=document.getElementById(t)))throw l="DOM element id, "+t+" not found",O.error(l),new y(l);if(!(o=this.getScene(e)).sceneConfig)throw l="No scene config configured for scene: "+e,O.error(l),new g(l);if(s=o.sceneConfig.url,c=o.sceneConfig.sceneId,o.sceneConfig.hasOwnProperty("region"))f=o.sceneConfig.region;else{if(!this.options.hasOwnProperty("region"))throw l="No region configured for scene: "+e,O.error(l),new g(l);f=this.options.region}d={region:f,customUserAgent:i.gT.userAgent+"-SumerianScene"},p={headers:{"X-Amz-User-Agent":i.gT.userAgent}},h=s,S.label=1;case 1:return S.trys.push([1,3,,4]),[4,a.cN.get()];
1case 2:return v=S.sent(),d.credentials=v,b={secret_key:v.secretAccessKey,access_key:v.accessKeyId,session_token:v.sessionToken},m={region:f,service:"sumerian"},_=u.E.sign({method:"GET",url:s},b,m),p.headers=w(w({},p.headers),_.headers),h=_.url,[3,4];case 3:return S.sent(),O.debug("No credentials available, the request will be unsigned"),[3,4];case 4:return[4,fetch(h,p)];case 5:return[4,(x=S.sent()).json()];case 6:if(P=S.sent(),403===x.status)throw P.message?(O.error("Failure to authenticate user: "+P.message),new g("Failure to authenticate user: "+P.message)):(O.error("Failure to authenticate user"),new g("Failure to authenticate user"));return A=P.bundleData[c],[4,fetch(A.url,{headers:A.headers})];case 7:return[4,S.sent().json()];case 8:T=S.sent(),S.label=9;case 9:return S.trys.push([9,11,,12]),[4,this.loadScript(T[c].bootstrapperUrl)];case 10:return S.sent(),[3,12];case 11:throw I=S.sent(),O.error(I),new g(I);case 12:return k=n.progressCallback?n.progressCallback:void 0,C=o.publishParamOverrides?o.publishParamOverrides:void 0,j={element:r,sceneId:c,sceneBundle:T,apiResponse:P,progressCallback:k,publishParamOverrides:C,awsSDKConfigOverride:d},[4,window.SumerianBootstrapper.loadScene(j)];case 13:L=S.sent(),o.sceneController=L,o.isLoaded=!0;try{for(R=E(L.sceneLoadWarnings),M=R.next();!M.done;M=R.next())D=M.value,O.warn("loadScene warning: "+D)}catch(H){N={error:H}}finally{try{M&&!M.done&&(U=R.return)&&U.call(R)}finally{if(N)throw N.error}}return[2]}}
1))}))},t.prototype.isSceneLoaded=function(e){return this.getScene(e).isLoaded||!1},t.prototype.getScene=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw O.error(t),new p(t)}if(!e){t="No scene name was passed";throw O.error(t),new h(t)}if(!this.options.scenes[e]){t="Scene '"+e+"' is not configured";throw O.error(t),new h(t)}return this.options.scenes[e]},t.prototype.getSceneController=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw O.error(t),new p(t)}var n=this.options.scenes[e];if(!n){t="Scene '"+e+"' is not configured";throw O.error(t),new h(t)}var r=n.sceneController;if(!r){t="Scene controller for '"+e+"' has not been loaded";throw O.error(t),new v(t)}return r},t.prototype.isVRCapable=function(e){return this.getSceneController(e).vrCapable},t.prototype.isVRPresentationActive=function(e){return this.getSceneController(e).vrPresentationActive},t.prototype.start=function(e){this.getSceneController(e).start()},t.prototype.enterVR=function(e){this.getSceneController(e).enterVR()},t.prototype.exitVR=function(e){this.getSceneController(e).exitVR()},t.prototype.isMuted=function(e){return this.getSceneController(e).muted},t.prototype.setMuted=function(e,t){this.getSceneController(e).muted=t},t.prototype.onSceneEvent=function(e,t,n){this.getSceneController(e).on(t,n)},t.prototype.enableAudio=function(e){this.getSceneController(e).enableAudio()},t}(f),P=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},T=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},I=new r.k("XR"),k=new(function(){function e(e){this._options=e,I.debug("XR Options",this._options),this._defaultProvider="SumerianProvider",this._pluggables={},this.addPluggable(new x)}return e.prototype.configure=function(e){var t=this,n=e?e.XR||e:{};return I.debug("configure XR",{opt:n}),this._options=Object.assign({},this._options,n),Object.entries(this._pluggables).map((function(e){var r=T(e,2),o=r[0],i=r[1];o!==t._defaultProvider||n[t._defaultProvider]?i.configure(t._options[o]):i.configure(t._options)})),this._options},e.prototype.addPluggable=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){return e&&"XR"===e.getCategory()?(this._pluggables[e.getProviderName()]=e,[2,e.configure(this._options)]):[2]}))}))},e.prototype.loadScene=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r=this._defaultProvider),P(this,void 0,void 0,(function(){return A(this,(function(o){switch(o.label){case 0:if(!this._pluggables[r])throw new b("Provider '"+r+"' not configured");return[4,this._pluggables[r].loadScene(e,t,n)];case 1:return[2,o.sent()]}}))}))},e.prototype.isSceneLoaded=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].isSceneLoaded(e)},e.prototype.getSceneController=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].getSceneController(e)},e.prototype.isVRCapable=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].isVRCapable(e)},e.prototype.isVRPresentationActive=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].isVRPresentationActive(e)},e.prototype.start=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].start(e)},e.prototype.enterVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].enterVR(e)},e.prototype.exitVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].exitVR(e)},e.prototype.isMuted=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].isMuted(e)},e.prototype.setMuted=function(e,t,n){if(void 0===n&&(n=this._defaultProvider),!this._pluggables[n])throw new b("Provider '"+n+"' not configured");return this._pluggables[n].setMuted(e,t)},e.prototype.onSceneEvent=function(e,t,n,r){if(void 0===r&&(r=this._defaultProvider),!this._pluggables[r])throw new b("Provider '"+r+"' not configured");return this._pluggables[r].onSceneEvent(e,t,n)},e.prototype.enableAudio=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new b("Provider '"+t+"' not configured");return this._pluggables[t].enableAudio(e)},e}())(null);o.dQ.register(k)},5290:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},47863:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},67479:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},91682:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},10087:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},32998:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(62465);r.__exportStar(n(5290),t),r.__exportStar(n(47863),t),r.__exportStar(n(67479),t),r.__exportStar(n(91682),t),r.__exportStar(n(10087),t)},62465:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},84663:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},4703:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(1915),o=n(9541),i=n(99115),a=n(53180),u=n(32998),s=n(56495),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.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},1915:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(757),o=n(84663),i=n(55912),a=n(56495),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.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,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(s(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 s(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},64298:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(1366).__exportStar)(n(4703),t);var r=n(1915);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(9541);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},9541:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(98033),o=n(84663),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.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,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},1366:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 5,362 bytes, line 1
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},26826:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(72186),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw 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 o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,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 i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},72186:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},99115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(92512).__exportStar)(n(47277),t)},47277:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(92512),o=n(72186),i=n(26826),a=n(98033),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.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,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(t){this.error=t}},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=u},92512:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},53180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(13587).__exportStar(n(57426),t)},57426: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(13587),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}
1))}))}},13587:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},99071:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(55912),i="undefined"!==typeof r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},98033: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(99071);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(1404);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(20799);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(48147);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},1404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},20799:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},48147:function(e,t){"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)}},55912:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return o}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=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 o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},5477:function(e,t,n){var r=n(97891),o=n(18163),i=o;i.v1=r,i.v4=o,e.exports=i},40628:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},69566:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},97891:function(e,t,n){var r,o,i=n(69566),a=n(40628),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},18163:function(e,t,n){var r=n(69566),o=n(40628);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},68344:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(97128),o=n(18401),i=n(77577),a=function(){function e(){this.crc32=new i.Crc32}return e.prototype.update=function(e){(0,o.isEmptyData)(e)||this.crc32.update((0,o.convertToBuffer)(e))},e.prototype.digest=function(){return(0,r.__awaiter)(this,void 0,void 0,(function(){return(0,r.__generator)(this,(function(e){return[2,(0,o.numToUint8)(this.crc32.digest())]}))}))},e}();t.AwsCrc32=a},77577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(97128),o=n(18401);t.crc32=function(e){return(new i).update(e).digest()};var i=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var o=(0,r.__values)(e),i=o.next();!i.done;i=o.next()){var u=i.value;this.checksum=this.checksum>>>8^a[255&(this.checksum^u)]}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=(0,o.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),u=n(68344);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return u.AwsCrc32}})},97128:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},34265:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},44894:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15065:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},63270:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},90810:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(74289);r.__exportStar(n(34265),t),r.__exportStar(n(317),t),r.__exportStar(n(44894),t),r.__exportStar(n(15065),t),r.__exportStar(n(63270),t)},74289:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},60054:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},39957:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(26808),o=n(25208),i=n(73440),a=n(55942),u=n(90810),s=n(56495),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.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},26808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(84984),o=n(60054),i=n(8230),a=n(56495),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.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,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(s(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 s(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},29594:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(75726).__exportStar)(n(39957),t);var r=n(26808);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(25208);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},84984:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},25208:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(18401),o=n(60054),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.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,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},75726:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 5,362 bytes, line 1
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},48439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(75080),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw 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 o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,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 i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},75080:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},73440:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(93152).__exportStar)(n(64914),t)},64914:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(93152),o=n(75080),i=n(48439),a=n(18401),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.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,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(t){this.error=t}},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=u},93152:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},55942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(21174).__exportStar(n(33882),t)},33882: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(21174),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}
1))}))}},21174:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},21136:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(8230),i="undefined"!==typeof r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},18401: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(21136);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(31010);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(21902);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(53461);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},31010:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},21902:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},53461:function(e,t){"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)}},48321:function(e,t,n){"use strict";n.d(t,{aW:function(){return a},Zn:function(){return r}});var r=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}();var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var a=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(o(o({},this),{headers:o({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,a=t[n];return o(o({},e),((r={})[n]=Array.isArray(a)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(a):a,r))}),{}))),n},e}()},8230:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return o}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=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 o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}
1else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},59263:function(e,t,n){var r=n(98018),o=n(4689),i=o;i.v1=r,i.v4=o,e.exports=i},1142:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},66602:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},98018:function(e,t,n){var r,o,i=n(66602),a=n(1142),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},4689:function(e,t,n){var r=n(66602),o=n(1142);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},47150:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},14607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},53630:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35338:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},82662:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},74653:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16977);r.__exportStar(n(47150),t),r.__exportStar(n(14607),t),r.__exportStar(n(53630),t),r.__exportStar(n(35338),t),r.__exportStar(n(82662),t)},16977:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},96585:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},79815:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(99941),o=n(49699),i=n(83779),a=n(61746),u=n(74653),s=n(56495),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.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},99941:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(37107),o=n(96585),i=n(64294),a=n(56495),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.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,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(s(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 s(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},57752:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(58463).__exportStar)(n(79815),t);var r=n(99941);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(49699);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},37107:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},49699:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(59998),o=n(96585),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.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,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},58463:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 5,362 bytes, line 1
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},15849:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(40408),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw 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 o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,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 i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},40408:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},83779:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(37524).__exportStar)(n(40779),t)},40779:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(37524),o=n(40408),i=n(15849),a=n(59998),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.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,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(t){this.error=t}},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=u},37524:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},61746:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(32413).__exportStar(n(65681),t)},65681: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(32413),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}
1))}))}},32413:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},98392:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(64294),i="undefined"!==typeof r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},59998: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(98392);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(74506);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(39396);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(12277);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},74506:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},39396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},12277:function(e,t){"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)}},64294:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return o}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=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 o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},7164:function(e,t,n){var r=n(69048),o=n(37764),i=o;i.v1=r,i.v4=o,e.exports=i},42858:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},75739:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},69048:function(e,t,n){var r,o,i=n(75739),a=n(42858),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},37764:function(e,t,n){var r=n(75739),o=n(42858);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},71244:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},3006:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},43392:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},75173:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},26113:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(36244);r.__exportStar(n(71244),t),r.__exportStar(n(3006),t),r.__exportStar(n(43392),t),r.__exportStar(n(60832),t),r.__exportStar(n(75173),t)},36244:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},16961:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},37716:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(69924),o=n(45286),i=n(72005),a=n(73806),u=n(26113),s=n(56495),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.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},69924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(53888),o=n(16961),i=n(70167),a=n(56495),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.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,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(s(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 s(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},84199:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(87093).__exportStar)(n(37716),t);var r=n(69924);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(45286);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},53888:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},45286:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(20229),o=n(16961),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.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,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},87093:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 5,362 bytes, line 1
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},11469:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(59221),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw 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 o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,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 i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},59221:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},72005:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(98293).__exportStar)(n(98406),t)},98406:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(98293),o=n(59221),i=n(11469),a=n(20229),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.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,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(t){this.error=t}},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=u},98293:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},73806:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(80797).__exportStar(n(6353),t)},6353: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(80797),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}
1))}))}},80797:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},38781:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(70167),i="undefined"!==typeof r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},20229: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(38781);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(6870);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(79484);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(91315);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},6870:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},79484:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},91315:function(e,t){"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)}},70167:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return o}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=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 o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},57686:function(e,t,n){var r=n(62529),o=n(93139),i=o;i.v1=r,i.v4=o,e.exports=i},27882:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},84370:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},62529:function(e,t,n){var r,o,i=n(84370),a=n(27882),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},93139:function(e,t,n){var r=n(84370),o=n(27882);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},92465:function(e,t){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},53058:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},52137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},85826:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5431:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMsWindow=void 0;var n=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];t.isMsWindow=function(e){if(function(e){return"MSInputMethodContext"in e&&"msCrypto"in e}(e)&&void 0!==e.msCrypto.subtle){var t=e.msCrypto,r=t.getRandomValues,o=t.subtle;return n.map((function(e){return o[e]})).concat(r).every((function(e){return"function"===typeof e}))}return!1}},26857:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3850);r.__exportStar(n(92465),t),r.__exportStar(n(53058),t),r.__exportStar(n(52137),t),r.__exportStar(n(85826),t),r.__exportStar(n(5431),t)},3850:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},33443:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_DATA_SHA_256=t.SHA_256_HMAC_ALGO=t.SHA_256_HASH=void 0,t.SHA_256_HASH={name:"SHA-256"},t.SHA_256_HMAC_ALGO={name:"HMAC",hash:t.SHA_256_HASH},t.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},79743:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(2539),o=n(44798),i=n(21473),a=n(83380),u=n(26857),s=n(56495),c=function(){function e(e){(0,a.supportsWebCrypto)((0,s.locateWindow)())?this.hash=new o.Sha256(e):(0,u.isMsWindow)((0,s.locateWindow)())?this.hash=new r.Sha256(e):this.hash=new i.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},2539:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(79092),o=n(33443),i=n(36811),a=n(56495),u=function(){function e(e){e?(this.operation=function(e){return new Promise((function(t,n){var r=(0,a.locateWindow)().msCrypto.subtle.importKey("raw",s(e),o.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,a.locateWindow)().msCrypto.subtle.sign(o.SHA_256_HMAC_ALGO,e)})),this.operation.catch((function(){}))):this.operation=Promise.resolve((0,a.locateWindow)().msCrypto.subtle.digest("SHA-256"))}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(s(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 s(e){return"string"===typeof e?(0,i.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}t.Sha256=u},94391:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoSha256=t.Ie11Sha256=void 0,(0,n(76090).__exportStar)(n(79743),t);var r=n(2539);Object.defineProperty(t,"Ie11Sha256",{enumerable:!0,get:function(){return r.Sha256}});var o=n(44798);Object.defineProperty(t,"WebCryptoSha256",{enumerable:!0,get:function(){return o.Sha256}})},79092:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},44798:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(68498),o=n(33443),i=n(56495),a=function(){function e(e){this.toHash=new Uint8Array(0),void 0!==e&&(this.key=new Promise((function(t,n){(0,i.locateWindow)().crypto.subtle.importKey("raw",(0,r.convertToBuffer)(e),o.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,i.locateWindow)().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):(0,r.isEmptyData)(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return(0,i.locateWindow)().crypto.subtle.digest(o.SHA_256_HASH,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e}();t.Sha256=a},76090:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
vendor: 5,362 bytes, line 1
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},90799:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawSha256=void 0;var r=n(69138),o=function(){function e(){this.state=Int32Array.from(r.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw 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 o=this.bufferLength;o<r.BLOCK_SIZE;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<r.BLOCK_SIZE-8;o++)t.setUint8(o,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 i=new Uint8Array(r.DIGEST_LENGTH);for(o=0;o<8;o++)i[4*o]=this.state[o]>>>24&255,i[4*o+1]=this.state[o]>>>16&255,i[4*o+2]=this.state[o]>>>8&255,i[4*o+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],o=t[1],i=t[2],a=t[3],u=t[4],s=t[5],c=t[6],f=t[7],l=0;l<r.BLOCK_SIZE;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var v=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&s^~u&c)|0)+(f+(r.KEY[l]+this.temp[l]|0)|0)|0,y=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&o^n&i^o&i)|0;f=c,c=s,s=u,u=a+v|0,a=i,i=o,o=n,n=v+y|0}t[0]+=n,t[1]+=o,t[2]+=i,t[3]+=a,t[4]+=u,t[5]+=s,t[6]+=c,t[7]+=f},e}();t.RawSha256=o},69138:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_HASHABLE_LENGTH=t.INIT=t.KEY=t.DIGEST_LENGTH=t.BLOCK_SIZE=void 0,t.BLOCK_SIZE=64,t.DIGEST_LENGTH=32,t.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),t.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],t.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},21473:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,n(96021).__exportStar)(n(45179),t)},45179:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sha256=void 0;var r=n(96021),o=n(69138),i=n(90799),a=n(68498),u=function(){function e(e){if(this.hash=new i.RawSha256,e){this.outer=new i.RawSha256;var t=function(e){var t=(0,a.convertToBuffer)(e);if(t.byteLength>o.BLOCK_SIZE){var n=new i.RawSha256;n.update(t),t=n.digest()}var r=new Uint8Array(o.BLOCK_SIZE);return r.set(t),r}(e),n=new Uint8Array(o.BLOCK_SIZE);n.set(t);for(var r=0;r<o.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,a.isEmptyData)(e)&&!this.error)try{this.hash.update((0,a.convertToBuffer)(e))}catch(t){this.error=t}},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=u},96021:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E}
1,__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},83380:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(84205).__exportStar(n(57237),t)},57237: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(84205),o=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function i(e){return"object"===typeof e&&"object"===typeof e.crypto&&"function"===typeof e.crypto.getRandomValues}function a(e){return e&&o.every((function(t){return"function"===typeof e[t]}))}t.supportsWebCrypto=function(e){return!(!i(e)||"object"!==typeof e.crypto.subtle)&&a(e.crypto.subtle)},t.supportsSecureRandom=i,t.supportsSubtleCrypto=a,t.supportsZeroByteGCM=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(n){switch(n.label){case 0:if(!a(e))return[2,!1];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=n.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return[2,16===n.sent().byteLength];case 4:return n.sent(),[2,!1];case 5:return[2]}}
1))}))}},84205:function(e,t,n){"use strict";n.r(t),n.d(t,{__assign:function(){return i},__asyncDelegator:function(){return w},__asyncGenerator:function(){return m},__asyncValues:function(){return _},__await:function(){return b},__awaiter:function(){return f},__classPrivateFieldGet:function(){return x},__classPrivateFieldSet:function(){return P},__createBinding:function(){return d},__decorate:function(){return u},__exportStar:function(){return p},__extends:function(){return o},__generator:function(){return l},__importDefault:function(){return O},__importStar:function(){return E},__makeTemplateObject:function(){return S},__metadata:function(){return c},__param:function(){return s},__read:function(){return v},__rest:function(){return a},__spread:function(){return y},__spreadArrays:function(){return g},__values:function(){return h}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function u(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(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 f(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(t){i(t)}}function u(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,u)}s((r=r.apply(e,t||[])).next())}))}function l(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(u){i=[6,u],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function d(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function p(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function h(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 v(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function m(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(s,c):f(i[0][2],n)}catch(r){f(i[0][3],r)}var n}function s(e){u("next",e)}function c(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}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=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function O(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function P(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},41623:function(e,t,n){"use strict";var r=n(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var o=n(36811),i="undefined"!==typeof r&&r.from?function(e){return r.from(e,"utf8")}:o.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"===typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},68498: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(41623);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var o=n(27850);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return o.isEmptyData}});var i=n(72861);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return i.numToUint8}});var a=n(66756);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return a.uint32ArrayFrom}})},27850:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"===typeof e?0===e.length:0===e.byteLength}},72861:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},66756:function(e,t){"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)}},43813:function(e,t,n){"use strict";n.d(t,{aW:function(){return a},Zn:function(){return r}});var r=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}();var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var a=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(o(o({},this),{headers:o({},this.headers)}));return n.query&&(n.query=(t=n.query,Object.keys(t).reduce((function(e,n){var r,a=t[n];return o(o({},e),((r={})[n]=Array.isArray(a)?function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}(a):a,r))}),{}))),n},e}()},76330:function(e,t,n){"use strict";n.d(t,{KU:function(){return f},mY:function(){return l},jc:function(){return d}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};function o(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
1if(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 i(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var u=function(){var e=[],t=[],n=new Set,i=function(n){return e.forEach((function(e){n.add(e.middleware,r({},e))})),t.forEach((function(e){n.addRelativeTo(e.middleware,r({},e))})),n},f=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,a(f(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,a(f(e)))})),t},l=function(){var n,o=[],i=[],u={};return e.forEach((function(e){var t=r(r({},e),{before:[],after:[]});t.name&&(u[t.name]=t),o.push(t)})),t.forEach((function(e){var t=r(r({},e),{before:[],after:[]});t.name&&(u[t.name]=t),i.push(t)})),i.forEach((function(e){if(e.toMiddleware){var t=u[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=o,n.sort((function(e,t){return s[t.step]-s[e.step]||c[t.priority||"normal"]-c[e.priority||"normal"]}))).map(f).reduce((function(e,t){return e.push.apply(e,a(t)),e}),[]).map((function(e){return e.middleware}))},d={add:function(t,o){void 0===o&&(o={});var i=o.name,a=o.override,u=r({step:"initialize",priority:"normal",middleware:t},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var s=e.findIndex((function(e){return e.name===i})),c=e[s];if(c.step!==u.step||c.priority!==u.priority)throw new Error('"'+i+'" middleware with '+c.priority+" priority in "+c.step+" step cannot be overridden by same-name middleware with "+u.priority+" priority in "+u.step+" step.");e.splice(s,1)}n.add(i)}e.push(u)},addRelativeTo:function(e,o){var i=o.name,a=o.override,u=r({middleware:e},o);if(i){if(n.has(i)){if(!a)throw new Error("Duplicate middleware name '"+i+"'");var s=t.findIndex((function(e){return e.name===i})),c=t[s];if(c.toMiddleware!==u.toMiddleware||c.relation!==u.relation)throw new Error('"'+i+'" middleware '+c.relation+' "'+c.toMiddleware+'" middleware cannot be overridden by same-name middleware '+u.relation+' "'+u.toMiddleware+'" middleware.');t.splice(s,1)}n.add(i)}t.push(u)},clone:function(){return i(u())},use:function(e){e.applyToStack(d)},remove:function(r){return"string"===typeof r?function(r){var o=!1,i=function(e){return!e.name||e.name!==r||(o=!0,n.delete(r),!1)};return e=e.filter(i),t=t.filter(i),o}(r):function(r){var o=!1,i=function(e){return e.middleware!==r||(o=!0,e.name&&n.delete(e.name),!1)};return e=e.filter(i),t=t.filter(i),o}(r)},removeByTag:function(r){var o=!1,i=function(e){var t=e.tags,i=e.name;return!t||!t.includes(r)||(i&&n.delete(i),o=!0,!1)};return e=e.filter(i),t=t.filter(i),o},concat:function(e){var t=i(u());return t.use(e),t},applyToStack:i,resolve:function(e,t){var n,r;try{for(var i=o(l().reverse()),a=i.next();!a.done;a=i.next()){e=(0,a.value)(e,t)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}};return d},s={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},c={high:3,normal:2,low:1},f=function(){function e(e){this.middlewareStack=u(),this.config=e}return e.prototype.send=function(e,t,n){var r="function"!==typeof t?t:void 0,o="function"===typeof t?t:n,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!o)return i(e).then((function(e){return e.output}));i(e).then((function(e){return o(null,e.output)}),(function(e){return o(e)})).catch((function(){}))},e.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},e}(),l=function(){this.middlewareStack=u()};function d(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16)}))}
1var p=function(e,t){return p=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])},p(e,t)};function h(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(u){o={error:u}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}var y=function(){var e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,v([null],arguments)),n=new t;return Object.setPrototypeOf(n,e.prototype),n};y.prototype=Object.create(String.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(y,String);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)})(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))}}(y)},36811:function(e,t,n){"use strict";n.r(t),n.d(t,{fromUtf8:function(){return r},toUtf8:function(){return o}});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 o=e.charCodeAt(n);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,63&o|128);else if(n+1<e.length&&55296===(64512&o)&&56320===(64512&e.charCodeAt(n+1))){var i=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(o>>12|224,o>>6&63|128,63&o|128)}return Uint8Array.from(t)}(e)},o=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 o=e[n];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){var i=e[++n];t+=String.fromCharCode((31&o)<<6|63&i)}else if(240<=o&&o<365){var a="%"+[o,e[++n],e[++n],e[++n]].map((function(e){return e.toString(16)})).join("%");t+=decodeURIComponent(a)}else t+=String.fromCharCode((15&o)<<12|(63&e[++n])<<6|63&e[++n])}return t}(e)}},49755:function(e,t,n){var r=n(80155),o=n(9668),i=o;i.v1=r,i.v4=o,e.exports=i},19435:function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},88695:function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},80155:function(e,t,n){var r,o,i=n(88695),a=n(19435),u=0,s=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],l=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==l||null==d){var p=i();null==l&&(l=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=o=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:s+1,y=h-u+(v-s)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,s=v,o=d;var g=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;f[c++]=g>>>24&255,f[c++]=g>>>16&255,f[c++]=g>>>8&255,f[c++]=255&g;var b=h/4294967296*1e4&268435455;f[c++]=b>>>8&255,f[c++]=255&b,f[c++]=b>>>24&15|16,f[c++]=b>>>16&255,f[c++]=d>>>8|128,f[c++]=255&d;for(var m=0;m<6;++m)f[c+m]=l[m];return t||a(f)}},9668:function(e,t,n){var r=n(88695),o=n(19435);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var u=0;u<16;++u)t[i+u]=a[u];return t||o(a)}},29405:function(e,t,n){"use strict";n.r(t),n.d(t,{API:function(){return p.b},APIClass:function(){return p.Y},AWSKinesisFirehoseProvider:function(){return f.s},AWSKinesisProvider:function(){return c.s},AWSPinpointProvider:function(){return s.Y},AmazonPersonalizeProvider:function(){return l.C},Amplify:function(){return r.dQ},Analytics:function(){return u.c},Auth:function(){return i.g},AuthModeStrategyType:function(){return v.sE},Cache:function(){return a.ZP},ClientDevice:function(){return T._},DataStore:function(){return y.KT},Hub:function(){return P.Xb},I18n:function(){return k.o},Interactions:function(){return m.y},JS:function(){return A.JS},Logger:function(){return x.k},Predicates:function(){return g.gA},Predictions:function(){return O.x},PubSub:function(){return b.p},ServiceWorker:function(){return o.f},Signer:function(){return I.E},SortDirection:function(){return v.Sr},Storage:function(){return d.Ke},StorageClass:function(){return d.HN},XR:function(){return E.XR},graphqlOperation:function(){return h.wT},syncExpression:function(){return v.S6},withSSRContext:function(){return C.x}});var r=n(25387),o=n(21195),i=n(38901),a=n(7895),u=n(56315),s=n(81484),c=n(87653),f=n(17024),l=n(14412),d=n(82768),p=n(10552),h=n(44541),v=n(79561),y=n(97578),g=n(36460),b=n(5029),m=n(35211),w=n(55823),_={};for(var S in w)["default","Analytics","AWSPinpointProvider","AWSKinesisProvider","AWSKinesisFirehoseProvider","AmazonPersonalizeProvider","Auth","Storage","StorageClass","API","APIClass","graphqlOperation","AuthModeStrategyType","DataStore","Predicates","SortDirection","syncExpression","PubSub","Cache","Interactions","XR","Predictions","Logger","Hub","JS","ClientDevice","Signer","I18n","ServiceWorker","withSSRContext","Amplify"].indexOf(S)<0&&(_[S]=function(e){return w[e]}.bind(0,S));n.d(t,_);var E=n(60633),O=n(13117),x=n(35069),P=n(20490),A=n(59222),T=n(52633),I=n(885),
1k=n(91953),C=n(68213);r.dQ.Auth=i.g,r.dQ.Cache=a.ZP,r.dQ.ServiceWorker=o.f,t.default=r.dQ},68213:function(e,t,n){"use strict";n.d(t,{x:function(){return d}});var r=n(8219),o=n(38901),i=n(71883),a=n(25387),u=n(69820),s=n(97578),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},f=[o.g,i.cN],l=[r.ZP,o.g,s.KT];function d(e){void 0===e&&(e={});var t=e.modules,n=void 0===t?l:t,r=e.req,o=a.dQ.configure(),i=new a.bY,s=new u.N({req:r});return f.forEach((function(e){n.includes(e)||i.register(new e.constructor)})),n.forEach((function(e){i.register(new e.constructor)})),i.configure(c(c({},o),{storage:s})),i}},41609:function(e,t,n){var r=n(280),o=n(64160),i=n(35694),a=n(1469),u=n(98612),s=n(44144),c=n(25726),f=n(36719),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||f(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}},94788:function(){},71404:function(e,t,n){"use strict";var r,o,i=n(9623);function a(e,t,n){if(e._observer)u(e._observer,t,n);else if(e._observers){var r=[];e._observers.forEach((function(e){r.push(e)})),r.forEach((function(e){u(e,t,n)}))}}function u(e,t,n){if(!e.closed)switch(t){case"next":return e.next(n);case"error":return e.error(n);case"complete":return e.complete(n)}}function s(e){return e._observer||e._observers&&e._observers.size>0}function c(e){var t=this;this._observer=null,this._observers=null,this._observable=new i((function(n){return function(e,t){!s(e)&&t&&t.start&&t.start()}(t,e),function(e,t){e._observers?e._observers.add(t):e._observer?(e._observers=new Set,e._observers.add(e._observer),e._observers.add(t),e._observer=null):e._observer=t}(t,n),function(){!function(e,t){e._observers?e._observers.delete(t):e._observer===t&&(e._observer=null)}(t,n),function(e,t){!s(e)&&t&&t.pause&&t.pause()}(t,e)}}))}r=c.prototype,o={get observable(){return this._observable},get observed(){return s(this)},next:function(e){a(this,"next",e)},error:function(e){a(this,"error",e)},complete:function(e){a(this,"complete",e)}},Object.keys(o).forEach((function(e){var t=Object.getOwnPropertyDescriptor(o,e);t.enumerable=!1,Object.defineProperty(r,e,t)})),e.exports=c},9623:function(e,t,n){e.exports=n(60896).Observable},60896:function(e,t,n){"use strict";e=n.nmd(e),function(e,t){function n(e){return"function"===typeof Symbol&&Boolean(Symbol[e])}function r(e){return n(e)?Symbol[e]:"@@"+e}function o(e){setTimeout((function(){throw e}))}function i(e,t){var n=e[t];if(null!=n){if("function"!==typeof n)throw new TypeError(n+" is not a function");return n}}function a(e){var t=e.constructor;return void 0!==t&&null===(t=t[r("species")])&&(t=void 0),void 0!==t?t:h}function u(e,t){Object.keys(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);r.enumerable=!1,Object.defineProperty(e,n,r)}))}function s(e){var t=e._cleanup;if(t){e._cleanup=void 0;try{t()}catch(n){o(n)}}}function c(e){return void 0===e._observer}function f(e){c(e)||(e._observer=void 0,s(e))}function l(e){return function(){e.unsubscribe()}}function d(e,t){if(Object(e)!==e)throw new TypeError("Observer must be an object");this._cleanup=void 0,this._observer=e;try{var n=i(e,"start");n&&n.call(e,this)}catch(a){o(a)}if(!c(this)){e=new p(this);try{var r=t.call(void 0,e);if(null!=r){if("function"===typeof r.unsubscribe)r=l(r);else if("function"!==typeof r)throw new TypeError(r+" is not a function");this._cleanup=r}}catch(a){return void e.error(a)}c(this)&&s(this)}}function p(e){this._subscription=e}function h(e){if(!(this instanceof h))throw new TypeError("Observable cannot be called as a function");if("function"!==typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}"function"!==typeof Symbol||Symbol.observable||(Symbol.observable=Symbol("observable")),u(d.prototype={},{get closed(){return c(this)},unsubscribe:function(){f(this)}}),u(p.prototype={},{get closed(){return c(this._subscription)},next:function(e){var t=this._subscription;if(!c(t)){var n=t._observer;try{var r=i(n,"next");r&&r.call(n,e)}catch(a){o(a)}}},error:function(e){var t=this._subscription;if(c(t))o(e);else{var n=t._observer;t._observer=void 0;try{var r=i(n,"error");
1if(!r)throw e;r.call(n,e)}catch(a){o(a)}s(t)}},complete:function(){var e=this._subscription;if(!c(e)){var t=e._observer;e._observer=void 0;try{var n=i(t,"complete");n&&n.call(t)}catch(r){o(r)}s(e)}}}),u(h.prototype,{subscribe:function(e){for(var t=[],n=1;n<arguments.length;++n)t.push(arguments[n]);return"function"===typeof e?e={next:e,error:t[0],complete:t[1]}:"object"===typeof e&&null!==e||(e={}),new d(e,this._subscriber)},forEach:function(e){var t=this;return new Promise((function(n,r){if("function"!==typeof e)return Promise.reject(new TypeError(e+" is not a function"));t.subscribe({_subscription:null,start:function(e){if(Object(e)!==e)throw new TypeError(e+" is not an object");this._subscription=e},next:function(t){var n=this._subscription;if(!n.closed)try{e(t)}catch(o){r(o),n.unsubscribe()}},error:r,complete:n})}))},map:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(a(this))((function(n){return t.subscribe({next:function(t){if(!n.closed){try{t=e(t)}catch(r){return n.error(r)}n.next(t)}},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},filter:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(a(this))((function(n){return t.subscribe({next:function(t){if(!n.closed){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)}},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},reduce:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");var n=a(this),r=arguments.length>1,o=!1,i=arguments[1];return new n((function(n){return t.subscribe({next:function(t){if(!n.closed){var a=!o;if(o=!0,!a||r)try{i=e(i,t)}catch(u){return n.error(u)}else i=t}},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(i),n.complete()}})}))}}),Object.defineProperty(h.prototype,r("observable"),{value:function(){return this},writable:!0,configurable:!0}),u(h,{from:function(e){var t="function"===typeof this?this:h;if(null==e)throw new TypeError(e+" is not an object");var o=i(e,r("observable"));if(o){var a=o.call(e);if(Object(a)!==a)throw new TypeError(a+" is not an object");return a.constructor===t?a:new t((function(e){return a.subscribe(e)}))}if(n("iterator")&&(o=i(e,r("iterator"))))return new t((function(t){for(var n,r=o.call(e)[Symbol.iterator]();!(n=r.next()).done;){var i=n.value;if(t.next(i),t.closed)return}t.complete()}));if(Array.isArray(e))return new t((function(t){for(var n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}));throw new TypeError(e+" is not observable")},of:function(){for(var e=[],t=0;t<arguments.length;++t)e.push(arguments[t]);return new("function"===typeof this?this:h)((function(t){for(var n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}))}}),Object.defineProperty(h,r("species"),{get:function(){return this},configurable:!0}),Object.defineProperty(h,"extensions",{value:{observableSymbol:r("observable"),setHostReportError:function(e){o=e}}}),e.Observable=h}(t)}}]);
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.