(this["webpackJsonpwebsite-client"]=this["webpackJsonpwebsite-client"]||[]).push([[2],[function(e,t,r){"use strict";e.exports=r(193)},function(e,t,r){"use strict";var n=r(130),i=function(){for(var e=0,t=0,r=arguments.length;t=o){var u=console.log.bind(console);"ERROR"===t&&console.error&&(u=console.error.bind(console)),"WARN"===t&&console.warn&&(u=console.warn.bind(console));var p="["+t+"] "+this._ts()+" "+this.name;if(1===r.length&&"string"===typeof r[0])u(p+" - "+r[0]);else if(1===r.length)u(p,r[0]);else if("string"===typeof r[0]){var c=r.slice(1);1===c.length&&(c=c[0]),u(p+" - "+r[0],c)}else u(p,r)}},e.prototype.log=function(){for(var e=[],t=0;t-1)&&(n===h||y.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var i={channel:e,payload:l({},t),source:r,patternInfo:[]};try{this._toListeners(i)}catch(a){y.error(a)}},e.prototype.listen=function(e,t,r){var n;if(void 0===r&&(r="noname"),function(e){return void 0!==e.onHubCapsule}(t))y.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),n=t.onHubCapsule.bind(t);else{if("function"!==typeof t)throw new Error("No callback supplied to Hub");n=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:n});else{var i=this.listeners[e];i||(i=[],this.listeners[e]=i),i.push({name:r,callback:n})}},e.prototype._toListeners=function(e){var t=e.channel,r=e.payload,n=this.listeners[t];if(n&&n.forEach((function(n){y.debug("Dispatching to "+t+" with ",r);try{n.callback(e)}catch(i){y.error(i)}})),this.patterns.length>0){if(!r.message)return void y.warn("Cannot perform pattern matching without a message key");var i=r.message;this.patterns.forEach((function(t){var r=i.match(t.pattern);if(r){var n=r.slice(1),a=l(l({},e),{patternInfo:n});try{t.callback(a)}catch(o){y.error(o)}}}))}},e}())("__default__"),b=new o("I18n"),g=function(){function e(e){this._options=null,this._lang=null,this._dict={},this._options=Object.assign({},e),this._lang=this._options.language,!this._lang&&"undefined"!==typeof window&&window&&window.navigator&&(this._lang=window.navigator.language),b.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return"undefined"!==typeof t?t:e;var r=this._lang,n=this.getByLanguage(e,r);return n||(r.indexOf("-")>0&&(n=this.getByLanguage(e,r.split("-")[0])),n||("undefined"!==typeof t?t:e))},e.prototype.getByLanguage=function(e,t,r){if(void 0===r&&(r=null),!t)return r;var n=this._dict[t];return n?n[e]:r},e.prototype.putVocabulariesForLanguage=function(e,t){var r=this._dict[e];r||(r=this._dict[e]={}),Object.assign(r,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map((function(r){t.putVocabulariesForLanguage(r,e[r])}))},e}(),S=new o("I18n"),I=null,v=null,N=function(){function e(){}return e.configure=function(t){return S.debug("configure I18n"),t?(I=Object.assign({},I,t.I18n||t),e.createInstance(),I):I},e.getModuleName=function(){return"I18n"},e.createInstance=function(){S.debug("create I18n instance"),v||(v=new g(I))},e.setLanguage=function(t){return e.checkConfig(),v.setLanguage(t)},e.get=function(t,r){return e.checkConfig()?v.get(t,r):"undefined"===typeof r?t:r},e.putVocabulariesForLanguage=function(t,r){return e.checkConfig(),v.putVocabulariesForLanguage(t,r)},e.putVocabularies=function(t){return e.checkConfig(),v.putVocabularies(t)},e.checkConfig=function(){return v||(v=new g(I)),!0},e}();u.register(N);var C=N,T=r(25),k=function(){return(k=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1](new Date).getTime()?(oe.debug("token not expired"),this._setCredentialsFromFederation({provider:r,token:i,user:n,identity_id:o,expires_at:a})):s._refreshHandlers[r]&&"function"===typeof s._refreshHandlers[r]?(oe.debug("getting refreshed jwt token from federation provider"),s._refreshHandlers[r]().then((function(e){return oe.debug("refresh federated token sucessfully",e),i=e.token,o=e.identity_id,a=e.expires_at,s._setCredentialsFromFederation({provider:r,token:i,user:n,identity_id:o,expires_at:a})})).catch((function(e){return oe.debug("refresh federated token failed",e),t.clear(),Promise.reject("refreshing federation token failed: "+e)}))):(oe.debug("no refresh handler for provider:",r),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._isExpired=function(e){if(!e)return oe.debug("no credentials for expiration check"),!0;oe.debug("is this credentials expired?",e);var t=(new Date).getTime(),r=e.expired,n=e.expireTime;return!(!r&&n>t+6e5)},e.prototype._setCredentialsForGuest=function(){return ie(this,void 0,void 0,(function(){var e,t,r,i,a,o,s,u=this;return ae(this,(function(p){switch(p.label){case 0:if(e=!1,oe.debug("setting credentials for guest"),t=this._config,r=t.identityPoolId,i=t.region,t.mandatorySignIn)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!r)return oe.debug("No Cognito Federated Identity pool provided"),[2,Promise.reject("No Cognito Federated Identity pool provided")];a=void 0,p.label=1;case 1:return p.trys.push([1,3,,4]),[4,this._storageSync];case 2:return p.sent(),a=this._storage.getItem("CognitoIdentityId-"+r),[3,4];case 3:return o=p.sent(),oe.debug("Failed to get the cached identityId",o),[3,4];case 4:return s=new n.CognitoIdentityCredentials({IdentityPoolId:r,IdentityId:a||void 0},{region:i}),this,[2,this._loadCredentials(s,"guest",!1,null).then((function(e){return e})).catch((function(t){return ie(u,void 0,void 0,(function(){var o;return ae(this,(function(u){return"ResourceNotFoundException"!==t.code||t.message!=="Identity '"+a+"' not found."||e?[2,t]:(e=!0,oe.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+r),s.clearCachedId(),o=new n.CognitoIdentityCredentials({IdentityPoolId:r,IdentityId:void 0},{region:i}),[2,this._loadCredentials(o,"guest",!1,null)])}))}))}))]}}))}))},e.prototype._setCredentialsFromAWS=function(){var e=n.config.credentials;oe.debug("setting credentials from aws");return e instanceof n.Credentials?Promise.resolve(e):(oe.debug("AWS.config.credentials is not an instance of AWS Credentials"),Promise.reject("AWS.config.credentials is not an instance of AWS Credentials"))},e.prototype._setCredentialsFromFederation=function(e){var t=e.provider,r=e.token,i=e.identity_id,a=(e.user,e.expires_at,{google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}[t]||t);if(!a)return Promise.reject("You must specify a federated provider");var o={};o[a]=r;var s=this._config,u=s.identityPoolId,p=s.region;if(!u)return oe.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var c=new n.CognitoIdentityCredentials({IdentityPoolId:u,IdentityId:i,Logins:o},{region:p});return this._loadCredentials(c,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){oe.debug("set credentials from session");var t=e.getIdToken().getJwtToken(),r=this._config,i=r.region,a=r.userPoolId,o=r.identityPoolId;if(!o)return oe.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var s={};s["cognito-idp."+i+".amazonaws.com/"+a]=t;var u=new n.CognitoIdentityCredentials({IdentityPoolId:o,Logins:s},{region:i});return this._loadCredentials(u,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,r,n){var i=this,a=this,o=this._config.identityPoolId;return new Promise((function(s,p){e.get((function(c){return ie(i,void 0,void 0,(function(){var i,m,l,d,y,h;return ae(this,(function(f){switch(f.label){case 0:if(c)return oe.debug("Failed to load credentials",e),p(c),[2];if(oe.debug("Load credentials successfully",e),a._credentials=e,a._credentials.authenticated=r,a._credentials_source=t,"federated"!==t)return[3,3];i=Object.assign({id:this._credentials.identityId},n.user),m=n.provider,l=n.token,d=n.expires_at,y=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:m,token:l,user:i,expires_at:d,identity_id:y}))}catch(b){oe.debug("Failed to put federated info into auth storage",b)}return u.Cache&&"function"===typeof u.Cache.setItem?[4,u.Cache.setItem("federatedInfo",{provider:m,token:l,user:i,expires_at:d,identity_id:y},{priority:1})]:[3,2];case 1:return f.sent(),[3,3];case 2:oe.debug("No Cache module registered in Amplify"),f.label=3;case 3:if("guest"!==t)return[3,7];f.label=4;case 4:return f.trys.push([4,6,,7]),[4,this._storageSync];case 5:return f.sent(),this._storage.setItem("CognitoIdentityId-"+o,e.identityId),[3,7];case 6:return h=f.sent(),oe.debug("Failed to cache identityId",h),[3,7];case 7:return s(a._credentials),[2]}}))}))}))}))},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(oe.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return ie(this,void 0,void 0,(function(){var e,t,r;return ae(this,(function(i){switch(i.label){case 0:return e=this._config,t=e.identityPoolId,r=e.region,t&&new n.CognitoIdentityCredentials({IdentityPoolId:t},{region:r}).clearCachedId(),this._credentials=null,this._credentials_source=null,this._storage.removeItem("aws-amplify-federatedInfo"),u.Cache&&"function"===typeof u.Cache.setItem?[4,u.Cache.removeItem("federatedInfo")]:[3,2];case 1:return i.sent(),[3,3];case 2:oe.debug("No Cache module registered in Amplify"),i.label=3;case 3:return[2]}}))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}())(null),ue=function(){function e(){this._logger=new o("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var r=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(n,i){if(!(navigator&&"serviceWorker"in navigator))return i(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then((function(e){return e.installing?r._serviceWorker=e.installing:e.waiting?r._serviceWorker=e.waiting:e.active&&(r._serviceWorker=e.active),r._registration=e,r._setupListeners(),r._logger.debug("Service Worker Registration Success: "+e),n(e)})).catch((function(e){return r._logger.debug("Service Worker Registration Failed "+e),i(e)}))}))},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise((function(r,n){if(!T.a.browserOrNode().isBrowser)return n(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then((function(n){if(!n)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)),r(e)})).catch((function(e){t._logger.error(e)}));t._subscription=n,t._logger.debug("User is subscribed to push: "+JSON.stringify(n)),r(n)}))}))},e.prototype._urlB64ToUint8Array=function(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(t),n=new Uint8Array(r.length),i=0;i>15;--a>=0;){var u=32767&this[e],p=this[e++]>>15,c=s*u+p*o;i=((u=o*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+s*p+(i>>>30),r[n++]=1073741823&u}return i},u=30):I&&"Netscape"!=navigator.appName?(g.prototype.am=function(e,t,r,n,i,a){for(;--a>=0;){var o=t*this[e++]+r[n]+i;i=Math.floor(o/67108864),r[n++]=67108863&o}return i},u=26):(g.prototype.am=function(e,t,r,n,i,a){for(var o=16383&t,s=t>>14;--a>=0;){var u=16383&this[e],p=this[e++]>>14,c=s*u+p*o;i=((u=o*u+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+s*p,r[n++]=268435455&u}return i},u=28),g.prototype.DB=u,g.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function P(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t},P.prototype.revert=function(e){var t=S();return e.copyTo(t),this.reduce(t),t},P.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},P.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},P.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},g.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},g.prototype.fromString=function(e,t){var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=e.length,i=!1,a=0;--n>=0;){var o=A(e,n);o<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==a?this[this.t++]=o:a+r>this.DB?(this[this.t-1]|=(o&(1<>this.DB-a):this[this.t-1]|=o<=this.DB&&(a-=this.DB))}this.clamp(),i&&g.ZERO.subTo(this,this)},g.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},g.prototype.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},g.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+o+1]=this[r]>>i|s,s=(this[r]&a)<=0;--r)t[r]=0;t[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()},g.prototype.rShiftTo=function(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,a=(1<>n;for(var o=r+1;o>n;n>0&&(t[this.t-r-1]|=(this.s&a)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},g.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},g.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,a),i.lShiftTo(u,r)):(n.copyTo(a),i.copyTo(r));var p=a.t,c=a[p-1];if(0!=c){var m=c*(1<1?a[p-2]>>this.F2:0),l=this.FV/m,d=(1<=0&&(r[r.t++]=1,r.subTo(b,r)),g.ONE.dlShiftTo(p,b),b.subTo(a,a);a.t=0;){var I=r[--h]==c?this.DM:Math.floor(r[h]*l+(r[h-1]+y)*d);if((r[h]+=a.am(0,I,r,f,0,p))0&&r.rShiftTo(u,r),o<0&&g.ZERO.subTo(r,r)}}},g.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},g.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},g.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString();var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");t=2}var r,n=(1<0)for(s>s)>0&&(i=!0,a=k(r));o>=0;)s>(s+=this.DB-t)):(r=this[o]>>(s-=t)&n,s<=0&&(s+=this.DB,--o)),r>0&&(i=!0),i&&(a+=k(r));return i?a:"0"},g.prototype.negate=function(){var e=S();return g.ZERO.subTo(this,e),e},g.prototype.abs=function(){return this.s<0?this.negate():this},g.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(0!=(t=r-e.t))return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0},g.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+R(this[this.t-1]^this.s&this.DM)},g.prototype.mod=function(e){var t=S();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(g.ZERO)>0&&e.subTo(t,t),t},g.prototype.equals=function(e){return 0==this.compareTo(e)},g.prototype.add=function(e){var t=S();return this.addTo(e,t),t},g.prototype.subtract=function(e){var t=S();return this.subTo(e,t),t},g.prototype.multiply=function(e){var t=S();return this.multiplyTo(e,t),t},g.prototype.divide=function(e){var t=S();return this.divRemTo(e,t,null),t},g.prototype.modPow=function(e,t,r){var n,i=e.bitLength(),a=D(1),o=new P(t);if(i<=0)return a;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,p=n-1,c=(1<1){var m=S();for(o.sqrTo(s[1],m);u<=c;)s[u]=S(),o.mulTo(m,s[u-2],s[u]),u+=2}var l,d,y=e.t-1,h=!0,f=S();for(i=R(e[y])-1;y>=0;){for(i>=p?l=e[y]>>i-p&c:(l=(e[y]&(1<0&&(l|=e[y-1]>>this.DB+i-p)),u=n;0==(1&l);)l>>=1,--u;if((i-=u)<0&&(i+=this.DB,--y),h)s[l].copyTo(a),h=!1;else{for(;u>1;)o.sqrTo(a,f),o.sqrTo(f,a),u-=2;u>0?o.sqrTo(a,f):(d=a,a=f,f=d),o.mulTo(f,s[l],a)}for(;y>=0&&0==(e[y]&1<0&&void 0!==arguments[0]?arguments[0]:{}).AccessToken;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,r||""))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(q);var M=function(e){function t(){var r=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).IdToken;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,e.call(this,r||""))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(q);var L=function(){function e(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).RefreshToken;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.token=t||""}return e.prototype.getToken=function(){return this.token},e}(),O=r(92),B=r.n(O);var U=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.IdToken,n=t.RefreshToken,i=t.AccessToken,a=t.ClockDrift;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==i||null==r)throw new Error("Id token and Access Token must be present.");this.idToken=r,this.refreshToken=n,this.accessToken=i,this.clockDrift=void 0===a?this.calculateClockDrift():a}return e.prototype.getIdToken=function(){return this.idToken},e.prototype.getRefreshToken=function(){return this.refreshToken},e.prototype.getAccessToken=function(){return this.accessToken},e.prototype.getClockDrift=function(){return this.clockDrift},e.prototype.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},e.prototype.isValid=function(){var e=Math.floor(new Date/1e3)-this.clockDrift;return e0&&void 0!==arguments[0]?arguments[0]:{},r=t.Name,n=t.Value;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.Name=r||"",this.Value=n||""}return e.prototype.getValue=function(){return this.Value},e.prototype.setValue=function(e){return this.Value=e,this},e.prototype.getName=function(){return this.Name},e.prototype.setName=function(e){return this.Name=e,this},e.prototype.toString=function(){return JSON.stringify(this)},e.prototype.toJSON=function(){return{Name:this.Name,Value:this.Value}},e}();function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var K={},W=function(){function e(){z(this,e)}return e.setItem=function(e,t){return K[e]=t,K[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(K,e)?K[e]:void 0},e.removeItem=function(e){return delete K[e]},e.clear=function(){return K={}},e}(),H=function(){function e(){z(this,e);try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(t){this.storageWindow=W}}return e.prototype.getStorage=function(){return this.storageWindow},e}();var Q=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),null==t||null==t.Username||null==t.Pool)throw new Error("Username and pool information are required.");this.username=t.Username||"",this.pool=t.Pool,this.Session=null,this.client=t.Pool.client,this.signInUserSession=null,this.authenticationFlowType="USER_SRP_AUTH",this.storage=t.Storage||(new H).getStorage(),this.keyPrefix="CognitoIdentityServiceProvider."+this.pool.getClientId(),this.userDataKey=this.keyPrefix+"."+this.username+".userData"}return e.prototype.setSignInUserSession=function(e){this.clearCachedUserData(),this.signInUserSession=e,this.cacheTokens()},e.prototype.getSignInUserSession=function(){return this.signInUserSession},e.prototype.getUsername=function(){return this.username},e.prototype.getAuthenticationFlowType=function(){return this.authenticationFlowType},e.prototype.setAuthenticationFlowType=function(e){this.authenticationFlowType=e},e.prototype.initiateAuth=function(e,t){var r=this,n=e.getAuthParameters();n.USERNAME=this.username;var i=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),a={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:i};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",a,(function(e,n){if(e)return t.onFailure(e);var i=n.ChallengeName,a=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(r.Session=n.Session,t.customChallenge(a)):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),t.onSuccess(r.signInUserSession))}))},e.prototype.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},e.prototype.authenticateUserDefaultAuth=function(e,t){var r=this,n=new w(this.pool.getUserPoolId().split("_")[1]),i=new V,a=void 0,o=void 0,s={};null!=this.deviceKey&&(s.DEVICE_KEY=this.deviceKey),s.USERNAME=this.username,n.getLargeAValue((function(u,p){u&&t.onFailure(u),s.SRP_A=p.toString(16),"CUSTOM_AUTH"===r.authenticationFlowType&&(s.CHALLENGE_NAME="SRP_A");var m=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),d={AuthFlow:r.authenticationFlowType,ClientId:r.pool.getClientId(),AuthParameters:s,ClientMetadata:m};r.getUserContextData(r.username)&&(d.UserContextData=r.getUserContextData(r.username)),r.client.request("InitiateAuth",d,(function(s,u){if(s)return t.onFailure(s);var p=u.ChallengeParameters;r.username=p.USER_ID_FOR_SRP,a=new b(p.SRP_B,16),o=new b(p.SALT,16),r.getCachedDeviceKeyAndPassword(),n.getPasswordAuthenticationKey(r.username,e.getPassword(),a,o,(function(e,a){e&&t.onFailure(e);var o=i.getNowString(),s=l.a.lib.WordArray.create(c.Buffer.concat([c.Buffer.from(r.pool.getUserPoolId().split("_")[1],"utf8"),c.Buffer.from(r.username,"utf8"),c.Buffer.from(p.SECRET_BLOCK,"base64"),c.Buffer.from(o,"utf8")])),d=l.a.lib.WordArray.create(a),y=B.a.stringify(f()(s,d)),h={};h.USERNAME=r.username,h.PASSWORD_CLAIM_SECRET_BLOCK=p.SECRET_BLOCK,h.TIMESTAMP=o,h.PASSWORD_CLAIM_SIGNATURE=y,null!=r.deviceKey&&(h.DEVICE_KEY=r.deviceKey);var b={ChallengeName:"PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:h,Session:u.Session,ClientMetadata:m};r.getUserContextData()&&(b.UserContextData=r.getUserContextData()),function e(t,n){return r.client.request("RespondToAuthChallenge",t,(function(i,a){return i&&"ResourceNotFoundException"===i.code&&-1!==i.message.toLowerCase().indexOf("device")?(h.DEVICE_KEY=null,r.deviceKey=null,r.randomPassword=null,r.deviceGroupKey=null,r.clearCachedDeviceKeyAndPassword(),e(t,n)):n(i,a)}))}(b,(function(e,i){return e?t.onFailure(e):r.authenticateUserInternal(i,n,t)}))}))}))}))},e.prototype.authenticateUserPlainUsernamePassword=function(e,t){var r=this,n={};if(n.USERNAME=this.username,n.PASSWORD=e.getPassword(),n.PASSWORD){var i=new w(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var a=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),o={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:a};this.getUserContextData(this.username)&&(o.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",o,(function(e,n){return e?t.onFailure(e):r.authenticateUserInternal(n,i,t)}))}else t.onFailure(new Error("PASSWORD parameter is required"))},e.prototype.authenticateUserInternal=function(e,t,r){var n=this,i=e.ChallengeName,a=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,r.mfaRequired(i,a);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,r.selectMFAType(i,a);if("MFA_SETUP"===i)return this.Session=e.Session,r.mfaSetup(i,a);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,r.totpRequired(i,a);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,r.customChallenge(a);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var o=null,s=null,u=[],p=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(a&&(o=JSON.parse(e.ChallengeParameters.userAttributes),s=JSON.parse(e.ChallengeParameters.requiredAttributes)),s)for(var m=0;m0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0;--r)t+=n[Math.round(Math.random()*(n.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(se(e))},e.prototype._base64URL=function(e){return e.toString(ue).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!==typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var r=0;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function h(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function f(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function p(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-u),a=r;a>=0;a--){for(var m=!0,l=0;li&&(n=i):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:p>223?3:p>191?2:1;if(i+m<=r)switch(m){case 1:p<128&&(c=p);break;case 2:128===(192&(a=e[i+1]))&&(u=(31&p)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&(u=(15&p)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&(u=(15&p)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,m=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=m}return function(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),p=this.slice(n,i),c=e.slice(t,r),m=0;mi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return I(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return N(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,n,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function _(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,n,a){return a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,a){return a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||w(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||w(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||w(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||w(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||w(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||w(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||w(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||w(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||w(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||q(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);q(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);q(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):_(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):_(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function j(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(40))},function(e,t,r){"use strict";var n=r(1),i=r(118),a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length)return t.push(null);var i=r+n;i>e.length&&(i=e.length),t.push(e.slice(r,i)),r=i},t},concat:function(e){var t,r,n=0,i=0;for(r=0;r>>8^t[255&(r^e.readUInt8(n))]}return(-1^r)>>>0},hmac:function(e,t,r,n){return r||(r="binary"),"buffer"===r&&(r=void 0),n||(n="sha256"),"string"===typeof t&&(t=a.buffer.toBuffer(t)),a.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return a.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return a.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=a.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"===typeof t&&(t=a.buffer.toBuffer(t));var o=a.arraySliceFn(t),s=a.Buffer.isBuffer(t);if(a.isBrowser()&&"undefined"!==typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(s=!0),n&&"object"===typeof t&&"function"===typeof t.on&&!s)t.on("data",(function(e){i.update(e)})),t.on("error",(function(e){n(e)})),t.on("end",(function(){n(null,i.digest(r))}));else{if(!n||!o||s||"undefined"===typeof FileReader){a.isBrowser()&&"object"===typeof t&&!s&&(t=new a.Buffer(new Uint8Array(t)));var u=i.update(t).digest(r);return n&&n(null,u),u}var p=0,c=new FileReader;c.onerror=function(){n(new Error("Failed to read data."))},c.onload=function(){var e=new a.Buffer(new Uint8Array(c.result));i.update(e),p+=e.length,c._continueReading()},c._continueReading=function(){if(p>=t.size)n(null,i.digest(r));else{var e=p+524288;e>t.size&&(e=t.size),c.readAsArrayBuffer(o.call(t,p,e))}},c._continueReading()}},toHex:function(e){for(var t=[],r=0;r=3e5,!1),i.config.isClockSkewed},applyClockOffset:function(e){e&&(i.config.systemClockOffset=e-(new Date).getTime())},extractRequestId:function(e){var t=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!t&&e.data&&e.data.ResponseMetadata&&(t=e.data.ResponseMetadata.RequestId),t&&(e.requestId=t),e.error&&(e.error.requestId=t)},addPromises:function(e,t){var r=!1;void 0===t&&i&&i.config&&(t=i.config.getPromisesDependency()),void 0===t&&"undefined"!==typeof Promise&&(t=Promise),"function"!==typeof t&&(r=!0),Array.isArray(e)||(e=[e]);for(var n=0;n=500||429===n});i&&o.retryable&&(o.retryAfter=i),u(o)}}))}),u)};i.util.defer(p)},uuid:{v4:function(){return r(275).v4()}},convertPayloadToString:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){"object"===typeof t&&"function"===typeof t.nextTick?t.nextTick(e):"function"===typeof n?n(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var r=(t||{})[e.operation];if(r&&r.input&&r.input.payload)return r.input.members[r.input.payload]}},getProfilesFromSharedConfig:function(e,t){var r={},n={};if(Object({NODE_ENV:"production",PUBLIC_URL:""})[a.configOptInEnv])n=e.loadFrom({isConfig:!0,filename:Object({NODE_ENV:"production",PUBLIC_URL:""})[a.sharedConfigFileEnv]});for(var i=e.loadFrom({filename:t||Object({NODE_ENV:"production",PUBLIC_URL:""})[a.configOptInEnv]&&Object({NODE_ENV:"production",PUBLIC_URL:""})[a.sharedCredentialsFileEnv]}),o=0,s=Object.keys(n);o0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=n;if("+"!==o&&o!==s)return!1}return n===i.length})(n,e)&&r.push(t)}));var n=JSON.parse(t);"object"===typeof n&&(n[N]=e),r.forEach((function(e){e.forEach((function(e){return e.next(n)}))}))}catch(i){I.warn("Error handling message",i,t)}},t.prototype.subscribe=function(e,t){var r=this;void 0===t&&(t={});var n=[].concat(e);return I.debug("Subscribing to topic(s)",n.join(",")),new s((function(e){var i;n.forEach((function(t){var n=r._topicObservers.get(t);n||(n=new Set,r._topicObservers.set(t,n)),n.add(e)}));var a=t.clientId,o=void 0===a?r.clientId:a,s=r._clientIdObservers.get(o);return s||(s=new Set),s.add(e),r._clientIdObservers.set(o,s),b(r,void 0,void 0,(function(){var r,a,s,u;return g(this,(function(p){switch(p.label){case 0:return void 0!==(r=t.url)?[3,2]:[4,this.endpoint];case 1:return s=p.sent(),[3,3];case 2:s=r,p.label=3;case 3:a=s,p.label=4;case 4:return p.trys.push([4,6,,7]),[4,this.connect(o,{url:a})];case 5:return i=p.sent(),n.forEach((function(e){i.subscribe(e)})),[3,7];case 6:return u=p.sent(),e.error(u),[3,7];case 7:return[2]}}))})),function(){return I.debug("Unsubscribing from topic(s)",n.join(",")),i&&(r._clientIdObservers.get(o).delete(e),n.forEach((function(e){i.isConnected()&&i.unsubscribe(e);var t=r._topicObservers.get(e)||new Set;t.forEach((function(e){return e.complete()})),t.clear()})),0===r._clientIdObservers.get(o).size&&(r.disconnect(o),r._clientIdObservers.delete(o))),null}}))},t}(l),T=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),k=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},A=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]-1}));if(n){var i=n.client,a=n.url;e[i]||(e[i]={url:a,topics:new Set}),e[i].topics.add(t)}return e}),{})),[4,Promise.all(s.map((function(e){var t=e[0],r=e[1],i=r.url,a=r.topics;return k(u,void 0,void 0,(function(){var e,r,o=this;return A(this,(function(s){switch(s.label){case 0:e=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.connect(t,{clientId:t,url:i})];case 2:return e=s.sent(),[3,4];case 3:return r=s.sent(),n.error({message:"Failed to connect",error:r}),n.complete(),[2,void 0];case 4:return a.forEach((function(t){e.isConnected()&&(e.subscribe(t),o._topicClient.set(t,e))})),[2,e]}}))}))})))];case 1:return p.sent(),[2]}}))})),function(){P.debug("Unsubscribing from topic(s)",i.join(",")),i.forEach((function(e){var t=r._topicClient.get(e);t&&t.isConnected()&&(t.unsubscribe(e),r._topicClient.delete(e),Array.from(r._topicClient.values()).some((function(e){return e===t}))||r.disconnect(t.clientId)),r._topicObservers.delete(e)}))}}));return s.from(n).map((function(e){var t=r.getTopicForValue(e),n=r._topicAlias.get(t);return e.data=Object.entries(e.data).reduce((function(e,t){var r=t[0],i=t[1];return e[n||r]=i,e}),{}),e}))},t}(C),x=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),w=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},q=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]",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,r=e?e.predictions||e:{};r=W(W({},r),e),this._options=Object.assign({},this._options,r),Q.debug("configure Predictions",this._options),this.getAllProviders().forEach((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 H(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 H(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}(),Z=r(161),Y=r(53),X=r(75),$=r(20),ee=r(184);function te(e,t){if(e){var r={};return(t||Object.keys(e)).forEach((function(t){var n;if(e.hasOwnProperty(t)){var i=t.charAt(0).toLowerCase()+t.substr(1);Object.assign(r,((n={})[i]=e[t],n))}})),r}}function re(e,t){if(e)return e.map((function(e){return te(e,t)}))}function ne(e){return new Promise((function(t,r){var n=new FileReader;n.onload=function(e){t(n.result)},n.onerror=function(e){r(e)};try{n.readAsArrayBuffer(e)}catch(i){r(i)}}))}function ie(e){if(e)return te(e.BoundingBox)}function ae(e){if(e)return re(e.Polygon)}function oe(e){var t={text:{fullText:"",words:[],lines:[],linesDetailed:[]}};if(0===e.length)return t;var r=Array(),n=Array(),i={};if(e.forEach((function(e){switch(e.BlockType){case"LINE":t.text.lines.push(e.Text),t.text.linesDetailed.push({text:e.Text,polygon:ae(e.Geometry),boundingBox:ie(e.Geometry),page:e.Page});break;case"WORD":t.text.fullText+=e.Text+" ",t.text.words.push({text:e.Text,polygon:ae(e.Geometry),boundingBox:ie(e.Geometry)}),i[e.Id]=e;break;case"SELECTION_ELEMENT":var a="SELECTED"===e.SelectionStatus;t.text.selections||(t.text.selections=[]),t.text.selections.push({selected:a,polygon:ae(e.Geometry),boundingBox:ie(e.Geometry)}),i[e.Id]=e;break;case"TABLE":r.push(e);break;case"KEY_VALUE_SET":n.push(e),i[e.Id]=e;break;default:i[e.Id]=e}})),t.text.fullText=t.text.fullText.substr(0,t.text.fullText.length-1),0!==r.length){var a=Array();r.forEach((function(e){a.push(function(e,t){var r;r=[],e.Relationships.forEach((function(e){e.Ids.forEach((function(e){var n=t[e],i=n.RowIndex-1,a=n.ColumnIndex-1,o=se(n,t),s={text:o.text,boundingBox:ie(n.Geometry),polygon:ae(n.Geometry),selected:o.selected,rowSpan:n.RowSpan,columnSpan:n.ColumnSpan};r[i]||(r[i]=[]),r[i][a]=s}))}));var n=r.length,i=r[0].length;return{size:{rows:n,columns:i},table:r,boundingBox:ie(e.Geometry),polygon:ae(e.Geometry)}}(e,i))})),t.text.tables=a}if(0!==n.length){var o=Array();n.forEach((function(e){-1!==e.EntityTypes.indexOf("KEY")&&o.push(function(e,t){var r,n="",i="";return e.Relationships.forEach((function(a){if("CHILD"===a.Type){var o=se(e,t);n=o.text}else"VALUE"===a.Type&&a.Ids.forEach((function(e){var n=se(t[e],t);i=n.text,null!=n.selected&&(r=n.selected)}))})),{key:n,value:{text:i,selected:r},polygon:ae(e.Geometry),boundingBox:ie(e.Geometry)}}(e,i))})),t.text.keyValues=o}return t}function se(e,t){var r,n="";return e.Relationships?(e.Relationships.forEach((function(e){e.Ids.forEach((function(e){var i=t[e];"WORD"===i.BlockType?n+=i.Text+" ":"SELECTION_ELEMENT"===i.BlockType&&(r="SELECTED"===i.SelectionStatus)}))})),{text:n=n.substr(0,n.length-1),selected:r}):{text:"",selected:void 0}}var ue=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),pe=function(){return(pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]a.Blocks.length?r(i):r(oe(a.Blocks))}))}))):(b={Document:l,FeatureTypes:y},this.textract.analyzeDocument(b,(function(e,t){if(e)return n(e);var i=t.Blocks;r(oe(i))}))),[2]}}))}))}))},t.prototype.identifyLabels=function(e){var t=this;return new Promise((function(r,n){return ce(t,void 0,void 0,(function(){var t,i,a,o,s,p,c,m,l,d,y,h;return me(this,(function(f){switch(f.label){case 0:return[4,u.e.get()];case 1:return(t=f.sent())?(i=this._config.identifyLabels,o=(a=void 0===i?{}:i).region,s=void 0===o?"":o,p=a.defaults,c=(void 0===p?{}:p).type,m=void 0===c?"LABELS":c,this.rekognition=new X({region:s,credentials:t}),[4,this.configureSource(e.labels.source).then((function(e){l=e})).catch((function(e){return n(e)}))]):[2,n("No credentials")];case 2:return f.sent(),d={Image:l},y=[],"LABELS"!==(h=e.labels.type||m)&&"ALL"!==h||y.push(this.detectLabels(d)),"UNSAFE"!==h&&"ALL"!==h||y.push(this.detectModerationLabels(d)),Promise.all(y).then((function(e){var t={};e.forEach((function(e){t=pe(pe({},t),e)})),r(t)})).catch((function(e){return n(e)})),[2]}}))}))}))},t.prototype.detectLabels=function(e){var t=this;return new Promise((function(r,n){t.rekognition.detectLabels(e,(function(e,t){if(e)return n(e);if(!t.Labels)return r({labels:null});var i=t.Labels.map((function(e){var t=e.Instances?e.Instances.map((function(e){return te(e.BoundingBox)})):void 0;return{name:e.Name,boundingBoxes:t,metadata:{confidence:e.Confidence,parents:re(e.Parents)}}}));return r({labels:i})}))}))},t.prototype.detectModerationLabels=function(e){var t=this;return new Promise((function(r,n){t.rekognition.detectModerationLabels(e,(function(e,t){return e?n(e):0!==t.ModerationLabels.length?r({unsafe:"YES"}):r({unsafe:"NO"})}))}))},t.prototype.identifyEntities=function(e){var t=this;return new Promise((function(r,n){return ce(t,void 0,void 0,(function(){var t,i,a,o,s,p,c,m,l,d,y,h,f,b,g,S,I,v,N,C,T,k=this;return me(this,(function(A){switch(A.label){case 0:return[4,u.e.get()];case 1:return(t=A.sent())?(i=this._config.identifyEntities,o=(a=void 0===i?{}:i).region,s=void 0===o?"":o,p=a.celebrityDetectionEnabled,c=void 0!==p&&p,m=a.defaults,d=(l=void 0===m?{}:m).collectionId,y=void 0===d?"":d,h=l.maxEntities,f=void 0===h?50:h,this.rekognition=new X({region:s,credentials:t}),[4,this.configureSource(e.entities.source).then((function(e){return b=e})).catch((function(e){return n(e)}))]):[2,n("No credentials")];case 2:if(A.sent(),g={Image:b},Object($.d)(e.entities)&&e.entities.celebrityDetection){if(!c)return[2,n("Error: You have to enable celebrity detection first")];this.rekognition.recognizeCelebrities(g,(function(e,t){if(e)return n(e);var i=t.CelebrityFaces.map((function(e){return{boundingBox:te(e.Face.BoundingBox),landmarks:re(e.Face.Landmarks),metadata:pe(pe({},te(e,["Id","Name","Urls"])),{pose:te(e.Face.Pose)})}}));r({entities:i})}))}else Object($.e)(e.entities)&&e.entities.collection?(S=e.entities,I=S.collectionId,v=void 0===I?y:I,N=S.maxEntities,C=void 0===N?f:N,T=pe(pe({},g),{CollectionId:v,MaxFaces:C}),this.rekognition.searchFacesByImage(T,(function(e,t){if(e)return n(e);var i=t.FaceMatches.map((function(e){return{boundingBox:te(e.Face.BoundingBox),metadata:{externalImageId:k.decodeExternalImageId(e.Face.ExternalImageId),similarity:e.Similarity}}}));r({entities:i})}))):this.rekognition.detectFaces(g,(function(e,t){if(e)return n(e);var i=t.FaceDetails.map((function(e){var t=["Smile","Eyeglasses","Sunglasses","Gender","Beard","Mustache","EyesOpen","MouthOpen"],r=te(e,t);return e.Emotions&&(r.emotions=e.Emotions.map((function(e){return e.Type}))),{boundingBox:te(e.BoundingBox),landmarks:re(e.Landmarks),ageRange:te(e.AgeRange),attributes:te(e,t),metadata:{confidence:e.Confidence,pose:te(e.Pose)}}}));r({entities:i})}));return[2]}}))}))}))},t.prototype.decodeExternalImageId=function(e){return(""+e).replace(/::/g,"/")},t}(Y.a),de=r(185),ye=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),he=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},fe=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]>>1,G=[["ary",T],["bind",b],["bindKey",g],["curry",I],["curryRight",v],["flip",A],["partial",N],["partialRight",C],["rearg",k]],F="[object Arguments]",V="[object Array]",j="[object AsyncFunction]",z="[object Boolean]",K="[object Date]",W="[object DOMException]",H="[object Error]",Q="[object Function]",J="[object GeneratorFunction]",Z="[object Map]",Y="[object Number]",X="[object Null]",$="[object Object]",ee="[object Proxy]",te="[object RegExp]",re="[object Set]",ne="[object String]",ie="[object Symbol]",ae="[object Undefined]",oe="[object WeakMap]",se="[object WeakSet]",ue="[object ArrayBuffer]",pe="[object DataView]",ce="[object Float32Array]",me="[object Float64Array]",le="[object Int8Array]",de="[object Int16Array]",ye="[object Int32Array]",he="[object Uint8Array]",fe="[object Uint8ClampedArray]",be="[object Uint16Array]",ge="[object Uint32Array]",Se=/\b__p \+= '';/g,Ie=/\b(__p \+=) '' \+/g,ve=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ne=/&(?:amp|lt|gt|quot|#39);/g,Ce=/[&<>"']/g,Te=RegExp(Ne.source),ke=RegExp(Ce.source),Ae=/<%-([\s\S]+?)%>/g,De=/<%([\s\S]+?)%>/g,Re=/<%=([\s\S]+?)%>/g,Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,xe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,we=/[\\^$.*+?()[\]{}|]/g,qe=RegExp(we.source),_e=/^\s+|\s+$/g,Me=/^\s+/,Le=/\s+$/,Oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Be=/\{\n\/\* \[wrapped with (.+)\] \*/,Ue=/,? & /,Ge=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,Ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,je=/\w*$/,ze=/^[-+]0x[0-9a-f]+$/i,Ke=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,He=/^0o[0-7]+$/i,Qe=/^(?:0|[1-9]\d*)$/,Je=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ze=/($^)/,Ye=/['\n\r\u2028\u2029\\]/g,Xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",$e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",et="[\\ud800-\\udfff]",tt="["+$e+"]",rt="["+Xe+"]",nt="\\d+",it="[\\u2700-\\u27bf]",at="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+$e+nt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",st="\\ud83c[\\udffb-\\udfff]",ut="[^\\ud800-\\udfff]",pt="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",mt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lt="(?:"+at+"|"+ot+")",dt="(?:"+mt+"|"+ot+")",yt="(?:"+rt+"|"+st+")"+"?",ht="[\\ufe0e\\ufe0f]?"+yt+("(?:\\u200d(?:"+[ut,pt,ct].join("|")+")[\\ufe0e\\ufe0f]?"+yt+")*"),ft="(?:"+[it,pt,ct].join("|")+")"+ht,bt="(?:"+[ut+rt+"?",rt,pt,ct,et].join("|")+")",gt=RegExp("['\u2019]","g"),St=RegExp(rt,"g"),It=RegExp(st+"(?="+st+")|"+bt+ht,"g"),vt=RegExp([mt+"?"+at+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[tt,mt,"$"].join("|")+")",dt+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[tt,mt+lt,"$"].join("|")+")",mt+"?"+lt+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",mt+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nt,ft].join("|"),"g"),Nt=RegExp("[\\u200d\\ud800-\\udfff"+Xe+"\\ufe0e\\ufe0f]"),Ct=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,At={};At[ce]=At[me]=At[le]=At[de]=At[ye]=At[he]=At[fe]=At[be]=At[ge]=!0,At[F]=At[V]=At[ue]=At[z]=At[pe]=At[K]=At[H]=At[Q]=At[Z]=At[Y]=At[$]=At[te]=At[re]=At[ne]=At[oe]=!1;var Dt={};Dt[F]=Dt[V]=Dt[ue]=Dt[pe]=Dt[z]=Dt[K]=Dt[ce]=Dt[me]=Dt[le]=Dt[de]=Dt[ye]=Dt[Z]=Dt[Y]=Dt[$]=Dt[te]=Dt[re]=Dt[ne]=Dt[ie]=Dt[he]=Dt[fe]=Dt[be]=Dt[ge]=!0,Dt[H]=Dt[Q]=Dt[oe]=!1;var Rt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pt=parseFloat,Et=parseInt,xt="object"==typeof e&&e&&e.Object===Object&&e,wt="object"==typeof self&&self&&self.Object===Object&&self,qt=xt||wt||Function("return this")(),_t=t&&!t.nodeType&&t,Mt=_t&&"object"==typeof n&&n&&!n.nodeType&&n,Lt=Mt&&Mt.exports===_t,Ot=Lt&&xt.process,Bt=function(){try{var e=Mt&&Mt.require&&Mt.require("util").types;return e||Ot&&Ot.binding&&Ot.binding("util")}catch(t){}}(),Ut=Bt&&Bt.isArrayBuffer,Gt=Bt&&Bt.isDate,Ft=Bt&&Bt.isMap,Vt=Bt&&Bt.isRegExp,jt=Bt&&Bt.isSet,zt=Bt&&Bt.isTypedArray;function Kt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Wt(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i-1}function Xt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n-1;);return r}function Ir(e,t){for(var r=e.length;r--&&sr(t,e[r],0)>-1;);return r}var vr=lr({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Nr=lr({"&":"&","<":"<",">":">",'"':""","'":"'"});function Cr(e){return"\\"+Rt[e]}function Tr(e){return Nt.test(e)}function kr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function Ar(e,t){return function(r){return e(t(r))}}function Dr(e,t){for(var r=-1,n=e.length,i=0,a=[];++r",""":'"',"'":"'"});var qr=function e(t){var r=(t=null==t?qt:qr.defaults(qt.Object(),t,qr.pick(qt,Tt))).Array,n=t.Date,i=t.Error,Xe=t.Function,$e=t.Math,et=t.Object,tt=t.RegExp,rt=t.String,nt=t.TypeError,it=r.prototype,at=Xe.prototype,ot=et.prototype,st=t["__core-js_shared__"],ut=at.toString,pt=ot.hasOwnProperty,ct=0,mt=function(){var e=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),lt=ot.toString,dt=ut.call(et),yt=qt._,ht=tt("^"+ut.call(pt).replace(we,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=Lt?t.Buffer:a,bt=t.Symbol,It=t.Uint8Array,Nt=ft?ft.allocUnsafe:a,Rt=Ar(et.getPrototypeOf,et),xt=et.create,wt=ot.propertyIsEnumerable,_t=it.splice,Mt=bt?bt.isConcatSpreadable:a,Ot=bt?bt.iterator:a,Bt=bt?bt.toStringTag:a,ir=function(){try{var e=Oa(et,"defineProperty");return e({},"",{}),e}catch(t){}}(),lr=t.clearTimeout!==qt.clearTimeout&&t.clearTimeout,_r=n&&n.now!==qt.Date.now&&n.now,Mr=t.setTimeout!==qt.setTimeout&&t.setTimeout,Lr=$e.ceil,Or=$e.floor,Br=et.getOwnPropertySymbols,Ur=ft?ft.isBuffer:a,Gr=t.isFinite,Fr=it.join,Vr=Ar(et.keys,et),jr=$e.max,zr=$e.min,Kr=n.now,Wr=t.parseInt,Hr=$e.random,Qr=it.reverse,Jr=Oa(t,"DataView"),Zr=Oa(t,"Map"),Yr=Oa(t,"Promise"),Xr=Oa(t,"Set"),$r=Oa(t,"WeakMap"),en=Oa(et,"create"),tn=$r&&new $r,rn={},nn=po(Jr),an=po(Zr),on=po(Yr),sn=po(Xr),un=po($r),pn=bt?bt.prototype:a,cn=pn?pn.valueOf:a,mn=pn?pn.toString:a;function ln(e){if(Ds(e)&&!fs(e)&&!(e instanceof fn)){if(e instanceof hn)return e;if(pt.call(e,"__wrapped__"))return co(e)}return new hn(e)}var dn=function(){function e(){}return function(t){if(!As(t))return{};if(xt)return xt(t);e.prototype=t;var r=new e;return e.prototype=a,r}}();function yn(){}function hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=a}function fn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=O,this.__views__=[]}function bn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function _n(e,t,r,n,i,o){var s,u=t&l,p=t&d,c=t&y;if(r&&(s=i?r(e,n,i,o):r(e)),s!==a)return s;if(!As(e))return e;var m=fs(e);if(m){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&pt.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return ta(e,s)}else{var h=Ga(e),f=h==Q||h==J;if(Is(e))return Ji(e,u);if(h==$||h==F||f&&!i){if(s=p||f?{}:Va(e),!u)return p?function(e,t){return ra(e,Ua(e),t)}(e,function(e,t){return e&&ra(t,iu(t),e)}(s,e)):function(e,t){return ra(e,Ba(e),t)}(e,En(s,e))}else{if(!Dt[h])return i?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case ue:return Zi(e);case z:case K:return new n(+e);case pe:return function(e,t){var r=t?Zi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case ce:case me:case le:case de:case ye:case he:case fe:case be:case ge:return Yi(e,r);case Z:return new n;case Y:case ne:return new n(e);case te:return function(e){var t=new e.constructor(e.source,je.exec(e));return t.lastIndex=e.lastIndex,t}(e);case re:return new n;case ie:return i=e,cn?et(cn.call(i)):{}}var i}(e,h,u)}}o||(o=new vn);var b=o.get(e);if(b)return b;o.set(e,s),ws(e)?e.forEach((function(n){s.add(_n(n,t,r,n,e,o))})):Rs(e)&&e.forEach((function(n,i){s.set(i,_n(n,t,r,i,e,o))}));var g=m?a:(c?p?Ea:Pa:p?iu:nu)(e);return Ht(g||e,(function(n,i){g&&(n=e[i=n]),Dn(s,i,_n(n,t,r,i,e,o))})),s}function Mn(e,t,r){var n=r.length;if(null==e)return!n;for(e=et(e);n--;){var i=r[n],o=t[i],s=e[i];if(s===a&&!(i in e)||!o(s))return!1}return!0}function Ln(e,t,r){if("function"!=typeof e)throw new nt(u);return ro((function(){e.apply(a,r)}),t)}function On(e,t,r,n){var i=-1,a=Yt,s=!0,u=e.length,p=[],c=t.length;if(!u)return p;r&&(t=$t(t,fr(r))),n?(a=Xt,s=!1):t.length>=o&&(a=gr,s=!1,t=new In(t));e:for(;++i-1},gn.prototype.set=function(e,t){var r=this.__data__,n=Rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Sn.prototype.clear=function(){this.size=0,this.__data__={hash:new bn,map:new(Zr||gn),string:new bn}},Sn.prototype.delete=function(e){var t=Ma(this,e).delete(e);return this.size-=t?1:0,t},Sn.prototype.get=function(e){return Ma(this,e).get(e)},Sn.prototype.has=function(e){return Ma(this,e).has(e)},Sn.prototype.set=function(e,t){var r=Ma(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},In.prototype.add=In.prototype.push=function(e){return this.__data__.set(e,p),this},In.prototype.has=function(e){return this.__data__.has(e)},vn.prototype.clear=function(){this.__data__=new gn,this.size=0},vn.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},vn.prototype.get=function(e){return this.__data__.get(e)},vn.prototype.has=function(e){return this.__data__.has(e)},vn.prototype.set=function(e,t){var r=this.__data__;if(r instanceof gn){var n=r.__data__;if(!Zr||n.length0&&r(s)?t>1?jn(s,t-1,r,n,i):er(i,s):n||(i[i.length]=s)}return i}var zn=oa(),Kn=oa(!0);function Wn(e,t){return e&&zn(e,t,nu)}function Hn(e,t){return e&&Kn(e,t,nu)}function Qn(e,t){return Zt(t,(function(t){return Cs(e[t])}))}function Jn(e,t){for(var r=0,n=(t=Ki(t,e)).length;null!=e&&rt}function $n(e,t){return null!=e&&pt.call(e,t)}function ei(e,t){return null!=e&&t in et(e)}function ti(e,t,n){for(var i=n?Xt:Yt,o=e[0].length,s=e.length,u=s,p=r(s),c=1/0,m=[];u--;){var l=e[u];u&&t&&(l=$t(l,fr(t))),c=zr(l.length,c),p[u]=!n&&(t||o>=120&&l.length>=120)?new In(u&&l):a}l=e[0];var d=-1,y=p[0];e:for(;++d=s)return u;var p=r[n];return u*("desc"==p?-1:1)}}return e.index-t.index}(e,t,r)}))}function bi(e,t,r){for(var n=-1,i=t.length,a={};++n-1;)s!==e&&_t.call(s,u,1),_t.call(e,u,1);return e}function Si(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==a){var a=i;za(i)?_t.call(e,i,1):Oi(e,i)}}return e}function Ii(e,t){return e+Or(Hr()*(t-e+1))}function vi(e,t){var r="";if(!e||t<1||t>_)return r;do{t%2&&(r+=e),(t=Or(t/2))&&(e+=e)}while(t);return r}function Ni(e,t){return no(Xa(e,t,Pu),e+"")}function Ci(e){return Cn(lu(e))}function Ti(e,t){var r=lu(e);return oo(r,qn(t,0,r.length))}function ki(e,t,r,n){if(!As(e))return e;for(var i=-1,o=(t=Ki(t,e)).length,s=o-1,u=e;null!=u&&++ia?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=r(a);++i>>1,o=e[a];null!==o&&!_s(o)&&(r?o<=t:o=o){var c=t?null:va(e);if(c)return Rr(c);s=!1,i=gr,p=new In}else p=t?[]:u;e:for(;++n=n?e:Pi(e,t,r)}var Qi=lr||function(e){return qt.clearTimeout(e)};function Ji(e,t){if(t)return e.slice();var r=e.length,n=Nt?Nt(r):new e.constructor(r);return e.copy(n),n}function Zi(e){var t=new e.constructor(e.byteLength);return new It(t).set(new It(e)),t}function Yi(e,t){var r=t?Zi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Xi(e,t){if(e!==t){var r=e!==a,n=null===e,i=e===e,o=_s(e),s=t!==a,u=null===t,p=t===t,c=_s(t);if(!u&&!c&&!o&&e>t||o&&s&&p&&!u&&!c||n&&s&&p||!r&&p||!i)return 1;if(!n&&!o&&!c&&e1?r[i-1]:a,s=i>2?r[2]:a;for(o=e.length>3&&"function"==typeof o?(i--,o):a,s&&Ka(r[0],r[1],s)&&(o=i<3?a:o,i=1),t=et(t);++n-1?i[o?t[s]:s]:a}}function ma(e){return Ra((function(t){var r=t.length,n=r,i=hn.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new nt(u);if(i&&!s&&"wrapper"==wa(o))var s=new hn([],!0)}for(n=s?n:r;++n1&&I.reverse(),l&&cu))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var m=-1,l=!0,d=r&f?new In:a;for(o.set(e,t),o.set(t,e);++m-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ht(G,(function(r){var n="_."+r[0];t&r[1]&&!Yt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Be);return t?t[1].split(Ue):[]}(n),r)))}function ao(e){var t=0,r=0;return function(){var n=Kr(),i=E-(n-r);if(r=n,i>0){if(++t>=P)return arguments[0]}else t=0;return e.apply(a,arguments)}}function oo(e,t){var r=-1,n=e.length,i=n-1;for(t=t===a?n:t;++r1?e[t-1]:a;return r="function"==typeof r?(e.pop(),r):a,xo(e,r)}));function Bo(e){var t=ln(e);return t.__chain__=!0,t}function Uo(e,t){return t(e)}var Go=Ra((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return wn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof fn&&za(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:Uo,args:[i],thisArg:a}),new hn(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(a),e}))):this.thru(i)}));var Fo=na((function(e,t,r){pt.call(e,r)?++e[r]:xn(e,r,1)}));var Vo=ca(ho),jo=ca(fo);function zo(e,t){return(fs(e)?Ht:Bn)(e,_a(t,3))}function Ko(e,t){return(fs(e)?Qt:Un)(e,_a(t,3))}var Wo=na((function(e,t,r){pt.call(e,r)?e[r].push(t):xn(e,r,[t])}));var Ho=Ni((function(e,t,n){var i=-1,a="function"==typeof t,o=gs(e)?r(e.length):[];return Bn(e,(function(e){o[++i]=a?Kt(t,e,n):ri(e,t,n)})),o})),Qo=na((function(e,t,r){xn(e,r,t)}));function Jo(e,t){return(fs(e)?$t:mi)(e,_a(t,3))}var Zo=na((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Yo=Ni((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Ka(e,t[0],t[1])?t=[]:r>2&&Ka(t[0],t[1],t[2])&&(t=[t[0]]),fi(e,jn(t,1),[])})),Xo=_r||function(){return qt.Date.now()};function $o(e,t,r){return t=r?a:t,t=e&&null==t?e.length:t,Ca(e,T,a,a,a,a,t)}function es(e,t){var r;if("function"!=typeof t)throw new nt(u);return e=Gs(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=a),r}}var ts=Ni((function(e,t,r){var n=b;if(r.length){var i=Dr(r,qa(ts));n|=N}return Ca(e,n,t,r,i)})),rs=Ni((function(e,t,r){var n=b|g;if(r.length){var i=Dr(r,qa(rs));n|=N}return Ca(t,n,e,r,i)}));function ns(e,t,r){var n,i,o,s,p,c,m=0,l=!1,d=!1,y=!0;if("function"!=typeof e)throw new nt(u);function h(t){var r=n,o=i;return n=i=a,m=t,s=e.apply(o,r)}function f(e){var r=e-c;return c===a||r>=t||r<0||d&&e-m>=o}function b(){var e=Xo();if(f(e))return g(e);p=ro(b,function(e){var r=t-(e-c);return d?zr(r,o-(e-m)):r}(e))}function g(e){return p=a,y&&n?h(e):(n=i=a,s)}function S(){var e=Xo(),r=f(e);if(n=arguments,i=this,c=e,r){if(p===a)return function(e){return m=e,p=ro(b,t),l?h(e):s}(c);if(d)return Qi(p),p=ro(b,t),h(c)}return p===a&&(p=ro(b,t)),s}return t=Vs(t)||0,As(r)&&(l=!!r.leading,o=(d="maxWait"in r)?jr(Vs(r.maxWait)||0,t):o,y="trailing"in r?!!r.trailing:y),S.cancel=function(){p!==a&&Qi(p),m=0,n=c=i=p=a},S.flush=function(){return p===a?s:g(Xo())},S}var is=Ni((function(e,t){return Ln(e,1,t)})),as=Ni((function(e,t,r){return Ln(e,Vs(t)||0,r)}));function os(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new nt(u);var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(os.Cache||Sn),r}function ss(e){if("function"!=typeof e)throw new nt(u);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}os.Cache=Sn;var us=Wi((function(e,t){var r=(t=1==t.length&&fs(t[0])?$t(t[0],fr(_a())):$t(jn(t,1),fr(_a()))).length;return Ni((function(n){for(var i=-1,a=zr(n.length,r);++i=t})),hs=ni(function(){return arguments}())?ni:function(e){return Ds(e)&&pt.call(e,"callee")&&!wt.call(e,"callee")},fs=r.isArray,bs=Ut?fr(Ut):function(e){return Ds(e)&&Yn(e)==ue};function gs(e){return null!=e&&ks(e.length)&&!Cs(e)}function Ss(e){return Ds(e)&&gs(e)}var Is=Ur||Vu,vs=Gt?fr(Gt):function(e){return Ds(e)&&Yn(e)==K};function Ns(e){if(!Ds(e))return!1;var t=Yn(e);return t==H||t==W||"string"==typeof e.message&&"string"==typeof e.name&&!Es(e)}function Cs(e){if(!As(e))return!1;var t=Yn(e);return t==Q||t==J||t==j||t==ee}function Ts(e){return"number"==typeof e&&e==Gs(e)}function ks(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=_}function As(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ds(e){return null!=e&&"object"==typeof e}var Rs=Ft?fr(Ft):function(e){return Ds(e)&&Ga(e)==Z};function Ps(e){return"number"==typeof e||Ds(e)&&Yn(e)==Y}function Es(e){if(!Ds(e)||Yn(e)!=$)return!1;var t=Rt(e);if(null===t)return!0;var r=pt.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ut.call(r)==dt}var xs=Vt?fr(Vt):function(e){return Ds(e)&&Yn(e)==te};var ws=jt?fr(jt):function(e){return Ds(e)&&Ga(e)==re};function qs(e){return"string"==typeof e||!fs(e)&&Ds(e)&&Yn(e)==ne}function _s(e){return"symbol"==typeof e||Ds(e)&&Yn(e)==ie}var Ms=zt?fr(zt):function(e){return Ds(e)&&ks(e.length)&&!!At[Yn(e)]};var Ls=ga(ci),Os=ga((function(e,t){return e<=t}));function Bs(e){if(!e)return[];if(gs(e))return qs(e)?xr(e):ta(e);if(Ot&&e[Ot])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ot]());var t=Ga(e);return(t==Z?kr:t==re?Rr:lu)(e)}function Us(e){return e?(e=Vs(e))===q||e===-q?(e<0?-1:1)*M:e===e?e:0:0===e?e:0}function Gs(e){var t=Us(e),r=t%1;return t===t?r?t-r:t:0}function Fs(e){return e?qn(Gs(e),0,O):0}function Vs(e){if("number"==typeof e)return e;if(_s(e))return L;if(As(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=As(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(_e,"");var r=Ke.test(e);return r||He.test(e)?Et(e.slice(2),r?2:8):ze.test(e)?L:+e}function js(e){return ra(e,iu(e))}function zs(e){return null==e?"":Mi(e)}var Ks=ia((function(e,t){if(Ja(t)||gs(t))ra(t,nu(t),e);else for(var r in t)pt.call(t,r)&&Dn(e,r,t[r])})),Ws=ia((function(e,t){ra(t,iu(t),e)})),Hs=ia((function(e,t,r,n){ra(t,iu(t),e,n)})),Qs=ia((function(e,t,r,n){ra(t,nu(t),e,n)})),Js=Ra(wn);var Zs=Ni((function(e,t){e=et(e);var r=-1,n=t.length,i=n>2?t[2]:a;for(i&&Ka(t[0],t[1],i)&&(n=1);++r1),t})),ra(e,Ea(e),r),n&&(r=_n(r,l|d|y,Aa));for(var i=t.length;i--;)Oi(r,t[i]);return r}));var uu=Ra((function(e,t){return null==e?{}:function(e,t){return bi(e,t,(function(t,r){return $s(e,r)}))}(e,t)}));function pu(e,t){if(null==e)return{};var r=$t(Ea(e),(function(e){return[e]}));return t=_a(t),bi(e,r,(function(e,r){return t(e,r[0])}))}var cu=Na(nu),mu=Na(iu);function lu(e){return null==e?[]:br(e,nu(e))}var du=ua((function(e,t,r){return t=t.toLowerCase(),e+(r?yu(t):t)}));function yu(e){return Nu(zs(e).toLowerCase())}function hu(e){return(e=zs(e))&&e.replace(Je,vr).replace(St,"")}var fu=ua((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),bu=ua((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),gu=sa("toLowerCase");var Su=ua((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Iu=ua((function(e,t,r){return e+(r?" ":"")+Nu(t)}));var vu=ua((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Nu=sa("toUpperCase");function Cu(e,t,r){return e=zs(e),(t=r?a:t)===a?function(e){return Ct.test(e)}(e)?function(e){return e.match(vt)||[]}(e):function(e){return e.match(Ge)||[]}(e):e.match(t)||[]}var Tu=Ni((function(e,t){try{return Kt(e,a,t)}catch(r){return Ns(r)?r:new i(r)}})),ku=Ra((function(e,t){return Ht(t,(function(t){t=uo(t),xn(e,t,ts(e[t],e))})),e}));function Au(e){return function(){return e}}var Du=ma(),Ru=ma(!0);function Pu(e){return e}function Eu(e){return si("function"==typeof e?e:_n(e,l))}var xu=Ni((function(e,t){return function(r){return ri(r,e,t)}})),wu=Ni((function(e,t){return function(r){return ri(e,r,t)}}));function qu(e,t,r){var n=nu(t),i=Qn(t,n);null!=r||As(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Qn(t,nu(t)));var a=!(As(r)&&"chain"in r)||!!r.chain,o=Cs(e);return Ht(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__),i=r.__actions__=ta(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,er([this.value()],arguments))})})),e}function _u(){}var Mu=ha($t),Lu=ha(Jt),Ou=ha(nr);function Bu(e){return Wa(e)?mr(uo(e)):function(e){return function(t){return Jn(t,e)}}(e)}var Uu=ba(),Gu=ba(!0);function Fu(){return[]}function Vu(){return!1}var ju=ya((function(e,t){return e+t}),0),zu=Ia("ceil"),Ku=ya((function(e,t){return e/t}),1),Wu=Ia("floor");var Hu=ya((function(e,t){return e*t}),1),Qu=Ia("round"),Ju=ya((function(e,t){return e-t}),0);return ln.after=function(e,t){if("function"!=typeof t)throw new nt(u);return e=Gs(e),function(){if(--e<1)return t.apply(this,arguments)}},ln.ary=$o,ln.assign=Ks,ln.assignIn=Ws,ln.assignInWith=Hs,ln.assignWith=Qs,ln.at=Js,ln.before=es,ln.bind=ts,ln.bindAll=ku,ln.bindKey=rs,ln.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return fs(e)?e:[e]},ln.chain=Bo,ln.chunk=function(e,t,n){t=(n?Ka(e,t,n):t===a)?1:jr(Gs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,u=r(Lr(i/t));oi?0:i+r),(n=n===a||n>i?i:Gs(n))<0&&(n+=i),n=r>n?0:Fs(n);r>>0)?(e=zs(e))&&("string"==typeof t||null!=t&&!xs(t))&&!(t=Mi(t))&&Tr(e)?Hi(xr(e),0,r):e.split(t,r):[]},ln.spread=function(e,t){if("function"!=typeof e)throw new nt(u);return t=null==t?0:jr(Gs(t),0),Ni((function(r){var n=r[t],i=Hi(r,0,t);return n&&er(i,n),Kt(e,this,i)}))},ln.tail=function(e){var t=null==e?0:e.length;return t?Pi(e,1,t):[]},ln.take=function(e,t,r){return e&&e.length?Pi(e,0,(t=r||t===a?1:Gs(t))<0?0:t):[]},ln.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Pi(e,(t=n-(t=r||t===a?1:Gs(t)))<0?0:t,n):[]},ln.takeRightWhile=function(e,t){return e&&e.length?Ui(e,_a(t,3),!1,!0):[]},ln.takeWhile=function(e,t){return e&&e.length?Ui(e,_a(t,3)):[]},ln.tap=function(e,t){return t(e),e},ln.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new nt(u);return As(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ns(e,t,{leading:n,maxWait:t,trailing:i})},ln.thru=Uo,ln.toArray=Bs,ln.toPairs=cu,ln.toPairsIn=mu,ln.toPath=function(e){return fs(e)?$t(e,uo):_s(e)?[e]:ta(so(zs(e)))},ln.toPlainObject=js,ln.transform=function(e,t,r){var n=fs(e),i=n||Is(e)||Ms(e);if(t=_a(t,4),null==r){var a=e&&e.constructor;r=i?n?new a:[]:As(e)&&Cs(a)?dn(Rt(e)):{}}return(i?Ht:Wn)(e,(function(e,n,i){return t(r,e,n,i)})),r},ln.unary=function(e){return $o(e,1)},ln.union=Do,ln.unionBy=Ro,ln.unionWith=Po,ln.uniq=function(e){return e&&e.length?Li(e):[]},ln.uniqBy=function(e,t){return e&&e.length?Li(e,_a(t,2)):[]},ln.uniqWith=function(e,t){return t="function"==typeof t?t:a,e&&e.length?Li(e,a,t):[]},ln.unset=function(e,t){return null==e||Oi(e,t)},ln.unzip=Eo,ln.unzipWith=xo,ln.update=function(e,t,r){return null==e?e:Bi(e,t,zi(r))},ln.updateWith=function(e,t,r,n){return n="function"==typeof n?n:a,null==e?e:Bi(e,t,zi(r),n)},ln.values=lu,ln.valuesIn=function(e){return null==e?[]:br(e,iu(e))},ln.without=wo,ln.words=Cu,ln.wrap=function(e,t){return ps(zi(t),e)},ln.xor=qo,ln.xorBy=_o,ln.xorWith=Mo,ln.zip=Lo,ln.zipObject=function(e,t){return Vi(e||[],t||[],Dn)},ln.zipObjectDeep=function(e,t){return Vi(e||[],t||[],ki)},ln.zipWith=Oo,ln.entries=cu,ln.entriesIn=mu,ln.extend=Ws,ln.extendWith=Hs,qu(ln,ln),ln.add=ju,ln.attempt=Tu,ln.camelCase=du,ln.capitalize=yu,ln.ceil=zu,ln.clamp=function(e,t,r){return r===a&&(r=t,t=a),r!==a&&(r=(r=Vs(r))===r?r:0),t!==a&&(t=(t=Vs(t))===t?t:0),qn(Vs(e),t,r)},ln.clone=function(e){return _n(e,y)},ln.cloneDeep=function(e){return _n(e,l|y)},ln.cloneDeepWith=function(e,t){return _n(e,l|y,t="function"==typeof t?t:a)},ln.cloneWith=function(e,t){return _n(e,y,t="function"==typeof t?t:a)},ln.conformsTo=function(e,t){return null==t||Mn(e,t,nu(t))},ln.deburr=hu,ln.defaultTo=function(e,t){return null==e||e!==e?t:e},ln.divide=Ku,ln.endsWith=function(e,t,r){e=zs(e),t=Mi(t);var n=e.length,i=r=r===a?n:qn(Gs(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},ln.eq=ls,ln.escape=function(e){return(e=zs(e))&&ke.test(e)?e.replace(Ce,Nr):e},ln.escapeRegExp=function(e){return(e=zs(e))&&qe.test(e)?e.replace(we,"\\$&"):e},ln.every=function(e,t,r){var n=fs(e)?Jt:Gn;return r&&Ka(e,t,r)&&(t=a),n(e,_a(t,3))},ln.find=Vo,ln.findIndex=ho,ln.findKey=function(e,t){return ar(e,_a(t,3),Wn)},ln.findLast=jo,ln.findLastIndex=fo,ln.findLastKey=function(e,t){return ar(e,_a(t,3),Hn)},ln.floor=Wu,ln.forEach=zo,ln.forEachRight=Ko,ln.forIn=function(e,t){return null==e?e:zn(e,_a(t,3),iu)},ln.forInRight=function(e,t){return null==e?e:Kn(e,_a(t,3),iu)},ln.forOwn=function(e,t){return e&&Wn(e,_a(t,3))},ln.forOwnRight=function(e,t){return e&&Hn(e,_a(t,3))},ln.get=Xs,ln.gt=ds,ln.gte=ys,ln.has=function(e,t){return null!=e&&Fa(e,t,$n)},ln.hasIn=$s,ln.head=go,ln.identity=Pu,ln.includes=function(e,t,r,n){e=gs(e)?e:lu(e),r=r&&!n?Gs(r):0;var i=e.length;return r<0&&(r=jr(i+r,0)),qs(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&sr(e,t,r)>-1},ln.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:Gs(r);return i<0&&(i=jr(n+i,0)),sr(e,t,i)},ln.inRange=function(e,t,r){return t=Us(t),r===a?(r=t,t=0):r=Us(r),function(e,t,r){return e>=zr(t,r)&&e=-_&&e<=_},ln.isSet=ws,ln.isString=qs,ln.isSymbol=_s,ln.isTypedArray=Ms,ln.isUndefined=function(e){return e===a},ln.isWeakMap=function(e){return Ds(e)&&Ga(e)==oe},ln.isWeakSet=function(e){return Ds(e)&&Yn(e)==se},ln.join=function(e,t){return null==e?"":Fr.call(e,t)},ln.kebabCase=fu,ln.last=No,ln.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==a&&(i=(i=Gs(r))<0?jr(n+i,0):zr(i,n-1)),t===t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):or(e,pr,i,!0)},ln.lowerCase=bu,ln.lowerFirst=gu,ln.lt=Ls,ln.lte=Os,ln.max=function(e){return e&&e.length?Fn(e,Pu,Xn):a},ln.maxBy=function(e,t){return e&&e.length?Fn(e,_a(t,2),Xn):a},ln.mean=function(e){return cr(e,Pu)},ln.meanBy=function(e,t){return cr(e,_a(t,2))},ln.min=function(e){return e&&e.length?Fn(e,Pu,ci):a},ln.minBy=function(e,t){return e&&e.length?Fn(e,_a(t,2),ci):a},ln.stubArray=Fu,ln.stubFalse=Vu,ln.stubObject=function(){return{}},ln.stubString=function(){return""},ln.stubTrue=function(){return!0},ln.multiply=Hu,ln.nth=function(e,t){return e&&e.length?hi(e,Gs(t)):a},ln.noConflict=function(){return qt._===this&&(qt._=yt),this},ln.noop=_u,ln.now=Xo,ln.pad=function(e,t,r){e=zs(e);var n=(t=Gs(t))?Er(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return fa(Or(i),r)+e+fa(Lr(i),r)},ln.padEnd=function(e,t,r){e=zs(e);var n=(t=Gs(t))?Er(e):0;return t&&nt){var n=e;e=t,t=n}if(r||e%1||t%1){var i=Hr();return zr(e+i*(t-e+Pt("1e-"+((i+"").length-1))),t)}return Ii(e,t)},ln.reduce=function(e,t,r){var n=fs(e)?tr:dr,i=arguments.length<3;return n(e,_a(t,4),r,i,Bn)},ln.reduceRight=function(e,t,r){var n=fs(e)?rr:dr,i=arguments.length<3;return n(e,_a(t,4),r,i,Un)},ln.repeat=function(e,t,r){return t=(r?Ka(e,t,r):t===a)?1:Gs(t),vi(zs(e),t)},ln.replace=function(){var e=arguments,t=zs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},ln.result=function(e,t,r){var n=-1,i=(t=Ki(t,e)).length;for(i||(i=1,e=a);++n_)return[];var r=O,n=zr(e,O);t=_a(t),e-=O;for(var i=hr(n,t);++r=o)return e;var u=r-Er(n);if(u<1)return n;var p=s?Hi(s,0,u).join(""):e.slice(0,u);if(i===a)return p+n;if(s&&(u+=p.length-u),xs(i)){if(e.slice(u).search(i)){var c,m=p;for(i.global||(i=tt(i.source,zs(je.exec(i))+"g")),i.lastIndex=0;c=i.exec(m);)var l=c.index;p=p.slice(0,l===a?u:l)}}else if(e.indexOf(Mi(i),u)!=u){var d=p.lastIndexOf(i);d>-1&&(p=p.slice(0,d))}return p+n},ln.unescape=function(e){return(e=zs(e))&&Te.test(e)?e.replace(Ne,wr):e},ln.uniqueId=function(e){var t=++ct;return zs(e)+t},ln.upperCase=vu,ln.upperFirst=Nu,ln.each=zo,ln.eachRight=Ko,ln.first=go,qu(ln,function(){var e={};return Wn(ln,(function(t,r){pt.call(ln.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),ln.VERSION="4.17.15",Ht(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){ln[e].placeholder=ln})),Ht(["drop","take"],(function(e,t){fn.prototype[e]=function(r){r=r===a?1:jr(Gs(r),0);var n=this.__filtered__&&!t?new fn(this):this.clone();return n.__filtered__?n.__takeCount__=zr(r,n.__takeCount__):n.__views__.push({size:zr(r,O),type:e+(n.__dir__<0?"Right":"")}),n},fn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ht(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=r==x||3==r;fn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:_a(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ht(["head","last"],(function(e,t){var r="take"+(t?"Right":"");fn.prototype[e]=function(){return this[r](1).value()[0]}})),Ht(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");fn.prototype[e]=function(){return this.__filtered__?new fn(this):this[r](1)}})),fn.prototype.compact=function(){return this.filter(Pu)},fn.prototype.find=function(e){return this.filter(e).head()},fn.prototype.findLast=function(e){return this.reverse().find(e)},fn.prototype.invokeMap=Ni((function(e,t){return"function"==typeof e?new fn(this):this.map((function(r){return ri(r,e,t)}))})),fn.prototype.reject=function(e){return this.filter(ss(_a(e)))},fn.prototype.slice=function(e,t){e=Gs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new fn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==a&&(r=(t=Gs(t))<0?r.dropRight(-t):r.take(t-e)),r)},fn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},fn.prototype.toArray=function(){return this.take(O)},Wn(fn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=ln[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(ln.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof fn,p=s[0],c=u||fs(t),m=function(e){var t=i.apply(ln,er([e],s));return n&&l?t[0]:t};c&&r&&"function"==typeof p&&1!=p.length&&(u=c=!1);var l=this.__chain__,d=!!this.__actions__.length,y=o&&!l,h=u&&!d;if(!o&&c){t=h?t:new fn(this);var f=e.apply(t,s);return f.__actions__.push({func:Uo,args:[m],thisArg:a}),new hn(f,l)}return y&&h?e.apply(this,s):(f=this.thru(m),y?n?f.value()[0]:f.value():f)})})),Ht(["pop","push","shift","sort","splice","unshift"],(function(e){var t=it[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);ln.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(fs(i)?i:[],e)}return this[r]((function(r){return t.apply(fs(r)?r:[],e)}))}})),Wn(fn.prototype,(function(e,t){var r=ln[t];if(r){var n=r.name+"";pt.call(rn,n)||(rn[n]=[]),rn[n].push({name:t,func:r})}})),rn[la(a,g).name]=[{name:"wrapper",func:a}],fn.prototype.clone=function(){var e=new fn(this.__wrapped__);return e.__actions__=ta(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ta(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ta(this.__views__),e},fn.prototype.reverse=function(){if(this.__filtered__){var e=new fn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},fn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=fs(e),n=t<0,i=r?e.length:0,a=function(e,t,r){var n=-1,i=r.length;for(;++n=this.__values__.length;return{done:e,value:e?a:this.__values__[this.__index__++]}},ln.prototype.plant=function(e){for(var t,r=this;r instanceof yn;){var n=co(r);n.__index__=0,n.__values__=a,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},ln.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof fn){var t=e;return this.__actions__.length&&(t=new fn(this)),(t=t.reverse()).__actions__.push({func:Uo,args:[Ao],thisArg:a}),new hn(t,this.__chain__)}return this.thru(Ao)},ln.prototype.toJSON=ln.prototype.valueOf=ln.prototype.value=function(){return Gi(this.__wrapped__,this.__actions__)},ln.prototype.first=ln.prototype.head,Ot&&(ln.prototype[Ot]=function(){return this}),ln}();qt._=qr,(i=function(){return qr}.call(t,r,t,n))===a||(n.exports=i)}).call(this)}).call(this,r(40),r(147)(e))},function(e,t,r){"use strict";var n=r(37);r.d(t,"a",(function(){return n.a})),r.d(t,"b",(function(){return n.b})),r.d(t,"c",(function(){return n.c})),r.d(t,"d",(function(){return n.d})),r.d(t,"e",(function(){return n.f})),r.d(t,"f",(function(){return n.k}))},function(e,t,r){var n=r(314),i=r(315),a=i;a.v1=n,a.v4=i,e.exports=a},function(e,t,r){"use strict";var n=r(1),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){t=t;var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(r,t/2)}},p=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(r,t)}},c=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},m=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,p=e.min(4*u,i);if(u){for(var c=0;c0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?(y.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._putToBuffer(e,t)):y.debug("retry times used up for event "+e.eventName)},e.prototype._record=function(e,t){return p(this,void 0,void 0,(function(){var r,n;return c(this,(function(i){return e.event,e.timestamp,r=e.config,n=e.credentials,this._initClients(r,n),[2,this._pinpointPutEvents(e,t)]}))}))},e.prototype._updateEndpoint=function(e,t){return p(this,void 0,void 0,(function(){var r,i,a,o,s,u,p,m,l=this;return c(this,(function(c){return e.timestamp,r=e.config,i=e.credentials,a=e.event,o=r.appId,r.region,s=r.endpointId,this._initClients(r,i),u=this._endpointRequest(r,n.h.transferKeyToLowerCase(a,[],["attributes","userAttributes","Attributes","UserAttributes"])),p={ApplicationId:o,EndpointId:s,EndpointRequest:u},m=this,y.debug("updateEndpoint with params: ",p),m.pinpointClient.updateEndpoint(p,(function(r,n){return r?(y.debug("updateEndpoint failed",r),r.message.startsWith("Exceeded maximum endpoint per user count")?void l._removeUnusedEndpoints(o,u.User.UserId).then((function(){y.debug("Remove the unused endpoints successfully"),l._retry(e,t)})).catch((function(e){return y.warn("Failed to remove unused endpoints with error: "+e),y.warn('Please ensure you have updated your Pinpoint IAM Policy with the Action: "mobiletargeting:GetUserEndpoints" in order to get endpoints info of the user'),t.reject(r)})):t.reject(r)):(y.debug("updateEndpoint success",n),l._endpointGenerating=!1,t.resolve(n))})),[2]}))}))},e.prototype._removeUnusedEndpoints=function(e,t){return p(this,void 0,void 0,(function(){var r=this;return c(this,(function(n){return[2,new Promise((function(n,i){r.pinpointClient.getUserEndpoints({ApplicationId:e,UserId:t},(function(a,o){if(a)return y.debug("Failed to get endpoints associated with the userId: "+t+" with error",a),i(a);var s=o.EndpointsResponse.Item;y.debug("get endpoints associated with the userId: "+t+" with data",s);for(var u=s[0],p=1;p0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0},e}(),se=r(116),ue=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},pe=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&this._config.flushSize<=Ce?this._config.flushSize:Ne,this._config.flushInterval=this._config.flushInterval||Te,this._sessionManager=new be,Object(fe.isEmpty)(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._isBrowser=n.h.browserOrNode().isBrowser,this._setupTimer()}e.prototype._setupTimer=function(){this._timer&&clearInterval(this._timer);var e=this._config,t=(e.flushSize,e.flushInterval),r=this;this._timer=setInterval((function(){r._sendFromBuffer()}),t)},e.prototype.record=function(e){return Se(this,void 0,void 0,(function(){var t,r,n,i,a;return Ie(this,(function(o){switch(o.label){case 0:return[4,this._getCredentials()];case 1:return(t=o.sent())?(Object.assign(e,{config:this._config,credentials:t,sentAt:(new Date).getTime()/1e3}),r=e.event,n=r.eventType,i=r.properties,"Identify"===n?(this._sessionManager.updateSessionInfo(i&&i.userId?i.userId:"",this._sessionInfo),[2]):(Object(fe.isEmpty)(e.event.userId)||this._sessionManager.updateSessionInfo(e.event.userId,this._sessionInfo),a=this.generateRequestParams(e,this._sessionInfo),"MediaAutoTrack"!==n?[3,7]:this._isBrowser?Object(fe.isEmpty)(Object(fe.get)(a,"eventData.properties.domElementId",null))?[3,3]:[4,this.isElementFullyLoaded(this.loadElement,a.eventData.properties.domElementId,500,5)]:[3,5])):[2,Promise.resolve(!1)];case 2:return o.sent()?new ge(a,this):ve.debug("Cannot find the media element."),[3,4];case 3:ve.debug("Missing domElementId field in 'properties' for MediaAutoTrack event type."),o.label=4;case 4:return[3,6];case 5:ve.debug("MediaAutoTrack only for browser"),o.label=6;case 6:return[2];case 7:return[2,this.putToBuffer(a)]}}))}))},e.prototype.loadElement=function(e){return new Promise((function(t,r){return document.getElementById(e)&&document.getElementById(e).clientHeight?t(!0):r(!0)}))},e.prototype.isElementFullyLoaded=function(e,t,r,n){var i=this;return new Promise((function(a,o){return e(t).then(a).catch((function(s){return n-1>0?(u=r,new Promise((function(e){return setTimeout(e,u)}))).then(i.isElementFullyLoaded.bind(null,e,t,r,n-1)).then(a).catch(o):o(s);var u}))}))},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AmazonPersonalize"},e.prototype.configure=function(e){ve.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),Object(fe.isEmpty)(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._setupTimer(),this._config},e.prototype.generateRequestParams=function(e,t){var r={},n=e.event,i=n.eventType,a=n.properties;return r.eventData={eventType:i,properties:a},r.sessionInfo=t,r.sentAt=e.sentAt,r.credentials=e.credentials,r.config=e.config,r},e.prototype._sendEvents=function(e){var t=e.length;if(0!==t){var r=e[0],n=r.config,i=r.credentials,a=r.sessionInfo;if(!this._init(n,i))return!1;if(t>0){for(var o=[],s=0;sa?1*n:0})),!0},t.objectLessAttributes=function(e,t){var r=Object.assign({},e);return t&&("string"===typeof t?delete r[t]:t.forEach((function(e){delete r[e]}))),r},t.filenameToContentType=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),i=r.filter((function(e){return n.endsWith("."+e.ext)}));return i.length>0?i[0].type:t},t.isTextFile=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},t.generateRandomString=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=32;r>0;r-=1)e+=t[Math.floor(Math.random()*t.length)];return e},t.makeQuerablePromise=function(e){if(e.isResolved)return e;var t=!0,r=!1,n=!1,i=e.then((function(e){return n=!0,t=!1,e}),(function(e){throw r=!0,t=!1,e}));return i.isFullfilled=function(){return n},i.isPending=function(){return t},i.isRejected=function(){return r},i},t.browserOrNode=function(){return{isBrowser:"undefined"!==typeof window&&"undefined"!==typeof window.document,isNode:"undefined"!==typeof e&&null!=e.versions&&null!=e.versions.node}},t.transferKeyToLowerCase=function(e,r,n){if(void 0===r&&(r=[]),void 0===n&&(n=[]),!t.isStrictObject(e))return e;var i={};for(var a in e){if(e.hasOwnProperty(a))i[r.includes(a)?a:a[0].toLowerCase()+a.slice(1)]=n.includes(a)?e[a]:t.transferKeyToLowerCase(e[a],r,n)}return i},t.transferKeyToUpperCase=function(e,r,n){if(void 0===r&&(r=[]),void 0===n&&(n=[]),!t.isStrictObject(e))return e;var i={};for(var a in e){if(e.hasOwnProperty(a))i[r.includes(a)?a:a[0].toUpperCase()+a.slice(1)]=n.includes(a)?e[a]:t.transferKeyToUpperCase(e[a],r,n)}return i},t.isStrictObject=function(e){return e instanceof Object&&!(e instanceof Array)&&!(e instanceof Function)&&!(e instanceof Number)&&!(e instanceof String)&&!(e instanceof Boolean)},t}();t.a=n}).call(this,r(51))},function(e,t,r){"use strict";function n(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index2&&void 0!==arguments[2]?arguments[2]:s,n=void 0,i=Array.isArray(e),a=[e],o=-1,m=[],l=void 0,d=void 0,y=void 0,h=[],f=[],b=e;do{var g=++o===a.length,S=g&&0!==m.length;if(g){if(d=0===f.length?void 0:h[h.length-1],l=y,y=f.pop(),S){if(i)l=l.slice();else{var I={};for(var v in l)l.hasOwnProperty(v)&&(I[v]=l[v]);l=I}for(var N=0,C=0;C0||I(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||I(0,"column in locationOffset is 1-indexed and must be positive")};function T(e,t,r){return new o("Syntax Error: ".concat(r),void 0,e,[t])}function k(e){for(var t=e.split(/\r\n|[\n\r]/g),r=null,n=1;n0&&D(t[0]);)t.shift();for(;t.length>0&&D(t[t.length-1]);)t.pop();return t.join("\n")}function A(e){for(var t=0;t",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function w(e){var t=e.value;return t?"".concat(e.kind,' "').concat(t,'"'):e.kind}var q=String.prototype.charCodeAt,_=String.prototype.slice;function M(e,t,r,n,i,a,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=a,this.next=null}function L(e){return isNaN(e)?x.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function O(e,t){var r=e.source,n=r.body,i=n.length,a=function(e,t,r){var n=e.length,i=t;for(;i=i)return new M(x.EOF,i,i,o,s,t);var u=q.call(n,a);switch(u){case 33:return new M(x.BANG,a,a+1,o,s,t);case 35:return function(e,t,r,n,i){var a,o=e.body,s=t;do{a=q.call(o,++s)}while(null!==a&&(a>31||9===a));return new M(x.COMMENT,t,s,r,n,i,_.call(o,t+1,s))}(r,a,o,s,t);case 36:return new M(x.DOLLAR,a,a+1,o,s,t);case 38:return new M(x.AMP,a,a+1,o,s,t);case 40:return new M(x.PAREN_L,a,a+1,o,s,t);case 41:return new M(x.PAREN_R,a,a+1,o,s,t);case 46:if(46===q.call(n,a+1)&&46===q.call(n,a+2))return new M(x.SPREAD,a,a+3,o,s,t);break;case 58:return new M(x.COLON,a,a+1,o,s,t);case 61:return new M(x.EQUALS,a,a+1,o,s,t);case 64:return new M(x.AT,a,a+1,o,s,t);case 91:return new M(x.BRACKET_L,a,a+1,o,s,t);case 93:return new M(x.BRACKET_R,a,a+1,o,s,t);case 123:return new M(x.BRACE_L,a,a+1,o,s,t);case 124:return new M(x.PIPE,a,a+1,o,s,t);case 125:return new M(x.BRACE_R,a,a+1,o,s,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,t,r,n,i){var a=e.body,o=a.length,s=t+1,u=0;for(;s!==o&&null!==(u=q.call(a,s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new M(x.NAME,t,s,r,n,i,_.call(a,t,s))}(r,a,o,s,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,r,n,i,a){var o=e.body,s=r,u=t,p=!1;45===s&&(s=q.call(o,++u));if(48===s){if((s=q.call(o,++u))>=48&&s<=57)throw T(e,u,"Invalid number, unexpected digit after 0: ".concat(L(s),"."))}else u=B(e,u,s),s=q.call(o,u);46===s&&(p=!0,s=q.call(o,++u),u=B(e,u,s),s=q.call(o,u));69!==s&&101!==s||(p=!0,43!==(s=q.call(o,++u))&&45!==s||(s=q.call(o,++u)),u=B(e,u,s));return new M(p?x.FLOAT:x.INT,t,u,n,i,a,_.call(o,t,u))}(r,a,u,o,s,t);case 34:return 34===q.call(n,a+1)&&34===q.call(n,a+2)?function(e,t,r,n,i){var a=e.body,o=t+3,s=o,u=0,p="";for(;o=48&&a<=57){do{a=q.call(n,++i)}while(a>=48&&a<=57);return i}throw T(e,i,"Invalid number, expected digit but got: ".concat(L(a),"."))}function U(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}M.prototype.toJSON=M.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}};var G=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"}),F=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function V(e,t){var r="string"===typeof e?new C(e):e;if(!(r instanceof C))throw new TypeError("Must provide Source. Received: ".concat(S(r)));return function(e){var t=e.token;return{kind:G.DOCUMENT,definitions:_e(e,x.SOF,z,x.EOF),loc:Ae(e,t)}}(R(r,t||{}))}function j(e){var t=Ee(e,x.NAME);return{kind:G.NAME,value:t.value,loc:Ae(e,t)}}function z(e){if(Re(e,x.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return K(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return le(e);case"extend":return function(e){var t=e.lookahead();if(t.kind===x.NAME)switch(t.value){case"schema":return function(e){var t=e.token;xe(e,"extend"),xe(e,"schema");var r=ue(e,!0),n=Re(e,x.BRACE_L)?_e(e,x.BRACE_L,he,x.BRACE_R):[];if(0===r.length&&0===n.length)throw we(e);return{kind:G.SCHEMA_EXTENSION,directives:r,operationTypes:n,loc:Ae(e,t)}}(e);case"scalar":return function(e){var t=e.token;xe(e,"extend"),xe(e,"scalar");var r=j(e),n=ue(e,!0);if(0===n.length)throw we(e);return{kind:G.SCALAR_TYPE_EXTENSION,name:r,directives:n,loc:Ae(e,t)}}(e);case"type":return function(e){var t=e.token;xe(e,"extend"),xe(e,"type");var r=j(e),n=fe(e),i=ue(e,!0),a=be(e);if(0===n.length&&0===i.length&&0===a.length)throw we(e);return{kind:G.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:i,fields:a,loc:Ae(e,t)}}(e);case"interface":return function(e){var t=e.token;xe(e,"extend"),xe(e,"interface");var r=j(e),n=ue(e,!0),i=be(e);if(0===n.length&&0===i.length)throw we(e);return{kind:G.INTERFACE_TYPE_EXTENSION,name:r,directives:n,fields:i,loc:Ae(e,t)}}(e);case"union":return function(e){var t=e.token;xe(e,"extend"),xe(e,"union");var r=j(e),n=ue(e,!0),i=ve(e);if(0===n.length&&0===i.length)throw we(e);return{kind:G.UNION_TYPE_EXTENSION,name:r,directives:n,types:i,loc:Ae(e,t)}}(e);case"enum":return function(e){var t=e.token;xe(e,"extend"),xe(e,"enum");var r=j(e),n=ue(e,!0),i=Ne(e);if(0===n.length&&0===i.length)throw we(e);return{kind:G.ENUM_TYPE_EXTENSION,name:r,directives:n,values:i,loc:Ae(e,t)}}(e);case"input":return function(e){var t=e.token;xe(e,"extend"),xe(e,"input");var r=j(e),n=ue(e,!0),i=Te(e);if(0===n.length&&0===i.length)throw we(e);return{kind:G.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:i,loc:Ae(e,t)}}(e)}throw we(e,t)}(e)}else{if(Re(e,x.BRACE_L))return K(e);if(de(e))return le(e)}throw we(e)}function K(e){if(Re(e,x.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return W(e);case"fragment":return function(e){var t=e.token;if(xe(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:G.FRAGMENT_DEFINITION,name:re(e),variableDefinitions:Q(e),typeCondition:(xe(e,"on"),me(e)),directives:ue(e,!1),selectionSet:Y(e),loc:Ae(e,t)};return{kind:G.FRAGMENT_DEFINITION,name:re(e),typeCondition:(xe(e,"on"),me(e)),directives:ue(e,!1),selectionSet:Y(e),loc:Ae(e,t)}}(e)}else if(Re(e,x.BRACE_L))return W(e);throw we(e)}function W(e){var t=e.token;if(Re(e,x.BRACE_L))return{kind:G.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:Y(e),loc:Ae(e,t)};var r,n=H(e);return Re(e,x.NAME)&&(r=j(e)),{kind:G.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:Q(e),directives:ue(e,!1),selectionSet:Y(e),loc:Ae(e,t)}}function H(e){var t=Ee(e,x.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw we(e,t)}function Q(e){return Re(e,x.PAREN_L)?_e(e,x.PAREN_L,J,x.PAREN_R):[]}function J(e){var t=e.token;return e.options.experimentalVariableDefinitionDirectives?{kind:G.VARIABLE_DEFINITION,variable:Z(e),type:(Ee(e,x.COLON),ce(e)),defaultValue:Pe(e,x.EQUALS)?ne(e,!0):void 0,directives:ue(e,!0),loc:Ae(e,t)}:{kind:G.VARIABLE_DEFINITION,variable:Z(e),type:(Ee(e,x.COLON),ce(e)),defaultValue:Pe(e,x.EQUALS)?ne(e,!0):void 0,loc:Ae(e,t)}}function Z(e){var t=e.token;return Ee(e,x.DOLLAR),{kind:G.VARIABLE,name:j(e),loc:Ae(e,t)}}function Y(e){var t=e.token;return{kind:G.SELECTION_SET,selections:_e(e,x.BRACE_L,X,x.BRACE_R),loc:Ae(e,t)}}function X(e){return Re(e,x.SPREAD)?function(e){var t,r=e.token;if(Ee(e,x.SPREAD),Re(e,x.NAME)&&"on"!==e.token.value)return{kind:G.FRAGMENT_SPREAD,name:re(e),directives:ue(e,!1),loc:Ae(e,r)};"on"===e.token.value&&(e.advance(),t=me(e));return{kind:G.INLINE_FRAGMENT,typeCondition:t,directives:ue(e,!1),selectionSet:Y(e),loc:Ae(e,r)}}(e):function(e){var t,r,n=e.token,i=j(e);Pe(e,x.COLON)?(t=i,r=j(e)):r=i;return{kind:G.FIELD,alias:t,name:r,arguments:$(e,!1),directives:ue(e,!1),selectionSet:Re(e,x.BRACE_L)?Y(e):void 0,loc:Ae(e,n)}}(e)}function $(e,t){var r=t?te:ee;return Re(e,x.PAREN_L)?_e(e,x.PAREN_L,r,x.PAREN_R):[]}function ee(e){var t=e.token;return{kind:G.ARGUMENT,name:j(e),value:(Ee(e,x.COLON),ne(e,!1)),loc:Ae(e,t)}}function te(e){var t=e.token;return{kind:G.ARGUMENT,name:j(e),value:(Ee(e,x.COLON),ae(e)),loc:Ae(e,t)}}function re(e){if("on"===e.token.value)throw we(e);return j(e)}function ne(e,t){var r=e.token;switch(r.kind){case x.BRACKET_L:return function(e,t){var r=e.token,n=t?ae:oe;return{kind:G.LIST,values:qe(e,x.BRACKET_L,n,x.BRACKET_R),loc:Ae(e,r)}}(e,t);case x.BRACE_L:return function(e,t){var r=e.token;Ee(e,x.BRACE_L);var n=[];for(;!Pe(e,x.BRACE_R);)n.push(se(e,t));return{kind:G.OBJECT,fields:n,loc:Ae(e,r)}}(e,t);case x.INT:return e.advance(),{kind:G.INT,value:r.value,loc:Ae(e,r)};case x.FLOAT:return e.advance(),{kind:G.FLOAT,value:r.value,loc:Ae(e,r)};case x.STRING:case x.BLOCK_STRING:return ie(e);case x.NAME:return"true"===r.value||"false"===r.value?(e.advance(),{kind:G.BOOLEAN,value:"true"===r.value,loc:Ae(e,r)}):"null"===r.value?(e.advance(),{kind:G.NULL,loc:Ae(e,r)}):(e.advance(),{kind:G.ENUM,value:r.value,loc:Ae(e,r)});case x.DOLLAR:if(!t)return Z(e)}throw we(e)}function ie(e){var t=e.token;return e.advance(),{kind:G.STRING,value:t.value,block:t.kind===x.BLOCK_STRING,loc:Ae(e,t)}}function ae(e){return ne(e,!0)}function oe(e){return ne(e,!1)}function se(e,t){var r=e.token;return{kind:G.OBJECT_FIELD,name:j(e),value:(Ee(e,x.COLON),ne(e,t)),loc:Ae(e,r)}}function ue(e,t){for(var r=[];Re(e,x.AT);)r.push(pe(e,t));return r}function pe(e,t){var r=e.token;return Ee(e,x.AT),{kind:G.DIRECTIVE,name:j(e),arguments:$(e,t),loc:Ae(e,r)}}function ce(e){var t,r=e.token;return Pe(e,x.BRACKET_L)?(t=ce(e),Ee(e,x.BRACKET_R),t={kind:G.LIST_TYPE,type:t,loc:Ae(e,r)}):t=me(e),Pe(e,x.BANG)?{kind:G.NON_NULL_TYPE,type:t,loc:Ae(e,r)}:t}function me(e){var t=e.token;return{kind:G.NAMED_TYPE,name:j(e),loc:Ae(e,t)}}function le(e){var t=de(e)?e.lookahead():e.token;if(t.kind===x.NAME)switch(t.value){case"schema":return function(e){var t=e.token;xe(e,"schema");var r=ue(e,!0),n=_e(e,x.BRACE_L,he,x.BRACE_R);return{kind:G.SCHEMA_DEFINITION,directives:r,operationTypes:n,loc:Ae(e,t)}}(e);case"scalar":return function(e){var t=e.token,r=ye(e);xe(e,"scalar");var n=j(e),i=ue(e,!0);return{kind:G.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:i,loc:Ae(e,t)}}(e);case"type":return function(e){var t=e.token,r=ye(e);xe(e,"type");var n=j(e),i=fe(e),a=ue(e,!0),o=be(e);return{kind:G.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:i,directives:a,fields:o,loc:Ae(e,t)}}(e);case"interface":return function(e){var t=e.token,r=ye(e);xe(e,"interface");var n=j(e),i=ue(e,!0),a=be(e);return{kind:G.INTERFACE_TYPE_DEFINITION,description:r,name:n,directives:i,fields:a,loc:Ae(e,t)}}(e);case"union":return function(e){var t=e.token,r=ye(e);xe(e,"union");var n=j(e),i=ue(e,!0),a=ve(e);return{kind:G.UNION_TYPE_DEFINITION,description:r,name:n,directives:i,types:a,loc:Ae(e,t)}}(e);case"enum":return function(e){var t=e.token,r=ye(e);xe(e,"enum");var n=j(e),i=ue(e,!0),a=Ne(e);return{kind:G.ENUM_TYPE_DEFINITION,description:r,name:n,directives:i,values:a,loc:Ae(e,t)}}(e);case"input":return function(e){var t=e.token,r=ye(e);xe(e,"input");var n=j(e),i=ue(e,!0),a=Te(e);return{kind:G.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:i,fields:a,loc:Ae(e,t)}}(e);case"directive":return function(e){var t=e.token,r=ye(e);xe(e,"directive"),Ee(e,x.AT);var n=j(e),i=Se(e);xe(e,"on");var a=function(e){Pe(e,x.PIPE);var t=[];do{t.push(ke(e))}while(Pe(e,x.PIPE));return t}(e);return{kind:G.DIRECTIVE_DEFINITION,description:r,name:n,arguments:i,locations:a,loc:Ae(e,t)}}(e)}throw we(e,t)}function de(e){return Re(e,x.STRING)||Re(e,x.BLOCK_STRING)}function ye(e){if(de(e))return ie(e)}function he(e){var t=e.token,r=H(e);Ee(e,x.COLON);var n=me(e);return{kind:G.OPERATION_TYPE_DEFINITION,operation:r,type:n,loc:Ae(e,t)}}function fe(e){var t=[];if("implements"===e.token.value){e.advance(),Pe(e,x.AMP);do{t.push(me(e))}while(Pe(e,x.AMP)||e.options.allowLegacySDLImplementsInterfaces&&Re(e,x.NAME))}return t}function be(e){return e.options.allowLegacySDLEmptyFields&&Re(e,x.BRACE_L)&&e.lookahead().kind===x.BRACE_R?(e.advance(),e.advance(),[]):Re(e,x.BRACE_L)?_e(e,x.BRACE_L,ge,x.BRACE_R):[]}function ge(e){var t=e.token,r=ye(e),n=j(e),i=Se(e);Ee(e,x.COLON);var a=ce(e),o=ue(e,!0);return{kind:G.FIELD_DEFINITION,description:r,name:n,arguments:i,type:a,directives:o,loc:Ae(e,t)}}function Se(e){return Re(e,x.PAREN_L)?_e(e,x.PAREN_L,Ie,x.PAREN_R):[]}function Ie(e){var t=e.token,r=ye(e),n=j(e);Ee(e,x.COLON);var i,a=ce(e);Pe(e,x.EQUALS)&&(i=ae(e));var o=ue(e,!0);return{kind:G.INPUT_VALUE_DEFINITION,description:r,name:n,type:a,defaultValue:i,directives:o,loc:Ae(e,t)}}function ve(e){var t=[];if(Pe(e,x.EQUALS)){Pe(e,x.PIPE);do{t.push(me(e))}while(Pe(e,x.PIPE))}return t}function Ne(e){return Re(e,x.BRACE_L)?_e(e,x.BRACE_L,Ce,x.BRACE_R):[]}function Ce(e){var t=e.token,r=ye(e),n=j(e),i=ue(e,!0);return{kind:G.ENUM_VALUE_DEFINITION,description:r,name:n,directives:i,loc:Ae(e,t)}}function Te(e){return Re(e,x.BRACE_L)?_e(e,x.BRACE_L,Ie,x.BRACE_R):[]}function ke(e){var t=e.token,r=j(e);if(F.hasOwnProperty(r.value))return r;throw we(e,t)}function Ae(e,t){if(!e.options.noLocation)return new De(t,e.lastToken,e.source)}function De(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}function Re(e,t){return e.token.kind===t}function Pe(e,t){var r=e.token.kind===t;return r&&e.advance(),r}function Ee(e,t){var r=e.token;if(r.kind===t)return e.advance(),r;throw T(e.source,r.start,"Expected ".concat(t,", found ").concat(w(r)))}function xe(e,t){var r=e.token;if(r.kind===x.NAME&&r.value===t)return e.advance(),r;throw T(e.source,r.start,'Expected "'.concat(t,'", found ').concat(w(r)))}function we(e,t){var r=t||e.token;return T(e.source,r.start,"Unexpected ".concat(w(r)))}function qe(e,t,r,n){Ee(e,t);for(var i=[];!Pe(e,n);)i.push(r(e));return i}function _e(e,t,r,n){Ee(e,t);for(var i=[r(e)];!Pe(e,n);)i.push(r(e));return i}De.prototype.toJSON=De.prototype.inspect=function(){return{start:this.start,end:this.end}};var Me=r(50),Le=r(1),Oe=r(125),Be=r.n(Oe),Ue=function(){return(Ue=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0;l--){var d=o[l];"."===d?a(o,l):".."===d?(a(o,l),m++):m&&(a(o,l),m--)}if(!p)for(;m--;m)o.unshift("..");!p||""===o[0]||o[0]&&i(o[0])||o.unshift("");var y=o.join("/");return r&&"/"!==y.substr(-1)&&(y+="/"),y};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if(Array.isArray(t))return Array.isArray(r)&&t.length===r.length&&t.every((function(t,n){return e(t,r[n])}));if("object"===typeof t||"object"===typeof r){var n=s(t),i=s(r);return n!==t||i!==r?e(n,i):Object.keys(Object.assign({},t,r)).every((function(n){return e(t[n],r[n])}))}return!1},p=r(35);function c(e){return"/"===e.charAt(0)?e:"/"+e}function m(e){return"/"===e.charAt(0)?e.substr(1):e}function l(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function y(e){var t=e.pathname,r=e.search,n=e.hash,i=t||"/";return r&&"?"!==r&&(i+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(i+="#"===n.charAt(0)?n:"#"+n),i}function h(e,t,r,i){var a;"string"===typeof e?(a=function(e){var t=e||"/",r="",n="",i=t.indexOf("#");-1!==i&&(n=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(r=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===r?"":r,hash:"#"===n?"":n}}(e)).state=t:(void 0===(a=Object(n.a)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return r&&(a.key=r),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=o(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function f(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function b(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,r,n,i){if(null!=e){var a="function"===typeof e?e(t,r):e;"string"===typeof a?"function"===typeof n?n(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var r=!0;function n(){r&&e.apply(void 0,arguments)}return t.push(n),function(){r=!1,t=t.filter((function(e){return e!==n}))}},notifyListeners:function(){for(var e=arguments.length,r=new Array(e),n=0;nt?r.splice(t,r.length-t,n):r.push(n),m({action:"PUSH",location:n,index:t,entries:r})}}))},replace:function(e,t){var n=h(e,t,l(),I.location);c.confirmTransitionTo(n,"REPLACE",r,(function(e){e&&(I.entries[I.index]=n,m({action:"REPLACE",location:n}))}))},go:S,goBack:function(){S(-1)},goForward:function(){S(1)},canGo:function(e){var t=I.index+e;return t>=0&&t",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(p),m=["%","/","?",";","#"].concat(c),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},f={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(148);function S(e,t,r){if(e&&i.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?q+="x":q+=w[_];if(!q.match(d)){var L=E.slice(0,D),O=E.slice(D+1),B=w.match(y);B&&(L.push(B[1]),O.unshift(B[2])),O.length&&(S="/"+O.join(".")+S),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",G=this.hostname||"";this.host=G+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==S[0]&&(S="/"+S))}if(!h[N])for(D=0,x=c.length;D0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!C.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=C.slice(-1)[0],A=(r.host||e.host||C.length>1)&&("."===k||".."===k)||""===k,D=0,R=C.length;R>=0;R--)"."===(k=C[R])?C.splice(R,1):".."===k?(C.splice(R,1),D++):D&&(C.splice(R,1),D--);if(!v&&!N)for(;D--;D)C.unshift("..");!v||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),A&&"/"!==C.join("/").substr(-1)&&C.push("");var P,E=""===C[0]||C[0]&&"/"===C[0].charAt(0);T&&(r.hostname=r.host=E?"":C.length?C.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(v=v||r.host&&C.length)&&!E&&C.unshift(""),C.length?r.pathname=C.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){"use strict";var n=r(1),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new n.n).getStorage()};function a(e){var t=0;t=e.length;for(var r=e.length;r>=0;r-=1){var n=e.charCodeAt(r);n>127&&n<=2047?t+=1:n>2047&&n<=65535&&(t+=2),n>=56320&&n<=57343&&(r-=1)}return t}function o(){return(new Date).getTime()}function s(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var u={},p=function(){function e(){}return e.clear=function(){u={}},e.getItem=function(e){return u[e]||null},e.setItem=function(e,t){u[e]=t},e.removeItem=function(e){delete u[e]},e}(),c=function(e){this.key=e||"",this.prevNode=null,this.nextNode=null},m=function(){function e(){this.head=new c,this.tail=new c,this.hashtable={},this.length=0,this.head.nextNode=this.tail,this.tail.prevNode=this.head}return e.prototype.insertNodeToHead=function(e){var t=this.head.nextNode;this.head.nextNode=e,e.nextNode=t,e.prevNode=this.head,t.prevNode=e,this.length=this.length+1},e.prototype.removeNode=function(e){e.prevNode.nextNode=e.nextNode,e.nextNode.prevNode=e.prevNode,e.prevNode=null,e.nextNode=null,this.length=this.length-1},e.prototype.isEmpty=function(){return 0===this.length},e.prototype.refresh=function(e){var t=this.hashtable[e];this.removeNode(t),this.insertNodeToHead(t)},e.prototype.insertItem=function(e){var t=new c(e);this.hashtable[e]=t,this.insertNodeToHead(t)},e.prototype.getLastItem=function(){return this.tail.prevNode.key},e.prototype.removeItem=function(e){var t=this.hashtable[e];this.removeNode(t),delete this.hashtable[e]},e.prototype.getSize=function(){return this.length},e.prototype.containsKey=function(e){return e in this.hashtable},e.prototype.clearList=function(){for(var e=0,t=Object.keys(this.hashtable);ethis.config.capacityInBytes&&(l.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(l.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(l.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(l.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,r){var n={key:e,data:t,timestamp:o(),visitedTime:o(),priority:r.priority,expires:r.expires,type:typeof t,byteSize:0};return n.byteSize=a(JSON.stringify(n)),n.byteSize=a(JSON.stringify(n)),n},e.prototype.configure=function(e){return e?(e.keyPrefix&&l.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),y=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),h=new n.c("Cache"),f=new(function(e){function t(t){var r=this,n=t?Object.assign({},i,t):i;return(r=e.call(this,n)||this).config.storage=n.storage,r.getItem=r.getItem.bind(r),r.setItem=r.setItem.bind(r),r.removeItem=r.removeItem.bind(r),r}return y(t,e),t.prototype._decreaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t-e).toString())},t.prototype._increaseCurSizeInBytes=function(e){var t=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(t+e).toString())},t.prototype._refreshItem=function(e,t){return e.visitedTime=o(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),r=JSON.parse(t);return o()>=r.expires},t.prototype._removeItem=function(e,t){var r=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(r),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(r){this._decreaseCurSizeInBytes(t.byteSize),h.error("Failed to set item "+r)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,r=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>r?t:r},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],r=0;rt.priority?-1:e.priority5)h.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var a=this.fillCacheItem(n,t,i);if(a.byteSize>this.config.itemMaxSize)h.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var s=this.config.storage.getItem(n);if(s&&this._removeItem(n,JSON.parse(s).byteSize),this._isCacheFull(a.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(a.byteSize)){var p=this._sizeToPop(a.byteSize);this._popOutItems(u,p)}}this._setItem(n,a)}catch(c){h.warn("setItem failed! "+c)}}}else h.warn("The value of item should not be undefined!");else h.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){h.log("Get item: key is "+e+" with options "+t);var r=null,n=this.config.keyPrefix+e;if(n===this.config.keyPrefix||n===this.cacheCurSizeKey)return h.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(r=this.config.storage.getItem(n))){if(!this._isExpired(n)){var i=JSON.parse(r);return(i=this._refreshItem(i,n)).data}this._removeItem(n,JSON.parse(r).byteSize),r=null}if(t&&void 0!==t.callback){var a=t.callback();return null!==a&&this.setItem(e,a,t),a}return null}catch(o){return h.warn("getItem failed! "+o),null}},t.prototype.removeItem=function(e){h.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var r=this.config.storage.getItem(t);r&&this._removeItem(t,JSON.parse(r).byteSize)}catch(n){h.warn("removeItem failed! "+n)}},t.prototype.clear=function(){h.log("Clear Cache");for(var e=[],t=0;t=r.expires},t.prototype._removeItem=function(e,t){this.cacheList[t].removeItem(e),this._decreaseCurSizeInBytes(JSON.parse(p.getItem(e)).byteSize),p.removeItem(e)},t.prototype._setItem=function(e,t,r){this.cacheList[r].insertItem(e),this._increaseCurSizeInBytes(t.byteSize),p.setItem(e,JSON.stringify(t))},t.prototype._isCacheFull=function(e){return this.curSizeInBytes+e>this.config.capacityInBytes},t.prototype.containsKey=function(e){for(var t=this.config.keyPrefix+e,r=0;r5)g.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var a=this.fillCacheItem(n,t,i);if(a.byteSize>this.config.itemMaxSize)g.warn("Item with key: "+e+" you are trying to put into is too big!");else{var s=this.containsKey(e);-1!==s&&this._removeItem(n,s-1);for(var u=this.maxPriority-1;this._isCacheFull(a.byteSize)&&u>=0;)if(this.cacheList[u].isEmpty())u-=1;else{var p=this.cacheList[u].getLastItem();this._removeItem(p,u)}this._setItem(n,a,Number(a.priority)-1)}}}else g.warn("The value of item should not be undefined!");else g.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){var r=null,n=this.config.keyPrefix+e;if(n===this.config.keyPrefix||n===this.cacheCurSizeKey)return g.warn("Invalid key: should not be empty or 'CurSize'"),null;var i=this.containsKey(e);if(-1!==i){if(!this._isExpired(n)){r=p.getItem(n);var a=JSON.parse(r);return this.cacheList[a.priority-1].refresh(n),a.data}this._removeItem(n,i-1)}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null},t.prototype.removeItem=function(e){var t=this.config.keyPrefix+e,r=this.containsKey(e);-1!==r&&this._removeItem(t,r-1)},t.prototype.clear=function(){for(var e=0;e=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Object(i.default)(e),c=p.getUTCDay(),m=(c1)for(var r=1;r=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},,function(e,t,r){var n,i;!function(a){if(void 0===(i="function"===typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=i),!0,e.exports=a(),!!0){var o=window.Cookies,s=window.Cookies=a();s.noConflict=function(){return window.Cookies=o,s}}}((function(){function e(){for(var e=0,t={};e=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var l=new Date(0);l.setUTCFullYear(o+1,0,m),l.setUTCHours(0,0,0,0);var d=Object(a.a)(l,t),y=new Date(0);y.setUTCFullYear(o,0,m),y.setUTCHours(0,0,0,0);var h=Object(a.a)(y,t);return r.getTime()>=d.getTime()?o+1:r.getTime()>=h.getTime()?o:o-1}},,function(e,t,r){!function(t,n,i){var a;e.exports=(a=r(23),r(81),r(321),a.HmacSHA256)}()},function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(u){i=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.d(t,"a",(function(){return n}))},function(e,t,r){var n=r(132),i=r(14);function a(e,t,r){null!==r&&void 0!==r&&i.property.apply(this,arguments)}function o(e,t){e.constructor.prototype[t]||i.memoizedProperty.apply(this,arguments)}function s(e,t,r){t=t||{},a(this,"shape",e.shape),a(this,"api",t.api,!1),a(this,"type",e.type),a(this,"enum",e.enum),a(this,"min",e.min),a(this,"max",e.max),a(this,"pattern",e.pattern),a(this,"location",e.location||this.location||"body"),a(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),a(this,"isStreaming",e.streaming||this.isStreaming||!1),a(this,"requiresLength",e.requiresLength,!1),a(this,"isComposite",e.isComposite||!1),a(this,"isShape",!0,!1),a(this,"isQueryName",Boolean(e.queryName),!1),a(this,"isLocationName",Boolean(e.locationName),!1),a(this,"isIdempotent",!0===e.idempotencyToken),a(this,"isJsonValue",!0===e.jsonvalue),a(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),a(this,"isEventStream",Boolean(e.eventstream),!1),a(this,"isEvent",Boolean(e.event),!1),a(this,"isEventPayload",Boolean(e.eventpayload),!1),a(this,"isEventHeader",Boolean(e.eventheader),!1),a(this,"isTimestampFormatSet",Boolean(e.timestampFormat)||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),a(this,"endpointDiscoveryId",Boolean(e.endpointdiscoveryid),!1),a(this,"hostLabel",Boolean(e.hostLabel),!1),t.documentation&&(a(this,"documentation",e.documentation),a(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&a(this,"isXmlAttribute",e.xmlAttribute||!1),a(this,"defaultValue",null),this.toWireFormat=function(e){return null===e||void 0===e?"":e},this.toType=function(e){return e}}function u(e){s.apply(this,arguments),a(this,"isComposite",!0),e.flattened&&a(this,"flattened",e.flattened||!1)}function p(e,t){var r=this,i=null,p=!this.isShape;u.apply(this,arguments),p&&(a(this,"defaultValue",(function(){return{}})),a(this,"members",{}),a(this,"memberNames",[]),a(this,"required",[]),a(this,"isRequired",(function(){return!1}))),e.members&&(a(this,"members",new n(e.members,t,(function(e,r){return s.create(r,t,e)}))),o(this,"memberNames",(function(){return e.xmlOrder||Object.keys(e.members)})),e.event&&(o(this,"eventPayloadMemberName",(function(){for(var e=r.members,t=r.memberNames,n=0,i=t.length;n-1?t||"":t,this.isJsonValue?JSON.parse(t):t&&"function"===typeof t.toString?t.toString():t},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function d(){s.apply(this,arguments),this.toType=function(e){var t=i.base64.decode(e);if(this.isSensitive&&i.isNode()&&"function"===typeof i.Buffer.alloc){var r=i.Buffer.alloc(t.length,t);t.fill(0),t=r}return t},this.toWireFormat=i.base64.encode}function y(){d.apply(this,arguments)}function h(){s.apply(this,arguments),this.toType=function(e){return"boolean"===typeof e?e:null===e||void 0===e?null:"true"===e}}s.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},s.types={structure:p,list:c,map:m,boolean:h,timestamp:function(e){var t=this;if(s.apply(this,arguments),e.timestampFormat)a(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)a(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)a(this,"timestampFormat","rfc822");else if("querystring"===this.location)a(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":a(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":a(this,"timestampFormat","iso8601")}this.toType=function(e){return null===e||void 0===e?null:"function"===typeof e.toUTCString?e:"string"===typeof e||"number"===typeof e?i.date.parseTimestamp(e):null},this.toWireFormat=function(e){return i.date.format(e,t.timestampFormat)}},float:function(){s.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){s.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:l,base64:y,binary:d},s.resolve=function(e,t){if(e.shape){var r=t.api.shapes[e.shape];if(!r)throw new Error("Cannot find shape reference: "+e.shape);return r}return null},s.create=function(e,t,r){if(e.isShape)return e;var n=s.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter((function(e){return!e.match(/documentation/)})));var a=function(){n.constructor.call(this,e,t,r)};return a.prototype=n,new a}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var o=e.type;if(s.normalizedTypes[e.type]&&(e.type=s.normalizedTypes[e.type]),s.types[e.type])return new s.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+o)},s.shapes={StructureShape:p,ListShape:c,MapShape:m,StringShape:l,BooleanShape:h,Base64Shape:y},e.exports=s},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(6),i=r(3);function a(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.default)(e),a=Object(n.a)(t);return r.setDate(r.getDate()+a),r}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(6),i=r(3),a=r(88);function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.default)(e),o=Object(n.a)(t),s=r.getMonth()+o,u=new Date(0);u.setFullYear(r.getFullYear(),s,1),u.setHours(0,0,0,0);var p=Object(a.a)(u);return r.setMonth(s,Math.min(p,r.getDate())),r}},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.rekognition={},n.Rekognition=i.defineService("rekognition",["2016-06-27"]),Object.defineProperty(a.services.rekognition,"2016-06-27",{get:function(){var e=r(357);return e.paginators=r(358).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Rekognition},,,function(e,t,r){"use strict";var n=r(1),i={de:{"Sign In":"Anmelden","Sign Up":"Registrieren","Sign Out":"Abmelden","Sign in to your account":"Melden Sie sich mit Ihrem Account an",Username:"Benutzername",Password:"Passwort","Enter your username":"Geben Sie Ihren Benutzernamen ein","Enter your password":"Geben Sie Ihr Passwort ein","No account? ":"Kein Account? ","Forget your password? ":"Passwort vergessen? ","Reset password":"Passwort zur\xfccksetzen","User does not exist":"Dieser Benutzer existiert nicht","User already exists":"Dieser Benutzer existiert bereits","Incorrect username or password":"Falscher Benutzername oder falsches Passwort","Invalid password format":"Ung\xfcltiges Passwort-Format","Create account":"Hier registrieren","Forgot Password":"Passwort vergessen","Change Password":"Passwort \xe4ndern","New Password":"Neues Passwort",Email:"Email","Phone Number":"Telefonnummer","Confirm a Code":"Code best\xe4tigen","Confirm Sign In":"Anmeldung best\xe4tigen","Confirm Sign Up":"Registrierung best\xe4tigen","Back to Sign In":"Zur\xfcck zur Anmeldung","Send Code":"Code senden",Confirm:"Best\xe4tigen","Resend Code":"Code erneut senden",Submit:"Abschicken",Skip:"\xdcberspringen",Verify:"Verifizieren","Verify Contact":"Kontakt verifizieren",Code:"Code","Confirmation Code":"Best\xe4tigungs-Code","Lost your code? ":"Code verloren? ","Account recovery requires verified contact information":"Zur\xfccksetzen des Account ben\xf6tigt einen verifizierten Account","Invalid phone number format":"Ung\xfcltiges Telefonummern-Format.\n Benutze eine Nummer im Format: +12345678900","Create Account":"Account erstellen","Have an account? ":"Schon registriert? ","Sign in":"Anmelden","Create a new account":"Erstelle einen neuen Account","Reset your password":"Zur\xfccksetzen des Passworts","An account with the given email already exists.":"Ein Account mit dieser Email existiert bereits.","Username cannot be empty":"Benutzername darf nicht leer sein","Password attempts exceeded":"Die maximale Anzahl der fehlerhaften Anmeldeversuche wurde erreicht"},fr:{"Sign In":"Se connecter","Sign Up":"S'inscrire","Sign Out":"D\xe9connexion","Forgot Password":"Mot de passe oubli\xe9",Username:"Nom d'utilisateur",Password:"Mot de passe","Change Password":"Changer le mot de passe","New Password":"nouveau mot de passe",Email:"Email","Phone Number":"Num\xe9ro de t\xe9l\xe9phone","Confirm a Code":"Confirmer un code","Confirm Sign In":"Confirmer la connexion","Confirm Sign Up":"Confirmer l'inscription","Back to Sign In":"Retour \xe0 la connexion","Send Code":"Envoyer le code",Confirm:"Confirmer","Resend a Code":"Renvoyer un code",Submit:"Soumettre",Skip:"Sauter",Verify:"V\xe9rifier","Verify Contact":"V\xe9rifier le contact",Code:"Code","Account recovery requires verified contact information":"La r\xe9cup\xe9ration du compte n\xe9cessite des informations de contact v\xe9rifi\xe9es","User does not exist":"L'utilisateur n'existe pas","User already exists":"L'utilisateur existe d\xe9j\xe0","Incorrect username or password":"identifiant ou mot de passe incorrect","Invalid password format":"format de mot de passe invalide","Invalid phone number format":"Format de num\xe9ro de t\xe9l\xe9phone invalide.\nVeuillez utiliser un format de num\xe9ro de t\xe9l\xe9phone du +12345678900","Sign in to your account":"Connectez-vous \xe0 votre compte","Forget your password? ":"Mot de passe oubli\xe9 ? ","Reset password":"R\xe9initialisez votre mot de passe","No account? ":"Pas de compte ? ","Create account":"Cr\xe9er un compte","Create Account":"Cr\xe9er un compte","Have an account? ":"D\xe9j\xe0 un compte ? ","Sign in":"Se connecter","Create a new account":"Cr\xe9er un nouveau compte","Reset your password":"R\xe9initialisez votre mot de passe","Enter your username":"Saisissez votre nom d'utilisateur","Enter your password":"Saisissez votre mot de passe","An account with the given email already exists.":"Un utilisateur avec cette adresse email existe d\xe9j\xe0.","Username cannot be empty":"Le nom d'utilisateur doit \xeatre renseign\xe9"},es:{"Sign In":"Registrarse","Sign Up":"Reg\xedstrate","Sign Out":"Desconectar","Forgot Password":"Se te olvid\xf3 tu contrase\xf1a",Username:"Nombre de usuario",Password:"Contrase\xf1a","Change Password":"Cambia la contrase\xf1a","New Password":"Nueva contrase\xf1a",Email:"Email","Phone Number":"N\xfamero de tel\xe9fono","Confirm a Code":"Confirmar un c\xf3digo","Confirm Sign In":"Confirmar inicio de sesi\xf3n","Confirm Sign Up":"Confirmar Registrarse","Back to Sign In":"Volver a Iniciar sesi\xf3n","Send Code":"Enviar c\xf3digo",Confirm:"Confirmar","Resend a Code":"Reenviar un c\xf3digo",Submit:"Enviar",Skip:"Omitir",Verify:"Verificar","Verify Contact":"Verificar contacto",Code:"C\xf3digo","Account recovery requires verified contact information":"La recuperaci\xf3n de la cuenta requiere informaci\xf3n de contacto verificada","User does not exist":"el usuario no existe","User already exists":"El usuario ya existe","Incorrect username or password":"Nombre de usuario o contrase\xf1a incorrecta","Invalid password format":"Formato de contrase\xf1a inv\xe1lido","Invalid phone number format":"Formato de n\xfamero de tel\xe9fono inv\xe1lido.\nUtilice el formato de n\xfamero de tel\xe9fono +12345678900"},it:{"Account recovery requires verified contact information":"Ripristino del conto richiede un account verificati","An account with the given email already exists.":"Un account con questa email esiste gi\xe0.","Back to Sign In":"Torna alla Accesso","Change Password":"Cambia la password",Code:"Codice",Confirm:"Conferma","Confirm Sign In":"Conferma di applicazione","Confirm Sign Up":"Registrazione Conferma","Confirm a Code":"Codice Conferma","Confirmation Code":"Codice di verifica","Create Account":"Crea account","Create a new account":"Creare un nuovo account","Create account":"Registrati",Email:"E-mail","Enter your password":"Inserire la password","Enter your username":"Inserisci il tuo nome utente","Forget your password?":"Password dimenticata?","Forgot Password":"Password dimenticata","Have an account? ":"Gi\xe0 registrato?","Incorrect username or password":"Nome utente o password errati","Invalid password format":"Formato della password non valido","Invalid phone number format":"Utilizzo non valido Telefonummern formattare un numero nel formato :. 12.345.678,9 mille","Lost your code?":"Perso codice?","New Password":"Nuova password","No account? ":"Nessun account?",Password:"Password","Password attempts exceeded":"Il numero massimo di tentativi di accesso falliti \xe8 stato raggiunto","Phone Number":"Numero di telefono","Resend Code":"Codice Rispedisci","Reset password":"Ripristina password","Reset your password":"Resetta password","Send Code":"Invia codice","Sign In":"Accesso","Sign Out":"Esci","Sign Up":"Iscriviti","Sign in":"Accesso","Sign in to your account":"Accedi con il tuo account a",Skip:"Salta",Submit:"Sottoscrivi","User already exists":"Questo utente esiste gi\xe0","User does not exist":"Questo utente non esiste",Username:"Nome utente","Username cannot be empty":"Nome utente non pu\xf2 essere vuoto",Verify:"Verifica","Verify Contact":"Contatto verifica"},zh:{"Sign In":"\u767b\u5f55","Sign Up":"\u6ce8\u518c","Sign Out":"\u9000\u51fa","Forgot Password":"\u5fd8\u8bb0\u5bc6\u7801",Username:"\u7528\u6237\u540d",Password:"\u5bc6\u7801","Change Password":"\u6539\u53d8\u5bc6\u7801","New Password":"\u65b0\u5bc6\u7801",Email:"\u90ae\u7bb1","Phone Number":"\u7535\u8bdd","Confirm a Code":"\u786e\u8ba4\u7801","Confirm Sign In":"\u786e\u8ba4\u767b\u5f55","Confirm Sign Up":"\u786e\u8ba4\u6ce8\u518c","Back to Sign In":"\u56de\u5230\u767b\u5f55","Send Code":"\u53d1\u9001\u786e\u8ba4\u7801",Confirm:"\u786e\u8ba4","Resend a Code":"\u91cd\u53d1\u786e\u8ba4\u7801",Submit:"\u63d0\u4ea4",Skip:"\u8df3\u8fc7",Verify:"\u9a8c\u8bc1","Verify Contact":"\u9a8c\u8bc1\u8054\u7cfb\u65b9\u5f0f",Code:"\u786e\u8ba4\u7801","Account recovery requires verified contact information":"\u8d26\u6237\u6062\u590d\u9700\u8981\u9a8c\u8bc1\u8fc7\u7684\u8054\u7cfb\u65b9\u5f0f","User does not exist":"\u7528\u6237\u4e0d\u5b58\u5728","User already exists":"\u7528\u6237\u5df2\u7ecf\u5b58\u5728","Incorrect username or password":"\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef","Invalid password format":"\u5bc6\u7801\u683c\u5f0f\u9519\u8bef","Invalid phone number format":"\u7535\u8bdd\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u4f7f\u7528\u683c\u5f0f +12345678900"}},a=r(36),o=r(0),s=r(4),u=(r(636),r(7)),p={container:{},formContainer:{},formSection:{},formField:{},sectionHeader:{},sectionBody:{},sectionFooter:{},sectionFooterPrimaryContent:{},sectionFooterSecondaryContent:{},input:{},button:{},photoPickerButton:{},photoPlaceholder:{},signInButton:{},signInButtonIcon:{},signInButtonContent:{},amazonSignInButton:{},facebookSignInButton:{},googleSignInButton:{},oAuthSignInButton:{},formRow:{},strike:{},strikeContent:{},actionRow:{},a:{},hint:{},radio:{},label:{},inputLabel:{},toast:{},navBar:{},nav:{},navRight:{},navItem:{},navButton:{}},c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(this.defaultSignUpFields=this.defaultSignUpFields.filter((function(t){return!e.props.signUpConfig.hiddenDefaults.includes(t.key)}))),this.checkCustomSignUpFields()?(this.props.signUpConfig&&this.props.signUpConfig.hideAllDefaults||this.defaultSignUpFields.forEach((function(t){-1===e.signUpFields.findIndex((function(e){return e.key===t.key}))&&e.signUpFields.push(t)})),this.signUpFields.sort((function(e,t){return e.displayOrder&&t.displayOrder?e.displayOrdert.displayOrder?1:e.key0},t.prototype.signUp=function(){var e=this;this.setState({requestPending:!0}),this.inputs.dial_code||(this.inputs.dial_code=this.getDefaultDialCode());var t=this.validate();if(t&&t.length>0)return this.error("The following fields need to be filled out: "+t.join(", "));if(!s.a||"function"!==typeof s.a.signUp)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");var r={username:this.inputs.username,password:this.inputs.password,attributes:{}},n=Object.keys(this.inputs),i=Object.values(this.inputs);n.forEach((function(t,n){if(!["username","password","checkedValue","dial_code"].includes(t)&&"phone_line_number"!==t&&"dial_code"!==t&&"error"!==t){var a=(e.needPrefix(t)?"custom:":"")+t;r.attributes[a]=i[n]}})),this.phone_number&&(r.attributes.phone_number=this.phone_number);var a=!1;if(this.signUpFields.forEach((function(t){t.label===e.getUsernameLabel()&&(mt.debug("Changing the username to the value of "+t.label),r.username=r.attributes[t.key]||r.username,a=!0)})),!a&&!r.username)throw new Error("Couldn't find the label: "+this.getUsernameLabel()+", in sign up fields according to usernameAttributes!");s.a.signUp(r).then((function(t){e.setState({requestPending:!1}),e.changeState("confirmSignUp",t.user.username)})).catch((function(t){return e.setState({requestPending:!1}),e.error(t)}))},t.prototype.showComponent=function(e){var r=this,i=this.props.hide;return i&&i.includes(t)?null:(this.checkCustomSignUpFields()&&(this.signUpFields=this.props.signUpConfig.signUpFields),this.sortFields(),o.createElement(d,{theme:e,"data-test":oe.section},o.createElement(y,{theme:e,"data-test":oe.headerSection},n.g.get(this.header)),o.createElement(S,{theme:e,"data-test":oe.bodySection},this.signUpFields.map((function(t){return"phone_number"!==t.key?o.createElement(D,{theme:e,key:t.key},t.required?o.createElement(L,{theme:e},n.g.get(t.label)," *"):o.createElement(L,{theme:e},n.g.get(t.label)),o.createElement(k,{autoFocus:0===r.signUpFields.findIndex((function(e){return e.key===t.key})),placeholder:n.g.get(t.placeholder),theme:e,type:t.type,name:t.key,key:t.key,onChange:r.handleInputChange,"data-test":oe.nonPhoneNumberInput})):o.createElement(ge,{theme:e,required:t.required,defaultDialCode:r.getDefaultDialCode(),label:t.label,placeholder:t.placeholder,onChangeText:r.onPhoneNumberChanged,key:"phone_number"})}))),o.createElement(f,{theme:e,"data-test":oe.footerSection},o.createElement(b,{theme:e},o.createElement(R,{disabled:this.state.requestPending,onClick:this.signUp,theme:e,"data-test":oe.createAccountButton},n.g.get("Create Account"))),o.createElement(g,{theme:e},n.g.get("Have an account? "),o.createElement(q,{theme:e,onClick:function(){return r.changeState("signIn")},"data-test":oe.signInLink},n.g.get("Sign in"))))))},t}(ve),dt=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),yt=new n.c("ForgotPassword"),ht=function(e){function t(t){var r=e.call(this,t)||this;return r.send=r.send.bind(r),r.submit=r.submit.bind(r),r._validAuthStates=["forgotPassword"],r.state={delivery:null},r}return dt(t,e),t.prototype.send=function(){var e=this,t=this.props.authData,r=void 0===t?{}:t,n=this.getUsernameFromInput()||r.username;if(!s.a||"function"!==typeof s.a.forgotPassword)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");s.a.forgotPassword(n).then((function(t){yt.debug(t),e.setState({delivery:t.CodeDeliveryDetails})})).catch((function(t){return e.error(t)}))},t.prototype.submit=function(){var e=this,t=this.props.authData,r=void 0===t?{}:t,n=this.inputs,i=n.code,a=n.password,o=this.getUsernameFromInput()||r.username;if(!s.a||"function"!==typeof s.a.forgotPasswordSubmit)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");s.a.forgotPasswordSubmit(o,i,a).then((function(t){yt.debug(t),e.changeState("signIn"),e.setState({delivery:null})})).catch((function(t){return e.error(t)}))},t.prototype.sendView=function(){var e=this.props.theme||p;return o.createElement("div",null,this.renderUsernameField(e))},t.prototype.submitView=function(){var e=this.props.theme||p;return o.createElement("div",null,o.createElement(D,{theme:e},o.createElement(L,{theme:e},n.g.get("Code")," *"),o.createElement(k,{placeholder:n.g.get("Code"),theme:e,key:"code",name:"code",autoComplete:"off",onChange:this.handleInputChange})),o.createElement(D,{theme:e},o.createElement(L,{theme:e},n.g.get("New Password")," *"),o.createElement(k,{placeholder:n.g.get("New Password"),theme:e,type:"password",key:"password",name:"password",autoComplete:"off",onChange:this.handleInputChange})))},t.prototype.showComponent=function(e){var r=this,i=this.props,a=(i.authState,i.hide),s=i.authData,u=void 0===s?{}:s;return a&&a.includes(t)?null:o.createElement(d,{theme:e,"data-test":fe.section},o.createElement(y,{theme:e,"data-test":fe.headerSection},n.g.get("Reset your password")),o.createElement(S,{theme:e,"data-test":fe.bodySection},this.state.delivery||u.username?this.submitView():this.sendView()),o.createElement(f,{theme:e},o.createElement(b,{theme:e},this.state.delivery||u.username?o.createElement(R,{theme:e,onClick:this.submit,"data-test":fe.submitButton},n.g.get("Submit")):o.createElement(R,{theme:e,onClick:this.send,"data-test":fe.sendCodeButton},n.g.get("Send Code"))),o.createElement(g,{theme:e},this.state.delivery||u.username?o.createElement(q,{theme:e,onClick:this.send,"data-test":fe.resendCodeLink},n.g.get("Resend Code")):o.createElement(q,{theme:e,onClick:function(){return r.changeState("signIn")},"data-test":fe.backToSignInLink},n.g.get("Back to Sign In")))))},t}(ve),ft=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),bt=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},gt=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]2?r[2]:r[0];return n.g.get(r[0],i)}var Kt=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Wt=new n.c("Authenticator"),Ht=function(e){var t=e.children;return o.createElement(o.Fragment,null,t)},Qt=function(e){function t(t){var r=e.call(this,t)||this;return r.handleStateChange=r.handleStateChange.bind(r),r.handleAuthEvent=r.handleAuthEvent.bind(r),r.onHubCapsule=r.onHubCapsule.bind(r),r._initialAuthState=r.props.authState||"signIn",r.state={authState:"loading"},n.f.listen("auth",r.onHubCapsule),r}return Kt(t,e),t.prototype.componentDidMount=function(){var e=this.props.amplifyConfig;e&&n.o.configure(e),this._isMounted=!0;var t=localStorage.getItem(Ne.SIGNING_IN_WITH_HOSTEDUI_KEY);localStorage.removeItem(Ne.SIGNING_IN_WITH_HOSTEDUI_KEY),"true"!==t&&this.checkUser()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.checkUser=function(){var e=this;if(!s.a||"function"!==typeof s.a.currentAuthenticatedUser)throw new Error("No Auth module found, please ensure @aws-amplify/auth is imported");return s.a.currentAuthenticatedUser().then((function(t){e._isMounted&&e.handleStateChange("signedIn",t)})).catch((function(t){if(e._isMounted){var r=null;try{r=localStorage.getItem("amplify-authenticator-authState")}catch(n){Wt.debug("Failed to get the auth state from local storage",n)}("signedIn"===r?s.a.signOut():Promise.resolve()).then((function(){return e.handleStateChange(e._initialAuthState)})).catch((function(e){Wt.debug("Failed to sign out",e)}))}}))},t.prototype.onHubCapsule=function(e){var t=e.channel,r=e.payload;e.source;if("auth"===t)switch(r.event){case"cognitoHostedUI":this.handleStateChange("signedIn",r.data);break;case"cognitoHostedUI_failure":case"parsingUrl_failure":case"signOut":case"customGreetingSignOut":this.handleStateChange("signIn",null);break;case"parsingCallbackUrl":localStorage.setItem(Ne.SIGNING_IN_WITH_HOSTEDUI_KEY,"true")}},t.prototype.handleStateChange=function(e,t){if(Wt.debug("authenticator state change "+e,t),e!==this.state.authState){"signedOut"===e&&(e="signIn");try{localStorage.setItem("amplify-authenticator-authState",e)}catch(r){Wt.debug("Failed to set the auth state into local storage",r)}this._isMounted&&this.setState({authState:e,authData:t,error:null,showToast:!1}),this.props.onStateChange&&this.props.onStateChange(e,t)}},t.prototype.handleAuthEvent=function(e,t,r){if(void 0===r&&(r=!0),"error"===t.type){var n=this.props.errorMessage||zt,i="string"===typeof n?n:n(t.data);this.setState({error:i,showToast:r})}},t.prototype.render=function(){var e=this,t=this.state,r=t.authState,i=t.authData,a=this.props.theme||p,s=this.props.errorMessage||zt,u=void 0===this.props.container?m:this.props.container||Ht,c=this.props,l=c.hideDefault,d=c.hide,y=void 0===d?[]:d,h=c.federated,f=c.signUpConfig,b=c.usernameAttributes;l&&(y=y.concat([nt,It,Nt,kt,lt,Et,_t,ht,Vt,Dt]));var g=[];"object"===typeof this.props.children&&(Array.isArray(this.props.children)?g=this.props.children:g.push(this.props.children));var S=[o.createElement(nt,{federated:h}),o.createElement(It,{federated:h}),o.createElement(Nt,null),o.createElement(kt,null),o.createElement(lt,{signUpConfig:f}),o.createElement(Et,null),o.createElement(_t,null),o.createElement(ht,null),o.createElement(Vt,null),o.createElement(Dt,null)],I=o.Children.map(g,(function(e){return e.props.override}));y=y.filter((function(e){return!g.find((function(t){return t.type===e}))}));var v=o.Children.map(g,(function(t,n){return o.cloneElement(t,{key:"aws-amplify-authenticator-props-children-"+n,theme:a,messageMap:s,authState:r,authData:i,onStateChange:e.handleStateChange,onAuthEvent:e.handleAuthEvent,hide:y,override:I,usernameAttributes:b})})),N=(l?[]:o.Children.map(S,(function(t,n){return o.cloneElement(t,{key:"aws-amplify-authenticator-default-children-"+n,theme:a,messageMap:s,authState:r,authData:i,onStateChange:e.handleStateChange,onAuthEvent:e.handleAuthEvent,hide:y,override:I,usernameAttributes:b})}))).concat(v),C=this.state.error;return o.createElement(u,{theme:a},this.state.showToast&&o.createElement(V,{theme:a,onClose:function(){return e.setState({showToast:!1})},"data-test":ie.signInError},n.g.get(C)),N)},t}(o.Component),Jt=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zt=function(){return(Zt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0,signUpConfig:this.authConfig.signUpConfig,usernameAttributes:this.authConfig.usernameAttributes,onStateChange:this.handleAuthStateChange,children:this.authConfig.authenticatorComponents||[]})):null,o.createElement(e,Zt({},this.props,{authState:r,authData:n,onStateChange:this.handleAuthStateChange}))):o.createElement(Qt,Zt({},this.props,{theme:this.authConfig.theme,federated:this.authConfig.federated||this.props.federated,hideDefault:this.authConfig.authenticatorComponents&&this.authConfig.authenticatorComponents.length>0,signUpConfig:this.authConfig.signUpConfig,usernameAttributes:this.authConfig.usernameAttributes,onStateChange:this.handleAuthStateChange,children:this.authConfig.authenticatorComponents||[]}))},u}(o.Component)}(function(e){function t(t){var r=e.call(this,t)||this;return r.state={auth:"init"},r.handleAuthState=r.handleAuthState.bind(r),r.renderChildren=r.renderChildren.bind(r),r}Jt(t,e),t.prototype.handleAuthState=function(e,t){this.setState({auth:e,authData:t})},t.prototype.renderChildren=function(){return this.props.children(this.state.auth)},t.prototype.render=function(){return o.createElement("div",null,o.createElement(Qt,Zt({},this.props,{onStateChange:this.handleAuthState})),this.renderChildren())}})(o.Component),r(24),function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)}}();!function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)}}();var Xt=r(10),$t=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),er={width:"100%",height:"100%",display:"inline-block",position:"absolute",left:0,top:0,opacity:0,cursor:"pointer"},tr=new n.c("Picker"),rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $t(t,e),t.prototype.handleInput=function(e){var t=e.target.files[0];if(t){var r=t.name,n=t.size,i=t.type;tr.debug(t);var a=this.props.onPick;a&&a({file:t,name:r,size:n,type:i})}},t.prototype.render=function(){var e=this,t=this.props.title||"Pick a File",r=this.props.accept||"*/*",i=this.props.theme||p,a=Object.assign({},{position:"relative"},i.pickerPicker),s=Object.assign({},er,i.pickerInput);return o.createElement("div",{style:a},o.createElement(P,{theme:i},n.g.get(t)),o.createElement("input",{title:n.g.get(t),type:"file",accept:r,style:s,onChange:function(t){return e.handleInput(t)}}))},t}(o.Component),nr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ir={maxWidth:"100%"},ar=(new n.c("PhotoPicker"),function(e){function t(t){var r=e.call(this,t)||this;return r.handlePick=r.handlePick.bind(r),r.state={previewSrc:t.previewSrc},r}return nr(t,e),t.prototype.handlePick=function(e){var t=this,r=e.file,n=(e.name,e.size,e.type,this.props),i=n.preview,a=n.onPick,o=n.onLoad;if(a&&a(e),i){var s=new FileReader;s.onload=function(e){var r=e.target.result;t.setState({previewSrc:r}),o&&o(r)},s.readAsDataURL(r)}},t.prototype.render=function(){var e=this.props.preview,t=this.state.previewSrc,r=this.props.headerText||"Photos",i=this.props.headerHint||"Add your photos by clicking below",a=this.props.title||"Select a Photo",s=this.props.theme||p,u=Object.assign({},ir,s.pickerPreview),c=!(e&&"hidden"!==e);return o.createElement(d,{theme:s},o.createElement(y,{theme:s,hint:i},n.g.get(r)),o.createElement(S,{theme:s},t?c?"The image has been selected":o.createElement("img",{src:t,style:u}):o.createElement(z,{theme:s})),o.createElement(rr,{title:a,accept:"image/*",theme:s,onPick:this.handlePick}))},t}(o.Component));function or(e,t){var r=e.name,n=e.size,i=e.type,a=encodeURI(r);if(t){var o=typeof t;(a="string"===o?t:"function"===o?t({name:r,size:n,type:i}):encodeURI(JSON.stringify(t)))||(a="empty_key")}return a.replace(/\s/g,"_")}var sr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ur=new n.c("Storage.S3Image"),pr=function(e){function t(t){var r=e.call(this,t)||this;r._isMounted=!1,r.handleOnLoad=r.handleOnLoad.bind(r),r.handleOnError=r.handleOnError.bind(r),r.handlePick=r.handlePick.bind(r),r.handleClick=r.handleClick.bind(r);var n=r.props.src||a.e;return r.state={src:n},r}return sr(t,e),t.prototype.getImageSource=function(e,t,r,n){var i=this;if(!Xt.a||"function"!==typeof Xt.a.get)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.get(e,{level:t||"public",track:r,identityId:n}).then((function(e){i._isMounted&&i.setState({src:e})})).catch((function(e){return ur.debug(e)}))},t.prototype.load=function(){var e=this.props,t=e.imgKey,r=e.path,n=e.body,i=e.contentType,a=e.level,o=e.track,s=e.identityId;if(t||r){var u=this,p=t||r;if(ur.debug("loading "+p+"..."),n){var c=i||"binary/octet-stream";if(!Xt.a||"function"!==typeof Xt.a.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.put(p,n,{contentType:c,level:a||"public",track:o}).then((function(e){ur.debug(e),u.getImageSource(p,a,o,s)})).catch((function(e){return ur.debug(e)}))}else u.getImageSource(p,a,o,s)}else ur.debug("empty imgKey and path")},t.prototype.handleOnLoad=function(e){var t=this.props.onLoad;t&&t(this.state.src)},t.prototype.handleOnError=function(e){var t=this.props.onError;t&&t(this.state.src)},t.prototype.handlePick=function(e){var t=this,r=this.props.path||"",n=this.props,i=n.imgKey,a=n.level,o=n.fileToKey,s=n.track,u=n.identityId,p=e.file,c=(e.name,e.size,e.type),m=i||r+or(e,o);if(!Xt.a||"function"!==typeof Xt.a.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.put(m,p,{level:a||"public",contentType:c,track:s}).then((function(e){ur.debug("handle pick data",e),t.getImageSource(m,a,s,u)})).catch((function(e){return ur.debug("handle pick error",e)}))},t.prototype.handleClick=function(e){var t=this.props.onClick;t&&t(e)},t.prototype.componentDidMount=function(){this._isMounted=!0,this.load()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e){(e.path!==this.props.path||e.imgKey!==this.props.imgKey||e.body!==this.props.body||e.level!==this.props.level)&&this.load()},t.prototype.imageEl=function(e,t){if(!e)return null;var r=this.props.selected;return o.createElement("div",{style:{position:"relative"},onClick:this.handleClick},o.createElement("img",{style:t.photoImg,src:e,onLoad:this.handleOnLoad,onError:this.handleOnError}),o.createElement("div",{style:r?t.overlaySelected:t.overlay}))},t.prototype.render=function(){var e=this.props,t=e.hidden,r=e.style,n=e.picker,i=e.translate,a=e.imgKey,s=this.state.src;if(i&&(s="string"===typeof i?i:i({type:"image",key:a,content:s})),!s&&!n)return null;var u=this.props.theme||xt.c,p=t?xt.c.hidden:Object.assign({},u.photo,r);return o.createElement("div",{style:p},p?this.imageEl(s,u):null,n?o.createElement("div",null,o.createElement(ar,{key:"picker",onPick:this.handlePick,theme:u})):null)},t}(o.Component),cr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),mr={},lr={maxWidth:"100%"},dr=(new n.c("TextPicker"),function(e){function t(t){var r=e.call(this,t)||this;return r.handlePick=r.handlePick.bind(r),r.state={previewText:t.previewText},r}return cr(t,e),t.prototype.handlePick=function(e){var t=this,r=e.file,n=(e.name,e.size,e.type,this.props),i=n.preview,a=n.onPick,o=n.onLoad;if(a&&a(e),i){var s=new FileReader;s.onload=function(e){var r=e.target.result;t.setState({previewText:r}),o&&o(r)},s.readAsText(r)}},t.prototype.render=function(){var e=this.props.preview,t=this.state.previewText,r=this.props.title||"Pick a File",n=this.props.theme||xt.c,i=Object.assign({},mr,n.picker),a=Object.assign({},lr,n.pickerPreview,n.halfHeight,e&&"hidden"!==e?{}:xt.c.hidden);return o.createElement("div",{style:i},t?o.createElement("div",{style:a},o.createElement("pre",{style:n.pre},t)):null,o.createElement(rr,{title:r,accept:"text/*",theme:n,onPick:this.handlePick}))},t}(o.Component)),yr=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),hr=new n.c("Storage.S3Text"),fr=function(e){function t(t){var r=e.call(this,t)||this;r._isMounted=!1,r.handleOnLoad=r.handleOnLoad.bind(r),r.handleOnError=r.handleOnError.bind(r),r.handlePick=r.handlePick.bind(r),r.handleClick=r.handleClick.bind(r);var n=t.text,i=t.textKey;return r.state={text:n||"",textKey:i||""},r}return yr(t,e),t.prototype.getText=function(e,t,r,n){var i=this;if(!Xt.a||"function"!==typeof Xt.a.get)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.get(e,{download:!0,level:t||"public",track:r,identityId:n}).then((function(e){hr.debug(e);var t=e.Body.toString("utf8");i._isMounted&&i.setState({text:t}),i.handleOnLoad(t)})).catch((function(e){hr.debug(e),i.handleOnError(e)}))},t.prototype.load=function(){var e=this.props,t=e.path,r=e.textKey,n=e.body,i=e.contentType,a=e.level,o=e.track,s=e.identityId;if(r||t){var u=this,p=r||t;if(hr.debug("loading "+p+"..."),n){var c=i||"text/*";if(!Xt.a||"function"!==typeof Xt.a.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.put(p,n,{contentType:c,level:a||"public",track:o}).then((function(e){hr.debug(e),u.getText(p,a,o,s)})).catch((function(e){return hr.debug(e)}))}else u.getText(p,a,o,s)}else hr.debug("empty textKey and path")},t.prototype.handleOnLoad=function(e){var t=this.props.onLoad;t&&t(e)},t.prototype.handleOnError=function(e){var t=this.props.onError;t&&t(e)},t.prototype.handlePick=function(e){var t=this,r=this.props.path||"",n=this.props,i=n.textKey,a=n.level,o=n.fileToKey,s=n.track,u=n.identityId,p=e.file,c=(e.name,e.size,e.type),m=i||r+or(e,o);if(!Xt.a||"function"!==typeof Xt.a.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.put(m,p,{level:a||"public",contentType:c,track:s}).then((function(e){hr.debug("handle pick data",e),t.getText(m,a,s,u)})).catch((function(e){return hr.debug("handle pick error",e)}))},t.prototype.handleClick=function(e){var t=this.props.onClick;t&&t(e)},t.prototype.componentDidMount=function(){this._isMounted=!0,this.load()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e){(e.path!==this.props.path||e.textKey!==this.props.textKey||e.body!==this.props.body)&&this.load()},t.prototype.textEl=function(e,t){if(!e)return null;var r=this.props.selected;return o.createElement("div",{style:{position:"relative"},onClick:this.handleClick},o.createElement("pre",{style:t.pre},e),o.createElement("div",{style:r?t.overlaySelected:t.overlay}))},t.prototype.render=function(){var e=this.props,t=e.hidden,r=e.style,n=e.picker,i=e.translate,a=e.textKey,s=this.state.text;if(i&&(s="string"===typeof i?i:i({type:"text",key:a,content:s})),!s&&!n)return null;var u=this.props.theme||xt.c,p=t?xt.c.hidden:Object.assign({},u.text,r);return o.createElement("div",{style:p},p?this.textEl(s,u):null,n?o.createElement("div",null,o.createElement(dr,{key:"picker",onPick:this.handlePick,theme:u})):null)},t}(o.Component),br=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),gr=new n.c("Storage.S3Album"),Sr=(function(e){function t(t){var r=e.call(this,t)||this;return r._isMounted=!1,r.handlePick=r.handlePick.bind(r),r.handleClick=r.handleClick.bind(r),r.list=r.list.bind(r),r.marshal=r.marshal.bind(r),r.state={items:[],ts:(new Date).getTime()},r}br(t,e),t.prototype.getKey=function(e){var t=this.props.fileToKey,r=e.name,n=e.size,i=e.type,a=encodeURI(r);if(t){var o=typeof t;(a="string"===o?t:"function"===o?t({name:r,size:n,type:i}):encodeURI(JSON.stringify(t)))||(gr.debug("key is empty"),a="empty_key")}return a.replace(/\s/g,"_")},t.prototype.handlePick=function(e){var t=this,r=this.props,n=r.onPick,i=r.onLoad,a=r.onError,o=r.track,s=r.level;n&&n(e);var u=this.props.path||"",p=e.file,c=(e.name,e.size,e.type),m=u+this.getKey(e);if(!Xt.a||"function"!==typeof Xt.a.put)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");Xt.a.put(m,p,{level:s||"public",contentType:c,track:o}).then((function(e){gr.debug("handle pick data",e);var r=t.state.items;if(0===r.filter((function(e){return e.key===m})).length){var n=r.concat(e);t.marshal(n)}else gr.debug("update an item");i&&i(e)})).catch((function(e){gr.debug("handle pick error",e),a&&a(e)})),this._isMounted&&this.setState({ts:(new Date).getTime()})},t.prototype.handleClick=function(e){var t=this.props,r=t.onClickItem,n=t.select,i=t.onSelect;(r&&r(e),n)&&(e.selected=!e.selected,this._isMounted&&this.setState({items:this.state.items.slice()}),i&&i(e,this.state.items.filter((function(e){return e.selected}))))},t.prototype.componentDidMount=function(){this._isMounted=!0,this.list()},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.componentDidUpdate=function(e,t){this.props.path===e.path&&this.props.ts===e.ts&&this.props.select===e.select||(this.props.select||this.state.items.forEach((function(e){return e.selected=!1})),this.props.onSelect&&this.props.onSelect(null,[]),this.list())},t.prototype.list=function(){var e=this,t=this.props,r=t.path,n=t.level,i=t.track,a=t.identityId;if(gr.debug("Album path: "+r),!Xt.a||"function"!==typeof Xt.a.list)throw new Error("No Storage module found, please ensure @aws-amplify/storage is imported");return Xt.a.list(r,{level:n||"public",track:i,identityId:a}).then((function(t){gr.debug("album list",t),e.marshal(t)})).catch((function(e){return gr.warn(e),[]}))},t.prototype.contentType=function(e){return n.h.filenameToContentType(e.key,"image/*")},t.prototype.marshal=function(e){var t=this,r=this.props.contentType||"";e.forEach((function(e){if(!e.contentType){var n="string"===typeof r;e.contentType=n?r:r(e),e.contentType||(e.contentType=t.contentType(e))}}));var n=this.filter(e);n=this.sort(n),this._isMounted&&this.setState({items:n})},t.prototype.filter=function(e){var t=this.props.filter;return t?t(e):e},t.prototype.sort=function(e){var t=this.props.sort,r=typeof t;if("function"===r)return t(e);if(["string","undefined"].includes(r)){var i=(t||"lastModified").split(/\s+/),a=i[0],o=i.length>1?i[1]:"";return o="lastModified"===a?"asc"===o?"asc":"desc":"desc"===o?"desc":"asc",n.h.sortByField(e,a,o),e}return gr.warn("invalid sort. done nothing. should be a string or function"),e},t.prototype.render=function(){var e=this,t=this.props,r=t.picker,i=t.translateItem,a=t.level,s=t.identityId,u=this.state,p=u.items,c=u.ts,m=this.props.pickerTitle||"Pick",l=this.props.theme||xt.c,d=p.map((function(t){return t.contentType&&n.h.isTextFile(t.contentType)?o.createElement(fr,{key:t.key,textKey:t.key,theme:l,style:l.albumText,selected:t.selected,translate:i,level:a,identityId:s,onClick:function(){return e.handleClick(t)}}):o.createElement(pr,{key:t.key,imgKey:t.key,theme:l,style:l.albumPhoto,selected:t.selected,translate:i,level:a,identityId:s,onClick:function(){return e.handleClick(t)}})}));return o.createElement("div",null,o.createElement("div",{style:l.album},d),r?o.createElement(rr,{key:c,title:m,accept:"image/*, text/*",onPick:this.handlePick,theme:l}):null)}}(o.Component),function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}()),Ir=function(){return(Ir=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0?"&":"?";var u=[];n.arrayEach(Object.keys(o).sort(),(function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t-1});var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];e.exports={isEmptyData:function(e){return"string"===typeof e?0===e.length:0===e.byteLength},convertToBuffer:function(e){return"string"===typeof e&&(e=new n(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}}},function(e,t,r){!function(t,n){var i;e.exports=(i=r(23),function(e){var t=i,r=t.lib,n=r.WordArray,a=r.Hasher,o=t.algo,s=[],u=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)t(n)&&(i<8&&(s[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var p=[],c=o.SHA256=a.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],m=r[6],l=r[7],d=0;d<64;d++){if(d<16)p[d]=0|e[t+d];else{var y=p[d-15],h=(y<<25|y>>>7)^(y<<14|y>>>18)^y>>>3,f=p[d-2],b=(f<<15|f>>>17)^(f<<13|f>>>19)^f>>>10;p[d]=h+p[d-7]+b+p[d-16]}var g=n&i^n&a^i&a,S=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),I=l+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&m)+u[d]+p[d];l=m,m=c,c=s,s=o+I|0,o=a,a=i,i=n,n=I+(S+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+m|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=e.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(c),t.HmacSHA256=a._createHmacHelper(c)}(Math),i.SHA256)}()},function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(37),i=r(53),a=r(1),o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=new a.c("AbstractConvertPredictionsProvider"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getCategory=function(){return"Convert"},t.prototype.convert=function(e){return Object(n.m)(e)?(s.debug("translateText"),this.translateText(e)):Object(n.l)(e)?(s.debug("textToSpeech"),this.convertTextToSpeech(e)):Object(n.j)(e)?(s.debug("textToSpeech"),this.convertSpeechToText(e)):void 0},t.prototype.translateText=function(e){throw new Error("convertText is not implemented by this provider")},t.prototype.convertTextToSpeech=function(e){throw new Error("convertTextToSpeech is not implemented by this provider")},t.prototype.convertSpeechToText=function(e){throw new Error("convertSpeechToText is not implemented by this provider")},t}(i.c)},function(e,t,r){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=r(194)},function(e,t,r){(function(e){!function(t,r,n,i,a,o,s,u,p,c,m,l,d,y,h,f,b,g,S,I,v,N,C,T,k,A,D,R,P,E,x,w,q,_,M,L,O,B,U,G,F,V,j,z,K,W,H,Q,J,Z,Y,X,$,ee,te,re,ne,ie,ae,oe,se){"use strict";function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ce(e,t){for(var r=0;r0&&(i=ie(e,t.slice(0,e.length),new Date)),ke(i)||(i=new Date(e))),ke(i)&&o?i:null)}function ke(e){return o(e)&&ee(e,new Date("1/1/1000"))}function Ae(e,t,r){if("en"===r)return s(e,t,{awareOfUnicodeTokens:!0});var n=Oe(r);return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),!n&&Le()&&Oe(Le())&&(n=Oe(Le())),s(e,t,{locale:n||null,awareOfUnicodeTokens:!0})}function De(e,t){var r=t.hour,n=void 0===r?0:r,i=t.minute,a=void 0===i?0:i,o=t.second;return x(E(P(e,void 0===o?0:o),a),n)}function Re(e,t){var r=Oe(t||Le());return V(e,{locale:r})}function Pe(e){return j(e)}function Ee(e,t){return e&&t?X(e,t):!e&&!t}function xe(e,t){return e&&t?Y(e,t):!e&&!t}function we(e,t){return e&&t?$(e,t):!e&&!t}function qe(e,t){return e&&t?Z(e,t):!e&&!t}function _e(e,t){return e&&t?J(e,t):!e&&!t}function Me(e,t,r){var n,i=F(t),a=W(r);try{n=re(e,{start:i,end:a})}catch(e){n=!1}return n}function Le(){return("undefined"!=typeof window?window:e).__localeId__}function Oe(t){if("string"==typeof t){var r="undefined"!=typeof window?window:e;return r.__localeData__?r.__localeData__[t]:null}return t}function Be(e,t){return Ae(w(Ce(),e),"LLL",t)}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ze(e,{minDate:r,maxDate:n})||i&&i.some((function(t){return qe(e,t)}))||a&&!a.some((function(t){return qe(e,t)}))||o&&!o(Ce(e))||!1}function Ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ze(e,{minDate:r,maxDate:n})||i&&i.some((function(t){return xe(e,t)}))||a&&!a.some((function(t){return xe(e,t)}))||o&&!o(Ce(e))||!1}function Fe(e,t,r,n){var i=D(e),a=k(e),o=D(t),s=k(t),u=D(n);return i===o&&i===u?a<=r&&r<=s:i=r||ui:void 0}function Ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.maxDate,i=t.excludeDates,a=t.includeDates,o=t.filterDate;return ze(e,{minDate:r,maxDate:n})||i&&i.some((function(t){return we(e,t)}))||a&&!a.some((function(t){return we(e,t)}))||o&&!o(Ce(e))||!1}function je(e,t,r,n){var i=D(e),a=A(e),o=D(t),s=A(t),u=D(n);return i===o&&i===u?a<=r&&r<=s:i=r||ui:void 0}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.maxDate;return r&&O(e,r)<0||n&&O(e,n)>0}function Ke(e,t){for(var r=t.length,n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.includeDates,i=g(e,1);return r&&B(r,i)>0||n&&n.every((function(e){return B(e,i)>0}))||!1}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,n=t.includeDates,i=l(e,1);return r&&B(i,r)>0||n&&n.every((function(e){return B(i,e)>0}))||!1}function Je(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter((function(e){return O(e,t)>=0}));return M(n)}return r?M(r):t}function Ze(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter((function(e){return O(e,t)<=0}));return L(n)}return r?L(r):t}function Ye(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",r=new Map,n=0,i=e.length;n=o),s&&i.push(o)}return i}var tt=oe(function(e){function t(e){var n;pe(this,t),le(be(n=ge(this,fe(t).call(this,e))),"renderOptions",(function(){var e=n.props.year,t=n.state.yearsList.map((function(t){return r.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,ref:t,onClick:n.onChange.bind(be(n),t)},e===t?r.createElement("span",{className:"react-datepicker__year-option--selected"},"\u2713"):"",t)})),i=n.props.minDate?D(n.props.minDate):null,a=n.props.maxDate?D(n.props.maxDate):null;return a&&n.state.yearsList.find((function(e){return e===a}))||t.unshift(r.createElement("div",{className:"react-datepicker__year-option",ref:"upcoming",key:"upcoming",onClick:n.incrementYears},r.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),i&&n.state.yearsList.find((function(e){return e===i}))||t.push(r.createElement("div",{className:"react-datepicker__year-option",ref:"previous",key:"previous",onClick:n.decrementYears},r.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),le(be(n),"onChange",(function(e){n.props.onChange(e)})),le(be(n),"handleClickOutside",(function(){n.props.onCancel()})),le(be(n),"shiftYears",(function(e){var t=n.state.yearsList.map((function(t){return t+e}));n.setState({yearsList:t})})),le(be(n),"incrementYears",(function(){return n.shiftYears(1)})),le(be(n),"decrementYears",(function(){return n.shiftYears(-1)}));var i=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,o=i||(a?10:5);return n.state={yearsList:et(n.props.year,o,n.props.minDate,n.props.maxDate)},n}return he(t,r.Component),me(t,[{key:"render",value:function(){var e=i({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return r.createElement("div",{className:e},this.renderOptions())}}]),t}()),rt=function(e){function t(){var e,n;pe(this,t);for(var i=arguments.length,a=new Array(i),o=0;o1&&void 0!==arguments[1]?arguments[1]:{}).excludeDates;return t&&t.some((function(t){return qe(e,t)}))||!1}(r.props.day,r.props)})),le(be(r),"getHighLightedClass",(function(e){var t=r.props,n=t.day,i=t.highlightDates;if(!i)return!1;var a=Ae(n,"MM.dd.yyyy");return i.get(a)})),le(be(r),"isInRange",(function(){var e=r.props,t=e.day,n=e.startDate,i=e.endDate;return!(!n||!i)&&Me(t,n,i)})),le(be(r),"isInSelectingRange",(function(){var e=r.props,t=e.day,n=e.selectsStart,i=e.selectsEnd,a=e.selectingDate,o=e.startDate,s=e.endDate;return!(!n&&!i||!a||r.isDisabled())&&(n&&s&&(te(a,s)||_e(a,s))?Me(t,a,s):!(!i||!o||!ee(a,o)&&!_e(a,o))&&Me(t,o,a))})),le(be(r),"isSelectingRangeStart",(function(){if(!r.isInSelectingRange())return!1;var e=r.props,t=e.day,n=e.selectingDate,i=e.startDate;return qe(t,e.selectsStart?n:i)})),le(be(r),"isSelectingRangeEnd",(function(){if(!r.isInSelectingRange())return!1;var e=r.props,t=e.day,n=e.selectingDate,i=e.endDate;return qe(t,e.selectsEnd?n:i)})),le(be(r),"isRangeStart",(function(){var e=r.props,t=e.day,n=e.startDate,i=e.endDate;return!(!n||!i)&&qe(n,t)})),le(be(r),"isRangeEnd",(function(){var e=r.props,t=e.day,n=e.startDate,i=e.endDate;return!(!n||!i)&&qe(i,t)})),le(be(r),"isWeekend",(function(){var e=C(r.props.day);return 0===e||6===e})),le(be(r),"isOutsideMonth",(function(){return void 0!==r.props.month&&r.props.month!==k(r.props.day)})),le(be(r),"getClassNames",(function(e){var t=r.props.dayClassName?r.props.dayClassName(e):void 0;return i("react-datepicker__day",t,"react-datepicker__day--"+Ae(r.props.day,"ddd",void 0),{"react-datepicker__day--disabled":r.isDisabled(),"react-datepicker__day--excluded":r.isExcluded(),"react-datepicker__day--selected":r.isSameDay(r.props.selected),"react-datepicker__day--keyboard-selected":r.isKeyboardSelected(),"react-datepicker__day--range-start":r.isRangeStart(),"react-datepicker__day--range-end":r.isRangeEnd(),"react-datepicker__day--in-range":r.isInRange(),"react-datepicker__day--in-selecting-range":r.isInSelectingRange(),"react-datepicker__day--selecting-range-start":r.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":r.isSelectingRangeEnd(),"react-datepicker__day--today":r.isSameDay(Ce()),"react-datepicker__day--weekend":r.isWeekend(),"react-datepicker__day--outside-month":r.isOutsideMonth()},r.getHighLightedClass("react-datepicker__day--highlighted"))})),r}return he(t,r.Component),me(t,[{key:"render",value:function(){return r.createElement("div",{className:this.getClassNames(this.props.day),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,"aria-label":"day-".concat(T(this.props.day)),role:"option","aria-disabled":this.isDisabled()},this.props.renderDayContents?this.props.renderDayContents(T(this.props.day),this.props.day):T(this.props.day))}}]),t}(),pt=function(e){function t(){var e,r;pe(this,t);for(var n=arguments.length,i=new Array(n),a=0;a=mt,u=!t&&!n.isWeekInMonth(i);if(s||u){if(!n.props.peekNextMonth)break;o=!0}}return e})),le(be(n),"onMonthClick",(function(e,t){n.handleDayClick(Pe(w(n.props.day,t)),e)})),le(be(n),"onQuarterClick",(function(e,t){var r;n.handleDayClick((r=q(n.props.day,t),z(r)),e)})),le(be(n),"getMonthClassNames",(function(e){var t=n.props,r=t.day,a=t.startDate,o=t.endDate,s=t.selected,u=t.minDate,p=t.maxDate;return i("react-datepicker__month-text","react-datepicker__month-".concat(e),{"react-datepicker__month--disabled":(u||p)&&Ge(w(r,e),n.props),"react-datepicker__month--selected":k(r)===e&&D(r)===D(s),"react-datepicker__month--in-range":Fe(a,o,e,r),"react-datepicker__month--range-start":n.isRangeStartMonth(e),"react-datepicker__month--range-end":n.isRangeEndMonth(e)})})),le(be(n),"getQuarterClassNames",(function(e){var t=n.props,r=t.day,a=t.startDate,o=t.endDate,s=t.selected,u=t.minDate,p=t.maxDate;return i("react-datepicker__quarter-text","react-datepicker__quarter-".concat(e),{"react-datepicker__quarter--disabled":(u||p)&&Ve(q(r,e),n.props),"react-datepicker__quarter--selected":A(r)===e&&D(r)===D(s),"react-datepicker__quarter--in-range":je(a,o,e,r),"react-datepicker__quarter--range-start":n.isRangeStartQuarter(e),"react-datepicker__quarter--range-end":n.isRangeEndQuarter(e)})})),le(be(n),"renderMonths",(function(){return[[0,1,2],[3,4,5],[6,7,8],[9,10,11]].map((function(e,t){return r.createElement("div",{className:"react-datepicker__month-wrapper",key:t},e.map((function(e,t){return r.createElement("div",{key:t,onClick:function(t){n.onMonthClick(t,e)},className:n.getMonthClassNames(e)},Be(e,n.props.locale))})))}))})),le(be(n),"renderQuarters",(function(){return r.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(e,t){return r.createElement("div",{key:t,onClick:function(t){n.onQuarterClick(t,e)},className:n.getQuarterClassNames(e)},(i=e,a=n.props.locale,Ae(q(Ce(),i),"QQQ",a)));var i,a})))})),le(be(n),"getClassNames",(function(){var e=n.props,t=e.selectingDate,r=e.selectsStart,a=e.selectsEnd,o=e.showMonthYearPicker,s=e.showQuarterYearPicker;return i("react-datepicker__month",{"react-datepicker__month--selecting-range":t&&(r||a)},{"react-datepicker__monthPicker":o},{"react-datepicker__quarterPicker":s})})),n}return he(t,r.Component),me(t,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker;return r.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,role:"listbox","aria-label":"month-"+Ae(this.props.day,"yyyy-MM")},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),t}(),dt=function(e){function t(){var e,n;pe(this,t);for(var i=arguments.length,a=new Array(i),o=0;o=v(e)&&(n.centerLi=t)}},Ae(e,i,n.props.locale))}))})),n}return he(t,r.Component),me(t,[{key:"componentDidMount",value:function(){this.list.scrollTop=t.calcCenterPosition(this.props.monthRef?this.props.monthRef.clientHeight-this.header.clientHeight:this.list.clientHeight,this.centerLi),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})}},{key:"render",value:function(){var e=this,t=this.state.height;return r.createElement("div",{className:"react-datepicker__time-container ".concat(this.props.todayButton?"react-datepicker__time-container--with-today-button":"")},r.createElement("div",{className:"react-datepicker__header react-datepicker__header--time",ref:function(t){e.header=t}},r.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),r.createElement("div",{className:"react-datepicker__time"},r.createElement("div",{className:"react-datepicker__time-box"},r.createElement("ul",{className:"react-datepicker__time-list",ref:function(t){e.list=t},style:t?{height:t}:{}},this.renderTimes()))))}}],[{key:"defaultProps",get:function(){return{intervals:30,onTimeChange:function(){},todayButton:null,timeCaption:"Time"}}}]),t}();le(dt,"calcCenterPosition",(function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)}));var yt=function(e){function t(e){var r;return pe(this,t),le(be(r=ge(this,fe(t).call(this,e))),"onTimeChange",(function(e){r.setState({time:e});var t=new Date;t.setHours(e.split(":")[0]),t.setMinutes(e.split(":")[1]),r.props.onChange(t)})),r.state={time:r.props.timeString},r}return he(t,r.Component),me(t,[{key:"render",value:function(){var e=this,t=this.state.time,n=this.props.timeString;return r.createElement("div",{className:"react-datepicker__input-time-container"},r.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),r.createElement("div",{className:"react-datepicker-time__input-container"},r.createElement("div",{className:"react-datepicker-time__input"},r.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:t,onChange:function(t){e.onTimeChange(t.target.value||n)}}))))}}]),t}();function ht(e){var t=e.className,n=e.children,i=e.showPopperArrow,a=e.arrowProps,o=void 0===a?{}:a;return r.createElement("div",{className:t},i&&r.createElement("div",de({className:"react-datepicker__triangle"},o)),n)}var ft=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],bt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(e.className||"").split(/\s+/);return ft.some((function(e){return t.indexOf(e)>=0}))},gt=function(e){function t(e){var n;return pe(this,t),le(be(n=ge(this,fe(t).call(this,e))),"handleClickOutside",(function(e){n.props.onClickOutside(e)})),le(be(n),"setClickOutsideRef",(function(){return n.containerRef.current})),le(be(n),"handleDropdownFocus",(function(e){bt(e.target)&&n.props.onDropdownFocus()})),le(be(n),"getDateInView",(function(){var e=n.props,t=e.preSelection,r=e.selected,i=e.openToDate,a=Je(n.props),o=Ze(n.props),s=Ce();return i||r||t||(a&&te(s,a)?a:o&&ee(s,o)?o:s)})),le(be(n),"increaseMonth",(function(){n.setState((function(e){var t=e.date;return{date:l(t,1)}}),(function(){return n.handleMonthChange(n.state.date)}))})),le(be(n),"decreaseMonth",(function(){n.setState((function(e){var t=e.date;return{date:g(t,1)}}),(function(){return n.handleMonthChange(n.state.date)}))})),le(be(n),"handleDayClick",(function(e,t,r){return n.props.onSelect(e,t,r)})),le(be(n),"handleDayMouseEnter",(function(e){n.setState({selectingDate:e}),n.props.onDayMouseEnter&&n.props.onDayMouseEnter(e)})),le(be(n),"handleMonthMouseLeave",(function(){n.setState({selectingDate:null}),n.props.onMonthMouseLeave&&n.props.onMonthMouseLeave()})),le(be(n),"handleYearChange",(function(e){n.props.onYearChange&&n.props.onYearChange(e)})),le(be(n),"handleMonthChange",(function(e){n.props.onMonthChange&&n.props.onMonthChange(e),n.props.adjustDateOnChange&&(n.props.onSelect&&n.props.onSelect(e),n.props.setOpen&&n.props.setOpen(!0))})),le(be(n),"handleMonthYearChange",(function(e){n.handleYearChange(e),n.handleMonthChange(e)})),le(be(n),"changeYear",(function(e){n.setState((function(t){var r=t.date;return{date:_(r,e)}}),(function(){return n.handleYearChange(n.state.date)}))})),le(be(n),"changeMonth",(function(e){n.setState((function(t){var r=t.date;return{date:w(r,e)}}),(function(){return n.handleMonthChange(n.state.date)}))})),le(be(n),"changeMonthYear",(function(e){n.setState((function(t){var r=t.date;return{date:_(w(r,k(e)),D(e))}}),(function(){return n.handleMonthYearChange(n.state.date)}))})),le(be(n),"header",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.state.date,t=Re(e,n.props.locale),i=[];return n.props.showWeekNumbers&&i.push(r.createElement("div",{key:"W",className:"react-datepicker__day-name"},n.props.weekLabel||"#")),i.concat([0,1,2,3,4,5,6].map((function(e){var i=c(t,e),a=n.formatWeekday(i,n.props.locale);return r.createElement("div",{key:e,className:"react-datepicker__day-name"},a)})))})),le(be(n),"formatWeekday",(function(e,t){return n.props.formatWeekDay?function(e,t,r){return t(Ae(e,"EEEE",r))}(e,n.props.formatWeekDay,t):n.props.useWeekdaysShort?function(e,t){return Ae(e,"EEE",t)}(e,t):function(e,t){return Ae(e,"EEEEEE",t)}(e,t)})),le(be(n),"decreaseYear",(function(){n.setState((function(e){var t=e.date;return{date:S(t,1)}}),(function(){return n.handleYearChange(n.state.date)}))})),le(be(n),"renderPreviousButton",(function(){if(!n.props.renderCustomHeader){var e=n.props.showMonthYearPicker?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.minDate,n=t.includeDates,i=S(e,1);return r&&G(r,i)>0||n&&n.every((function(e){return G(e,i)>0}))||!1}(n.state.date,n.props):He(n.state.date,n.props);if((n.props.forceShowMonthNavigation||n.props.showDisabledMonthNavigation||!e)&&!n.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],i=n.decreaseMonth;return(n.props.showMonthYearPicker||n.props.showQuarterYearPicker)&&(i=n.decreaseYear),e&&n.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),i=null),r.createElement("button",{type:"button",className:t.join(" "),onClick:i},n.props.showMonthYearPicker||n.props.showQuarterYearPicker?n.props.previousYearButtonLabel:n.props.previousMonthButtonLabel)}}})),le(be(n),"increaseYear",(function(){n.setState((function(e){var t=e.date;return{date:d(t,1)}}),(function(){return n.handleYearChange(n.state.date)}))})),le(be(n),"renderNextButton",(function(){if(!n.props.renderCustomHeader){var e=n.props.showMonthYearPicker?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.maxDate,n=t.includeDates,i=d(e,1);return r&&G(i,r)>0||n&&n.every((function(e){return G(i,e)>0}))||!1}(n.state.date,n.props):Qe(n.state.date,n.props);if((n.props.forceShowMonthNavigation||n.props.showDisabledMonthNavigation||!e)&&!n.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--next"];n.props.showTimeSelect&&t.push("react-datepicker__navigation--next--with-time"),n.props.todayButton&&t.push("react-datepicker__navigation--next--with-today-button");var i=n.increaseMonth;return(n.props.showMonthYearPicker||n.props.showQuarterYearPicker)&&(i=n.increaseYear),e&&n.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--next--disabled"),i=null),r.createElement("button",{type:"button",className:t.join(" "),onClick:i},n.props.showMonthYearPicker||n.props.showQuarterYearPicker?n.props.nextYearButtonLabel:n.props.nextMonthButtonLabel)}}})),le(be(n),"renderCurrentMonth",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.state.date,t=["react-datepicker__current-month"];return n.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),n.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),n.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),r.createElement("div",{className:t.join(" ")},Ae(e,n.props.dateFormat,n.props.locale))})),le(be(n),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n.props.showYearDropdown&&!e)return r.createElement(rt,{adjustDateOnChange:n.props.adjustDateOnChange,date:n.state.date,onSelect:n.props.onSelect,setOpen:n.props.setOpen,dropdownMode:n.props.dropdownMode,onChange:n.changeYear,minDate:n.props.minDate,maxDate:n.props.maxDate,year:D(n.state.date),scrollableYearDropdown:n.props.scrollableYearDropdown,yearDropdownItemNumber:n.props.yearDropdownItemNumber})})),le(be(n),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n.props.showMonthDropdown&&!e)return r.createElement(it,{dropdownMode:n.props.dropdownMode,locale:n.props.locale,onChange:n.changeMonth,month:k(n.state.date),useShortMonthInDropdown:n.props.useShortMonthInDropdown})})),le(be(n),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(n.props.showMonthYearDropdown&&!e)return r.createElement(st,{dropdownMode:n.props.dropdownMode,locale:n.props.locale,dateFormat:n.props.dateFormat,onChange:n.changeMonthYear,minDate:n.props.minDate,maxDate:n.props.maxDate,date:n.state.date,scrollableMonthYearDropdown:n.props.scrollableMonthYearDropdown})})),le(be(n),"renderTodayButton",(function(){if(n.props.todayButton&&!n.props.showTimeSelectOnly)return r.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return n.props.onSelect(F(Ce()),e)}},n.props.todayButton)})),le(be(n),"renderDefaultHeader",(function(e){var t=e.monthDate,i=e.i;return r.createElement("div",{className:"react-datepicker__header"},n.renderCurrentMonth(t),r.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(n.props.dropdownMode),onFocus:n.handleDropdownFocus},n.renderMonthDropdown(0!==i),n.renderMonthYearDropdown(0!==i),n.renderYearDropdown(0!==i)),r.createElement("div",{className:"react-datepicker__day-names"},n.header(t)))})),le(be(n),"renderCustomHeader",(function(e){var t=e.monthDate;if(0!==e.i)return null;var i=He(n.state.date,n.props),a=Qe(n.state.date,n.props);return r.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:n.props.onDropdownFocus},n.props.renderCustomHeader(function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n.setState({open:e,preSelection:e&&n.state.open?n.state.preSelection:n.calcInitialState().preSelection,lastPreSelectChange:kt},(function(){e||n.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&n.setBlur(),n.setState({inputValue:null})}))}))})),le(be(n),"inputOk",(function(){return a(n.state.preSelection)})),le(be(n),"isCalendarOpen",(function(){return void 0===n.props.open?n.state.open&&!n.props.disabled&&!n.props.readOnly:n.props.open})),le(be(n),"handleFocus",(function(e){n.state.preventFocus||(n.props.onFocus(e),n.props.preventOpenOnFocus||n.props.readOnly||n.setOpen(!0)),n.setState({focused:!0})})),le(be(n),"cancelFocusInput",(function(){clearTimeout(n.inputFocusTimeout),n.inputFocusTimeout=null})),le(be(n),"deferFocusInput",(function(){n.cancelFocusInput(),n.inputFocusTimeout=setTimeout((function(){return n.setFocus()}),1)})),le(be(n),"handleDropdownFocus",(function(){n.cancelFocusInput()})),le(be(n),"handleBlur",(function(e){!n.state.open||n.props.withPortal||n.props.showTimeInput?n.props.onBlur(e):n.deferFocusInput(),n.setState({focused:!1})})),le(be(n),"handleCalendarClickOutside",(function(e){n.props.inline||n.setOpen(!1),n.props.onClickOutside(e),n.props.withPortal&&e.preventDefault()})),le(be(n),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&!n.props.inlineFocusSelectedMonth&&n.setState({monthSelectedIn:i})}n.props.onChange(a,t)}n.props.onSelect(a,t),r||n.setState({inputValue:null})}})),le(be(n),"setPreSelection",(function(e){var t=void 0!==n.props.minDate,r=void 0!==n.props.maxDate,i=!0;e&&(t&&r?i=Me(e,n.props.minDate,n.props.maxDate):t?i=ee(e,n.props.minDate):r&&(i=te(e,n.props.maxDate))),i&&n.setState({preSelection:e})})),le(be(n),"handleTimeChange",(function(e){var t=De(n.props.selected?n.props.selected:n.getPreSelection(),{hour:N(e),minute:v(e)});n.setState({preSelection:t}),n.props.onChange(t),n.props.shouldCloseOnSelect&&n.setOpen(!1),n.props.showTimeInput&&n.setOpen(!0),n.setState({inputValue:null})})),le(be(n),"onInputClick",(function(){n.props.disabled||n.props.readOnly||n.setOpen(!0),n.props.onInputClick()})),le(be(n),"onInputKeyDown",(function(e){n.props.onKeyDown(e);var t=e.key;if(n.state.open||n.props.inline||n.props.preventOpenOnFocus){var r=Ce(n.state.preSelection);if("Enter"===t)e.preventDefault(),n.inputOk()&&n.state.lastPreSelectChange===kt?(n.handleSelect(r,e),!n.props.shouldCloseOnSelect&&n.setPreSelection(r)):n.setOpen(!1);else if("Escape"===t)e.preventDefault(),n.setOpen(!1),n.inputOk()||n.props.onInputError({code:1,msg:Nt});else if("Tab"===t)n.setOpen(!1,!0);else if(!n.props.disabledKeyboardNavigation){var i;switch(t){case"ArrowLeft":i=f(r,1);break;case"ArrowRight":i=c(r,1);break;case"ArrowUp":i=b(r,1);break;case"ArrowDown":i=m(r,1);break;case"PageUp":i=g(r,1);break;case"PageDown":i=l(r,1);break;case"Home":i=S(r,1);break;case"End":i=d(r,1)}if(!i)return void(n.props.onInputError&&n.props.onInputError({code:1,msg:Nt}));e.preventDefault(),n.setState({lastPreSelectChange:kt}),n.props.adjustDateOnChange&&n.setSelected(i),n.setPreSelection(i)}}else"ArrowDown"!==t&&"ArrowUp"!==t||n.onInputClick()})),le(be(n),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),n.props.onChange(null,e),n.setState({inputValue:null})})),le(be(n),"clear",(function(){n.onClearClick()})),le(be(n),"renderCalendar",(function(){return n.props.inline||n.isCalendarOpen()?r.createElement(vt,{ref:function(e){n.calendar=e},locale:n.props.locale,adjustDateOnChange:n.props.adjustDateOnChange,setOpen:n.setOpen,shouldCloseOnSelect:n.props.shouldCloseOnSelect,dateFormat:n.props.dateFormatCalendar,useWeekdaysShort:n.props.useWeekdaysShort,formatWeekDay:n.props.formatWeekDay,dropdownMode:n.props.dropdownMode,selected:n.props.selected,preSelection:n.state.preSelection,onSelect:n.handleSelect,onWeekSelect:n.props.onWeekSelect,openToDate:n.props.openToDate,minDate:n.props.minDate,maxDate:n.props.maxDate,selectsStart:n.props.selectsStart,selectsEnd:n.props.selectsEnd,startDate:n.props.startDate,endDate:n.props.endDate,excludeDates:n.props.excludeDates,filterDate:n.props.filterDate,onClickOutside:n.handleCalendarClickOutside,formatWeekNumber:n.props.formatWeekNumber,highlightDates:n.state.highlightDates,includeDates:n.props.includeDates,includeTimes:n.props.includeTimes,injectTimes:n.props.injectTimes,inline:n.props.inline,peekNextMonth:n.props.peekNextMonth,showMonthDropdown:n.props.showMonthDropdown,showPreviousMonths:n.props.showPreviousMonths,useShortMonthInDropdown:n.props.useShortMonthInDropdown,showMonthYearDropdown:n.props.showMonthYearDropdown,showWeekNumbers:n.props.showWeekNumbers,showYearDropdown:n.props.showYearDropdown,withPortal:n.props.withPortal,forceShowMonthNavigation:n.props.forceShowMonthNavigation,showDisabledMonthNavigation:n.props.showDisabledMonthNavigation,scrollableYearDropdown:n.props.scrollableYearDropdown,scrollableMonthYearDropdown:n.props.scrollableMonthYearDropdown,todayButton:n.props.todayButton,weekLabel:n.props.weekLabel,outsideClickIgnoreClass:It,fixedHeight:n.props.fixedHeight,monthsShown:n.props.monthsShown,monthSelectedIn:n.state.monthSelectedIn,onDropdownFocus:n.handleDropdownFocus,onMonthChange:n.props.onMonthChange,onYearChange:n.props.onYearChange,dayClassName:n.props.dayClassName,showTimeSelect:n.props.showTimeSelect,showTimeSelectOnly:n.props.showTimeSelectOnly,onTimeChange:n.handleTimeChange,timeFormat:n.props.timeFormat,timeIntervals:n.props.timeIntervals,minTime:n.props.minTime,maxTime:n.props.maxTime,excludeTimes:n.props.excludeTimes,timeCaption:n.props.timeCaption,className:n.props.calendarClassName,container:n.props.calendarContainer,yearDropdownItemNumber:n.props.yearDropdownItemNumber,previousMonthButtonLabel:n.props.previousMonthButtonLabel,nextMonthButtonLabel:n.props.nextMonthButtonLabel,previousYearButtonLabel:n.props.previousYearButtonLabel,nextYearButtonLabel:n.props.nextYearButtonLabel,timeInputLabel:n.props.timeInputLabel,disabledKeyboardNavigation:n.props.disabledKeyboardNavigation,renderCustomHeader:n.props.renderCustomHeader,popperProps:n.props.popperProps,renderDayContents:n.props.renderDayContents,onDayMouseEnter:n.props.onDayMouseEnter,onMonthMouseLeave:n.props.onMonthMouseLeave,showTimeInput:n.props.showTimeInput,showMonthYearPicker:n.props.showMonthYearPicker,showQuarterYearPicker:n.props.showQuarterYearPicker,showPopperArrow:n.props.showPopperArrow},n.props.children):null})),le(be(n),"renderDateInput",(function(){var e,t,a,o,s,u=i(n.props.className,le({},It,n.state.open)),p=n.props.customInput||r.createElement("input",{type:"text"}),c=n.props.customInputRef||"ref",m="string"==typeof n.props.value?n.props.value:"string"==typeof n.state.inputValue?n.state.inputValue:(t=n.props.selected,o=(a=n.props).dateFormat,s=a.locale,t&&Ae(t,Array.isArray(o)?o[0]:o,s)||"");return r.cloneElement(p,(le(e={},c,(function(e){n.input=e})),le(e,"value",m),le(e,"onBlur",n.handleBlur),le(e,"onChange",n.handleChange),le(e,"onClick",n.onInputClick),le(e,"onFocus",n.handleFocus),le(e,"onKeyDown",n.onInputKeyDown),le(e,"id",n.props.id),le(e,"name",n.props.name),le(e,"autoFocus",n.props.autoFocus),le(e,"placeholder",n.props.placeholderText),le(e,"disabled",n.props.disabled),le(e,"autoComplete",n.props.autoComplete),le(e,"className",i(p.props.className,u)),le(e,"title",n.props.title),le(e,"readOnly",n.props.readOnly),le(e,"required",n.props.required),le(e,"tabIndex",n.props.tabIndex),le(e,"aria-labelledby",n.props.ariaLabelledBy),e))})),le(be(n),"renderClearButton",(function(){return n.props.isClearable&&null!=n.props.selected?r.createElement("button",{type:"button",className:"react-datepicker__close-icon","aria-label":"Close",onClick:n.onClearClick,title:n.props.clearButtonTitle,tabIndex:-1}):null})),n.state=n.calcInitialState(),n}return he(t,r.Component),me(t,null,[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",renderDayContents:function(e){return e},inlineFocusSelectedMonth:!1,showPopperArrow:!0}}}]),me(t,[{key:"componentDidUpdate",value:function(e,t){var r,n;e.inline&&(r=e.selected,n=this.props.selected,r&&n?k(r)!==k(n)||D(r)!==D(n):r!==n)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:Ye(this.props.highlightDates)}),t.focused||_e(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout()}},{key:"render",value:function(){var e=this.renderCalendar();return this.props.inline&&!this.props.withPortal?e:this.props.withPortal?r.createElement("div",null,this.props.inline?null:r.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),this.state.open||this.props.inline?r.createElement("div",{className:"react-datepicker__portal"},e):null):r.createElement(St,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),popperModifiers:this.props.popperModifiers,targetComponent:r.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps})}}]),t}(),Tt="input",kt="navigate";t.CalendarContainer=ht,t.default=Ct,t.getDefaultLocale=Le,t.registerLocale=function(t,r){var n="undefined"!=typeof window?window:e;n.__localeData__||(n.__localeData__={}),n.__localeData__[t]=r},t.setDefaultLocale=function(t){("undefined"!=typeof window?window:e).__localeId__=t},Object.defineProperty(t,"__esModule",{value:!0})}(t,r(0),r(52),r(199),r(200),r(107),r(649),r(108),r(109),r(73),r(110),r(74),r(111),r(201),r(202),r(203),r(204),r(205),r(206),r(207),r(208),r(209),r(210),r(211),r(212),r(213),r(214),r(215),r(216),r(217),r(218),r(112),r(219),r(220),r(221),r(222),r(223),r(224),r(225),r(226),r(57),r(89),r(227),r(90),r(228),r(229),r(230),r(231),r(232),r(233),r(234),r(235),r(236),r(237),r(238),r(239),r(3),r(648),r(240),r(241),r(650))}).call(this,r(40))},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(6),i=r(67);function a(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(n.a)(t);return Object(i.a)(e,-r)}},function(e,t,r){"use strict";function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var a={p:i,P:function(e,t){var r,a=e.match(/(P+)(p+)?/),o=a[1],s=a[2];if(!s)return n(e,t);switch(o){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",n(o,t)).replace("{{time}}",i(s,t))}};t.a=a},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(3),i=r(45);function a(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(n.default)(e),r=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(r+1,0,4),a.setUTCHours(0,0,0,0);var o=Object(i.a)(a),s=new Date(0);s.setUTCFullYear(r,0,4),s.setUTCHours(0,0,0,0);var u=Object(i.a)(s);return t.getTime()>=o.getTime()?r+1:t.getTime()>=u.getTime()?r:r-1}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3);function i(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(n.default)(e),r=t.getFullYear(),i=t.getMonth(),a=new Date(0);return a.setFullYear(r,i+1,0),a.setHours(0,0,0,0),a.getDate()}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(3),i=r(6);function a(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},a=r.locale,o=a&&a.options&&a.options.weekStartsOn,s=null==o?0:Object(i.a)(o),u=null==r.weekStartsOn?s:Object(i.a)(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Object(n.default)(e),c=p.getDay(),m=(c>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var r=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a>>6-o%4*2;i[a>>>2]|=(s|u)<<24-a%4*8,a++}return t.create(i,a)}(e,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!==typeof Symbol&&"function"===typeof Symbol.for;t.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER=n?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.lexruntime={},n.LexRuntime=i.defineService("lexruntime",["2016-11-28"]),Object.defineProperty(a.services.lexruntime,"2016-11-28",{get:function(){var e=r(344);return e.paginators=r(345).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.LexRuntime},function(e,t,r){"use strict";var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function i(e){return function(t){var r=t||{},n=r.width?String(r.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var a={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},o={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,r){var n,i=r||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=i.width?String(i.width):a;n=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,u=i.width?String(i.width):e.defaultWidth;n=e.values[u]||e.values[s]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function u(e){return function(t,r){var n=String(t),i=r||{},a=i.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=n.match(o);if(!s)return null;var u,p=s[0],c=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(c)?function(e,t){for(var r=0;r0?"in "+i:i+" ago":i},formatLong:a,formatRelative:function(e,t,r,n){return o[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(p={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var r=String(e),n=t||{},i=r.match(p.matchPattern);if(!i)return null;var a=i[0],o=r.match(p.parsePattern);if(!o)return null;var s=p.valueCallback?p.valueCallback(o[0]):o[0];return{value:s=n.valueCallback?n.valueCallback(s):s,rest:r.slice(a.length)}}),era:u({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:u({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:u({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:u({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:u({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};t.a=c},function(e,t,r){"use strict";var n=r(3),i=r(45),a=r(87);r.d(t,"a",(function(){return s}));var o=6048e5;function s(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(n.default)(e),r=Object(i.a)(t).getTime()-function(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(a.a)(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),Object(i.a)(r)}(t).getTime();return Math.round(r/o)+1}},function(e,t,r){"use strict";var n=r(3),i=r(43),a=r(6),o=r(68);r.d(t,"a",(function(){return u}));var s=6048e5;function u(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=Object(n.default)(e),u=Object(i.a)(r,t).getTime()-function(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var r=t||{},n=r.locale,s=n&&n.options&&n.options.firstWeekContainsDate,u=null==s?1:Object(a.a)(s),p=null==r.firstWeekContainsDate?u:Object(a.a)(r.firstWeekContainsDate),c=Object(o.a)(e,t),m=new Date(0);return m.setUTCFullYear(c,0,p),m.setUTCHours(0,0,0,0),Object(i.a)(m,t)}(r,t).getTime();return Math.round(u/s)+1}},,,function(e,t,r){var n=r(14),i=r(101),a=r(102),o=r(103).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,a=r.jsonVersion||"1.0",s=r.operations[e.operation].input,u=new i;1===a&&(a="1.0"),t.body=u.build(e.params||{},s),t.headers["Content-Type"]="application/x-amz-json-"+a,t.headers["X-Amz-Target"]=n,o(e)},extractError:function(e){var t={},r=e.httpResponse;if(t.code=r.headers["x-amzn-errortype"]||"UnknownError","string"===typeof t.code&&(t.code=t.code.split(":")[0]),r.body.length>0)try{var i=JSON.parse(r.body.toString());(i.__type||i.code)&&(t.code=(i.__type||i.code).split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=i.message||i.Message||null}catch(i){t.statusCode=r.statusCode,t.message=r.statusMessage}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=n.error(new Error,t)},extractData:function(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation].output||{},n=new a;e.data=n.parse(t,r)}}}},function(e,t,r){var n=r(14);function i(){}function a(e,t){if(t&&void 0!==e&&null!==e)switch(t.type){case"structure":return function(e,t){var r={};return n.each(e,(function(e,n){var i=t.members[e];if(i){if("body"!==i.location)return;var o=i.isLocationName?i.name:e,s=a(n,i);void 0!==s&&(r[o]=s)}})),r}(e,t);case"map":return function(e,t){var r={};return n.each(e,(function(e,n){var i=a(n,t.value);void 0!==i&&(r[e]=i)})),r}(e,t);case"list":return function(e,t){var r=[];return n.arrayEach(e,(function(e){var n=a(e,t.member);void 0!==n&&r.push(n)})),r}(e,t);default:return function(e,t){return t.toWireFormat(e)}(e,t)}}i.prototype.build=function(e,t){return JSON.stringify(a(e,t))},e.exports=i},function(e,t,r){var n=r(14);function i(){}function a(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return function(e,t){if(null==e)return;var r={},i=t.members;return n.each(i,(function(t,n){var i=n.isLocationName?n.name:t;if(Object.prototype.hasOwnProperty.call(e,i)){var o=a(e[i],n);void 0!==o&&(r[t]=o)}})),r}(e,t);case"map":return function(e,t){if(null==e)return;var r={};return n.each(e,(function(e,n){var i=a(n,t.value);r[e]=void 0===i?null:i})),r}(e,t);case"list":return function(e,t){if(null==e)return;var r=[];return n.arrayEach(e,(function(e){var n=a(e,t.member);void 0===n?r.push(null):r.push(n)})),r}(e,t);default:return function(e,t){return t.toType(e)}(e,t)}}i.prototype.parse=function(e,t){return a(JSON.parse(e),t)},e.exports=i},function(e,t,r){var n=r(14),i=r(2);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t=e.service.api.operations[e.operation];if(function(e){var t=e.service.api,r=t.operations[e.operation],i=t.endpointOperation&&t.endpointOperation===n.string.lowerFirst(r.name);return"NULL"!==r.endpointDiscoveryRequired||!0===i}(e))return e;if(t.endpoint&&t.endpoint.hostPrefix){var r=function(e,t,r){return n.each(r.members,(function(r,i){if(!0===i.hostLabel){if("string"!==typeof t[r]||""===t[r])throw n.error(new Error,{message:"Parameter "+r+" should be a non-empty string.",code:"InvalidParameter"});var a=new RegExp("\\{"+r+"\\}","g");e=e.replace(a,t[r])}})),e}(t.endpoint.hostPrefix,e.params,t.input);!function(e,t){e.host&&(e.host=t+e.host);e.hostname&&(e.hostname=t+e.hostname)}(e.httpRequest.endpoint,r),function(e){var t=e.split("."),r=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/;n.arrayEach(t,(function(e){if(!e.length||e.length<1||e.length>63)throw n.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!r.test(e))throw i.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}(e.httpRequest.endpoint.hostname)}return e}}},function(e,t,r){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function n(e,i){if(e===i)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(i))return!1;if(!0===t(e)){if(e.length!==i.length)return!1;for(var a=0;a":!0,"=":!0,"!":!0},f={" ":!0,"\t":!0,"\n":!0};function b(e){return e>="0"&&e<="9"||"-"===e}function g(){}g.prototype={tokenize:function(e){var t,r,n,i,a=[];for(this._current=0;this._current="a"&&i<="z"||i>="A"&&i<="Z"||"_"===i)t=this._current,r=this._consumeUnquotedIdentifier(e),a.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==y[e[this._current]])a.push({type:y[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(b(e[this._current]))n=this._consumeNumber(e),a.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),a.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),a.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),a.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var o=this._consumeLiteral(e);a.push({type:"Literal",value:o,start:t})}else if(void 0!==h[e[this._current]])a.push(this._consumeOperator(e));else if(void 0!==f[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,a.push({type:"And",value:"&&",start:t})):a.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var s=new Error("Unknown character:"+e[this._current]);throw s.name="LexerError",s}t=this._current,this._current++,"|"===e[this._current]?(this._current++,a.push({type:"Or",value:"||",start:t})):a.push({type:"Pipe",value:"|",start:t})}return a},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"===t);)this._current++;return e.slice(r,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var r=e.length;'"'!==e[this._current]&&this._current"===r?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===r&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,r=this._current,n=e.length;"`"!==e[this._current]&&this._current=0)return!0;if(["true","false","null"].indexOf(e)>=0)return!0;if(!("-0123456789".indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(t){return!1}}};var S={};function I(){}function v(e){this.runtime=e}function N(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[o]}]},avg:{_func:this._functionAvg,_signature:[{types:[l]}]},ceil:{_func:this._functionCeil,_signature:[{types:[o]}]},contains:{_func:this._functionContains,_signature:[{types:[u,p]},{types:[s]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[u]},{types:[u]}]},floor:{_func:this._functionFloor,_signature:[{types:[o]}]},length:{_func:this._functionLength,_signature:[{types:[u,p,c]}]},map:{_func:this._functionMap,_signature:[{types:[m]},{types:[p]}]},max:{_func:this._functionMax,_signature:[{types:[l,d]}]},merge:{_func:this._functionMerge,_signature:[{types:[c],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[p]},{types:[m]}]},sum:{_func:this._functionSum,_signature:[{types:[l]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[u]},{types:[u]}]},min:{_func:this._functionMin,_signature:[{types:[l,d]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[p]},{types:[m]}]},type:{_func:this._functionType,_signature:[{types:[s]}]},keys:{_func:this._functionKeys,_signature:[{types:[c]}]},values:{_func:this._functionValues,_signature:[{types:[c]}]},sort:{_func:this._functionSort,_signature:[{types:[d,l]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[p]},{types:[m]}]},join:{_func:this._functionJoin,_signature:[{types:[u]},{types:[d]}]},reverse:{_func:this._functionReverse,_signature:[{types:[u,p]}]},to_array:{_func:this._functionToArray,_signature:[{types:[s]}]},to_string:{_func:this._functionToString,_signature:[{types:[s]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[s]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[s],variadic:!0}]}}}S.EOF=0,S.UnquotedIdentifier=0,S.QuotedIdentifier=0,S.Rbracket=0,S.Rparen=0,S.Comma=0,S.Rbrace=0,S.Number=0,S.Current=0,S.Expref=0,S.Pipe=1,S.Or=2,S.And=3,S.EQ=5,S.GT=5,S.LT=5,S.GTE=5,S.LTE=5,S.NE=5,S.Flatten=9,S.Star=20,S.Filter=21,S.Dot=40,S.Not=45,S.Lbrace=50,S.Lbracket=55,S.Lparen=60,I.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Unexpected token type: "+r.type+", value: "+r.value);throw n.name="ParserError",n}return t},_loadTokens:function(e){var t=(new g).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var r=this.nud(t),n=this._lookahead(0);e=0?this.expression(e):"Lbracket"===t?(this._match("Lbracket"),this._parseMultiselectList()):"Lbrace"===t?(this._match("Lbrace"),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t;if(S[this._lookahead(0)]<10)t={type:"Identity"};else if("Lbracket"===this._lookahead(0))t=this.expression(e);else if("Filter"===this._lookahead(0))t=this.expression(e);else{if("Dot"!==this._lookahead(0)){var r=this._lookaheadToken(0),n=new Error("Sytanx error, unexpected token: "+r.value+"("+r.type+")");throw n.name="ParserError",n}this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];"Rbracket"!==this._lookahead(0);){var t=this.expression(0);if(e.push(t),"Comma"===this._lookahead(0)&&(this._match("Comma"),"Rbracket"===this._lookahead(0)))throw new Error("Unexpected token Rbracket")}return this._match("Rbracket"),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,r,n=[],i=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),i.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),r={type:"KeyValuePair",name:t,value:this.expression(0)},n.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:n}}},v.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,a){var o,s,u,p,c,m,l,d,y;switch(e.type){case"Field":return null===a?null:r(a)?void 0===(m=a[e.name])?null:m:null;case"Subexpression":for(u=this.visit(e.children[0],a),y=1;y0)for(y=g;yS;y+=I)u.push(a[y]);return u;case"Projection":var v=this.visit(e.children[0],a);if(!t(v))return null;for(d=[],y=0;yc;break;case"GTE":u=p>=c;break;case"LT":u=p=e&&(t=r<0?e-1:e),t}},N.prototype={callFunction:function(e,t){var r=this.functionTable[e];if(void 0===r)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,r._signature),r._func.call(this,t)},_validateArgs:function(e,t,r){var n,i,a,o;if(r[r.length-1].variadic){if(t.length=0;n--)r+=t[n];return r}var i=e[0].slice(0);return i.reverse(),i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,r=e[0],n=0;n=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return r(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],r=this._interpreter,n=e[0],i=e[1],a=0;a0){if(this._getTypeName(e[0][0])===o)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n0){if(this._getTypeName(e[0][0])===o)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;ns?1:os&&(s=r,t=i[p]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],a=this.createKeyFunction(n,[o,u]),s=1/0,p=0;p=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o}function u(e,t){return function(r,n){t(r,n,e)}}function p(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(o,s)}u((n=n.apply(e,t||[])).next())}))}function m(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function y(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function h(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof b?Promise.resolve(r.value.v).then(u,p):c(a[0][2],r)}catch(n){c(a[0][3],n)}var r}function u(e){s("next",e)}function p(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:b(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function I(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return i}));var n=r(3);function i(e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var t=Object(n.default)(e);return!isNaN(t)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(6),i=r(67),a=6e4;function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(n.a)(t);return Object(i.a)(e,r*a)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(6),i=r(67),a=36e5;function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(n.a)(t);return Object(i.a)(e,r*a)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(6),i=r(73);function a(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=7*Object(n.a)(t);return Object(i.default)(e,r)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return a}));var n=r(6),i=r(74);function a(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(n.a)(t);return Object(i.default)(e,12*r)}},function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return o}));var n=r(6),i=r(3),a=r(88);function o(e,t){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Object(i.default)(e),o=Object(n.a)(t),s=r.getFullYear(),u=r.getDate(),p=new Date(0);p.setFullYear(s,o,15),p.setHours(0,0,0,0);var c=Object(a.a)(p);return r.setMonth(o,Math.min(u,c)),r}},function(e,t,r){"use strict";(function(t){var r="__global_unique_id__";e.exports=function(){return t[r]=(t[r]||0)+1}}).call(this,r(40))},function(e,t,r){"use strict";var n=function(){};e.exports=n},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.mobileanalytics={},n.MobileAnalytics=i.defineService("mobileanalytics",["2014-06-05"]),Object.defineProperty(a.services.mobileanalytics,"2014-06-05",{get:function(){return r(312)},enumerable:!0,configurable:!0}),e.exports=n.MobileAnalytics},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.kinesis={},n.Kinesis=i.defineService("kinesis",["2013-12-02"]),Object.defineProperty(a.services.kinesis,"2013-12-02",{get:function(){var e=r(316);return e.paginators=r(317).pagination,e.waiters=r(318).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.personalizeevents={},n.PersonalizeEvents=i.defineService("personalizeevents",["2018-03-22"]),Object.defineProperty(a.services.personalizeevents,"2018-03-22",{get:function(){var e=r(319);return e.paginators=r(320).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.PersonalizeEvents},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.s3={},n.S3=i.defineService("s3",["2006-03-01"]),r(322),Object.defineProperty(a.services.s3,"2006-03-01",{get:function(){var e=r(324);return e.paginators=r(325).pagination,e.waiters=r(326).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.S3},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.translate={},n.Translate=i.defineService("translate",["2017-07-01"]),Object.defineProperty(a.services.translate,"2017-07-01",{get:function(){var e=r(346);return e.paginators=r(347).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Translate},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.polly={},n.Polly=i.defineService("polly",["2016-06-10"]),r(348),Object.defineProperty(a.services.polly,"2016-06-10",{get:function(){var e=r(350);return e.paginators=r(351).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Polly},,function(e,t,r){"use strict";(function(e){var r="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,n=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();var i=r&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),n))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var r=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?r[t]:r}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?e:u(s(e))}function p(e){return e&&e.referenceNode?e.referenceNode:e}var c=r&&!(!window.MSInputMethodContext||!document.documentMode),m=r&&/MSIE 10/.test(navigator.userAgent);function l(e){return 11===e?c:10===e?m:c||m}function d(e){if(!e)return document.documentElement;for(var t=l(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===o(r,"position")?d(r):r:e?e.ownerDocument.documentElement:document.documentElement}function y(e){return null!==e.parentNode?y(e.parentNode):e}function h(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,i=r?t:e,a=document.createRange();a.setStart(n,0),a.setEnd(i,0);var o=a.commonAncestorContainer;if(e!==o&&t!==o||n.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||d(e.firstElementChild)===e)}(o)?o:d(o);var s=y(e);return s.host?h(s.host,t):h(e,y(t).host)}function f(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var n=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||n)[t]}return e[t]}function b(e,t){var r="x"===t?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(e["border"+r+"Width"],10)+parseFloat(e["border"+n+"Width"],10)}function g(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],l(10)?parseInt(r["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}function S(e){var t=e.body,r=e.documentElement,n=l(10)&&getComputedStyle(r);return{height:g("Height",t,r,n),width:g("Width",t,r,n)}}var I=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},v=function(){function e(e,t){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2],n=l(10),i="HTML"===t.nodeName,a=k(e),s=k(t),p=u(e),c=o(t),m=parseFloat(c.borderTopWidth,10),d=parseFloat(c.borderLeftWidth,10);r&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var y=T({top:a.top-s.top-m,left:a.left-s.left-d,width:a.width,height:a.height});if(y.marginTop=0,y.marginLeft=0,!n&&i){var h=parseFloat(c.marginTop,10),b=parseFloat(c.marginLeft,10);y.top-=m-h,y.bottom-=m-h,y.left-=d-b,y.right-=d-b,y.marginTop=h,y.marginLeft=b}return(n&&!r?t.contains(p):t===p&&"BODY"!==p.nodeName)&&(y=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=f(t,"top"),i=f(t,"left"),a=r?-1:1;return e.top+=n*a,e.bottom+=n*a,e.left+=i*a,e.right+=i*a,e}(y,t)),y}function D(e){if(!e||!e.parentElement||l())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function R(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},c=i?D(e):h(e,p(t));if("viewport"===n)a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.ownerDocument.documentElement,n=A(e,r),i=Math.max(r.clientWidth,window.innerWidth||0),a=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:f(r),s=t?0:f(r,"left");return T({top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:a})}(c,i);else{var m=void 0;"scrollParent"===n?"BODY"===(m=u(s(t))).nodeName&&(m=e.ownerDocument.documentElement):m="window"===n?e.ownerDocument.documentElement:n;var l=A(m,c,i);if("HTML"!==m.nodeName||function e(t){var r=t.nodeName;if("BODY"===r||"HTML"===r)return!1;if("fixed"===o(t,"position"))return!0;var n=s(t);return!!n&&e(n)}(c))a=l;else{var d=S(e.ownerDocument),y=d.height,b=d.width;a.top+=l.top-l.marginTop,a.bottom=y+l.top,a.left+=l.left-l.marginLeft,a.right=b+l.left}}var g="number"===typeof(r=r||0);return a.left+=g?r:r.left||0,a.top+=g?r:r.top||0,a.right-=g?r:r.right||0,a.bottom-=g?r:r.bottom||0,a}function P(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=R(r,n,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},u=Object.keys(s).map((function(e){return C({key:e},s[e],{area:(t=s[e],t.width*t.height)});var t})).sort((function(e,t){return t.area-e.area})),p=u.filter((function(e){var t=e.width,n=e.height;return t>=r.clientWidth&&n>=r.clientHeight})),c=p.length>0?p[0].key:u[0].key,m=e.split("-")[1];return c+(m?"-"+m:"")}function E(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return A(r,n?D(t):h(t,p(r)),n)}function x(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),r=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),n=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+n,height:e.offsetHeight+r}}function w(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function q(e,t,r){r=r.split("-")[0];var n=x(e),i={width:n.width,height:n.height},a=-1!==["right","left"].indexOf(r),o=a?"top":"left",s=a?"left":"top",u=a?"height":"width",p=a?"width":"height";return i[o]=t[o]+t[u]/2-n[u]/2,i[s]=r===s?t[s]-n[p]:t[w(s)],i}function _(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function M(e,t,r){return(void 0===r?e:e.slice(0,function(e,t,r){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===r}));var n=_(e,(function(e){return e[t]===r}));return e.indexOf(n)}(e,"name",r))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=e.function||e.fn;e.enabled&&a(r)&&(t.offsets.popper=T(t.offsets.popper),t.offsets.reference=T(t.offsets.reference),t=r(t,e))})),t}function L(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=E(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=P(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=q(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=M(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function O(e,t){return e.some((function(e){var r=e.name;return e.enabled&&r===t}))}function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n1&&void 0!==arguments[1]&&arguments[1],r=J.indexOf(e),n=J.slice(r+1).concat(J.slice(0,r));return t?n.reverse():n}var Y={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function X(e,t,r,n){var i=[0,0],a=-1!==["right","left"].indexOf(n),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=o.indexOf(_(o,(function(e){return-1!==e.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,p=-1!==s?[o.slice(0,s).concat([o[s].split(u)[0]]),[o[s].split(u)[1]].concat(o.slice(s+1))]:[o];return(p=p.map((function(e,n){var i=(1===n?!a:a)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,r,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}return T(s)[t]/100*a}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}(e,i,t,r)}))}))).forEach((function(e,t){e.forEach((function(r,n){z(r)&&(i[t]+=r*("-"===e[n-1]?-1:1))}))})),i}var $={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,a=i.reference,o=i.popper,s=-1!==["bottom","top"].indexOf(r),u=s?"left":"top",p=s?"width":"height",c={start:N({},u,a[u]),end:N({},u,a[u]+a[p]-o[p])};e.offsets.popper=C({},o,c[n])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var r=t.offset,n=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=n.split("-")[0],u=void 0;return u=z(+r)?[+r,0]:X(r,a,o,s),"left"===s?(a.top+=u[0],a.left-=u[1]):"right"===s?(a.top+=u[0],a.left+=u[1]):"top"===s?(a.left+=u[0],a.top-=u[1]):"bottom"===s&&(a.left+=u[0],a.top+=u[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var r=t.boundariesElement||d(e.instance.popper);e.instance.reference===r&&(r=d(r));var n=B("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[n];i.top="",i.left="",i[n]="";var u=R(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);i.top=a,i.left=o,i[n]=s,t.boundaries=u;var p=t.priority,c=e.offsets.popper,m={primary:function(e){var r=c[e];return c[e]u[e]&&!t.escapeWithReference&&(n=Math.min(c[r],u[e]-("right"===e?c.width:c.height))),N({},r,n)}};return p.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=C({},c,m[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,r=t.popper,n=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",u=o?"left":"top",p=o?"width":"height";return r[s]a(n[s])&&(e.offsets.popper[u]=a(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var r;if(!H(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"===typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,s=a.popper,u=a.reference,p=-1!==["left","right"].indexOf(i),c=p?"height":"width",m=p?"Top":"Left",l=m.toLowerCase(),d=p?"left":"top",y=p?"bottom":"right",h=x(n)[c];u[y]-hs[y]&&(e.offsets.popper[l]+=u[l]+h-s[y]),e.offsets.popper=T(e.offsets.popper);var f=u[l]+u[c]/2-h/2,b=o(e.instance.popper),g=parseFloat(b["margin"+m],10),S=parseFloat(b["border"+m+"Width"],10),I=f-e.offsets.popper[l]-g-S;return I=Math.max(Math.min(s[c]-h,I),0),e.arrowElement=n,e.offsets.arrow=(N(r={},l,Math.round(I)),N(r,d,""),r),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(O(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var r=R(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=w(n),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case Y.FLIP:o=[n,i];break;case Y.CLOCKWISE:o=Z(n);break;case Y.COUNTERCLOCKWISE:o=Z(n,!0);break;default:o=t.behavior}return o.forEach((function(s,u){if(n!==s||o.length===u+1)return e;n=e.placement.split("-")[0],i=w(n);var p=e.offsets.popper,c=e.offsets.reference,m=Math.floor,l="left"===n&&m(p.right)>m(c.left)||"right"===n&&m(p.left)m(c.top)||"bottom"===n&&m(p.top)m(r.right),h=m(p.top)m(r.bottom),b="left"===n&&d||"right"===n&&y||"top"===n&&h||"bottom"===n&&f,g=-1!==["top","bottom"].indexOf(n),S=!!t.flipVariations&&(g&&"start"===a&&d||g&&"end"===a&&y||!g&&"start"===a&&h||!g&&"end"===a&&f),I=!!t.flipVariationsByContent&&(g&&"start"===a&&y||g&&"end"===a&&d||!g&&"start"===a&&f||!g&&"end"===a&&h),v=S||I;(l||b||v)&&(e.flipped=!0,(l||b)&&(n=o[u+1]),v&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=n+(a?"-"+a:""),e.offsets.popper=C({},e.offsets.popper,q(e.instance.popper,e.offsets.reference,e.placement)),e=M(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,i=n.popper,a=n.reference,o=-1!==["left","right"].indexOf(r),s=-1===["top","left"].indexOf(r);return i[o?"left":"top"]=a[r]-(s?i[o?"width":"height"]:0),e.placement=w(t),e.offsets.popper=T(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!H(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=_(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};I(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=i(this.update.bind(this)),this.options=C({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(C({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){n.options.modifiers[t]=C({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return C({name:e},n.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&a(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return v(e,[{key:"update",value:function(){return L.call(this)}},{key:"destroy",value:function(){return U.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return j.call(this)}}]),e}();ee.Utils=("undefined"!==typeof window?window:e).PopperUtils,ee.placements=Q,ee.Defaults=$,t.a=ee}).call(this,r(40))},function(e,t,r){"use strict";t.__esModule=!0;var n=a(r(0)),i=a(r(242));function a(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||i.default,e.exports=t.default},,function(e,t,r){e.exports=r(328)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(355);t.fromUtf8=function(e){var t=n.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},t.toUtf8=function(e){return n.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}},function(e,t,r){var n=r(644);e.exports=d,e.exports.parse=a,e.exports.compile=function(e,t){return s(a(e,t))},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=l;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var r,n=[],a=0,o=0,s="",c=t&&t.delimiter||"/";null!=(r=i.exec(e));){var m=r[0],l=r[1],d=r.index;if(s+=e.slice(o,d),o=d+m.length,l)s+=l[1];else{var y=e[o],h=r[2],f=r[3],b=r[4],g=r[5],S=r[6],I=r[7];s&&(n.push(s),s="");var v=null!=h&&null!=y&&y!==h,N="+"===S||"*"===S,C="?"===S||"*"===S,T=r[2]||c,k=b||g;n.push({name:f||a++,prefix:h||"",delimiter:T,optional:C,repeat:N,partial:v,asterisk:!!I,pattern:k?p(k):I?".*":"[^"+u(T)+"]+?"})}}return o0){var m=(t=new n.XML.Parser).parse(o.toString(),u);i.update(e.data,m)}}}},function(e,t,r){var n=r(132),i=r(136),a=r(72),o=r(137),s=r(138),u=r(14),p=u.property,c=u.memoizedProperty;e.exports=function(e,t){var r=this;e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{},p(this,"isApi",!0,!1),p(this,"apiVersion",e.metadata.apiVersion),p(this,"endpointPrefix",e.metadata.endpointPrefix),p(this,"signingName",e.metadata.signingName),p(this,"globalEndpoint",e.metadata.globalEndpoint),p(this,"signatureVersion",e.metadata.signatureVersion),p(this,"jsonVersion",e.metadata.jsonVersion),p(this,"targetPrefix",e.metadata.targetPrefix),p(this,"protocol",e.metadata.protocol),p(this,"timestampFormat",e.metadata.timestampFormat),p(this,"xmlNamespaceUri",e.metadata.xmlNamespace),p(this,"abbreviation",e.metadata.serviceAbbreviation),p(this,"fullName",e.metadata.serviceFullName),p(this,"serviceId",e.metadata.serviceId),c(this,"className",(function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?("ElasticLoadBalancing"===(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""))&&(t="ELB"),t):null})),p(this,"operations",new n(e.operations,t,(function(e,r){return new i(e,r,t)}),u.string.lowerFirst,(function(e,t){!0===t.endpointoperation&&p(r,"endpointOperation",u.string.lowerFirst(e))}))),p(this,"shapes",new n(e.shapes,t,(function(e,r){return a.create(r,t)}))),p(this,"paginators",new n(e.paginators,t,(function(e,r){return new o(e,r,t)}))),p(this,"waiters",new n(e.waiters,t,(function(e,r){return new s(e,r,t)}),u.string.lowerFirst)),t.documentation&&(p(this,"documentation",e.documentation),p(this,"documentationUrl",e.documentationUrl))}},function(e,t,r){var n=r(72),i=r(14),a=i.property,o=i.memoizedProperty;e.exports=function(e,t,r){var i=this;r=r||{},a(this,"name",t.name||e),a(this,"api",r.api,!1),t.http=t.http||{},a(this,"endpoint",t.endpoint),a(this,"httpMethod",t.http.method||"POST"),a(this,"httpPath",t.http.requestUri||"/"),a(this,"authtype",t.authtype||""),a(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),o(this,"input",(function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)})),o(this,"output",(function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)})),o(this,"errors",(function(){var e=[];if(!t.errors)return null;for(var i=0;i-1&&r.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var n=this.listeners(e),i=n.length;return this.callListeners(n,t,r),i>0},callListeners:function(e,t,r,i){var a=this,o=i||null;function s(i){if(i&&(o=n.util.error(o||new Error,i),a._haltHandlersOnError))return r.call(a,o);a.callListeners(e,t,r,o)}for(;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(a,t.concat([s]));try{u.apply(a,t)}catch(p){o=n.util.error(o||new Error,p)}if(o&&a._haltHandlersOnError)return void r.call(a,o)}r.call(a,o)},addListeners:function(e){var t=this;return e._events&&(e=e._events),n.util.each(e,(function(e,r){"function"===typeof r&&(r=[r]),n.util.arrayEach(r,(function(r){t.on(e,r)}))})),t},addNamedListener:function(e,t,r,n){return this[e]=r,this.addListener(t,r,n),this},addNamedAsyncListener:function(e,t,r,n){return r._isAsync=!0,this.addNamedListener(e,t,r,n)},addNamedListeners:function(e){var t=this;return e((function(){t.addNamedListener.apply(t,arguments)}),(function(){t.addNamedAsyncListener.apply(t,arguments)})),this}}),n.SequentialExecutor.prototype.addListener=n.SequentialExecutor.prototype.on,e.exports=n.SequentialExecutor},function(e,t,r){var n=r(2);n.Credentials=n.util.inherit({constructor:function(){if(n.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],1===arguments.length&&"object"===typeof arguments[0]){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=n.util.date.getDate().getTime(),t=new Date(e+1e3*this.expiryWindow);return!!(this.expireTime&&t>this.expireTime)||(this.expired||!this.accessKeyId||!this.secretAccessKey)},get:function(e){var t=this;this.needsRefresh()?this.refresh((function(r){r||(t.expired=!1),e&&e(r)})):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var r=this;1===r.refreshCallbacks.push(e)&&r.load((function(e){n.util.arrayEach(r.refreshCallbacks,(function(r){t?r(e):n.util.defer((function(){r(e)}))})),r.refreshCallbacks.length=0}))},load:function(e){e()}}),n.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=n.util.promisifyMethod("get",e),this.prototype.refreshPromise=n.util.promisifyMethod("refresh",e)},n.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},n.util.addPromises(n.Credentials)},function(e,t,r){var n=r(2);n.CredentialProviderChain=n.util.inherit(n.Credentials,{constructor:function(e){this.providers=e||n.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var t=this;if(0===t.providers.length)return e(new Error("No providers")),t;if(1===t.resolveCallbacks.push(e)){var r=0,i=t.providers.slice(0);!function e(a,o){if(!a&&o||r===i.length)return n.util.arrayEach(t.resolveCallbacks,(function(e){e(a,o)})),void(t.resolveCallbacks.length=0);var s=i[r++];(o="function"===typeof s?s.call():s).get?o.get((function(t){e(t,t?null:o)})):e(null,o)}()}return t}}),n.CredentialProviderChain.defaultProviders=[],n.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=n.util.promisifyMethod("resolve",e)},n.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},n.util.addPromises(n.CredentialProviderChain)},function(e,t,r){var n=r(2),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),"undefined"===typeof e||null===e)throw new Error("Invalid endpoint: "+e);if("string"!==typeof e)return n.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:n.config.sslEnabled)?"https":"http")+"://"+e);n.util.update(this,n.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),n.HttpRequest=i({constructor:function(e,t){e=new n.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=t,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=n.util.userAgent()},getUserAgentHeaderName:function(){return(n.util.isBrowser()?"X-Amz-":"")+"User-Agent"},appendToUserAgent:function(e){"string"===typeof e&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=n.util.queryStringParse(e),n.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new n.Endpoint(e);this.endpoint=t,this.path=t.path||"/"}}),n.HttpResponse=i({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}}),n.HttpClient=i({}),n.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},function(e,t,r){var n=r(2),i=n.util.inherit;n.Signers.V3=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){var r=n.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,r)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return n.util.arrayEach(this.headersToSign(),(function(t){e.push(t.toLowerCase())})),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return n.util.arrayEach(this.headersToSign(),(function(r){t.push(r.toLowerCase().trim()+":"+String(e[r]).trim())})),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return n.util.each(this.request.headers,(function(t){("Host"===t||"Content-Encoding"===t||t.match(/^X-Amz/i))&&e.push(t)})),e},signature:function(e){return n.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),n.util.crypto.sha256(e.join("\n"))}}),e.exports=n.Signers.V3},function(e,t,r){var n=r(2),i={},a=[],o="aws4_request";e.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,o].join("/")},getSigningKey:function(e,t,r,s,u){var p=[n.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,s].join("_");if((u=!1!==u)&&p in i)return i[p];var c=n.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),m=n.util.crypto.hmac(c,r,"buffer"),l=n.util.crypto.hmac(m,s,"buffer"),d=n.util.crypto.hmac(l,o,"buffer");return u&&(i[p]=d,a.push(p),a.length>50&&delete i[a.shift()]),d},emptyCache:function(){i={},a=[]}}},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";t.decode=t.parse=r(288),t.encode=t.stringify=r(289)},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.cognitoidentity={},n.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),r(304),Object.defineProperty(a.services.cognitoidentity,"2014-06-30",{get:function(){var e=r(305);return e.paginators=r(306).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.CognitoIdentity},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){!function(t,n){var i;e.exports=(i=r(23),function(){if("function"==typeof ArrayBuffer){var e=i.lib.WordArray,t=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!==typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)}).prototype=e}}(),i.lib.WordArray)}()},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){s.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){s.headers[e]=n.merge(a)})),e.exports=s}).call(this,r(51))},function(e,t,r){"use strict";var n=r(33),i=r(335),a=r(154),o=r(337),s=r(338),u=r(158);e.exports=function(e){return new Promise((function(t,p){var c=e.data,m=e.headers;n.isFormData(c)&&delete m["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",y=e.auth.password||"";m.Authorization="Basic "+btoa(d+":"+y)}if(l.open(e.method.toUpperCase(),a(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?o(l.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};i(t,p,n),l=null}},l.onabort=function(){l&&(p(u("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){p(u("Network Error",e,null,l)),l=null},l.ontimeout=function(){p(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var h=r(339),f=(e.withCredentials||s(e.url))&&e.xsrfCookieName?h.read(e.xsrfCookieName):void 0;f&&(m[e.xsrfHeaderName]=f)}if("setRequestHeader"in l&&n.forEach(m,(function(e,t){"undefined"===typeof c&&"content-type"===t.toLowerCase()?delete m[t]:l.setRequestHeader(t,e)})),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(b){if("json"!==e.responseType)throw b}"function"===typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){l&&(l.abort(),p(e),l=null)})),void 0===c&&(c=null),l.send(c)}))}},function(e,t,r){"use strict";var n=r(336);e.exports=function(e,t,r,i,a){var o=new Error(e);return n(o,t,r,i,a)}},function(e,t,r){"use strict";var n=r(33);e.exports=function(e,t){t=t||{};var r={};return n.forEach(["url","method","params","data"],(function(e){"undefined"!==typeof t[e]&&(r[e]=t[e])})),n.forEach(["headers","auth","proxy"],(function(i){n.isObject(t[i])?r[i]=n.deepMerge(e[i],t[i]):"undefined"!==typeof t[i]?r[i]=t[i]:n.isObject(e[i])?r[i]=n.deepMerge(e[i]):"undefined"!==typeof e[i]&&(r[i]=e[i])})),n.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],(function(n){"undefined"!==typeof t[n]?r[n]=t[n]:"undefined"!==typeof e[n]&&(r[n]=e[n])})),r}},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";(function(e){var n=r(82),i=r(119),a=r(120),o=r(20),s=r(1),u=r(183),p=r(126),c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(t){a(t)}}function s(e){try{u(n.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},l=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i.Transcript.Results[0].Alternatives.length>0&&i.Transcript.Results[0].Alternatives[0].Transcript.length>0&&(!1===i.Transcript.Results[0].IsPartial?(r=i.Transcript.Results[0].Alternatives[0].Transcript+"\n",d.debug({decodedMessage:r})):d.debug({transcript:i.Transcript.Results[0].Alternatives[0]})),r},r.prototype.sendDataToTranscribe=function(t){var n=this,i=t.connection,a=t.raw;return new Promise((function(t,o){var s="";if(i.onmessage=function(e){try{var t=r.serializeDataFromTranscribe(e);t&&(s+=t+" ")}catch(n){d.debug(n),o(n.message)}},i.onerror=function(e){d.debug({errorEvent:e}),o("failed to transcribe, network error")},i.onclose=function(e){return d.debug({closeEvent:e}),t(s.trim())},d.debug({raw:a}),Array.isArray(a))for(var u=0;u0x8000000000000000||t<-0x8000000000000000)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var r=new Uint8Array(8),n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&a(r),new e(r)},e.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&a(e),parseInt(n.toHex(e),16)*(t?-1:1)},e.prototype.toString=function(){return String(this.valueOf())},e}();function a(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}t.Int64=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(106);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,r;try{for(var i=n.__values(e),o=i.next();!o.done;o=i.next()){var s=o.value;this.checksum=this.checksum>>>8^a[255&(this.checksum^s)]}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=i;var a=Uint32Array.from([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])},function(e,t,r){var n=r(2).util;function i(e){var t=["Buffer","File","Blob","ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"];if(n.isNode()){var r=n.stream.Stream;if(n.Buffer.isBuffer(e)||e instanceof r)return!0}for(var i=0;i=256;)e-=255;return r.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)r.EXP_TABLE[n]=1<0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0||(i[r]=e[r]);return i}},,,,,,,function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.pinpoint={},n.Pinpoint=i.defineService("pinpoint",["2016-12-01"]),Object.defineProperty(a.services.pinpoint,"2016-12-01",{get:function(){return r(313)},enumerable:!0,configurable:!0}),e.exports=n.Pinpoint},function(e,t,r){(function(t){var r;r=function(){return function(e){var t=e.localStorage||function(){var e={};return{setItem:function(t,r){e[t]=r},getItem:function(t){return e[t]},removeItem:function(t){delete e[t]}}}(),r={CONNECT:1,CONNACK:2,PUBLISH:3,PUBACK:4,PUBREC:5,PUBREL:6,PUBCOMP:7,SUBSCRIBE:8,SUBACK:9,UNSUBSCRIBE:10,UNSUBACK:11,PINGREQ:12,PINGRESP:13,DISCONNECT:14},n=function(e,t){for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)){var n="Unknown property, "+r+". Valid properties are:";for(var i in t)t.hasOwnProperty(i)&&(n=n+" "+i);throw new Error(n)}if(typeof e[r]!==t[r])throw new Error(s(a.INVALID_TYPE,[typeof e[r],r]))}},i=function(e,t){return function(){return e.apply(t,arguments)}},a={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."},BUFFER_FULL:{code:18,text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}},o={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},s=function(e,t){var r=e.text;if(t)for(var n,i,a=0;a0){var o=r.substring(0,i),s=r.substring(i+n.length);r=o+t[a]+s}return r},u=[0,6,77,81,73,115,100,112,3],p=[0,4,77,81,84,84,4],c=function(e,t){for(var r in this.type=e,t)t.hasOwnProperty(r)&&(this[r]=t[r])};function m(e,t){var n,i=t,a=e[t],o=a>>4,s=a&=15;t+=1;var u=0,p=1;do{if(t==e.length)return[null,i];u+=(127&(n=e[t++]))*p,p*=128}while(0!==(128&n));var m=t+u;if(m>e.length)return[null,i];var l=new c(o);switch(o){case r.CONNACK:1&e[t++]&&(l.sessionPresent=!0),l.returnCode=e[t++];break;case r.PUBLISH:var d=s>>1&3,h=y(e,t),f=b(e,t+=2,h);t+=h,d>0&&(l.messageIdentifier=y(e,t),t+=2);var g=new v(e.subarray(t,m));1==(1&s)&&(g.retained=!0),8==(8&s)&&(g.duplicate=!0),g.qos=d,g.destinationName=f,l.payloadMessage=g;break;case r.PUBACK:case r.PUBREC:case r.PUBREL:case r.PUBCOMP:case r.UNSUBACK:l.messageIdentifier=y(e,t);break;case r.SUBACK:l.messageIdentifier=y(e,t),t+=2,l.returnCode=e.subarray(t,m)}return[l,m]}function l(e,t,r){return t[r++]=e>>8,t[r++]=e%256,r}function d(e,t,r,n){return f(e,r,n=l(t,r,n)),n+t}function y(e,t){return 256*e[t]+e[t+1]}function h(e){for(var t=0,r=0;r2047?(55296<=n&&n<=56319&&(r++,t++),t+=3):n>127?t+=2:t++}return t}function f(e,t,r){for(var n=r,i=0;i>6&31|192,t[n++]=63&o|128):o<=65535?(t[n++]=o>>12&15|224,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>18&7|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t}function b(e,t,r){for(var n,i="",o=t;o65535&&(n-=65536,i+=String.fromCharCode(55296+(n>>10)),n=56320+(1023&n)),i+=String.fromCharCode(n)}return i}c.prototype.encode=function(){var e,t=(15&this.type)<<4,n=0,i=[],a=0;switch(void 0!==this.messageIdentifier&&(n+=2),this.type){case r.CONNECT:switch(this.mqttVersion){case 3:n+=u.length+3;break;case 4:n+=p.length+3}n+=h(this.clientId)+2,void 0!==this.willMessage&&(n+=h(this.willMessage.destinationName)+2,(e=this.willMessage.payloadBytes)instanceof Uint8Array||(e=new Uint8Array(s)),n+=e.byteLength+2),void 0!==this.userName&&(n+=h(this.userName)+2),void 0!==this.password&&(n+=h(this.password)+2);break;case r.SUBSCRIBE:t|=2;for(var o=0;o>=7)>0&&(n|=128),t[r++]=n}while(e>0&&r<4);return t}(n),m=c.length+1,y=new ArrayBuffer(n+m),f=new Uint8Array(y);if(f[0]=t,f.set(c,1),this.type==r.PUBLISH)m=d(this.payloadMessage.destinationName,a,f,m);else if(this.type==r.CONNECT){switch(this.mqttVersion){case 3:f.set(u,m),m+=u.length;break;case 4:f.set(p,m),m+=p.length}var b=0;this.cleanSession&&(b=2),void 0!==this.willMessage&&(b|=4,b|=this.willMessage.qos<<3,this.willMessage.retained&&(b|=32)),void 0!==this.userName&&(b|=128),void 0!==this.password&&(b|=64),f[m++]=b,m=l(this.keepAliveInterval,f,m)}switch(void 0!==this.messageIdentifier&&(m=l(this.messageIdentifier,f,m)),this.type){case r.CONNECT:m=d(this.clientId,h(this.clientId),f,m),void 0!==this.willMessage&&(m=d(this.willMessage.destinationName,h(this.willMessage.destinationName),f,m),m=l(e.byteLength,f,m),f.set(e,m),m+=e.byteLength),void 0!==this.userName&&(m=d(this.userName,h(this.userName),f,m)),void 0!==this.password&&(m=d(this.password,h(this.password),f,m));break;case r.PUBLISH:f.set(s,m);break;case r.SUBSCRIBE:for(o=0;o0&&(this.timeout=setTimeout(i(this),this._keepAliveInterval))},this.cancel=function(){clearTimeout(this.timeout)}},S=function(e,t,r,n){t||(t=30),this.timeout=setTimeout(function(e,t,r){return function(){return e.apply(t,r)}}(r,e,n),1e3*t),this.cancel=function(){clearTimeout(this.timeout)}},I=function(r,n,i,o,u){if(!("WebSocket"in e&&null!==e.WebSocket))throw new Error(s(a.UNSUPPORTED,["WebSocket"]));if(!("ArrayBuffer"in e&&null!==e.ArrayBuffer))throw new Error(s(a.UNSUPPORTED,["ArrayBuffer"]));for(var p in this._trace("Paho.Client",r,n,i,o,u),this.host=n,this.port=i,this.path=o,this.uri=r,this.clientId=u,this._wsuri=null,this._localKey=n+":"+i+("/mqtt"!=o?":"+o:"")+":"+u+":",this._msg_queue=[],this._buffered_msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0,t)0!==p.indexOf("Sent:"+this._localKey)&&0!==p.indexOf("Received:"+this._localKey)||this.restore(p)};I.prototype.host=null,I.prototype.port=null,I.prototype.path=null,I.prototype.uri=null,I.prototype.clientId=null,I.prototype.socket=null,I.prototype.connected=!1,I.prototype.maxMessageIdentifier=65536,I.prototype.connectOptions=null,I.prototype.hostIndex=null,I.prototype.onConnected=null,I.prototype.onConnectionLost=null,I.prototype.onMessageDelivered=null,I.prototype.onMessageArrived=null,I.prototype.traceFunction=null,I.prototype._msg_queue=null,I.prototype._buffered_msg_queue=null,I.prototype._connectTimeout=null,I.prototype.sendPinger=null,I.prototype.receivePinger=null,I.prototype._reconnectInterval=1,I.prototype._reconnecting=!1,I.prototype._reconnectTimeout=null,I.prototype.disconnectedPublishing=!1,I.prototype.disconnectedBufferSize=5e3,I.prototype.receiveBuffer=null,I.prototype._traceBuffer=null,I.prototype._MAX_TRACE_ENTRIES=100,I.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(s(a.INVALID_STATE,["already connected"]));if(this.socket)throw new Error(s(a.INVALID_STATE,["already connected"]));this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),this.connectOptions=e,this._reconnectInterval=1,this._reconnecting=!1,e.uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},I.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(s(a.INVALID_STATE,["not connected"]));var n=new c(r.SUBSCRIBE);n.topics=e.constructor===Array?e:[e],void 0===t.qos&&(t.qos=0),n.requestedQos=[];for(var i=0;i0?this._requires_ack(t):this.onMessageDelivered&&(this._notify_msg_sent[t]=this.onMessageDelivered(t.payloadMessage)),this._schedule_message(t);else{if(!this._reconnecting||!this.disconnectedPublishing)throw new Error(s(a.INVALID_STATE,["not connected"]));if(Object.keys(this._sentMessages).length+this._buffered_msg_queue.length>this.disconnectedBufferSize)throw new Error(s(a.BUFFER_FULL,[this.disconnectedBufferSize]));e.qos>0?this._requires_ack(t):(t.sequence=++this._sequence,this._buffered_msg_queue.unshift(t))}},I.prototype.disconnect=function(){if(this._trace("Client.disconnect"),this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),!this.socket)throw new Error(s(a.INVALID_STATE,["not connecting or connected"]));var e=new c(r.DISCONNECT);this._notify_msg_sent[e]=i(this._disconnected,this),this._schedule_message(e)},I.prototype.getTraceLog=function(){if(null!==this._traceBuffer){for(var e in this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length),this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},I.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@-@BUILDLEVEL@")},I.prototype.stopTrace=function(){delete this._traceBuffer},I.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this._wsuri=e,this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.binaryType="arraybuffer",this.socket.onopen=i(this._on_socket_open,this),this.socket.onmessage=i(this._on_socket_message,this),this.socket.onerror=i(this._on_socket_error,this),this.socket.onclose=i(this._on_socket_close,this),this.sendPinger=new g(this,this.connectOptions.keepAliveInterval),this.receivePinger=new g(this,this.connectOptions.keepAliveInterval),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._connectTimeout=new S(this,this.connectOptions.timeout,this._disconnected,[a.CONNECT_TIMEOUT.code,s(a.CONNECT_TIMEOUT)])},I.prototype._schedule_message=function(e){this._msg_queue.unshift(e),this.connected&&this._process_queue()},I.prototype.store=function(e,n){var i={type:n.type,messageIdentifier:n.messageIdentifier,version:1};switch(n.type){case r.PUBLISH:n.pubRecReceived&&(i.pubRecReceived=!0),i.payloadMessage={};for(var o="",u=n.payloadMessage.payloadBytes,p=0;p=2;){var d=parseInt(u.substring(0,2),16);u=u.substring(2,u.length),m[l++]=d}var y=new v(m);y.qos=i.payloadMessage.qos,y.destinationName=i.payloadMessage.destinationName,i.payloadMessage.duplicate&&(y.duplicate=!0),i.payloadMessage.retained&&(y.retained=!0),o.payloadMessage=y;break;default:throw Error(s(a.INVALID_STORED_DATA,[e,n]))}0===e.indexOf("Sent:"+this._localKey)?(o.payloadMessage.duplicate=!0,this._sentMessages[o.messageIdentifier]=o):0===e.indexOf("Received:"+this._localKey)&&(this._receivedMessages[o.messageIdentifier]=o)},I.prototype._process_queue=function(){for(var e=null;e=this._msg_queue.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},I.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,this._sentMessages[e.messageIdentifier]=e,e.type===r.PUBLISH&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},I.prototype._on_socket_open=function(){var e=new c(r.CONNECT,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},I.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data);for(var t=this._deframeMessages(e.data),r=0;r0)for(var l=null;l=this._buffered_msg_queue.pop();)p.push(l),this.onMessageDelivered&&(this._notify_msg_sent[l]=this.onMessageDelivered(l.payloadMessage));p=p.sort((function(e,t){return e.sequence-t.sequence}));for(var d=0,y=p.length;d65535)throw new Error(s(a.INVALID_ARGUMENT,[i,"clientId"]));var d=new I(o,e,t,r,i);Object.defineProperties(this,{host:{get:function(){return e},set:function(){throw new Error(s(a.UNSUPPORTED_OPERATION))}},port:{get:function(){return t},set:function(){throw new Error(s(a.UNSUPPORTED_OPERATION))}},path:{get:function(){return r},set:function(){throw new Error(s(a.UNSUPPORTED_OPERATION))}},uri:{get:function(){return o},set:function(){throw new Error(s(a.UNSUPPORTED_OPERATION))}},clientId:{get:function(){return d.clientId},set:function(){throw new Error(s(a.UNSUPPORTED_OPERATION))}},onConnected:{get:function(){return d.onConnected},set:function(e){if("function"!==typeof e)throw new Error(s(a.INVALID_TYPE,[typeof e,"onConnected"]));d.onConnected=e}},disconnectedPublishing:{get:function(){return d.disconnectedPublishing},set:function(e){d.disconnectedPublishing=e}},disconnectedBufferSize:{get:function(){return d.disconnectedBufferSize},set:function(e){d.disconnectedBufferSize=e}},onConnectionLost:{get:function(){return d.onConnectionLost},set:function(e){if("function"!==typeof e)throw new Error(s(a.INVALID_TYPE,[typeof e,"onConnectionLost"]));d.onConnectionLost=e}},onMessageDelivered:{get:function(){return d.onMessageDelivered},set:function(e){if("function"!==typeof e)throw new Error(s(a.INVALID_TYPE,[typeof e,"onMessageDelivered"]));d.onMessageDelivered=e}},onMessageArrived:{get:function(){return d.onMessageArrived},set:function(e){if("function"!==typeof e)throw new Error(s(a.INVALID_TYPE,[typeof e,"onMessageArrived"]));d.onMessageArrived=e}},trace:{get:function(){return d.traceFunction},set:function(e){if("function"!==typeof e)throw new Error(s(a.INVALID_TYPE,[typeof e,"onTrace"]));d.traceFunction=e}}}),this.connect=function(e){if(n(e=e||{},{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",reconnect:"boolean",mqttVersion:"number",mqttVersionExplicit:"boolean",uris:"object"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),e.mqttVersion>4||e.mqttVersion<3)throw new Error(s(a.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0!==e.password&&void 0===e.userName)throw new Error(s(a.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof v))throw new Error(s(a.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload=null,"undefined"===typeof e.willMessage.destinationName)throw new Error(s(a.INVALID_TYPE,[typeof e.willMessage.destinationName,"connectOptions.willMessage.destinationName"]))}if("undefined"===typeof e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(s(a.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(s(a.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,i=0;i=3&&(i.qos=r),arguments.length>=4&&(i.retained=n),d.send(i)},this.publish=function(e,t,r,n){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof v)&&"string"!==typeof e)throw new Error("Invalid argument:"+typeof e);if("undefined"===typeof(i=e).destinationName)throw new Error(s(a.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));d.send(i)}else(i=new v(t)).destinationName=e,arguments.length>=3&&(i.qos=r),arguments.length>=4&&(i.retained=n),d.send(i)},this.disconnect=function(){d.disconnect()},this.getTraceLog=function(){return d.getTraceLog()},this.startTrace=function(){d.startTrace()},this.stopTrace=function(){d.stopTrace()},this.isConnected=function(){return d.connected}},Message:v}}("undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},e.exports=r()}).call(this,r(40))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(106);n.__exportStar(r(352),t),n.__exportStar(r(163),t)},function(e,t,r){r(5);var n=r(2),i=n.Service,a=n.apiLoader;a.services.textract={},n.Textract=i.defineService("textract",["2018-06-27"]),Object.defineProperty(a.services.textract,"2018-06-27",{get:function(){var e=r(359);return e.paginators=r(360).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.Textract},function(e,t,r){r(5);var n=r(2);"undefined"!==typeof window&&(window.AWS=n),e.exports=n,"undefined"!==typeof self&&(self.AWS=n),r(361)},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(54),i=r(47),a=r(0),o=r.n(a),s=r(39),u=(r(52),r(15)),p=r(61),c=r(35),m=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;ix.length&&x.push(e)}function _(e,t,r){return null==e?0:function e(t,r,n,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case a:case o:u=!0}}if(u)return n(i,t,""===r?"."+M(t,0):r),1;if(u=0,r=""===r?".":r+":",Array.isArray(t))for(var p=0;p