1(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{104:function(e,t,r){var n;e.exports=(n=r(55),r(137),r(2118),n.HmacSHA256)},108:function(e,t,r){var n=r(297),i=r(41);function o(e,t,r){null!=r&&i.property.apply(this,arguments)}function s(e,t){e.constructor.prototype[t]||i.memoizedProperty.apply(this,arguments)}function a(e,t,r){t=t||{},o(this,"shape",e.shape),o(this,"api",t.api,!1),o(this,"type",e.type),o(this,"enum",e.enum),o(this,"min",e.min),o(this,"max",e.max),o(this,"pattern",e.pattern),o(this,"location",e.location||this.location||"body"),o(this,"name",this.name||e.xmlName||e.queryName||e.locationName||r),o(this,"isStreaming",e.streaming||this.isStreaming||!1),o(this,"requiresLength",e.requiresLength,!1),o(this,"isComposite",e.isComposite||!1),o(this,"isShape",!0,!1),o(this,"isQueryName",Boolean(e.queryName),!1),o(this,"isLocationName",Boolean(e.locationName),!1),o(this,"isIdempotent",!0===e.idempotencyToken),o(this,"isJsonValue",!0===e.jsonvalue),o(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),o(this,"isEventStream",Boolean(e.eventstream),!1),o(this,"isEvent",Boolean(e.event),!1),o(this,"isEventPayload",Boolean(e.eventpayload),!1),o(this,"isEventHeader",Boolean(e.eventheader),!1),o(this,"isTimestampFormatSet",Boolean(e.timestampFormat)||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),o(this,"endpointDiscoveryId",Boolean(e.endpointdiscoveryid),!1),o(this,"hostLabel",Boolean(e.hostLabel),!1),t.documentation&&(o(this,"documentation",e.documentation),o(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&o(this,"isXmlAttribute",e.xmlAttribute||!1),o(this,"defaultValue",null),this.toWireFormat=function(e){return null==e?"":e},this.toType=function(e){return e}}function u(e){a.apply(this,arguments),o(this,"isComposite",!0),e.flattened&&o(this,"flattened",e.flattened||!1)}function c(e,t){var r=this,i=null,c=!this.isShape;u.apply(this,arguments),c&&(o(this,"defaultValue",(function(){return{}})),o(this,"members",{}),o(this,"memberNames",[]),o(this,"required",[]),o(this,"isRequired",(function(){return!1}))),e.members&&(o(this,"members",new n(e.members,t,(function(e,r){return a.create(r,t,e)}))),s(this,"memberNames",(function(){return e.xmlOrder||Object.keys(e.members)})),e.event&&(s(this,"eventPayloadMemberName",(function(){for(var e=r.members,t=r.memberNames,n=0,i=t.length;n<i;n++)if(e[t[n]].isEventPayload)return t[n]})),s(this,"eventHeaderMemberNames",(function(){for(var e=r.members,t=r.memberNames,n=[],i=0,o=t.length;i<o;i++)e[t[i]].isEventHeader&&n.push(t[i]);return n})))),e.required&&(o(this,"required",e.required),o(this,"isRequired",(function(t){if(!i){i={};for(var r=0;r<e.required.length;r++)i[e.required[r]]=!0}return i[t]}),!1,!0)),o(this,"resultWrapper",e.resultWrapper||null),e.payload&&o(this,"payload",e.payload),"string"==typeof e.xmlNamespace?o(this,"xmlNamespaceUri",e.xmlNamespace):"object"==typeof e.xmlNamespace&&(o(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),o(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function p(e,t){var r=this,n=!this.isShape;if(u.apply(this,arguments),n&&o(this,"defaultValue",(function(){return[]})),e.member&&s(this,"member",(function(){return a.create(e.member,t)})),this.flattened){var i=this.name;s(this,"name",(function(){return r.member.name||i}))}}function l(e,t){var r=!this.isShape;u.apply(this,arguments),r&&(o(this,"defaultValue",(function(){return{}})),o(this,"key",a.create({type:"string"},t)),o(this,"value",a.create({type:"string"},t))),e.key&&s(this,"key",(function(){return a.create(e.key,t)})),e.value&&s(this,"value",(function(){return a.create(e.value,t)}))}function h(){a.apply(this,arguments);var e=["rest-xml","query","ec2"];this.toType=function(t){return t=this.api&&e.indexOf(this.api.protocol)>-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(){a.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 f(){d.apply(this,arguments)}function m(){a.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null==e?null:"true"===e}}a.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal
1:"float",blob:"binary"},a.types={structure:c,list:p,map:l,boolean:m,timestamp:function(e){var t=this;if(a.apply(this,arguments),e.timestampFormat)o(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)o(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)o(this,"timestampFormat","rfc822");else if("querystring"===this.location)o(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":o(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":o(this,"timestampFormat","iso8601")}this.toType=function(e){return null==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(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseFloat(e)},this.toWireFormat=this.toType},integer:function(){a.apply(this,arguments),this.toType=function(e){return null==e?null:parseInt(e,10)},this.toWireFormat=this.toType},string:h,base64:f,binary:d},a.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},a.create=function(e,t,r){if(e.isShape)return e;var n=a.resolve(e,t);if(n){var i=Object.keys(e);t.documentation||(i=i.filter((function(e){return!e.match(/documentation/)})));var o=function(){n.constructor.call(this,e,t,r)};return o.prototype=n,new o}e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var s=e.type;if(a.normalizedTypes[e.type]&&(e.type=a.normalizedTypes[e.type]),a.types[e.type])return new a.types[e.type](e,t,r);throw new Error("Unrecognized shape type: "+s)},a.shapes={StructureShape:c,ListShape:p,MapShape:l,StringShape:h,BooleanShape:m,Base64Shape:f},e.exports=a},109:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.sts={},n.STS=i.defineService("sts",["2011-06-15"]),r(2095),Object.defineProperty(o.services.sts,"2011-06-15",{get:function(){var e=r(2096);return e.paginators=r(2097).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.STS},11:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"i",(function(){return o})),r.d(t,"h",(function(){return s})),r.d(t,"c",(function(){return a})),r.d(t,"d",(function(){return u})),r.d(t,"k",(function(){return c})),r.d(t,"g",(function(){return p})),r.d(t,"j",(function(){return l})),r.d(t,"a",(function(){return h})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return f}));var n={centimeters:637100880,centimetres:637100880,degrees:6371008.8/111325,feet:20902260.511392,inches:6371008.8*39.37,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:6371008.8/1852,radians:1,yards:6371008.8/1.0936};function i(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function o(e,t,r){if(void 0===r&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!d(e[0])||!d(e[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,r)}function s(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return i({type:"LineString",coordinates:e},t,r)}function a(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function u(e,t,r){return void 0===r&&(r={}),i({type:"GeometryCollection",geometries:e},t,r)}function c(e,t){void 0===t&&(t="kilometers");var r=n[t];
1if(!r)throw new Error(t+" units is invalid");return e*r}function p(e,t){void 0===t&&(t="kilometers");var r=n[t];if(!r)throw new Error(t+" units is invalid");return e/r}function l(e){return 180*(e%(2*Math.PI))/Math.PI}function h(e){return e%360*Math.PI/180}function d(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function f(e){return!!e&&e.constructor===Object}},12:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return s})),r.d(t,"f",(function(){return g})),r.d(t,"g",(function(){return C.a})),r.d(t,"j",(function(){return L})),r.d(t,"h",(function(){return F})),r.d(t,"e",(function(){return se})),r.d(t,"k",(function(){return te})),r.d(t,"i",(function(){return ce})),r.d(t,"d",(function(){return pe}));var n=r(295),i=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n},o={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},s=function(){function e(e,t){void 0===t&&(t="WARN"),this.name=e,this.level=t}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype._log=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.level;e.LOG_LEVEL&&(i=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(i=window.LOG_LEVEL);var s=o[i],a=o[t];if(a>=s){var u=console.log.bind(console);"ERROR"===t&&console.error&&(u=console.error.bind(console)),"WARN"===t&&console.warn&&(u=console.warn.bind(console));var c="["+t+"] "+this._ts()+" "+this.name;if(1===r.length&&"string"==typeof r[0])u(c+" - "+r[0]);else if(1===r.length)u(c,r[0]);else if("string"==typeof r[0]){var p=r.slice(1);1===p.length&&(p=p[0]),u(c+" - "+r[0],p)}else u(c,r)}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["INFO"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["WARN"],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["ERROR"],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["DEBUG"],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,i(["VERBOSE"],e))},e.LOG_LEVEL=null,e}(),a=new s("Amplify"),u=function(){function e(){}return e.register=function(t){a.debug("component registered in amplify",t),this._components.push(t),"function"==typeof t.getModuleName?e[t.getModuleName()]=t:a.debug("no getModuleName method for component",t)},e.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),a.debug("amplify config",this._config),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e._components=[],e._config={},e.Auth=null,e.Analytics=null,e.API=null,e.Storage=null,e.I18n=null,e.Cache=null,e.PubSub=null,e.Interactions=null,e.Pushnotification=null,e.UI=null,e.XR=null,e.Predictions=null,e.Logger=s,e.ServiceWorker=null,e}(),c=new s("ClientDevice_Browser");function p(){return"undefined"==typeof window?{}:function(){if("undefined"==typeof window)return c.warn("No window object available to get browser client info"),{};var e=window.navigator;if(!e)return c.warn("No navigator object available to get browser client info"),{};var t=e.platform,r=e.product,n=e.vendor,i=e.userAgent,o=e.language,s=function(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var n=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var i=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};
1var o=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var s=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);if(s)return{type:s[1],version:s[2]};return{type:"",version:""}}(i),a=(u=/\(([A-Za-z\s].*)\)/.exec((new Date).toString()),u&&u[1]||"");var u;return{platform:t,make:r||n,model:s.type,version:s.version,appVersion:[s.type,s.version].join("/"),language:o,timezone:a}}()}var l=function(){function e(){}return e.clientInfo=function(){return p()},e.dimension=function(){return"undefined"==typeof window?(c.warn("No window object available to get browser client info"),{width:320,height:320}):{width:window.innerWidth,height:window.innerHeight}},e}();var h=function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n},f=new s("Hub"),m="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default";var g=new(function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var r=this.patterns.find((function(t){return t.pattern.source===e.source}));if(!r)return void f.warn("No listeners for "+e);this.patterns=d(this.patterns.filter((function(e){return e!==r})))}else{var n=this.listeners[e];if(!n)return void f.warn("No listeners for "+e);this.listeners[e]=d(n.filter((function(e){return e.callback!==t})))}},e.prototype.dispatch=function(e,t,r,n){(void 0===r&&(r=""),this.protectedChannels.indexOf(e)>-1)&&(n===m||f.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var i={channel:e,payload:h({},t),source:r,patternInfo:[]};try{this._toListeners(i)}catch(e){f.error(e)}},e.prototype.listen=function(e,t,r){var n;if(void 0===r&&(r="noname"),function(e){return void 0!==e.onHubCapsule}(t))f.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){f.debug("Dispatching to "+t+" with ",r);try{n.callback(e)}catch(e){f.error(e)}})),this.patterns.length>0){if(!r.message)return void f.warn("Cannot perform pattern matching without a message
1key");var i=r.message;this.patterns.forEach((function(t){var r=i.match(t.pattern);if(r){var n=r.slice(1),o=h(h({},e),{patternInfo:n});try{t.callback(o)}catch(e){f.error(e)}}}))}},e}())("__default__"),y=new s("I18n"),v=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),y.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return void 0!==t?t:e;var r=this._lang,n=this.getByLanguage(e,r);return n||(r.indexOf("-")>0&&(n=this.getByLanguage(e,r.split("-")[0])),n||(void 0!==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}(),b=new s("I18n"),S=null,_=null,w=function(){function e(){}return e.configure=function(t){return b.debug("configure I18n"),t?(S=Object.assign({},S,t.I18n||t),e.createInstance(),S):S},e.getModuleName=function(){return"I18n"},e.createInstance=function(){b.debug("create I18n instance"),_||(_=new v(S))},e.setLanguage=function(t){return e.checkConfig(),_.setLanguage(t)},e.get=function(t,r){return e.checkConfig()?_.get(t,r):void 0===r?t:r},e.putVocabulariesForLanguage=function(t,r){return e.checkConfig(),_.putVocabulariesForLanguage(t,r)},e.putVocabularies=function(t){return e.checkConfig(),_.putVocabularies(t)},e.checkConfig=function(){return _||(_=new v(S)),!0},e}();u.register(w);var C=r(57),A=function(){return(A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},I=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},E=new s("Signer"),T=r(76),x=n.util.crypto,R=function(e,t,r){return x.lib.createHmac("sha256",e).update(t,"utf8").digest(r)},k=function(e){var t=e||"";return x.createHash("sha256").update(t,"utf8").digest("hex")},P=function(e){return Object.keys(e).map((function(e){return e.toLowerCase()})).sort().join(";")},N=function(e){var t,r,n=T.parse(e.url);return[e.method||"/",encodeURIComponent(n.pathname).replace(/%2F/gi,"/"),(r=n.query,r&&0!==r.length?r.split("&").map((function(e){var t=e.split("=");if(1===t.length)return e;var r=t[1].replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}));return t[0]+"="+r})).sort((function(e,t){var r=e.split("=")[0],n=t.split("=")[0];return r===n?e<t?-1:1:r<n?-1:1})).join("&"):""),(t=e.headers,t&&0!==Object.keys(t).length?Object.keys(t).map((function(e){return{key:e.toLowerCase(),value:t[e]?t[e].trim().replace(/\s+/g," "):""}})).sort((function(e,t){return e.key<t.key?-1:1})).map((function(e){return e.key+":"+e.value})).join("\n")+"\n":""),P(e.headers),k(e.data)].join("\n")},U=function(e){var t=(T.parse(e.url).host.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/)||[]).slice(1,3);return"es"===t[1]&&(t=t.reverse()),{service:e.service||t[0],region:e.region||t[1]}},q=function(e,t,r){return[e,t,r,"aws4_request"].join("/")},D=function(e,t,r,n){return[e,r,n,k(t)].join("\n")},O=function(e,t,r){E.debug(r);var n=R("AWS4"+e,t),i=R(n,r.region),o=R(i,r.service);return R(o,"aws4_request")},M=function(e,t){return R(e,t,"hex")},L=function(){function e(){}return e.sign=function(e,t,r){void 0===r&&(r=null),e.headers=e.headers||{};var n=(new Date).toISOString().replace(/[:\-]|\.\d{3}/g,""),i=n.substr(0,8),o=T.parse(e.url);e.headers.host=o.host,e.headers["x-amz-date"]=n,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var s=N(e);E.debug(s);var a=r||U(e),u=q(i,a.region,a.service),c=D("AWS4-HMAC-SHA256",s,n,u),p=O(t.secret_key,i,a),l=M(p,c),h=function(e,t,r,n,i){return[e+" Credential="+t+"/"+r,"SignedHeaders="+n,"Signature="+i].join(", ")}("AWS4-HMAC-SHA256",t.access_key,u,P(e.headers),l);return e.headers.Authorization=h,e},e.signUrl=function(e,t,r,n){var i="object"==typeof e?e.url:e,o="object"==typeof e?e.method:"GET",s="object"==typeof e?e.body:void 0,a=(new Date).toISOString().replace(/[:\-]|\.\d{3}/g,""),u=a.substr(0,8),c=T.parse(i,!0,!0),p=(c.search,I(c,["search"])),l={host:p.host},h=r||U({url:T.format(p)}),d=h.region,f=h.service,m=q(u,d,f),g=t.session_token&&"iotdevicegateway"!==f,y=A(A(A({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":[t.access_key,m].join("/"),"X-Amz-Date":a.substr(0,16)},g?{"X-Amz-Security-Token":""+t.session_token}:{}),n?{"X-Amz-Expires":""+n}:{}),{"X-Amz-SignedHeaders":Object.keys(l).join(",")}),v=N({method:o,url:T.format(A(A({},p),{query:A(A({},p.query),y)})),headers:l,data:s}),b=D("AWS4-HMAC-SHA256",v,a,m),S=O(t.secret_key,u,{region:d,service:f}),_=M(S,b),w=A({"X-Amz-Signature":_},t.session_token&&{"X-Amz-Security-Token":t.session_token});return T.format({protocol:p.protocol,slashes:!0,hostname:p.hostname,port:p.port,pathname:p.pathname,query:A(A(A({},p.query),y),w)})},e}(),j=new s("Parser"),F=function(){function e(){}return e.parseMobilehubConfig=function(e){var t,r={};if(e.aws_mobile_analytics_app_id){var n={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};r.Analytics=n}if(e.aws_cognito_identity_pool_id||e.aws_user_pools_id){var i={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_regi
1on,identityPoolId:e.aws_cognito_identity_pool_id,mandatorySignIn:"enable"===e.aws_mandatory_sign_in};r.Auth=i}return t=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region,dangerouslyConnectToHttpEndpointForTesting:e.aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing}}:e?e.Storage||e:{},r.Analytics=Object.assign({},r.Analytics,e.Analytics),r.Auth=Object.assign({},r.Auth,e.Auth),r.Storage=Object.assign({},t),j.debug("parse config",e,"to amplifyconfig",r),r},e}(),B=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},z=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},V=new s("CognitoCredentials"),H=new Promise((function(e,t){return C.a.browserOrNode().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(V.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(V.debug("not in the browser, directly resolved"),e())})),K=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return B(this,void 0,void 0,(function(){return z(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(V.debug("need to wait for the Google SDK loaded"),[4,H]);case 1:e.sent(),this.initialized=!0,V.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return C.a.browserOrNode().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,r){e.getAuthInstance().then((function(e){e||(console.log("google Auth undefiend"),r("google Auth undefiend"));var n=e.currentUser.get();n.isSignedIn()?(V.debug("refreshing the google access token"),n.reloadAuthResponse().then((function(e){var r=e.id_token,i=e.expires_at,o=n.getBasicProfile();o.getEmail(),o.getName();t({token:r,expires_at:i})}))):r("User is not signed in with Google")})).catch((function(e){V.debug("Failed to refresh google token",e),r("Failed to refresh google token")}))})):(V.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),W=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},G=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},J=new s("CognitoCredentials"),X=new Promise((function(e,t){return C.a.browserOrNode().isBrowser?window.FB?(J.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(J.debug("not in the browser, directly resolved"),e())})),$=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return W(this,void 0,void 0,(function(){return G(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(J.debug("need to wait for the Facebook SDK loaded"),[4,X]);case 1:e.sent(),this.initialized=!0,J.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;return C.a.browserOrNode().isBrowser&&(e=window.FB),e?new Promise((function(t,r){e.getLoginStatus((function(e){e&&e.authResponse||(J.debug("no response from facebook when refreshing the jwt token"),r("no response from facebook when refreshing the jwt token"));var n=e.authResponse,i=n.accessToken,o=1e3*n.expiresIn+(new Date).getTime();
1i||(J.debug("the jwtToken is undefined"),r("the jwtToken is undefined")),t({token:i,expires_at:o})}),{scope:"public_profile,email"})})):(J.debug("no fb sdk available"),Promise.reject("no fb sdk available"))},e}(),Z=new K,Y=new $,Q={},ee=function(){function e(){}return e.setItem=function(e,t){return Q[e]=t,Q[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(Q,e)?Q[e]:void 0},e.removeItem=function(e){return delete Q[e]},e.clear=function(){return Q={}},e}(),te=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=ee}}return e.prototype.getStorage=function(){return this.storageWindow},e}(),re=(C.a.browserOrNode().isBrowser&&(new te).getStorage(),function(){return(re=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}),ne=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},ie=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},oe=new s("Credentials"),se=new(function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.configure(e),this._refreshHandlers.google=Z.refreshGoogleToken,this._refreshHandlers.facebook=Y.refreshFacebookToken}return e.prototype.getCredSource=function(){return this._credentials_source},e.prototype.configure=function(e){if(!e)return this._config||{};this._config=Object.assign({},this._config,e);var t=this._config.refreshHandlers;return t&&(this._refreshHandlers=re(re({},this._refreshHandlers),t)),this._storage=this._config.storage,this._storage||(this._storage=(new te).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return oe.debug("getting credentials"),this._pickupCredentials()},e.prototype._pickupCredentials=function(){return oe.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?oe.debug("getting old cred promise"):(oe.debug("getting new cred promise"),n.config&&n.config.credentials&&n.config.credentials instanceof n.Credentials?this._gettingCredPromise=C.a.makeQuerablePromise(this._setCredentialsFromAWS()):this._gettingCredPromise=C.a.makeQuerablePromise(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){oe.debug("checking if credentials exists and not expired");var e=this._credentials;return e&&!this._isExpired(e)?(oe.debug("credentials not changed and not expired, directly return"),Promise.resolve(e)):(oe.debug("need to get a new credential or refresh the existing one"),u.Auth&&"function"==typeof u.Auth.currentUserCredentials?u.Auth.currentUserCredentials():Promise.reject("No Auth module registered in Amplify"))},e.prototype.refreshFederatedToken=function(e){var t=this;oe.debug("Getting federated credentials");var r=e.provider,n=e.user,i=e.token,o=e.expires_at,s=e.identity_id,a=this;return oe.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(oe.debug("token not expired"),this._setCredentialsFromFederation({provider:r,token:i,user:n,identity_id:s,expires_at:o})):a._refreshHandlers[r]&&"function"==typeof a._refreshHandlers[r]?(oe.debug("getting refreshed jwt token from federation provider"),a._refreshHandlers[r]().then((function(e){return oe.debug("refresh federated token sucessfully",e),i=e.token,s=e.identity_id,o=e.expires_at,a._setCredentialsFromFederation({provider:r,token:i,user:n,identity_id:s,expires_at:o})})).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 ne(this,void 0,void 0,(function(){var e,t,r,i,o,s,a,u=this;return ie(this,(function(c){switch(c.label){case 0:if(e=!1,oe.debug("setting credentials for guest"),t=this._config,r=t.identityPoolId,i=t.regi
1on,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")];o=void 0,c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this._storageSync];case 2:return c.sent(),o=this._storage.getItem("CognitoIdentityId-"+r),[3,4];case 3:return s=c.sent(),oe.debug("Failed to get the cached identityId",s),[3,4];case 4:return a=new n.CognitoIdentityCredentials({IdentityPoolId:r,IdentityId:o||void 0},{region:i}),this,[2,this._loadCredentials(a,"guest",!1,null).then((function(e){return e})).catch((function(t){return ne(u,void 0,void 0,(function(){var s;return ie(this,(function(u){return"ResourceNotFoundException"!==t.code||t.message!=="Identity '"+o+"' not found."||e?[2,t]:(e=!0,oe.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+r),a.clearCachedId(),s=new n.CognitoIdentityCredentials({IdentityPoolId:r,IdentityId:void 0},{region:i}),[2,this._loadCredentials(s,"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,o=(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(!o)return Promise.reject("You must specify a federated provider");var s={};s[o]=r;var a=this._config,u=a.identityPoolId,c=a.region;if(!u)return oe.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var p=new n.CognitoIdentityCredentials({IdentityPoolId:u,IdentityId:i,Logins:s},{region:c});return this._loadCredentials(p,"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,o=r.userPoolId,s=r.identityPoolId;if(!s)return oe.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var a={};a["cognito-idp."+i+".amazonaws.com/"+o]=t;var u=new n.CognitoIdentityCredentials({IdentityPoolId:s,Logins:a},{region:i});return this._loadCredentials(u,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,r,n){var i=this,o=this,s=this._config.identityPoolId;return new Promise((function(a,c){e.get((function(p){return ne(i,void 0,void 0,(function(){var i,l,h,d,f,m;return ie(this,(function(g){switch(g.label){case 0:if(p)return oe.debug("Failed to load credentials",e),c(p),[2];if(oe.debug("Load credentials successfully",e),o._credentials=e,o._credentials.authenticated=r,o._credentials_source=t,"federated"!==t)return[3,3];i=Object.assign({id:this._credentials.identityId},n.user),l=n.provider,h=n.token,d=n.expires_at,f=n.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:l,token:h,user:i,expires_at:d,identity_id:f}))}catch(e){oe.debug("Failed to put federated info into auth storage",e)}return u.Cache&&"function"==typeof u.Cache.setItem?[4,u.Cache.setItem("federatedInfo",{provider:l,token:h,user:i,expires_at:d,identity_id:f},{priority:1})]:[3,2];case 1:return g.sent(),[3,3];case 2:oe.debug("No Cache module registered in Amplify"),g.label=3;case 3:if("guest"!==t)return[3,7];g.label=4;case 4:return g.trys.push([4,6,,7]),[4,this._storageSync];case 5:return g.sent(),this._storage.setItem("CognitoIdentityId-"+s,e.identityId),[3,7];case 6:return m=g.sent(),oe.debug("Failed to cache identityId",m),[3,7];case 7:return a(o._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 ne(this,void 0,void 0,(function(){var e,t,r;return ie(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]}}
1))}))},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}())(null),ae=(function(){function e(){this._logger=new s("ServiceWorker")}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(!C.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<r.length;++i)n[i]=r.charCodeAt(i);return n},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"==typeof e?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",(function(t){var r=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+r),u.Analytics&&"function"==typeof u.Analytics.record&&u.Analytics.record({name:"ServiceWorker",attributes:{state:r}})})),this._serviceWorker.addEventListener("message",(function(t){e._logger.debug("ServiceWorker message event: "+t)}))}}(),r(2108)),ue={userAgent:"aws-amplify/"+ae.version+" js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(ue.product=navigator.product||"",ue.navigator=navigator||null,navigator.product){case"ReactNative":ue.userAgent="aws-amplify/"+ae.version+" react-native",ue.isReactNative=!0;break;default:ue.userAgent="aws-amplify/"+ae.version+" js",ue.isReactNative=!1}var ce=ue,pe={userAgent:ce.userAgent},le=(t.l=u,new s("Core"));n.util?n.util.userAgent=function(){return pe.userAgent}:n.config?n.config.update({customUserAgent:pe.userAgent}):le.warn("No AWS.config")},128:function(e,t,r){var n=r(41),i=r(159).populateHostPrefix;function o(e,t,r,i){var o=[e,t].join("/");o=o.replace(/\/+/g,"/");var s={},a=!1;if(n.each(r.members,(function(e,t){var r=i[e];if(null!=r)if("uri"===t.location){var u=new RegExp("\\{"+t.name+"(\\+)?\\}");o=o.replace(u,(function(e,t){return(t?n.uriEscapePath:n.uriEscape)(String(r))}))}else"querystring"===t.location&&(a=!0,"list"===t.type?s[t.name]=r.map((function(e){return n.uriEscape(t.member.toWireFormat(e).toString())})):"map"===t.type?n.each(r,(function(e,t){Array.isArray(t)?s[e]=t.map((function(e){return n.uriEscape(String(e))})):s[e]=n.uriEscape(String(t))})):s[t.name]=n.uriEscape(t.toWireFormat(r).toString()))})),a){o+=o.indexOf("?")>=0?"&":"?";var u=[];n.arrayEach(Object.keys(s).sort(),(function(e){Array.isArray(s[e])||(s[e]=[s[e]]);for(var t=0;t<s[e].length;t++)u.push(n.uriEscape(String(e))+"="+s[e][t])})),o+=u.join("&")}return o}e.exports={buildRequest:function(e){!function(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod}(e),function(e){var t=e.service.api.operations[e.operation],r=t.input,n=o(e.httpRequest.endpoint.path,t.httpPath,r,e.params);e.httpRequest.path=n}(e),function(e){var t=e.service.api.operations[e.operation];n.each(t.input.members,(function(t,r){var i=e.params[t];null!=i&&("headers"===r.location&&"map"===r.type?n.each(i,(function(t,n){e.httpRequest.headers[r.name+t]=n})):"header"===r.location&&(i=r.toWireFormat(i).toString(),r.isJsonValue&&(i=n.base64.encode(i)),e.httpRequest.headers[r.name]=i))}))}(e),i(e)},extractError:function(){},extractData:function(e){var t=e.request,r={},i=e.httpResponse,o=t.service.api.operations[t.operation].output,s={};n.each(i.headers,(function(e,t){s[e.toLowerCase()]=t})),n.each(o.members,(function(e,t){var o=(t.name||e).toLowerCase();if("headers"===t.location&&"map"===t.type){r[e]={};var a=t.isLocationName?t.name:"",u=new RegExp("^"+a+"(.+)","i");n.each(i.headers,(function(t,n){var i=t.match(u);null!==i&&(r[e][i[1]]=n)}))}else if("header"===t.location){if(void 0!==s[o]){var c=t.isJsonValue?n.base64.decode(s[o]):s[o];r[e]=t.toType(c)}}else"statusCode"===t.location&&(r[e]=parseInt(i.statusCode,10))})),e.data=r},generateURI:o}},129:function(e,t,r){var n=r(25).Buffer;
vendor: 4,693 bytes, line 1
1"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return i.indexOf(Object.prototype.toString.call(e))>-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)}}},130:function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function p(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,s,a;if(c(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=p(e))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function f(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return p(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,p=g(u,c);for(r=0;r<c;++r)o(p[r],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,o,s;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
vendor: 3,564 bytes, line 1
1("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},137:function(e,t,r){var n;e.exports=(n=r(55),function(e){var t=n,r=t.lib,i=r.WordArray,o=r.Hasher,s=t.algo,a=[],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&&(a[i]=r(e.pow(n,.5))),u[i]=r(e.pow(n,1/3)),i++),n++}();var c=[],p=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],p=r[5],l=r[6],h=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var f=c[d-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[d-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=m+c[d-7]+y+c[d-16]}var v=n&i^n&o^i&o,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),S=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&p^~a&l)+u[d]+c[d];h=l,l=p,p=a,a=s+S|0,s=o,o=i,i=n,n=S+(b+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+p|0,r[6]=r[6]+l|0,r[7]=r[7]+h|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=o.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=o._createHelper(p),t.HmacSHA256=o._createHmacHelper(p)}(Math),n.SHA256)},142:function(e,t,r){var n,i,o;e.exports=(o=r(55),i=(n=o).lib.WordArray,n.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],o=0;o<r;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<r;a++)i.push(n.charAt(s>>>6*(3-a)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return function(e,t,r){for(var n=[],o=0,s=0;s<t;s++)if(s%4){var a=r[e.charCodeAt(s-1)]<<s%4*2,u=r[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=(a|u)<<24-o%4*8,o++}return i.create(n,o)}
1(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},155:function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(2041),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(39))},156:function(e,t,r){var n=r(41),i=r(157),o=r(158),s=r(159).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.httpRequest,r=e.service.api,n=r.targetPrefix+"."+r.operations[e.operation].name,o=r.jsonVersion||"1.0",a=r.operations[e.operation].input,u=new i;1===o&&(o="1.0"),t.body=u.build(e.params||{},a),t.headers["Content-Type"]="application/x-amz-json-"+o,t.headers["X-Amz-Target"]=n,s(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 o;e.data=n.parse(t,r)}}}},157:function(e,t,r){var n=r(41);function i(){}function o(e,t){if(t&&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 s=i.isLocationName?i.name:e,a=o(n,i);void 0!==a&&(r[s]=a)}})),r}(e,t);case"map":return function(e,t){var r={};return n.each(e,(function(e,n){var i=o(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=o(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(o(e,t))},e.exports=i},158:function(e,t,r){var n=r(41);function i(){}function o(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 s=o(e[i],n);void 0!==s&&(r[t]=s)}})),r}(e,t);case"map":return function(e,t){if(null==e)return;var r={};return n.each(e,(function(e,n){var i=o(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=o(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 o(JSON.parse(e),t)},e.exports=i},159:function(e,t,r){var n=r(41),i=r(23);e.exports={populateHostPrefix:function(e){if(!e.service.config.hostPrefixEnabled)return e;var t,r,o,s=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(s.endpoint&&s.endpoint.hostPrefix){var a=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 o=new RegExp("\\{"+r+"\\}","g");e=e.replace(o,t[r])}})),e}(s.endpoint.hostPrefix,e.params,s.input);!function(e,t){e.host&&(e.host=t+e.host);e.hostname&&(e.hostname=t+e.hostname)}(e.httpRequest.endpoint,a),t=e.httpRequest.endpoint.hostname,r=t.split("."),o=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/,n.arrayEach(r,(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(!o.test(e))throw i.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})}))}return e}}},160: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;
vendor: 21,860 bytes, lines 1-4
1if(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 o=0;o<e.length;o++)if(!1===n(e[o],i[o]))return!1;return!0}if(!0===r(e)){var s={};for(var a in e)if(hasOwnProperty.call(e,a)){if(!1===n(e[a],i[a]))return!1;s[a]=!0}for(var u in i)if(hasOwnProperty.call(i,u)&&!0!==s[u])return!1;return!0}return!1}function i(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(r(e)){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}return!1}var o;o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var s=0,a=2,u={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},c={"<":!0,">":!0,"=":!0,"!":!0},p={" ":!0,"\t":!0,"\n":!0};function l(e){return e>="0"&&e<="9"||"-"===e}function h(){}h.prototype={tokenize:function(e){var t,r,n,i,o=[];for(this._current=0;this._current<e.length;)if((i=e[this._current])>="a"&&i<="z"||i>="A"&&i<="Z"||"_"===i)t=this._current,r=this._consumeUnquotedIdentifier(e),o.push({type:"UnquotedIdentifier",value:r,start:t});else if(void 0!==u[e[this._current]])o.push({type:u[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(l(e[this._current]))n=this._consumeNumber(e),o.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),o.push(n);else if('"'===e[this._current])t=this._current,r=this._consumeQuotedIdentifier(e),o.push({type:"QuotedIdentifier",value:r,start:t});else if("'"===e[this._current])t=this._current,r=this._consumeRawStringLiteral(e),o.push({type:"Literal",value:r,start:t});else if("`"===e[this._current]){t=this._current;var s=this._consumeLiteral(e);o.push({type:"Literal",value:s,start:t})}else if(void 0!==c[e[this._current]])o.push(this._consumeOperator(e));else if(void 0!==p[e[this._current]])this._current++;else if("&"===e[this._current])t=this._current,this._current++,"&"===e[this._current]?(this._current++,o.push({type:"And",value:"&&",start:t})):o.push({type:"Expref",value:"&",start:t});else{if("|"!==e[this._current]){var a=new Error("Unknown character:"+e[this._current]);throw a.name="LexerError",a}t=this._current,this._current++,"|"===e[this._current]?(this._current++,o.push({type:"Or",value:"||",start:t})):o.push({type:"Pipe",value:"|",start:t})}return o},_consumeUnquotedIdentifier:function(e){var t,r=this._current;for(this._current++;this._current<e.length&&((t=e[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;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&'"'!==e[n+1]?n++:n+=2,this._current=n}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var r=e.length;"'"!==e[this._current]&&this._current<r;){var n=this._current;"\\"!==e[n]||"\\"!==e[n+1]&&"'"!==e[n+1]?n++:n+=2,this._current=n}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var r=e.length;l(e[this._current])&&this._current<r;)this._current++;return{type:"Number",value:parseInt(e.slice(t,this._current)),start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:"Filter",value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:"Flatten",value:"[]",start:t}):{type:"Lbracket",value:"[",start:t}},_consumeOperator:function(e){var t=this._current,r=e[t];return this._current++,"!"===r?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===r?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===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<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}var s=o(e.slice(r,this._current));return s=s.replace("\\`","`"),t=this._looksLikeJSON(s)?JSON.parse(s):JSON.parse('"'+s+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if('[{"'.indexOf(e[0])>=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(e){return!1}}};var d={};function f(){}function m(e){this.runtime=e}function g(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}d.EOF=0,d.UnquotedIdentifier=0,d.QuotedIdentifier=0,d.Rbracket=0,d.Rparen=0,d.Comma=0,d.Rbrace=0,d.Number=0,d.Current=0,d.Expref=0,d.Pipe=1,d.Or=2,d.And=3,d.EQ=5,d.GT=5,d.LT=5,d.GTE=5,d.LTE=5,d.NE=5,d.Flatten=9,d.Star=20,d.Filter=21,d.Dot=40,d.Not=45,d.Lbrace=50,d.Lbracket=55,d.Lparen=60,f.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 h).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<d[n];)this._advance(),r=this.led(n,r),n=this._lookahead(0);return r},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,r;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var n={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return n;case"Not":return{type:"NotExpression",children:[t=this.expression(d.Not)]};case"Star":return t=null,{type:"ValueProjection",children:[{type:"Identity"},t="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(d.Star)]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[{type:"Identity"}]},t=this._parseProjectionRHS(d.Flatten)]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(d.Star)]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return{type:"ExpressionReference",children:[r=this.expression(d.Expref)]};case"Lparen":for(var i=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),i.push(r);return this._match("Rparen"),i[0];default:this._errorToken(e)}},led:function(e,t){var r;switch(e){case"Dot":var n=d.Dot;return"Star"!==this._lookahead(0)?{type:"Subexpression",children:[t,r=this._parseDotRHS(n)]}:(this._advance(),{type:"ValueProjection",children:[t,r=this._parseProjectionRHS(n)]});case"Pipe":return{type:"Pipe",children:[t,r=this.expression(d.Pipe)]};case"Or":return{type:"OrExpression",children:[t,r=this.expression(d.Or)]};case"And":return{type:"AndExpression",children:[t,r=this.expression(d.And)]};case"Lparen":for(var i,o=t.name,s=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(i={type:"Current"},this._advance()):i=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),s.push(i);return this._match("Rparen"),{type:"Function",name:o,children:s};case"Filter":var a=this.expression(0);return this._match("Rbracket"),{type:"FilterProjection",children:[t,r="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(d.Filter),a]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(d.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case"Lbracket":var u=this._lookaheadToken(0);return"Number"===u.type||"Colon"===u.type?(r=this._parseIndexExpression(),this._projectIfSlice(t,r)):(this._match("Star"),this._match("Rbracket"),{type:"Projection",children:[t,r=this._parseProjectionRHS(d.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),r=new Error("Expected "+e+", got: "+t.type);throw r.name="ParserError",r}this._advance()},_errorToken:function(e){var t=new Error("Invalid token ("+e.type+'): "'+e.value+'"');throw t.name="ParserError",t},_parseIndexExpression:function(){if("Colon"===this._lookahead(0)||"Colon"===this._lookahead(1))return this._parseSliceExpression();var e={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match("Rbracket"),e},_projectIfSlice:function(e,t){var r={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[r,this._parseProjectionRHS(d.Star)]}:r},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,r=this._lookahead(0);"Rbracket"!==r&&t<3;){if("Colon"===r)t++,this._advance();else{if("Number"!==r){var n=this._lookahead(0),i=new Error("Syntax error, unexpected token: "+n.value+"("+n.type+")");throw i.name="Parsererror",i}e[t]=this._lookaheadToken(0).value,this._advance()}r=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(d[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return["UnquotedIdentifier","QuotedIdentifier","Star"].indexOf(t)>=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(d[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}}},m.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var s,a,u,c,p,l,h,d,f;switch(e.type){case"Field":return null===o?null:r(o)?void 0===(l=o[e.name])?null:l:null;case"Subexpression":for(u=this.visit(e.children[0],o),f=1;f<e.children.length;f++)if(null===(u=this.visit(e.children[1],u)))return null;return u;case"IndexExpression":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Index":if(!t(o))return null;var m=e.value;return m<0&&(m=o.length+m),void 0===(u=o[m])&&(u=null),u;case"Slice":if(!t(o))return null;var g=e.children.slice(0),y=this.computeSliceParams(o.length,g),v=y[0],b=y[1],S=y[2];if(u=[],S>0)for(f=v;f<b;f+=S)u.push(o[f]);else for(f=v;f>b;f+=S)u.push(o[f]);return u;case"Projection":var _=this.visit(e.children[0],o);if(!t(_))return null;for(d=[],f=0;f<_.length;f++)null!==(a=this.visit(e.children[1],_[f]))&&d.push(a);return d;case"ValueProjection":if(!r(_=this.visit(e.children[0],o)))return null;d=[];var w=function(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}(_);for(f=0;f<w.length;f++)null!==(a=this.visit(e.children[1],w[f]))&&d.push(a);return d;case"FilterProjection":if(!t(_=this.visit(e.children[0],o)))return null;var C=[],A=[];for(f=0;f<_.length;f++)i(s=this.visit(e.children[2],_[f]))||C.push(_[f]);for(var I=0;I<C.length;I++)null!==(a=this.visit(e.children[1],C[I]))&&A.push(a);return A;case"Comparator":switch(c=this.visit(e.children[0],o),p=this.visit(e.children[1],o),e.name){case"EQ":u=n(c,p);break;case"NE":u=!n(c,p);break;case"GT":u=c>p;break;case"GTE":u=c>=p;break;case"LT":u=c<p;break;case"LTE":u=c<=p;break;default:throw new Error("Unknown comparator: "+e.name)}return u;case"Flatten":var E=this.visit(e.children[0],o);if(!t(E))return null;var T=[];for(f=0;f<E.length;f++)t(a=E[f])?T.push.apply(T,a):T.push(a);return T;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(d=[],f=0;f<e.children.length;f++)d.push(this.visit(e.children[f],o));return d;case"MultiSelectHash":if(null===o)return null;var x;for(d={},f=0;f<e.children.length;f++)d[(x=e.children[f]).name]=this.visit(x.value,o);return d;case"OrExpression":return i(s=this.visit(e.children[0],o))&&(s=this.visit(e.children[1],o)),s;case"AndExpression":return!0===i(c=this.visit(e.children[0],o))?c:this.visit(e.children[1],o);case"NotExpression":return i(c=this.visit(e.children[0],o));case"Literal":return e.value;case"Pipe":return h=this.visit(e.children[0],o),this.visit(e.children[1],h);case"Current":return o;case"Function":var R=[];for(f=0;f<e.children.length;f++)R.push(this.visit(e.children[f],o));return this.runtime.callFunction(e.name,R);case"ExpressionReference":var k=e.children[0];return k.jmespathType="Expref",k;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var r=t[0],n=t[1],i=t[2],o=[null,null,null];if(null===i)i=1;else if(0===i){var s=new Error("Invalid slice, step cannot be 0");throw s.name="RuntimeError",s}var a=i<0;return r=null===r?a?e-1:0:this.capSliceRange(e,r,i),n=null===n?a?-1:e:this.capSliceRange(e,n,i),o[0]=r,o[1]=n,o[2]=i,o},capSliceRange:function(e,t,r){return t<0?(t+=e)<0&&(t=r<0?-1:0):t>=e&&(t=r<0?e-1:e),t}},g.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,o,s;if(r[r.length-1].variadic){if(t.length<r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+r.length+n+" but received "+t.length)}else if(t.length!==r.length)throw n=1===r.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+r.length+n+" but received "+t.length);for(var a=0;a<r.length;a++){s=!1,i=r[a].types,o=this._getTypeName(t[a]);for(var u=0;u<i.length;u++)if(this._typeMatches(o,i[u],t[a])){s=!0;break}if(!s)throw new Error("TypeError: "+e+"() expected argument "+(a+1)+" to be type "+i+" but received type "+o+" instead.")}},_typeMatches:function(e,t,r){if(1===t)return!0;if(9!==t&&8!==t&&3!==t)return e===t;if(3===t)return 3===e;if(3===e){var n;8===t?n=s:9===t&&(n=a);for(var i=0;i<r.length;i++)if(!this._typeMatches(this._getTypeName(r[i]),n,r[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return a;case"[object Number]":return s;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?6:4}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],r=e[1];return-1!==t.indexOf(r,t.length-r.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===a){for(var t=e[0],r="",n=t.length-1;n>=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<r.length;n++)t+=r[n];return t/r.length},_functionContains:function(e){return e[0].indexOf(e[1])>=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],o=0;o<i.length;o++)t.push(r.visit(n,i[o]));return t},_functionMerge:function(e){for(var t={},r=0;r<e.length;r++){var n=e[r];for(var i in n)t[i]=n[i]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===s)return Math.max.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)r.localeCompare(t[n])<0&&(r=t[n]);return r}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===s)return Math.min.apply(Math,e[0]);for(var t=e[0],r=t[0],n=1;n<t.length;n++)t[n].localeCompare(r)<0&&(r=t[n]);return r}return null},_functionSum:function(e){for(var t=0,r=e[0],n=0;n<r.length;n++)t+=r[n];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case s:return"number";case a:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],r=Object.keys(t),n=[],i=0;i<r.length;i++)n.push(t[r[i]]);return n},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return 3===this._getTypeName(e[0])?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===a?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,r=this._getTypeName(e[0]);return r===s?e[0]:r!==a||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){var t=e[0].slice(0);return t.sort(),t},_functionSortBy:function(e){var t=e[0].slice(0);if(0===t.length)return t;var r=this._interpreter,n=e[1],i=this._getTypeName(r.visit(n,t[0]));if([s,a].indexOf(i)<0)throw new Error("TypeError");for(var o=this,u=[],c=0;c<t.length;c++)u.push([c,t[c]]);u.sort((function(e,t){var s=r.visit(n,e[1]),a=r.visit(n,t[1]);if(o._getTypeName(s)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(s));if(o._getTypeName(a)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(a));return s>a?1:s<a?-1:e[0]-t[0]}));for(var p=0;p<u.length;p++)t[p]=u[p][1];return t},_functionMaxBy:function(e){for(var t,r,n=e[1],i=e[0],o=this.createKeyFunction(n,[s,a]),u=-1/0,c=0;c<i.length;c++)(r=o(i[c]))>u&&(u=r,t=i[c]);return t},_functionMinBy:function(e){for(var t,r,n=e[1],i=e[0],o=this.createKeyFunction(n,[s,a]),u=1/0,c=0;c<i.length;c++)(r=o(i[c]))<u&&(u=r,t=i[c]);return t},createKeyFunction:function(e,t){var r=this,n=this._interpreter;return function(i){var o=n.visit(e,i);if(t.indexOf(r._getTypeName(o))<0){var s="TypeError: expected one of "+t+", received "+r._getTypeName(o);throw new Error(s)}return o}}},e.tokenize=function(e){return(new h).tokenize(e)},e.compile=function(e){return(new f).parse(e)},e.search=function(e,t){var r=new f,n=new g,i=new m(n);n._interpreter=i;var o=r.parse(t);return i.search(o,e)},e.strictDeepEqual=n}(t)},184: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}},2:function(e,t,r){(function(e,n){var i; 2/** 3 * @license 4 * Lodash <https://lodash.com/>
5 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 6 * Released under MIT license <https://lodash.com/license> 7 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 8 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 9 */(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",c="[object Array]",p="[object Boolean]",l="[object Date]",h="[object Error]",d="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",y="[object Object]",v="[object RegExp]",b="[object Set]",S="[object String]",_="[object Symbol]",w="[object WeakMap]",C="[object ArrayBuffer]",A="[object DataView]",I="[object Float32Array]",E="[object Float64Array]",T="[object Int8Array]",x="[object Int16Array]",R="[object Int32Array]",k="[object Uint8Array]",P="[object Uint16Array]",N="[object Uint32Array]",U=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,O=/&(?:amp|lt|gt|quot|#39);/g,M=/[&<>"']/g,L=RegExp(O.source),j=RegExp(M.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,G=RegExp(W.source),J=/^\s+|\s+$/g,X=/^\s+/,$=/\s+$/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ne=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 6,010 bytes, line 9
97f]/g,pe=/($^)/,le=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",de="\\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",fe="[\\ud800-\\udfff]",me="["+de+"]",ge="["+he+"]",ye="\\d+",ve="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",Se="[^\\ud800-\\udfff"+de+ye+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_e="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Ce="(?:\\ud83c[\\udde6-\\uddff]){2}",Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",Ie="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ee="(?:"+be+"|"+Se+")",Te="(?:"+Ie+"|"+Se+")",xe="(?:"+ge+"|"+_e+")"+"?",Re="[\\ufe0e\\ufe0f]?"+xe+("(?:\\u200d(?:"+[we,Ce,Ae].join("|")+")[\\ufe0e\\ufe0f]?"+xe+")*"),ke="(?:"+[ve,Ce,Ae].join("|")+")"+Re,Pe="(?:"+[we+ge+"?",ge,Ce,Ae,fe].join("|")+")",Ne=RegExp("['â]","g"),Ue=RegExp(ge,"g"),qe=RegExp(_e+"(?="+_e+")|"+Pe+Re,"g"),De=RegExp([Ie+"?"+be+"+(?:['â](?:d|ll|m|re|s|t|ve))?(?="+[me,Ie,"$"].join("|")+")",Te+"+(?:['â](?:D|LL|M|RE|S|T|VE))?(?="+[me,Ie+Ee,"$"].join("|")+")",Ie+"?"+Ee+"+(?:['â](?:d|ll|m|re|s|t|ve))?",Ie+"+(?:['â](?: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_])",ye,ke].join("|"),"g"),Oe=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["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"],je=-1,Fe={};Fe[I]=Fe[E]=Fe[T]=Fe[x]=Fe[R]=Fe[k]=Fe["[object Uint8ClampedArray]"]=Fe[P]=Fe[N]=!0,Fe[u]=Fe[c]=Fe[C]=Fe[p]=Fe[A]=Fe[l]=Fe[h]=Fe[d]=Fe[m]=Fe[g]=Fe[y]=Fe[v]=Fe[b]=Fe[S]=Fe[w]=!1;var Be={};Be[u]=Be[c]=Be[C]=Be[A]=Be[p]=Be[l]=Be[I]=Be[E]=Be[T]=Be[x]=Be[R]=Be[m]=Be[g]=Be[y]=Be[v]=Be[b]=Be[S]=Be[_]=Be[k]=Be["[object Uint8ClampedArray]"]=Be[P]=Be[N]=!0,Be[h]=Be[d]=Be[w]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,He=parseInt,Ke="object"==typeof e&&e&&e.Object===Object&&e,We="object"==typeof self&&self&&self.Object===Object&&self,Ge=Ke||We||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&"object"==typeof n&&n&&!n.nodeType&&n,$e=Xe&&Xe.exports===Je,Ze=$e&&Ke.process,Ye=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}(),Qe=Ye&&Ye.isArrayBuffer,et=Ye&&Ye.isDate,tt=Ye&&Ye.isMap,rt=Ye&&Ye.isRegExp,nt=Ye&&Ye.isSet,it=Ye&&Ye.isTypedArray;function ot(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 st(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function at(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function ut(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function ct(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function lt(e,t){return!!(null==e?0:e.length)&&_t(e,t,0)>-1}function ht(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function dt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function ft(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function mt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function gt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function yt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var vt=It("length");function bt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function St(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function _t(e,t,r){return t==t?function(e,t,r){var n=r-1,i=e.length;for(;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):St(e,Ct,r)}function wt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Ct(e){return e!=e}function At(e,t){var r=null==e?0:e.length;return r?xt(e,t)/r:NaN}function It(e){return function(t){return null==t?void 0:t[e]}}function Et(e){return function(t){return null==e?void 0:e[t]}}function Tt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function xt(e,t){for(var r,n=-1,i=e.length;++n<i;){var o=t(e[n]);void 0!==o&&(r=void 0===r?o:r+o)}return r}function Rt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function kt(e){return function(t){return e(t)}}function Pt(e,t){return dt(t,(function(t){return e[t]}))}function Nt(e,t){return e.has(t)}function Ut(e,t){for(var r=-1,n=e.length;++r<n&&_t(t,e[r],0)>-1;);return r}function qt(e,t){for(var r=e.length;r--&&_t(t,e[r],0)>-1;);return r}function Dt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Ot=Et({"Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã
":"A","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","Ã":"C","ç":"c","Ã":"D","ð":"d","Ã":"E","Ã":"E","Ã":"E","Ã":"E","è":"e","é":"e","ê":"e","ë":"e","Ã":"I","Ã":"I","Ã":"I","Ã":"I","ì":"i","Ã":"i","î":"i","ï":"i","Ã":"N","ñ":"n","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ã":"U","Ã":"U","Ã":"U","Ã":"U","ù":"u","ú":"u","û":"u","ü":"u","Ã":"Y","ý":"y","ÿ":"y","Ã":"Ae","æ":"ae","Ã":"Th","þ":"th","Ã":"ss","Ä":"A","Ä":"A","Ä":"A","Ä":"a","Ä":"a","Ä
":"a","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"
9c","Ä":"c","Ä":"c","Ä":"c","Ä":"D","Ä":"D","Ä":"d","Ä":"d","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"G","Ä":"G","Ä ":"G","Ä¢":"G","Ä":"g","Ä":"g","Ä¡":"g","Ä£":"g","Ĥ":"H","Ħ":"H","Ä¥":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Ä®":"I","İ":"I","Ä©":"i","Ä«":"i","Ä":"i","į":"i","ı":"i","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","ĸ":"k","Ĺ":"L","Ä»":"L","Ľ":"L","Ä¿":"L","Å":"L","ĺ":"l","ļ":"l","ľ":"l","Å":"l","Å":"l","Å":"N","Å
":"N","Å":"N","Å":"N","Å":"n","Å":"n","Å":"n","Å":"n","Å":"O","Å":"O","Å":"O","Å":"o","Å":"o","Å":"o","Å":"R","Å":"R","Å":"R","Å":"r","Å":"r","Å":"r","Å":"S","Å":"S","Å":"S","Å ":"S","Å":"s","Å":"s","Å":"s","Å¡":"s","Å¢":"T","Ť":"T","Ŧ":"T","Å£":"t","Å¥":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Å®":"U","Ű":"U","Ų":"U","Å©":"u","Å«":"u","Å":"u","ů":"u","ű":"u","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","Å»":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Å":"Oe","Å":"oe","Å":"'n","Å¿":"s"}),Mt=Et({"&":"&","<":"<",">":">",'"':""","'":"'"});function Lt(e){return"\\"+ze[e]}function jt(e){return Oe.test(e)}function Ft(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function Bt(e,t){return function(r){return e(t(r))}}function zt(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function Vt(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function Ht(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function Kt(e){return jt(e)?function(e){var t=qe.lastIndex=0;for(;qe.test(e);)++t;return t}(e):vt(e)}function Wt(e){return jt(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.split("")}(e)}var Gt=Et({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Jt=function e(t){var r,n=(t=null==t?Ge:Jt.defaults(Ge.Object(),t,Jt.pick(Ge,Le))).Array,i=t.Date,he=t.Error,de=t.Function,fe=t.Math,me=t.Object,ge=t.RegExp,ye=t.String,ve=t.TypeError,be=n.prototype,Se=de.prototype,_e=me.prototype,we=t["__core-js_shared__"],Ce=Se.toString,Ae=_e.hasOwnProperty,Ie=0,Ee=(r=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Te=_e.toString,xe=Ce.call(me),Re=Ge._,ke=ge("^"+Ce.call(Ae).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=$e?t.Buffer:void 0,qe=t.Symbol,Oe=t.Uint8Array,ze=Pe?Pe.allocUnsafe:void 0,Ke=Bt(me.getPrototypeOf,me),We=me.create,Je=_e.propertyIsEnumerable,Xe=be.splice,Ze=qe?qe.isConcatSpreadable:void 0,Ye=qe?qe.iterator:void 0,vt=qe?qe.toStringTag:void 0,Et=function(){try{var e=Qi(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),Xt=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,$t=i&&i.now!==Ge.Date.now&&i.now,Zt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Yt=fe.ceil,Qt=fe.floor,er=me.getOwnPropertySymbols,tr=Pe?Pe.isBuffer:void 0,rr=t.isFinite,nr=be.join,ir=Bt(me.keys,me),or=fe.max,sr=fe.min,ar=i.now,ur=t.parseInt,cr=fe.random,pr=be.reverse,lr=Qi(t,"DataView"),hr=Qi(t,"Map"),dr=Qi(t,"Promise"),fr=Qi(t,"Set"),mr=Qi(t,"WeakMap"),gr=Qi(me,"create"),yr=mr&&new mr,vr={},br=To(lr),Sr=To(hr),_r=To(dr),wr=To(fr),Cr=To(mr),Ar=qe?qe.prototype:void 0,Ir=Ar?Ar.valueOf:void 0,Er=Ar?Ar.toString:void 0;function Tr(e){if(Hs(e)&&!Us(e)&&!(e instanceof Pr)){if(e instanceof kr)return e;if(Ae.call(e,"__wrapped__"))return xo(e)}return new kr(e)}var xr=function(){function e(){}return function(t){if(!Vs(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Rr(){}function kr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Pr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Nr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ur(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Dr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new qr;++t<r;)this.add(e[t])}function Or(e){var t=this.__data__=new Ur(e);this.size=t.size}function Mr(e,t){var r=Us(e),n=!r&&Ns(e),i=!r&&!n&&Ms(e),o=!r&&!n&&!i&&Ys(e),s=r||n||i||o,a=s?Rt(e.length,ye):[],u=a.length;for(var c in e)!t&&!Ae.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||so(c,u))||a.push(c);return a}function Lr(e){var t=e.length;return t?e[On(0,t-1)]:void 0}function jr(e,t){return Ao(yi(e),Jr(t,0,e.length))}function Fr(e){return Ao(yi(e))}function Br(e,t,r){(void 0!==r&&!Rs(e[t],r)||void 0===r&&!(t in e))&&Wr(e,t,r)}function zr(e,t,r){var n=e[t];Ae.call(e,t)&&Rs(n,r)&&(void 0!==r||t in e)||Wr(e,t,r)}function Vr(e,t){for(var r=e.length;r--;)if(Rs(e[r][0],t))return r;return-1}function Hr(e,t,r,n){return Qr(e,(function(e,i,o){t(n,e,r(e),o)})),n}function Kr(e,t){return e&&vi(t,Sa(t),e)}
vendor: 54,965 bytes, line 9
9function Wr(e,t,r){"__proto__"==t&&Et?Et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Gr(e,t){for(var r=-1,i=t.length,o=n(i),s=null==e;++r<i;)o[r]=s?void 0:ma(e,t[r]);return o}function Jr(e,t,r){return e==e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}function Xr(e,t,r,n,i,o){var s,a=1&t,c=2&t,h=4&t;if(r&&(s=i?r(e,n,i,o):r(e)),void 0!==s)return s;if(!Vs(e))return e;var w=Us(e);if(w){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!a)return yi(e,s)}else{var U=ro(e),q=U==d||U==f;if(Ms(e))return li(e,a);if(U==y||U==u||q&&!i){if(s=c||q?{}:io(e),!a)return c?function(e,t){return vi(e,to(e),t)}(e,function(e,t){return e&&vi(t,_a(t),e)}(s,e)):function(e,t){return vi(e,eo(e),t)}(e,Kr(s,e))}else{if(!Be[U])return i?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case C:return hi(e);case p:case l:return new n(+e);case A:return function(e,t){var r=t?hi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case I:case E:case T:case x:case R:case k:case"[object Uint8ClampedArray]":case P:case N:return di(e,r);case m:return new n;case g:case S:return new n(e);case v:return function(e){var t=new e.constructor(e.source,ne.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new n;case _:return i=e,Ir?me(Ir.call(i)):{}}var i}(e,U,a)}}o||(o=new Or);var D=o.get(e);if(D)return D;o.set(e,s),Xs(e)?e.forEach((function(n){s.add(Xr(n,t,r,n,e,o))})):Ks(e)&&e.forEach((function(n,i){s.set(i,Xr(n,t,r,i,e,o))}));var O=w?void 0:(h?c?Wi:Ki:c?_a:Sa)(e);return at(O||e,(function(n,i){O&&(n=e[i=n]),zr(s,i,Xr(n,t,r,i,e,o))})),s}function $r(e,t,r){var n=r.length;if(null==e)return!n;for(e=me(e);n--;){var i=r[n],o=t[i],s=e[i];if(void 0===s&&!(i in e)||!o(s))return!1}return!0}function Zr(e,t,r){if("function"!=typeof e)throw new ve(o);return So((function(){e.apply(void 0,r)}),t)}function Yr(e,t,r,n){var i=-1,o=lt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=dt(t,kt(r))),n?(o=ht,s=!1):t.length>=200&&(o=Nt,s=!1,t=new Dr(t));e:for(;++i<a;){var p=e[i],l=null==r?p:r(p);if(p=n||0!==p?p:0,s&&l==l){for(var h=c;h--;)if(t[h]===l)continue e;u.push(p)}else o(t,l,n)||u.push(p)}return u}Tr.templateSettings={escape:F,evaluate:B,interpolate:z,variable:"",imports:{_:Tr}},Tr.prototype=Rr.prototype,Tr.prototype.constructor=Tr,kr.prototype=xr(Rr.prototype),kr.prototype.constructor=kr,Pr.prototype=xr(Rr.prototype),Pr.prototype.constructor=Pr,Nr.prototype.clear=function(){this.__data__=gr?gr(null):{},this.size=0},Nr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nr.prototype.get=function(e){var t=this.__data__;if(gr){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Ae.call(t,e)?t[e]:void 0},Nr.prototype.has=function(e){var t=this.__data__;return gr?void 0!==t[e]:Ae.call(t,e)},Nr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=gr&&void 0===t?"__lodash_hash_undefined__":t,this},Ur.prototype.clear=function(){this.__data__=[],this.size=0},Ur.prototype.delete=function(e){var t=this.__data__,r=Vr(t,e);return!(r<0)&&(r==t.length-1?t.pop():Xe.call(t,r,1),--this.size,!0)},Ur.prototype.get=function(e){var t=this.__data__,r=Vr(t,e);return r<0?void 0:t[r][1]},Ur.prototype.has=function(e){return Vr(this.__data__,e)>-1},Ur.prototype.set=function(e,t){var r=this.__data__,n=Vr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Nr,map:new(hr||Ur),string:new Nr}},qr.prototype.delete=function(e){var t=Zi(this,e).delete(e);return this.size-=t?1:0,t},qr.prototype.get=function(e){return Zi(this,e).get(e)},qr.prototype.has=function(e){return Zi(this,e).has(e)},qr.prototype.set=function(e,t){var r=Zi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Dr.prototype.add=Dr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Dr.prototype.has=function(e){return this.__data__.has(e)},Or.prototype.clear=function(){this.__data__=new Ur,this.size=0},Or.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Or.prototype.get=function(e){return this.__data__.get(e)},Or.prototype.has=function(e){return this.__data__.has(e)},Or.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Ur){var n=r.__data__;if(!hr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new qr(n)}return r.set(e,t),this.size=r.size,this};var Qr=_i(un),en=_i(cn,!0);function tn(e,t){var r=!0;return Qr(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function rn(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],s=t(o);if(null!=s&&(void 0===a?s==s&&!Zs(s):r(s,a)))var a=s,u=o}return u}function nn(e,t){var r=[];return Qr(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function on(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=oo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?on(a,t-1,r,n,i):ft(i,a):n||(i[i.length]=a)}return i}var sn=wi(),an=wi(!0);function un(e,t){return e&&sn(e,t,Sa)}function cn(e,t){return e&&an(e,t,Sa)}function pn(e,t){return pt(t,(function(t){return Fs(e[t])}))}function ln(e,t){for(var r=0,n=(t=ai(t,e)).length;null!=e&&r<n;)e=e[Eo(t[r++])];return r&&r==n?e:void 0}function hn(e,t,r){var n=t(e);return Us(e)?n:ft(n,r(e))}function dn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":vt&&vt in me(e)?function(e){var t=Ae.call(e,vt),r=e[vt];try{e[vt]=void 0;var n=!0}catch(e){}var i=Te.call(e);n&&(t?e[vt]=r:delete e[vt]);return i}(e):function(e){return Te.call(e)}(e)}function fn(e,t){return e>t}function mn(e,t){return null!=e&&Ae.call(e,t)}function gn(e,t){return null!=e&&t in me(e)}function yn(e,t,r){for(var i=r?ht:lt,o=e[0].length,s=e.length,a=s,u=n(s),c=1/0,p=[];a--;){var l=e[a];a&&t&&(l=dt(l,kt(t))),c=sr(l.length,c),u[a]=!r&&(t||o>=120&&l.length>=120)?new Dr(a&&l):void 0}l=e[0];var h=-1,d=u[0];e:for(;++h<o&&p.length<c;){var f=l[h],m=t?t(f):f;if(f=r||0!==f?f:0,!(d?Nt(d,m):i(p,m,r))){for(a=s;--a;){var g=u[a];if(!(g?Nt(g,m):i(e[a],m,r)))continue e}d&&d.push(m),p.push(f)}}return p}function vn(e,t,r){var n=null==(e=go(e,t=ai(t,e)))?e:e[Eo(jo(t))];return null==n?void 0:ot(n,e,r)}function bn(e){return Hs(e)&&dn(e)==u}function Sn(e,t,r,n,i){return e===t||(null==e||null==t||!Hs(e)&&!Hs(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var s=Us(e),a=Us(t),d=s?c:ro(e),f=a?c:ro(t),w=(d=d==u?y:d)==y,I=(f=f==u?y:f)==y,E=d==f;if(E&&Ms(e)){if(!Ms(t))return!1;s=!0,w=!1}if(E&&!w)return o||(o=new Or),s||Ys(e)?Vi(e,t,r,n,i,o):function(e,t,r,n,i,o,s){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!o(new Oe(e),new Oe(t)));case p:case l:case g:return Rs(+e,+t);case h:return e.name==t.name&&e.message==t.message;case v:case S:return e==t+"";case m:var a=Ft;case b:var u=1&n;if(a||(a=Vt),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var d=Vi(a(e),a(t),n,i,o,s);return s.delete(e),d;case _:if(Ir)return Ir.call(e)==Ir.call(t)}return!1}(e,t,d,r,n,i,o);if(!(1&r)){var T=w&&Ae.call(e,"__wrapped__"),x=I&&Ae.call(t,"__wrapped__");if(T||x){var R=T?e.value():e,k=x?t.value():t;return o||(o=new Or),i(R,k,r,n,o)}}if(!E)return!1;return o||(o=new Or),function(e,t,r,n,i,o){var s=1&r,a=Ki(e),u=a.length,c=Ki(t).length;if(u!=c&&!s)return!1;var p=u;for(;p--;){var l=a[p];if(!(s?l in t:Ae.call(t,l)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var d=!0;o.set(e,t),o.set(t,e);var f=s;for(;++p<u;){l=a[p];var m=e[l],g=t[l];if(n)var y=s?n(g,m,l,t,e,o):n(m,g,l,e,t,o);if(!(void 0===y?m===g||i(m,g,r,n,o):y)){d=!1;break}f||(f="constructor"==l)}if(d&&!f){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,r,n,i,o)}(e,t,r,n,Sn,i))}function _n(e,t,r,n){var i=r.length,o=i,s=!n;if(null==e)return!o;for(e=me(e);i--;){var a=r[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var u=(a=r[i])[0],c=e[u],p=a[1];if(s&&a[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Or;if(n)var h=n(c,p,u,e,t,l);if(!(void 0===h?Sn(p,c,3,n,l):h))return!1}}return!0}function wn(e){return!(!Vs(e)||(t=e,Ee&&Ee in t))&&(Fs(e)?ke:se).test(To(e));var t}function Cn(e){return"function"==typeof e?e:null==e?Wa:"object"==typeof e?Us(e)?Rn(e[0],e[1]):xn(e):tu(e)}function An(e){if(!lo(e))return ir(e);var t=[];for(var r in me(e))Ae.call(e,r)&&"constructor"!=r&&t.push(r);return t}function In(e){if(!Vs(e))return function(e){var t=[];if(null!=e)for(var r in me(e))t.push(r);return t}(e);var t=lo(e),r=[];for(var n in e)("constructor"!=n||!t&&Ae.call(e,n))&&r.push(n);return r}function En(e,t){return e<t}function Tn(e,t){var r=-1,i=Ds(e)?n(e.length):[];return Qr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function xn(e){var t=Yi(e);return 1==t.length&&t[0][2]?fo(t[0][0],t[0][1]):function(r){return r===e||_n(r,e,t)}}function Rn(e,t){return uo(e)&&ho(t)?fo(Eo(e),t):function(r){var n=ma(r,e);return void 0===n&&n===t?ga(r,e):Sn(t,n,3)}}function kn(e,t,r,n,i){e!==t&&sn(t,(function(o,s){if(i||(i=new Or),Vs(o))!function(e,t,r,n,i,o,s){var a=vo(e,r),u=vo(t,r),c=s.get(u);if(c)return void Br(e,r,c);var p=o?o(a,u,r+"",e,t,s):void 0,l=void 0===p;if(l){var h=Us(u),d=!h&&Ms(u),f=!h&&!d&&Ys(u);p=u,h||d||f?Us(a)?p=a:Os(a)?p=yi(a):d?(l=!1,p=li(u,!0)):f?(l=!1,p=di(u,!0)):p=[]:Gs(u)||Ns(u)?(p=a,Ns(a)?p=sa(a):Vs(a)&&!Fs(a)||(p=io(u))):l=!1}l&&(s.set(u,p),i(p,u,n,o,s),s.delete(u));Br(e,r,p)}(e,t,s,r,kn,n,i);else{var a=n?n(vo(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Br(e,s,a)}}),_a)}function Pn(e,t){var r=e.length;if(r)return so(t+=t<0?r:0,r)?e[t]:void 0}function Nn(e,t,r){var n=-1;return t=dt(t.length?t:[Wa],kt($i())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(Tn(e,(function(e,r,i){return{criteria:dt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;for(;++n<s;){var u=fi(i[n],o[n]);if(u){if(n>=a)return u;var c=r[n];return u*("desc"==c?-1:1)}}return e.index-t.index}(e,t,r)}))}function Un(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=ln(e,s);r(a,s)&&Bn(o,ai(s,e),a)}return o}function qn(e,t,r,n){var i=n?wt:_t,o=-1,s=t.length,a=e;for(e===t&&(t=yi(t)),r&&(a=dt(e,kt(r)));++o<s;)for(var u=0,c=t[o],p=r?r(c):c;(u=i(a,p,u,n))>-1;)a!==e&&Xe.call(a,u,1),Xe.call(e,u,1);return e}function Dn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;so(i)?Xe.call(e,i,1):Qn(e,i)}}return e}function On(e,t){return e+Qt(cr()*(t-e+1))}function Mn(e,t){var r="";if(!e||t<1||t>9007199254740991)return r;do{t%2&&(r+=e),(t=Qt(t/2))&&(e+=e)}while(t);return r}function Ln(e,t){return _o(mo(e,t,Wa),e+"")}function jn(e){return Lr(Ra(e))}function Fn(e,t){var r=Ra(e);return Ao(r,Jr(t,0,r.length))}function Bn(e,t,r,n){if(!Vs(e))return e;for(var i=-1,o=(t=ai(t,e)).length,s=o-1,a=e;null!=a&&++i<o;){var u=Eo(t[i]),c=r;if(i!=s){var p=a[u];void 0===(c=n?n(p,u,a):void 0)&&(c=Vs(p)?p:so(t[i+1])?[]:{})}zr(a,u,c),a=a[u]}return e}var zn=yr?function(e,t){return yr.set(e,t),e}:Wa,Vn=Et?function(e,t){return Et(e,"toString",{configurable:!0,enumerable:!1,value:Va(t),writable:!0})}:Wa;function Hn(e){return Ao(Ra(e))}function Kn(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function Wn(e,t){var r;return Qr(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function Gn(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!Zs(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return Jn(e,t,Wa,r)}function Jn(e,t,r,n){t=r(t);for(var i=0,o=null==e?0:e.length,s=t!=t,a=null===t,u=Zs(t),c=void 0===t;i<o;){var p=Qt((i+o)/2),l=r(e[p]),h=void 0!==l,d=null===l,f=l==l,m=Zs(l);if(s)var g=n||f;else g=c?f&&(n||h):a?f&&h&&(n||!d):u?f&&h&&!d&&(n||!m):!d&&!m&&(n?l<=t:l<t);g?i=p+1:o=p}return sr(o,4294967294)}function Xn(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Rs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function $n(e){return"number"==typeof e?e:Zs(e)?NaN:+e}function Zn(e){if("string"==typeof e)return e;if(Us(e))return dt(e,Zn)+"";if(Zs(e))return Er?Er.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Yn(e,t,r){var n=-1,i=lt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=ht;else if(o>=200){var c=t?null:Mi(e);if(c)return Vt(c);s=!1,i=Nt,u=new Dr}else u=t?[]:a;e:for(;++n<o;){var p=e[n],l=t?t(p):p;if(p=r||0!==p?p:0,s&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue e;t&&u.push(l),a.push(p)}else i(u,l,r)||(u!==a&&u.push(l),a.push(p))}return a}function Qn(e,t){return null==(e=go(e,t=ai(t,e)))||delete e[Eo(jo(t))]}function ei(e,t,r,n){return Bn(e,t,r(ln(e,t)),n)}function ti(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?Kn(e,n?0:o,n?o+1:i):Kn(e,n?o+1:0,n?i:o)}function ri(e,t){var r=e;return r instanceof Pr&&(r=r.value()),mt(t,(function(e,t){return t.func.apply(t.thisArg,ft([e],t.args))}),r)}function ni(e,t,r){var i=e.length;if(i<2)return i?Yn(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=Yr(s[o]||a,e[u],t,r));return Yn(on(s,1),t,r)}function ii(e,t,r){for(var n=-1,i=e.length,o=t.length,s={};++n<i;){var a=n<o?t[n]:void 0;r(s,e[n],a)}return s}function oi(e){return Os(e)?e:[]}function si(e){return"function"==typeof e?e:Wa}function ai(e,t){return Us(e)?e:uo(e,t)?[e]:Io(aa(e))}var ui=Ln;function ci(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Kn(e,t,r)}var pi=Xt||function(e){return Ge.clearTimeout(e)};function li(e,t){if(t)return e.slice();var r=e.length,n=ze?ze(r):new e.constructor(r);return e.copy(n),n}function hi(e){var t=new e.constructor(e.byteLength);return new Oe(t).set(new Oe(e)),t}function di(e,t){var r=t?hi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function fi(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,o=Zs(e),s=void 0!==t,a=null===t,u=t==t,c=Zs(t);if(!a&&!c&&!o&&e>t||o&&s&&u&&!a&&!c||n&&s&&u||!r&&u||!i)return 1;if(!n&&!o&&!c&&e<t||c&&r&&i&&!n&&!o||a&&r&&i||!s&&i||!u)return-1}return 0}function mi(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,p=or(s-a,0),l=n(c+p),h=!i;++u<c;)l[u]=t[u];for(;++o<a;)(h||o<s)&&(l[r[o]]=e[o]);for(;p--;)l[u++]=e[o++];return l}function gi(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,p=t.length,l=or(s-u,0),h=n(l+p),d=!i;++o<l;)h[o]=e[o];for(var f=o;++c<p;)h[f+c]=t[c];for(;++a<u;)(d||o<s)&&(h[f+r[a]]=e[o++]);return h}function yi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function vi(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=n?n(r[a],e[a],a,r,e):void 0;void 0===u&&(u=e[a]),i?Wr(r,a,u):zr(r,a,u)}return r}function bi(e,t){return function(r,n){var i=Us(r)?st:Hr,o=t?t():{};return i(r,e,$i(n,2),o)}}function Si(e){return Ln((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&ao(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=me(t);++n<i;){var a=r[n];a&&e(t,a,n,o)}return t}))}function _i(e,t){return function(r,n){if(null==r)return r;if(!Ds(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=me(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function wi(e){return function(t,r,n){for(var i=-1,o=me(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ci(e){return function(t){var r=jt(t=aa(t))?Wt(t):void 0,n=r?r[0]:t.charAt(0),i=r?ci(r,1).join(""):t.slice(1);return n[e]()+i}}function Ai(e){return function(t){return mt(Fa(Na(t).replace(Ne,"")),e,"")}}function Ii(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=xr(e.prototype),n=e.apply(r,t);return Vs(n)?n:r}}function Ei(e){return function(t,r,n){var i=me(t);if(!Ds(t)){var o=$i(r,3);t=Sa(t),r=function(e){return o(i[e],e,i)}}var s=e(t,r,n);return s>-1?i[o?t[s]:s]:void 0}}function Ti(e){return Hi((function(t){var r=t.length,n=r,i=kr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new ve(o);if(i&&!a&&"wrapper"==Ji(s))var a=new kr([],!0)}for(n=a?n:r;++n<r;){var u=Ji(s=t[n]),c="wrapper"==u?Gi(s):void 0;a=c&&co(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Ji(c[0])].apply(a,c[3]):1==s.length&&co(s)?a[u]():a.thru(s)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Us(n))return a.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function xi(e,t,r,i,o,s,a,u,c,p){var l=128&t,h=1&t,d=2&t,f=24&t,m=512&t,g=d?void 0:Ii(e);return function y(){for(var v=arguments.length,b=n(v),S=v;S--;)b[S]=arguments[S];if(f)var _=Xi(y),w=Dt(b,_);if(i&&(b=mi(b,i,o,f)),s&&(b=gi(b,s,a,f)),v-=w,f&&v<p){var C=zt(b,_);return Di(e,t,xi,y.placeholder,r,b,C,u,c,p-v)}var A=h?r:this,I=d?A[e]:e;return v=b.length,u?b=yo(b,u):m&&v>1&&b.reverse(),l&&c<v&&(b.length=c),this&&this!==Ge&&this instanceof y&&(I=g||Ii(I)),I.apply(A,b)}}function Ri(e,t){return function(r,n){return function(e,t,r,n){return un(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function ki(e,t){return function(r,n){var i;if(void 0===r&&void 0===n)return t;if(void 0!==r&&(i=r),void 0!==n){if(void 0===i)return n;"string"==typeof r||"string"==typeof n?(r=Zn(r),n=Zn(n)):(r=$n(r),n=$n(n)),i=e(r,n)}return i}}function Pi(e){return Hi((function(t){return t=dt(t,kt($i())),Ln((function(r){var n=this;return e(t,(function(e){return ot(e,n,r)}))}))}))}function Ni(e,t){var r=(t=void 0===t?" ":Zn(t)).length;if(r<2)return r?Mn(t,e):t;var n=Mn(t,Yt(e/Kt(t)));return jt(t)?ci(Wt(n),0,e).join(""):n.slice(0,e)}function Ui(e){return function(t,r,i){return i&&"number"!=typeof i&&ao(t,r,i)&&(r=i=void 0),t=ra(t),void 0===r?(r=t,t=0):r=ra(r),function(e,t,r,i){for(var o=-1,s=or(Yt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,i=void 0===i?t<r?1:-1:ra(i),e)}}function qi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=oa(t),r=oa(r)),e(t,r)}}function Di(e,t,r,n,i,o,s,a,u,c){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var l=[e,t,i,p?o:void 0,p?s:void 0,p?void 0:o,p?void 0:s,a,u,c],h=r.apply(void 0,l);return co(e)&&bo(h,l),h.placeholder=n,wo(h,e,t)}function Oi(e){var t=fe[e];return function(e,r){if(e=oa(e),(r=null==r?0:sr(na(r),292))&&rr(e)){var n=(aa(e)+"e").split("e");return+((n=(aa(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Mi=fr&&1/Vt(new fr([,-0]))[1]==1/0?function(e){return new fr(e)}:Za;function Li(e){return function(t){var r=ro(t);return r==m?Ft(t):r==b?Ht(t):function(e,t){return dt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function ji(e,t,r,i,a,u,c,p){var l=2&t;if(!l&&"function"!=typeof e)throw new ve(o);var h=i?i.length:0;if(h||(t&=-97,i=a=void 0),c=void 0===c?c:or(na(c),0),p=void 0===p?p:na(p),h-=a?a.length:0,64&t){var d=i,f=a;i=a=void 0}var m=l?void 0:Gi(e),g=[e,t,r,i,a,d,f,u,c,p];if(m&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=128==n&&8==r||128==n&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?mi(c,u,t[4]):u,e[4]=c?zt(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?gi(c,u,t[6]):u,e[6]=c?zt(e[5],s):t[6]);(u=t[7])&&(e[7]=u);128&n&&(e[8]=null==e[8]?t[8]:sr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(g,m),e=g[0],t=g[1],r=g[2],i=g[3],a=g[4],!(p=g[9]=void 0===g[9]?l?0:e.length:or(g[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)y=8==t||16==t?function(e,t,r){var i=Ii(e);return function o(){for(var s=arguments.length,a=n(s),u=s,c=Xi(o);u--;)a[u]=arguments[u];var p=s<3&&a[0]!==c&&a[s-1]!==c?[]:zt(a,c);if((s-=p.length)<r)return Di(e,t,xi,o.placeholder,void 0,a,p,void 0,void 0,r-s);var l=this&&this!==Ge&&this instanceof o?i:e;return ot(l,this,a)}}(e,t,p):32!=t&&33!=t||a.length?xi.apply(void 0,g):function(e,t,r,i){var o=1&t,s=Ii(e);return function t(){for(var a=-1,u=arguments.length,c=-1,p=i.length,l=n(p+u),h=this&&this!==Ge&&this instanceof t?s:e;++c<p;)l[c]=i[c];for(;u--;)l[c++]=arguments[++a];return ot(h,o?r:this,l)}}(e,t,r,i);else var y=function(e,t,r){var n=1&t,i=Ii(e);return function t(){var o=this&&this!==Ge&&this instanceof t?i:e;return o.apply(n?r:this,arguments)}}(e,t,r);return wo((m?zn:bo)(y,g),e,t)}function Fi(e,t,r,n){return void 0===e||Rs(e,_e[r])&&!Ae.call(n,r)?t:e}function Bi(e,t,r,n,i,o){return Vs(e)&&Vs(t)&&(o.set(t,e),kn(e,t,void 0,Bi,o),o.delete(t)),e}function zi(e){return Gs(e)?void 0:e}function Vi(e,t,r,n,i,o){var s=1&r,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var p=-1,l=!0,h=2&r?new Dr:void 0;for(o.set(e,t),o.set(t,e);++p<a;){var d=e[p],f=t[p];if(n)var m=s?n(f,d,p,t,e,o):n(d,f,p,e,t,o);if(void 0!==m){if(m)continue;l=!1;break}if(h){if(!yt(t,(function(e,t){if(!Nt(h,t)&&(d===e||i(d,e,r,n,o)))return h.push(t)}))){l=!1;break}}else if(d!==f&&!i(d,f,r,n,o)){l=!1;break}}return o.delete(e),o.delete(t),l}function Hi(e){return _o(mo(e,void 0,qo),e+"")}function Ki(e){return hn(e,Sa,eo)}function Wi(e){return hn(e,_a,to)}var Gi=yr?function(e){return yr.get(e)}:Za;function Ji(e){for(var t=e.name+"",r=vr[t],n=Ae.call(vr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Ae.call(Tr,"placeholder")?Tr:e).placeholder}function $i(){var e=Tr.iteratee||Ga;return e=e===Ga?Cn:e,arguments.length?e(arguments[0],arguments[1]):e}function Zi(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function Yi(e){for(var t=Sa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ho(i)]}return t}function Qi(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return wn(r)?r:void 0}var eo=er?function(e){return null==e?[]:(e=me(e),pt(er(e),(function(t){return Je.call(e,t)})))}:iu,to=er?function(e){for(var t=[];e;)ft(t,eo(e)),e=Ke(e);return t}:iu,ro=dn;function no(e,t,r){for(var n=-1,i=(t=ai(t,e)).length,o=!1;++n<i;){var s=Eo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&zs(i)&&so(s,i)&&(Us(e)||Ns(e))}function io(e){return"function"!=typeof e.constructor||lo(e)?{}:xr(Ke(e))}function oo(e){return Us(e)||Ns(e)||!!(Ze&&e&&e[Ze])}function so(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ue.test(e))&&e>-1&&e%1==0&&e<t}function ao(e,t,r){if(!Vs(r))return!1;var n=typeof t;return!!("number"==n?Ds(r)&&so(t,r.length):"string"==n&&t in r)&&Rs(r[t],e)}function uo(e,t){if(Us(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Zs(e))||(H.test(e)||!V.test(e)||null!=t&&e in me(t))}function co(e){var t=Ji(e),r=Tr[t];if("function"!=typeof r||!(t in Pr.prototype))return!1;if(e===r)return!0;var n=Gi(r);return!!n&&e===n[0]}(lr&&ro(new lr(new ArrayBuffer(1)))!=A||hr&&ro(new hr)!=m||dr&&"[object Promise]"!=ro(dr.resolve())||fr&&ro(new fr)!=b||mr&&ro(new mr)!=w)&&(ro=function(e){var t=dn(e),r=t==y?e.constructor:void 0,n=r?To(r):"";if(n)switch(n){case br:return A;case Sr:return m;case _r:return"[object Promise]";case wr:return b;case Cr:return w}return t});var po=we?Fs:ou;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function ho(e){return e==e&&!Vs(e)}function fo(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in me(r)))}}function mo(e,t,r){return t=or(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=or(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),ot(e,this,u)}}function go(e,t){return t.length<2?e:ln(e,Kn(t,0,-1))}function yo(e,t){for(var r=e.length,n=sr(t.length,r),i=yi(e);n--;){var o=t[n];e[n]=so(o,r)?i[o]:void 0}return e}function vo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bo=Co(zn),So=Zt||function(e,t){return Ge.setTimeout(e,t)},_o=Co(Vn);function wo(e,t,r){var n=t+"";return _o(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(Z,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return at(a,(function(r){var n="_."+r[0];t&r[1]&&!lt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Y);return t?t[1].split(Q):[]}(n),r)))}function Co(e){var t=0,r=0;return function(){var n=ar(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ao(e,t){var r=-1,n=e.length,i=n-1;for(t=void 0===t?n:t;++r<t;){var o=On(r,i),s=e[o];e[o]=e[r],e[r]=s}return e.length=t,e}var Io=function(e){var t=Cs(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(K,(function(e,r,n,i){t.push(n?i.replace(te,"$1"):r||e)})),t}));function Eo(e){if("string"==typeof e||Zs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function To(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function xo(e){if(e instanceof Pr)return e.clone();var t=new kr(e.__wrapped__,e.__chain__);return t.__actions__=yi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ro=Ln((function(e,t){return Os(e)?Yr(e,on(t,1,Os,!0)):[]})),ko=Ln((function(e,t){var r=jo(t);return Os(r)&&(r=void 0),Os(e)?Yr(e,on(t,1,Os,!0),$i(r,2)):[]})),Po=Ln((function(e,t){var r=jo(t);return Os(r)&&(r=void 0),Os(e)?Yr(e,on(t,1,Os,!0),void 0,r):[]}));function No(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:na(r);return i<0&&(i=or(n+i,0)),St(e,$i(t,3),i)}function Uo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return void 0!==r&&(i=na(r),i=r<0?or(n+i,0):sr(i,n-1)),St(e,$i(t,3),i,!0)}function qo(e){return(null==e?0:e.length)?on(e,1):[]}function Do(e){return e&&e.length?e[0]:void 0}var Oo=Ln((function(e){var t=dt(e,oi);return t.length&&t[0]===e[0]?yn(t):[]})),Mo=Ln((function(e){var t=jo(e),r=dt(e,oi);return t===jo(r)?t=void 0:r.pop(),r.length&&r[0]===e[0]?yn(r,$i(t,2)):[]})),Lo=Ln((function(e){var t=jo(e),r=dt(e,oi);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?yn(r,void 0,t):[]}));function jo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Fo=Ln(Bo);function Bo(e,t){return e&&e.length&&t&&t.length?qn(e,t):e}var zo=Hi((function(e,t){var r=null==e?0:e.length,n=Gr(e,t);return Dn(e,dt(t,(function(e){return so(e,r)?+e:e})).sort(fi)),n}));function Vo(e){return null==e?e:pr.call(e)}var Ho=Ln((function(e){return Yn(on(e,1,Os,!0))})),Ko=Ln((function(e){var t=jo(e);return Os(t)&&(t=void 0),Yn(on(e,1,Os,!0),$i(t,2))})),Wo=Ln((function(e){var t=jo(e);return t="function"==typeof t?t:void 0,Yn(on(e,1,Os,!0),void 0,t)}));function Go(e){if(!e||!e.length)return[];var t=0;return e=pt(e,(function(e){if(Os(e))return t=or(e.length,t),!0})),Rt(t,(function(t){return dt(e,It(t))}))}function Jo(e,t){if(!e||!e.length)return[];var r=Go(e);return null==t?r:dt(r,(function(e){return ot(t,void 0,e)}))}var Xo=Ln((function(e,t){return Os(e)?Yr(e,t):[]})),$o=Ln((function(e){return ni(pt(e,Os))})),Zo=Ln((function(e){var t=jo(e);return Os(t)&&(t=void 0),ni(pt(e,Os),$i(t,2))})),Yo=Ln((function(e){var t=jo(e);return t="function"==typeof t?t:void 0,ni(pt(e,Os),void 0,t)})),Qo=Ln(Go);var es=Ln((function(e){var t=e.length,r=t>1?e[t-1]:void 0;return r="function"==typeof r?(e.pop(),r):void 0,Jo(e,r)}));function ts(e){var t=Tr(e);return t.__chain__=!0,t}function rs(e,t){return t(e)}var ns=Hi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return Gr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Pr&&so(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:rs,args:[i],thisArg:void 0}),new kr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var is=bi((function(e,t,r){Ae.call(e,r)?++e[r]:Wr(e,r,1)}));var os=Ei(No),ss=Ei(Uo);function as(e,t){return(Us(e)?at:Qr)(e,$i(t,3))}function us(e,t){return(Us(e)?ut:en)(e,$i(t,3))}var cs=bi((function(e,t,r){Ae.call(e,r)?e[r].push(t):Wr(e,r,[t])}));var ps=Ln((function(e,t,r){var i=-1,o="function"==typeof t,s=Ds(e)?n(e.length):[];return Qr(e,(function(e){s[++i]=o?ot(t,e,r):vn(e,t,r)})),s})),ls=bi((function(e,t,r){Wr(e,r,t)}));function hs(e,t){return(Us(e)?dt:Tn)(e,$i(t,3))}var ds=bi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var fs=Ln((function(e,t){if(null==e)return[];var r=t.length;return r>1&&ao(e,t[0],t[1])?t=[]:r>2&&ao(t[0],t[1],t[2])&&(t=[t[0]]),Nn(e,on(t,1),[])})),ms=$t||function(){return Ge.Date.now()};function gs(e,t,r){return t=r?void 0:t,ji(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ys(e,t){var r;if("function"!=typeof t)throw new ve(o);return e=na(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}var vs=Ln((function(e,t,r){var n=1;if(r.length){var i=zt(r,Xi(vs));n|=32}return ji(e,n,t,r,i)})),bs=Ln((function(e,t,r){var n=3;if(r.length){var i=zt(r,Xi(bs));n|=32}return ji(t,n,e,r,i)}));function Ss(e,t,r){var n,i,s,a,u,c,p=0,l=!1,h=!1,d=!0;if("function"!=typeof e)throw new ve(o);function f(t){var r=n,o=i;return n=i=void 0,p=t,a=e.apply(o,r)}function m(e){return p=e,u=So(y,t),l?f(e):a}function g(e){var r=e-c;return void 0===c||r>=t||r<0||h&&e-p>=s}function y(){var e=ms();if(g(e))return v(e);u=So(y,function(e){var r=t-(e-c);return h?sr(r,s-(e-p)):r}(e))}function v(e){return u=void 0,d&&n?f(e):(n=i=void 0,a)}function b(){var e=ms(),r=g(e);if(n=arguments,i=this,c=e,r){if(void 0===u)return m(c);if(h)return pi(u),u=So(y,t),f(c)}return void 0===u&&(u=So(y,t)),a}return t=oa(t)||0,Vs(r)&&(l=!!r.leading,s=(h="maxWait"in r)?or(oa(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d),b.cancel=function(){void 0!==u&&pi(u),p=0,n=c=i=u=void 0},b.flush=function(){return void 0===u?a:v(ms())},b}var _s=Ln((function(e,t){return Zr(e,1,t)})),ws=Ln((function(e,t,r){return Zr(e,oa(t)||0,r)}));function Cs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Cs.Cache||qr),r}function As(e){if("function"!=typeof e)throw new ve(o);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)}}Cs.Cache=qr;var Is=ui((function(e,t){var r=(t=1==t.length&&Us(t[0])?dt(t[0],kt($i())):dt(on(t,1),kt($i()))).length;return Ln((function(n){for(var i=-1,o=sr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return ot(e,this,n)}))})),Es=Ln((function(e,t){return ji(e,32,void 0,t,zt(t,Xi(Es)))})),Ts=Ln((function(e,t){return ji(e,64,void 0,t,zt(t,Xi(Ts)))})),xs=Hi((function(e,t){return ji(e,256,void 0,void 0,void 0,t)}));function Rs(e,t){return e===t||e!=e&&t!=t}var ks=qi(fn),Ps=qi((function(e,t){return e>=t})),Ns=bn(function(){return arguments}())?bn:function(e){return Hs(e)&&Ae.call(e,"callee")&&!Je.call(e,"callee")},Us=n.isArray,qs=Qe?kt(Qe):function(e){return Hs(e)&&dn(e)==C};function Ds(e){return null!=e&&zs(e.length)&&!Fs(e)}function Os(e){return Hs(e)&&Ds(e)}var Ms=tr||ou,Ls=et?kt(et):function(e){return Hs(e)&&dn(e)==l};function js(e){if(!Hs(e))return!1;var t=dn(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Gs(e)}function Fs(e){if(!Vs(e))return!1;var t=dn(e);return t==d||t==f||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Bs(e){return"number"==typeof e&&e==na(e)}function zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Vs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Hs(e){return null!=e&&"object"==typeof e}var Ks=tt?kt(tt):function(e){return Hs(e)&&ro(e)==m};function Ws(e){return"number"==typeof e||Hs(e)&&dn(e)==g}function Gs(e){if(!Hs(e)||dn(e)!=y)return!1;var t=Ke(e);if(null===t)return!0;var r=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ce.call(r)==xe}var Js=rt?kt(rt):function(e){return Hs(e)&&dn(e)==v};var Xs=nt?kt(nt):function(e){return Hs(e)&&ro(e)==b};function $s(e){return"string"==typeof e||!Us(e)&&Hs(e)&&dn(e)==S}function Zs(e){return"symbol"==typeof e||Hs(e)&&dn(e)==_}var Ys=it?kt(it):function(e){return Hs(e)&&zs(e.length)&&!!Fe[dn(e)]};var Qs=qi(En),ea=qi((function(e,t){return e<=t}));function ta(e){if(!e)return[];if(Ds(e))return $s(e)?Wt(e):yi(e);if(Ye&&e[Ye])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ye]());var t=ro(e);return(t==m?Ft:t==b?Vt:Ra)(e)}function ra(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function na(e){var t=ra(e),r=t%1;return t==t?r?t-r:t:0}function ia(e){return e?Jr(na(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Zs(e))return NaN;if(Vs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Vs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(J,"");var r=oe.test(e);return r||ae.test(e)?He(e.slice(2),r?2:8):ie.test(e)?NaN:+e}function sa(e){return vi(e,_a(e))}function aa(e){return null==e?"":Zn(e)}var ua=Si((function(e,t){if(lo(t)||Ds(t))vi(t,Sa(t),e);else for(var r in t)Ae.call(t,r)&&zr(e,r,t[r])})),ca=Si((function(e,t){vi(t,_a(t),e)})),pa=Si((function(e,t,r,n){vi(t,_a(t),e,n)})),la=Si((function(e,t,r,n){vi(t,Sa(t),e,n)})),ha=Hi(Gr);var da=Ln((function(e,t){e=me(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&ao(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],s=_a(o),a=-1,u=s.length;++a<u;){var c=s[a],p=e[c];(void 0===p||Rs(p,_e[c])&&!Ae.call(e,c))&&(e[c]=o[c])}return e})),fa=Ln((function(e){return e.push(void 0,Bi),ot(Ca,void 0,e)}));function ma(e,t,r){var n=null==e?void 0:ln(e,t);return void 0===n?r:n}function ga(e,t){return null!=e&&no(e,t,gn)}var ya=Ri((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),e[t]=r}),Va(Wa)),va=Ri((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Te.call(t)),Ae.call(e,t)?e[t].push(r):e[t]=[r]}),$i),ba=Ln(vn);function Sa(e){return Ds(e)?Mr(e):An(e)}function _a(e){return Ds(e)?Mr(e,!0):In(e)}var wa=Si((function(e,t,r){kn(e,t,r)})),Ca=Si((function(e,t,r,n){kn(e,t,r,n)})),Aa=Hi((function(e,t){var r={};if(null==e)return r;var n=!1;t=dt(t,(function(t){return t=ai(t,e),n||(n=t.length>1),t})),vi(e,Wi(e),r),n&&(r=Xr(r,7,zi));for(var i=t.length;i--;)Qn(r,t[i]);return r}));var Ia=Hi((function(e,t){return null==e?{}:function(e,t){return Un(e,t,(function(t,r){return ga(e,r)}))}(e,t)}));function Ea(e,t){if(null==e)return{};var r=dt(Wi(e),(function(e){return[e]}));return t=$i(t),Un(e,r,(function(e,r){return t(e,r[0])}))}var Ta=Li(Sa),xa=Li(_a);function Ra(e){return null==e?[]:Pt(e,Sa(e))}var ka=Ai((function(e,t,r){return t=t.toLowerCase(),e+(r?Pa(t):t)}));function Pa(e){return ja(aa(e).toLowerCase())}function Na(e){return(e=aa(e))&&e.replace(ce,Ot).replace(Ue,"")}var Ua=Ai((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),qa=Ai((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Da=Ci("toLowerCase");var Oa=Ai((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ma=Ai((function(e,t,r){return e+(r?" ":"")+ja(t)}));var La=Ai((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),ja=Ci("toUpperCase");function Fa(e,t,r){return e=aa(e),void 0===(t=r?void 0:t)?function(e){return Me.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Ba=Ln((function(e,t){try{return ot(e,void 0,t)}catch(e){return js(e)?e:new he(e)}})),za=Hi((function(e,t){return at(t,(function(t){t=Eo(t),Wr(e,t,vs(e[t],e))})),e}));function Va(e){return function(){return e}}var Ha=Ti(),Ka=Ti(!0);function Wa(e){return e}function Ga(e){return Cn("function"==typeof e?e:Xr(e,1))}var Ja=Ln((function(e,t){return function(r){return vn(r,e,t)}})),Xa=Ln((function(e,t){return function(r){return vn(e,r,t)}}));function $a(e,t,r){var n=Sa(t),i=pn(t,n);null!=r||Vs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=pn(t,Sa(t)));var o=!(Vs(r)&&"chain"in r&&!r.chain),s=Fs(e);return at(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=yi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,ft([this.value()],arguments))})})),e}function Za(){}var Ya=Pi(dt),Qa=Pi(ct),eu=Pi(yt);function tu(e){return uo(e)?It(Eo(e)):function(e){return function(t){return ln(t,e)}}(e)}var ru=Ui(),nu=Ui(!0);function iu(){return[]}function ou(){return!1}var su=ki((function(e,t){return e+t}),0),au=Oi("ceil"),uu=ki((function(e,t){return e/t}),1),cu=Oi("floor");var pu,lu=ki((function(e,t){return e*t}),1),hu=Oi("round"),du=ki((function(e,t){return e-t}),0);return Tr.after=function(e,t){if("function"!=typeof t)throw new ve(o);return e=na(e),function(){if(--e<1)return t.apply(this,arguments)}},Tr.ary=gs,Tr.assign=ua,Tr.assignIn=ca,Tr.assignInWith=pa,Tr.assignWith=la,Tr.at=ha,Tr.before=ys,Tr.bind=vs,Tr.bindAll=za,Tr.bindKey=bs,Tr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Us(e)?e:[e]},Tr.chain=ts,Tr.chunk=function(e,t,r){t=(r?ao(e,t,r):void 0===t)?1:or(na(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=n(Yt(i/t));o<i;)a[s++]=Kn(e,o,o+=t);return a},Tr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Tr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return ft(Us(r)?yi(r):[r],on(t,1))},Tr.cond=function(e){var t=null==e?0:e.length,r=$i();return e=t?dt(e,(function(e){if("function"!=typeof e[1])throw new ve(o);return[r(e[0]),e[1]]})):[],Ln((function(r){for(var n=-1;++n<t;){var i=e[n];if(ot(i[0],this,r))return ot(i[1],this,r)}}))},Tr.conforms=function(e){return function(e){var t=Sa(e);return function(r){return $r(r,e,t)}}(Xr(e,1))},Tr.constant=Va,Tr.countBy=is,Tr.create=function(e,t){var r=xr(e);return null==t?r:Kr(r,t)},Tr.curry=function e(t,r,n){var i=ji(t,8,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=e.placeholder,i},Tr.curryRight=function e(t,r,n){var i=ji(t,16,void 0,void 0,void 0,void 0,void 0,r=n?void 0:r);return i.placeholder=e.placeholder,i},Tr.debounce=Ss,Tr.defaults=da,Tr.defaultsDeep=fa,Tr.defer=_s,Tr.delay=ws,Tr.difference=Ro,Tr.differenceBy=ko,Tr.differenceWith=Po,Tr.drop=function(e,t,r){var n=null==e?0:e.length;return n?Kn(e,(t=r||void 0===t?1:na(t))<0?0:t,n):[]},Tr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?Kn(e,0,(t=n-(t=r||void 0===t?1:na(t)))<0?0:t):[]},Tr.dropRightWhile=function(e,t){return e&&e.length?ti(e,$i(t,3),!0,!0):[]},Tr.dropWhile=function(e,t){return e&&e.length?ti(e,$i(t,3),!0):[]},Tr.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ao(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=na(r))<0&&(r=-r>i?0:i+r),(n=void 0===n||n>i?i:na(n))<0&&(n+=i),n=r>n?0:ia(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Tr.filter=function(e,t){return(Us(e)?pt:nn)(e,$i(t,3))},Tr.flatMap=function(e,t){return on(hs(e,t),1)},Tr.flatMapDeep=function(e,t){return on(hs(e,t),1/0)},Tr.flatMapDepth=function(e,t,r){return r=void 0===r?1:na(r),on(hs(e,t),r)},Tr.flatten=qo,Tr.flattenDeep=function(e){return(null==e?0:e.length)?on(e,1/0):[]},Tr.flattenDepth=function(e,t){return(null==e?0:e.length)?on(e,t=void 0===t?1:na(t)):[]},Tr.flip=function(e){return ji(e,512)},Tr.flow=Ha,Tr.flowRight=Ka,Tr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Tr.functions=function(e){return null==e?[]:pn(e,Sa(e))},Tr.functionsIn=function(e){return null==e?[]:pn(e,_a(e))},Tr.groupBy=cs,Tr.initial=function(e){return(null==e?0:e.length)?Kn(e,0,-1):[]},Tr.intersection=Oo,Tr.intersectionBy=Mo,Tr.intersectionWith=Lo,Tr.invert=ya,Tr.invertBy=va,Tr.invokeMap=ps,Tr.iteratee=Ga,Tr.keyBy=ls,Tr.keys=Sa,Tr.keysIn=_a,Tr.map=hs,Tr.mapKeys=function(e,t){var r={};return t=$i(t,3),un(e,(function(e,n,i){Wr(r,t(e,n,i),e)})),r},Tr.mapValues=function(e,t){var r={};return t=$i(t,3),un(e,(function(e,n,i){Wr(r,n,t(e,n,i))})),r},Tr.matches=function(e){return xn(Xr(e,1))},Tr.matchesProperty=function(e,t){return Rn(e,Xr(t,1))},Tr.memoize=Cs,Tr.merge=wa,Tr.mergeWith=Ca,Tr.method=Ja,Tr.methodOf=Xa,Tr.mixin=$a,Tr.negate=As,Tr.nthArg=function(e){return e=na(e),Ln((function(t){return Pn(t,e)}))},Tr.omit=Aa,Tr.omitBy=function(e,t){return Ea(e,As($i(t)))},Tr.once=function(e){return ys(2,e)},Tr.orderBy=function(e,t,r,n){return null==e?[]:(Us(t)||(t=null==t?[]:[t]),Us(r=n?void 0:r)||(r=null==r?[]:[r]),Nn(e,t,r))},Tr.over=Ya,Tr.overArgs=Is,Tr.overEvery=Qa,Tr.overSome=eu,Tr.partial=Es,Tr.partialRight=Ts,Tr.partition=ds,Tr.pick=Ia,Tr.pickBy=Ea,Tr.property=tu,Tr.propertyOf=function(e){return function(t){return null==e?void 0:ln(e,t)}},Tr.pull=Fo,Tr.pullAll=Bo,Tr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,$i(r,2)):e},Tr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?qn(e,t,void 0,r):e},Tr.pullAt=zo,Tr.range=ru,Tr.rangeRight=nu,Tr.rearg=xs,Tr.reject=function(e,t){return(Us(e)?pt:nn)(e,As($i(t,3)))},Tr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=$i(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Dn(e,i),r},Tr.rest=function(e,t){if("function"!=typeof e)throw new ve(o);return Ln(e,t=void 0===t?t:na(t))},Tr.reverse=Vo,Tr.sampleSize=function(e,t,r){return t=(r?ao(e,t,r):void 0===t)?1:na(t),(Us(e)?jr:Fn)(e,t)},Tr.set=function(e,t,r){return null==e?e:Bn(e,t,r)},Tr.setWith=function(e,t,r,n){return n="function"==typeof n?n:void 0,null==e?e:Bn(e,t,r,n)},Tr.shuffle=function(e){return(Us(e)?Fr:Hn)(e)},Tr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&ao(e,t,r)?(t=0,r=n):(t=null==t?0:na(t),r=void 0===r?n:na(r)),Kn(e,t,r)):[]},Tr.sortBy=fs,Tr.sortedUniq=function(e){return e&&e.length?Xn(e):[]},Tr.sortedUniqBy=function(e,t){return e&&e.length?Xn(e,$i(t,2)):[]},Tr.split=function(e,t,r){return r&&"number"!=typeof r&&ao(e,t,r)&&(t=r=void 0),(r=void 0===r?4294967295:r>>>0)?(e=aa(e))&&("string"==typeof t||null!=t&&!Js(t))&&!(t=Zn(t))&&jt(e)?ci(Wt(e),0,r):e.split(t,r):[]},Tr.spread=function(e,t){if("function"!=typeof e)throw new ve(o);return t=null==t?0:or(na(t),0),Ln((function(r){var n=r[t],i=ci(r,0,t);return n&&ft(i,n),ot(e,this,i)}))},Tr.tail=function(e){var t=null==e?0:e.length;return t?Kn(e,1,t):[]},Tr.take=function(e,t,r){return e&&e.length?Kn(e,0,(t=r||void 0===t?1:na(t))<0?0:t):[]},Tr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Kn(e,(t=n-(t=r||void 0===t?1:na(t)))<0?0:t,n):[]},Tr.takeRightWhile=function(e,t){return e&&e.length?ti(e,$i(t,3),!1,!0):[]},Tr.takeWhile=function(e,t){return e&&e.length?ti(e,$i(t,3)):[]},Tr.tap=function(e,t){return t(e),e},Tr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new ve(o);return Vs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ss(e,t,{leading:n,maxWait:t,trailing:i})},Tr.thru=rs,Tr.toArray=ta,Tr.toPairs=Ta,Tr.toPairsIn=xa,Tr.toPath=function(e){return Us(e)?dt(e,Eo):Zs(e)?[e]:yi(Io(aa(e)))},Tr.toPlainObject=sa,Tr.transform=function(e,t,r){var n=Us(e),i=n||Ms(e)||Ys(e);if(t=$i(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Vs(e)&&Fs(o)?xr(Ke(e)):{}}return(i?at:un)(e,(function(e,n,i){return t(r,e,n,i)})),r},Tr.unary=function(e){return gs(e,1)},Tr.union=Ho,Tr.unionBy=Ko,Tr.unionWith=Wo,Tr.uniq=function(e){return e&&e.length?Yn(e):[]},Tr.uniqBy=function(e,t){return e&&e.length?Yn(e,$i(t,2)):[]},Tr.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Yn(e,void 0,t):[]},Tr.unset=function(e,t){return null==e||Qn(e,t)},Tr.unzip=Go,Tr.unzipWith=Jo,Tr.update=function(e,t,r){return null==e?e:ei(e,t,si(r))},Tr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:void 0,null==e?e:ei(e,t,si(r),n)},Tr.values=Ra,Tr.valuesIn=function(e){return null==e?[]:Pt(e,_a(e))},Tr.without=Xo,Tr.words=Fa,Tr.wrap=function(e,t){return Es(si(t),e)},Tr.xor=$o,Tr.xorBy=Zo,Tr.xorWith=Yo,Tr.zip=Qo,Tr.zipObject=function(e,t){return ii(e||[],t||[],zr)},Tr.zipObjectDeep=function(e,t){return ii(e||[],t||[],Bn)},Tr.zipWith=es,Tr.entries=Ta,Tr.entriesIn=xa,Tr.extend=ca,Tr.extendWith=pa,$a(Tr,Tr),Tr.add=su,Tr.attempt=Ba,Tr.camelCase=ka,Tr.capitalize=Pa,Tr.ceil=au,Tr.clamp=function(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=(r=oa(r))==r?r:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Jr(oa(e),t,r)},Tr.clone=function(e){return Xr(e,4)},Tr.cloneDeep=function(e){return Xr(e,5)},Tr.cloneDeepWith=function(e,t){return Xr(e,5,t="function"==typeof t?t:void 0)},Tr.cloneWith=function(e,t){return Xr(e,4,t="function"==typeof t?t:void 0)},Tr.conformsTo=function(e,t){return null==t||$r(e,t,Sa(t))},Tr.deburr=Na,Tr.defaultTo=function(e,t){return null==e||e!=e?t:e},Tr.divide=uu,Tr.endsWith=function(e,t,r){e=aa(e),t=Zn(t);var n=e.length,i=r=void 0===r?n:Jr(na(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},Tr.eq=Rs,Tr.escape=function(e){return(e=aa(e))&&j.test(e)?e.replace(M,Mt):e},Tr.escapeRegExp=function(e){return(e=aa(e))&&G.test(e)?e.replace(W,"\\$&"):e},Tr.every=function(e,t,r){var n=Us(e)?ct:tn;return r&&ao(e,t,r)&&(t=void 0),n(e,$i(t,3))},Tr.find=os,Tr.findIndex=No,Tr.findKey=function(e,t){return bt(e,$i(t,3),un)},Tr.findLast=ss,Tr.findLastIndex=Uo,Tr.findLastKey=function(e,t){return bt(e,$i(t,3),cn)},Tr.floor=cu,Tr.forEach=as,Tr.forEachRight=us,Tr.forIn=function(e,t){return null==e?e:sn(e,$i(t,3),_a)},Tr.forInRight=function(e,t){return null==e?e:an(e,$i(t,3),_a)},Tr.forOwn=function(e,t){return e&&un(e,$i(t,3))},Tr.forOwnRight=function(e,t){return e&&cn(e,$i(t,3))},Tr.get=ma,Tr.gt=ks,Tr.gte=Ps,Tr.has=function(e,t){return null!=e&&no(e,t,mn)},Tr.hasIn=ga,Tr.head=Do,Tr.identity=Wa,Tr.includes=function(e,t,r,n){e=Ds(e)?e:Ra(e),r=r&&!n?na(r):0;var i=e.length;return r<0&&(r=or(i+r,0)),$s(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&_t(e,t,r)>-1},Tr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:na(r);return i<0&&(i=or(n+i,0)),_t(e,t,i)},Tr.inRange=function(e,t,r){return t=ra(t),void 0===r?(r=t,t=0):r=ra(r),function(e,t,r){return e>=sr(t,r)&&e<or(t,r)}(e=oa(e),t,r)},Tr.invoke=ba,Tr.isArguments=Ns,Tr.isArray=Us,Tr.isArrayBuffer=qs,Tr.isArrayLike=Ds,Tr.isArrayLikeObject=Os,Tr.isBoolean=function(e){return!0===e||!1===e||Hs(e)&&dn(e)==p},Tr.isBuffer=Ms,Tr.isDate=Ls,Tr.isElement=function(e){return Hs(e)&&1===e.nodeType&&!Gs(e)},Tr.isEmpty=function(e){if(null==e)return!0;if(Ds(e)&&(Us(e)||"string"==typeof e||"function"==typeof e.splice||Ms(e)||Ys(e)||Ns(e)))return!e.length;var t=ro(e);if(t==m||t==b)return!e.size;if(lo(e))return!An(e).length;for(var r in e)if(Ae.call(e,r))return!1;return!0},Tr.isEqual=function(e,t){return Sn(e,t)},Tr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:void 0)?r(e,t):void 0;return void 0===n?Sn(e,t,void 0,r):!!n},Tr.isError=js,Tr.isFinite=function(e){return"number"==typeof e&&rr(e)},Tr.isFunction=Fs,Tr.isInteger=Bs,Tr.isLength=zs,Tr.isMap=Ks,Tr.isMatch=function(e,t){return e===t||_n(e,t,Yi(t))},Tr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:void 0,_n(e,t,Yi(t),r)},Tr.isNaN=function(e){return Ws(e)&&e!=+e},Tr.isNative=function(e){if(po(e))throw new he("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wn(e)},Tr.isNil=function(e){return null==e},Tr.isNull=function(e){return null===e},Tr.isNumber=Ws,Tr.isObject=Vs,Tr.isObjectLike=Hs,Tr.isPlainObject=Gs,Tr.isRegExp=Js,Tr.isSafeInteger=function(e){return Bs(e)&&e>=-9007199254740991&&e<=9007199254740991},Tr.isSet=Xs,Tr.isString=$s,Tr.isSymbol=Zs,Tr.isTypedArray=Ys,Tr.isUndefined=function(e){return void 0===e},Tr.isWeakMap=function(e){return Hs(e)&&ro(e)==w},Tr.isWeakSet=function(e){return Hs(e)&&"[object WeakSet]"==dn(e)},Tr.join=function(e,t){return null==e?"":nr.call(e,t)},Tr.kebabCase=Ua,Tr.last=jo,Tr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return void 0!==r&&(i=(i=na(r))<0?or(n+i,0):sr(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):St(e,Ct,i,!0)},Tr.lowerCase=qa,Tr.lowerFirst=Da,Tr.lt=Qs,Tr.lte=ea,Tr.max=function(e){return e&&e.length?rn(e,Wa,fn):void 0},Tr.maxBy=function(e,t){return e&&e.length?rn(e,$i(t,2),fn):void 0},Tr.mean=function(e){return At(e,Wa)},Tr.meanBy=function(e,t){return At(e,$i(t,2))},Tr.min=function(e){return e&&e.length?rn(e,Wa,En):void 0},Tr.minBy=function(e,t){return e&&e.length?rn(e,$i(t,2),En):void 0},Tr.stubArray=iu,Tr.stubFalse=ou,Tr.stubObject=function(){return{}},Tr.stubString=function(){return""},Tr.stubTrue=function(){return!0},Tr.multiply=lu,Tr.nth=function(e,t){return e&&e.length?Pn(e,na(t)):void 0},Tr.noConflict=function(){return Ge._===this&&(Ge._=Re),this},Tr.noop=Za,Tr.now=ms,Tr.pad=function(e,t,r){e=aa(e);var n=(t=na(t))?Kt(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ni(Qt(i),r)+e+Ni(Yt(i),r)},Tr.padEnd=function(e,t,r){e=aa(e);var n=(t=na(t))?Kt(e):0;return t&&n<t?e+Ni(t-n,r):e},Tr.padStart=function(e,t,r){e=aa(e);var n=(t=na(t))?Kt(e):0;return t&&n<t?Ni(t-n,r)+e:e},Tr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),ur(aa(e).replace(X,""),t||0)},Tr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&ao(e,t,r)&&(t=r=void 0),void 0===r&&("boolean"==typeof t?(r=t,t=void 0):"boolean"==typeof e&&(r=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ra(e),void 0===t?(t=e,e=0):t=ra(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=cr();return sr(e+i*(t-e+Ve("1e-"+((i+"").length-1))),t)}return On(e,t)},Tr.reduce=function(e,t,r){var n=Us(e)?mt:Tt,i=arguments.length<3;return n(e,$i(t,4),r,i,Qr)},Tr.reduceRight=function(e,t,r){var n=Us(e)?gt:Tt,i=arguments.length<3;return n(e,$i(t,4),r,i,en)},Tr.repeat=function(e,t,r){return t=(r?ao(e,t,r):void 0===t)?1:na(t),Mn(aa(e),t)},Tr.replace=function(){var e=arguments,t=aa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Tr.result=function(e,t,r){var n=-1,i=(t=ai(t,e)).length;for(i||(i=1,e=void 0);++n<i;){var o=null==e?void 0:e[Eo(t[n])];void 0===o&&(n=i,o=r),e=Fs(o)?o.call(e):o}return e},Tr.round=hu,Tr.runInContext=e,Tr.sample=function(e){return(Us(e)?Lr:jn)(e)},Tr.size=function(e){if(null==e)return 0;if(Ds(e))return $s(e)?Kt(e):e.length;var t=ro(e);return t==m||t==b?e.size:An(e).length},Tr.snakeCase=Oa,Tr.some=function(e,t,r){var n=Us(e)?yt:Wn;return r&&ao(e,t,r)&&(t=void 0),n(e,$i(t,3))},Tr.sortedIndex=function(e,t){return Gn(e,t)},Tr.sortedIndexBy=function(e,t,r){return Jn(e,t,$i(r,2))},Tr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Gn(e,t);if(n<r&&Rs(e[n],t))return n}return-1},Tr.sortedLastIndex=function(e,t){return Gn(e,t,!0)},Tr.sortedLastIndexBy=function(e,t,r){return Jn(e,t,$i(r,2),!0)},Tr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=Gn(e,t,!0)-1;if(Rs(e[r],t))return r}return-1},Tr.startCase=Ma,Tr.startsWith=function(e,t,r){return e=aa(e),r=null==r?0:Jr(na(r),0,e.length),t=Zn(t),e.slice(r,r+t.length)==t},Tr.subtract=du,Tr.sum=function(e){return e&&e.length?xt(e,Wa):0},Tr.sumBy=function(e,t){return e&&e.length?xt(e,$i(t,2)):0},Tr.template=function(e,t,r){var n=Tr.templateSettings;r&&ao(e,t,r)&&(t=void 0),e=aa(e),t=pa({},t,n,Fi);var i,o,s=pa({},t.imports,n.imports,Fi),a=Sa(s),u=Pt(s,a),c=0,p=t.interpolate||pe,l="__p += '",h=ge((t.escape||pe).source+"|"+p.source+"|"+(p===z?re:pe).source+"|"+(t.evaluate||pe).source+"|$","g"),d="//# sourceURL="+(Ae.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++je+"]")+"\n";e.replace(h,(function(t,r,n,s,a,u){return n||(n=s),l+=e.slice(c,u).replace(le,Lt),r&&(i=!0,l+="' +\n__e("+r+") +\n'"),a&&(o=!0,l+="';\n"+a+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),c=u+t.length,t})),l+="';\n";var f=Ae.call(t,"variable")&&t.variable;f||(l="with (obj) {\n"+l+"\n}\n"),l=(o?l.replace(U,""):l).replace(q,"$1").replace(D,"$1;"),l="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var m=Ba((function(){return de(a,d+"return "+l).apply(void 0,u)}));if(m.source=l,js(m))throw m;return m},Tr.times=function(e,t){if((e=na(e))<1||e>9007199254740991)return[];var r=4294967295,n=sr(e,4294967295);e-=4294967295;for(var i=Rt(n,t=$i(t));++r<e;)t(r);return i},Tr.toFinite=ra,Tr.toInteger=na,Tr.toLength=ia,Tr.toLower=function(e){return aa(e).toLowerCase()},Tr.toNumber=oa,Tr.toSafeInteger=function(e){return e?Jr(na(e),-9007199254740991,9007199254740991):0===e?e:0},Tr.toString=aa,Tr.toUpper=function(e){return aa(e).toUpperCase()},Tr.trim=function(e,t,r){if((e=aa(e))&&(r||void 0===t))return e.replace(J,"");if(!e||!(t=Zn(t)))return e;var n=Wt(e),i=Wt(t);return ci(n,Ut(n,i),qt(n,i)+1).join("")},Tr.trimEnd=function(e,t,r){if((e=aa(e))&&(r||void 0===t))return e.replace($,"");if(!e||!(t=Zn(t)))return e;var n=Wt(e);return ci(n,0,qt(n,Wt(t))+1).join("")},Tr.trimStart=function(e,t,r){if((e=aa(e))&&(r||void 0===t))return e.replace(X,"");if(!e||!(t=Zn(t)))return e;var n=Wt(e);return ci(n,Ut(n,Wt(t))).join("")},Tr.truncate=function(e,t){var r=30,n="...";if(Vs(t)){var i="separator"in t?t.separator:i;r="length"in t?na(t.length):r,n="omission"in t?Zn(t.omission):n}var o=(e=aa(e)).length;if(jt(e)){var s=Wt(e);o=s.length}if(r>=o)return e;var a=r-Kt(n);if(a<1)return n;var u=s?ci(s,0,a).join(""):e.slice(0,a);if(void 0===i)return u+n;if(s&&(a+=u.length-a),Js(i)){if(e.slice(a).search(i)){var c,p=u;for(i.global||(i=ge(i.source,aa(ne.exec(i))+"g")),i.lastIndex=0;c=i.exec(p);)var l=c.index;u=u.slice(0,void 0===l?a:l)}}else if(e.indexOf(Zn(i),a)!=a){var h=u.lastIndexOf(i);h>-1&&(u=u.slice(0,h))}return u+n},Tr.unescape=function(e){return(e=aa(e))&&L.test(e)?e.replace(O,Gt):e},Tr.uniqueId=function(e){var t=++Ie;return aa(e)+t},Tr.upperCase=La,Tr.upperFirst=ja,Tr.each=as,Tr.eachRight=us,Tr.first=Do,$a(Tr,(pu={},un(Tr,(function(e,t){Ae.call(Tr.prototype,t)||(pu[t]=e)})),pu),{chain:!1}),Tr.VERSION="4.17.15",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Tr[e].placeholder=Tr})),at(["drop","take"],(function(e,t){Pr.prototype[e]=function(r){r=void 0===r?1:or(na(r),0);var n=this.__filtered__&&!t?new Pr(this):this.clone();return n.__filtered__?n.__takeCount__=sr(r,n.__takeCount__):n.__views__.push({size:sr(r,4294967295),type:e+(n.__dir__<0?"Right":"")}),n},Pr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Pr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:$i(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),at(["head","last"],(function(e,t){var r="take"+(t?"Right":"");
vendor: 6,144 bytes, line 9
9Pr.prototype[e]=function(){return this[r](1).value()[0]}})),at(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Pr.prototype[e]=function(){return this.__filtered__?new Pr(this):this[r](1)}})),Pr.prototype.compact=function(){return this.filter(Wa)},Pr.prototype.find=function(e){return this.filter(e).head()},Pr.prototype.findLast=function(e){return this.reverse().find(e)},Pr.prototype.invokeMap=Ln((function(e,t){return"function"==typeof e?new Pr(this):this.map((function(r){return vn(r,e,t)}))})),Pr.prototype.reject=function(e){return this.filter(As($i(e)))},Pr.prototype.slice=function(e,t){e=na(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Pr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),void 0!==t&&(r=(t=na(t))<0?r.dropRight(-t):r.take(t-e)),r)},Pr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Pr.prototype.toArray=function(){return this.take(4294967295)},un(Pr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=Tr[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(Tr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,a=t instanceof Pr,u=s[0],c=a||Us(t),p=function(e){var t=i.apply(Tr,ft([e],s));return n&&l?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(a=c=!1);var l=this.__chain__,h=!!this.__actions__.length,d=o&&!l,f=a&&!h;if(!o&&c){t=f?t:new Pr(this);var m=e.apply(t,s);return m.__actions__.push({func:rs,args:[p],thisArg:void 0}),new kr(m,l)}return d&&f?e.apply(this,s):(m=this.thru(p),d?n?m.value()[0]:m.value():m)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Tr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Us(i)?i:[],e)}return this[r]((function(r){return t.apply(Us(r)?r:[],e)}))}})),un(Pr.prototype,(function(e,t){var r=Tr[t];if(r){var n=r.name+"";Ae.call(vr,n)||(vr[n]=[]),vr[n].push({name:t,func:r})}})),vr[xi(void 0,2).name]=[{name:"wrapper",func:void 0}],Pr.prototype.clone=function(){var e=new Pr(this.__wrapped__);return e.__actions__=yi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yi(this.__views__),e},Pr.prototype.reverse=function(){if(this.__filtered__){var e=new Pr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Pr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Us(e),n=t<0,i=r?e.length:0,o=function(e,t,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=sr(t,e+s);break;case"takeRight":e=or(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,p=this.__iteratees__,l=p.length,h=0,d=sr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return ri(e,this.__actions__);var f=[];e:for(;u--&&h<d;){for(var m=-1,g=e[c+=t];++m<l;){var y=p[m],v=y.iteratee,b=y.type,S=v(g);if(2==b)g=S;else if(!S){if(1==b)continue e;break e}}f[h++]=g}return f},Tr.prototype.at=ns,Tr.prototype.chain=function(){return ts(this)},Tr.prototype.commit=function(){return new kr(this.value(),this.__chain__)},Tr.prototype.next=function(){void 0===this.__values__&&(this.__values__=ta(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Tr.prototype.plant=function(e){for(var t,r=this;r instanceof Rr;){var n=xo(r);n.__index__=0,n.__values__=void 0,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},Tr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Pr){var t=e;return this.__actions__.length&&(t=new Pr(this)),(t=t.reverse()).__actions__.push({func:rs,args:[Vo],thisArg:void 0}),new kr(t,this.__chain__)}return this.thru(Vo)},Tr.prototype.toJSON=Tr.prototype.valueOf=Tr.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Tr.prototype.first=Tr.prototype.head,Ye&&(Tr.prototype[Ye]=function(){return this}),Tr}();Ge._=Jt,void 0===(i=function(){return Jt}.call(t,r,t,n))||(n.exports=i)}).call(this)}).call(this,r(39),r(184)(e))},2041:function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,i,o,s,a,u=1,c={},p=!1,l=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},n=function(e){o.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(e){var t=l.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(f,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var i={callback:e,args:t};return c[u]=i,n(u),u++},h.clearImmediate=d}function d(e){delete c[e]}function f(e){if(p)setTimeout(f,0,e);else{var t=c[e];if(t){p=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{d(e),p=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(39),r(58))},2042:function(e,t,r){var n=r(41);function i(){}function o(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function s(e,t,r,i){n.each(r.members,(function(r,n){var s=t[r];
vendor: 14,570 bytes, line 9
9if(null!=s){var u=o(n);a(u=e?e+"."+u:u,s,n,i)}}))}function a(e,t,r,i){null!=t&&("structure"===r.type?s(e,t,r,i):"list"===r.type?function(e,t,r,i){var s=r.member||{};0!==t.length?n.arrayEach(t,(function(t,n){var u="."+(n+1);if("ec2"===r.api.protocol)u+="";else if(r.flattened){if(s.name){var c=e.split(".");c.pop(),c.push(o(s)),e=c.join(".")}}else u="."+(s.name?s.name:"member")+u;a(e+u,t,s,i)})):i.call(this,e,null)}(e,t,r,i):"map"===r.type?function(e,t,r,i){var o=1;n.each(t,(function(t,n){var s=(r.flattened?".":".entry.")+o+++".",u=s+(r.key.name||"key"),c=s+(r.value.name||"value");a(e+u,t,r.key,i),a(e+c,n,r.value,i)}))}(e,t,r,i):i(e,r.toWireFormat(t).toString()))}i.prototype.serialize=function(e,t,r){s("",e,t,r)},e.exports=i},2043:function(e,t,r){var n=r(41),i=r(2044).XmlNode,o=r(2046).XmlText;function s(){}function a(e,t,r){switch(r.type){case"structure":return function(e,t,r){n.arrayEach(r.memberNames,(function(n){var o=r.members[n];if("body"===o.location){var s=t[n],c=o.name;if(null!=s)if(o.isXmlAttribute)e.addAttribute(c,s);else if(o.flattened)a(e,s,o);else{var p=new i(c);e.addChildNode(p),u(p,o),a(p,s,o)}}}))}(e,t,r);case"map":return function(e,t,r){var o=r.key.name||"key",s=r.value.name||"value";n.each(t,(function(t,n){var u=new i(r.flattened?r.name:"entry");e.addChildNode(u);var c=new i(o),p=new i(s);u.addChildNode(c),u.addChildNode(p),a(c,t,r.key),a(p,n,r.value)}))}(e,t,r);case"list":return function(e,t,r){r.flattened?n.arrayEach(t,(function(t){var n=r.member.name||r.name,o=new i(n);e.addChildNode(o),a(o,t,r.member)})):n.arrayEach(t,(function(t){var n=r.member.name||"member",o=new i(n);e.addChildNode(o),a(o,t,r.member)}))}(e,t,r);default:return function(e,t,r){e.addChildNode(new o(r.toWireFormat(t)))}(e,t,r)}}function u(e,t,r){var n,i="xmlns";t.xmlNamespaceUri?(n=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):r&&t.api.xmlNamespaceUri&&(n=t.api.xmlNamespaceUri),n&&e.addAttribute(i,n)}s.prototype.toXML=function(e,t,r,n){var o=new i(r);return u(o,t,!0),a(o,e,t),o.children.length>0||n?o.toString():""},e.exports=s},2044:function(e,t,r){var n=r(2045).escapeAttribute;function i(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}i.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},i.prototype.addChildNode=function(e){return this.children.push(e),this},i.prototype.removeAttribute=function(e){return delete this.attributes[e],this},i.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,r=this.attributes,i=0,o=Object.keys(r);i<o.length;i++){var s=o[i],a=r[s];null!=a&&(t+=" "+s+'="'+n(""+a)+'"')}return t+(e?">"+this.children.map((function(e){return e.toString()})).join("")+"</"+this.name+">":"/>")},e.exports={XmlNode:i}},2045:function(e,t){e.exports={escapeAttribute:function(e){return e.replace(/&/g,"&").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}},2046:function(e,t,r){var n=r(2047).escapeElement;function i(e){this.value=e}i.prototype.toString=function(){return n(""+this.value)},e.exports={XmlText:i}},2047:function(e,t){e.exports={escapeElement:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}},2048:function(e,t){function r(e,t){if(!r.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return r.services[e][t]}r.services={},e.exports=r},2049:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2050),i=function(){function e(e){void 0===e&&(e=1e3),this.maxSize=e,this.cache=new n.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,r){var n="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(r);this.cache.put(n,i)},e.prototype.get=function(t){var r="string"!=typeof t?e.getKeyString(t):t,n=Date.now(),i=this.cache.get(r);if(i)for(var o=0;o<i.length;o++){if(i[o].Expire<n)return void this.cache.remove(r)}return i},e.getKeyString=function(e){for(var t=[],r=Object.keys(e).sort(),n=0;n<r.length;n++){var i=r[n];void 0!==e[i]&&t.push(e[i])}return t.join(" ")},e.prototype.populateValue=function(e){var t=Date.now();return e.map((function(e){return{Address:e.Address||"",Expire:t+60*(e.CachePeriodInMinutes||1)*1e3}}))},e.prototype.empty=function(){this.cache.empty()},e.prototype.remove=function(t){var r="string"!=typeof t?e.getKeyString(t):t;this.cache.remove(r)},e}();t.EndpointCache=i},2050:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.key=e,this.value=t},i=function(){function e(e){if(this.nodeMap={},this.size=0,"number"!=typeof e||e<1)throw new Error("Cache size can only be positive number");this.sizeLimit=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.prependToList=function(e){this.headerNode?(this.headerNode.prev=e,e.next=this.headerNode):this.tailNode=e,this.headerNode=e,this.size++},e.prototype.removeFromTail=function(){if(this.tailNode){var e=this.tailNode,t=e.prev;return t&&(t.next=void 0),e.prev=void 0,this.tailNode=t,this.size--,e}},e.prototype.detachFromList=function(e){this.headerNode===e&&(this.headerNode=e.next),this.tailNode===e&&(this.tailNode=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.next=void 0,e.prev=void 0,this.size--},e.prototype.get=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];return this.detachFromList(t),this.prependToList(t),t.value}},e.prototype.remove=function(e){if(this.nodeMap[e]){var t=this.nodeMap[e];this.detachFromList(t),delete this.nodeMap[e]}},e.prototype.put=function(e,t){if(this.nodeMap[e])this.remove(e);else if(this.size===this.sizeLimit){var r=this.removeFromTail().key;delete this.nodeMap[r]}var i=new n(e,t);this.nodeMap[e]=i,this.prependToList(i)},e.prototype.empty=function(){for(var e=Object.keys(this.nodeMap),t=0;t<e.length;t++){var r=e[t],n=this.nodeMap[r];this.detachFromList(n),delete this.nodeMap[r]}},e}();t.LRUCache=i},2051:function(e,t,r){(function(t){var n=r(23),i=r(300),o=r(2052),s=n.util.inherit,a=0;n.Service=s({constructor:function(e){if(!this.loadServiceClass)throw n.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var r=n.util.copy(e),i=new t(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return r},enumerable:!1,configurable:!0}),i._clientId=++a,i}this.initialize(e)},initialize:function(e){var r=n.config[this.serviceIdentifier];if(this.config=new n.Config(n.config),r&&this.config.update(r,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||o(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),n.SequentialExecutor.call(this),n.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||n.Service._clientSideMonitoring)&&this.publisher){var i=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",(function(e){t.nextTick((function(){i.eventHandler(e)}))})),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",(function(e){t.nextTick((function(){i.eventHandler(e)}))}))}},validateService:function(){},loadServiceClass:function(e){var t=e;if(n.util.isEmpty(this.api)){if(t.apiConfig)return n.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){(t=new n.Config(n.config)).update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&n.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?n.util.isType(e,Date)&&(e=n.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,i=t.length-1;i>=0;i--)if("*"!==t[i][t[i].length-1]&&(r=t[i]),t[i].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(e){if("function"!=typeof e)throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests");this.customRequestHandler=e}else this.customRequestHandler=null},makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=n.util.copy(t),n.util.each(this.config.params,(function(e,r){i.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=r))})))}var o=new n.Request(this,e,t);return this.addAllRequestListeners(o),this.attachMonitoringEmitter(o),r&&o.send(r),o},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var n=this.makeRequest(e,t).toUnauthenticated();return r?n.send(r):n},waitFor:function(e,t,r){return new n.ResourceWaiter(this,e).wait(t,r)},addAllRequestListeners:function(e){for(var t=[n.events,n.EventListeners.Core,this.serviceInterface(),n.EventListeners.CorePost],r=0;r<t.length;r++)t[r]&&e.addListeners(t[r]);this.config.paramValidation||e.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(n.EventListeners.Logger),this.setupRequestListeners(e),"function"==typeof this.constructor.prototype.customRequestHandler&&this.constructor.prototype.customRequestHandler(e),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&"function"==typeof this.customRequestHandler&&this.customRequestHandler(e)},apiCallEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCall",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Region:e.httpRequest.region,MaxRetriesExceeded:0,UserAgent:e.httpRequest.getUserAgent()},n=e.response;if(n.httpResponse.statusCode&&(r.FinalHttpStatusCode=n.httpResponse.statusCode),n.error){var i=n.error;n.httpResponse.statusCode>299?(i.code&&(r.FinalAwsException=i.code),i.message&&(r.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(r.FinalSdkException=i.code||i.name),i.message&&(r.FinalSdkExceptionMessage=i.message))}return r},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],r={Type:"ApiCallAttempt",Api:t?t.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(r.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(r.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(r.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(r.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(r.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(r.XAmzId2=n.httpResponse.headers["x-amz-id-2"]),r):r},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),r=e.response,n=r.error;return r.httpResponse.statusCode>299?(n.code&&(t.AwsException=n.code),n.message&&(t.AwsExceptionMessage=n.message)):((n.code||n.name)&&(t.SdkException=n.code||n.name),n.message&&(t.SdkExceptionMessage=n.message)),t},attachMonitoringEmitter:function(e){var t,r,i,o,s,a,u=0,c=this;e.on("validate",(function(){o=n.util.realClock.now(),a=Date.now()}),!0),e.on("sign",(function(){r=n.util.realClock.now(),t=Date.now(),s=e.httpRequest.region,u++}),!0),e.on("validateResponse",(function(){i=Math.round(n.util.realClock.now()-r)})),e.addNamedListener("API_CALL_ATTEMPT","success",(function(){var r=c.apiAttemptEvent(e);r.Timestamp=t,r.AttemptLatency=i>=0?i:0,r.Region=s,c.emit("apiCallAttempt",[r])})),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",(function(){var o=c.attemptFailEvent(e);o.Timestamp=t,i=i||Math.round(n.util.realClock.now()-r),o.AttemptLatency=i>=0?i:0,o.Region=s,c.emit("apiCallAttempt",[o])})),e.addNamedListener("API_CALL","complete",(function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=a;var r=Math.round(n.util.realClock.now()-o);t.Latency=r>=0?r:0;var i=e.response;"number"==typeof i.retryCount&&"number"==typeof i.maxRetries&&i.retryCount>=i.maxRetries&&(t.MaxRetriesExceeded=1),c.emit("apiCall",[t])}}))},setupRequestListeners:function(e){},getSignerClass:function(e){var t,r=null,i="";e&&(i=(r=(e.service.api.operations||{})[e.operation]||null)?r.authtype:"");return t=this.config.signatureVersion?this.config.signatureVersion:"v4"===i||"v4-unsigned-body"===i?"v4":this.api.signatureVersion,n.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return n.EventListeners.Query;case"json":return n.EventListeners.Json;case"rest-json":return n.EventListeners.RestJson;case"rest-xml":return n.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return void 0!==this.config.maxRetries?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e){return n.util.calculateRetryDelay(e,this.config.retryDelayOptions)},retryableError:function(e){return!!this.timeoutError(e)||(!!this.networkingError(e)||(!!this.expiredCredentialsError(e)||(!!this.throttledError(e)||e.statusCode>=500)))},networkingError:function(e){return"NetworkingError"===e.code},timeoutError:function(e){return"TimeoutError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate(
9).getTime()-e)>=3e4},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=(t=(t=t.replace(/\{service\}/g,this.api.endpointPrefix)).replace(/\{region\}/g,this.config.region)).replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new n.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var i=new Error;throw n.util.error(i,"No pagination configuration for "+e)}return null}return r}}),n.util.update(n.Service,{defineMethods:function(e){n.util.each(e.prototype.api.operations,(function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,r){return this.makeUnauthenticatedRequest(t,e,r)}:e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})}))},defineService:function(e,t,r){n.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var i=s(n.Service,r||{});if("string"==typeof e){n.Service.addVersions(i,t);var o=i.serviceIdentifier||e;i.serviceIdentifier=o}else i.prototype.api=e,n.Service.defineMethods(i);if(n.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&n.util.clientSideMonitoring){var a=n.util.clientSideMonitoring.Publisher,u=(0,n.util.clientSideMonitoring.configProvider)();this.prototype.publisher=new a(u),u.enabled&&(n.Service._clientSideMonitoring=!0)}return n.SequentialExecutor.call(i.prototype),n.Service.addDefaultMonitoringListeners(i.prototype),i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;r<t.length;r++)void 0===e.services[t[r]]&&(e.services[t[r]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(e,t,r){var o=s(e,{serviceIdentifier:e.serviceIdentifier});function a(e){e.isApi?o.prototype.api=e:o.prototype.api=new i(e)}if("string"==typeof t){if(r)a(r);else try{a(n.apiLoader(e.serviceIdentifier,t))}catch(r){throw n.util.error(r,{message:"Could not find API configuration "+e.serviceIdentifier+"-"+t})}Object.prototype.hasOwnProperty.call(e.services,t)||(e.apiVersions=e.apiVersions.concat(t).sort()),e.services[t]=o}else a(t);return n.Service.defineMethods(o),o},hasService:function(e){return Object.prototype.hasOwnProperty.call(n.Service._serviceMap,e)},addDefaultMonitoringListeners:function(e){e.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",(function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCallAttempt",[t])})),e.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",(function(t){var r=Object.getPrototypeOf(e);r._events&&r.emit("apiCall",[t])}))},_serviceMap:{}}),n.util.mixin(n.Service,n.SequentialExecutor),e.exports=n.Service}).call(this,r(58))},2052:function(e,t,r){var n=r(41),i=r(2053);function o(e,t){n.each(t,(function(t,r){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=r))}))}e.exports=function(e){for(var t=function(e){var t=e.config.region,r=function(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}(t),n=e.api.endpointPrefix;return[[t,n],[r,n],[t,"*"],[r,"*"],["*",n],["*","*"]].map((function(e){return e[0]&&e[1]?e.join("/"):null}))}(e),r=0;r<t.length;r++){var s=t[r];if(s&&Object.prototype.hasOwnProperty.call(i.rules,s)){var a=i.rules[s];return"string"==typeof a&&(a=i.patterns[a]),e.config.useDualstack&&n.isDualstackAvailable(e)&&((a=n.copy(a)).endpoint="{service}.dualstack.{region}.amazonaws.com"),e.isGlobalEndpoint=!!a.globalEndpoint,a.signatureVersion||(a.signatureVersion="v4"),void o(e,a)}}}},2053:function(e){e.exports=JSON.parse('{"rules":{"*/*":{"endpoint":"{service}.{region}.amazonaws.com"},"cn-*/*":{"endpoint":"{service}.{region}.amazonaws.com.cn"},"*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/iam":"globalSSL","*/sts":"globalSSL","*/importexport":{"endpoint":"{service}.amazonaws.com","signatureVersion":"v2","globalEndpoint":true},"*/route53":{"endpoint":"https://{service}.amazonaws.com","signatureVersion":"v3https","globalEndpoint":true},"*/waf":"globalSSL","us-gov-*/iam":"globalGovCloud","us-gov-*/sts":{"endpoint":"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{"endpoint":"{service}.amazonaws.com","signatureVersion":"s3"},"us-east-1/sdb":{"endpoint":"{service}.amazonaws.com","signatureVersion":"v2"},"*/sdb":{"endpoint":"{service}.{region}.amazonaws.com","signatureVersion":"v2"}},"patterns":{"globalSSL":{"endpoint":"https://{service}.amazonaws.com","globalEndpoint":true},"globalGovCloud":{"endpoint":"{service}.us-gov.amazonaws.com"},"s3signature":{"endpoint":"{service}.{region}.amazonaws.com","signatureVersion":"s3"}}}')},2054:function(e,t,r){var n,i=r(23);r(305),r(306),i.Config=i.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),i.util.each.call(this,this.keys,(function(t,r){this.set(t,e[t],r)}))},getCredentials:function(e){var t,r=this;function n(t){e(t,t?null:r.credentials)}function o(e,t){return new i.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}r.credentials?"function"==typeof r.credentials.get?r.credentials.get((function(e){e&&(e=o("Could not load credentials from "+r.credentials.constructor.name,e)),n(e)})):(t=null,r.credentials.accessKeyId&&r.credentials.secretAccessKey||(t=o("Missing credentials")),n(t)):r.credentialProvider?r.credentialProvider.resolve((function(e,t){e&&(e=o("Could not load credentials from any providers",e)),r.credentials=t,n(e)})):n(o("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),i.util.each.call(this,e,(function(e,r){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||i.Service.hasService(e))&&this.set(e,r)}))},loadFromPath:function(e){this.clear();var t=JSON.parse(i.util.readFileSync(e)),r=new i.FileSystemCredentials(e),n=new i.CredentialProviderChain;return n.providers.unshift(r),n.resolve((function(e,r){if(e)throw e;t.credentials=r})),this.constructor(t),this},clear:function(){i.util.each.call(this,this.keys,(function(e){delete this[e]})),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,t,r){void 0===t?(void 0===r&&(r=this.keys[e]),this[e]="function"==typeof r?r.call(this):r):"httpOptions"===e&&this[e]?this[e]=i.util.merge(this[e],t):this[e]=t},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:!1,endpointCacheSize:1e3,hostPrefixEnabled:!0},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&((e=i.util.copy(e)).credentials=new i.Credentials(e)),e},setPromisesDependency:function(e){n=e,null===e&&"function"==typeof Promise&&(n=Prom
9ise);var t=[i.Request,i.Credentials,i.CredentialProviderChain];i.S3&&i.S3.ManagedUpload&&t.push(i.S3.ManagedUpload),i.util.addPromises(t,n)},getPromisesDependency:function(){return n}}),i.config=new i.Config},2055:function(e,t,r){var n=r(23),i=r(304),o=r(2056).discoverEndpoint;n.EventListeners={Core:{}},n.EventListeners={Core:(new i).addNamedListeners((function(e,t){t("VALIDATE_CREDENTIALS","validate",(function(e,t){if(!e.service.api.signatureVersion)return t();e.service.config.getCredentials((function(r){r&&(e.response.error=n.util.error(r,{code:"CredentialsError",message:"Missing credentials in config"})),t()}))})),e("VALIDATE_REGION","validate",(function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=n.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))})),e("BUILD_IDEMPOTENCY_TOKENS","validate",(function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation];if(t){var r=t.idempotentMembers;if(r.length){for(var i=n.util.copy(e.params),o=0,s=r.length;o<s;o++)i[r[o]]||(i[r[o]]=n.util.uuid.v4());e.params=i}}}})),e("VALIDATE_PARAMETERS","validate",(function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation].input,r=e.service.config.paramValidation;new n.ParamValidator(r).validate(t,e.params)}})),t("COMPUTE_SHA256","afterBuild",(function(e,t){if(e.haltHandlersOnError(),e.service.api.operations){var r=e.service.api.operations[e.operation],i=r?r.authtype:"";if(!e.service.api.signatureVersion&&!i)return t();if(e.service.getSignerClass(e)===n.Signers.V4){var o=e.httpRequest.body||"";if(i.indexOf("unsigned-body")>=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();n.util.computeSha256(o,(function(r,n){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=n,t())}))}else t()}})),e("SET_CONTENT_LENGTH","afterBuild",(function(e){var t=function(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}(e),r=n.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var i=n.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=i}catch(n){if(r&&r.isStreaming){if(r.requiresLength)throw n;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw n}throw n}})),e("SET_HTTP_HOST","afterBuild",(function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host})),e("RESTART","restart",(function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new n.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)}));t("DISCOVER_ENDPOINT","sign",o,!0),t("SIGN","sign",(function(e,t){var r=e.service,n=(e.service.api.operations||{})[e.operation],i=n?n.authtype:"";if(!r.api.signatureVersion&&!i)return t();r.config.getCredentials((function(i,o){if(i)return e.response.error=i,t();try{var s=r.getSkewCorrectedDate(),a=new(r.getSignerClass(e))(e.httpRequest,r.api.signingName||r.api.endpointPrefix,{signatureCache:r.config.signatureCache,operation:n,signatureVersion:r.api.signatureVersion});a.setServiceClientId(r._clientId),delete e.httpRequest.headers.Authorization,delete e.httpRequest.headers.Date,delete e.httpRequest.headers["X-Amz-Date"],a.addAuthorization(o,s),e.signedAt=s}catch(t){e.response.error=t}t()}))})),e("VALIDATE_RESPONSE","validateResponse",(function(e){this.service.successfulResponse(e,this)?(e.data={},e.error=null):(e.data=null,e.error=n.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))})),t("SEND","send",(function(e,t){function r(r){e.httpResponse.stream=r;var i=e.request.httpRequest.stream,o=e.request.service,s=o.api,a=e.request.operation,u=s.operations[a]||{};r.on("headers",(function(i,s,a){if(e.request.emit("httpHeaders",[i,s,e,a]),!e.httpResponse.streaming)if(2===n.HttpClient.streamsApiVersion){if(u.hasEventOutput&&o.successfulResponse(e))return e.request.emit("httpDone"),void t();r.on("readable",(function(){var t=r.read();null!==t&&e.request.emit("httpData",[t,e])}))}else r.on("data",(function(t){e.request.emit("httpData",[t,e])}))})),r.on("end",(function(){if(!i||!i.didCallback){if(2===n.HttpClient.streamsApiVersion&&u.hasEventOutput&&o.successfulResponse(e))return;e.request.emit("httpDone"),t()}}))}function i(r){if("RequestAbortedError"!==r.code){var i="TimeoutError"===r.code?r.code:"NetworkingError";r=n.util.error(r,{code:i,region:e.request.httpRequest.region,hostname:e.request.httpRequest.endpoint.hostname,retryable:!0})}e.error=r,e.request.emit("httpError",[e.error,e],(function(){t()}))}function o(){var t,o=n.HttpClient.getInstance(),s=e.request.service.config.httpOptions||{};try{var a=o.handleRequest(e.request.httpRequest,s,r,i);(t=a).on("sendProgress",(function(t){e.request.emit("httpUploadProgress",[t,e])})),t.on("receiveProgress",(function(t){e.request.emit("httpDownloadProgress",[t,e])}))}catch(e){i(e)}}e.httpResponse._abortCallback=t,e.error=null,e.data=null,(e.request.service.getSkewCorrectedDate(
9)-this.signedAt)/1e3>=600?this.emit("sign",[this],(function(e){e?t(e):o()})):o()})),e("HTTP_HEADERS","httpHeaders",(function(e,t,r,i){r.httpResponse.statusCode=e,r.httpResponse.statusMessage=i,r.httpResponse.headers=t,r.httpResponse.body=n.util.buffer.toBuffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0;var o=t.date||t.Date,s=r.request.service;if(o){var a=Date.parse(o);s.config.correctClockSkew&&s.isClockSkewed(a)&&s.applyClockOffset(a)}})),e("HTTP_DATA","httpData",(function(e,t){if(e){if(n.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],i={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[i,t])}t.httpResponse.buffers.push(n.util.buffer.toBuffer(e))}})),e("HTTP_DONE","httpDone",(function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=n.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers})),e("FINALIZE_ERROR","retry",(function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))})),e("INVALIDATE_CREDENTIALS","retry",(function(e){if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}})),e("EXPIRED_SIGNATURE","retry",(function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)})),e("CLOCK_SKEWED","retry",(function(e){e.error&&this.service.clockSkewError(e.error)&&this.service.config.correctClockSkew&&(e.error.retryable=!0)})),e("REDIRECT","retry",(function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new n.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)})),e("RETRY_CHECK","retry",(function(e){e.error&&(e.error.redirect&&e.redirectCount<e.maxRedirects?e.error.retryDelay=0:e.retryCount<e.maxRetries&&(e.error.retryDelay=this.service.retryDelays(e.retryCount)||0))})),t("RESET_RETRY_STATE","afterRetry",(function(e,t){var r,n=!1;e.error&&(r=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,n=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,n=!0)),n?(e.error=null,setTimeout(t,r)):t()}))})),CorePost:(new i).addNamedListeners((function(e){e("EXTRACT_REQUEST_ID","extractData",n.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",n.util.extractRequestId),e("ENOTFOUND_ERROR","httpError",(function(e){if("NetworkingError"===e.code&&"ENOTFOUND"===e.errno){var t="Inaccessible host: `"+e.hostname+"'. This service may not be available in the `"+e.region+"' region.";this.response.error=n.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}}))})),Logger:(new i).addNamedListeners((function(e){e("LOG_REQUEST","complete",(function(e){var t=e.request,i=t.service.config.logger;if(i){var o=function(){var o=(e.request.service.getSkewCorrectedDate().getTime()-t.startTime.getTime())/1e3,s=!!i.isTTY,a=e.httpResponse.statusCode,u=t.params;t.service.api.operations&&t.service.api.operations[t.operation]&&t.service.api.operations[t.operation].input&&(u=function e(t,r){if(!r)return r;switch(t.type){case"structure":var i={};return n.util.each(r,(function(r,n){Object.prototype.hasOwnProperty.call(t.members,r)?i[r]=e(t.members[r],n):i[r]=n})),i;case"list":var o=[];return n.util.arrayEach(r,(function(r,n){o.push(e(t.member,r))})),o;case"map":var s={};
9return n.util.each(r,(function(r,n){s[r]=e(t.value,n)})),s;default:return t.isSensitive?"***SensitiveInformation***":r}}(t.service.api.operations[t.operation].input,t.params));var c=r(2057).inspect(u,!0,null),p="";return s&&(p+="�[33m"),p+="[AWS "+t.service.serviceIdentifier+" "+a,p+=" "+o.toString()+"s "+e.retryCount+" retries]",s&&(p+="�[0;1m"),p+=" "+n.util.string.lowerFirst(t.operation),p+="("+c+")",s&&(p+="�[0m"),p}();"function"==typeof i.log?i.log(o):"function"==typeof i.write&&i.write(o+"\n")}}))})),Json:(new i).addNamedListeners((function(e){var t=r(156);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Rest:(new i).addNamedListeners((function(e){var t=r(128);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),RestJson:(new i).addNamedListeners((function(e){var t=r(298);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),RestXml:(new i).addNamedListeners((function(e){var t=r(299);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})),Query:(new i).addNamedListeners((function(e){var t=r(296);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}))}},2056:function(e,t,r){(function(t){var n=r(23),i=r(41),o=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function s(e){var t=e.service,r=t.api||{},n=(r.operations,{});return t.config.region&&(n.region=t.config.region),r.serviceId&&(n.serviceId=r.serviceId),t.config.credentials.accessKeyId&&(n.accessKeyId=t.config.credentials.accessKeyId),n}function a(e,t){var r={};return function e(t,r,n){n&&null!=r&&"structure"===n.type&&n.required&&n.required.length>0&&i.arrayEach(n.required,(function(i){var o=n.members[i];if(!0===o.endpointDiscoveryId){var s=o.isLocationName?o.name:i;t[s]=String(r[i])}else e(t,r[i],o)}))}(r,e.params,t),r}function u(e){var t=e.service,r=t.api,o=r.operations?r.operations[e.operation]:void 0,u=a(e,o?o.input:void 0),c=s(e);Object.keys(u).length>0&&(c=i.update(c,u),o&&(c.operation=o.name));var p=n.endpointCache.get(c);if(!p||1!==p.length||""!==p[0].Address)if(p&&p.length>0)e.httpRequest.updateEndpoint(p[0].Address);else{var h=t.makeRequest(r.endpointOperation,{Operation:o.name,Identifiers:u});l(h),h.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),h.removeListener("retry",n.EventListeners.Core.RETRY_CHECK),n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]),h.send((function(e,t){t&&t.Endpoints?n.endpointCache.put(c,t.Endpoints):e&&n.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])}))}}var c={};function p(e,t){var r=e.service,o=r.api,u=o.operations?o.operations[e.operation]:void 0,p=u?u.input:void 0,h=a(e,p),d=s(e);Object.keys(h).length>0&&(d=i.update(d,h),u&&(d.operation=u.name));var f=n.EndpointCache.getKeyString(d),m=n.endpointCache.get(f);if(m&&1===m.length&&""===m[0].Address)return c[f]||(c[f]=[]),void c[f].push({request:e,callback:t});if(m&&m.length>0)e.httpRequest.updateEndpoint(m[0].Address),t();else{var g=r.makeRequest(o.endpointOperation,{Operation:u.name,Identifiers:h});g.removeListener("validate",n.EventListeners.Core.VALIDATE_PARAMETERS),l(g),n.endpointCache.put(f,[{Address:"",CachePeriodInMinutes:60}]),g.send((function(r,o){if(r){var s={code:"EndpointDiscoveryException",message:"Request cannot be fulfilled without specifying an endpoint",retryable:!1};if(e.response.error=i.error(r,s),n.endpointCache.remove(d),c[f]){var a=c[f];i.arrayEach(a,(function(e){e.request.response.error=i.error(r,s),e.callback()})),delete c[f]}}else if(o&&(n.endpointCache.put(f,o.Endpoints),e.httpRequest.updateEndpoint(o.Endpoints[0].Address),c[f])){a=c[f];i.arrayEach(a,(function(e){e.request.httpRequest.updateEndpoint(o.Endpoints[0].Address),e.callback()})),delete c[f]}t()}))}}function l(e){var t=e.service.api.apiVersion;t&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=t)}function h(e){var t=e.error,r=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===r.statusCode)){var o=e.request,u=o.service.api.operations||{},c=a(o,u[o.operation]?u[o.operation].input:void 0),p=s(o);Object.keys(c).length>0&&(p=i.update(p,c),u[o.operation]&&(p.operation=u[o.operation].name)),n.endpointCache.remove(p)}}function d(e){return["false","0"].indexOf(e)>=0}e.exports={discoverEndpoint:function(e,r){var s=e.service||{};if(function(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw i.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=n.config[e.serviceIdentifier]||{};return Boolean(n.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}(s)||e.isPresigned())return r();if(!function(e){if(!0===(e.service||{}).config.endpointDiscoveryEnabled)return!0;
vendor: 4,224 bytes, line 9
9if(i.isBrowser())return!1;for(var r=0;r<o.length;r++){var s=o[r];if(Object.prototype.hasOwnProperty.call(t.env,s)){if(""===t.env[s]||void 0===t.env[s])throw i.error(new Error,{code:"ConfigurationException",message:"environmental variable "+s+" cannot be set to nothing"});if(!d(t.env[s]))return!0}}var a={};try{a=n.util.iniLoader?n.util.iniLoader.loadFrom({isConfig:!0,filename:t.env[n.util.sharedConfigFileEnv]}):{}}catch(e){}var u=a[t.env.AWS_PROFILE||n.util.defaultProfile]||{};if(Object.prototype.hasOwnProperty.call(u,"endpoint_discovery_enabled")){if(void 0===u.endpoint_discovery_enabled)throw i.error(new Error,{code:"ConfigurationException",message:"config file entry 'endpoint_discovery_enabled' cannot be set to nothing"});if(!d(u.endpoint_discovery_enabled))return!0}return!1}(e))return r();e.httpRequest.appendToUserAgent("endpoint-discovery");var a=(s.api.operations||{})[e.operation];switch(a?a.endpointDiscoveryRequired:"NULL"){case"OPTIONAL":u(e),e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",h),r();break;case"REQUIRED":e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",h),p(e,r);break;case"NULL":default:r()}},requiredDiscoverEndpoint:p,optionalDiscoverEndpoint:u,marshallCustomIdentifiers:a,getCacheKey:s,invalidateCachedEndpoint:h}}).call(this,r(58))},2057:function(e,t,r){(function(e){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),u=n[r];r<o;u=n[++r])m(u)||!S(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,s={};function a(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),p(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"�["+a.colors[r][0]+"m"+e+"�["+a.colors[r][1]+"m":e}function c(e,t){return e}function p(e,r,n){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return y(i)||(i=p(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number");if(f(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),w(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(C(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return l(r)}var c,S="",A=!1,I=["{","}"];(d(r)&&(A=!0,I=["[","]"]),C(r))&&(S=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(S=" "+RegExp.prototype.toString.call(r)),_(r)&&(S=" "+Date.prototype.toUTCString.call(r)),w(r)&&(S=" "+l(r)),0!==s.length||A&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=A?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)x(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");
vendor: 4,136 bytes, line 9
9return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return h(e,r,n,a,t,A)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,S,I)):I[0]+S+I[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?p(e,u.value,null):p(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return S(e)&&"[object RegExp]"===A(e)}function S(e){return"object"==typeof e&&null!==e}function _(e){return S(e)&&"[object Date]"===A(e)}function w(e){return S(e)&&("[object Error]"===A(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(v(o)&&(o=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=e.pid;s[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else s[r]=function(){};return s[r]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=f,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=S,t.isDate=_,t.isError=w,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(2058);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),E[e.getMonth()],t].join(" ")}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(2059),t._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function k(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var t;if("function"!=typeof(t=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),R&&Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,
9configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=R,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,r).then((function(t){e.nextTick(s,null,t)}),(function(t){e.nextTick(k,t,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(58))},2058:function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},2059:function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},2060:function(e,t,r){(function(e){var t=r(23),n=r(2061),i=t.util.inherit,o=t.util.domain,s=r(160),a={success:1,error:1,complete:1};var u=new n;u.setupStates=function(){var e=function(e,t){var r=this;r._haltHandlersOnError=!1,r.emit(r._asm.currentState,(function(e){if(e)if(n=r,Object.prototype.hasOwnProperty.call(a,n._asm.currentState)){if(!(o&&r.domain instanceof o.Domain))throw e;e.domainEmitter=r,e.domain=r.domain,e.domainThrown=!1,r.domain.emit("error",e)}else r.response.error=e,t(e);else t(r.response.error);var n}))};this.addState("validate","build","error",e),this.addState("build","afterBuild","restart",e),this.addState("afterBuild","sign","restart",e),this.addState("sign","send","retry",e),this.addState("retry","afterRetry","afterRetry",e),this.addState("afterRetry","sign","error",e),this.addState("send","validateResponse","retry",e),this.addState("validateResponse","extractData","extractError",e),this.addState("extractError","extractData","retry",e),this.addState("extractData","success","retry",e),this.addState("restart","build","error",e),this.addState("success","complete","complete",e),this.addState("error","complete","complete",e),this.addState("complete",null,null,e)},u.setupStates(),t.Request=i({constructor:function(e,r,i){var s=e.endpoint,a=e.config.region,c=e.config.customUserAgent;e.isGlobalEndpoint&&(a="us-east-1"),this.domain=o&&o.active,this.service=e,this.operation=r,this.params=i||{},this.httpRequest=new t.HttpRequest(s,a),this.httpRequest.appendToUserAgent(c),this.startTime=e.getSkewCorrectedDate(),this.response=new t.Response(this),this._asm=new n(u.states,"validate"),this._haltHandlersOnError=!1,t.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",(function(t){e.call(t,t.error,t.data)}))),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,t){return this._asm.runTo(e,t,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",(function(e){e.error=t.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})})),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){e=t.util.fn.makeAsync(e,3),this.on("complete",(function r(n){e.call(n,n.error,n.data,(function(i){!1!==i&&(n.hasNextPage()?n.nextPage().on("complete",r).send():e.call(n,null,null,t.util.fn.noop))}))})).send()},eachItem:function(e){var r=this;this.eachPage((function(n,i){if(n)return e(n,null);if(null===i)return e(null,null);var o=r.service.paginationConfig(r.operation).resultKey;Array.isArray(o)&&(o=o[0]);var a=s.search(i,o),u=!0;return t.util.arrayEach(a,(function(r){if(!1===(u=e(null,r)))return t.util.abort})),u}))},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var r=t.util.stream,n=this,i=null;return 2===t.HttpClient.streamsApiVersion?(i=new r.PassThrough,e.nextTick((function(){n.send()}))):((i=new r.Stream).readable=!0,i.sent=!1,i.on("newListener",(function(t){i.sent||"data"!==t||(i.sent=!0,e.nextTick((function(){n.send()})))}))),this.on("error",(function(e){i.emit("error",e)})),this.on("httpHeaders",(function(e,o,s){if(e<300){n.removeListener("httpData",t.EventListeners.Core.HTTP_DATA),n.removeListener("httpError",t.EventListeners.Core.HTTP_ERROR),n.on("httpError",(function(e){s.error=e,s.error.retryable=!1}));var a,u=!1;if("HEAD"!==n.httpRequest.method&&(a=parseInt(o["content-length"],10)),void 0!==a&&!isNaN(a)&&a>=0){u=!0;var c=0}var p=function(){u&&c!==a?i.emit("error",t.util.error(new Error("Stream content length mismatch. Received "+c+" of "+a+" bytes."),{code:"StreamContentLengthMismatch"})):2===t.HttpClient.streamsApiVersion?i.end():i.emit("end")},l=s.httpResponse.createUnbufferedStream();if(2===t.HttpClient.streamsApiVersion)if(u){var h=new r.PassThrough;h._write=function(e){return e&&e.length&&(c+=e.length),r.PassThrough.prototype._write.apply(this,arguments)},h.on("end",p),i.on("error",(function(e){u=!1,l.unpipe(h),h.emit
vendor: 11,217 bytes, line 9
9("end"),h.end()})),l.pipe(h).pipe(i,{end:!1})}else l.pipe(i);else u&&l.on("data",(function(e){e&&e.length&&(c+=e.length)})),l.on("data",(function(e){i.emit("data",e)})),l.on("end",p);l.on("error",(function(e){u=!1,i.emit("error",e)}))}})),i},emitEvent:function(e,r,n){"function"==typeof r&&(n=r,r=null),n||(n=function(){}),r||(r=this.eventParameters(e,this.response)),t.SequentialExecutor.prototype.emit.call(this,e,r,(function(e){e&&(this.response.error=e),n.call(this,e)}))},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,r){return r||"function"!=typeof e||(r=e,e=null),(new t.Signers.Presign).sign(this.toGet(),e,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",t.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",t.EventListeners.Core.SIGN),this},toGet:function(){return"query"!==this.service.api.protocol&&"ec2"!==this.service.api.protocol||(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),t.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e((function(e,r){t.on("complete",(function(t){t.error?r(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))})),t.runTo()}))}},t.Request.deletePromisesFromClass=function(){delete this.prototype.promise},t.util.addPromises(t.Request),t.util.mixin(t.Request,t.SequentialExecutor)}).call(this,r(58))},2061:function(e,t){function r(e,t){this.currentState=t||null,this.states=e||{}}r.prototype.runTo=function(e,t,r,n){"function"==typeof e&&(n=r,r=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(r||i,n,(function(n){if(n){if(!o.fail)return t?t.call(r,n):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(r):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(r,n):null;i.runTo(e,t,r,n)}))},r.prototype.addState=function(e,t,r,n){return"function"==typeof t?(n=t,t=null,r=null):"function"==typeof r&&(n=r,r=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:r,fn:n},this},e.exports=r},2062:function(e,t,r){var n=r(23),i=n.util.inherit,o=r(160);n.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new n.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,i=this.request.operation;try{t=r.paginationConfig(i,!0)}catch(e){this.error=e}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var o=n.util.copy(this.request.params);if(this.nextPageTokens){var s=t.inputToken;"string"==typeof s&&(s=[s]);for(var a=0;a<s.length;a++)o[s[a]]=this.nextPageTokens[a];return r.makeRequest(this.request.operation,o,e)}return e?e(null,null):null},hasNextPage:function(){return this.cacheNextPageTokens(),!!this.nextPageTokens||void 0===this.nextPageTokens&&void 0},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e)return this.nextPageTokens;if(this.nextPageTokens=null,e.moreResults&&!o.search(this.data,e.moreResults))return this.nextPageTokens;var t=e.outputToken;return"string"==typeof t&&(t=[t]),n.util.arrayEach.call(this,t,(function(e){var t=o.search(this.data,e);t&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(t))})),this.nextPageTokens}})},2063:function(e,t,r){var n=r(23),i=n.util.inherit,o=r(160);function s(e){var t=e.request._waiter,r=t.config.acceptors,n=!1,i="retry";r.forEach((function(r){if(!n){var o=t.matchers[r.matcher];o&&o(e,r.expected,r.argument)&&(n=!0,i=r.state)}})),!n&&e.error&&(i="failure"),"success"===i?t.setSuccess(e):t.setError(e,"retry"===i)}n.ResourceWaiter=i({constructor:function(e,t){this.service=e,this.state=t,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}return o.strictDeepEqual(n,t)},pathAll:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);var i=n.length;if(!i)return!1;for(var s=0;s<i;s++)if(!o.strictDeepEqual(n[s],t))return!1;return!0},pathAny:function(e,t,r){try{var n=o.search(e.data,r)}catch(e){return!1}Array.isArray(n)||(n=[n]);for(var i=n.length,s=0;s<i;s++)if(o.strictDeepEqual(n[s],t))return!0;return!1},status:function(e,t){var r=e.httpResponse.statusCode;return"number"==typeof r&&r===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:t===!!e.error}},listeners:(new n.SequentialExecutor).addNamedListeners((function(e){e("RETRY_CHECK","retry",(function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*(t.config.delay||0))})),e("CHECK_OUTPUT","extractData",s),e("CHECK_ERROR","extractError",s)})),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0),e&&e.$waiter&&("number"==typeof(e=n.util.copy(e)).$waiter.delay&&(this.config.delay=e.$waiter.delay),"number"==typeof e.$waiter.maxAttempts&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var r=this.service.makeRequest(this.config.operation,e);return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.listeners),t&&r.send(t),r},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=n.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new n.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=n.util.copy(this.service.api.waiters[e])}})},2064:function(e,t,r){var n=r(23),i=n.util.inherit;n.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),n.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return n.Signers.V2;case"v3":return n.Signers.V3;case"s3v4":case"v4":return n.Signers.V4;case"s3":return n.Signers.S3;case"v3https":return n.Signers.V3Https}throw new Error("Unknown signing version "+e)},r(2065),r(308),r(2066),r(2067),r(2069),r(2070)},2065:function(e,t,r){var n=r(23),i=n.util.inherit;n.Signers.V2=i(n.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=n.util.date.getDate());var r=this.request;r.params.Timestamp=n.util.date.iso8601(t),r.params.SignatureVersion="2",r.params.SignatureMethod="HmacSHA256",r.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(r.params.SecurityToken=e.sessionToken),delete r.params.Signature,r.params.Signature=this.signature(e),r.body=n.util.queryParamsToString(r.params),r.headers["Content-Length"]=r.body.length},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(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(n.util.queryParamsToString(this.request.params)),e.join("\n")}}),e.exports=n.Signers.V2},2066:function(e,t,r){var n=r(23),i=n.util.inherit;r(308),n.Signers.V3Https=i(n.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}}),e.exports=n.Signers.V3Https},2067:function(e,t,r){var n=r(23),i=r(2068),o=n.util.inherit;n.Signers.V4=o(n.Signers.RequestSigner,{constructor:function(e,t,r){n.Signers.RequestSigner.call(this,e),this.serviceName=t,r=r||{},this.signatureCache="boolean"!=typeof r.signatureCache||r.signatureCache,this.operation=r.operation,this.signatureVersion=r.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var r=n.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,r):this.addHeaders(e,r),this.request.headers.Authorization=this.authorization(e,r)},addHeaders:function(e,t){this.request.headers["X-Amz-Date"]=t,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,t){var r=this.credentialString(t),i={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+r,"X-Amz-Expires":this.request.headers["presigned-expires"],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(i["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(i["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(i["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(i["Cache-Control"]=this.request.headers["Cache-Control"]),n.util.each.call(this,this.request.headers,(function(e,t){if("presigned-expires"!==e&&this.isSignableHeader(e)){var r=e.toLowerCase();0===r.indexOf("x-amz-meta-")?i[r]=t:0===r.indexOf("x-amz-")&&(i[e]=t)}}));var o=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=o+n.util.queryParamsToString(i)},authorization:function(e,t){var r=[],n=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return n.util.crypto.hmac(r,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&"s3v4"!==this.signatureVersion&&(t=n.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];n.util.each.call(this,this.request.headers,(function(t,r){e.push([t,r])})),e.sort((function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1}));var t=[];return n.util.arrayEach.call(this,e,(function(e){var r=e[0].toLowerCase();if(this.isSignableHeader(r)){var i=e[1];if(null==i||"function"!=typeof i.toString)throw n.util.error(new Error("Header "+r+" contains invali
9d value"),{code:"InvalidHeader"});t.push(r+":"+this.canonicalHeaderValues(i.toString()))}})),t.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return n.util.each.call(this,this.request.headers,(function(t){t=t.toLowerCase(),this.isSignableHeader(t)&&e.push(t)})),e.sort().join(";")},credentialString:function(e){return i.createScope(e.substr(0,8),this.request.region,this.serviceName)},hexEncodedHash:function(e){return n.util.crypto.sha256(e,"hex")},hexEncodedBodyHash:function(){var e=this.request;return this.isPresigned()&&"s3"===this.serviceName&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id"],isSignableHeader:function(e){return 0===e.toLowerCase().indexOf("x-amz-")||this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers["presigned-expires"]}}),e.exports=n.Signers.V4},2068:function(e,t,r){var n=r(23),i={},o=[],s="aws4_request";e.exports={createScope:function(e,t,r){return[e.substr(0,8),t,r,s].join("/")},getSigningKey:function(e,t,r,a,u){var c=[n.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),t,r,a].join("_");if((u=!1!==u)&&c in i)return i[c];var p=n.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),l=n.util.crypto.hmac(p,r,"buffer"),h=n.util.crypto.hmac(l,a,"buffer"),d=n.util.crypto.hmac(h,s,"buffer");return u&&(i[c]=d,o.push(c),o.length>50&&delete i[o.shift()]),d},emptyCache:function(){i={},o=[]}}},2069:function(e,t,r){var n=r(23),i=n.util.inherit;n.Signers.S3=i(n.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=n.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=i},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];n.util.each(this.request.headers,(function(t){t.match(/^x-amz-/i)&&e.push(t)})),e.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:1}));var t=[];return n.util.arrayEach.call(this,e,(function(e){t.push(e.toLowerCase()+":"+String(this.request.headers[e]))})),t.join("\n")},canonicalizedResource:function(){var e=this.request,t=e.path.split("?"),r=t[0],i=t[1],o="";if(e.virtualHostedBucket&&(o+="/"+e.virtualHostedBucket),o+=r,i){var s=[];n.util.arrayEach.call(this,i.split("&"),(function(e){var t=e.split("=")[0],r=e.split("=")[1];if(this.subResources[t]||this.responseHeaders[t]){var n={name:t};void 0!==r&&(this.subResources[t]?n.value=r:n.value=decodeURIComponent(r)),s.push(n)}})),s.sort((function(e,t){return e.name<t.name?-1:1})),s.length&&(i=[],n.util.arrayEach(s,(function(e){void 0===e.value?i.push(e.name):i.push(e.name+"="+e.value)})),o+="?"+i.join("&"))}return o},sign:function(e,t){return n.util.crypto.hmac(e,t,"base64","sha1")}}),e.exports=n.Signers.S3},2070:function(e,t,r){var n=r(23),i=n.util.inherit,o="presigned-expires";function s(e){var t=e.httpRequest.headers[o],r=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],r===n.Signers.V4){if(t>604800){throw n.util.error(new Error,{code:"InvalidExpiryTime",message:"Presigning does not support expiry time greater than a week with SigV4 signing.",retryable:!1})}e.httpRequest.headers[o]=t}else{if(r!==n.Signers.S3)throw n.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});
vendor: 11,133 bytes, line 9
9var i=e.service?e.service.getSkewCorrectedDate():n.util.date.getDate();e.httpRequest.headers[o]=parseInt(n.util.date.unixTimestamp(i)+t,10).toString()}}function a(e){var t=e.httpRequest.endpoint,r=n.util.urlParse(e.httpRequest.path),i={};r.search&&(i=n.util.queryStringParse(r.search.substr(1)));var s=e.httpRequest.headers.Authorization.split(" ");if("AWS"===s[0])s=s[1].split(":"),i.AWSAccessKeyId=s[0],i.Signature=s[1],n.util.each(e.httpRequest.headers,(function(e,t){e===o&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete i[e],e=e.toLowerCase()),i[e]=t})),delete e.httpRequest.headers[o],delete i.Authorization,delete i.Host;else if("AWS4-HMAC-SHA256"===s[0]){s.shift();var a=s.join(" ").match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];i["X-Amz-Signature"]=a,delete i.Expires}t.pathname=r.pathname,t.search=n.util.queryParamsToString(i)}n.Signers.Presign=i({sign:function(e,t,r){if(e.httpRequest.headers[o]=t||3600,e.on("build",s),e.on("sign",a),e.removeListener("afterBuild",n.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return n.util.urlFormat(e.httpRequest.endpoint)}e.build((function(){this.response.error?r(this.response.error):r(null,n.util.urlFormat(e.httpRequest.endpoint))}))}}),e.exports=n.Signers.Presign},2071:function(e,t,r){var n=r(23);n.ParamValidator=n.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,r){if(this.errors=[],this.validateMember(e,t||{},r||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,n.util.error(new Error(i),{code:"MultipleValidationErrors",errors:this.errors})}if(1===this.errors.length)throw this.errors[0];return!0},fail:function(e,t){this.errors.push(n.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,r){var n;this.validateType(t,r,["object"],"structure");for(var i=0;e.required&&i<e.required.length;i++){var o=t[n=e.required[i]];null==o&&this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+r)}for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=t[n],a=e.members[n];if(void 0!==a){var u=[r,n].join(".");this.validateMember(a,s,u)}else this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+r)}return!0},validateMember:function(e,t,r){switch(e.type){case"structure":return this.validateStructure(e,t,r);case"list":return this.validateList(e,t,r);case"map":return this.validateMap(e,t,r);default:return this.validateScalar(e,t,r)}},validateList:function(e,t,r){if(this.validateType(t,r,[Array])){this.validateRange(e,t.length,r,"list member count");for(var n=0;n<t.length;n++)this.validateMember(e.member,t[n],r+"["+n+"]")}},validateMap:function(e,t,r){if(this.validateType(t,r,["object"],"map")){var n=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(this.validateMember(e.key,i,r+"[key='"+i+"']"),this.validateMember(e.value,t[i],r+"['"+i+"']"),n++);this.validateRange(e,n,r,"map member count")}},validateScalar:function(e,t,r){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,r);case"base64":case"binary":return this.validatePayload(t,r);case"integer":case"float":return this.validateNumber(e,t,r);case"boolean":return this.validateType(t,r,["boolean"]);case"timestamp":return this.validateType(t,r,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+r)}},validateString:function(e,t,r){var n=["string"];e.isJsonValue&&(n=n.concat(["number","object","boolean"])),null!==t&&this.validateType(t,r,n)&&(this.validateEnum(e,t,r),this.validateRange(e,t.length,r,"string length"),this.validatePattern(e,t,r),this.validateUri(e,t,r))},validateUri:function(e,t,r){"uri"===e.location&&0===t.length&&this.fail("UriParameterError",'Expected uri parameter to have length >= 1, but found "'+t+'" for '+r)},validatePattern:function(e,t,r){this.validation.pattern&&void 0!==e.pattern&&(new RegExp(e.pattern).test(t)||this.fail("PatternMatchError",'Provided value "'+t+'" does not match regex pattern /'+e.pattern+"/ for "+r))},validateRange:function(e,t,r,n){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+t+" for "+r),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+t+" for "+r)},validateEnum:function(e,t,r){this.validation.enum&&void 0!==e.enum&&-1===e.enum.indexOf(t)&&this.fail("EnumError","Found string value of "+t+", but expected "+e.enum.join("|")+" for "+r)},validateType:function(e,t,r,i){if(null==e)return!1;for(var o=!1,s=0;s<r.length;s++){if("string"==typeof r[s]){if(typeof e===r[s])return!0}else if(r[s]instanceof RegExp){if((e||"").toString().match(r[s]))return!0}else{if(e instanceof r[s])return!0;if(n.util.isType(e,r[s]))return!0;i||o||(r=r.slice()),r[s]=n.util.typeName(r[s])}o=!0}var a=i;a||(a=r.join(", ").replace(/,([^,]+)$/,", or$1"));var u=a.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+u+" "+a),!1},validateNumber:function(e,t,r){if(null!=t){if("string"==typeof t){var n=parseFloat(t);n.toString()===t&&(t=n)}this.validateType(t,r,["number"])&&this.validateRange(e,t,r,"numeric value")}},validatePayload:function(e,t){if(null!=e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(n.util.isNode()){var r=n.util.stream.Stream;if(n.util.Buffer.isBuffer(e)||e instanceof r)return}else if(void 0!==typeof Blob&&e instanceof Blob)return;var i=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e)for(var o=0;o<i.length;o++){if(n.util.isType(e,i[o]))return;if(n.util.typeName(e.constructor)===i[o])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},2072:function(e){e.exports=JSON.parse('{"acm":{"name":"ACM","cors":true},"apigateway":{"name":"APIGateway","cors":true},"applicationautoscaling":{"prefix":"application-autoscaling","name":"ApplicationAutoScaling","cors":true},"appstream":{"name":"AppStream"},"autoscaling":{"name":"AutoScaling","cors":true},"batch":{"name":"Batch"},"budgets":{"name":"Budgets"},"clouddirectory":{"name":"CloudDirectory","versions":["2016-05-10*"]},"cloudformation":{"name":"CloudFormation","cors":true},"cloudfront":{"name":"CloudFront","versions":["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*","2018-06-18*","2018-11-05*"],"cors":true},"cloudhsm":{"name":"CloudHSM","cors":true},"cloudsearch":{"name":"CloudSearch"},"cloudsearchdomain":{"name":"CloudSearchDomain"},"cloudtrail":{"name":"CloudTrail","cors":true},"cloudwatch":{"prefix":"monitoring","name":"CloudWatch","cors":true},"cloudwatchevents":{"prefix":"events","name":"CloudWatchEvents","versions":["2014-02-03*"],"cors":true},"cloudwatchlogs":{"prefix":"logs","name":"CloudWatchLogs","cors":true},"codebuild":{"name":"CodeBuild","cors":true},"codecommit":{"name":"CodeCommit","cors":true},"codedeploy":{"name":"CodeDeploy","cors":true},"codepipeline":{"name":"CodePipeline","cors":true},"cognitoidentity":{"prefix":"cognito-identity","name":"CognitoIdentity","cors":true},"cognitoidentityserviceprovider":{"prefix":"cognito-idp","name":"CognitoIdentityServiceProvider","cors":true},"cognitosync":{"prefix":"cognito-sync","name":"CognitoSync","cors":true},"configservice":{"prefix":"config","name":"ConfigService","cors":true},"cur":{"name":"CUR","cors":true},"datapipeline":{"name":"DataPipeline"},"devicefarm":{"name":"DeviceFarm","cors":true},"directconnect":{"name":"DirectConnect","cors":true},"directoryservice":{"prefix":"ds","name":"DirectoryService"},"discovery":{"name":"Discovery"},"dms":{"name":"DMS"},"dynamodb":{"name":"DynamoDB","cors":true},"dynamodbstreams":{"prefix":"streams.dynamodb","name":"DynamoDBStreams","cors":true},"ec2":{"name":"EC2","versions":["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],"cors":true},"ecr":{"name":"ECR","cors":true},"ecs":{"name":"ECS","cors":true},"efs":{"prefix":"elasticfilesystem","name":"EFS","cors":true},"elasticache":{"name":"ElastiCache","versions":["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],"cors":true},"elasticbeanstalk":{"name":"ElasticBeanstalk","cors":true},"elb":{"prefix":"elasticloadbalancing","name":"ELB","cors":true},"elbv2":{"prefix":"elasticloadbalancingv2","name":"ELBv2","cors":true},"emr":{"prefix":"elasticmapreduce","name":"EMR","cors":true},"es":{"name":"ES"},"elastictranscoder":{"name":"ElasticTranscoder","cors":true},"firehose":{"name":"Firehose","cors":true},"gamelift":{"name":"GameLift","cors":true},"glacier":{"name":"Glacier"},"health":{"name":"Health"},"iam":{"name":"IAM","cors":true},"importexport":{"name":"ImportExport"},"inspector":{"name":"Inspector","versions":["2015-08-18*"],"cors":true},"iot":{"name":"Iot","cors":true},"iotdata":{"prefix":"iot-data","name":"IotData","cors":true},"kinesis":{"name":"Kinesis","cors":true},"kinesisanalytics":{"name":"KinesisAnalytics"},"kms":{"name":"KMS","cors":true},"lambda":{"name":"Lambda","cors":true},"lexruntime":{"prefix":"runtime.lex","name":"LexRuntime","cors":true},"lightsail":{"name":"Lightsail"},"machinelearning":{"name":"MachineLearning","cors":true},"marketplacecommerceanalytics":{"name":"MarketplaceCommerceAnalytics","cors":true},"marketplacemetering":{"prefix":"meteringmarketplace","name":"MarketplaceMetering"},"mturk":{"prefix":"mturk-requester","name":"MTurk","cors":true},"mobileanalytics":{"name":"MobileAnalytics","cors":true},"opsworks":{"name":"OpsWorks","cors":true},"opsworkscm":{"name":"OpsWorksCM"},"organizations":{"name":"Organizations"},"pinpoint":{"name":"Pinpoint"},"polly":{"name":"Polly","cors":true},"rds":{"name":"RDS","versions":["2014-09-01*"],"cors":true},"redshift":{"name":"Redshift","cors":true},"rekognition":{"name":"Rekognition","cors":true},"resourcegroupstaggingapi":{"name":"ResourceGroupsTaggingAPI"},"route53":{"name":"Route53","cors":true},"route53domains":{"name":"Route53Domains","cors":true},"s3":{"name":"S3","dualstackAvailable":true,"cors":true},"s3control":{"name":"S3Control","dualstackAvailable":true},"servicecatalog":{"name":"ServiceCatalog","cors":true},"ses":{"prefix":"email","name":"SES","cors":true},"shield":{"name":"Shield"},"simpledb":{"prefix":"sdb","name":"SimpleDB"},"sms":{"name":"SMS"},"snowball":{"name":"Snowball"},"sns":{"name":"SNS","cors":true},"sqs":{"name":"SQS","cors":true},"ssm":{"name":"SSM","cors":true},"storagegateway":{"name":"StorageGateway","cors":true},"stepfunctions":{"prefix":"states","name":"StepFunctions"},"sts":{"name":"STS","cors":true},"support":{"name":"Support"},"swf":{"name":"SWF"},"xray":{"name":"XRay"}
9,"waf":{"name":"WAF","cors":true},"wafregional":{"prefix":"waf-regional","name":"WAFRegional"},"workdocs":{"name":"WorkDocs","cors":true},"workspaces":{"name":"WorkSpaces"},"codestar":{"name":"CodeStar"},"lexmodelbuildingservice":{"prefix":"lex-models","name":"LexModelBuildingService","cors":true},"marketplaceentitlementservice":{"prefix":"entitlement.marketplace","name":"MarketplaceEntitlementService"},"athena":{"name":"Athena"},"greengrass":{"name":"Greengrass"},"dax":{"name":"DAX"},"migrationhub":{"prefix":"AWSMigrationHub","name":"MigrationHub"},"cloudhsmv2":{"name":"CloudHSMV2"},"glue":{"name":"Glue"},"mobile":{"name":"Mobile"},"pricing":{"name":"Pricing","cors":true},"costexplorer":{"prefix":"ce","name":"CostExplorer","cors":true},"mediaconvert":{"name":"MediaConvert"},"medialive":{"name":"MediaLive"},"mediapackage":{"name":"MediaPackage"},"mediastore":{"name":"MediaStore"},"mediastoredata":{"prefix":"mediastore-data","name":"MediaStoreData","cors":true},"appsync":{"name":"AppSync"},"guardduty":{"name":"GuardDuty"},"mq":{"name":"MQ"},"comprehend":{"name":"Comprehend","cors":true},"iotjobsdataplane":{"prefix":"iot-jobs-data","name":"IoTJobsDataPlane"},"kinesisvideoarchivedmedia":{"prefix":"kinesis-video-archived-media","name":"KinesisVideoArchivedMedia","cors":true},"kinesisvideomedia":{"prefix":"kinesis-video-media","name":"KinesisVideoMedia","cors":true},"kinesisvideo":{"name":"KinesisVideo","cors":true},"sagemakerruntime":{"prefix":"runtime.sagemaker","name":"SageMakerRuntime"},"sagemaker":{"name":"SageMaker"},"translate":{"name":"Translate","cors":true},"resourcegroups":{"prefix":"resource-groups","name":"ResourceGroups","cors":true},"alexaforbusiness":{"name":"AlexaForBusiness"},"cloud9":{"name":"Cloud9"},"serverlessapplicationrepository":{"prefix":"serverlessrepo","name":"ServerlessApplicationRepository"},"servicediscovery":{"name":"ServiceDiscovery"},"workmail":{"name":"WorkMail"},"autoscalingplans":{"prefix":"autoscaling-plans","name":"AutoScalingPlans"},"transcribeservice":{"prefix":"transcribe","name":"TranscribeService"},"connect":{"name":"Connect"},"acmpca":{"prefix":"acm-pca","name":"ACMPCA"},"fms":{"name":"FMS"},"secretsmanager":{"name":"SecretsManager","cors":true},"iotanalytics":{"name":"IoTAnalytics"},"iot1clickdevicesservice":{"prefix":"iot1click-devices","name":"IoT1ClickDevicesService"},"iot1clickprojects":{"prefix":"iot1click-projects","name":"IoT1ClickProjects"},"pi":{"name":"PI"},"neptune":{"name":"Neptune"},"mediatailor":{"name":"MediaTailor"},"eks":{"name":"EKS"},"macie":{"name":"Macie"},"dlm":{"name":"DLM"},"signer":{"name":"Signer"},"chime":{"name":"Chime"},"pinpointemail":{"prefix":"pinpoint-email","name":"PinpointEmail"},"ram":{"name":"RAM"},"route53resolver":{"name":"Route53Resolver"},"pinpointsmsvoice":{"prefix":"sms-voice","name":"PinpointSMSVoice"},"quicksight":{"name":"QuickSight"},"rdsdataservice":{"prefix":"rds-data","name":"RDSDataService"},"amplify":{"name":"Amplify"},"datasync":{"name":"DataSync"},"robomaker":{"name":"RoboMaker"},"transfer":{"name":"Transfer"},"globalaccelerator":{"name":"GlobalAccelerator"},"comprehendmedical":{"name":"ComprehendMedical","cors":true},"kinesisanalyticsv2":{"name":"KinesisAnalyticsV2"},"mediaconnect":{"name":"MediaConnect"},"fsx":{"name":"FSx"},"securityhub":{"name":"SecurityHub"},"appmesh":{"name":"AppMesh","versions":["2018-10-01*"]},"licensemanager":{"prefix":"license-manager","name":"LicenseManager"},"kafka":{"name":"Kafka"},"apigatewaymanagementapi":{"name":"ApiGatewayManagementApi"},"apigatewayv2":{"name":"ApiGatewayV2"},"docdb":{"name":"DocDB"},"backup":{"name":"Backup"},"worklink":{"name":"WorkLink"},"textract":{"name":"Textract"},"managedblockchain":{"name":"ManagedBlockchain"},"mediapackagevod":{"prefix":"mediapackage-vod","name":"MediaPackageVod"},"groundstation":{"name":"GroundStation"},"iotthingsgraph":{"name":"IoTThingsGraph"},"iotevents":{"name":"IoTEvents"},"ioteventsdata":{"prefix":"iotevents-data","name":"IoTEventsData"},"personalize":{"name":"Personalize","cors":true},"personalizeevents":{"prefix":"personalize-events","name":"PersonalizeEvents","cors":true},"personalizeruntime":{"prefix":"personalize-runtime","name":"PersonalizeRuntime","cors":true},"applicationinsights":{"prefix":"application-insights","name":"ApplicationInsights"},"servicequotas":{"prefix":"service-quotas","name":"ServiceQuotas"},"ec2instanceconnect":{"prefix":"ec2-instance-connect","name":"EC2InstanceConnect"},"eventbridge":{"name":"EventBridge"},"lakeformation":{"name":"LakeFormation"},"forecastservice":{"prefix":"forecast","name":"ForecastService"},"forecastqueryservice":{"prefix":"forecastquery","name":"ForecastQueryService"}}')},2073:function(e,t,r){var n=r(2074),i=r(2075),o=i;o.v1=n,o.v4=i,e.exports=o},2074:function(e,t,r){var n,i,o=r(309),s=r(310),a=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,p=t||[],l=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==l||null==h){var d=o();null==l&&(l=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,g=f-a+(m-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||f>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=f,u=m,i=h;var y=(1e4*(268435455&(f+=122192928e5))+m)%4294967296;p[c++]=y>>>24&255,p[c++]=y>>>16&255,p[c++]=y>>>8&255,p[c++]=255&y;var v=f/4294967296*1e4&268435455;p[c++]=v>>>8&255,p[c++]=255&v,p[c++]=v>>>
vendor: 8,873 bytes, line 9
924&15|16,p[c++]=v>>>16&255,p[c++]=h>>>8|128,p[c++]=255&h;for(var b=0;b<6;++b)p[c+b]=l[b];return t||s(p)}},2075:function(e,t,r){var n=r(309),i=r(310);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},2076:function(e,t,r){var n=r(2077),i=r(2080),o=r(2081),s=r(2082);e.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new i;if("sha256"===e)return new s;if("sha1"===e)return new o;throw new Error("Hash algorithm "+e+" is not supported in the browser SDK")},createHmac:function(e,t){if("md5"===(e=e.toLowerCase()))return new n(i,t);if("sha256"===e)return new n(s,t);if("sha1"===e)return new n(o,t);throw new Error("HMAC algorithm "+e+" is not supported in the browser SDK")},createSign:function(){throw new Error("createSign is not implemented in the browser")}}},2077:function(e,t,r){var n=r(129);function i(e,t){this.hash=new e,this.outer=new e;var r=function(e,t){var r=n.convertToBuffer(t);if(r.byteLength>e.BLOCK_SIZE){var i=new e;i.update(r),r=i.digest()}var o=new Uint8Array(e.BLOCK_SIZE);return o.set(r),o}(e,t),i=new Uint8Array(e.BLOCK_SIZE);i.set(r);for(var o=0;o<e.BLOCK_SIZE;o++)r[o]^=54,i[o]^=92;this.hash.update(r),this.outer.update(i);for(o=0;o<r.byteLength;o++)r[o]=0}e.exports=i,i.prototype.update=function(e){if(n.isEmptyData(e)||this.error)return this;try{this.hash.update(n.convertToBuffer(e))}catch(e){this.error=e}return this},i.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},2080:function(e,t,r){var n=r(129),i=r(25).Buffer;function o(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function s(e,t,r,n,i,o){return((t=(t+e&4294967295)+(n+o&4294967295)&4294967295)<<i|t>>>32-i)+r&4294967295}function a(e,t,r,n,i,o,a){return s(t&r|~t&n,e,t,i,o,a)}function u(e,t,r,n,i,o,a){return s(t&n|r&~n,e,t,i,o,a)}function c(e,t,r,n,i,o,a){return s(t^r^n,e,t,i,o,a)}function p(e,t,r,n,i,o,a){return s(r^(t|~n),e,t,i,o,a)}e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(n.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=n.convertToBuffer(e),r=0,i=t.byteLength;for(this.bytesHashed+=i;i>0;)this.buffer.setUint8(this.bufferLength++,t[r++]),i--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},o.prototype.digest=function(e){if(!this.finished){var t=this.buffer,r=this.bufferLength,n=8*this.bytesHashed;if(t.setUint8(this.bufferLength++,128),r%64>=56){for(var o=this.bufferLength;o<64;o++)t.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<56;o++)t.setUint8(o,0);t.setUint32(56,n>>>0,!0),t.setUint32(60,Math.floor(n/4294967296),!0),this.hashBuffer(),this.finished=!0}var s=new DataView(new ArrayBuffer(16));for(o=0;o<4;o++)s.setUint32(4*o,this.state[o],!0);var a=new i(s.buffer,s.byteOffset,s.byteLength);return e?a.toString(e):a},o.prototype.hashBuffer=function(){var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],o=t[3];r=a(r,n,i,o,e.getUint32(0,!0),7,3614090360),o=a(o,r,n,i,e.getUint32(4,!0),12,3905402710),i=a(i,o,r,n,e.getUint32(8,!0),17,606105819),n=a(n,i,o,r,e.getUint32(12,!0),22,3250441966),r=a(r,n,i,o,e.getUint32(16,!0),7,4118548399),o=a(o,r,n,i,e.getUint32(20,!0),12,1200080426),i=a(i,o,r,n,e.getUint32(24,!0),17,2821735955),n=a(n,i,o,r,e.getUint32(28,!0),22,4249261313),r=a(r,n,i,o,e.getUint32(32,!0),7,1770035416),o=a(o,r,n,i,e.getUint32(36,!0),12,2336552879),i=a(i,o,r,n,e.getUint32(40,!0),17,4294925233),n=a(n,i,o,r,e.getUint32(44,!0),22,2304563134),r=a(r,n,i,o,e.getUint32(48,!0),7,1804603682),o=a(o,r,n,i,e.getUint32(52,!0),12,4254626195),i=a(i,o,r,n,e.getUint32(56,!0),17,2792965006),r=u(r,n=a(n,i,o,r,e.getUint32(60,!0),22,1236535329),i,o,e.getUint32(4,!0),5,4129170786),o=u(o,r,n,i,e.getUint32(24,!0),9,3225465664),i=u(i,o,r,n,e.getUint32(44,!0),14,643717713),n=u(n,i,o,r,e.getUint32(0,!0),20,3921069994),r=u(r,n,i,o,e.getUint32(20,!0),5,3593408605),o=u(o,r,n,i,e.getUint32(40,!0),9,38016083),i=u(i,o,r,n,e.getUint32(60,!0),14,3634488961),n=u(n,i,o,r,e.getUint32(16,!0),20,3889429448),r=u(r,n,i,o,e.getUint32(36,!0),5,568446438),o=u(o,r,n,i,e.getUint32(56,!0),9,3275163606),i=u(i,o,r,n,e.getUint32(12,!0),14,4107603335),n=u(n,i,o,r,e.getUint32(32,!0),20,1163531501),r=u(r,n,i,o,e.getUint32(52,!0),5,2850285829),o=u(o,r,n,i,e.getUint32(8,!0),9,4243563512),i=u(i,o,r,n,e.getUint32(28,!0),14,1735328473),r=c(r,n=u(n,i,o,r,e.getUint32(48,!0),20,2368359562),i,o,e.getUint32(20,!0),4,4294588738),o=c(o,r,n,i,e.getUint32(32,!0),11,2272392833),i=c(i,o,r,n,e.getUint32(44,!0),16,1839030562),n=c(n,i,o,r,e.getUint32(56,!0),23,4259657740),r=c(r,n,i,o,e.getUint32(4,!0),4,2763975236),o=c(o,r,n,i,e.getUint32(16,!0),11,1272893353),i=c(i,o,r,n,e.getUint32(28,!0),16,4139469664),n=c(n,i,o,r,e.getUint32(40,!0),23,3200236656),r=c(r,n,i,o,e.getUint32(52,!0),4,681279174),o=c(o,r,n,i,e.getUint32(0,!0),11,3936430074),i=c(i,o,r,n,e.getUint32(12,!0),16,3572445317),n=c(n,i,o,r,e.getUint32(24,!0),23,76029189),r=c(r,n,i,o,e.getUint32(36,!0),4,3654602809),o=c(o,r,n,i,e.getUint32(48,!0),11,3873151461),i=c(i,o,r,n,e.getUint32(60,!0),16,530742520),r=p(r,n=c(n,i,o,r,e.getUint32(8,!0),23,3299628645),i,o,e.getUint32(0,!0),6,4096336452),o=p(o,r,n,i,e.getUint32(28,!0),10,1126891415),i=p(i,o,r,n,e.getUint32(56,!0),15,2878612391),n=p(n,i,o,r,e.getUint32(20,!0),21,4237533241),r=p(r,n,i,o,e.getUint32(48,!0),6,1700485571),o=p(o,r,n,i,e.getUint32(12,!0),10,2399980690),i=p(i,o,r,n,e.getUint32(40,!0),15,4293915773),n=p(n,i,o,r,e.getUint32(4,!0),21,2240044497),r=p(r,n,i,o,e.getUint32(32,!0),6,1873313359),o=p(o,r,n,i,e.getUint32(60,!0),10,4264355552),i=p(i,o,r,n,e.getUint32(24,!0),15,2734768916),n=p(n,i,o,r,e.getUint32(52,!0),21,1309151649),r=p(r,n,i,o,e.getUint32(16,!0),6,4149444226),o=p(o,r,n,i,e.getUint32(44,!0),10,3174756917),i=p(i,o,r,n,e.getUint32(8,!0),15,718787259),n=p(n,i,o,r,e.getUint32(36,!0),21,3951481745),t[0]=r+t[0]&4294967295,t[1]=n+t[1]&4294967295,t[2]=i+t[2]&4294967295,t[3]=o+t[3]&4294967295}},2081:function(e,t,r){var n=r(25).Buffer,i=r(129);new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53);function o(){this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=new Uint32Array(80),this.offset=0,this.shift=24,this.totalLength=0}e.exports=o,o.BLOCK_SIZE=64,o.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=(e=i.convertToBuffer(e)).length;this.totalLength+=8*t;for(var r=0;r<t;r++)this.write(e[r]);return this},o.prototype.write=function(e){this.block[this.offset]|=(255&e)<<this.shift,this.shift?this.shift-=8:(this.offset++,this.shift=24),16===this.offset&&this.processBlock()},o.prototype.digest=function(e){this.write(128),(this.offset>14||14===this.offset&&this.shift<24)&&this.processBlock(),this.offset=14,this.shift=24,this.write(0),this.write(0),this.write(this.totalLength>0xffffffffff?this.totalLength/1099511627776:0),this.write(this.totalLength>4294967295?this.totalLength/4294967296:0);for(var t=24;t>=0;t-=8)this.write(this.totalLength>>t);var r=new n(20),i=new DataView(r.buffer);return i.setUint32(0,this.h0,!1),i.setUint32(4,this.h1,!1),i.setUint32(8,this.h2,!1),i.setUint32(12,this.h3,!1),i.setUint32(16,this.h4,!1),e?r.toString(e):r},o.prototype.processBlock=function(){for(var e=16;e<80;e++){var t=this.block[e-3]^this.block[e-8]^this.block[e-14]^this.block[e-16];this.block[e]=t<<1|t>>>31}var r,n,i=this.h0,o=this.h1,s=this.h2,a=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(r=a^o&(s^a),n=1518500249):e<40?(r=o^s^a,n=1859775393):e<60?(r=o&s|a&(o|s),n=2400959708):(r=o^s^a,n=3395469782);var c=(i<<5|i>>>27)+r+u+n+(0|this.block[e]);u=a,a=s,s=o<<30|o>>>2,o=i,i=c}for(this.h0=this.h0+i|0,this.h1=this.h1+o|0,this.h2=this.h2+s|0,this.h3=this.h3+a|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},2082:function(e,t,r){var n=r(25).Buffer,i=r(129),o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
9734187,3204031479,3329325298]),s=Math.pow(2,53)-1;function a(){this.state=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}e.exports=a,a.BLOCK_SIZE=64,a.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(i.isEmptyData(e))return this;var t=0,r=(e=i.convertToBuffer(e)).byteLength;if(this.bytesHashed+=r,8*this.bytesHashed>s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=e[t++],r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},a.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),i=this.bufferLength;if(r.setUint8(this.bufferLength++,128),i%64>=56){for(var o=this.bufferLength;o<64;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(o=this.bufferLength;o<56;o++)r.setUint8(o,0);r.setUint32(56,Math.floor(t/4294967296),!0),r.setUint32(60,t),this.hashBuffer(),this.finished=!0}var s=new n(32);for(o=0;o<8;o++)s[4*o]=this.state[o]>>>24&255,s[4*o+1]=this.state[o]>>>16&255,s[4*o+2]=this.state[o]>>>8&255,s[4*o+3]=this.state[o]>>>0&255;return e?s.toString(e):s},a.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,r=t[0],n=t[1],i=t[2],s=t[3],a=t[4],u=t[5],c=t[6],p=t[7],l=0;l<64;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var h=this.temp[l-2],d=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,f=((h=this.temp[l-15])>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[l]=(d+this.temp[l-7]|0)+(f+this.temp[l-16]|0)}var m=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&u^~a&c)|0)+(p+(o[l]+this.temp[l]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;p=c,c=u,u=a,a=s+m|0,s=i,i=n,n=r,r=m+g|0}t[0]+=r,t[1]+=n,t[2]+=i,t[3]+=s,t[4]+=a,t[5]+=u,t[6]+=c,t[7]+=p}},2083:function(e,t,r){(function(e,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof n&&n;s.global!==s&&s.window!==s&&s.self;var a,u=2147483647,c=/^xn--/,p=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(h[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(l,".")).split("."),t).join(".")}function v(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function b(e){return g(e,(function(e){var t="";return e>65535&&(t+=f((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=f(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=36)e=d(e/35);return d(n+36*e/(e+38))}function w(e){var t,r,n,i,o,s,a,c,p,l,h,f=[],g=e.length,y=0,v=128,S=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m("not-basic"),f.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=y,s=1,a=36;i>=g&&m("invalid-input"),((c=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||c>d((u-y)/s))&&m("overflow"),y+=c*s,!(c<(p=a<=S?1:a>=S+26?26:a-S));a+=36)s>d(u/(l=36-p))&&m("overflow"),s*=l;S=_(y-o,t=f.length+1,0==o),d(y/t)>u-v&&m("overflow"),v+=d(y/t),y%=t,f.splice(y++,0,v)}return b(f)}function C(e){var t,r,n,i,o,s,a,c,p,l,h,g,y,b,w,C=[];for(g=(e=v(e)).length,t=128,r=0,o=72,s=0;s<g;++s)(h=e[s])<128&&C.push(f(h));for(n=i=C.length,i&&C.push("-");n<g;){for(a=u,s=0;s<g;++s)(h=e[s])>=t&&h<a&&(a=h);for(a-t>d((u-r)/(y=n+1))&&m("overflow"),r+=(a-t)*y,t=a,s=0;s<g;++s)if((h=e[s])<t&&++r>u&&m("overflow"),h==t){for(c=r,p=36;!(c<(l=p<=o?1:p>=o+26?26:p-o));p+=36)w=c-l,b=36-l,C.push(f(S(l+w%b,0))),c=d(w/b);C.push(f(S(c,0))),o=_(r,y,n==i),r=0,++n}++r,++t}return C.join("")}a={version:"1.4.1",ucs2:{decode:v,encode:b},decode:w,encode:C,toASCII:function(e){return y(e,(function(e){return p.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?w(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}()}).call(this,r(184)(e),r(39))},2084:function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},2085:function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var p=0;p<c;++p){var l,h,d,f,m=e[p].replace(a,"%20"),g=m.indexOf(r);g>=0?(l=m.substr(0,g),h=m.substr(g+1)):(l=m,h=""),d=decodeURIComponent(l),f=decodeURIComponent(h),n(s,d)?i(s[d])?s[d].push(f):s[d]=[s[d],f]:s[d]=f}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},2086:function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(s(e),(function(s){var a=encodeURIComponent(n(s))+r;return i(e[s])?o(e[s],(function(e){return a+encodeURIComponent(n(e))})).join(t):a+encodeURIComponent(n(e[s]))})).join(t):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},2087:function(e,t){e.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},2088:function(e,t,r){var n=r(2089).eventMessageChunker,i=r(2090).parseEvent;e.exports={createEventStream:function(e,t,r){for(var o=n(e),s=[],a=0;a<o.length;a++)s.push(i(t,o[a],r));return s}}},2089:function(e,t){e.exports={eventMessageChunker:function(e){for(var t=[],r=0;r<e.length;){var n=e.readInt32BE(r),i=e.slice(r,n+r);
vendor: 9,058 bytes, line 9
9r+=n,t.push(i)}return t}}},2090:function(e,t,r){var n=r(2091).parseMessage;e.exports={parseEvent:function(e,t,r){var i=n(t),o=i.headers[":message-type"];if(o){if("error"===o.value)throw function(e){var t=e.headers[":error-code"],r=e.headers[":error-message"],n=new Error(r.value||r);return n.code=n.name=t.value||t,n}(i);if("event"!==o.value)return}var s=i.headers[":event-type"],a=r.members[s.value];if(a){var u={},c=a.eventPayloadMemberName;if(c){var p=a.members[c];"binary"===p.type?u[c]=i.body:u[c]=e.parse(i.body.toString(),p)}for(var l=a.eventHeaderMemberNames,h=0;h<l.length;h++){var d=l[h];i.headers[d]&&(u[d]=a.members[d].toType(i.headers[d].value))}var f={};return f[s.value]=u,f}}}},2091:function(e,t,r){var n=r(2092).Int64,i=r(2093).splitMessage;function o(e){for(var t={},r=0;r<e.length;){var i=e.readUInt8(r++),o=e.slice(r,r+i).toString();switch(r+=i,e.readUInt8(r++)){case 0:t[o]={type:"boolean",value:!0};break;case 1:t[o]={type:"boolean",value:!1};break;case 2:t[o]={type:"byte",value:e.readInt8(r++)};break;case 3:t[o]={type:"short",value:e.readInt16BE(r)},r+=2;break;case 4:t[o]={type:"integer",value:e.readInt32BE(r)},r+=4;break;case 5:t[o]={type:"long",value:new n(e.slice(r,r+8))},r+=8;break;case 6:var s=e.readUInt16BE(r);r+=2,t[o]={type:"binary",value:e.slice(r,r+s)},r+=s;break;case 7:var a=e.readUInt16BE(r);r+=2,t[o]={type:"string",value:e.slice(r,r+a).toString()},r+=a;break;case 8:t[o]={type:"timestamp",value:new Date(new n(e.slice(r,r+8)).valueOf())},r+=8;break;case 9:var u=e.slice(r,r+16).toString("hex");r+=16,t[o]={type:"uuid",value:u.substr(0,8)+"-"+u.substr(8,4)+"-"+u.substr(12,4)+"-"+u.substr(16,4)+"-"+u.substr(20)};break;default:throw new Error("Unrecognized header type tag")}}return t}e.exports={parseMessage:function(e){var t=i(e);return{headers:o(t.headers),body:t.body}}}},2092:function(e,t,r){var n=r(23).util,i=n.buffer.toBuffer;function o(e){if(8!==e.length)throw new Error("Int64 buffers must be exactly 8 bytes");n.Buffer.isBuffer(e)||(e=i(e)),this.bytes=e}function s(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}o.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&s(t),new o(t)},o.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&s(e),parseInt(e.toString("hex"),16)*(t?-1:1)},o.prototype.toString=function(){return String(this.valueOf())},e.exports={Int64:o}},2093:function(e,t,r){var n=r(23).util,i=n.buffer.toBuffer;e.exports={splitMessage:function(e){if(n.Buffer.isBuffer(e)||(e=i(e)),e.length<16)throw new Error("Provided message too short to accommodate event stream message overhead");if(e.length!==e.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var t=e.readUInt32BE(8);if(t!==n.crypto.crc32(e.slice(0,8)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var r=e.readUInt32BE(e.length-4);if(r!==n.crypto.crc32(e.slice(0,e.length-4)))throw new Error("The message checksum did not match the expected value of "+r);var o=12+e.readUInt32BE(4);return{headers:e.slice(12,o),body:e.slice(o,e.length-4)}}}},2094:function(e,t,r){var n=r(23),i=r(109);n.TemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.loadMasterCredentials(t),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.masterCredentials.get((function(){t.service.config.credentials=t.masterCredentials,(t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken).call(t.service,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))}))},loadMasterCredentials:function(e){for(this.masterCredentials=e||n.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new n.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new i({params:this.params})}})},2095:function(e,t,r){var n=r(23);n.util.update(n.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new n.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)}})},2096:function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2011-06-15","endpointPrefix":"sts","globalEndpoint":"sts.amazonaws.com","protocol":"query","serviceAbbreviation":"AWS STS","serviceFullName":"AWS Security Token Service","serviceId":"STS","signatureVersion":"v4","uid":"sts-2011-06-15","xmlNamespace":"https://sts.amazonaws.com/doc/2011-06-15/"},"operations":{"AssumeRole":{"input":{"type":"structure","required":["RoleArn","RoleSessionName"],"members":{"RoleArn":{},"RoleSessionName":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"},"ExternalId":{},"SerialNumber":{},"TokenCode":{}}},"output":{"resultWrapper":"AssumeRoleResult","type":"structure","members":{"Credentials":{"shape":"Sc"},"AssumedRoleUser":{"shape":"Sh"},"PackedPolicySize":{"type":"integer"}}}},"AssumeRoleWithSAML":{"input":{"type":"structure","required":["RoleArn","PrincipalArn","SAMLAssertion"],"members":{"RoleArn":{},"PrincipalArn":{},"SAMLAssertion":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithSAMLResult","type":"structure","members":{"Credentials":{"shape":"Sc"},"AssumedRoleUser":{"shape":"Sh"},"PackedPolicySize":{"type":"integer"},"Subject":{},"SubjectType":{},"Issuer":{},"Audience":{},"NameQualifier":{}}}},"AssumeRoleWithWebIdentity":{"input":{"type":"structure","required":["RoleArn","RoleSessionName","WebIdentityToken"],"members":{"RoleArn":{},"RoleSessionName":{},"WebIdentityToken":{},"ProviderId":{},"PolicyArns":{"shape":"S4"},"Policy":{},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"AssumeRoleWithWebIdentityResult","type":"structure","members":{"Credentials":{"shape":"Sc"},"SubjectFromWebIdentityToken":{},"AssumedRoleUser":{"shape":"Sh"},"PackedPolicySize":{"type":"integer"},"Provider":{},"Audience":{}}}},"DecodeAuthorizationMessage":{"input":{"type":"structure","required":["EncodedMessage"],"members":{"EncodedMessage":{}}},"output":{"resultWrapper":"DecodeAuthorizationMessageResult","type":"structure","members":{"DecodedMessage":{}}}},"GetAccessKeyInfo":{"input":{"type":"structure","required":["AccessKeyId"],"members":{"AccessKeyId":{}}},"output":{"resultWrapper":"GetAccessKeyInfoResult","type":"structure","members":{"Account":{}}}},"GetCallerIdentity":{"input":{"type":"structure","members":{}},"output":{"resultWrapper":"GetCallerIdentityResult","type":"structure","members":{"UserId":{},"Account":{},"Arn":{}}}},"GetFederationToken":{"input":{"type":"structure","required":["Name"],"members":{"Name":{},"Policy":{},"PolicyArns":{"shape":"S4"},"DurationSeconds":{"type":"integer"}}},"output":{"resultWrapper":"GetFederationTokenResult","type":"structure","members":{"Credentials":{"shape":"Sc"},"FederatedUser":{"type":"structure","required":["FederatedUserId","Arn"],"members":{"FederatedUserId":{},"Arn":{}}},"PackedPolicySize":{"type":"integer"}}}},"GetSessionToken":{"input":{"type":"structure","members":{"DurationSeconds":{"type":"integer"},"SerialNumber":{},"TokenCode":{}}},"output":{"resultWrapper":"GetSessionTokenResult","type":"structure","members":{"Credentials":{"shape":"Sc"}}}}},"shapes":{"S4":{"type":"list","member":{"type":"structure","members":{"arn":{}}}},"Sc":{"type":"structure","required":["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],"members":{"AccessKeyId":{},"SecretAccessKey":{},"SessionToken":{},"Expiration":{"type":"timestamp"}}},"Sh":{"type":"structure","required":["AssumedRoleId","Arn"],"members":{"AssumedRoleId":{},"Arn":{}}}}}')},2097:function(e){e.exports=JSON.parse('{"pagination":{}}')},2098:function(e,t,r){var n=r(23),i=r(109);n.ChainableTemporaryCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=n.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new n.util.error(new Error("tokenCodeFn must be a function when params.Seri
9alNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}config=n.util.merge({params:t,credentials:e.masterCredentials||n.config.credentials},e.stsConfig||{}),this.service=new i(config)},refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this,r=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode((function(n,i){var o={};n?e(n):(i&&(o.TokenCode=i),t.service[r](o,(function(r,n){r||t.service.credentialsFrom(n,t),e(r)})))}))},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,(function(r,i){if(r){var o=r;return r instanceof Error&&(o=r.message),void e(n.util.error(new Error("Error fetching MFA token: "+o),{code:t.errorCode}))}e(null,i)})):e(null)}})},2099:function(e,t,r){var n=r(23),i=r(109);n.WebIdentityCredentials=n.util.inherit(n.Credentials,{constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=n.util.copy(t||{})}
9,refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity((function(r,n){t.data=null,r||(t.data=n,t.service.credentialsFrom(n,t)),e(r)}))},createClients:function(){if(!this.service){var e=n.util.merge({},this._clientConfig);e.params=this.params,this.service=new i(e)}}})},21:function(e,t,r){"use strict";var n=r(12),i=r(375),o=r(376),s={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new n.k).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 u(){return(new Date).getTime()}function c(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var p,l={},h=function(){function e(){}return e.clear=function(){l={}},e.getItem=function(e){return l[e]||null},e.setItem=function(e,t){l[e]=t},e.removeItem=function(e){delete l[e]},e}(),d=function(e){this.key=e||"",this.prevNode=null,this.nextNode=null},f=function(){function e(){this.head=new d,this.tail=new d,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 d(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);e<t.length;e++){var r=t[e];this.hashtable.hasOwnProperty(r)&&delete this.hashtable[r]}this.head.nextNode=this.tail,this.tail.prevNode=this.head,this.length=0},e.prototype.getKeys=function(){return Object.keys(this.hashtable)},e.prototype.isHeadNode=function(e){return this.hashtable[e].prevNode===this.head},e.prototype.isTailNode=function(e){return this.hashtable[e].nextNode===this.tail},e}(),m=new n.c("StorageCache"),g=function(){function e(e){this.config=Object.assign({},e),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return e.prototype.getModuleName=function(){return"Cache"},e.prototype.checkConfig=function(){c(this.config.capacityInBytes)||(m.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=s.capacityInBytes),c(this.config.itemMaxSize)||(m.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=s.itemMaxSize),c(this.config.defaultTTL)||(m.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=s.defaultTTL),c(this.config.defaultPriority)||(m.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=s.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(m.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=s.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(m.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=s.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(m.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=s.warningThreshold);this.config.capacityInBytes>5242880&&(m.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=s.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,r){var n={key:e,data:t,timestamp:u(),visitedTime:u(),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&&m.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}
9(),y=(p=function(e,t){return(p=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])})(e,t)},function(e,t){function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=new n.c("Cache"),b=new(function(e){function t(t){var r=this,n=t?Object.assign({},s,t):s;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=u(),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 u()>=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(e){this._decreaseCurSizeInBytes(t.byteSize),v.error("Failed to set item "+e)}},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;r<this.config.storage.length;r+=1)t.push(this.config.storage.key(r));for(r=0;r<t.length;r+=1){var n=t[r];0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&(this._isExpired(n)?this._removeItem(n):e.push(n))}return e},t.prototype._popOutItems=function(e,t){for(var r=[],n=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var s=JSON.parse(o);r.push(s)}}r.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(i=0;i<r.length;i+=1)if(this._removeItem(r[i].key,r[i].byteSize),(n-=r[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,r){v.log("Set item: key is "+e+", value is "+t+" with options: "+r);var n=this.config.keyPrefix+e;if(n!==this.config.keyPrefix&&n!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:r&&void 0!==r.priority?r.priority:this.config.defaultPriority,expires:r&&void 0!==r.expires?r.expires:this.config.defaultTTL+u()};if(i.priority<1||i.priority>5)v.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(n,t,i);if(o.byteSize>this.config.itemMaxSize)v.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(o.byteSize)){var a=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(a,c)}}this._setItem(n,o)}catch(e){v.warn("setItem failed! "+e)}}}else v.warn("The value of item should not be undefined!");else v.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){v.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 v.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 o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return v.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){v.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(e){v.warn("removeItem failed! "+e)}},t.prototype.clear=function(){v.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var r=this.config.storage.key(t);0===r.indexOf(this.config.keyPrefix)&&e.push(r)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){v.warn("clear failed! "+e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var r=this.config.storage.key(t);0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&e.push(r.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==s.keyPrefix||(v.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=u.toString()),new t(e)},t}(g)),S=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)}}(),_=new n.c("InMemoryCache"),w=(new(function(e){function t(t){var r=this,n=t?Object.assign({},s,t):s;r=e.call(this,n)||this,_.debug("now we start!"),r.cacheList=[],r.curSizeInBytes=0,r.maxPriority=5,r.getItem=r.getItem.bind(r),r.setItem=r.setItem.bind(r),r.removeItem=r.removeItem.bind(r);for(var i=0;i<r.maxPriority;i+=1)r.cacheList[i]=new f;return r}return S(t,e),t.prototype._decreaseCurSizeInBytes=function(e){this.curSizeInBytes-=e},t.prototype._increaseCurSizeInBytes=function(e){this.curSizeInBytes+=e},t.prototype._isExpired=function(e){var t=h.getItem(e),r=JSON.parse(t);return u()>=r.expires},t.prototype._removeItem=function(e,t){this.cacheList[t].removeItem(e),this._decreaseCurSizeInBytes(JSON.parse(h.getItem(e)).byteSize),h.removeItem(e)},t.prototype._setItem=function(e,t,r){this.cacheList[r].insertItem(e),this._increaseCurSizeInBytes(t.byteSize),h.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;r<this.maxPriority;r+=1)if(this.cacheList[r].containsKey(t))return r+1;return-1},t.prototype.setItem=function(e,t,r){var n=this.config.keyPrefix+e;if(n!==this.config.keyPrefix&&n!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:r&&void 0!==r.priority?r.priority:this.config.defaultPriority,expires:r&&void 0!==r.expires?r.expires:this.config.defaultTTL+u()};if(i.priority<1||i.priority>5)_.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(n,t,i);if(o.byteSize>this.config.itemMaxSize)_.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 a=this.maxPriority-1;this._isCacheFull(o.byteSize)&&a>=0;)if(this.cacheList[a].isEmpty())a-=1;else{var c=this.cacheList[a].getLastItem();this._removeItem(c,a)}this._setItem(n,o,Number(o.priority)-1)}}}else _.warn("The value of item should not be undefined!");else _.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 _.warn("Invalid key: should not be empty or 'CurSize'"),null;var i=this.containsKey(e);if(-1!==i){if(!this._isExpired(n)){r=h.getItem(n);var o=JSON.parse(r);return this.cacheList[o.priority-1].refresh(n),o.data}this._removeItem(n,i-1)}if(t&&void 0!==t.callback){var s=t.callback();return null!==s&&this.setItem(e,s,t),s}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<this.maxPriority;e+=1)for(var t=0,r=this.cacheList[e].getKeys();t<r.length;t++){var n=r[t];this._removeItem(n,e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.maxPriority;t+=1)for(var r=0,n=this.cacheList[t].getKeys();r<n.length;r++){var i=n[r];e.push(i.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){return this.curSizeInBytes},t.prototype.createInstance=function(e){return new t(e)},t}(g)),b);n.l.register(b);var C=r(62),A=function(){return(A=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},E=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
9function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},T=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},x="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",R=function(e,t){n.f.dispatch("analytics",{event:e,data:t},"Analytics",x)},k=new n.c("AWSPinpointProvider"),P=[429,500],N=[202],U=navigator&&"function"==typeof navigator.sendBeacon,q=function(){function e(e){this._endpointGenerating=!0,this._buffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||1e3,this._config.flushSize=this._config.flushSize||100,this._config.flushInterval=this._config.flushInterval||5e3,this._config.resendLimit=this._config.resendLimit||5,this._clientInfo=n.b.clientInfo()}return e.prototype._setupTimer=function(){var e=this;this._timer&&clearInterval(this._timer);var t=this._config,r=t.flushSize,n=t.flushInterval,i=this;this._timer=setInterval((function(){for(var t=e._buffer.length<r?e._buffer.length:r,n=0;n<t;n+=1){var o=e._buffer.shift(),s=o.params,a=o.handlers;if(i._send(s,a),e._endpointGenerating)break}}),n)},e.prototype._putToBuffer=function(e,t){var r=this._config.bufferSize;if(!(this._buffer.length<r))return k.debug("exceed analytics events buffer size"),t.reject(new Error("Exceed the size of analytics events buffer"));this._buffer.push({params:e,handlers:t})},e.prototype.getCategory=function(){return e.category},e.prototype.getProviderName=function(){return e.providerName},e.prototype.configure=function(e){var t=this;k.debug("configure Analytics",e);var r=e||{};if(this._config=Object.assign({},this._config,r),this._config.appId&&!this._config.disabled){if(this._config.endpointId)R("pinpointProvider_configured",null);else{var n=this.getProviderName()+"_"+this._config.appId;this._getEndpointId(n).then((function(e){k.debug("setting endpoint id from the cache",e),t._config.endpointId=e,R("pinpointProvider_configured",null)})).catch((function(e){k.debug("Failed to generate endpointId",e)}))}this._setupTimer()}else this._timer&&clearInterval(this._timer);return this._config},e.prototype.record=function(e,t){return I(this,void 0,void 0,(function(){var r,n;return E(this,(function(i){switch(i.label){case 0:return[4,this._getCredentials()];case 1:return(r=i.sent())&&this._config.appId&&this._config.region?(n=(new Date).getTime(),this._generateSession(e),e.event.eventId=Object(C.v1)(),Object.assign(e,{timestamp:n,config:this._config,credentials:r}),e.event.immediate?[2,this._send(e,t)]:(this._putToBuffer(e,t),[2])):(k.debug("cannot send events without credentials, applicationId or region"),[2,t.reject(new Error("No credentials, applicationId or region"))])}}))}))},e.prototype._generateSession=function(e){this._sessionId=this._sessionId||Object(C.v1)();var t=e.event;switch(t.name){case"_session.start":this._sessionStartTimestamp=(new Date).getTime(),this._sessionId=Object(C.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()};break;
9case"_session.stop":var r=(new Date).getTime();this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||Object(C.v1)(),t.session={Id:this._sessionId,Duration:r-this._sessionStartTimestamp,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString(),StopTimestamp:new Date(r).toISOString()},this._sessionId=void 0,this._sessionStartTimestamp=void 0;break;default:this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||Object(C.v1)(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()}}},e.prototype._send=function(e,t){return I(this,void 0,void 0,(function(){var r;return E(this,(function(n){switch(r=e.event,e.config,r.name){case"_update_endpoint":return[2,this._updateEndpoint(e,t)];case"_session.stop":return[2,this._pinpointSendStopSession(e,t)];default:return[2,this._record(e,t)]}return[2]}))}))},e.prototype._generateBatchItemContext=function(e){var t=e.event,r=e.timestamp,n=e.config,i=(e.credentials,t.name),o=t.attributes,s=t.metrics,a=t.eventId,u=t.session,c=n.appId,p=n.endpointId,l={ApplicationId:c,EventsRequest:{BatchItem:{}}};l.EventsRequest.BatchItem[p]={};var h=l.EventsRequest.BatchItem[p];return h.Endpoint={},h.Events={},h.Events[a]={EventType:i,Timestamp:new Date(r).toISOString(),Attributes:o,Metrics:s,Session:u},l},e.prototype._pinpointPutEvents=function(e,t){return I(this,void 0,void 0,(function(){var r,n,i,o,s=this;return E(this,(function(a){return r=e.event.eventId,n=e.config.endpointId,i=this._generateBatchItemContext(e),(o=this.pinpointClient.putEvents(i)).on("build",(function(){o.httpRequest.path=o.httpRequest.path+"/legacy"})),o.send((function(i,o){if(i)return k.error("record event failed. ",i),k.warn('If you have not updated your Pinpoint IAM Policy with the Action: "mobiletargeting:PutEvents" yet, please do it. This action is not necessary for now but in order to avoid breaking changes in the future, please update it as soon as possible.'),t.reject(i);var a=n,u=r,c=o.EventsResponse.Results[a].EventsItemResponse[u],p=c.StatusCode,l=c.Message;return N.includes(p)?(s._endpointGenerating=!1,k.debug("record event success. ",o),t.resolve(o)):P.includes(p)?void s._retry(e,t):(k.error("Event "+r+" is not accepted, the error is "+l),t.reject(o))})),[2]}))}))},e.prototype._pinpointSendStopSession=function(e,t){if(U){var r=this._generateBatchItemContext(e),i=this._config.region,o=r.ApplicationId,s=r.EventsRequest,a={secret_key:this._config.credentials.secretAccessKey,access_key:this._config.credentials.accessKeyId,session_token:this._config.credentials.sessionToken},u="https://pinpoint."+i+".amazonaws.com/v1/apps/"+o+"/events",c=JSON.stringify(s),p={url:u,body:c,method:"POST"},l={region:i,service:"mobiletargeting"},h=n.j.signUrl(p,a,l,null);return navigator.sendBeacon(h,c)?t.resolve("sendBeacon success"):t.reject("sendBeacon failure")}this._record(e,t)},e.prototype._retry=function(e,t){var r=e.config.resendLimit;e.resendLimit="number"==typeof e.resendLimit?e.resendLimit:r,e.resendLimit-- >0?(k.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._putToBuffer(e,t)):k.debug("retry times used up for event "+e.eventName)},e.prototype._record=function(e,t){return I(this,void 0,void 0,(function(){var r,n;return E(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 I(this,void 0,void 0,(function(){var r,i,o,s,a,u,c,p,l=this;return E(this,(function(h){return e.timestamp,r=e.config,i=e.credentials,o=e.event,s=r.appId,r.region,a=r.endpointId,this._initClients(r,i),u=this._endpointRequest(r,
9n.g.transferKeyToLowerCase(o,[],["attributes","userAttributes","Attributes","UserAttributes"])),c={ApplicationId:s,EndpointId:a,EndpointRequest:u},p=this,k.debug("updateEndpoint with params: ",c),p.pinpointClient.updateEndpoint(c,(function(r,n){return r?(k.debug("updateEndpoint failed",r),r.message.startsWith("Exceeded maximum endpoint per user count")?void l._removeUnusedEndpoints(s,u.User.UserId).then((function(){k.debug("Remove the unused endpoints successfully"),l._retry(e,t)})).catch((function(e){return k.warn("Failed to remove unused endpoints with error: "+e),k.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)):(k.debug("updateEndpoint success",n),l._endpointGenerating=!1,t.resolve(n))})),[2]}))}))},e.prototype._removeUnusedEndpoints=function(e,t){return I(this,void 0,void 0,(function(){var r=this;return E(this,(function(n){return[2,new Promise((function(n,i){r.pinpointClient.getUserEndpoints({ApplicationId:e,UserId:t},(function(o,s){if(o)return k.debug("Failed to get endpoints associated with the userId: "+t+" with error",o),i(o);var a=s.EndpointsResponse.Item;k.debug("get endpoints associated with the userId: "+t+" with data",a);for(var u=a[0],c=1;c<a.length;c++){var p=Date.parse(u.EffectiveDate),l=Date.parse(a[c].EffectiveDate);if(isNaN(p))break;if(isNaN(l)){u=a[c];break}l<p&&(u=a[c])}var h={ApplicationId:e,EndpointId:u.Id,EndpointRequest:{User:{UserId:""}}};r.pinpointClient.updateEndpoint(h,(function(e,t){return e?(k.debug("Failed to update the endpoint",e),i(e)):(k.debug("The old endpoint is updated with an empty string for user id"),n(t))}))}))}))]}))}))},e.prototype._initClients=function(e,t){return I(this,void 0,void 0,(function(){var r;return E(this,(function(s){return k.debug("init clients"),this.mobileAnalytics&&this.pinpointClient&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId?(k.debug("no change for aws credentials, directly return from init"),[2]):(this._config.credentials=t,r=e.region,k.debug("init clients with credentials",t),this.mobileAnalytics=new i({credentials:t,region:r}),this.pinpointClient=new o({region:r,credentials:t}),n.i.isReactNative&&this.pinpointClient.customizeRequests((function(e){e.on("build",(function(e){e.httpRequest.headers["user-agent"]=n.i.userAgent}))})),[2])}))}))},e.prototype._getEndpointId=function(e){return I(this,void 0,void 0,(function(){var t;return E(this,(function(r){switch(r.label){case 0:return[4,w.getItem(e)];case 1:return t=r.sent(),k.debug("endpointId from cache",t,"type",typeof t),t||(t=Object(C.v1)(),w.setItem(e,t)),[2,t]}}))}))},e.prototype._endpointRequest=function(e,t){var r=e.credentials,i=this._clientInfo||{},o=e.clientContext||{},s=e.endpoint||{},a={appVersion:i.appVersion,make:i.make,model:i.model,modelVersion:i.version,platform:i.platform},u=(o.clientId,o.appTitle,o.appVersionName,o.appVersionCode,o.appPackageName,T(o,["clientId","appTitle","appVersionName","appVersionCode","appPackageName"])),c=t.address?"android"===i.platform?"GCM":"APNS":void 0,p=A(A(A({channelType:c,requestId:Object(C.v1)(),effectiveDate:(new Date).toISOString()},s),t),{attributes:A(A({},s.attributes),t.attributes),demographic:A(A(A(A({},a),u),s.demographic),t.demographic),location:A(A({},s.location),t.location),metrics:A(A({},s.metrics),t.metrics),user:{userId:t.userId||s.userId||r.identityId,userAttributes:A(A({},s.userAttributes),t.userAttributes)}}),l=(p.userId,p.userAttributes,p.name,p.session,p.eventId,p.immediate,T(p,["userId","userAttributes","name","session","eventId","immediate"]));return n.g.transferKeyToUpperCase(l,[],["metrics","userAttributes","attributes"])},e.prototype._getCredentials=function(){return n.e.get().then((function(e){return e?(k.debug("set credentials for analytics",e),n.e.shear(e)):null})).catch((function(e){return k.debug("ensure credentials error",e),null}))},e.category="Analytics",e.providerName="AWSPinpoint",e}(),D=[],O=function(){function e(e,t){this.context=e,this.methodName=t,this._originalMethod=e[t].bind(e)}return e.add=function(e,t,r){L(e,t).set(r)},e.remove=function(e,t){L(e,t).remove()},e.prototype.set=function(e){var t=this;this.context[this.methodName]=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e(t._originalMethod.apply(t,r))}},e.prototype.remove=function(){this.context[this.methodName]=this._originalMethod},e}(),M=O;function L(e,t){var r=D.filter((function(r){return r.context===e&&r.methodName===t}))[0];return r||(r=new O(e,t),D.push(r)),r}var j=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},F=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
9function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},B=new n.c("PageViewTracker"),z="aws-amplify-analytics-prevUrl",V={enable:!1,provider:"AWSPinpoint",getUrl:function(){return n.g.browserOrNode().isBrowser?window.location.origin+window.location.pathname:""}},H=function(){function e(e,t){B.debug("initialize pageview tracker with opts",t),this._config=Object.assign({},V,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),"SPA"===this._config.type?this._pageViewTrackSPA():this._pageViewTrackDefault()}return e.prototype.configure=function(e){return Object.assign(this._config,e),"SPA"===this._config.type&&this._pageViewTrackSPA(),this._config},e.prototype._isSameUrl=function(){return sessionStorage.getItem(z)===this._config.getUrl()&&(B.debug("the url is same"),!0)},e.prototype._pageViewTrackDefault=function(){return j(this,void 0,void 0,(function(){var e,t,r,i;return F(this,(function(o){switch(o.label){case 0:return n.g.browserOrNode().isBrowser&&window.addEventListener&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(B.debug("not in the supported web enviroment"),[2]);case 1:return r=o.sent(),[3,3];case 2:r=this._config.attributes,o.label=3;case 3:return t=r,i=Object.assign({url:e},t),this._config.enable&&!this._isSameUrl()&&(this._tracker({name:this._config.eventName||"pageView",attributes:i},this._config.provider).catch((function(e){B.debug("Failed to record the page view event",e)})),sessionStorage.setItem(z,e)),[2]}}))}))},e.prototype._trackFunc=function(){return j(this,void 0,void 0,(function(){var e,t,r,i;return F(this,(function(o){switch(o.label){case 0:return n.g.browserOrNode().isBrowser&&window.addEventListener&&history.pushState&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(B.debug("not in the supported web enviroment"),[2]);case 1:return r=o.sent(),[3,3];case 2:r=this._config.attributes,o.label=3;case 3:return t=r,i=Object.assign({url:e},t),this._isSameUrl()||(this._tracker({name:this._config.eventName||"pageView",attributes:i},this._config.provider).catch((function(e){B.debug("Failed to record the page view event",e)})),sessionStorage.setItem(z,e)),[2]}}))}))},e.prototype._pageViewTrackSPA=function(){n.g.browserOrNode().isBrowser&&window.addEventListener&&history.pushState?this._config.enable&&!this._hasEnabled?(M.add(history,"pushState",this._trackFunc),M.add(history,"replaceState",this._trackFunc),window.addEventListener("popstate",this._trackFunc),this._trackFunc(),this._hasEnabled=!0):(M.remove(history,"pushState"),M.remove(history,"replaceState"),window.removeEventListener("popstate",this._trackFunc),this._hasEnabled=!1):B.debug("not in the supported web enviroment")},e}(),K=n.g.browserOrNode().isBrowser&&window.Element?window.Element.prototype:null,W=K?K.matches||K.matchesSelector||K.webkitMatchesSelector||K.mozMatchesSelector||K.msMatchesSelector||K.oMatchesSelector:null;function G(e,t){if(e&&1===e.nodeType&&t){if("string"==typeof t||1===t.nodeType)return e===t||J(e,t);if("length"in t)for(var r=0,n=void 0;n=t[r];r++)if(e===n||J(e,n))return!0}return!1}function J(e,t){if("string"!=typeof t)return!1;if(W)return W.call(e,t);for(var r=e.parentNode.querySelectorAll(t),n=0,i=void 0;i=r[n];n++)if(i===e)return!0;return!1}function X(e,t,r,n,i){void 0===i&&(i={});var o=function(e){var t;if(i.composed&&"function"==typeof e.composedPath)for(var o=e.composedPath(),s=0,a=void 0;a=o[s];s++)1===a.nodeType&&G(a,r)&&(t=a);else t=function(e,t,r){if(void 0===r&&(r=!1),e&&1===e.nodeType&&t)for(var n,i=(r?[e]:[]).concat(function(e){for(var t=[],r=e;r&&r.parentNode&&1===r.parentNode.nodeType;)r=r.parentNode,t.push(r);return t}(e)),o=0;n=i[o];o++)if(G(n,t))return n}(e.target,r,!0);t&&n.call(t,e,t)};return e.addEventListener(t,o,i.useCapture),{destroy:function(){e.removeEventListener(t,o,i.useCapture)}}}RegExp(":(80|443)$"),n.g.browserOrNode().isBrowser&&document.createElement("a");var $,Z,Y,Q=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},ee=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
9function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},te=new n.c("EventTracker"),re={enable:!1,events:["click"],selectorPrefix:"data-amplify-analytics-",provider:"AWSPinpoint"},ne=function(){function e(e,t){n.g.browserOrNode().isBrowser&&window.addEventListener?(this._config=Object.assign({},re,t),this._tracker=e,this._delegates={},this._trackFunc=this._trackFunc.bind(this),te.debug("initialize pageview tracker with opts",this._config),this.configure(this._config)):te.debug("not in the supported web environment")}return e.prototype.configure=function(e){var t=this;if(Object.assign(this._config,e),this._config.enable){if(this._config.enable&&0===Object.keys(this._delegates).length){var r="["+this._config.selectorPrefix+"on]";this._config.events.forEach((function(e){t._delegates[e]=X(document,e,r,t._trackFunc,{composed:!0,useCapture:!0})}))}}else Object.keys(this._delegates).forEach((function(e){"function"==typeof t._delegates[e].destroy&&t._delegates[e].destroy()})),this._delegates={};return this._config},e.prototype._trackFunc=function(e,t){return Q(this,void 0,void 0,(function(){var r,n,i,o,s,a,u;return ee(this,(function(c){switch(c.label){case 0:return r={},n=t.getAttribute(this._config.selectorPrefix+"on").split(/\s*,\s*/),i=t.getAttribute(this._config.selectorPrefix+"name"),(o=t.getAttribute(this._config.selectorPrefix+"attrs"))&&o.split(/\s*,\s*/).forEach((function(e){var t=e.trim().split(/\s*:\s*/);r[t[0]]=t[1]})),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return a=c.sent(),[3,3];case 2:a=this._config.attributes,c.label=3;case 3:return s=a,u=Object.assign({type:e.type,target:e.target.localName+" with id "+e.target.id},s,r),te.debug("events needed to be recorded",n),te.debug("attributes needed to be attached",r),n.indexOf(e.type)<0?(te.debug("event "+e.type+" is not selected to be recorded"),[2]):(this._tracker({name:i||"event",attributes:u},this._config.provider).catch((function(t){te.debug("Failed to record the "+e.type+" event', "+t)})),[2])}}))}))},e}(),ie=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},oe=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},se=new n.c("SessionTracker"),ae={enable:!1,provider:"AWSPinpoint"}
9,ue=!1,ce=function(){function e(e,t){this._config=Object.assign({},ae,t),this._tracker=e,this._hasEnabled=!1,this._trackFunc=this._trackFunc.bind(this),this._trackBeforeUnload=this._trackBeforeUnload.bind(this),this.configure(this._config)}return e.prototype._envCheck=function(){if(!n.g.browserOrNode().isBrowser)return!1;if(!document||!document.addEventListener)return se.debug("not in the supported web environment"),!1;if(void 0!==document.hidden)this._hidden="hidden",this._visibilityChange="visibilitychange";else if(void 0!==document.msHidden)this._hidden="msHidden",this._visibilityChange="msvisibilitychange";else{if(void 0===document.webkitHidden)return se.debug("not in the supported web environment"),!1;this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"}return!0},e.prototype._trackFunc=function(){return ie(this,void 0,void 0,(function(){var e,t,r;return oe(this,(function(n){switch(n.label){case 0:return"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return t=n.sent(),[3,3];case 2:t=this._config.attributes,n.label=3;case 3:return e=t,r=Object.assign({},e),document.visibilityState===this._hidden?this._tracker({name:"_session.stop",attributes:r},this._config.provider).catch((function(e){se.debug("record session stop event failed.",e)})):this._tracker({name:"_session.start",attributes:r},this._config.provider).catch((function(e){se.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype._trackBeforeUnload=function(e){var t=this;("function"==typeof this._config.attributes?Promise.resolve(this._config.attributes()):Promise.resolve(this._config.attributes)).then((function(e){var r=Object.assign({},e);t._tracker({name:"_session.stop",attributes:r,immediate:!0},t._config.provider).catch((function(e){se.debug("record session stop event failed.",e)}))}))},e.prototype._sendInitialEvent=function(){return ie(this,void 0,void 0,(function(){var e,t,r;return oe(this,(function(n){switch(n.label){case 0:return ue?(se.debug("the start session has been sent when the page is loaded"),[2]):(ue=!0,"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]);case 1:return t=n.sent(),[3,3];case 2:t=this._config.attributes,n.label=3;case 3:return e=t,r=Object.assign({},e),this._tracker({name:"_session.start",attributes:r},this._config.provider).catch((function(e){se.debug("record session start event failed.",e)})),[2]}}))}))},e.prototype.configure=function(e){return this._envCheck()?(Object.assign(this._config,e),this._config.enable&&!this._hasEnabled?(this._sendInitialEvent(),document.addEventListener(this._visibilityChange,this._trackFunc,!1),window.addEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!0):!this._config.enable&&this._hasEnabled&&(document.removeEventListener(this._visibilityChange,this._trackFunc,!1),window.removeEventListener("beforeunload",this._trackBeforeUnload,!1),this._hasEnabled=!1),this._config):this._config},e}(),pe=function(){return(pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},le=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},he=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},de=new n.c("AnalyticsClass"),fe="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",me={pageView:H,event:ne,session:ce},ge=function(){function e(){this._config={},this._pluggables=[],this._disabled=!1,this._trackers={},this.record=this.record.bind(this)}return e.prototype.getModuleName=function(){return"Analytics"},e.prototype.configure=function(e){var t=this;if(!e)return this._config;de.debug("configure Analytics",e);var r,i,o,s=n.h.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,s.Analytics,e),this._config.disabled&&(this._disabled=!0),this._pluggables.forEac
9h((function(e){var r="AWSPinpoint"!==e.getProviderName()||t._config.AWSPinpoint?t._config[e.getProviderName()]:t._config;e.configure(pe({disabled:t._config.disabled},r))})),0===this._pluggables.length&&this.addPluggable(new q),void 0===this._config.autoSessionRecord&&(this._config.autoSessionRecord=!0),r="configured",i=null,o="The Analytics category has been configured successfully",n.f.dispatch("analytics",{event:r,data:i,message:o},"Analytics",fe),de.debug("current configuration",this._config),this._config},e.prototype.addPluggable=function(e){if(e&&"Analytics"===e.getCategory()){this._pluggables.push(e);var t="AWSPinpoint"!==e.getProviderName()||this._config.AWSPinpoint?this._config[e.getProviderName()]:this._config,r=pe({disabled:this._config.disabled},t);return e.configure(r),r}},e.prototype.getPluggable=function(e){for(var t=0;t<this._pluggables.length;t+=1){var r=this._pluggables[t];if(r.getProviderName()===e)return r}return de.debug("No plugin found with providerName",e),null},e.prototype.removePluggable=function(e){for(var t=0;t<this._pluggables.length&&this._pluggables[t].getProviderName()!==e;)t+=1;return t===this._pluggables.length?void de.debug("No plugin found with providerName",e):void this._pluggables.splice(t,t+1)},e.prototype.disable=function(){this._disabled=!0},e.prototype.enable=function(){this._disabled=!1},e.prototype.startSession=function(e){return le(this,void 0,void 0,(function(){var t;return he(this,(function(r){return t={event:{name:"_session.start"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.stopSession=function(e){return le(this,void 0,void 0,(function(){var t;return he(this,(function(r){return t={event:{name:"_session.stop"},provider:e},[2,this._sendEvent(t)]}))}))},e.prototype.record=function(e,t,r){return le(this,void 0,void 0,(function(){var n,i;return he(this,(function(o){return this.isAnalyticsConfigured()?(i=null,i="string"==typeof e?{event:{name:e,attributes:t,metrics:r},provider:"AWSPinpoint"}:{event:e,provider:t},[2,this._sendEvent(i)]):(n="Analytics has not been configured",de.debug(n),[2,Promise.reject(new Error(n))])}))}))},e.prototype.updateEndpoint=function(e,t){return le(this,void 0,void 0,(function(){var r;return he(this,(function(n){return r=Object.assign({name:"_update_endpoint"},e),[2,this.record(r,t)]}))}))},e.prototype._sendEvent=function(e){var t=this;if(!this.isAnalyticsConfigured()){var r="Analytics has not been configured";return de.debug(r),Promise.reject(new Error(r))}if(this._disabled)return de.debug("Analytics has been disabled"),Promise.resolve();var n=e.provider?e.provider:"AWSPinpoint";return new Promise((function(r,i){t._pluggables.forEach((function(t){t.getProviderName()===n&&t.record(e,{resolve:r,reject:i})}))}))},e.prototype.autoTrack=function(e,t){if(me[e]){"session"===e&&(this._config.autoSessionRecord=t.enable);var r=this._trackers[e];r?r.configure(t):this._trackers[e]=new me[e](this.record,t)}else de.debug("invalid tracker type")},e.prototype.isAnalyticsConfigured=function(){return this._config&&Object.entries(this._config).length>0},e}(),ye=r(377),ve=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},be=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Se=new n.c("AWSKineisProvider"),_e=(function(){function e(e){this._buffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||1e3,this._config.flushSize=this._config.flushSize||100,this._config.flushInterval=this._config.flushInterval||5e3,this._config.resendLimit=this._config.resendLimit||5;this._setupTimer()}e.prototype._setupTimer=function(){var e=this;this._timer&&clearInterval(this._timer);var t=this._config,r=t.flushSize,n=t.flushInterval,i=this;this._timer=setInterval((function(){for(var t=e._buffer.length<r?e._buffer.length:r,n=[],o=0;o<t;o+=1){var s=e._buffer.shift();n.push(s)}i._sendFromBuffer(n)}),n)},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AWSKinesis"}
9,e.prototype.configure=function(e){Se.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),this._setupTimer(),this._config},e.prototype.record=function(e){return ve(this,void 0,void 0,(function(){var t;return be(this,(function(r){switch(r.label){case 0:return[4,this._getCredentials()];case 1:return(t=r.sent())?(Object.assign(e,{config:this._config,credentials:t}),[2,this._putToBuffer(e)]):[2,Promise.resolve(!1)]}}))}))},e.prototype.updateEndpoint=function(e){return Se.debug("updateEndpoint is not implemented in Kinesis provider"),Promise.resolve(!0)},e.prototype._putToBuffer=function(e){return this._buffer.length<1e3?(this._buffer.push(e),Promise.resolve(!0)):(Se.debug("exceed analytics events buffer size"),Promise.reject(!1))},e.prototype._sendFromBuffer=function(e){for(var t=this,r=[],n=null,i=[],o=0;o<e.length;o+=1){var s=e[o].credentials;0===o?(i.push(e[o]),n=s):s.sessionToken===n.sessionToken&&s.identityId===n.identityId?(Se.debug("no change for cred, put event in the same group"),i.push(e[o])):(r.push(i),(i=[]).push(e[o]),n=s)}r.push(i),r.map((function(e){t._sendEvents(e)}))},e.prototype._sendEvents=function(e){var t=this;if(0!==e.length){var r=e[0],n=r.config,i=r.credentials;if(!this._init(n,i))return!1;var o={};e.map((function(e){var t=e.event,r=t.streamName;void 0===o[r]&&(o[r]=[]);var n={Data:JSON.stringify(t.data),PartitionKey:t.partitionKey||"partition-"+i.identityId};o[r].push(n)})),Object.keys(o).map((function(e){Se.debug("putting records to kinesis with records",o[e]),t._kinesis.putRecords({Records:o[e],StreamName:e},(function(t,r){t?Se.debug("Failed to upload records to Kinesis",t):Se.debug("Upload records to stream",e)}))}))}},e.prototype._init=function(e,t){if(Se.debug("init clients"),this._kinesis&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return Se.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var r=e.region;return Se.debug("initialize kinesis with credentials",t),this._kinesis=new ye({apiVersion:"2013-12-02",region:r,credentials:t}),!0},e.prototype._getCredentials=function(){var e=this;return n.e.get().then((function(t){return t?(Se.debug("set credentials for analytics",e._config.credentials),n.e.shear(t)):null})).catch((function(e){return Se.debug("ensure credentials error",e),null}))}}(),r(378)),we=r(2),Ce=(new n.c("AmazonPersonalizeProvider"),function(){function e(e){void 0===e&&(e=""),this._isBrowser=n.g.browserOrNode().isBrowser,this._timerKey=Object(C.v1)().substr(0,15),this._refreshTimer()}return e.prototype._refreshTimer=function(){this._timer&&clearInterval(this._timer);var e=this;this._timer=setInterval((function(){e._timerKey=Object(C.v1)().substr(0,15)}),3e4)},e.prototype.storeValue=function(e,t){var r=new Date,n=new Date;n.setTime(r.getTime()+6048e5),w.setItem(this._getCachePrefix(e),t,{expires:n.getTime()})},e.prototype.retrieveValue=function(e){return w.getItem(this._getCachePrefix(e))},e.prototype._getCachePrefix=function(e){return this._isBrowser?e+"."+window.location.host:"peronslize"},e.prototype.getTimerKey=function(){return this._timerKey},e.prototype.updateSessionInfo=function(e,t){var r=t.userId,n=t.sessionId;if(this._isRequireNewSession(e,r,n)){var i=Object(C.v1)();this.storeValue("_awsct_uid",e),this.storeValue("_awsct_sid",i),t.sessionId=i}else this._isRequireUpdateSessionInfo(e,r,n)&&this.storeValue("_awsct_uid",e);t.userId=e},e.prototype._isRequireUpdateSessionInfo=function(e,t,r){return!Object(we.isEmpty)(r)&&Object(we.isEmpty)(t)&&!Object(we.isEmpty)(e)},e.prototype.retrieveSessionInfo=function(e){var t={};return t.trackingId=e,t.sessionId=this.retrieveValue("_awsct_sid"),t.userId=this.retrieveValue("_awsct_uid"),Object(we.isEmpty)(t.sessionId)&&(t.sessionId=Object(C.v1)(),this.storeValue("_awsct_sid",t.sessionId)),this.storeValue("_awsct",e),t},e.prototype._isRequireNewSession=function(e,t,r){var n=Object(we.isEmpty)(r),i=Object(we.isEmpty)(e)&&!Object(we.isEmpty)(t),o=!Object(we.isEmpty)(e)&&!Object(we.isEmpty)(t)&&!Object(we.isEqual)(e,t);return n||i||o},e}());!function(e){e.PLAY="play",e.PAUSE="pause",e.ENDED="Ended"}($||($={}
9)),function(e){e.IFRAME="IFRAME",e.VIDEO="VIDEO",e.AUDIO="AUDIO"}(Z||(Z={})),function(e){e.PLAY="Play",e.ENDED="Ended",e.PAUSE="Pause",e.TIME_WATCHED="TimeWatched"}(Y||(Y={}));var Ae=function(){function e(e,t){var r;this.eventActionMapping=((r={})[Y.ENDED]=this.endedEventAction.bind(this),r[Y.PLAY]=this.playEventAction.bind(this),r[Y.PAUSE]=this.pauseEventAction.bind(this),r);var n=e.eventData;this._params=e,this._mediaElement=document.getElementById(n.properties.domElementId),this._started=!1,this._provider=t,{IFRAME:this._iframeMediaTracker,VIDEO:this._html5MediaTracker,AUDIO:this._html5MediaTracker}[this._mediaElement.tagName].bind(this)(),this._initYoutubeFrame()}return e.prototype._initYoutubeFrame=function(){this._youTubeIframeLoader={src:"https://www.youtube.com/iframe_api",loading:!1,loaded:!1,listeners:[],load:function(e){var t=this;if(this.listeners.push(e),this.loaded)setTimeout((function(){t.done()}));else if(!this.loading){this.loading=!0,window.onYouTubeIframeAPIReady=function(){t.loaded=!0,t.done()};var r=document.createElement("script");r.type="text/javascript",r.src=this.src,document.body.appendChild(r)}},done:function(){for(delete window.onYouTubeIframeAPIReady;this.listeners.length;)this.listeners.pop()(window.YT)}}},e.prototype._iframeMediaTracker=function(){var e=this;setInterval((function(){e._started&&e.recordEvent(Z.IFRAME,Y.TIME_WATCHED)}),3e3),this._youTubeIframeLoader.load((function(t){e._iframePlayer=new t.Player(e._mediaElement.id,{events:{onStateChange:e._onPlayerStateChange.bind(e)}})}))},e.prototype._onPlayerStateChange=function(e){var t={0:Y.ENDED,1:Y.PLAY,2:Y.PAUSE}[e.data];t&&this.eventActionMapping[t](Z.IFRAME)},e.prototype._html5MediaTracker=function(){var e=this;setInterval((function(){e._started&&e.recordEvent(Z.VIDEO,Y.TIME_WATCHED)}),3e3),this._mediaElement.addEventListener($.PLAY,(function(){e.eventActionMapping[Y.PLAY](Z.VIDEO)}),!1),this._mediaElement.addEventListener($.PAUSE,(function(){e.eventActionMapping[Y.PAUSE](Z.VIDEO)}),!1),this._mediaElement.addEventListener($.ENDED,(function(){e.eventActionMapping[Y.ENDED](Z.VIDEO)}),!1)},e.prototype.playEventAction=function(e){this._started=!0,this.recordEvent(e,Y.PLAY)},e.prototype.pauseEventAction=function(e){this._started=!1,this.recordEvent(e,Y.PAUSE)},e.prototype.endedEventAction=function(e){this._started=!1,this.recordEvent(e,Y.ENDED)},e.prototype.recordEvent=function(e,t){var r=Object.assign({},this._params),n=r.eventData;n.eventType=t,e===Z.VIDEO?(n.properties.timestamp=this._mediaElement.currentTime,n.properties.duration=this._mediaElement.duration):(n.properties.timestamp=this._financial(this._iframePlayer.getCurrentTime()),n.properties.duration=this._financial(this._iframePlayer.getDuration()));var i=parseFloat(n.properties.timestamp)/parseFloat(n.properties.duration);n.properties.eventValue=Number(i.toFixed(4)),delete n.properties.domElementId,this._provider.putToBuffer(r)},e.prototype._financial=function(e){return Number.parseFloat(e).toFixed(4)},e}(),Ie=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Ee=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Te=new n.c("AmazonPersonalizeProvider"),xe=(function(){function e(e){this._buffer=[],this._config=e||{},this._config.flushSize=this._config.flushSize>0&&this._config.flushSize<=10?this._config.flushSize:5,this._config.flushInterval=this._config.flushInterval||5e3,this._sessionManager=new Ce,Object(we.isEmpty)(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._isBrowser=n.g.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 Ie(this,void 0,void 0,(function(){var t,r,n,i,o;return Ee(this,(function(s){switch(s.label){case 0:return[4,this._getCredentials()];case 1:return(t=s.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(we.isEmpty)(e.event.userId)||this._sessionManager.updateSessionInfo(e.event.userId,this._sessionInfo),o=this.generateRequestParam
9s(e,this._sessionInfo),"MediaAutoTrack"!==n?[3,7]:this._isBrowser?Object(we.isEmpty)(Object(we.get)(o,"eventData.properties.domElementId",null))?[3,3]:[4,this.isElementFullyLoaded(this.loadElement,o.eventData.properties.domElementId,500,5)]:[3,5])):[2,Promise.resolve(!1)];case 2:return s.sent()?new Ae(o,this):Te.debug("Cannot find the media element."),[3,4];case 3:Te.debug("Missing domElementId field in 'properties' for MediaAutoTrack event type."),s.label=4;case 4:return[3,6];case 5:Te.debug("MediaAutoTrack only for browser"),s.label=6;case 6:return[2];case 7:return[2,this.putToBuffer(o)]}}))}))},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(o,s){return e(t).then(o).catch((function(a){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(o).catch(s):s(a);var u}))}))},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AmazonPersonalize"},e.prototype.configure=function(e){Te.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),Object(we.isEmpty)(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._setupTimer(),this._config}
9,e.prototype.generateRequestParams=function(e,t){var r={},n=e.event,i=n.eventType,o=n.properties;return r.eventData={eventType:i,properties:o},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,o=r.sessionInfo;if(!this._init(n,i))return!1;if(t>0){for(var s=[],a=0;a<t;a+=1){var u=e.shift(),c=this._generateSingleRecordPayload(u,o);s.push(c)}var p={};p.trackingId=o.trackingId,p.sessionId=o.sessionId,p.userId=o.userId,p.eventList=s,this._personalize.putEvents(p,(function(e,t){e?Te.debug("Failed to call putEvents in Personalize",e):Te.debug("Put events")}))}}else Te.debug("events array is empty, directly return")},e.prototype.putToBuffer=function(e){return this._buffer.length<this._config.flushSize?this._buffer.push(e):(this._buffer.push(e),this._sendFromBuffer()),Promise.resolve(!0)},e.prototype._sendFromBuffer=function(){var e=this,t=this._buffer.length;if(!(t<=0)){for(var r=[],n=null,i=[],o=0;o<t;o+=1){var s=this._buffer.shift(),a=s.credentials,u=s.sessionInfo;0===o?(i.push(s),n=a):Object(we.isEqual)(u,this._sessionInfo)&&a.sessionToken===n.sessionToken&&a.identityId===n.identityId?(Te.debug("no change for cred, put event in the same group"),i.push(s)):(r.push(i),(i=[]).push(s),n=a,this._sessionInfo=u)}r.push(i),r.map((function(t){e._sendEvents(t)}))}},e.prototype._generateSingleRecordPayload=function(e,t){var r=e.eventData,n=e.sentAt,i={};return i.sentAt=n,i.properties=r.properties,i.eventId=this._sessionManager.getTimerKey()+t.sessionId,i.eventType=r.eventType,i},e.prototype._init=function(e,t){if(Te.debug("init clients"),this._personalize&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return Te.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var r=e.region;return Te.debug("initialize personalize with credentials",t),this._personalize=new _e({apiVersion:"2018-03-22",region:r,credentials:t}),!0},e.prototype._getCredentials=function(){var e=this;return n.e.get().then((function(t){return t?(Te.debug("set credentials for analytics",e._config.credentials),n.e.shear(t)):null})).catch((function(e){return Te.debug("ensure credentials error",e),null}))}}(),new n.c("Analytics")),Re=!1,ke=!1,Pe=!1,Ne=null;Ne||(xe.debug("Create Analytics Instance"),Ne=new ge);var Ue=Ne;n.l.register(Ue);t.a=Ue;var qe=function(e){var t=e.channel,r=e.payload;e.source;switch(xe.debug("on hub capsule "+t,r),t){case"auth":Oe(r);break;case"storage":De(r);break;case"analytics":Me(r)}},De=function(e){var t=e.data,r=t.attrs,n=t.metrics;r&&Pe&&Ue.record({name:"Storage",attributes:r,metrics:n}).catch((function(e){xe.debug("Failed to send the storage event automatically",e)}))},Oe=function(e){var t=e.event;if(t)switch(t){case"signIn":ke&&Pe&&Ue.record({name:"_userauth.sign_in"}).catch((function(e){xe.debug("Failed to send the sign in event automatically",e)}));break;case"signUp":ke&&Pe&&Ue.record({name:"_userauth.sign_up"}).catch((function(e){xe.debug("Failed to send the sign up event automatically",e)}));break;case"signOut":break;case"signIn_failure":ke&&Pe&&Ue.record({name:"_userauth.auth_fail"}).catch((function(e){xe.debug("Failed to send the sign in failure event automatically",e)}));break;case"configured":(ke=!0)&&Pe&&Le()}},Me=function(e){var t=e.event;if(t)switch(t){case"pinpointProvider_configured":Pe=!0,ke&&Pe&&Le()}},Le=function(){var e=Ue.configure();!Re&&e.autoSessionRecord&&(Ue.updateEndpoint({immediate:!0}).catch((function(e){xe.debug("Failed to update the endpoint",e)})),Re=!0),Ue.autoTrack("session",{enable:e.autoSessionRecord})};n.f.listen("auth",qe),n.f.listen("storage",qe),n.f.listen("analytics",qe)},2100:function(e,t,r){var n=r(23),i=r(2101),o=r(109);n.CognitoIdentityCredentials=n.util.inherit(n.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){n.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=n.util.copy(t||{}),this.loadCachedId();var r=this;Object.defineProperty(this,"identityId",{get:function(){return r.loadCachedId(),r._identityId||r.params.IdentityId},set:function(e){r._identityId=e}})}
9,refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId((function(r){r?(t.clearIdOnNotAuthorized(r),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)}))},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,t=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+t],delete this.storage[this.localStorageKey.providers+e+t]},clearIdOnNotAuthorized:function(e){"NotAuthorizedException"==e.code&&this.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId((function(r,n){!r&&n.IdentityId?(t.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(r)}))},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity((function(r,n){r?t.clearIdOnNotAuthorized(r):(t.cacheId(n),t.data=n,t.loadCredentials(t.data,t)),e(r)}))},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken((function(r,n){r?(t.clearIdOnNotAuthorized(r),e(r)):(t.cacheId(n),t.params.WebIdentityToken=n.Token,t.webIdentityCredentials.refresh((function(r){r||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)})))}))},loadCachedId:function(){if(n.util.isBrowser()&&!this.params.IdentityId){var e=this.getStorage("id");if(e&&this.params.Logins){var t=Object.keys(this.params.Logins);0!==(this.getStorage("providers")||"").split(",").filter((function(e){return-1!==t.indexOf(e)})).length&&(this.params.IdentityId=e)}else e&&(this.params.IdentityId=e)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new n.WebIdentityCredentials(this.params,e),!this.cognito){var t=n.util.merge({},e);t.params=this.params,this.cognito=new i(t)}this.sts=this.sts||new o(e)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,n.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=t}catch(e){}},storage:function(){try{var e=n.util.isBrowser()&&null!==window.localStorage&&"object"==typeof window.localStorage?window.localStorage:{};return e["aws.test-storage"]="foobar",delete e["aws.test-storage"],e}catch(e){return{}}}()})},2101:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.cognitoidentity={},n.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),r(2102),Object.defineProperty(o.services.cognitoidentity,"2014-06-30",{get:function(){var e=r(2103);return e.paginators=r(2104).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.CognitoIdentity},2102:function(e,t,r){var n=r(23);n.util.update(n.CognitoIdentity.prototype,{getOpenIdToken:function(e,t){return this.makeUnauthenticatedRequest("getOpenIdToken",e,t)},getId:function(e,t){return this.makeUnauthenticatedRequest("getId",e,t)},getCredentialsForIdentity:function(e,t){return this.makeUnauthenticatedRequest("getCredentialsForIdentity",e,t)}})},2103:function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2014-06-30","endpointPrefix":"cognito-identity","jsonVersion":"1.1","protocol":"json","serviceFullName":"Amazon Cognito Identity","serviceId":"Cognito Identity","signatureVersion":"v4","targetPrefix":"AWSCognitoIdentityService","uid":"cognito-identity-2014-06-30"},"operations":{"CreateIdentityPool":{"input":{"type":"structure","required":["IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S4"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S8"}
9,"CognitoIdentityProviders":{"shape":"Sa"},"SamlProviderARNs":{"shape":"Sf"},"IdentityPoolTags":{"shape":"Sg"}}},"output":{"shape":"Sj"}},"DeleteIdentities":{"input":{"type":"structure","required":["IdentityIdsToDelete"],"members":{"IdentityIdsToDelete":{"type":"list","member":{}}}},"output":{"type":"structure","members":{"UnprocessedIdentityIds":{"type":"list","member":{"type":"structure","members":{"IdentityId":{},"ErrorCode":{}}}}}}},"DeleteIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}}},"DescribeIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{}}},"output":{"shape":"Su"}},"DescribeIdentityPool":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"shape":"Sj"}},"GetCredentialsForIdentity":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"Sz"},"CustomRoleArn":{}}},"output":{"type":"structure","members":{"IdentityId":{},"Credentials":{"type":"structure","members":{"AccessKeyId":{},"SecretKey":{},"SessionToken":{},"Expiration":{"type":"timestamp"}}}}}},"GetId":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"AccountId":{},"IdentityPoolId":{},"Logins":{"shape":"Sz"}}
9},"output":{"type":"structure","members":{"IdentityId":{}}}},"GetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Roles":{"shape":"S1b"},"RoleMappings":{"shape":"S1d"}}}},"GetOpenIdToken":{"input":{"type":"structure","required":["IdentityId"],"members":{"IdentityId":{},"Logins":{"shape":"Sz"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}}},"GetOpenIdTokenForDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId","Logins"],"members":{"IdentityPoolId":{},"IdentityId":{},"Logins":{"shape":"Sz"},"TokenDuration":{"type":"long"}}},"output":{"type":"structure","members":{"IdentityId":{},"Token":{}}}},"ListIdentities":{"input":{"type":"structure","required":["IdentityPoolId","MaxResults"],"members":{"IdentityPoolId":{},"MaxResults":{"type":"integer"},"NextToken":{},"HideDisabled":{"type":"boolean"}}},"output":{"type":"structure","members":{"IdentityPoolId":{},"Identities":{"type":"list","member":{"shape":"Su"}},"NextToken":{}}}},"ListIdentityPools":{"input":{"type":"structure","required":["MaxResults"],"members":{"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityPools":{"type":"list","member":{"type":"structure","members":{"IdentityPoolId":{},"IdentityPoolName":{}}}},"NextToken":{}}}},"ListTagsForResource":{"input":{"type":"structure","required":["ResourceArn"],"members":{"ResourceArn":{}}},"output":{"type":"structure","members":{"Tags":{"shape":"Sg"}}}},"LookupDeveloperIdentity":{"input":{"type":"structure","required":["IdentityPoolId"],"members":{"IdentityPoolId":{},"IdentityId":{},"DeveloperUserIdentifier":{},"MaxResults":{"type":"integer"},"NextToken":{}}},"output":{"type":"structure","members":{"IdentityId":{},"DeveloperUserIdentifierList":{"type":"list","member":{}},"NextToken":{}}}},"MergeDeveloperIdentities":{"input":{"type":"structure","required":["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],"members":{"SourceUserIdentifier":{},"DestinationUserIdentifier":{},"DeveloperProviderName":{},"IdentityPoolId":{}}},"output":{"type":"structure","members":{"IdentityId":{}}}},"SetIdentityPoolRoles":{"input":{"type":"structure","required":["IdentityPoolId","Roles"],"members":{"IdentityPoolId":{},"Roles":{"shape":"S1b"},"RoleMappings":{"shape":"S1d"}}}},"TagResource":{"input":{"type":"structure","required":["ResourceArn"],"members":{"ResourceArn":{},"Tags":{"shape":"Sg"}}},"output":{"type":"structure","members":{}}},"UnlinkDeveloperIdentity":{"input":{"type":"structure","required":["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],"members":{"IdentityId":{},"IdentityPoolId":{},"DeveloperProviderName":{},"DeveloperUserIdentifier":{}}}},"UnlinkIdentity":{"input":{"type":"structure","required":["IdentityId","Logins","LoginsToRemove"],"members":{"IdentityId":{},"Logins":{"shape":"Sz"},"LoginsToRemove":{"shape":"Sv"}}}},"UntagResource":{"input":{"type":"structure","required":["ResourceArn"],"members":{"ResourceArn":{},"TagKeys":{"type":"list","member":{}}}},"output":{"type":"structure","members":{}}},"UpdateIdentityPool":{"input":{"shape":"Sj"},"output":{"shape":"Sj"}}},"shapes":{"S4":{"type":"map","key":{},"value":{}},"S8":{"type":"list","member":{}},"Sa":{"type":"list","member":{"type":"structure","members":{"ProviderName":{},"ClientId":{},"ServerSideTokenCheck":{"type":"boolean"}}}},"Sf":{"type":"list","member":{}},"Sg":{"type":"map","key":{},"value":{}},"Sj":{"type":"structure","required":["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],"members":{"IdentityPoolId":{},"IdentityPoolName":{},"AllowUnauthenticatedIdentities":{"type":"boolean"},"SupportedLoginProviders":{"shape":"S4"},"DeveloperProviderName":{},"OpenIdConnectProviderARNs":{"shape":"S8"},"CognitoIdentityProviders":{"shape":"Sa"},"SamlProviderARNs":{"shape":"Sf"},"IdentityPoolTags":{"shape":"Sg"}}},"Su":{"type":"structure","members":{"IdentityId":{},"Logins":{"shape":"Sv"},"CreationDate":{"type":"timestamp"},"LastModifiedDate":{"type":"timestamp"}}},"Sv":{"type":"list","member":{}},"Sz":{"type":"map","key":{},"value":{}},"S1b":{"type":"map","key":{},"value":{}},"S1d":{"type":"map","key":{},"value":{"type":"structure","required":["Type"],"members":{"Type":{},"AmbiguousRoleResolution":{},"RulesConfiguration":{"type":"structure","required":["Rules"],"members":{"Rules":{"type":"list","member":{"type":"structure","required":["Claim","MatchType","Value","RoleARN"],"members":{"Claim":{},"MatchType":{},"Value":{},"RoleARN":{}}}}}}}}}}}')},2104:function(e){e.exports=JSON.parse('{"pagination":{}}')},2105:function(e,t,r){var n=r(23),i=r(109);n.SAMLCredentials=n.util.inherit(n.Credentials,{constructor:function(e){n.Credentials.call(this),this.expired=!0,this.params=e}
vendor: 5,261 bytes, line 9
9,refresh:function(e){this.coalesceRefresh(e||n.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML((function(r,n){r||t.service.credentialsFrom(n,t),e(r)}))},createClients:function(){this.service=this.service||new i({params:this.params})}})},2106:function(e,t,r){var n=r(41),i=r(108);function o(){}function s(e,t){for(var r=e.getElementsByTagName(t),n=0,i=r.length;n<i;n++)if(r[n].parentNode===e)return r[n]}function a(e,t){switch(t||(t={}),t.type){case"structure":return u(e,t);case"map":return function(e,t){var r={},n=t.key.name||"key",i=t.value.name||"value",o=t.flattened?t.name:"entry",u=e.firstElementChild;for(;u;){if(u.nodeName===o){var c=s(u,n).textContent,p=s(u,i);r[c]=a(p,t.value)}u=u.nextElementSibling}return r}(e,t);case"list":return function(e,t){var r=[],n=t.flattened?t.name:t.member.name||"member",i=e.firstElementChild;for(;i;)i.nodeName===n&&r.push(a(i,t.member)),i=i.nextElementSibling;return r}(e,t);case void 0:case null:return function(e){if(null==e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;var t={type:"structure",members:{}},r=e.firstElementChild;for(;r;){var n=r.nodeName;Object.prototype.hasOwnProperty.call(t.members,n)?t.members[n].type="list":t.members[n]={name:n},r=r.nextElementSibling}return u(e,t)}(e);default:return function(e,t){if(e.getAttribute){var r=e.getAttribute("encoding");"base64"===r&&(t=new i.create({type:r}))}var n=e.textContent;""===n&&(n=null);return"function"==typeof t.toType?t.toType(n):n}(e,t)}}function u(e,t){var r={};return null===e||n.each(t.members,(function(t,n){if(n.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(e.attributes,n.name)){var i=e.attributes[n.name].value;r[t]=a({textContent:i},n)}}else{var o=n.flattened?e:s(e,n.name);o?r[t]=a(o,n):n.flattened||"list"!==n.type||(r[t]=n.defaultValue)}})),r}o.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var r,i;try{if(window.DOMParser){try{r=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw n.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===r.documentElement)throw n.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var o=r.getElementsByTagName("parsererror")[0];if(o&&(o.parentNode===r||"body"===o.parentNode.nodeName||o.parentNode.parentNode===r||"body"===o.parentNode.parentNode.nodeName)){var u=o.getElementsByTagName("div")[0]||o;throw n.error(new Error(u.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if((r=new window.ActiveXObject("Microsoft.XMLDOM")).async=!1,!r.loadXML(e))throw n.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){i=e}if(r&&r.documentElement&&!i){var c=a(r.documentElement,t),p=s(r.documentElement,"ResponseMetadata");return p&&(c.ResponseMetadata=a(p,{})),c}if(i)throw n.error(i||new Error,{code:"XMLParserError",retryable:!0});return{}},e.exports=o},2107:function(e,t,r){var n=r(23),i=r(130).EventEmitter;r(307),n.XHRClient=n.util.inherit({handleRequest:function(e,t,r,o){var s=this,a=e.endpoint,u=new i,c=a.protocol+"//"+a.hostname;80!==a.port&&443!==a.port&&(c+=":"+a.port),c+=e.path;var p=new XMLHttpRequest,l=!1;e.stream=p,p.addEventListener("readystatechange",(function(){try{if(0===p.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!l&&(u.statusCode=p.status,u.headers=s.parseHeaders(p.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,p.statusText),l=!0),this.readyState===this.DONE&&s.finishRequest(p,u)}),!1),p.upload.addEventListener("progress",(function(e){u.emit("sendProgress",e)})),p.addEventListener("progress",(function(e){u.emit("receiveProgress",e)}),!1),p.addEventListener("timeout",(function(){o(n.util.error(new Error("Timeout"),{code:"TimeoutError"}))}),!1),p.addEventListener("error",(function(){o(n.util.error(new Error("Network Failure"),{code:"NetworkingError"}))}),!1),p.addEventListener("abort",(function(){o(n.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))}),!1),r(u),p.open(e.method,c,!1!==t.xhrAsync),n.util.each(e.headers,(function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&p.setRequestHeader(e,t)})),t.timeout&&!1!==t.xhrAsync&&(p.timeout=t.timeout),t.xhrWithCredentials&&(p.withCredentials=!0);try{p.responseType="arraybuffer"}catch(e){}try{e.body?p.send(e.body):p.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;p.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return n.util.arrayEach(e.split(/\r?\n/),(function(e){var r=e.split(":",1)[0],n=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=n)})),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var i=e.response;r=new n.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),s=0;s<r.length;++s)r[s]=o[s]}try{r||"string"!=typeof e.responseText||(r=new n.util.Buffer(e.responseText))}catch(e){}r&&t.emit("data",r),t.emit("end")}}),n.HttpClient.prototype=n.XHRClient.prototype,n.HttpClient.streamsApiVersion=1},2108:function(e){e.exports=JSON.parse('{"name":"@aws-amplify/core","ver
9sion":"1.3.3","description":"Core category of aws-amplify","main":"./index.js","module":"./lib-esm/index.js","typings":"./lib-esm/index.d.ts","publishConfig":{"access":"public"},"scripts":{"test":"tslint \'src/**/*.ts\' && jest -w 1 --coverage","build-with-test":"npm test && npm run build","build:cjs":"node ./build es5 && webpack && webpack --config ./webpack.config.dev.js","build:esm":"node ./build es6","build":"npm run clean && npm run build:esm && npm run build:cjs","clean":"rimraf lib-esm lib dist","format":"echo \\"Not implemented\\"","lint":"tslint \'src/**/*.ts\'"},"react-native":{"./lib/ClientDevice":"./lib/ClientDevice/reactnative.js","./lib/RNComponents":"./lib/RNComponents/reactnative.js","./lib/StorageHelper":"./lib/StorageHelper/reactnative.js"},"repository":{"type":"git","url":"https://github.com/aws-amplify/amplify-js.git"},"author":"Amazon Web Services","license":"Apache-2.0","bugs":{"url":"https://github.com/aws/aws-amplify/issues"},"homepage":"https://aws-amplify.github.io/","devDependencies":{"find":"^0.2.7","prepend-file":"^1.3.1","prettier":"^1.7.4","typescript":"^3.2.2"}
9,"dependencies":{"aws-sdk":"2.518.0","url":"^0.11.0"},"jest":{"globals":{"ts-jest":{"diagnostics":false,"tsConfig":{"lib":["es5","es2015","dom","esnext.asynciterable","es2017.object"],"allowJs":true}}},"transform":{"^.+\\\\.(js|jsx|ts|tsx)$":"ts-jest"},"testRegex":"(/__tests__/.*|\\\\.(test|spec))\\\\.(tsx?|jsx?)$","moduleFileExtensions":["ts","tsx","js","json","jsx"],"testEnvironment":"jsdom","coverageThreshold":{"global":{"branches":0,"functions":0,"lines":0,"statements":0}},"testURL":"http://localhost/","coveragePathIgnorePatterns":["/node_modules/"]},"gitHead":"4f1eaade7017d4af91dcee049cadd7501c6db836"}')},2109:function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2014-06-05","endpointPrefix":"mobileanalytics","serviceFullName":"Amazon Mobile Analytics","serviceId":"Mobile Analytics","signatureVersion":"v4","protocol":"rest-json"},"operations":{"PutEvents":{"http":{"requestUri":"/2014-06-05/events","responseCode":202},"input":{"type":"structure","required":["events","clientContext"],"members":{"events":{"type":"list","member":{"type":"structure","required":["eventType","timestamp"],"members":{"eventType":{},"timestamp":{},"session":{"type":"structure","members":{"id":{},"duration":{"type":"long"},"startTimestamp":{},"stopTimestamp":{}}},"version":{},"attributes":{"type":"map","key":{},"value":{}},"metrics":{"type":"map","key":{},"value":{"type":"double"}}}}},"clientContext":{"location":"header","locationName":"x-amz-Client-Context"},"clientContextEncoding":{"location":"header","locationName":"x-amz-Client-Context-Encoding"}}}}},"shapes":{}}')},2110:function(e){e.exports=JSON.parse('{"metadata":{"apiVersion":"2016-12-01","endpointPrefix":"pinpoint","signingName":"mobiletargeting","serviceFullName":"Amazon Pinpoint","serviceId":"Pinpoint","protocol":"rest-json","jsonVersion":"1.1","uid":"pinpoint-2016-12-01","signatureVersion":"v4"},"operations":{"CreateApp":{"http":{"requestUri":"/v1/apps","responseCode":201},"input":{"type":"structure","members":{"CreateApplicationRequest":{"type":"structure","members":{"Name":{},"tags":{"shape":"S4","locationName":"tags"}},"required":["Name"]}},"required":["CreateApplicationRequest"],"payload":"CreateApplicationRequest"},"output":{"type":"structure","members":{"ApplicationResponse":{"shape":"S6"}},"required":["ApplicationResponse"],"payload":"ApplicationResponse"}},"CreateCampaign":{"http":{"requestUri":"/v1/apps/{application-id}/campaigns","responseCode":201},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"WriteCampaignRequest":{"shape":"S8"}},"required":["ApplicationId","WriteCampaignRequest"],"payload":"WriteCampaignRequest"},"output":{"type":"structure","members":{"CampaignResponse":{"shape":"S12"}},"required":["CampaignResponse"],"payload":"CampaignResponse"}},"CreateExportJob":{"http":{"requestUri":"/v1/apps/{application-id}/jobs/export","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"ExportJobRequest":{"type":"structure","members":{"RoleArn":{},"S3UrlPrefix":{},"SegmentId":{},"SegmentVersion":{"type":"integer"}},"required":["S3UrlPrefix","RoleArn"]}},"required":["ApplicationId","ExportJobRequest"],"payload":"ExportJobRequest"},"output":{"type":"structure","members":{"ExportJobResponse":{"shape":"S1a"}},"required":["ExportJobResponse"],"payload":"ExportJobResponse"}},"CreateImportJob":{"http":{"requestUri":"/v1/apps/{application-id}/jobs/import","responseCode":201},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"ImportJobRequest":{"type":"structure","members":{"DefineSegment":{"type":"boolean"},"ExternalId":{},"Format":{},"RegisterEndpoints":{"type":"boolean"},"RoleArn":{},"S3Url":{},"SegmentId":{},"SegmentName":{}},"required":["Format","S3Url","RoleArn"]}},"required":["ApplicationId","ImportJobRequest"],"payload":"ImportJobRequest"},"output":{"type":"structure","members":{"ImportJobResponse":{"shape":"S1h"}},"required":["ImportJobResponse"],"payload":"ImportJobResponse"}},"CreateSegment":{"http":{"requestUri":"/v1/apps/{application-id}/segments","responseCode":201},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"WriteSegmentRequest":{"shape":"S1k"}},"required":["ApplicationId","WriteSegmentRequest"],"payload":"WriteSegmentRequest"},"output":{"type":"structure","members":{"SegmentResponse":{"shape":"S24"}},"required":["SegmentResponse"],"payload":"SegmentResponse"}},"DeleteAdmChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/adm","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ADMChannelResponse":{"shape":"S2a"}},"required":["ADMChannelResponse"],"payload":"ADMChannelResponse"}},"DeleteApnsChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/apns","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSChannelResponse":{"shape":"S2d"}},"required":["APNSChannelResponse"],"payload":"APNSChannelResponse"}},"DeleteApnsSandboxChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/apns_sandbox","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSSandboxChannelResponse":{"shape":"S2g"}},"required":["APNSSandboxChannelResponse"],"payload":"APNSSandboxChannelResponse"}},"DeleteApnsVoipChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/apns_voip","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSVoipChannelResponse":{"shape":"S2j"}},"required":["APNSVoipChannelResponse"],"payload":"APNSVoipChannelResponse"}},"DeleteApnsVoipSandboxChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/apns_voip_sandbox","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSVoipSandboxChannelResponse":{"shape":"S2m"}},"required":["APNSVoipSandboxChannelResponse"],"payload":"APNSVoipSandboxChannelResponse"}},"DeleteApp":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ApplicationResponse":{"shape":"S6"}},"required":["ApplicationResponse"],"payload":"ApplicationResponse"}},"DeleteBaiduChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/baidu","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"BaiduChannelResponse":{"shape":"S2r"}},"required":["BaiduChannelResponse"],"payload":"BaiduChannelResponse"}},"DeleteCampaign":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"}},"required":["CampaignId","ApplicationId"]},"output":{"type":"structure","members":{"CampaignResponse":{"shape":"S12"}},"required":["CampaignResponse"],"payload":"CampaignResponse"}},"DeleteEmailChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/email","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"EmailChannelResponse":{"shape":"S2w"}},"required":["EmailChannelResponse"],"payload":"EmailChannelResponse"}},"DeleteEndpoint":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/endpoints/{endpoint-id}","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EndpointId":{"location":"uri","locationName":"endpoint-id"}},"required":["ApplicationId","EndpointId"]},"output":{"type":"structure","members":{"EndpointResponse":{"shape":"S2z"}},"required":["EndpointResponse"],"payload":"EndpointResponse"}},"DeleteEventStream":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/eventstream","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"EventStream":{"shape":"S38"}},"required":["EventStream"],"payload":"EventStream"}},"DeleteGcmChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/gcm","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"GCMChannelResponse":{"shape":"S3b"}},"required":["GCMChannelResponse"],"payload":"GCMChannelResponse"}},"DeleteSegment":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/segments/{segment-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SegmentId":{"location":"uri","locationName":"segment-id"}},"required":["SegmentId","ApplicationId"]},"output":{"type":"structure","members":{"SegmentResponse":{"shape":"S24"}},"required":["SegmentResponse"],"payload":"SegmentResponse"}},"DeleteSmsChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/sms","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"SMSChannelResponse":{"shape":"S3g"}},"required":["SMSChannelResponse"],"payload":"SMSChannelResponse"}},"DeleteUserEndpoints":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/users/{user-id}","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"UserId":{"location":"uri","locationName":"user-id"}},"required":["ApplicationId","UserId"]},"output":{"type":"structure","members":{"EndpointsResponse":{"shape":"S3j"}},"required":["EndpointsResponse"],"payload":"EndpointsResponse"}},"DeleteVoiceChannel":{"http":{"method":"DELETE","requestUri":"/v1/apps/{application-id}/channels/voice","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"VoiceChannelResponse":{"shape":"S3n"}},"required":["VoiceChannelResponse"],"payload":"VoiceChannelResponse"}},"GetAdmChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/adm","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ADMChannelResponse":{"shape":"S2a"}},"required":["ADMChannelResponse"],"payload":"ADMChannelResponse"}},"GetApnsChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/apns","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSChannelResponse":{"shape":"S2d"}},"required":["APNSChannelResponse"],"payload":"APNSChannelResponse"}},"GetApnsSandboxChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/apns_sandbox","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSSandboxChannelResponse":{"shape":"S2g"}},"required":["APNSSandboxChannelResponse"],"payload":"APNSSandboxChannelResponse"}},"GetApnsVoipChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/apns_voip","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSVoipChannelResponse":{"shape":"S2j"}},"required":["APNSVoipChannelResponse"],"payload":"APNSVoipChannelResponse"}},"GetApnsVoipSandboxChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/apns_voip_sandbox","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"APNSVoipSandboxChannelResponse":{"shape":"S2m"}},"required":["APNSVoipSandboxChannelResponse"],"payload":"APNSVoipSandboxChannelResponse"}},"GetApp":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ApplicationResponse":{"shape":"S6"}},"required":["ApplicationResponse"],"payload":"ApplicationResponse"}},"GetApplicationDateRangeKpi":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/kpis/daterange/{kpi-name}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EndTime":{"shape":"S41","location":"querystring","locationName":"end-time"},"KpiName":{"location":"uri","locationName":"kpi-name"},"NextToken":{"location":"querystring","locationName":"next-token"},"PageSize":{"location":"querystring","locationName":"page-size"},"StartTime":{"shape":"S41","location":"querystring","locationName":"start-time"}},"required":["ApplicationId","KpiName"]},"output":{"type":"structure","members":{"ApplicationDateRangeKpiResponse":{"type":"structure","members":{"ApplicationId":{},"EndTime":{"shape":"S41"},"KpiName":{},"KpiResult":{"shape":"S44"},"NextToken":{},"StartTime":{"shape":"S41"}},"required":["KpiResult","KpiName","EndTime","StartTime","ApplicationId"]}},"required":["ApplicationDateRangeKpiResponse"],"payload":"ApplicationDateRangeKpiResponse"}},"GetApplicationSettings":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/settings","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ApplicationSettingsResource":{"shape":"S4b"}},"required":["ApplicationSettingsResource"],"payload":"ApplicationSettingsResource"}},"GetApps":{"http":{"method":"GET","requestUri":"/v1/apps","responseCode":200},"input":{"type":"structure","members":{"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}}},"output":{"type":"structure","members":{"ApplicationsResponse":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S6"}},"NextToken":{}}}},"required":["ApplicationsResponse"],"payload":"ApplicationsResponse"}},"GetBaiduChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/baidu","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"BaiduChannelResponse":{"shape":"S2r"}},"required":["BaiduChannelResponse"],"payload":"BaiduChannelResponse"}},"GetCampaign":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}","responseCode":200},"input":{"type"
9:"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"}},"required":["CampaignId","ApplicationId"]},"output":{"type":"structure","members":{"CampaignResponse":{"shape":"S12"}},"required":["CampaignResponse"],"payload":"CampaignResponse"}},"GetCampaignActivities":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}/activities","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId","CampaignId"]},"output":{"type":"structure","members":{"ActivitiesResponse":{"type":"structure","members":{"Item":{"type":"list","member":{"type":"structure","members":{"ApplicationId":{},"CampaignId":{},"End":{},"Id":{},"Result":{},"ScheduledStart":{},"Start":{},"State":{},"SuccessfulEndpointCount":{"type":"integer"},"TimezonesCompletedCount":{"type":"integer"},"TimezonesTotalCount":{"type":"integer"},"TotalEndpointCount":{"type":"integer"},"TreatmentId":{}},"required":["CampaignId","Id","ApplicationId"]}},"NextToken":{}},"required":["Item"]}},"required":["ActivitiesResponse"],"payload":"ActivitiesResponse"}},"GetCampaignDateRangeKpi":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}/kpis/daterange/{kpi-name}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"},"EndTime":{"shape":"S41","location":"querystring","locationName":"end-time"},"KpiName":{"location":"uri","locationName":"kpi-name"},"NextToken":{"location":"querystring","locationName":"next-token"},"PageSize":{"location":"querystring","locationName":"page-size"},"StartTime":{"shape":"S41","location":"querystring","locationName":"start-time"}},"required":["ApplicationId","KpiName","CampaignId"]},"output":{"type":"structure","members":{"CampaignDateRangeKpiResponse":{"type":"structure","members":{"ApplicationId":{},"CampaignId":{},"EndTime":{"shape":"S41"},"KpiName":{},"KpiResult":{"shape":"S44"},"NextToken":{},"StartTime":{"shape":"S41"}},"required":["KpiResult","KpiName","EndTime","CampaignId","StartTime","ApplicationId"]}},"required":["CampaignDateRangeKpiResponse"],"payload":"CampaignDateRangeKpiResponse"}},"GetCampaignVersion":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}/versions/{version}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"},"Version":{"location":"uri","locationName":"version"}},"required":["Version","ApplicationId","CampaignId"]},"output":{"type":"structure","members":{"CampaignResponse":{"shape":"S12"}},"required":["CampaignResponse"],"payload":"CampaignResponse"}},"GetCampaignVersions":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}/versions","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId","CampaignId"]},"output":{"type":"structure","members":{"CampaignsResponse":{"shape":"S4w"}},"required":["CampaignsResponse"],"payload":"CampaignsResponse"}},"GetCampaigns":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/campaigns","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"CampaignsResponse":{"shape":"S4w"}},"required":["CampaignsResponse"],"payload":"CampaignsResponse"}},"GetChannels":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ChannelsResponse":{"type":"structure","members":{"Channels":{"type":"map","key":{},"value":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{}
9,"LastModifiedDate":{},"Version":{"type":"integer"}}}}},"required":["Channels"]}},"required":["ChannelsResponse"],"payload":"ChannelsResponse"}},"GetEmailChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/email","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"EmailChannelResponse":{"shape":"S2w"}},"required":["EmailChannelResponse"],"payload":"EmailChannelResponse"}},"GetEndpoint":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/endpoints/{endpoint-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EndpointId":{"location":"uri","locationName":"endpoint-id"}},"required":["ApplicationId","EndpointId"]},"output":{"type":"structure","members":{"EndpointResponse":{"shape":"S2z"}},"required":["EndpointResponse"],"payload":"EndpointResponse"}},"GetEventStream":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/eventstream","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"EventStream":{"shape":"S38"}},"required":["EventStream"],"payload":"EventStream"}},"GetExportJob":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/jobs/export/{job-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"JobId":{"location":"uri","locationName":"job-id"}},"required":["ApplicationId","JobId"]},"output":{"type":"structure","members":{"ExportJobResponse":{"shape":"S1a"}},"required":["ExportJobResponse"],"payload":"ExportJobResponse"}},"GetExportJobs":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/jobs/export","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ExportJobsResponse":{"shape":"S5f"}},"required":["ExportJobsResponse"],"payload":"ExportJobsResponse"}},"GetGcmChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/gcm","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"GCMChannelResponse":{"shape":"S3b"}},"required":["GCMChannelResponse"],"payload":"GCMChannelResponse"}},"GetImportJob":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/jobs/import/{job-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"JobId":{"location":"uri","locationName":"job-id"}},"required":["ApplicationId","JobId"]},"output":{"type":"structure","members":{"ImportJobResponse":{"shape":"S1h"}},"required":["ImportJobResponse"],"payload":"ImportJobResponse"}},"GetImportJobs":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/jobs/import","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"ImportJobsResponse":{"shape":"S5n"}},"required":["ImportJobsResponse"],"payload":"ImportJobsResponse"}},"GetSegment":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments/{segment-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SegmentId":{"location":"uri","locationName":"segment-id"}},"required":["SegmentId","ApplicationId"]},"output":{"type":"structure","members":{"SegmentResponse":{"shape":"S24"}},"required":["SegmentResponse"],"payload":"SegmentResponse"}},"GetSegmentExportJobs":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments/{segment-id}/jobs/export","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"SegmentId":{"location":"uri","locationName":"segment-id"},"Token":{"location":"querystring","locationName":"token"}},"required":["SegmentId","ApplicationId"]},"output":{"type":"structure","members":{"ExportJobsResponse":{"shape":"S5f"}},"required":["ExportJobsResponse"],"payload":"ExportJobsResponse"}},"GetSegmentImportJobs":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments/{segment-id}/jobs/import","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"SegmentId":{"location":"uri","locationName":"segment-id"},"Token":{"location":"querystring","locationName":"token"}},"required":["SegmentId","ApplicationId"]},"output":{"type":"structure","members":{"ImportJobsResponse":{"shape":"S5n"}},"required":["ImportJobsResponse"],"payload":"ImportJobsResponse"}},"GetSegmentVersion":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments/{segment-id}/versions/{version}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SegmentId":{"location":"uri","locationName":"segment-id"},"Version":{"location":"uri","locationName":"version"}},"required":["SegmentId","Version","ApplicationId"]},"output":{"type":"structure","members":{"SegmentResponse":{"shape":"S24"}},"required":["SegmentResponse"],"payload":"SegmentResponse"}},"GetSegmentVersions":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments/{segment-id}/versions","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"SegmentId":{"location":"uri","locationName":"segment-id"},"Token":{"location":"querystring","locationName":"token"}},"required":["SegmentId","ApplicationId"]},"output":{"type":"structure","members":{"SegmentsResponse":{"shape":"S5z"}},"required":["SegmentsResponse"],"payload":"SegmentsResponse"}},"GetSegments":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/segments","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"PageSize":{"location":"querystring","locationName":"page-size"},"Token":{"location":"querystring","locationName":"token"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"SegmentsResponse":{"shape":"S5z"}},"required":["SegmentsResponse"],"payload":"SegmentsResponse"}},"GetSmsChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/sms","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"SMSChannelResponse":{"shape":"S3g"}},"required":["SMSChannelResponse"],"payload":"SMSChannelResponse"}},"GetUserEndpoints":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/users/{user-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"UserId":{"location":"uri","locationName":"user-id"}},"required":["ApplicationId","UserId"]},"output":{"type":"structure","members":{"EndpointsResponse":{"shape":"S3j"}},"required":["EndpointsResponse"],"payload":"EndpointsResponse"}},"GetVoiceChannel":{"http":{"method":"GET","requestUri":"/v1/apps/{application-id}/channels/voice","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId"]},"output":{"type":"structure","members":{"VoiceChannelResponse":{"shape":"S3n"}},"required":["VoiceChannelResponse"],"payload":"VoiceChannelResponse"}},"ListTagsForResource":{"http":{"method":"GET","requestUri":"/v1/tags/{resource-arn}","responseCode":200},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"}},"required":["ResourceArn"]},"output":{"type":"structure","members":{"TagsModel":{"shape":"S6b"}},"required":["TagsModel"],"payload":"TagsModel"}},"PhoneNumberValidate":{"http":{"requestUri":"/v1/phone/number/validate","responseCode":200},"input":{"type":"structure","members":{"NumberValidateRequest":{"type":"structure","members":{"IsoCountryCode":{},"PhoneNumber":{}}}},"required":["NumberValidateRequest"],"payload":"NumberValidateRequest"},"output":{"type":"structure","members":{"NumberValidateResponse":{"type":"structure","members":{"Carrier":{},"City":{},"CleansedPhoneNumberE164":{},"CleansedPhoneNumberNational":{},"Country":{},"CountryCodeIso2":{},"CountryCodeNumeric":{},"County":{},"OriginalCountryCodeIso2":{},"OriginalPhoneNumber":{},"PhoneType":{},"PhoneTypeCode":{"type":"integer"},"Timezone":{},"ZipCode":{}}}},"required":["NumberValidateResponse"],"payload":"NumberValidateResponse"}},"PutEventStream":{"http":{"requestUri":"/v1/apps/{application-id}/eventstream","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"WriteEventStream":{"type":"structure","members":{"DestinationStreamArn":{},"RoleArn":{}},"required":["RoleArn","DestinationStreamArn"]}},"required":["ApplicationId","WriteEventStream"],"payload":"WriteEventStream"},"output":{"type":"structure","members":{"EventStream":{"shape":"S38"}},"required":["EventStream"],"payload":"EventStream"}},"PutEvents":{"http":{"requestUri":"/v1/apps/{application-id}/events","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EventsRequest":{"type":"structure","members":{"BatchItem":{"type":"map","key":{},"value":{"type":"structure","members":{"Endpoint":{"type":"structure","members":{"Address":{},"Attributes":{"shape":"S30"},"ChannelType":{},"Demographic":{"shape":"S32"},"EffectiveDate":{},"EndpointStatus":{},"Location":{"shape":"S33"},"Metrics":{"shape":"S34"},"OptOut":{},"RequestId":{},"User":{"shape":"S35"}}},"Events":{"type":"map","key":{},"value":{"type":"structure","members":{"AppPackageName":{},"AppTitle":{},"AppVersionCode":{},"Attributes":{"shape":"S4"},"ClientSdkVersion":{},"EventType":{},"Metrics":{"shape":"S34"},"SdkName":{},"Session":{"type":"structure","members":{"Duration":{"type":"integer"},"Id":{},"StartTimestamp":{},"StopTimestamp":{}},"required":["StartTimestamp","Id"]},"Timestamp":{}},"required":["EventType","Timestamp"]}}},"required":["Endpoint","Events"]}}},"required":["BatchItem"]}},"required":["ApplicationId","EventsRequest"],"payload":"EventsRequest"},"output":{"type":"structure","members":{"EventsResponse":{"type":"structure","members":{"Results":{"type":"map","key":{},"value":{"type":"structure","members":{"EndpointItemResponse":{"type":"structure","members":{"Message":{},"StatusCode":{"type":"integer"}}},"EventsItemResponse":{"type":"map","key":{},"value":{"type":"structure","members":{"Message":{},"StatusCode":{"type":"integer"}}}}}}}}}},"required":["EventsResponse"],"payload":"EventsResponse"}},"RemoveAttributes":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/attributes/{attribute-type}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"AttributeType":{"location":"uri","locationName":"attribute-type"},"UpdateAttributesRequest":{"type":"structure","members":{"Blacklist":{"shape":"Sp"}}}},"required":["AttributeType","ApplicationId","UpdateAttributesRequest"],"payload":"UpdateAttributesRequest"},"output":{"type":"structure","members":{"AttributesResource":{"type":"structure","members":{"ApplicationId":{},"AttributeType":{},"Attributes":{"shape":"Sp"}},"required":["AttributeType","ApplicationId"]}},"required":["AttributesResource"],"payload":"AttributesResource"}},"SendMessages":{"http":{"requestUri":"/v1/apps/{application-id}/messages","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"MessageRequest":{"type":"structure","members":{"Addresses":{"type":"map","key":{},"value":{"type":"structure","members":{"BodyOverride":{},"ChannelType":{},"Context":{"shape":"S4"},"RawContent":{},"Substitutions":{"shape":"S30"},"TitleOverride":{}}}},"Context":{"shape":"S4"},"Endpoints":{"shape":"S76"},"MessageConfiguration":{"shape":"S78"},"TraceId":{}},"required":["MessageConfiguration"]}},"required":["ApplicationId","MessageRequest"],"payload":"MessageRequest"},"output":{"type":"structure","members":{"MessageResponse":{"type":"structure","members":{"ApplicationId":{},"EndpointResult":{"shape":"S7o"},"RequestId":{},"Result":{"type":"map","key":{},"value":{"type":"structure","members":{"DeliveryStatus":{},"MessageId":{},"StatusCode":{"type":"integer"},"StatusMessage":{},"UpdatedToken":{}},"required":["DeliveryStatus","StatusCode"]}}},"required":["ApplicationId"]}},"required":["MessageResponse"],"payload":"MessageResponse"}},"SendUsersMessages":{"http":{"requestUri":"/v1/apps/{application-id}/users-messages","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SendUsersMessageRequest":{"type":"structure","members":{"Context":{"shape":"S4"},"MessageConfiguration":{"shape":"S78"},"TraceId":{},"Users":{"shape":"S76"}},"required":["MessageConfiguration","Users"]}},"required":["ApplicationId","SendUsersMessageRequest"],"payload":"SendUsersMessageRequest"},"output":{"type":"structure","members":{"SendUsersMessageResponse":{"type":"structure","members":{"ApplicationId":{},"RequestId":{},"Result":{"type":"map","key":{},"value":{"shape":"S7o"}}},"required":["ApplicationId"]}},"required":["SendUsersMessageResponse"],"payload":"SendUsersMessageResponse"}},"TagResource":{"http":{"requestUri":"/v1/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"TagsModel":{"shape":"S6b"}},"required":["ResourceArn","TagsModel"],"payload":"TagsModel"}},"UntagResource":{"http":{"method":"DELETE","requestUri":"/v1/tags/{resource-arn}","responseCode":204},"input":{"type":"structure","members":{"ResourceArn":{"location":"uri","locationName":"resource-arn"},"TagKeys":{"shape":"Sp","location":"querystring","locationName":"tagKeys"}},"required":["TagKeys","ResourceArn"]}},"UpdateAdmChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/adm","responseCode":200},"input":{"type":"structure","members":{"ADMChannelRequest":{"type":"structure","members":{"ClientId":{},"ClientSecret":{},"Enabled":{"type":"boolean"}},"required":["ClientSecret","ClientId"]},"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId","ADMChannelRequest"],"payload":"ADMChannelRequest"},"output":{"type":"structure","members":{"ADMChannelResponse":{"shape":"S2a"}},"required":["ADMChannelResponse"],"payload":"ADMChannelResponse"}},"UpdateApnsChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/apns","responseCode":200},"input":{"type":"structure","members":{"APNSChannelRequest":{"type":"structure","members":{"BundleId":{},"Certificate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"PrivateKey":{},"TeamId":{},"TokenKey":{},"TokenKeyId":{}}},"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId","APNSChannelRequest"],"payload":"APNSChannelRequest"},"output":{"type":"structure","members":{"APNSChannelResponse":{"shape":"S2d"}},"required":["APNSChannelResponse"],"payload":"APNSChannelResponse"}},"UpdateApnsSandboxChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/apns_sandbox","responseCode":200},"input":{"t
9ype":"structure","members":{"APNSSandboxChannelRequest":{"type":"structure","members":{"BundleId":{},"Certificate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"PrivateKey":{},"TeamId":{},"TokenKey":{},"TokenKeyId":{}}},"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId","APNSSandboxChannelRequest"],"payload":"APNSSandboxChannelRequest"},"output":{"type":"structure","members":{"APNSSandboxChannelResponse":{"shape":"S2g"}},"required":["APNSSandboxChannelResponse"],"payload":"APNSSandboxChannelResponse"}},"UpdateApnsVoipChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/apns_voip","responseCode":200},"input":{"type":"structure","members":{"APNSVoipChannelRequest":{"type":"structure","members":{"BundleId":{},"Certificate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"PrivateKey":{},"TeamId":{},"TokenKey":{},"TokenKeyId":{}}},"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId","APNSVoipChannelRequest"],"payload":"APNSVoipChannelRequest"},"output":{"type":"structure","members":{"APNSVoipChannelResponse":{"shape":"S2j"}},"required":["APNSVoipChannelResponse"],"payload":"APNSVoipChannelResponse"}},"UpdateApnsVoipSandboxChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/apns_voip_sandbox","responseCode":200},"input":{"type":"structure","members":{"APNSVoipSandboxChannelRequest":{"type":"structure","members":{"BundleId":{},"Certificate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"PrivateKey":{},"TeamId":{},"TokenKey":{},"TokenKeyId":{}}},"ApplicationId":{"location":"uri","locationName":"application-id"}},"required":["ApplicationId","APNSVoipSandboxChannelRequest"],"payload":"APNSVoipSandboxChannelRequest"},"output":{"type":"structure","members":{"APNSVoipSandboxChannelResponse":{"shape":"S2m"}},"required":["APNSVoipSandboxChannelResponse"],"payload":"APNSVoipSandboxChannelResponse"}},"UpdateApplicationSettings":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/settings","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"WriteApplicationSettingsRequest":{"type":"structure","members":{"CampaignHook":{"shape":"Sy"},"CloudWatchMetricsEnabled":{"type":"boolean"},"Limits":{"shape":"S10"},"QuietTime":{"shape":"Sx"}}}},"required":["ApplicationId","WriteApplicationSettingsRequest"],"payload":"WriteApplicationSettingsRequest"},"output":{"type":"structure","members":{"ApplicationSettingsResource":{"shape":"S4b"}},"required":["ApplicationSettingsResource"],"payload":"ApplicationSettingsResource"}},"UpdateBaiduChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/baidu","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"BaiduChannelRequest":{"type":"structure","members":{"ApiKey":{},"Enabled":{"type":"boolean"},"SecretKey":{}},"required":["SecretKey","ApiKey"]}},"required":["ApplicationId","BaiduChannelRequest"],"payload":"BaiduChannelRequest"},"output":{"type":"structure","members":{"BaiduChannelResponse":{"shape":"S2r"}},"required":["BaiduChannelResponse"],"payload":"BaiduChannelResponse"}},"UpdateCampaign":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/campaigns/{campaign-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"CampaignId":{"location":"uri","locationName":"campaign-id"},"WriteCampaignRequest":{"shape":"S8"}},"required":["CampaignId","ApplicationId","WriteCampaignRequest"],"payload":"WriteCampaignRequest"},"output":{"type":"structure","members":{"CampaignResponse":{"shape":"S12"}},"required":["CampaignResponse"],"payload":"CampaignResponse"}},"UpdateEmailChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/email","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EmailChannelRequest":{"type":"structure","members":{"ConfigurationSet":{},"Enabled":{"type":"boolean"},"FromAddress":{},"Identity":{},"RoleArn":{}},"required":["FromAddress","Identity"]}},"required":["ApplicationId","EmailChannelRequest"],"payload":"EmailChannelRequest"},"output":{"type":"structure","members":{"EmailChannelResponse":{"shape":"S2w"}},"required":["EmailChannelResponse"],"payload":"EmailChannelResponse"}},"UpdateEndpoint":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/endpoints/{endpoint-id}","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EndpointId":{"location":"uri","locationName":"endpoint-id"},"EndpointRequest":{"type":"structure","members":{"Address":{},"Attributes":{"shape":"S30"},"ChannelType":{},"Demographic":{"shape":"S32"},"EffectiveDate":{},"EndpointStatus":{},"Location":{"shape":"S33"},"Metrics":{"shape":"S34"},"OptOut":{},"RequestId":{},"User":{"shape":"S35"}}}},"required":["ApplicationId","EndpointId","EndpointRequest"],"payload":"EndpointRequest"},"output":{"type":"structure","members":{"MessageBody":{"shape":"S8t"}},"required":["MessageBody"],"payload":"MessageBody"}},"UpdateEndpointsBatch":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/endpoints","responseCode":202},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"EndpointBatchRequest":{"type":"structure","members":{"Item":{"type":"list","member":{"type":"structure","members":{"Address":{},"Attributes":{"shape":"S30"},"ChannelType":{},"Demographic":{"shape":"S32"},"EffectiveDate":{},"EndpointStatus":{},"Id":{},"Location":{"shape":"S33"},"Metrics":{"shape":"S34"},"OptOut":{},"RequestId":{},"User":{"shape":"S35"}}}}},"required":["Item"]}},"required":["ApplicationId","EndpointBatchRequest"],"payload":"EndpointBatchRequest"},"output":{"type":"structure","members":{"MessageBody":{"shape":"S8t"}},"required":["MessageBody"],"payload":"MessageBody"}},"UpdateGcmChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/gcm","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"GCMChannelRequest":{"type":"structure","members":{"ApiKey":{},"Enabled":{"type":"boolean"}},"required":["ApiKey"]}},"required":["ApplicationId","GCMChannelRequest"],"payload":"GCMChannelRequest"},"output":{"type":"structure","members":{"GCMChannelResponse":{"shape":"S3b"}},"required":["GCMChannelResponse"],"payload":"GCMChannelResponse"}},"UpdateSegment":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/segments/{segment-id}","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SegmentId":{"location":"uri","locationName":"segment-id"},"WriteSegmentRequest":{"shape":"S1k"}},"required":["SegmentId","ApplicationId","WriteSegmentRequest"],"payload":"WriteSegmentRequest"},"output":{"type":"structure","members":{"SegmentResponse":{"shape":"S24"}},"required":["SegmentResponse"],"payload":"SegmentResponse"}},"UpdateSmsChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/sms","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"SMSChannelRequest":{"type":"structure","members":{"Enabled":{"type":"boolean"},"SenderId":{},"ShortCode":{}}}},"required":["ApplicationId","SMSChannelRequest"],"payload":"SMSChannelRequest"},"output":{"type":"structure","members":{"SMSChannelResponse":{"shape":"S3g"}},"required":["SMSChannelResponse"],"payload":"SMSChannelResponse"}},"UpdateVoiceChannel":{"http":{"method":"PUT","requestUri":"/v1/apps/{application-id}/channels/voice","responseCode":200},"input":{"type":"structure","members":{"ApplicationId":{"location":"uri","locationName":"application-id"},"VoiceChannelRequest":{"type":"structure","members":{"Enabled":{"type":"boolean"}}}},"required":["ApplicationId","VoiceChannelRequest"],"payload":"VoiceChannelRequest"},"output":{"type":"structure","members":{"VoiceChannelResponse":{"shape":"S3n"}},"required":["VoiceChannelResponse"],"payload":"VoiceChannelResponse"}}},"shapes":{"S4":{"type":"map","key":{},"value":{}},"S6":{"type":"structure","members":{"Arn":{},"Id":{}
9,"Name":{},"tags":{"shape":"S4","locationName":"tags"}},"required":["Id","Arn","Name"]},"S8":{"type":"structure","members":{"AdditionalTreatments":{"type":"list","member":{"type":"structure","members":{"MessageConfiguration":{"shape":"Sb"},"Schedule":{"shape":"Sj"},"SizePercent":{"type":"integer"},"TreatmentDescription":{},"TreatmentName":{}},"required":["SizePercent"]}},"Description":{},"HoldoutPercent":{"type":"integer"},"Hook":{"shape":"Sy"},"IsPaused":{"type":"boolean"},"Limits":{"shape":"S10"},"MessageConfiguration":{"shape":"Sb"},"Name":{},"Schedule":{"shape":"Sj"},"SegmentId":{},"SegmentVersion":{"type":"integer"},"tags":{"shape":"S4","locationName":"tags"},"TreatmentDescription":{},"TreatmentName":{}}},"Sb":{"type":"structure","members":{"ADMMessage":{"shape":"Sc"},"APNSMessage":{"shape":"Sc"},"BaiduMessage":{"shape":"Sc"},"DefaultMessage":{"shape":"Sc"},"EmailMessage":{"type":"structure","members":{"Body":{},"FromAddress":{},"HtmlBody":{},"Title":{}},"required":["Title"]},"GCMMessage":{"shape":"Sc"},"SMSMessage":{"type":"structure","members":{"Body":{},"MessageType":{},"SenderId":{}}}}},"Sc":{"type":"structure","members":{"Action":{},"Body":{},"ImageIconUrl":{},"ImageSmallIconUrl":{},"ImageUrl":{},"JsonBody":{},"MediaUrl":{},"RawContent":{},"SilentPush":{"type":"boolean"},"TimeToLive":{"type":"integer"},"Title":{},"Url":{}}},"Sj":{"type":"structure","members":{"EndTime":{},"EventFilter":{"type":"structure","members":{"Dimensions":{"type":"structure","members":{"Attributes":{"shape":"Sm"},"EventType":{"shape":"Sq"},"Metrics":{"shape":"Ss"}}},"FilterType":{}},"required":["FilterType","Dimensions"]},"Frequency":{},"IsLocalTime":{"type":"boolean"},"QuietTime":{"shape":"Sx"},"StartTime":{},"Timezone":{}},"required":["StartTime"]},"Sm":{"type":"map","key":{},"value":{"type":"structure","members":{"AttributeType":{},"Values":{"shape":"Sp"}},"required":["Values"]}},"Sp":{"type":"list","member":{}},"Sq":{"type":"structure","members":{"DimensionType":{},"Values":{"shape":"Sp"}},"required":["Values"]},"Ss":{"type":"map","key":{},"value":{"type":"structure","members":{"ComparisonOperator":{},"Value":{"type":"double"}},"required":["ComparisonOperator","Value"]}},"Sx":{"type":"structure","members":{"End":{},"Start":{}}},"Sy":{"type":"structure","members":{"LambdaFunctionName":{},"Mode":{},"WebUrl":{}}},"S10":{"type":"structure","members":{"Daily":{"type":"integer"},"MaximumDuration":{"type":"integer"},"MessagesPerSecond":{"type":"integer"},"Total":{"type":"integer"}}},"S12":{"type":"structure","members":{"AdditionalTreatments":{"type":"list","member":{"type":"structure","members":{"Id":{},"MessageConfiguration":{"shape":"Sb"},"Schedule":{"shape":"Sj"},"SizePercent":{"type":"integer"},"State":{"shape":"S15"},"TreatmentDescription":{},"TreatmentName":{}},"required":["Id","SizePercent"]}},"ApplicationId":{},"Arn":{},"CreationDate":{},"DefaultState":{"shape":"S15"},"Description":{},"HoldoutPercent":{"type":"integer"},"Hook":{"shape":"Sy"},"Id":{},"IsPaused":{"type":"boolean"},"LastModifiedDate":{},"Limits":{"shape":"S10"},"MessageConfiguration":{"shape":"Sb"},"Name":{},"Schedule":{"shape":"Sj"},"SegmentId":{},"SegmentVersion":{"type":"integer"},"State":{"shape":"S15"},"tags":{"shape":"S4","locationName":"tags"},"TreatmentDescription":{},"TreatmentName":{},"Version":{"type":"integer"}},"required":["LastModifiedDate","CreationDate","SegmentId","SegmentVersion","Id","Arn","ApplicationId"]},"S15":{"type":"structure","members":{"CampaignStatus":{}}},"S1a":{"type":"structure","members":{"ApplicationId":{},"CompletedPieces":{"type":"integer"},"CompletionDate":{},"CreationDate":{},"Definition":{"type":"structure","members":{"RoleArn":{},"S3UrlPrefix":{},"SegmentId":{},"SegmentVersion":{"type":"integer"}},"required":["S3UrlPrefix","RoleArn"]},"FailedPieces":{"type":"integer"},"Failures":{"shape":"Sp"},"Id":{},"JobStatus":{},"TotalFailures":{"type":"integer"},"TotalPieces":{"type":"integer"},"TotalProcessed":{"type":"integer"},"Type":{}},"required":["JobStatus","CreationDate","Type","Definition","Id","ApplicationId"]},"S1h":{"type":"structure","members":{"ApplicationId":{},"CompletedPieces":{"type":"integer"},"CompletionDate":{},"CreationDate":{},"Definition":{"type":"structure","members":{"DefineSegment":{"type":"boolean"},"ExternalId":{},"Format":{},"RegisterEndpoints":{"type":"boolean"},"RoleArn":{}
9,"S3Url":{},"SegmentId":{},"SegmentName":{}},"required":["Format","S3Url","RoleArn"]},"FailedPieces":{"type":"integer"},"Failures":{"shape":"Sp"},"Id":{},"JobStatus":{},"TotalFailures":{"type":"integer"},"TotalPieces":{"type":"integer"},"TotalProcessed":{"type":"integer"},"Type":{}},"required":["JobStatus","CreationDate","Type","Definition","Id","ApplicationId"]},"S1k":{"type":"structure","members":{"Dimensions":{"shape":"S1l"},"Name":{},"SegmentGroups":{"shape":"S1u"},"tags":{"shape":"S4","locationName":"tags"}}},"S1l":{"type":"structure","members":{"Attributes":{"shape":"Sm"},"Behavior":{"type":"structure","members":{"Recency":{"type":"structure","members":{"Duration":{},"RecencyType":{}},"required":["Duration","RecencyType"]}}},"Demographic":{"type":"structure","members":{"AppVersion":{"shape":"Sq"},"Channel":{"shape":"Sq"},"DeviceType":{"shape":"Sq"},"Make":{"shape":"Sq"},"Model":{"shape":"Sq"},"Platform":{"shape":"Sq"}}},"Location":{"type":"structure","members":{"Country":{"shape":"Sq"},"GPSPoint":{"type":"structure","members":{"Coordinates":{"type":"structure","members":{"Latitude":{"type":"double"},"Longitude":{"type":"double"}},"required":["Latitude","Longitude"]},"RangeInKilometers":{"type":"double"}},"required":["Coordinates"]}}},"Metrics":{"shape":"Ss"},"UserAttributes":{"shape":"Sm"}}},"S1u":{"type":"structure","members":{"Groups":{"type":"list","member":{"type":"structure","members":{"Dimensions":{"type":"list","member":{"shape":"S1l"}},"SourceSegments":{"type":"list","member":{"type":"structure","members":{"Id":{},"Version":{"type":"integer"}},"required":["Id"]}},"SourceType":{},"Type":{}}}},"Include":{}}},"S24":{"type":"structure","members":{"ApplicationId":{},"Arn":{},"CreationDate":{},"Dimensions":{"shape":"S1l"},"Id":{},"ImportDefinition":{"type":"structure","members":{"ChannelCounts":{"type":"map","key":{},"value":{"type":"integer"}},"ExternalId":{},"Format":{},"RoleArn":{},"S3Url":{},"Size":{"type":"integer"}},"required":["Format","S3Url","Size","ExternalId","RoleArn"]},"LastModifiedDate":{},"Name":{},"SegmentGroups":{"shape":"S1u"},"SegmentType":{},"tags":{"shape":"S4","locationName":"tags"},"Version":{"type":"integer"}},"required":["SegmentType","CreationDate","Id","Arn","ApplicationId"]},"S2a":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2d":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"HasTokenKey":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2g":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"HasTokenKey":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2j":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"HasTokenKey":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2m":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"DefaultAuthenticationMethod":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"HasTokenKey":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2r":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Credential":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{}
9,"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Credential","Platform"]},"S2w":{"type":"structure","members":{"ApplicationId":{},"ConfigurationSet":{},"CreationDate":{},"Enabled":{"type":"boolean"},"FromAddress":{},"HasCredential":{"type":"boolean"},"Id":{},"Identity":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"MessagesPerSecond":{"type":"integer"},"Platform":{},"RoleArn":{},"Version":{"type":"integer"}},"required":["Platform"]},"S2z":{"type":"structure","members":{"Address":{},"ApplicationId":{},"Attributes":{"shape":"S30"},"ChannelType":{},"CohortId":{},"CreationDate":{},"Demographic":{"shape":"S32"},"EffectiveDate":{},"EndpointStatus":{},"Id":{},"Location":{"shape":"S33"},"Metrics":{"shape":"S34"},"OptOut":{},"RequestId":{},"User":{"shape":"S35"}}},"S30":{"type":"map","key":{},"value":{"shape":"Sp"}},"S32":{"type":"structure","members":{"AppVersion":{},"Locale":{},"Make":{},"Model":{},"ModelVersion":{},"Platform":{},"PlatformVersion":{},"Timezone":{}}},"S33":{"type":"structure","members":{"City":{},"Country":{},"Latitude":{"type":"double"},"Longitude":{"type":"double"},"PostalCode":{},"Region":{}}},"S34":{"type":"map","key":{},"value":{"type":"double"}},"S35":{"type":"structure","members":{"UserAttributes":{"shape":"S30"},"UserId":{}}},"S38":{"type":"structure","members":{"ApplicationId":{},"DestinationStreamArn":{},"ExternalId":{},"LastModifiedDate":{},"LastUpdatedBy":{},"RoleArn":{}},"required":["ApplicationId","RoleArn","DestinationStreamArn"]},"S3b":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Credential":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Credential","Platform"]},"S3g":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"PromotionalMessagesPerSecond":{"type":"integer"},"SenderId":{},"ShortCode":{},"TransactionalMessagesPerSecond":{"type":"integer"},"Version":{"type":"integer"}},"required":["Platform"]},"S3j":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S2z"}}},"required":["Item"]},"S3n":{"type":"structure","members":{"ApplicationId":{},"CreationDate":{},"Enabled":{"type":"boolean"},"HasCredential":{"type":"boolean"},"Id":{},"IsArchived":{"type":"boolean"},"LastModifiedBy":{},"LastModifiedDate":{},"Platform":{},"Version":{"type":"integer"}},"required":["Platform"]},"S41":{"type":"timestamp","timestampFormat":"iso8601"},"S44":{"type":"structure","members":{"Rows":{"type":"list","member":{"type":"structure","members":{"GroupedBys":{"shape":"S47"},"Values":{"shape":"S47"}},"required":["GroupedBys","Values"]}}},"required":["Rows"]},"S47":{"type":"list","member":{"type":"structure","members":{"Key":{},"Type":{},"Value":{}},"required":["Type","Value","Key"]}},"S4b":{"type":"structure","members":{"ApplicationId":{},"CampaignHook":{"shape":"Sy"},"LastModifiedDate":{},"Limits":{"shape":"S10"},"QuietTime":{"shape":"Sx"}},"required":["ApplicationId"]},"S4w":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S12"}},"NextToken":{}},"required":["Item"]},"S5f":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S1a"}},"NextToken":{}},"required":["Item"]},"S5n":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S1h"}},"NextToken":{}},"required":["Item"]},"S5z":{"type":"structure","members":{"Item":{"type":"list","member":{"shape":"S24"}},"NextToken":{}},"required":["Item"]},"S6b":{"type":"structure","members":{"tags":{"shape":"S4","locationName":"tags"}},"required":["tags"]},"S76":{"type":"map","key":{},"value":{"type":"structure","members":{"BodyOverride":{},"Context":{"shape":"S4"},"RawContent":{},"Substitutions":{"shape":"S30"},"TitleOverride":{}}}},"S78":{"type":"structure","members":{"ADMMessage":{"type":"structure","members":{"Action":{},"Body":{},"ConsolidationKey":{},"Data":{"shape":"S4"},"ExpiresAfter":{},"IconReference":{},"ImageIconUrl":{},"ImageUrl":{},"MD5":{},"RawContent":{},"SilentPush":{"type":"boolean"},"SmallImageIconUrl":{},"Sound":{},"Substitutions":{"shape":"S30"},"Title":{},"Url":{}}},"APNSMessage":{"type":"structure","members":{"Action":{},"Badge":{"type":"integer"},"Body":{},"Category":{},"CollapseId":{},"Data":{"shape":"S4"},"MediaUrl":{},"PreferredAuthenticationMethod":{},"Priority":{},"RawContent":{},"SilentPush":{"type":"boolean"},"Sound":{},"Substitutions":{"shape":"S30"},"ThreadId":{},"TimeToLive":{"type":"integer"},"Title":{},"Url":{}}},"BaiduMessage":{"type":"structure","members":{"Action":{},"Body":{},"Data":{"shape":"S4"},"IconReference":{},"ImageIconUrl":{},"ImageUrl":{},"RawContent":{},"SilentPush":{"type":"boolean"},"SmallImageIconUrl":{},"Sound":{},"Substitutions":{"shape":"S30"},"TimeToLive":{"type":"integer"},"Title":{},"Url":{}}},"DefaultMessage":{"type":"structure","members":{"Body":{},"Substitutions":{"shape":"S30"}}},"DefaultPushNotificationMessage":{"type":"structure","members":{"Action":{},"Body":{},"Data":{"shape":"S4"},"SilentPush":{"type":"boolean"},"Substitutions":{"shape":"S30"},"Title":{},"Url":{}}},"EmailMessage":{"type":"structure","members":{"Body":{},"FeedbackForwardingAddress":{},"FromAddress":{},"RawEmail":{"type":"structure","members":{"Data":{"type":"blob"}}},"ReplyToAddresses":{"shape":"Sp"}
9,"SimpleEmail":{"type":"structure","members":{"HtmlPart":{"shape":"S7i"},"Subject":{"shape":"S7i"},"TextPart":{"shape":"S7i"}}},"Substitutions":{"shape":"S30"}}},"GCMMessage":{"type":"structure","members":{"Action":{},"Body":{},"CollapseKey":{},"Data":{"shape":"S4"},"IconReference":{},"ImageIconUrl":{},"ImageUrl":{},"Priority":{},"RawContent":{},"RestrictedPackageName":{},"SilentPush":{"type":"boolean"},"SmallImageIconUrl":{},"Sound":{},"Substitutions":{"shape":"S30"},"TimeToLive":{"type":"integer"},"Title":{},"Url":{}}},"SMSMessage":{"type":"structure","members":{"Body":{},"Keyword":{},"MessageType":{},"OriginationNumber":{},"SenderId":{},"Substitutions":{"shape":"S30"}}},"VoiceMessage":{"type":"structure","members":{"Body":{},"LanguageCode":{},"OriginationNumber":{},"Substitutions":{"shape":"S30"},"VoiceId":{}}}}},"S7i":{"type":"structure","members":{"Charset":{},"Data":{}}},"S7o":{"type":"map","key":{},"value":{"type":"structure","members":{"Address":{},"DeliveryStatus":{},"MessageId":{},"StatusCode":{"type":"integer"},"StatusMessage":{},"UpdatedToken":{}},"required":["DeliveryStatus","StatusCode"]}},"S8t":{"type":"structure","members":{"Message":{},"RequestID":{}}}}}')},2111:function(e,t,r){var n,i,o=r(313),s=r(314),a=0,u=0;e.exports=function(e,t,r){var c=t&&r||0,p=t||[],l=(e=e||{}).node||n,h=void 0!==e.clockseq?e.clockseq:i;if(null==l||null==h){var d=o();null==l&&(l=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:u+1,g=f-a+(m-u)/1e4;if(g<0&&void 0===e.clockseq&&(h=h+1&16383),(g<0||f>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=f,u=m,i=h;var y=(1e4*(268435455&(f+=122192928e5))+m)%4294967296;p[c++]=y>>>24&255,p[c++]=y>>>16&255,p[c++]=y>>>8&255,p[c++]=255&y;var v=f/4294967296*1e4&268435455;p[c++]=v>>>8&255,p[c++]=255&v,p[c++]=v>>>24&15|16,p[c++]=v>>>16&255,p[c++]=h>>>8|128,p[c++]=255&h;for(var b=0;b<6;++b)p[c+b]=l[b];return t||s(p)}},2112:function(e,t,r){var n=r(313),i=r(314);e.exports=function(e,t,r){var o=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||n)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},2113:function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2013-12-02","endpointPrefix":"kinesis","jsonVersion":"1.1","protocol":"json","protocolSettings":{"h2":"eventstream"},"serviceAbbreviation":"Kinesis","serviceFullName":"Amazon Kinesis","serviceId":"Kinesis","signatureVersion":"v4","targetPrefix":"Kinesis_20131202","uid":"kinesis-2013-12-02"},"operations":{"AddTagsToStream":{"input":{"type":"structure","required":["StreamName","Tags"],"members":{"StreamName":{},"Tags":{"type":"map","key":{},"value":{}}}}},"CreateStream":{"input":{"type":"structure","required":["StreamName","ShardCount"],"members":{"StreamName":{},"ShardCount":{"type":"integer"}}}},"DecreaseStreamRetentionPeriod":{"input":{"type":"structure","required":["StreamName","RetentionPeriodHours"],"members":{"StreamName":{},"RetentionPeriodHours":{"type":"integer"}}}},"DeleteStream":{"input":{"type":"structure","required":["StreamName"],"members":{"StreamName":{},"EnforceConsumerDeletion":{"type":"boolean"}}}},"DeregisterStreamConsumer":{"input":{"type":"structure","members":{"StreamARN":{},"ConsumerName":{},"ConsumerARN":{}}}},"DescribeLimits":{"input":{"type":"structure","members":{}},"output":{"type":"structure","required":["ShardLimit","OpenShardCount"],"members":{"ShardLimit":{"type":"integer"},"OpenShardCount":{"type":"integer"}}}},"DescribeStream":{"input":{"type":"structure","required":["StreamName"],"members":{"StreamName":{},"Limit":{"type":"integer"},"ExclusiveStartShardId":{}}},"output":{"type":"structure","required":["StreamDescription"],"members":{"StreamDescription":{"type":"structure","required":["StreamName","StreamARN","StreamStatus","Shards","HasMoreShards","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring"],"members":{"StreamName":{},"StreamARN":{},"StreamStatus":{},"Shards":{"shape":"Sp"},"HasMoreShards":{"type":"boolean"},"RetentionPeriodHours":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"},"EnhancedMonitoring":{"shape":"Sw"},"EncryptionType":{},"KeyId":{}}}}}},"DescribeStreamConsumer":{"input":{"type":"structure","members":{"StreamARN":{},"ConsumerName":{},"ConsumerARN":{}}},"output":{"type":"structure","required":["ConsumerDescription"],"members":{"ConsumerDescription":{"type":"structure","required":["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp","StreamARN"],"members":{"ConsumerName":{},"ConsumerARN":{},"ConsumerStatus":{},"ConsumerCreationTimestamp":{"type":"timestamp"},"StreamARN":{}}}}}},"DescribeStreamSummary":{"input":{"type":"structure","required":["StreamName"],"members":{"StreamName":{}}},"output":{"type":"structure","required":["StreamDescriptionSummary"],"members":{"StreamDescriptionSummary":{"type":"structure","required":["StreamName","StreamARN","StreamStatus","RetentionPeriodHours","StreamCreationTimestamp","EnhancedMonitoring","OpenShardCount"],"members":{"StreamName":{},"StreamARN":{},"StreamStatus":{},"RetentionPeriodHours":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"},"EnhancedMonitoring":{"shape":"Sw"},"EncryptionType":{},"KeyId":{},"OpenShardCount":{"type":"integer"},"ConsumerCount":{"type":"integer"}}}}}},"DisableEnhancedMonitoring":{"input":{"type":"structure","required":["StreamName","ShardLevelMetrics"],"members":{"StreamName":{},"ShardLevelMetrics":{"shape":"Sy"}}},"output":{"shape":"S1b"}},"EnableEnhancedMonitoring":{"input":{"type":"structure","required":["StreamName","ShardLevelMetrics"],"members":{"StreamName":{},"ShardLevelMetrics":{"shape":"Sy"}}},"output":{"shape":"S1b"}},"GetRecords":{"input":{"type":"structure","required":["ShardIterator"],"members":{"ShardIterator":{},"Limit":{"type":"integer"}}},"output":{"type":"structure","required":["Records"],"members":{"Records":{"type":"list","member":{"type":"structure","required":["SequenceNumber","Data","PartitionKey"],"members":{"SequenceNumber":{},"ApproximateArrivalTimestamp":{"type":"timestamp"},"Data":{"type":"blob"},"PartitionKey":{},"EncryptionType":{}}}},"NextShardIterator":{},"MillisBehindLatest":{"type":"long"}}}},"GetShardIterator":{"input":{"type":"structure","required":["StreamName","ShardId","ShardIteratorType"],"members":{"StreamName":{},"ShardId":{},"ShardIteratorType":{},"StartingSequenceNumber":{},"Timestamp":{"type":"timestamp"}}},"output":{"type":"structure","members":{"ShardIterator":{}}}},"IncreaseStreamRetentionPeriod":{"input":{"type":"structure","required":["StreamName","RetentionPeriodHours"],"members":{"StreamName":{},"RetentionPeriodHours":{"type":"integer"}}}},"ListShards":{"input":{"type":"structure","members":{"StreamName":{},"NextToken":{},"ExclusiveStartShardId":{},"MaxResults":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"}}},"output":{"type":"structure","members":{"Shards":{"shape":"Sp"},"NextToken":{}}}},"ListStreamConsumers":{"input":{"type":"structure","required":["StreamARN"],"members":{"StreamARN":{},"NextToken":{},"MaxResults":{"type":"integer"},"StreamCreationTimestamp":{"type":"timestamp"}}},"output":{"type":"structure","members":{"Consumers":{"type":"list","member":{"shape":"S1y"}},"NextToken":{}}}},"ListStreams":{"input":{"type":"structure","members":{"Limit":{"type":"integer"},"ExclusiveStartStreamName":{}}},"output":{"type":"structure","required":["StreamNames","HasMoreStreams"],"members":{"StreamNames":{"type":"list","member":{}},"HasMoreStreams":{"type":"boolean"}}}},"ListTagsForStream":{"input":{"type":"structure","required":["StreamName"],"members":{"StreamName":{},"ExclusiveStartTagKey":{},"Limit":{"type":"integer"}}},"output":{"type":"structure","required":["Tags","HasMoreTags"],"members":{"Tags":{"type":"list","member":{"type":"structure","required":["Key"],"members":{"Key":{},"Value":{}}}},"HasMoreTags":{"type":"boolean"}}}},"MergeShards":{"input":{"type":"structure","required":["StreamName","ShardToMerge","AdjacentShardToMerge"],"members":{"StreamName":{},"ShardToMerge":{},"AdjacentShardToMerge":{}}}},"PutRecord":{"input":{"type":"structure","required":["StreamName","Data","PartitionKey"],"members":{"StreamName":{},"Data":{"type":"blob"},"PartitionKey":{},"ExplicitHashKey":{},"SequenceNumberForOrdering":{}}},"output":{"type":"structure","required":["ShardId","SequenceNumber"],"members":{"ShardId":{},"SequenceNumber":{},"EncryptionType":{}}}},"PutRecords":{"input":{"type":"structure","required":["Records","StreamName"],"members":{"Records":{"type":"list","member":{"type":"structure","required":["Data","PartitionKey"],"members":{"Data":{"type":"blob"},"ExplicitHashKey":{},"PartitionKey":{}}}},"StreamName":{}}},"output":{"type":"structure","required":["Records"],"members":{"FailedRecordCount":{"type":"integer"},"Records":{"type":"list","member":{"type":"structure","members":{"SequenceNumber":{},"ShardId":{},"ErrorCode":{},"ErrorMessage":{}}}},"EncryptionType":{}}}},"RegisterStreamConsumer":{"input":{"type":"structure","required":["StreamARN","ConsumerName"],"members":{"StreamARN":{},"ConsumerName":{}}},"output":{"type":"structure","required":["Consumer"],"members":{"Consumer":{"shape":"S1y"}}}},"RemoveTagsFromStream":{"input":{"type":"structure","required":["StreamName","TagKeys"],"members":{"StreamName":{},"TagKeys":{"type":"list","member":{}}}}},"SplitShard":{"input":{"type":"structure","required":["StreamName","ShardToSplit","NewStartingHashKey"],"members":{"StreamName":{},"ShardToSplit":{},"NewStartingHashKey":{}}}},"StartStreamEncryption":{"input":{"type":"structure","required":["StreamName","EncryptionType","KeyId"],"members":{"StreamName":{},"EncryptionType":{},"KeyId":{}}}},"StopStreamEncryption":{"input":{"type":"structure","required":["StreamName","EncryptionType","KeyId"],"members":{"StreamName":{},"EncryptionType":{},"KeyId":{}}}}
9,"UpdateShardCount":{"input":{"type":"structure","required":["StreamName","TargetShardCount","ScalingType"],"members":{"StreamName":{},"TargetShardCount":{"type":"integer"},"ScalingType":{}}},"output":{"type":"structure","members":{"StreamName":{},"CurrentShardCount":{"type":"integer"},"TargetShardCount":{"type":"integer"}}}}},"shapes":{"Sp":{"type":"list","member":{"type":"structure","required":["ShardId","HashKeyRange","SequenceNumberRange"],"members":{"ShardId":{},"ParentShardId":{},"AdjacentParentShardId":{},"HashKeyRange":{"type":"structure","required":["StartingHashKey","EndingHashKey"],"members":{"StartingHashKey":{},"EndingHashKey":{}}},"SequenceNumberRange":{"type":"structure","required":["StartingSequenceNumber"],"members":{"StartingSequenceNumber":{},"EndingSequenceNumber":{}}}}}},"Sw":{"type":"list","member":{"type":"structure","members":{"ShardLevelMetrics":{"shape":"Sy"}}}},"Sy":{"type":"list","member":{}},"S1b":{"type":"structure","members":{"StreamName":{},"CurrentShardLevelMetrics":{"shape":"Sy"},"DesiredShardLevelMetrics":{"shape":"Sy"}}},"S1y":{"type":"structure","required":["ConsumerName","ConsumerARN","ConsumerStatus","ConsumerCreationTimestamp"],"members":{"ConsumerName":{},"ConsumerARN":{},"ConsumerStatus":{},"ConsumerCreationTimestamp":{"type":"timestamp"}}}}}')},2114:function(e){e.exports=JSON.parse('{"pagination":{"DescribeStream":{"input_token":"ExclusiveStartShardId","limit_key":"Limit","more_results":"StreamDescription.HasMoreShards","output_token":"StreamDescription.Shards[-1].ShardId","result_key":"StreamDescription.Shards"},"ListStreamConsumers":{"input_token":"NextToken","limit_key":"MaxResults","output_token":"NextToken"},"ListStreams":{"input_token":"ExclusiveStartStreamName","limit_key":"Limit","more_results":"HasMoreStreams","output_token":"StreamNames[-1]","result_key":"StreamNames"}}}')},2115:function(e){e.exports=JSON.parse('{"version":2,"waiters":{"StreamExists":{"delay":10,"operation":"DescribeStream","maxAttempts":18,"acceptors":[{"expected":"ACTIVE","matcher":"path","state":"success","argument":"StreamDescription.StreamStatus"}]},"StreamNotExists":{"delay":10,"operation":"DescribeStream","maxAttempts":18,"acceptors":[{"expected":"ResourceNotFoundException","matcher":"error","state":"success"}]}}}')},2116:function(e){e.exports=JSON.parse('{"version":"2.0","metadata":{"apiVersion":"2018-03-22","endpointPrefix":"personalize-events","jsonVersion":"1.1","protocol":"rest-json","serviceFullName":"Amazon Personalize Events","serviceId":"Personalize Events","signatureVersion":"v4","signingName":"personalize","uid":"personalize-events-2018-03-22"},"operations":{"PutEvents":{"http":{"requestUri":"/events"},"input":{"type":"structure","required":["trackingId","sessionId","eventList"],"members":{"trackingId":{},"userId":{},"sessionId":{},"eventList":{"type":"list","member":{"type":"structure","required":["eventType","properties","sentAt"],"members":{"eventId":{},"eventType":{},"properties":{"jsonvalue":true},"sentAt":{"type":"timestamp"}}}}}}}},"shapes":{}}')},2117:function(e){e.exports=JSON.parse('{"pagination":{}}')},2118:function(e,t,r){var n,i,o,s;e.exports=(n=r(55),o=(i=n).lib.Base,s=i.enc.Utf8,void(i.algo.HMAC=o.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),a=i.words,u=o.words,c=0;c<r;c++)a[c]^=1549556828,u[c]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))},23:function(e,t,r){var n={util:r(41)};({}).toString(),e.exports=n,n.util.update(n,{VERSION:"2.518.0",Signers:{},Protocol:{Json:r(156),Query:r(296),Rest:r(128),RestJson:r(298),RestXml:r(299)},XML:{Builder:r(2043),Parser:null},JSON:{Builder:r(157),Parser:r(158)},Model:{Api:r(300),Operation:r(301),Shape:r(108),Paginator:r(302),ResourceWaiter:r(303)},apiLoader:r(2048),EndpointCache:r(2049).EndpointCache}),r(304),r(2051),r(2054),r(307),r(2055),r(2060),r(2062),r(2063),r(2064),r(2071),n.events=new n.SequentialExecutor,n.util.memoizedProperty(n,"endpointCache",(function(){return new n.EndpointCache(n.config.endpointCacheSize)}),!0)},295:function(e,t,r){r(89);var n=r(23);"undefined"!=typeof window&&(window.AWS=n),e.exports=n,"undefined"!=typeof self&&(self.AWS=n)},296:function(e,t,r){var n=r(23),i=r(41),o=r(2042),s=r(108),a=r(159).populateHostPrefix;e.exports={buildRequest:function(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name},(new o).serialize(e.params,t.input,(function(e,t){r.params[e]=t})),r.body=i.queryParamsToString(r.params),a(e)},extractError:function(e){var t,r=e.httpResponse.body.toString();if(r.match("<UnknownOperationException"))t={Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation};else try{t=(new n.XML.Parser).parse(r)}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.requestId&&!e.requestId&&(e.requestId=t.requestId),t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=i.error(new Error,{code:t.Code,message:t.Message}):e.error=i.error(new Error,{code:e.httpResponse.statusCode,message:null})},extractData:function(e){var t=e.request,r=t.service.api.operations[t.operation].output||{},o=r;if(o.resultWrapper){var a=s.create({type:"structure"});a.members[o.resultWrapper]=r,a.memberNames=[o.resultWrapper],i.property(r,"name",r.resultWrapper),r=a}var u=new n.XML.Parser;if(r&&r.members&&!r.members._XAMZRequestId){var c=s.create({type:"string"},{api:{protocol:"query"}},"requestId");r.members._XAMZRequestId=c}var p=u.parse(e.httpResponse.body.toString(),r);e.requestId=p._XAMZRequestId||p.requestId,p._XAMZRequestId&&delete p._XAMZRequestId,o.resultWrapper&&p[o.resultWrapper]&&(i.update(p,p[o.resultWrapper]),delete p[o.resultWrapper]),e.data=p}}},297:function(e,t,r){var n=r(41).memoizedProperty;function i(e,t,r,i){n(this,i(e),(function(){return r(e,t)}))}
9e.exports=function(e,t,r,n,o){for(var s in n=n||String,e)Object.prototype.hasOwnProperty.call(e,s)&&(i.call(this,s,e[s],r,n),o&&o(s,e[s]))}},298:function(e,t,r){var n=r(41),i=r(128),o=r(156),s=r(157),a=r(158);function u(e,t){e.service.api.operations[e.operation].input;if(!e.httpRequest.headers["Content-Type"]){var r=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=r}}e.exports={buildRequest:function(e){i.buildRequest(e),["HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&function(e){var t=new s,r=e.service.api.operations[e.operation].input;if(r.payload){var n,i=r.members[r.payload];if(void 0===(n=e.params[r.payload]))return;"structure"===i.type?(e.httpRequest.body=t.build(n,i),u(e)):(e.httpRequest.body=n,("binary"===i.type||i.isStreaming)&&u(e,!0))}else{var o=t.build(e.params,r);"{}"===o&&"GET"===e.httpRequest.method||(e.httpRequest.body=o),u(e)}}(e)},extractError:function(e){o.extractError(e)},extractData:function(e){i.extractData(e);var t=e.request,r=t.service.api.operations[t.operation],s=t.service.api.operations[t.operation].output||{};if(r.hasEventOutput,s.payload){var u=s.members[s.payload],c=e.httpResponse.body;if(u.isEventStream)p=new a,e.data[payload]=n.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:c,p,u);else if("structure"===u.type||"list"===u.type){var p=new a;e.data[s.payload]=p.parse(c,u)}else"binary"===u.type||u.isStreaming?e.data[s.payload]=c:e.data[s.payload]=u.toType(c)}else{var l=e.data;
9o.extractData(e),e.data=n.merge(l,e.data)}}}},299:function(e,t,r){var n=r(23),i=r(41),o=r(128);e.exports={buildRequest:function(e){o.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&function(e){var t=e.service.api.operations[e.operation].input,r=new n.XML.Builder,o=e.params,s=t.payload;if(s){var a=t.members[s];if(void 0===(o=o[s]))return;if("structure"===a.type){var u=a.name;e.httpRequest.body=r.toXML(o,a,u,!0)}else e.httpRequest.body=o}else e.httpRequest.body=r.toXML(o,t,t.name||t.shape||i.string.upperFirst(e.operation)+"Request")}(e)},extractError:function(e){var t;o.extractError(e);try{t=(new n.XML.Parser).parse(e.httpResponse.body.toString())}catch(r){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=i.error(new Error,{code:t.Code,message:t.Message}):e.error=i.error(new Error,{code:e.httpResponse.statusCode,message:null})},extractData:function(e){var t;o.extractData(e);var r=e.request,s=e.httpResponse.body,a=r.service.api.operations[r.operation],u=a.output,c=(a.hasEventOutput,u.payload);if(c){var p=u.members[c];p.isEventStream?(t=new n.XML.Parser,e.data[c]=i.createEventStream(2===n.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,p)):"structure"===p.type?(t=new n.XML.Parser,e.data[c]=t.parse(s.toString(),p)):"binary"===p.type||p.isStreaming?e.data[c]=s:e.data[c]=p.toType(s)}else if(s.length>0){var l=(t=new n.XML.Parser).parse(s.toString(),u);i.update(e.data,l)}}}},3:function(module,exports,__webpack_require__){!function(){"use strict";var e=document,f=window,k=e.createElement("div"),l=Array.prototype,m=l.filter,n=l.indexOf,aa=l.map,q=l.push,r=l.reverse,u=l.slice,v=l.some,ba=l.splice,ca=/^#[\w-]*$/,da=/^\.[\w-]*$/,ea=/<.+>/,fa=/^\w+$/;function w(t,r){return void 0===r&&(r=e),r!==e&&1!==r.nodeType&&9!==r.nodeType?[]:da.test(t)?r.getElementsByClassName(t.slice(1)):fa.test(t)?r.getElementsByTagName(t):r.querySelectorAll(t)}var x=function(){function t(t,r){if(void 0===r&&(r=e),t){if(t instanceof x)return t;var n=t;if(y(t)){if(n=r instanceof x?r[0]:r,!(n=ca.test(t)?n.getElementById(t.slice(1)):ea.test(t)?A(t):w(t,n)))return}else if(B(t))return this.ready(t);for((n.nodeType||n===f)&&(n=[n]),this.length=n.length,t=0,r=this.length;t<r;t++)this[t]=n[t]}}return t.prototype.init=function(e,r){return new t(e,r)},t}(),C=x.prototype.init;C.fn=C.prototype=x.prototype,x.prototype.length=0,x.prototype.splice=ba,"function"==typeof Symbol&&(x.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator]),x.prototype.get=function(e){return void 0===e?u.call(this):this[0>e?e+this.length:e]},x.prototype.eq=function(e){return C(this.get(e))},x.prototype.first=function(){return this.eq(0)},x.prototype.last=function(){return this.eq(-1)},x.prototype.map=function(e){return C(aa.call(this,(function(t,r){return e.call(t,r,t)})))},x.prototype.slice=function(){return C(u.apply(this,arguments))};var ha=/-([a-z])/g;function ia(e,t){return t.toUpperCase()}function D(e){return e.replace(ha,ia)}function E(e,t){for(var r=0,n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);}function F(e){for(var t=1;t<arguments.length;t++);for(var r=(t=arguments).length,n=2>r?0:1;n<r;n++)for(var i in t[n])e[i]=t[n][i];return e}C.camelCase=D,C.each=E,x.prototype.each=function(e){return E(this,e),this},x.prototype.removeProp=function(e){return this.each((function(t,r){delete r[e]}))},x.prototype.extend=function(e){return F(C.fn,e)},C.extend=F;var G=1;function H(e,t){var r=e&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector);return!!r&&r.call(e,t)}function I(e,t,r){for(var n=[],i=0,o=e.length;i<o;i++)for(var s=e[i][t];null!=s&&(n.push(s),r);)s=s[t];return n}function B(e){return"function"==typeof e}function y(e){return"string"==typeof e}function ja(e){return!isNaN(parseFloat(e))&&isFinite(e)}C.guid=G,C.matches=H;var J=Array.isArray;function K(e){return y(e)?function(t,r){return H(r,e)}:B(e)?e:e instanceof x?function(t,r){return e.is(r)}:function(t,r){return r===e}}function L(e,t){return t&&e.length?e.filter(t):e}C.isFunction=B,C.isString=y,C.isNumeric=ja,C.isArray=J,x.prototype.prop=function(e,t){if(e){if(y(e))return 2>arguments.length?this[0]&&this[0][e]:this.each((function(r,n){n[e]=t}));for(var r in e)this.prop(r,e[r]);return this}},x.prototype.filter=function(e){if(!e)return C();var t=K(e);return C(m.call(this,(function(e,r){return t.call(e,r,e)})))};var ka=/\S+/g;function M(e){return y(e)&&e.match(ka)||[]}function N(e){return 1<e.length?m.call(e,(function(e,t,r){return n.call(r,e)===t})):e}function O(e,t,r){if(1===e.nodeType&&t)return e=f.getComputedStyle(e,null),t?r?e.getPropertyValue(t)||void 0:e[t]:e}function P(e,t){return parseInt(O(e,t),10)||0}x.prototype.hasClass=function(e){return e&&v.call(this,(function(t){return t.classList.contains(e)}))},x.prototype.removeAttr=function(e){var t=M(e);return t.length?this.each((function(e,r){E(t,(function(e,t){r.removeAttribute(t)}))}
9)):this},x.prototype.attr=function(e,t){if(e){if(y(e)){if(2>arguments.length){if(!this[0])return;var r=this[0].getAttribute(e);return null===r?void 0:r}return null===t?this.removeAttr(e):this.each((function(r,n){n.setAttribute(e,t)}))}for(r in e)this.attr(r,e[r]);return this}},x.prototype.toggleClass=function(e,t){var r=M(e),n=void 0!==t;return r.length?this.each((function(e,i){E(r,(function(e,r){n?t?i.classList.add(r):i.classList.remove(r):i.classList.toggle(r)}))})):this},x.prototype.addClass=function(e){return this.toggleClass(e,!0)},x.prototype.removeClass=function(e){return arguments.length?this.toggleClass(e,!1):this.attr("class","")},C.unique=N,x.prototype.add=function(e,t){return C(N(this.get().concat(C(e,t).get())))};var Q=/^--/,R={},la=k.style,ma=["webkit","moz","ms","o"];function na(e,t){if(void 0===t&&(t=Q.test(e)),t)return e;if(!R[e]){var r=""+(t=D(e)).charAt(0).toUpperCase()+t.slice(1);E(t=(t+" "+ma.join(r+" ")+r).split(" "),(function(t,r){if(r in la)return R[e]=r,!1}))}return R[e]}C.prefixedProp=na;var oa={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function pa(e,t,r){return void 0===r&&(r=Q.test(e)),r||oa[e]||!ja(t)?t:t+"px"}x.prototype.css=function(e,t){if(y(e)){var r=Q.test(e);return e=na(e,r),2>arguments.length?this[0]&&O(this[0],e,r):e?(t=pa(e,t,r),this.each((function(n,i){1===i.nodeType&&(r?i.style.setProperty(e,t):i.style[e]=t)}))):this}for(var n in e)this.css(n,e[n]);return this};var qa=/^data-(.*)/;function S(e){return e.__cashData=e.__cashData||{}}function ra(e,t){var r=S(e);if(t){if(!(t in r)&&void 0!==(e=e.dataset?e.dataset[t]||e.dataset[D(t)]:C(e).attr("data-"+t))){try{e=JSON.parse(e)}catch(e){}r[t]=e}return r[t]}return r}function sa(e,t){return P(e,"border"+(t?"Left":"Top")+"Width")+P(e,"padding"+(t?"Left":"Top"))+P(e,"padding"+(t?"Right":"Bottom"))+P(e,"border"+(t?"Right":"Bottom")+"Width")}C.hasData=function(e){return"__cashData"in e},x.prototype.data=function(e,t){var r=this;if(!e){if(!this[0])return;return E(this[0].attributes,(function(e,t){(e=t.name.match(qa))&&r.data(e[1])})),ra(this[0])}if(y(e))return void 0===t?this[0]&&ra(this[0],e):this.each((function(r,n){S(n)[e]=t}));for(var n in e)this.data(n,e[n]);return this},x.prototype.removeData=function(e){return this.each((function(t,r){void 0===e?delete r.__cashData:delete S(r)[e]}))},E(["Width","Height"],(function(e,t){x.prototype["inner"+t]=function(){if(this[0])return this[0]===f?f["inner"+t]:this[0]["client"+t]}})),E(["width","height"],(function(e,t){x.prototype[t]=function(r){if(!this[0])return void 0===r?void 0:this;if(!arguments.length)return this[0]===f?this[0][D("outer-"+t)]:this[0].getBoundingClientRect()[t]-sa(this[0],!e);var n=parseInt(r,10);return this.each((function(r,i){1===i.nodeType&&(r=O(i,"boxSizing"),i.style[t]=pa(t,n+("border-box"===r?sa(i,!e):0)))}))}})),E(["Width","Height"],(function(e,t){x.prototype["outer"+t]=function(r){if(this[0])return this[0]===f?f["outer"+t]:this[0]["offset"+t]+(r?P(this[0],"margin"+(e?"Top":"Left"))+P(this[0],"margin"+(e?"Bottom":"Right")):0)}}));var T={};function ta(e,t){return!t||!v.call(t,(function(t){return 0>e.indexOf(t)}))}x.prototype.toggle=function(t){return this.each((function(r,n){if(t=void 0!==t?t:"none"===O(n,"display")){if(n.style.display="","none"===O(n,"display")){if(r=n.style,n=n.tagName,T[n])n=T[n];else{var i=e.createElement(n);e.body.appendChild(i);var o=O(i,"display");e.body.removeChild(i),n=T[n]="none"!==o?o:"block"}r.display=n}}else n.style.display="none"}))},x.prototype.hide=function(){return this.toggle(!1)},x.prototype.show=function(){return this.toggle(!0)};var U={focus:"focusin",blur:"focusout"}
9,ua={mouseenter:"mouseover",mouseleave:"mouseout"},va=/^(?:mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function wa(e,t,r,n,i){i.guid=i.guid||G++;var o=e.__cashEvents=e.__cashEvents||{};o[t]=o[t]||[],o[t].push([r,n,i]),e.addEventListener(t,i)}function V(e){return[(e=e.split("."))[0],e.slice(1).sort()]}function W(e,t,r,n,i){var o=e.__cashEvents=e.__cashEvents||{};if(t)o[t]&&(o[t]=o[t].filter((function(o){var s=o[0],a=o[1];if(o=o[2],i&&o.guid!==i.guid||!ta(s,r)||n&&n!==a)return!0;e.removeEventListener(t,o)})));else{for(t in o)W(e,t,r,n,i);delete e.__cashEvents}}function xa(e){return e.multiple?I(m.call(e.options,(function(e){return e.selected&&!e.disabled&&!e.parentNode.disabled})),"value"):e.value||""}x.prototype.off=function(e,t,r){var n=this;return void 0===e?this.each((function(e,t){return W(t)})):(B(t)&&(r=t,t=""),E(M(e),(function(e,i){var o=(e=V(ua[i]||U[i]||i))[0],s=e[1];n.each((function(e,n){return W(n,o,s,t,r)}))}))),this},x.prototype.on=function(e,t,r,n){var i=this;if(!y(e)){for(var o in e)this.on(o,t,e[o]);return this}return B(t)&&(r=t,t=""),E(M(e),(function(e,o){var s=(e=V(ua[o]||U[o]||o))[0],a=e[1];i.each((function(e,i){(e=function e(o){if(!o.namespace||ta(a,o.namespace.split("."))){var u=i;if(t){for(var c=o.target;!H(c,t);){if(c===i)return;if(!(c=c.parentNode))return}u=c,o.__delegate=!0}o.__delegate&&Object.defineProperty(o,"currentTarget",{configurable:!0,get:function(){return u}}),c=r.call(u,o,o.data),n&&W(i,s,a,t,e),!1===c&&(o.preventDefault(),o.stopPropagation())}}).guid=r.guid=r.guid||G++,wa(i,s,a,t,e)}))})),this},x.prototype.one=function(e,t,r){return this.on(e,t,r,!0)},x.prototype.ready=function(t){function r(){return t(C)}return"loading"!==e.readyState?setTimeout(r):e.addEventListener("DOMContentLoaded",r),this},x.prototype.trigger=function(t,r){var n=t;if(y(t)){var i=V(t);t=i[0],i=i[1];var o=va.test(t)?"MouseEvents":"HTMLEvents";(n=e.createEvent(o)).initEvent(t,!0,!0),n.namespace=i.join(".")}n.data=r;var s=n.type in U;return this.each((function(e,t){s&&B(t[n.type])?t[n.type]():t.dispatchEvent(n)}))};var ya=/%20/g,Ba=/file|reset|submit|button|image/i,Ca=/radio|checkbox/i;x.prototype.serialize=function(){var e="";return this.each((function(t,r){E(r.elements||[r],(function(t,r){r.disabled||!r.name||"FIELDSET"===r.tagName||Ba.test(r.type)||Ca.test(r.type)&&!r.checked||void 0!==(t=xa(r))&&E(t=J(t)?t:[t],(function(t,n){t=e,n="&"+encodeURIComponent(r.name)+"="+encodeURIComponent(n).replace(ya,"+"),e=t+n}))}))})),e.substr(1)},x.prototype.val=function(e){return void 0===e?this[0]&&xa(this[0]):this.each((function(t,r){if("SELECT"===r.tagName){var n=J(e)?e:null===e?[]:[e];E(r.options,(function(e,t){t.selected=0<=n.indexOf(t.value)}))}else r.value=null===e?"":e}))},x.prototype.clone=function(){return this.map((function(e,t){return t.cloneNode(!0)}))},x.prototype.detach=function(){return this.each((function(e,t){t.parentNode&&t.parentNode.removeChild(t)}))};var Da=/^\s*<(\w+)[^>]*>/,Ea=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/,X;function A(t){if(!X){var r=e.createElement("table"),n=e.createElement("tr");X={"*":k,tr:e.createElement("tbody"),td:n,th:n,thead:r,tbody:r,tfoot:r}}return y(t)?Ea.test(t)?[e.createElement(RegExp.$1)]:(r=Da.test(t)&&RegExp.$1,(r=X[r]||X["*"]).innerHTML=t,C(r.childNodes).detach().get()):[]}C.parseHTML=A,x.prototype.empty=function(){var e=this[0];if(e)for(;e.firstChild;)e.removeChild(e.firstChild);return this},x.prototype.html=function(e){return void 0===e?this[0]&&this[0].innerHTML:this.each((function(t,r){r.innerHTML=e}))},x.prototype.remove=function(){return this.detach().off()},x.prototype.text=function(e){return void 0===e?this[0]?this[0].textContent:"":this.each((function(t,r){r.textContent=e}))},x.prototype.unwrap=function(){return this.parent().each((function(e,t){(e=C(t)).replaceWith(e.children())})),this};var Fa=e.documentElement;x.prototype.offset=function(){var e=this[0];if(e)return{top:(e=e.getBoundingClientRect()).top+f.pageYOffset-Fa.clientTop,left:e.left+f.pageXOffset-Fa.clientLeft}},x.prototype.offsetParent=function(){return C(this[0]&&this[0].offsetParent)},x.prototype.position=function(){var e=this[0];if(e)return{left:e.offsetLeft,top:e.offsetTop}},x.prototype.children=function(e){var t=[];return this.each((function(e,r){q.apply(t,r.children)})),L(C(N(t)),e)},x.prototype.contents=function(){var e=[];return this.each((function(t,r){q.apply(e,"IFRAME"===r.tagName?[r.contentDocument]:r.childNodes)})),C(N(e))},x.prototype.find=function(e){for(var t=[],r=0,n=this.length;r<n;r++){var i=w(e,this[r]);i.length&&q.apply(t,i)}return C(N(t))};var Ga=/^$|^module$|\/(?:java|ecma)script/i,Ha=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Y(a){a=C(a),a.filter("script").add(a.find("script")).each((function(a,c){!c.src&&Ga.test(c.type)&&c.ownerDocument.documentElement.contains(c)&&eval(c.textContent.replace(Ha,""))}))}function Z(e,t,r){E(e,(function(e,n){E(t,(function(t,i){t=e?i.cloneNode(!0):i,r?n.insertBefore(t,r&&n.firstChild):n.appendChild(t),Y(t)}))}
9))}x.prototype.append=function(){var e=this;return E(arguments,(function(t,r){Z(e,C(r))})),this},x.prototype.appendTo=function(e){return Z(C(e),this),this},x.prototype.insertAfter=function(e){var t=this;return C(e).each((function(e,r){var n=r.parentNode;n&&t.each((function(t,i){t=e?i.cloneNode(!0):i,n.insertBefore(t,r.nextSibling),Y(t)}))})),this},x.prototype.after=function(){var e=this;return E(r.apply(arguments),(function(t,n){r.apply(C(n).slice()).insertAfter(e)})),this},x.prototype.insertBefore=function(e){var t=this;return C(e).each((function(e,r){var n=r.parentNode;n&&t.each((function(t,i){t=e?i.cloneNode(!0):i,n.insertBefore(t,r),Y(t)}))})),this},x.prototype.before=function(){var e=this;return E(arguments,(function(t,r){C(r).insertBefore(e)})),this},x.prototype.prepend=function(){var e=this;return E(arguments,(function(t,r){Z(e,C(r),!0)})),this},x.prototype.prependTo=function(e){return Z(C(e),r.apply(this.slice()),!0),this},x.prototype.replaceWith=function(e){return this.before(e).remove()},x.prototype.replaceAll=function(e){return C(e).replaceWith(this),this},x.prototype.wrapAll=function(e){if(this[0]){for(e=C(e),this.first().before(e),e=e[0];e.children.length;)e=e.firstElementChild;this.appendTo(e)}return this},x.prototype.wrap=function(e){return this.each((function(t,r){var n=C(e)[0];C(r).wrapAll(t?n.cloneNode(!0):n)}))},x.prototype.wrapInner=function(e){return this.each((function(t,r){(r=(t=C(r)).contents()).length?r.wrapAll(e):t.append(e)}))},x.prototype.has=function(e){var t=y(e)?function(t,r){return!!w(e,r).length}:function(t,r){return r.contains(e)};return this.filter(t)},x.prototype.is=function(e){if(!e||!this[0])return!1;var t=K(e),r=!1;return this.each((function(e,n){return!(r=t.call(n,e,n))})),r},x.prototype.next=function(e,t){return L(C(N(I(this,"nextElementSibling",t))),e)},x.prototype.nextAll=function(e){return this.next(e,!0)},x.prototype.not=function(e){if(!e||!this[0])return this;var t=K(e);return this.filter((function(e,r){return!t.call(r,e,r)}))},x.prototype.parent=function(e){return L(C(N(I(this,"parentNode"))),e)},x.prototype.index=function(e){var t=e?C(e)[0]:this[0];return e=e?this:C(t).parent().children(),n.call(e,t)},x.prototype.closest=function(e){if(!e||!this[0])return C();var t=this.filter(e);return t.length?t:this.parent().closest(e)},x.prototype.parents=function(e){return L(C(N(I(this,"parentElement",!0))),e)},x.prototype.prev=function(e,t){return L(C(N(I(this,"previousElementSibling",t))),e)},x.prototype.prevAll=function(e){return this.prev(e,!0)},x.prototype.siblings=function(e){var t=this[0];return L(this.parent().children().filter((function(e,r){return r!==t})),e)},module.exports=C}()},300:function(e,t,r){var n=r(297),i=r(301),o=r(108),s=r(302),a=r(303),u=r(41),c=u.property,p=u.memoizedProperty;e.exports=function(e,t){var r=this;e=e||{},(t=t||{}).api=this,e.metadata=e.metadata||{},c(this,"isApi",!0,!1),c(this,"apiVersion",e.metadata.apiVersion),c(this,"endpointPrefix",e.metadata.endpointPrefix),c(this,"signingName",e.metadata.signingName),c(this,"globalEndpoint",e.metadata.globalEndpoint),c(this,"signatureVersion",e.metadata.signatureVersion),c(this,"jsonVersion",e.metadata.jsonVersion),c(this,"targetPrefix",e.metadata.targetPrefix),c(this,"protocol",e.metadata.protocol),c(this,"timestampFormat",e.metadata.timestampFormat),c(this,"xmlNamespaceUri",e.metadata.xmlNamespace),c(this,"abbreviation",e.metadata.serviceAbbreviation),c(this,"fullName",e.metadata.serviceFullName),c(this,"serviceId",e.metadata.serviceId),p(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})),c(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&&c(r,"endpointOperation",u.string.lowerFirst(e))}))),c(this,"shapes",new n(e.shapes,t,(function(e,r){return o.create(r,t)}))),c(this,"paginators",new n(e.paginators,t,(function(e,r){return new s(e,r,t)}))),c(this,"waiters",new n(e.waiters,t,(function(e,r){return new a(e,r,t)}),u.string.lowerFirst)),t.documentation&&(c(this,"documentation",e.documentation),c(this,"documentationUrl",e.documentationUrl))}},301:function(e,t,r){var n=r(108),i=r(41),o=i.property,s=i.memoizedProperty;e.exports=function(e,t,r){var i=this;r=r||{},o(this,"name",t.name||e),o(this,"api",r.api,!1),t.http=t.http||{},o(this,"endpoint",t.endpoint),o(this,"httpMethod",t.http.method||"POST"),o(this,"httpPath",t.http.requestUri||"/"),o(this,"authtype",t.authtype||""),o(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),s(this,"input",(function(){return t.input?n.create(t.input,r):new n.create({type:"structure"},r)})),s(this,"output",(function(){return t.output?n.create(t.output,r):new n.create({type:"structure"},r)})),s(this,"errors",(function(){var e=[];
vendor: 4,677 bytes, line 9
9if(!t.errors)return null;for(var i=0;i<t.errors.length;i++)e.push(n.create(t.errors[i],r));return e})),s(this,"paginator",(function(){return r.api.paginators[e]})),r.documentation&&(o(this,"documentation",t.documentation),o(this,"documentationUrl",t.documentationUrl)),s(this,"idempotentMembers",(function(){var e=[],t=i.input,r=t.members;if(!t.members)return e;for(var n in r)r.hasOwnProperty(n)&&!0===r[n].isIdempotent&&e.push(n);return e})),s(this,"hasEventOutput",(function(){return function(e){var t=e.members,r=e.payload;if(!e.members)return!1;if(r){return t[r].isEventStream}for(var n in t)if(!t.hasOwnProperty(n)&&!0===t[n].isEventStream)return!0;return!1}(i.output)}))}},302:function(e,t,r){var n=r(41).property;e.exports=function(e,t){n(this,"inputToken",t.input_token),n(this,"limitKey",t.limit_key),n(this,"moreResults",t.more_results),n(this,"outputToken",t.output_token),n(this,"resultKey",t.result_key)}},303:function(e,t,r){var n=r(41),i=n.property;e.exports=function(e,t,r){r=r||{},i(this,"name",e),i(this,"api",r.api,!1),t.operation&&i(this,"operation",n.string.lowerFirst(t.operation));var o=this;["type","description","delay","maxAttempts","acceptors"].forEach((function(e){var r=t[e];r&&i(o,e,r)}))}},304:function(e,t,r){var n=r(23);n.SequentialExecutor=n.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,r){return this._events[e]?r?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,r){return t._isAsync=!0,this.on(e,t,r)},removeListener:function(e,t){var r=this._events[e];if(r){for(var n=r.length,i=-1,o=0;o<n;++o)r[o]===t&&(i=o);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 o=this,s=i||null;function a(i){if(i&&(s=n.util.error(s||new Error,i),o._haltHandlersOnError))return r.call(o,s);o.callListeners(e,t,r,s)}for(;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(o,t.concat([a]));try{u.apply(o,t)}catch(e){s=n.util.error(s||new Error,e)}if(s&&o._haltHandlersOnError)return void r.call(o,s)}r.call(o,s)},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},305:function(e,t,r){var n=r(23);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)},306:function(e,t,r){var n=r(23);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;
9if(1===t.resolveCallbacks.push(e)){var r=0,i=t.providers.slice(0);!function e(o,s){if(!o&&s||r===i.length)return n.util.arrayEach(t.resolveCallbacks,(function(e){e(o,s)})),void(t.resolveCallbacks.length=0);var a=i[r++];(s="function"==typeof a?a.call():a).get?s.get((function(t){e(t,t?null:s)})):e(null,s)}()}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)},307:function(e,t,r){var n=r(23),i=n.util.inherit;n.Endpoint=i({constructor:function(e,t){if(n.util.hideProperties(this,["slashes","auth","hash","search","query"]),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}},308:function(e,t,r){var n=r(23),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},309: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}}},31:function(e,t,r){"use strict";var n=r(46),i=r(11);t.a=function(e,t,r){void 0===r&&(r={});var o=Object(n.a)(e),s=Object(n.a)(t),a=Object(i.a)(s[1]-o[1]),u=Object(i.a)(s[0]-o[0]),c=Object(i.a)(o[1]),p=Object(i.a)(s[1]),l=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(c)*Math.cos(p);return Object(i.k)(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),r.units)}},310: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("")}},312:function(e,t,r){"use strict";t.decode=t.parse=r(2085),t.encode=t.stringify=r(2086)},313: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}}},314: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("")}},315:function(e,t,r){var n;e.exports=(n=r(55),function(){if("function"==typeof ArrayBuffer){var e=n.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<r;i++)n[i>>>2]|=e[i]<<24-i%4*8;t.call(this,n,r)}else t.apply(this,arguments)}).prototype=e}}(),n.lib.WordArray)},375:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.mobileanalytics={},n.MobileAnalytics=i.defineService("mobileanalytics",["2014-06-05"]),Object.defineProperty(o.services.mobileanalytics,"2014-06-05",{get:function(){return r(2109)},enumerable:!0,configurable:!0}),e.exports=n.MobileAnalytics},376:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.pinpoint={}
9,n.Pinpoint=i.defineService("pinpoint",["2016-12-01"]),Object.defineProperty(o.services.pinpoint,"2016-12-01",{get:function(){return r(2110)},enumerable:!0,configurable:!0}),e.exports=n.Pinpoint},377:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.kinesis={},n.Kinesis=i.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=r(2113);return e.paginators=r(2114).pagination,e.waiters=r(2115).waiters,e},enumerable:!0,configurable:!0}),e.exports=n.Kinesis},378:function(e,t,r){r(89);var n=r(23),i=n.Service,o=n.apiLoader;o.services.personalizeevents={},n.PersonalizeEvents=i.defineService("personalizeevents",["2018-03-22"]),Object.defineProperty(o.services.personalizeevents,"2018-03-22",{get:function(){var e=r(2116);return e.paginators=r(2117).pagination,e},enumerable:!0,configurable:!0}),e.exports=n.PersonalizeEvents},40:function(e,t,r){"use strict";var n,i;function o(e){return e&&!!["provider","customState"].find((function(t){return e.hasOwnProperty(t)}))}function s(e){return void 0!==e.redirectSignIn}!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon"}(n||(n={})),function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default"}(i||(i={}));var a=r(12); 10/*! 11 * Copyright 2016 Amazon.com, 12 * Inc. or its affiliates. All Rights Reserved. 13 * 14 * Licensed under the Amazon Software License (the "License"). 15 * You may not use this file except in compliance with the 16 * License. A copy of the License is located at 17 * 18 * http://aws.amazon.com/asl/ 19 * 20 * or in the "license" file accompanying this file. This file is 21 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 22 * CONDITIONS OF ANY KIND, express or implied. See the License 23 * for the specific language governing permissions and 24 * limitations under the License. 25 */ 26var u,c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},n=r.ValidationData,i=r.Username,o=r.Password,s=r.AuthParameters,a=r.ClientMetadata;this.validationData=n||{},this.authParameters=s||{},this.clientMetadata=a||{},this.username=i,this.password=o}return e.prototype.getUsername=function(){return this.username},e.prototype.getPassword=function(){return this.password},e.prototype.getValidationData=function(){return this.validationData},e.prototype.getAuthParameters=function(){return this.authParameters},e.prototype.getClientMetadata=function(){return this.clientMetadata},e}(),p=r(25),l=r(55),h=r.n(l),d=(r(315),r(137)),f=r.n(d),m=r(104),g=r.n(m),y=v;function v(e,t){null!=e&&this.fromString(e,t)}function b(){return new v(null)}var S="undefined"!=typeof navigator;S&&"Microsoft Internet Explorer"==navigator.appName?(v.prototype.am=function(e,t,r,n,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,p=a*u+c*s;i=((u=s*u+((32767&p)<<15)+r[n]+(1073741823&i))>>>30)+(p>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},u=30):S&&"Netscape"!=navigator.appName?(v.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},u=26):(v.prototype.am=function(e,t,r,n,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,p=a*u+c*s;i=((u=s*u+((16383&p)<<14)+r[n]+i)>>28)+(p>>14)+a*c,r[n++]=268435455&u}return i},u=28),v.prototype.DB=u,v.prototype.DM=(1<<u)-1,v.prototype.DV=1<<u;v.prototype.FV=Math.pow(2,52),v.prototype.F1=52-u,v.prototype.F2=2*u-52;var _,w,C=new Array;for(_="0".charCodeAt(0),w=0;w<=9;++w)C[_++]=w;for(_="a".charCodeAt(0),w=10;w<36;++w)C[_++]=w;for(_="A".charCodeAt(0),w=10;w<36;++w)C[_++]=w;function A(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function I(e,t){var r=C[e.charCodeAt(t)];return null==r?-1:r}function E(e){var t=b();return t.fromInt(e),t}function T(e){var t,r=1;return 0!=(t=e>>>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 x(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>
vendor: 10,835 bytes, lines 26-43
26>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}x.prototype.convert=function(e){var t=b();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(v.ZERO)>0&&this.m.subTo(t,t),t},x.prototype.revert=function(e){var t=b();return e.copyTo(t),this.reduce(t),t},x.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=32767&e[t],n=r*this.mpl+((r*this.mph+(e[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)},x.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},x.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},v.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},v.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},v.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,o=0;--n>=0;){var s=I(e,n);s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=r)>=this.DB&&(o-=this.DB))}this.clamp(),i&&v.ZERO.subTo(this,this)},v.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},v.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},v.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s},v.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)t[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)t[r]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},v.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,o=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&o)<<i,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},v.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=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()},v.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<n.t;++i)t[i+r.t]=r.am(0,n[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&v.ZERO.subTo(t,t)},v.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=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()},v.prototype.divRemTo=function(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=b());var o=b(),s=this.s,a=e.s,u=this.DB-T(n[n.t-1]);u>0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,p=o[c-1];if(0!=p){var l=p*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),h=this.FV/l,d=(1<<this.F1)/l,f=1<<this.F2,m=r.t,g=m-c,y=null==t?b():t;for(o.dlShiftTo(g,y),r.compareTo(y)>=0&&(r[r.t++]=1,r.subTo(y,r)),v.ONE.dlShiftTo(c,y),y.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--g>=0;){var S=r[--m]==p?this.DM:Math.floor(r[m]*h+(r[m-1]+f)*d);if((r[m]+=o.am(0,S,r,g,0,c))<S)for(o.dlShiftTo(g,y),r.subTo(y,r);r[m]<--S;)r.subTo(y,r)}null!=t&&(r.drShiftTo(c,t),s!=a&&v.ZERO.subTo(t,t)),r.t=c,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&v.ZERO.subTo(r,r)}}},v.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},v.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=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()},v.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<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=A(r));s>=0;)a<t?(r=(this[s]&(1<<a)-1)<<t-a,r|=this[--s]>>(a+=this.DB-t)):(r=this[s]>>(a-=t)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=A(r));return i?o:"0"},v.prototype.negate=function(){var e=b();return v.ZERO.subTo(this,e),e},v.prototype.abs=function(){return this.s<0?this.negate():this},v.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},v.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+T(this[this.t-1]^this.s&this.DM)},v.prototype.mod=function(e){var t=b();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(v.ZERO)>0&&e.subTo(t,t),t},v.prototype.equals=function(e){return 0==this.compareTo(e)},v.prototype.add=function(e){var t=b();return this.addTo(e,t),t},v.prototype.subtract=function(e){var t=b();return this.subTo(e,t),t},v.prototype.multiply=function(e){var t=b();return this.multiplyTo(e,t),t},v.prototype.divide=function(e){var t=b();return this.divRemTo(e,t,null),t},v.prototype.modPow=function(e,t,r){var n,i=e.bitLength(),o=E(1),s=new x(t);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var a=new Array,u=3,c=n-1,p=(1<<n)-1;if(a[1]=s.convert(this),n>1){var l=b();for(s.sqrTo(a[1],l);u<=p;)a[u]=b(),s.mulTo(l,a[u-2],a[u]),u+=2}var h,d,f=e.t-1,m=!0,g=b();for(i=T(e[f])-1;f>=0;){for(i>=c?h=e[f]>>i-c&p:(h=(e[f]&(1<<i+1)-1)<<c-i,f>0&&(h|=e[f-1]>>this.DB+i-c)),u=n;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--f),m)a[h].copyTo(o),m=!1;else{for(;u>1;)s.sqrTo(o,g),s.sqrTo(g,o),u-=2;u>0?s.sqrTo(o,g):(d=o,o=g,g=d),s.mulTo(g,a[h],o)}for(;f>=0&&0==(e[f]&1<<i);)s.sqrTo(o,g),d=o,o=g,g=d,--i<0&&(i=this.DB-1,--f)}var y=s.revert(o);return r(null,y),y},v.ZERO=E(0),v.ONE=E(1); 27/*! 28 * Copyright 2016 Amazon.com, 29 * Inc. or its affiliates. All Rights Reserved. 30 * 31 * Licensed under the Amazon Software License (the "License"). 32 * You may not use this file except in compliance with the 33 * License. A copy of the License is located at 34 * 35 * http://aws.amazon.com/asl/ 36 * 37 * or in the "license" file accompanying this file. This file is 38 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 39 * CONDITIONS OF ANY KIND, express or implied. See the License 40 * for the specific language governing permissions and 41 * limitations under the License. 42 */ 43var R=function(e){return p.Buffer.from(h.a.lib.WordArray.random(e).toString(),"hex")},k=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.N=new y("FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",16),this.g=new y("2",16),this.k=new y(this.hexHash("00"+this.N.toString(16)+"0"+this.g.toString(16)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue((function(){})),this.infoBits=p.Buffer.from("Caldera Derived Key","utf8"),this.poolName=t}return e.prototype.getSmallAValue=function(){return this.smallAValue},e.prototype.getLargeAValue=function(e){var t=this;this.largeAValue?e(null,this.largeAValue):this.calculateA(this.smallAValue,(function(r,n){r&&e(r,null),t.largeAValue=n,e(null,t.largeAValue)}))},e.prototype.generateRandomSmallA=function(){var e=R(128).toString("hex");return new y(e,16).mod(this.N)},e.prototype.generateRandomString=function(){return R(40).toString("base64")},e.prototype.getRandomPassword=function(){return this.randomPassword},e.prototype.getSaltDevices=function(){return this.SaltToHashDevices},e.prototype.getVerifierDevices=function(){return this.verifierDevices},e.prototype.generateHashDevice=function(e,t,r){var n=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),s=R(16).toString("hex");this.SaltToHashDevices=this.padHex(new y(s,16)),this.g.modPow(new y(this.hexHash(this.SaltToHashDevices+o),16),this.N,(function(e,t){e&&r(e,null),n.verifierDevices=n.padHex(t),r(null,null)}))},e.prototype.calculateA=function(e,t){var r=this;this.g.modPow(e,this.N,(function(e,n){e&&t(e,null),n.mod(r.N).equals(y.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,n)}))},e.prototype.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new y(this.UHexHash,16)},e.prototype.hash=function(e){var t=e instanceof p.Buffer?h.a.lib.WordArray.create(e):e,r=f()(t).toString();return new Array(64-r.length).join("0")+r},e.prototype.hexHash=function(e){return this.hash(p.Buffer.from(e,"hex"))},e.prototype.computehkdf=function(e,t){var r=h.a.lib.WordArray.create(p.Buffer.concat([this.infoBits,p.Buffer.from(String.fromCharCode(1),"utf8")])),n=e instanceof p.Buffer?h.a.lib.WordArray.create(e):e,i=t instanceof p.Buffer?h.a.lib.WordArray.create(t):t,o=g()(n,i),s=g()(r,o);return p.Buffer.from(s.toString(),"hex").slice(0,16)},e.prototype.getPasswordAuthenticationKey=function(e,t,r,n,i){var o=this;if(r.mod(this.N).equals(y.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,r),this.UValue.equals(y.ZERO))throw new Error("U cannot be zero.");var s=""+this.poolName+e+":"+t,a=this.hash(s),u=new y(this.hexHash(this.padHex(n)+a),16);this.calculateS(u,r,(function(e,t){e&&i(e,null);var r=o.computehkdf(p.Buffer.from(o.padHex(t),"hex"),p.Buffer.from(o.padHex(o.UValue.toString(16)),"hex"));i(null,r)}
43))},e.prototype.calculateS=function(e,t,r){var n=this;this.g.modPow(e,this.N,(function(i,o){i&&r(i,null),t.subtract(n.k.multiply(o)).modPow(n.smallAValue.add(n.UValue.multiply(e)),n.N,(function(e,t){e&&r(e,null),r(null,t.mod(n.N))}))}))},e.prototype.getNewPasswordRequiredChallengeUserAttributePrefix=function(){return"userAttributes."},e.prototype.padHex=function(e){var t=e.toString(16);return t.length%2==1?t="0"+t:-1!=="89ABCDEFabcdef".indexOf(t[0])&&(t="00"+t),t},e}(); 44/*! 45 * Copyright 2016 Amazon.com, 46 * Inc. or its affiliates. All Rights Reserved. 47 * 48 * Licensed under the Amazon Software License (the "License"). 49 * You may not use this file except in compliance with the 50 * License. A copy of the License is located at 51 * 52 * http://aws.amazon.com/asl/ 53 * 54 * or in the "license" file accompanying this file. This file is 55 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 56 * CONDITIONS OF ANY KIND, express or implied. See the License 57 * for the specific language governing permissions and 58 * limitations under the License. 59 */ 60var P=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.jwtToken=t||"",this.payload=this.decodePayload()}return e.prototype.getJwtToken=function(){return this.jwtToken},e.prototype.getExpiration=function(){return this.payload.exp},e.prototype.getIssuedAt=function(){return this.payload.iat},e.prototype.decodePayload=function(){var e=this.jwtToken.split(".")[1];try{return JSON.parse(p.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(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}var q=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.AccessToken;return N(this,t),U(this,e.call(this,n||""))}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}(P);function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(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} 61/*! 62 * Copyright 2016 Amazon.com, 63 * Inc. or its affiliates. All Rights Reserved. 64 * 65 * Licensed under the Amazon Software License (the "License"). 66 * You may not use this file except in compliance with the 67 * License. A copy of the License is located at 68 * 69 * http://aws.amazon.com/asl/ 70 * 71 * or in the "license" file accompanying this file. This file is 72 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 73 * CONDITIONS OF ANY KIND, express or implied. See the License 74 * for the specific language governing permissions and 75 * limitations under the License. 76 */ 77var M=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.IdToken;return D(this,t),O(this,e.call(this,n||""))}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}(P);function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} 78/*! 79 * Copyright 2016 Amazon.com, 80 * Inc. or its affiliates. All Rights Reserved. 81 * 82 * Licensed under the Amazon Software License (the "License"). 83 * You may not use this file except in compliance with the 84 * License. A copy of the License is located at 85 * 86 * http://aws.amazon.com/asl/ 87 * 88 * or in the "license" file accompanying this file. This file is 89 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 90 * CONDITIONS OF ANY KIND, express or implied. See the License 91 * for the specific language governing permissions and 92 * limitations under the License. 93 */var j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.RefreshToken;L(this,e),this.token=r||""}return e.prototype.getToken=function(){return this.token},e}(),F=r(142),B=r.n(F);function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} 94/*! 95 * Copyright 2016 Amazon.com, 96 * Inc. or its affiliates. All Rights Reserved. 97 * 98 * Licensed under the Amazon Software License (the "License"). 99 * You may not use this file except in compliance with the 100 * License. A copy of the License is located at 101 * 102 * http://aws.amazon.com/asl/ 103 * 104 * or in the "license" file accompanying this file. This file is 105 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 106 * CONDITIONS OF ANY KIND, express or implied. See the License 107 * for the specific language governing permissions and 108 * limitations under the License. 109 */var V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.IdToken,n=t.RefreshToken,i=t.AccessToken,o=t.ClockDrift;if(z(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===o?this.calculateClockDrift():o}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 e<this.accessToken.getExpiration()&&e<this.idToken.getExpiration()},e}(); 110/*! 111 * Copyright 2016 Amazon.com, 112 * Inc. or its affiliates. All Rights Reserved. 113 * 114 * Licensed under the Amazon Software License (the "License"). 115 * You may not use this file except in compliance with the 116 * License. A copy of the License is located at 117 * 118 * http://aws.amazon.com/asl/ 119 * 120 * or in the "license" file accompanying this file. This file is 121 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 122 * CONDITIONS OF ANY KIND, express or implied. See the License 123 * for the specific language governing permissions and 124 * limitations under the License. 125 */ 126var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],K=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],W=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.getNowString=function(){var e=new Date,t=K[e.getUTCDay()],r=H[e.getUTCMonth()],n=e.getUTCDate(),i=e.getUTCHours();i<10&&(i="0"+i);var o=e.getUTCMinutes();o<10&&(o="0"+o);var s=e.getUTCSeconds();return s<10&&(s="0"+s),t+" "+r+" "+n+" "+i+":"+o+":"+s+" UTC "+e.getUTCFullYear()},e}();function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} 127/*! 128 * Copyright 2016 Amazon.com, 129 * Inc. or its affiliates. All Rights Reserved. 130 * 131 * Licensed under the Amazon Software License (the "License"). 132 * You may not use this file except in compliance with the 133 * License. A copy of the License is located at 134 * 135 * http://aws.amazon.com/asl/ 136 * 137 * or in the "license" file accompanying this file. This file is 138 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 139 * CONDITIONS OF ANY KIND, express or implied. See the License 140 * for the specific language governing permissions and 141 * limitations under the License. 142 */var J=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.Name,n=t.Value;G(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 X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")} 143/*! 144 * Copyright 2016 Amazon.com, 145 * Inc. or its affiliates. All Rights Reserved. 146 * 147 * Licensed under the Amazon Software License (the "License"). 148 * You may not use this file except in compliance with the 149 * License. A copy of the License is located at 150 * 151 * http://aws.amazon.com/asl/ 152 * 153 * or in the "license" file accompanying this file. This file is 154 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 155 * CONDITIONS OF ANY KIND, express or implied. See the License 156 * for the specific language governing permissions and 157 * limitations under the License. 158 */var $={},Z=function(){function e(){X(this,e)}return e.setItem=function(e,t){return $[e]=t,$[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call($,e)?$[e]:void 0},e.removeItem=function(e){return delete $[e]},e.clear=function(){return $={}},e}(),Y=function(){function e(){X(this,e);try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.cognito.test-ls",1),this.storageWindow.removeItem("aws.cognito.test-ls")}catch(e){this.storageWindow=Z}}return e.prototype.getStorage=function(){return this.storageWindow},e}(); 159/*! 160 * Copyright 2016 Amazon.com, 161 * Inc. or its affiliates. All Rights Reserved. 162 * 163 * Licensed under the Amazon Software License (the "License"). 164 * You may not use this file except in compliance with the 165 * License. A copy of the License is located at 166 * 167 * http://aws.amazon.com/asl/ 168 * 169 * or in the "license" file accompanying this file. This file is 170 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 171 * CONDITIONS OF ANY KIND, express or implied. See the License 172 * for the specific language governing permissions and 173 * limitations under the License. 174 */ 175var 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 Y).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(),o={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:i};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",o,(function(e,n){if(e)return t.onFailure(e);var i=n.ChallengeName,o=n.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(r.Session=n.Session,t.customChallenge(o)):(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 invali
175d."))},e.prototype.authenticateUserDefaultAuth=function(e,t){var r=this,n=new k(this.pool.getUserPoolId().split("_")[1]),i=new W,o=void 0,s=void 0,a={};null!=this.deviceKey&&(a.DEVICE_KEY=this.deviceKey),a.USERNAME=this.username,n.getLargeAValue((function(u,c){u&&t.onFailure(u),a.SRP_A=c.toString(16),"CUSTOM_AUTH"===r.authenticationFlowType&&(a.CHALLENGE_NAME="SRP_A");var l=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),d={AuthFlow:r.authenticationFlowType,ClientId:r.pool.getClientId(),AuthParameters:a,ClientMetadata:l};r.getUserContextData(r.username)&&(d.UserContextData=r.getUserContextData(r.username)),r.client.request("InitiateAuth",d,(function(a,u){if(a)return t.onFailure(a);var c=u.ChallengeParameters;r.username=c.USER_ID_FOR_SRP,o=new y(c.SRP_B,16),s=new y(c.SALT,16),r.getCachedDeviceKeyAndPassword(),n.getPasswordAuthenticationKey(r.username,e.getPassword(),o,s,(function(e,o){e&&t.onFailure(e);var s=i.getNowString(),a=h.a.lib.WordArray.create(p.Buffer.concat([p.Buffer.from(r.pool.getUserPoolId().split("_")[1],"utf8"),p.Buffer.from(r.username,"utf8"),p.Buffer.from(c.SECRET_BLOCK,"base64"),p.Buffer.from(s,"utf8")])),d=h.a.lib.WordArray.create(o),f=B.a.stringify(g()(a,d)),m={};m.USERNAME=r.username,m.PASSWORD_CLAIM_SECRET_BLOCK=c.SECRET_BLOCK,m.TIMESTAMP=s,m.PASSWORD_CLAIM_SIGNATURE=f,null!=r.deviceKey&&(m.DEVICE_KEY=r.deviceKey);var y={ChallengeName:"PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:m,Session:u.Session,ClientMetadata:l};r.getUserContextData()&&(y.UserContextData=r.getUserContextData()),function e(t,n){return r.client.request("RespondToAuthChallenge",t,(function(i,o){return i&&"ResourceNotFoundException"===i.code&&-1!==i.message.toLowerCase().indexOf("device")?(m.DEVICE_KEY=null,r.deviceKey=null,r.randomPassword=null,r.deviceGroupKey=null,r.clearCachedDeviceKeyAndPassword(),e(t,n)):n(i,o)}))}(y,(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 k(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(n.DEVICE_KEY=this.deviceKey);var o=0!==Object.keys(e.getValidationData()).length?e.getValidationData():e.getClientMetadata(),s={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:n,ClientMetadata:o};this.getUserContextData(this.username)&&(s.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",s,(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,o=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,r.mfaRequired(i,o);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,r.selectMFAType(i,o);if("MFA_SETUP"===i)return this.Session=e.Session,r.mfaSetup(i,o);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,r.totpRequired(i,o);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,r.customChallenge(o);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var s=null,a=null,u=[],c=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(o&&(s=JSON.parse(e.ChallengeParameters.userAttributes),a=JSON.parse(e.ChallengeParameters.requiredAttributes)),a)for(var l=0;l<a.length;l++)u[l]=a[l].substr(c.length);return r.newPasswordRequired(s,u)}if("DEVICE_SRP_AUTH"!==i){this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=i,this.cacheTokens();var h=e.AuthenticationResult.NewDeviceMetadata;if(null==h)return r.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(i){if(i)return r.onFailure(i);var o={Salt:p.Buffer.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:p.Buffer.from(t.getVerifierDevices(),"hex").toString("base64")};n.verifierDevices=o.PasswordVerifier,n.deviceGroupKey=h.DeviceGroupKey,n.randomPassword=t.getRandomPassword(),n.client.request("ConfirmDevice",{DeviceKey:h.DeviceKey,AccessToken:n.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:navigator.userAgent},(function(t,i){return t?r.onFailure(t):(n.deviceKey=e.AuthenticationResult.
175NewDeviceMetadata.DeviceKey,n.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?r.onSuccess(n.signInUserSession,i.UserConfirmationNecessary):r.onSuccess(n.signInUserSession))}))}))}else this.getDeviceResponse(r)},e.prototype.completeNewPasswordChallenge=function(e,t,r,n){var i=this;if(!e)return r.onFailure(new Error("New password is required."));var o=new k(this.pool.getUserPoolId().split("_")[1]),s=o.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach((function(e){a[s+e]=t[e]})),a.NEW_PASSWORD=e,a.USERNAME=this.username;var u={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",u,(function(e,t){return e?r.onFailure(e):i.authenticateUserInternal(t,o,r)}))},e.prototype.getDeviceResponse=function(e,t){var r=this,n=new k(this.deviceGroupKey),i=new W,o={};o.USERNAME=this.username,o.DEVICE_KEY=this.deviceKey,n.getLargeAValue((function(s,a){s&&e.onFailure(s),o.SRP_A=a.toString(16);var u={ChallengeName:"DEVICE_SRP_AUTH",ClientId:r.pool.getClientId(),ChallengeResponses:o,ClientMetadata:t};r.getUserContextData()&&(u.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",u,(function(t,o){if(t)return e.onFailure(t);var s=o.ChallengeParameters,a=new y(s.SRP_B,16),u=new y(s.SALT,16);n.getPasswordAuthenticationKey(r.deviceKey,r.randomPassword,a,u,(function(t,n){if(t)return e.onFailure(t);var a=i.getNowString(),u=h.a.lib.WordArray.create(p.Buffer.concat([p.Buffer.from(r.deviceGroupKey,"utf8"),p.Buffer.from(r.deviceKey,"utf8"),p.Buffer.from(s.SECRET_BLOCK,"base64"),p.Buffer.from(a,"utf8")])),c=h.a.lib.WordArray.create(n),l=B.a.stringify(g()(u,c)),d={};d.USERNAME=r.username,d.PASSWORD_CLAIM_SECRET_BLOCK=s.SECRET_BLOCK,d.TIMESTAMP=a,d.PASSWORD_CLAIM_SIGNATURE=l,d.DEVICE_KEY=r.deviceKey;var f={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:r.pool.getClientId(),ChallengeResponses:d,Session:o.Session};r.getUserContextData()&&(f.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",f,(function(t,n){return t?e.onFailure(t):(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),e.onSuccess(r.signInUserSession))}))}))}))}))},e.prototype.confirmRegistration=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",i,(function(e){return e?r(e,null):r(null,"SUCCESS")}))},e.prototype.sendCustomChallengeAnswer=function(e,t,r){var n=this,i={};i.USERNAME=this.username,i.ANSWER=e;var o=new k(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:r};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,(function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,o,t)}))},e.prototype.sendMFACode=function(e,t,r,n){var i=this,o={};o.USERNAME=this.username,o.SMS_MFA_CODE=e;var s=r||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===s&&(o.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(o.DEVICE_KEY=this.deviceKey);var a={ChallengeName:s,ChallengeResponses:o,ClientId:this.pool.getClientId(),Session:this.Session,ClientMetadata:n};this.getUserContextData()&&(a.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",a,(function(e,r){if(e)return t.onFailure(e);
vendor: 4,646 bytes, line 175
175if("DEVICE_SRP_AUTH"!==r.ChallengeName){if(i.signInUserSession=i.getCognitoUserSession(r.AuthenticationResult),i.cacheTokens(),null==r.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(i.signInUserSession);var n=new k(i.pool.getUserPoolId().split("_")[1]);n.generateHashDevice(r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,r.AuthenticationResult.NewDeviceMetadata.DeviceKey,(function(e){if(e)return t.onFailure(e);var o={Salt:p.Buffer.from(n.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:p.Buffer.from(n.getVerifierDevices(),"hex").toString("base64")};i.verifierDevices=o.PasswordVerifier,i.deviceGroupKey=r.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,i.randomPassword=n.getRandomPassword(),i.client.request("ConfirmDevice",{DeviceKey:r.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:i.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:o,DeviceName:navigator.userAgent},(function(e,n){return e?t.onFailure(e):(i.deviceKey=r.AuthenticationResult.NewDeviceMetadata.DeviceKey,i.cacheDeviceKeyAndPassword(),!0===n.UserConfirmationNecessary?t.onSuccess(i.signInUserSession,n.UserConfirmationNecessary):t.onSuccess(i.signInUserSession))}))}))}else i.getDeviceResponse(t)}))},e.prototype.changePassword=function(e,t,r,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:n},(function(e){return e?r(e,null):r(null,"SUCCESS")}))},e.prototype.enableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];t.push({DeliveryMedium:"SMS",AttributeName:"phone_number"}),this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},e.prototype.setUserMfaPreference=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?r(e,null):r(null,"SUCCESS")}))},e.prototype.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("SetUserSettings",{MFAOptions:[],AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t){return t?e(t,null):e(null,"SUCCESS")}))},e.prototype.deleteUser=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("DeleteUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:t},(function(t){return t?e(t,null):(r.clearCachedUser(),e(null,"SUCCESS"))}))},e.prototype.updateAttributes=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("UpdateUserAttributes",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserAttributes:e,ClientMetadata:r},(function(e){return e?t(e,null):t(null,"SUCCESS")}))},e.prototype.getUserAttributes=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,r){if(t)return e(t,null);for(var n=[],i=0;i<r.UserAttributes.length;i++){var o={Name:r.UserAttributes[i].Name,Value:r.UserAttributes[i].Value},s=new J(o);n.push(s)}return e(null,n)}))},e.prototype.getMFAOptions=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,r){return t?e(t,null):e(null,r.MFAOptions)}))},e.prototype.getUserData=function(e,t){var r=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var n=!!t&&t.bypassCache,i=this.storage.getItem(this.userDataKey);if(!i||n)this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,n){if(t)return e(t,null);
175r.cacheUserData(n);var i=r.signInUserSession.getRefreshToken();if(!i||!i.getToken())return e(null,n);r.refreshSession(i,(function(t,r){return t?e(t,null):e(null,n)}))}));else try{return e(null,JSON.parse(i))}catch(t){return this.clearCachedUserData(),e(t,null)}},e.prototype.deleteAttributes=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t(new Error("User is not authenticated"),null);this.client.request("DeleteUserAttributes",{UserAttributeNames:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?t(e,null):t(null,"SUCCESS")}))},e.prototype.resendConfirmationCode=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.client.request("ResendConfirmationCode",r,(function(t,r){return t?e(t,null):e(null,r)}))},e.prototype.getSession=function(e){if(null==this.username)return e(new Error("Username is null. Cannot retrieve a new session"),null);if(null!=this.signInUserSession&&this.signInUserSession.isValid())return e(null,this.signInUserSession);var t="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,r=t+".idToken",n=t+".accessToken",i=t+".refreshToken",o=t+".clockDrift";if(this.storage.getItem(r)){var s=new M({IdToken:this.storage.getItem(r)}),a=new q({AccessToken:this.storage.getItem(n)}),u=new j({RefreshToken:this.storage.getItem(i)}),c=parseInt(this.storage.getItem(o),0)||0,p=new V({IdToken:s,AccessToken:a,RefreshToken:u,ClockDrift:c});if(p.isValid())return this.signInUserSession=p,e(null,this.signInUserSession);if(!u.getToken())return e(new Error("Cannot retrieve a new session. Please authenticate."),null);this.refreshSession(u,e)}else e(new Error("Local storage is missing an ID Token, Please authenticate"),null)},e.prototype.refreshSession=function(e,t,r){var n=this,i={};i.REFRESH_TOKEN=e.getToken();var o="CognitoIdentityServiceProvider."+this.pool.getClientId(),s=o+".LastAuthUser";if(this.storage.getItem(s)){this.username=this.storage.getItem(s);var a=o+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(a),i.DEVICE_KEY=this.deviceKey}var u={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:i,ClientMetadata:r};this.getUserContextData()&&(u.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",u,(function(r,i){if(r)return"NotAuthorizedException"===r.code&&n.clearCachedUser(),t(r,null);if(i){var o=i.AuthenticationResult;return Object.prototype.hasOwnProperty.call(o,"RefreshToken")||(o.RefreshToken=e.getToken()),n.signInUserSession=n.getCognitoUserSession(o),n.cacheTokens(),t(null,n.signInUserSession)}}))},e.prototype.cacheTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},e.prototype.cacheUserData=function(e){this.storage.setItem(this.userDataKey,JSON.stringify(e))},e.prototype.clearCachedUserData=function(){this.storage.removeItem(this.userDataKey)},e.prototype.clearCachedUser=function(){this.clearCachedTokens(),this.clearCachedUserData()},e.prototype.cacheDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(r,this.randomPassword),this.storage.setItem(n,this.deviceGroupKey)},e.prototype.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(r),this.deviceGroupKey=this.storage.getItem(n))},e.prototype.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",r=e+".randomPasswordKey",n=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n)},e.prototype.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",r=e+"."+this.username+".accessToken",n=e+"."+this.username+".refreshToken",
175i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(r),this.storage.removeItem(n),this.storage.removeItem(i),this.storage.removeItem(o)},e.prototype.getCognitoUserSession=function(e){var t=new M(e),r=new q(e),n=new j(e);return new V({IdToken:t,AccessToken:r,RefreshToken:n})},e.prototype.forgotPassword=function(e,t){var r={ClientId:this.pool.getClientId(),Username:this.username,ClientMetadata:t};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",r,(function(t,r){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(r):e.onSuccess(r)}))},e.prototype.confirmPassword=function(e,t,r,n){var i={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t,ClientMetadata:n};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",i,(function(e){return e?r.onFailure(e):r.onSuccess()}))},e.prototype.getAttributeVerificationCode=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("GetUserAttributeVerificationCode",{AttributeName:e,AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),ClientMetadata:r},(function(e,r){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(r):t.onSuccess()}))},e.prototype.verifyAttribute=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(e){return e?r.onFailure(e):r.onSuccess("SUCCESS")}))},e.prototype.getDevice=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey},(function(t,r){return t?e.onFailure(t):e.onSuccess(r)}))},e.prototype.forgetSpecificDevice=function(e,t){if(null==this.signInUserSession||!this.signInUserSession.isValid())return t.onFailure(new Error("User is not authenticated"));this.client.request("ForgetDevice",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:e},(function(e){return e?t.onFailure(e):t.onSuccess("SUCCESS")}))},e.prototype.forgetDevice=function(e){var t=this;this.forgetSpecificDevice(this.deviceKey,{onFailure:e.onFailure,onSuccess:function(r){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(r)}})},e.prototype.setDeviceStatusRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},e.prototype.setDeviceStatusNotRemembered=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("UpdateDeviceStatus",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),DeviceKey:this.deviceKey,DeviceRememberedStatus:"not_remembered"},(function(t){return t?e.onFailure(t):e.onSuccess("SUCCESS")}))},e.prototype.listDevices=function(e,t,r){if(null==this.signInUserSession||!this.signInUserSession.isValid())return r.onFailure(new Error("User is not authenticated"));this.client.request("ListDevices",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),Limit:e,PaginationToken:t},(function(e,t){return e?r.onFailure(e):r.onSuccess(t)}))},e.prototype.globalSignOut=function(e){var t=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return e.onFailure(new Error("User is not authenticated"));this.client.request("GlobalSignOut",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(r){return r?e.onFailure(r):(t.clearCachedUser(),e.onSuccess("SUCCESS"))}))},e.prototype.signOut=function(){this.signInUserSession=null,this.clearCachedUser()},e.prototype.sendMFASelectionAnswer=function(e,t){var r=this,n={};n.USERNAME=this.username,n.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:n,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,(function(n,i){return n?t.onFailure(n):(r.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.challengeName,i.challengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.challengeName,i.challengeParameters):void 0)}))},e.prototype.getUserContextData=function(){return this.pool.getUserContextData(this.username)},e.prototype.associateSoftwareToken=function(e){var t=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("AssociateSoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},(function(t,r){return t?e.onFailure(t):e.associateSecretCode(r.SecretCode)})):this.client.request("AssociateSoftwareToken",{Session:this.Session},(function(r,n){return r?e.onFailure(r):(t.Session=n.Session,e.associateSecretCode(n.SecretCode))}))},e.prototype.verifySoftwareToken=function(e,t,r){var n=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},(function(e,t){return e?r.onFailure(e):r.onSuccess(t)})):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},(function(e,t){if(e)return r.onFailure(e);n.Session=t.Session;var i={};i.USERNAME=n.username;var o={ChallengeName:"MFA_SETUP",ClientId:n.pool.getClientId(),ChallengeResponses:i,Session:n.Session};n.getUserContextData()&&(o.UserContextData=n.getUserContextData()),n.client.request("RespondToAuthChallenge",o,(function(e,t){return e?r.onFailure(e):(n.signInUserSession=n.getCognitoUserSession(t.AuthenticationResult),n.cacheTokens(),r.onSuccess(n.signInUserSession))}))}))},e}(),ee=te;function te(){}te.prototype.userAgent="aws-amplify/0.1.x js";var re=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.endpoint=r||"https://cognito-idp."+t+".amazonaws.com/",this.userAgent=ee.prototype.userAgent||"aws-amplify/0.1.x js"}return e.prototype.request=function(e,t,r){var n={headers:{"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProvi
175derService."+e,"X-Amz-User-Agent":this.userAgent},method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t)},i=void 0;fetch(this.endpoint,n).then((function(e){return i=e,e}),(function(e){if(e instanceof TypeError)throw new Error("Network error");throw e})).then((function(e){return e.json().catch((function(){return{}}))})).then((function(e){if(i.ok)return r(null,e);e;var t=(e.__type||e.code).split("#").pop(),n={code:t,name:t,message:e.message||e.Message||null};return r(n)})).catch((function(e){if(!(i&&i.headers&&i.headers.get("x-amzn-errortype"))){if(e instanceof Error&&"Network error"===e.message){var t={code:"NetworkError",name:e.name,message:e.message};return r(t)}return r(e)}try{var n=i.headers.get("x-amzn-errortype").split(":")[0],o={code:n,name:n,statusCode:i.status,message:i.status?i.status.toString():null};return r(o)}catch(t){return r(e)}}))},e}(); 176/*! 177 * Copyright 2016 Amazon.com, 178 * Inc. or its affiliates. All Rights Reserved. 179 * 180 * Licensed under the Amazon Software License (the "License"). 181 * You may not use this file except in compliance with the 182 * License. A copy of the License is located at 183 * 184 * http://aws.amazon.com/asl/ 185 * 186 * or in the "license" file accompanying this file. This file is 187 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 188 * CONDITIONS OF ANY KIND, express or implied. See the License 189 * for the specific language governing permissions and 190 * limitations under the License. 191 */ 192var ne=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var r=t||{},n=r.UserPoolId,i=r.ClientId,o=r.endpoint,s=r.AdvancedSecurityDataCollectionFlag;if(!n||!i)throw new Error("Both UserPoolId and ClientId are required.");if(!/^[\w-]+_.+$/.test(n))throw new Error("Invalid UserPoolId format.");var a=n.split("_")[0];this.userPoolId=n,this.clientId=i,this.client=new re(a,o),this.advancedSecurityDataCollectionFlag=!1!==s,this.storage=t.Storage||(new Y).getStorage()}return e.prototype.getUserPoolId=function(){return this.userPoolId},e.prototype.getClientId=function(){return this.clientId},e.prototype.signUp=function(e,t,r,n,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:r,ValidationData:n,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,(function(t,r){if(t)return i(t,null);var n={Username:e,Pool:s,Storage:s.storage},o={user:new Q(n),userConfirmed:r.UserConfirmed,userSub:r.UserSub,codeDeliveryDetails:r.CodeDeliveryDetails};return i(null,o)}))},e.prototype.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var r={Username:t,Pool:this,Storage:this.storage};return new Q(r)}return null},e.prototype.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var r=t.getData(e,this.userPoolId,this.clientId);if(r)return{EncodedData:r}}return{}}},e}(),ie=r(97);var oe,se,ae=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t.domain)throw new Error("The domain of cookieStorage can not be undefined.");this.domain=t.domain,t.path?this.path=t.path:this.path="/",Object.prototype.hasOwnProperty.call(t,"expires")?this.expires=t.expires:this.expires=365,Object.prototype.hasOwnProperty.call(t,"secure")?this.secure=t.secure:this.secure=!0}return e.prototype.setItem=function(e,t){return ie.set(e,t,{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure}),ie.get(e)},e.prototype.getItem=function(e){return ie.get(e)},e.prototype.removeItem=function(e){return ie.remove(e,{path:this.path,domain:this.domain,secure:this.secure})},e.prototype.clear=function(){var e=ie.get(),t=void 0;for(t=0;t<e.length;++t)ie.remove(e[t]);return{}},e}(),ue=r(76),ce=function(e){var t=window.open(e,"_self");return t?Promise.resolve(t):Promise.reject()},pe=function(){return(pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},le=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},he=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
192function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},de=r(137),fe=r(142),me="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",ge=function(e,t,r){a.f.dispatch("auth",{event:e,data:t,message:r},"Auth",me)},ye=new a.c("OAuth"),ve=function(){function e(e){var t=e.config,r=e.cognitoClientId,n=e.scopes,i=void 0===n?[]:n;this._urlOpener=t.urlOpener||ce,this._config=t,this._cognitoClientId=r,this._scopes=i}return e.prototype.oauthSignIn=function(e,t,r,i,o,s){void 0===e&&(e="code"),void 0===o&&(o=n.Cognito);var a=this._generateState(32),u=s?a+"-"+s:a;!function(e){window.sessionStorage.setItem("oauth_state",e)}(encodeURIComponent(u));var c,p=this._generateRandom(128);c=p,window.sessionStorage.setItem("ouath_pkce_key",c);var l=this._generateChallenge(p),h="https://"+t+"/oauth2/authorize?"+Object.entries(pe(pe({redirect_uri:r,response_type:e,client_id:i,identity_provider:o,scopes:this._scopes,state:u},"code"===e?{code_challenge:l}:{}),"code"===e?{code_challenge_method:"S256"}:{})).map((function(e){var t=e[0],r=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(r)})).join("&");ye.debug("Redirecting to "+h),this._urlOpener(h,r)},e.prototype._handleCodeFlow=function(e){return le(this,void 0,void 0,(function(){var t,r,n,i,o,a,u,c,p,l,h,d;return he(this,(function(f){switch(f.label){case 0:return(t=(Object(ue.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r,n=t[0],i=t[1];return pe(pe({},e),((r={})[n]=i,r))}),{code:void 0}).code)?(r="https://"+this._config.domain+"/oauth2/token",ge("codeFlow",{},"Retrieving tokens from "+r),n=s(this._config)?this._cognitoClientId:this._config.clientID,i=s(this._config)?this._config.redirectSignIn:this._config.redirectUri,m=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),a=pe({grant_type:"authorization_code",code:t,client_id:n,redirect_uri:i},(o=m)?{code_verifier:o}:{}),ye.debug("Calling token endpoint: "+r+" with",a),u=Object.entries(a).map((function(e){var t=e[0],r=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(r)})).join("&"),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u})]):[2];case 1:return[4,f.sent().json()];case 2:if(c=f.sent(),p=c.access_token,l=c.refresh_token,h=c.id_token,d=c.error)throw new Error(d);return[2,{accessToken:p,refreshToken:l,idToken:h}]}var m}))}))},e.prototype._handleImplicitFlow=function(e){return le(this,void 0,void 0,(function(){var t,r,n;return he(this,(function(i){return t=Object(ue.parse)(e).hash.substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r,n=t[0],i=t[1];return pe(pe({},e),((r={})[n]=i,r))}),{id_token:void 0,access_token:void 0}),r=t.id_token,n=t.access_token,ge("implicitFlow",{},"Got tokens from "+e),ye.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:n,idToken:r,refreshToken:null}]}))}))},e.prototype.handleAuthResponse=function(e){return le(this,void 0,void 0,(function(){var t,r,n,i,o,s,a;return he(this,(function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),t=e?pe(pe({},(Object(ue.parse)(e).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r=t[0],n=t[1];return e[r]=n,e}),{})),(Object(ue.parse)(e).query||"").split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var r=t[0],n=t[1];return e[r]=n,e}),{})):{},r=t.error,n=t.error_description,r)throw new Error(n);
192return i=this._validateState(t),ye.debug("Starting "+this._config.responseType+" flow with "+e),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(e)]);case 1:return[2,pe.apply(void 0,[pe.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return s=[{}],[4,this._handleImplicitFlow(e)];case 3:return[2,pe.apply(void 0,[pe.apply(void 0,s.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:return a=u.sent(),ye.error("Error handling auth response.",a),[3,6];case 6:return[2]}}))}))},e.prototype._validateState=function(e){if(e){var t,r=(t=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),t),n=e.state;if(r&&r!==n)throw new Error("Invalid state in OAuth flow");return n}},e.prototype.signOut=function(){return le(this,void 0,void 0,(function(){var e,t,r;return he(this,(function(n){return e="https://"+this._config.domain+"/logout?",t=s(this._config)?this._cognitoClientId:this._config.oauth.clientID,r=s(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(r)}).map((function(e){return e[0]+"="+e[1]})).join("&"),ge("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),ye.debug("Signing out from "+e),[2,this._urlOpener(e)]}))}))},e.prototype._generateState=function(e){for(var t="",r=e,n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";r>0;--r)t+=n[Math.round(Math.random()*(n.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(de(e))},e.prototype._base64URL=function(e){return e.toString(fe).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;r<e;r+=1)t[r]=Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".length|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=[],n=0;n<e.byteLength;n+=1){var i=e[n]%t.length;r.push(t[i])}return r.join("")},e}(),be=(oe=function(e,t){return(oe=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])})(e,t)},function(e,t){function r(){this.constructor=e}oe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Se=new a.c("AuthError"),_e=function(e){function t(r){var n=this,i=Ce[r],o=i.message,s=i.log;return(n=e.call(this,o)||this).constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="AuthError",n.log=s||o,Se.error(n.log),n}return be(t,e),t}(Error),we=function(e){function t(r){var n=e.call(this,r)||this;return n.constructor=t,Object.setPrototypeOf(n,t.prototype),n.name="NoUserPoolError",n}return be(t,e),t}(_e),Ce={noConfig:{message:"Authentication Error",log:"\n Error: Amplify has not been configured correctly.\n This error is typically caused by one of the following scenarios:\n\n 1. Make sure you're passing the awsconfig object to Amplify.configure() in your app's entry point\n See https://aws-amplify.github.io/docs/js/authentication#configure-your-app for more information\n \n 2. There might be multiple conflicting versions of aws-amplify or amplify packages in your node_modules.\n Try deleting your node_modules folder and reinstalling the dependencies with `yarn install`\n "},missingAuthConfig:{message:"Authentication Error",log:"\n Error: Amplify has not been configured correctly. \n The configuration object is missing required auth properties. \n Did you run `amplify push` after adding auth via `amplify add auth`?\n See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information\n "},emptyUsername:{message:"Username cannot be empty"},invalidUsername:{message:"The username should either be a string or one of the sign in types"},emptyPassword:{message:"Password cannot be empty"},emptyCode:{message:"Confirmation code cannot be empty"},signUpError:{message:"Error creating account",log:"The first parameter should either be non-null string or object"},noMFA:{message:"No valid MFA method provided"},invalidMFA:{message:"Invalid MFA type"},emptyChallengeResponse:{message:"Challenge response cannot be empty"},noUserSession:{message:"Failed to get the session because the user is empty"}
192,default:{message:"Authentication Error"}},Ae=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},Ie=function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Ee=new a.c("AuthClass"),Te="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",xe=function(e,t,r){a.f.dispatch("auth",{event:e,data:t,message:r},"Auth",Te)};!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon"}(se||(se={}));var Re=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.configure(e),this.currentUserCredentials=this.currentUserCredentials.bind(this),a.a.config?a.a.config.update({customUserAgent:a.d.userAgent}):Ee.warn("No AWS.config"),a.f.listen("auth",(function(e){switch(e.payload.event){case"signIn":t._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":t._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":t._storage.setItem("amplify-signin-with-hostedUI","true")}}))}return e.prototype.getModuleName=function(){return"Auth"},e.prototype.configure=function(e){var t=this;if(!e)return this._config||{};Ee.debug("configure Auth");var r=Object.assign({},this._config,a.h.parseMobilehubConfig(e).Auth,e);this._config=r;var n=this._config,i=n.userPoolId,o=n.userPoolWebClientId,u=n.cookieStorage,c=n.oauth,p=n.region,l=n.identityPoolId,h=n.mandatorySignIn,d=n.refreshHandlers,f=n.identityPoolRegion,m=n.clientMetadata;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw Ee.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=u?new ae(u):(new a.k).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var g={UserPoolId:i,ClientId:o};g.Storage=this._storage,this.userPool=new ne(g)}a.e.configure({mandatorySignIn:h,region:f||p,userPoolId:i,identityPoolId:l,refreshHandlers:d,storage:this._storage});var y=c?s(this._config.oauth)?c:c.awsCognito:void 0;if(y){var v=Object.assign({cognitoClientId:o,UserPoolId:i,domain:y.domain,scopes:y.scope,redirectSignIn:y.redirectSignIn,redirectSignOut:y.redirectSignOut,responseType:y.responseType,Storage:this._storage,urlOpener:y.urlOpener,clientMetadata:m},y.options);this._oAuthHandler=new ve({scopes:v.scopes,config:v,cognitoClientId:v.cognitoClientId}),function(e){if(a.g.browserOrNode().isBrowser&&window.location)e({url:window.location.href});else if(!a.g.browserOrNode().isNode)throw new Error("Not supported")}((function(e){var r=e.url;t._handleAuthResponse(r)}))}return xe("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this.userPool)return this.rejectNoUserPool();var o,s=null,a=null,u=[],c=null;if(e&&"string"==typeof e){s=e,a=r?r[0]:null;var p=r?r[1]:null,l=r?r[2]:null;p&&u.push({Name:"email",Value:p}),l&&u.push({Name:"phone_number",Value:l})}else{if(!e||"object"!=typeof e)return this.rejectAuthError(i.SignUpError);s=e.username,a=e.password,e&&e.clientMetadata?o=e.clientMetadata:this._config.clientMetadata&&(o=this._config.clientMetadata);var h=e.attributes;h&&Object.keys(h).map((function(e){var t={Name:e,Value:h[e]};u.push(t)})),c=e.validationData||null}return s?a?(Ee.debug("signUp attrs:",u),Ee.debug("signUp validation data:",c),new Promise((function(e,r){t.userPool.signUp(s,a,u,c,(function(t,n){t?(xe("signUp_failure",t,s+" failed to signup"),r(t)):(xe("signUp",n,s+" has signed up successfully"),e(n))}),o)}))):this.rejectAuthError(i.EmptyPassword):this.rejectAuthError(i.EmptyUsername)}
192,e.prototype.confirmSignUp=function(e,t,r){if(!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);var n,o=this.createCognitoUser(e),s=!r||"boolean"!=typeof r.forceAliasCreation||r.forceAliasCreation;return r&&r.clientMetadata?n=r.clientMetadata:this._config.clientMetadata&&(n=this._config.clientMetadata),new Promise((function(e,r){o.confirmRegistration(t,s,(function(t,n){t?r(t):e(n)}),n)}))},e.prototype.resendSignUp=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise((function(e,n){r.resendConfirmationCode((function(t,r){t?n(t):e(r)}),t)}))},e.prototype.signIn=function(e,t,r){if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();var n=null,o=null,s={};if("string"==typeof e)n=e,o=t;else{if(!e.username)return this.rejectAuthError(i.InvalidUsername);void 0!==t&&Ee.warn("The password should be defined under the first parameter object!"),n=e.username,o=e.password,s=e.validationData}if(!n)return this.rejectAuthError(i.EmptyUsername);var a=new c({Username:n,Password:o,ValidationData:s,ClientMetadata:r});return o?this.signInWithPassword(a):this.signInWithoutPassword(a)},e.prototype.authCallbacks=function(e,t,r){var n=this,i=this;return{onSuccess:function(o){return Ae(n,void 0,void 0,(function(){var n,s,u,c;return Ie(this,(function(p){switch(p.label){case 0:Ee.debug(o),delete e.challengeName,delete e.challengeParam,p.label=1;case 1:return p.trys.push([1,4,5,9]),[4,a.e.clear()];case 2:return p.sent(),[4,a.e.set(o,"session")];case 3:return n=p.sent(),Ee.debug("succeed to get cognito credentials",n),[3,9];case 4:return s=p.sent(),Ee.debug("cannot get cognito credentials",s),[3,9];case 5:return p.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return u=p.sent(),i.user=u,xe("signIn",u,"A user "+e.getUsername()+" has been signed in"),t(u),[3,8];case 7:return c=p.sent(),Ee.error("Failed to get the signed in user",c),r(c),[3,8];case 8:return[7];case 9:return[2]}}
192))}))},onFailure:function(t){Ee.debug("signIn failure",t),xe("signIn_failure",t,e.getUsername()+" failed to signin"),r(t)},customChallenge:function(r){Ee.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=r,t(e)},mfaRequired:function(r,n){Ee.debug("signIn MFA required"),e.challengeName=r,e.challengeParam=n,t(e)},mfaSetup:function(r,n){Ee.debug("signIn mfa setup",r),e.challengeName=r,e.challengeParam=n,t(e)},newPasswordRequired:function(r,n){Ee.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:r,requiredAttributes:n},t(e)},totpRequired:function(r,n){Ee.debug("signIn totpRequired"),e.challengeName=r,e.challengeParam=n,t(e)},selectMFAType:function(r,n){Ee.debug("signIn selectMFAType",r),e.challengeName=r,e.challengeParam=n,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this,r=this.createCognitoUser(e.getUsername());return new Promise((function(n,i){r.authenticateUser(e,t.authCallbacks(r,n,i))}))},e.prototype.signInWithoutPassword=function(e){var t=this,r=this.createCognitoUser(e.getUsername());return r.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise((function(n,i){r.initiateAuth(e,t.authCallbacks(r,n,i))}))},e.prototype.getMFAOptions=function(e){return new Promise((function(t,r){e.getMFAOptions((function(e,n){if(e)return Ee.debug("get MFA Options failed",e),void r(e);Ee.debug("get MFA options success",n),t(n)}))}))},e.prototype.getPreferredMFA=function(e,t){var r=this;return new Promise((function(n,i){var o=!!t&&t.bypassCache;e.getUserData((function(e,t){if(e)return Ee.debug("getting preferred mfa failed",e),void i(e);var o=r._getMfaTypeFromUserData(t);return o?void n(o):void i("invalid MFA Type")}),{bypassCache:o})}))},e.prototype._getMfaTypeFromUserData=function(e){var t=null,r=e.PreferredMfaSetting;if(r)t=r;else{var n=e.UserMFASettingList;if(n)0===n.length?t="NOMFA":Ee.debug("invalid case for getPreferredMFA",e);else t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){return new Promise((function(r,n){e.getUserData((function(e,t){return e?(Ee.debug("getting user data failed",e),void n(e)):void r(t)}),t)}))},e.prototype.setPreferredMFA=function(e,t){return Ae(this,void 0,void 0,(function(){var r,n,o,s,a;return Ie(this,(function(u){switch(u.label){case 0:return[4,this._getUserData(e,{bypassCache:!0})];case 1:switch(r=u.sent(),n=null,o=null,t){case"TOTP":return[3,2];case"SMS":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return o={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return n={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return s=r.UserMFASettingList,[4,this._getMfaTypeFromUserData(r)];case 5:if("NOMFA"===(a=u.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===a)n={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==a)return[2,this.rejectAuthError(i.InvalidMFA)];o={PreferredMfa:!1,Enabled:!1}}return s&&0!==s.length&&s.forEach((function(e){"SMS_MFA"===e?n={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(o={PreferredMfa:!1,Enabled:!1})})),[3,7];case 6:return Ee.debug("no validmfa method provided"),[2,this.rejectAuthError(i.NoMFA)];case 7:return this,[2,new Promise((function(t,r){e.setUserMfaPreference(n,o,(function(n,i){if(n)return Ee.debug("Set user mfa preference error",n),r(n);Ee.debug("Set user mfa success",i),Ee.debug("Caching the latest user data into local"),e.getUserData((function(e,n){return e?(Ee.debug("getting user data failed",e),r(e)):t(i)}),{bypassCache:!0})}))}))]}}))}))},e.prototype.disableSMS=function(e){return new Promise((function(t,r){e.disableMFA((function(e,n){if(e)return Ee.debug("disable mfa failed",e),void r(e);Ee.debug("disable mfa succeed",n),t(n)}))}))},e.prototype.enableSMS=function(e){return new Promise((function(t,r){e.enableMFA((function(e,n){if(e)return Ee.debug("enable mfa failed",e),void r(e);Ee.debug("enable mfa succeed",n),t(n)}))}))},e.prototype.setupTOTP=function(e){return new Promise((function(t,r){e.associateSoftwareToken({onFailure:function(e){Ee.debug("associateSoftwareToken failed",e),r(e)},associateSecretCode:function(e){Ee.debug("associateSoftwareToken sucess",e),t(e)}})}))},e.prototype.verifyTotpToken=function(e,t){return Ee.debug("verfication totp token",e,t),new Promise((function(r,n){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){Ee.debug("verifyTotpToken failed",e),n(e)},onSuccess:function(e){Ee.debug("verifyTotpToken success",e),r(e)}})}))},e.prototype.confirmSignIn=function(e,t,r,n){var o=this;if(void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyCode);var s=this;return new Promise((function(i,u){e.sendMFACode(t,{onSuccess:function(t){return Ae(o,void 0,void 0,(function(){var r,n;return Ie(this,(function(o){switch(o.label){case 0:Ee.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,a.e.clear()];case 2:return o.sent(),[4,a.e.set(t,"session")];case 3:return r=o.sent(),Ee.debug("succeed to get cognito credentials",r),[3,6];case 4:return n=o.sent(),Ee.debug("cannot get cognito credentials",n),[3,6];case 5:return s.user=e,xe("signIn",e,e+" has signed in"),i(e),[7];case 6:return[2]}}
192))}))},onFailure:function(e){Ee.debug("confirm signIn failure",e),u(e)}},r,n)}))},e.prototype.completeNewPassword=function(e,t,r,n){var o=this;if(void 0===n&&(n=this._config.clientMetadata),!t)return this.rejectAuthError(i.EmptyPassword);var s=this;return new Promise((function(i,u){e.completeNewPasswordChallenge(t,r,{onSuccess:function(t){return Ae(o,void 0,void 0,(function(){var r,n;return Ie(this,(function(o){switch(o.label){case 0:Ee.debug(t),o.label=1;case 1:return o.trys.push([1,4,5,6]),[4,a.e.clear()];case 2:return o.sent(),[4,a.e.set(t,"session")];case 3:return r=o.sent(),Ee.debug("succeed to get cognito credentials",r),[3,6];case 4:return n=o.sent(),Ee.debug("cannot get cognito credentials",n),[3,6];case 5:return s.user=e,xe("signIn",e,e+" has signed in"),i(e),[7];case 6:return[2]}}))}))},onFailure:function(e){Ee.debug("completeNewPassword failure",e),xe("completeNewPassword_failure",e,o.user+" failed to complete the new password flow"),u(e)},mfaRequired:function(t,r){Ee.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=r,i(e)},mfaSetup:function(t,r){Ee.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=r,i(e)}},n)}))},e.prototype.sendCustomChallengeAnswer=function(e,t,r){var n=this;if(void 0===r&&(r=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!t)return this.rejectAuthError(i.EmptyChallengeResponse);return new Promise((function(i,o){e.sendCustomChallengeAnswer(t,n.authCallbacks(e,i,o),r)}))},e.prototype.updateUserAttributes=function(e,t,r){void 0===r&&(r=this._config.clientMetadata);var n=[],i=this;return new Promise((function(o,s){i.userSession(e).then((function(i){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var u={Name:a,Value:t[a]};n.push(u)}e.updateAttributes(n,(function(e,t){return e?s(e):o(t)}),r)}))}))},e.prototype.userAttributes=function(e){var t=this;return new Promise((function(r,n){t.userSession(e).then((function(t){e.getUserAttributes((function(e,t){e?n(e):r(t)}))}))}))},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then((function(e){var r=t.attributesToObject(e),n={},i={};return r.email&&(r.email_verified?i.email=r.email:n.email=r.email),r.phone_number&&(r.phone_number_verified?i.phone_number=r.phone_number:n.phone_number=r.phone_number),{verified:i,unverified:n}}))},e.prototype.currentUserPoolUser=function(e){var t=this;if(!this.userPool)return this.rejectNoUserPool();var r=this;return new Promise((function(n,i){t._storageSync.then((function(){var t=r.userPool.getCurrentUser();if(!t)return Ee.debug("Failed to get user from user pool"),void i("No current user");t.getSession((function(o,s){if(o)return Ee.debug("Failed to get the user session",o),void i(o);var a=!!e&&e.bypassCache,u=s.getAccessToken().decodePayload().scope;if(!(void 0===u?"":u).split(" ").includes("aws.cognito.signin.user.admin"))return Ee.debug("Unable to get the user data because the aws.cognito.signin.user.admin is not in the scopes of the access token"),n(t);t.getUserData((function(e,o){if(e)return Ee.debug("getting user data failed",e),void("User is disabled"===e.message||"User does not exist."===e.message?i(e):n(t));for(var s=o.PreferredMfaSetting||"NOMFA",a=[],u=0;u<o.UserAttributes.length;u++){var c={Name:o.UserAttributes[u].Name,Value:o.UserAttributes[u].Value},p=new J(c);a.push(p)}var l=r.attributesToObject(a);return Object.assign(t,{attributes:l,preferredMFA:s}),n(t)}),{bypassCache:a})}))})).catch((function(e){return Ee.debug("Failed to sync cache info into memory",e),i(e)}))}))},e.prototype.currentAuthenticatedUser=function(e){return Ae(this,void 0,void 0,(function(){var t,r,n,i;return Ie(this,(function(o){switch(o.label){case 0:Ee.debug("getting current authenticated user"),t=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._storageSync];case 2:return o.sent(),[3,4];case 3:throw r=o.sent(),Ee.debug("Failed to sync cache info into memory",r),r;case 4:try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user}catch(e){Ee.debug("cannot load federated user from auth storage")}return t?(this.user=t,Ee.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:Ee.debug("get current authenticated userpool user"),n=null,o.label=6;case 6:return o.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return n=o.sent(),[3,9];case 8:throw"No userPool"===(i=o.sent())&&Ee.error("Cannot get the current user because the user pool is missing. Please make sure the Auth module is configured with a valid Cognito User Pool ID"),Ee.debug("The user is not authenticated by the error",i),"not authenticated";case 9:return this.user=n,[2,this.user]}}
192))}))},e.prototype.currentSession=function(){var e=this;return Ee.debug("Getting current session"),this.userPool?new Promise((function(t,r){e.currentUserPoolUser().then((function(n){e.userSession(n).then((function(e){t(e)})).catch((function(e){Ee.debug("Failed to get the current session",e),r(e)}))})).catch((function(e){Ee.debug("Failed to get the current user",e),r(e)}))})):Promise.reject()},e.prototype.userSession=function(e){return e?new Promise((function(t,r){Ee.debug("Getting the session from this user:",e),e.getSession((function(n,i){return n?(Ee.debug("Failed to get the session from user",e),void r(n)):(Ee.debug("Succeed to get the user session",i),void t(i))}))})):(Ee.debug("the user is null"),this.rejectAuthError(i.NoUserSession))},e.prototype.currentUserCredentials=function(){return Ae(this,void 0,void 0,(function(){var e,t;return Ie(this,(function(r){switch(r.label){case 0:this,Ee.debug("Getting current user credentials"),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this._storageSync];case 2:return r.sent(),[3,4];case 3:throw e=r.sent(),Ee.debug("Failed to sync cache info into memory",e),e;case 4:t=null;try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){Ee.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return t?[2,a.e.refreshFederatedToken(t)]:[2,this.currentSession().then((function(e){return Ee.debug("getting session success",e),a.e.set(e,"session")})).catch((function(e){return Ee.debug("getting session failed",e),a.e.set(null,"guest")}))]}}))}))},e.prototype.currentCredentials=function(){return Ee.debug("getting current credntials"),a.e.get()},e.prototype.verifyUserAttribute=function(e,t,r){return void 0===r&&(r=this._config.clientMetadata),new Promise((function(n,i){e.getAttributeVerificationCode(t,{onSuccess:function(){return n()},onFailure:function(e){return i(e)},clientMetadata:r})}))},e.prototype.verifyUserAttributeSubmit=function(e,t,r){return r?new Promise((function(n,i){e.verifyAttribute(t,r,{onSuccess:function(e){n(e)},onFailure:function(e){i(e)}})})):this.rejectAuthError(i.EmptyCode)},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then((function(r){return t.verifyUserAttribute(r,e)}))},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var r=this;return r.currentUserPoolUser().then((function(n){return r.verifyUserAttributeSubmit(n,e,t)}))},e.prototype.cognitoIdentitySignOut=function(e,t){return Ae(this,void 0,void 0,(function(){var r,n,i=this;return Ie(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw r=o.sent(),Ee.debug("Failed to sync cache info into memory",r),r;case 3:return n=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise((function(r,o){if(!e||!e.global)return Ee.debug("user sign out",t),t.signOut(),n?r(i._oAuthHandler.signOut()):r();Ee.debug("user global sign out",t),t.getSession((function(e,s){if(e)return Ee.debug("failed to get the user session",e),o(e);t.globalSignOut({onSuccess:function(e){return Ee.debug("global sign out success"),n?r(i._oAuthHandler.signOut()):r()},onFailure:function(e){return Ee.debug("global sign out failed",e),o(e)}})}))}))]}}))}))},e.prototype.signOut=function(e){return Ae(this,void 0,void 0,(function(){var t;return Ie(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.cleanCachedItems()];case 1:return r.sent(),[3,3];case 2:return r.sent(),Ee.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(t=this.userPool.getCurrentUser())?[4,this.cognitoIdentitySignOut(e,t)]:[3,5]:[3,7];case 4:return r.sent(),[3,6];case 5:Ee.debug("no current Cognito user"),r.label=6;case 6:return[3,8];case 7:Ee.debug("no Congito User pool"),r.label=8;case 8:return xe("signOut",this.user,"A user has been signed out"),this.user=null,[2]}}))}))},e.prototype.cleanCachedItems=function(){return Ae(this,void 0,void 0,(function(){return Ie(this,(function(e){switch(e.label){case 0:return[4,a.e.clear()];case 1:return e.sent(),[2]}}))}))},e.prototype.changePassword=function(e,t,r,n){var i=this;return void 0===n&&(n=this._config.clientMetadata),new Promise((function(o,s){i.userSession(e).then((function(i){e.changePassword(t,r,(function(e,t){return e?(Ee.debug("change password failure",e),s(e)):o(t)}),n)}))}))},e.prototype.forgotPassword=function(e,t){if(void 0===t&&(t=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);var r=this.createCognitoUser(e);return new Promise((function(n,i){r.forgotPassword({onSuccess:function(){n()},onFailure:function(t){Ee.debug("forgot password failure",t),xe("forgotPassword_failure",t,e+" forgotPassword failed"),i(t)},inputVerificationCode:function(t){xe("forgotPassword",r,e+" has initiated forgot password flow"),n(t)}},t)}))},e.prototype.forgotPasswordSubmit=function(e,t,r,n){if(void 0===n&&(n=this._config.clientMetadata),!this.userPool)return this.rejectNoUserPool();if(!e)return this.rejectAuthError(i.EmptyUsername);if(!t)return this.rejectAuthError(i.EmptyCode);if(!r)return this.rejectAuthError(i.EmptyPassword);var o=this.createCognitoUser(e);return new Promise((function(i,s){o.confirmPassword(t,r,{onSuccess:function(){xe("forgotPasswordSubmit",o,e+" forgotPasswordSubmit successful"),i()},onFailure:function(t){xe("forgotPasswordSubmit_failure",t,e+" forgotPasswordSubmit failed"),s(t)}},n)}))},e.prototype.currentUserInfo=function(){return Ae(this,void 0,void 0,(function(){var e,t,r,n,i,o,s;return Ie(this,(function(u){switch(u.label){case 0:return(e=a.e.getCredSource())&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch((function(e){return Ee.debug(e)}))];case 1:if(!(s=u.sent()))return[2,null];u.label=2;case 2:return u.trys.push([2,8,,9]),[4,this.userAttributes(s)];case 3:t=u.sent(),r=this.attributesToObject(t),n=null,u.label=4;case 4:return u.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return n=u.sent(),[3,7];case 6:return i=u.sent(),Ee.debug("Failed to retrieve credentials while getting current user info",i),[3,7];case 7:return[2,{id:n?n.identityId:void 0,username:s.getUsername(),attributes:r}];case 8:return o=u.sent(),Ee.debug("currentUserInfo error",o),[2,{}];case 9:return"federated"===e?[2,(s=this.user)||{}]:[2]}}))}))},e.prototype.federatedSignIn=function(e,t,r){return Ae(this,void 0,void 0,(function(){var n,i,u,c,p,l,h,d,f,m,g;return Ie(this,(function(y){switch(y.label){case 0:if(!this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation requires either a User Pool or Identity Pool in config");if(void 0===e&&this._config.identityPoolId&&!this._config.userPoolId)throw new Error("Federation with Identity Pools requires tokens passed as arguments");return o(e)||(v=e)&&["customProvider","customState"].find((function(e){return v.hasOwnProperty(e)}))||void 0===e?(n=e||{provider:se.Cognito},p=o(n)?n.provider:n.customProvider,o(n),i=n.customState,this._config.userPoolId&&(u=s(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,c=s(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,c,u,p,i)),[3,4]):[3,1];case 1:p=e;try{(l=JSON.stringify(JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user))&&Ee.warn("There is already a signed in user: "+l+" in your app.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tYou should not call Auth.federatedSignIn method again as it may cause unexpected behavior.")}catch(e){}return h=t.token,d=t.identity_id,f=t.expires_at,[4,a.e.set({provider:p,token:h,identity_id:d,user:r,expires_at:f},"federation")];case 2:return m=y.sent(),[4,this.currentAuthenticatedUser()];case 3:return g=y.sent(),xe("signIn",g,"A user "+g.username+" has been signed in"),Ee.debug("federated sign in credentials",m),[2,m];case 4:return[2]}var v}))}))},e.prototype._handleAuthResponse=function(e){return Ae(this,void 0,void 0,(function(){var t,r,n,i,o,s,u,c,p,l,h,d,f,m,g;return Ie(this,(function(y){switch(y.label){case 0:if(!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(xe("parsingCallbackUrl",{url:e},"The callback url is being parsed"),t=e||(a.g.browserOrNode().isBrowser?window.location.href:""),r=!!(Object(ue.parse)(t).query||"").split("&").map((function(e){return e.split("=")})).find((function(e){var t=e[0];return"code"===t||"error"===t})),n=!!(Object(ue.parse)(t).hash||"#").substr(1).split("&").map((function(e){return e.split("=")})).find((function(e){var t=e[0];return"access_token"===t||"error"===t})),!r&&!n)return[3,6];y.label=1;case 1:return y.trys.push([1,5,,6]),[4,this._oAuthHandler.handleAuthResponse(t)];case 2:return i=y.sent(),o=i.accessToken,s=i.idToken,u=i.refreshToken,c=i.state,p=new V({IdToken:new M({IdToken:s}),RefreshToken:new j({RefreshToken:u}),AccessToken:new q({AccessToken:o})}),l=void 0,this._config.identityPoolId?[4,a.e.set(p,"session")]:[3,4];case 3:l=y.sent(),Ee.debug("AWS credentials",l),y.label=4;case 4:return h=/-/.test(c),d=this.createCognitoUser(p.getIdToken().decodePayload()["cognito:username"]),xe("signIn",d,"A user "+d.getUsername()+" has been signed in"),xe("cognitoHostedUI",d,"A user "+d.getUsername()+" has been signed in via Cognito Hosted UI"),h&&(f=c.split("-"),m=f[1],xe("customOAuthState",m,"State for user "+d.getUsername())),d.setSignInUserSession(p),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),[2,l];case 5:throw g=y.sent(),Ee.debug("Error in cognito hosted auth response",g),xe("signIn_failure",g,"The OAuth response flow failed"),xe("cognitoHostedUI_failure",g,"A failure occurred when returning to the Cognito Hosted UI"),xe("customState_failure",g,"A failure occurred when returning state"),g;
192case 6:return[2]}}))}))},e.prototype.essentialCredentials=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e.prototype.attributesToObject=function(e){var t={};return e&&e.map((function(e){"true"===e.Value?t[e.Name]=!0:"false"===e.Value?t[e.Name]=!1:t[e.Name]=e.Value})),t},e.prototype.createCognitoUser=function(e){var t={Username:e,Pool:this.userPool};t.Storage=this._storage;var r=this._config.authenticationFlowType,n=new Q(t);return r&&n.setAuthenticationFlowType(r),n},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e.prototype.noUserPoolErrorHandler=function(e){return!e||e.userPoolId&&e.identityPoolId?i.NoConfig:i.MissingAuthConfig},e.prototype.rejectAuthError=function(e){return Promise.reject(new _e(e))},e.prototype.rejectNoUserPool=function(){var e=this.noUserPoolErrorHandler(this._config);return Promise.reject(new we(e))},e}(),ke=new a.c("Auth"),Pe=null;Pe||(ke.debug("Create Auth Instance"),Pe=new Re(null));var Ne=Pe;a.l.register(Ne);t.a=Ne},41:function(e,t,r){(function(t,n){var i,o={environment:"nodejs",engine:function(){if(o.isBrowser()&&"undefined"!=typeof navigator)return navigator.userAgent;var e=t.platform+"/"+t.version;return t.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+t.env.AWS_EXECUTION_ENV),e},userAgent:function(){var e=o.environment,t="aws-sdk-"+e+"/"+r(23).VERSION;return"nodejs"===e&&(t+=" "+o.engine()),t},uriEscape:function(e){var t=encodeURIComponent(e);return t=(t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape)).replace(/[*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))},uriEscapePath:function(e){var t=[];return o.arrayEach(e.split("/"),(function(e){t.push(o.uriEscape(e))})),t.join("/")},urlParse:function(e){return o.url.parse(e)},urlFormat:function(e){return o.url.format(e)},queryStringParse:function(e){return o.querystring.parse(e)},queryParamsToString:function(e){var t=[],r=o.uriEscape,n=Object.keys(e).sort();return o.arrayEach(n,(function(n){var i=e[n],s=r(n),a=s+"=";if(Array.isArray(i)){var u=[];o.arrayEach(i,(function(e){u.push(r(e))})),a=s+"="+u.sort().join("&"+s+"=")}else null!=i&&(a=s+"="+r(i));t.push(a)})),t.join("&")},readFileSync:function(e){return o.isBrowser()?null:r(59).readFileSync(e,"utf-8")},base64:{encode:function(e){if("number"==typeof e)throw o.error(new Error("Cannot base64 encode number "+e));return null==e?e:o.buffer.toBuffer(e).toString("base64")},decode:function(e){if("number"==typeof e)throw o.error(new Error("Cannot base64 decode number "+e));return null==e?e:o.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(e,t){return"function"==typeof o.Buffer.from&&o.Buffer.from!==Uint8Array.from?o.Buffer.from(e,t):new o.Buffer(e,t)},alloc:function(e,t,r){if("number"!=typeof e)throw new Error("size passed to alloc must be a number.");if("function"==typeof o.Buffer.alloc)return o.Buffer.alloc(e,t,r);var n=new o.Buffer(e);return void 0!==t&&"function"==typeof n.fill&&n.fill(t,void 0,void 0,r),n},toStream:function(e){o.Buffer.isBuffer(e)||(e=o.buffer.toBuffer(e));var t=new o.stream.Readable,r=0;return t._read=function(n){if(r>=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<e.length;r++)n+=e[r].length;for(t=o.buffer.alloc(n),r=0;r<e.length;r++)e[r].copy(t,i),i+=e[r].length;return t}},string:{byteLength:function(e){if(null==e)return 0;if("string"==typeof e&&(e=o.buffer.toBuffer(e)),"number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.length)return e.length;if("number"==typeof e.size)return e.size;if("string"==typeof e.path)return r(59).lstatSync(e.path).size;throw o.error(new Error("Cannot determine length of "+e),{object:e})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var t,r={};return o.arrayEach(e.split(/\r?\n/),(function(e){var n=(e=e.split(/(^|\s)[;#]/)[0]).match(/^\s*\[([^\[\]]+)\]\s*$/);if(n)t=n[1];else if(t){var i=e.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);i&&(r[t]=r[t]||{},r[t][i[1]]=i[2])}})),r}},fn:{noop:function(){},callback:function(e){if(e)throw e},makeAsync:function(e,t){return t&&t<=e.length?e:function(){var t=Array.prototype.slice.call(arguments,0),r=t.pop(),n=e.apply(null,t);r(n)}}}
vendor: 5,799 bytes, line 192
192,date:{getDate:function(){return i||(i=r(23)),i.config.systemClockOffset?new Date((new Date).getTime()+i.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=o.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=o.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return void 0===e&&(e=o.date.getDate()),e.getTime()/1e3},from:function(e){return"number"==typeof e?new Date(1e3*e):new Date(e)},format:function(e,t){return t||(t="iso8601"),o.date[t](o.date.from(e))},parseTimestamp:function(e){if("number"==typeof e)return new Date(1e3*e);if(e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw o.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[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],crc32:function(e){var t=o.crypto.crc32Table,r=-1;"string"==typeof e&&(e=o.buffer.toBuffer(e));for(var n=0;n<e.length;n++){r=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=o.buffer.toBuffer(t)),o.crypto.lib.createHmac(n,e).update(t).digest(r)},md5:function(e,t,r){return o.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return o.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,n){var i=o.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=o.buffer.toBuffer(t));var s=o.arraySliceFn(t),a=o.Buffer.isBuffer(t);if(o.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(a=!0),n&&"object"==typeof t&&"function"==typeof t.on&&!a)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||!s||a||"undefined"==typeof FileReader){o.isBrowser()&&"object"==typeof t&&!a&&(t=new o.Buffer(new Uint8Array(t)));var u=i.update(t).digest(r);return n&&n(null,u),u}var c=0,p=new FileReader;p.onerror=function(){n(new Error("Failed to read data."))},p.onload=function(){var e=new o.Buffer(new Uint8Array(p.result));i.update(e),c+=e.length,p._continueReading()},p._continueReading=function(){if(c>=t.size)n(null,i.digest(r));else{var e=c+524288;e>t.size&&(e=t.size),p.readAsArrayBuffer(s.call(t,c,e))}},p._continueReading()}},toHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push(("0"+e.charCodeAt(r).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return o.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,r,e[r])===o.abort)break}},arrayEach:function(e,t){for(var r in e){if(Object.prototype.hasOwnProperty.call(e,r))if(t.call(this,e[r],parseInt(r,10))===o.abort)break}},update:function(e,t){return o.each(t,(function(t,r){e[t]=r})),e},merge:function(e,t){return o.update(o.copy(e),t)},copy:function(e){if(null==e)return e;var t={};for(var r in e)t[r]=e[r];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}
192,arraySliceFn:function(e){var t=e.slice||e.webkitSlice||e.mozSlice;return"function"==typeof t?t:null},isType:function(e,t){return"function"==typeof t&&(t=o.typeName(t)),Object.prototype.toString.call(e)==="[object "+t+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var t=e.toString(),r=t.match(/^\s*function (.+)\(/);return r?r[1]:t},error:function(e,t){var r=null;return"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&((r=o.copy(e)).message=e.message),e.message=e.message||null,"string"==typeof t?e.message=t:"object"==typeof t&&null!==t&&(o.update(e,t),t.message&&(e.message=t.message),(t.code||t.name)&&(e.code=t.code||t.name),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.time=new Date,r&&(e.originalError=r),e},inherit:function(e,t){var r=null;if(void 0===t)t=e,e=Object,r={};else{var n=function(){};n.prototype=e.prototype,r=new n}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=r,o.update(t.constructor.prototype,t),t.constructor.__super__=e,t.constructor},mixin:function(){for(var e=arguments[0],t=1;t<arguments.length;t++)for(var r in arguments[t].prototype){var n=arguments[t].prototype[r];"constructor"!==r&&(e.prototype[r]=n)}return e},hideProperties:function(e,t){"function"==typeof Object.defineProperty&&o.arrayEach(t,(function(t){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0})}))},property:function(e,t,r,n,i){var o={configurable:!0,enumerable:void 0===n||n};"function"!=typeof r||i?(o.value=r,o.writable=!0):o.get=r,Object.defineProperty(e,t,o)},memoizedProperty:function(e,t,r,n){var i=null;o.property(e,t,(function(){return null===i&&(i=r()),i}),n)},hoistPayloadMember:function(e){var t=e.request,r=t.operation,n=t.service.api.operations[r],i=n.output;if(i.payload&&!n.hasEventOutput){var s=i.members[i.payload],a=e.data[i.payload];"structure"===s.type&&o.each(a,(function(t,r){o.property(e.data,t,r,!1)}))}},computeSha256:function(e,t){if(o.isNode()){var n=o.stream.Stream,i=r(59);if("function"==typeof n&&e instanceof n){if("string"!=typeof e.path)return t(new Error("Non-file stream objects are not supported with SigV4"));var s={};"number"==typeof e.start&&(s.start=e.start),"number"==typeof e.end&&(s.end=e.end),e=i.createReadStream(e.path,s)}}o.crypto.sha256(e,"hex",(function(e,r){e?t(e):t(null,r)}))},isClockSkewed:function(e){if(e)return o.property(i.config,"isClockSkewed",Math.abs((new Date).getTime()-e)>=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<e.length;n++){var o=e[n];r?o.deletePromisesFromClass&&o.deletePromisesFromClass():o.addPromisesToClass&&o.addPromisesToClass(t)}},promisifyMethod:function(e,t){return function(){var r=this;return new t((function(t,n){r[e]((function(e,r){e?n(e):t(r)}))}))}},isDualstackAvailable:function(e){if(!e)return!1;var t=r(2072);return"string"!=typeof e&&(e=e.serviceIdentifier),!("string"!=typeof e||!t.hasOwnProperty(e))&&!!t[e].dualstackAvailable},calculateRetryDelay:function(e,t){t||(t={});var r=t.customBackoff||null;if("function"==typeof r)return r(e);var n="number"==typeof t.base?t.base:100;return Math.random()*(Math.pow(2,e)*n)},handleRequestWithRetries:function(e,t,r){t||(t={});var n=i.HttpClient.getInstance(),s=t.httpOptions||{},a=0,u=function(e){var n=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&a<n){a++;var i=o.calculateRetryDelay(a,t.retryDelayOptions);setTimeout(c,i+(e.retryAfter||0))}else r(e)},c=function(){var t="";n.handleRequest(e,s,(function(e){e.on("data",(function(e){t+=e.toString()})),e.on("end",(function(){var n=e.statusCode;if(n<300)r(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,s=o.error(new Error,{retryable:n>=500||429===n});i&&s.retryable&&(s.retryAfter=i),u(s)}}))}),u)};i.util.defer(c)},uuid:{v4:function(){return r(2073).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,r){var n={},i={};if(t.env[o.configOptInEnv])i=e.loadFrom({isConfig:!0,filename:t.env[o.sharedConfigFileEnv]});for(var s=e.loadFrom({filename:r||t.env[o.configOptInEnv]&&t.env[o.sharedCredentialsFileEnv]}),a=0,u=Object.keys(i);a<u.length;a++)n[u[a]]=i[u[a]];for(a=0,u=Object.keys(s);a<u.length;a++)n[u[a]]=s[u[a]];return n},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};e.exports=o}).call(this,r(58),r(155).setImmediate)},43:function(e,t,r){"use strict";var n="URLSearchParams"in self,i="Symbol"in self&&"iterator"in Symbol,o="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in self,a="ArrayBuffer"in self;if(a)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
192]"],c=ArrayBuffer.isView||function(e){return e&&u.indexOf(Object.prototype.toString.call(e))>-1};function p(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=m(t);return t.readAsArrayBuffer(e),r}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=m(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=p(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},d.prototype.delete=function(e){delete this.map[p(e)]},d.prototype.get=function(e){return e=p(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(p(e))},d.prototype.set=function(e,t){this.map[p(e)]=l(t)},d.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),h(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),h(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),h(e)},i&&(d.prototype[Symbol.iterator]=d.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function S(e,t){var r,n,i=(t=t||{}).body;if(e instanceof S){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(r=t.method||this.method||"GET",n=r.toUpperCase(),b.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function _(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}S.prototype.clone=function(){return new S(this,{body:this._bodyInit})},v.call(S.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];w.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})};var A=self.DOMException;try{new A}catch(e){(A=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),A.prototype.constructor=A}function I(e,t){return new Promise((function(r,n){var i=new S(e,t);if(i.signal&&i.signal.aborted)return n(new A("Aborted","AbortError"));var s=new XMLHttpRequest;function a(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEac
vendor: 1,068 bytes, line 192
192h((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new w(i,n))},s.onerror=function(){n(new TypeError("Network request failed"))},s.ontimeout=function(){n(new TypeError("Network request failed"))},s.onabort=function(){n(new A("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",a)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}I.polyfill=!0,self.fetch||(self.fetch=I,self.Headers=d,self.Request=S,self.Response=w)},46:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o}));r(11);
192function n(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function i(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function o(e){return"Feature"===e.type?e.geometry:e}},55:function(e,t,r){var n;e.exports=(n=n||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},o=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o<i;o++){var s=r[o>>>2]>>>24-o%4*8&255;t[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o<i;o+=4)t[n+o>>>2]=r[o>>>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=o.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)}},o=0;o<t;o+=4){var a=i(4294967296*(r||e.random()));r=987654071*a(),n.push(4294967296*a()|0)}return new s.init(n,t)}}),a=n.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new s.init(r,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var o=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new s.init(r,t)}},p=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,a=i/(4*o),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*u,i);if(u){for(var p=0;p<u;p+=o)this._doProcessBlock(n,p);var l=n.splice(0,u);r.sigBytes-=c}return new s.init(l,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=l.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}}),n.algo={});return n}(Math),n)},57:function(e,t,r){"use strict";(function(e){var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/png",ext:"png"},{type:"image/gif",ext:"gif"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/bmp",ext:"bmp"},{type:"image/x-icon",ext:"ico"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/svg+xml",ext:"svg"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],n=function(){function t(){}return t.isEmpty=function(e){return 0===Object.keys(e).length},t.sortByField=function(e,t,r){if(!e||!e.sort)return!1;var n=r&&"desc"===r?-1:1;return e.sort((function(e,r){var i=e[t],o=r[t];return void 0===o?void 0===i?0:1*n:void 0===i||i<o?-1*n:i>o?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&&void 0!==window.document,isNode:void 0!==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 o in e){if(e.hasOwnProperty(o))i[r.includes(o)?o:o[0].toLowerCase()+o.slice(1)]=n.includes(o)?e[o]:t.transferKeyToLowerCase(e[o],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 o in e){if(e.hasOwnProperty(o))i[r.includes(o)?o:o[0].toUpperCase()+o.slice(1)]=n.includes(o)?e[o]:t.transferKeyToUpperCase(e[o],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(58))},58:function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}
vendor: 7,851 bytes, line 192
192catch(e){n=s}}();var u,c=[],p=!1,l=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!p){var e=a(h);p=!0;for(var t=c.length;t;){for(u=c,c=[];++l<t;)u&&u[l].run();l=-1,t=c.length}u=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new f(e,t)),1!==c.length||p||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},62:function(e,t,r){var n=r(2111),i=r(2112),o=i;o.v1=n,o.v4=i,e.exports=o},76:function(e,t,r){"use strict";var n=r(2083),i=r(2084);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=b(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),p=["'"].concat(c),l=["%","/","?",";","#"].concat(p),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=r(312);function b(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!r&&1===e.split("#").length){var S=u.exec(b);if(S)return this.path=b,this.href=b,this.pathname=S[1],S[2]?(this.search=S[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(b);if(_){var w=(_=_[0]).toLowerCase();this.protocol=w,b=b.substr(_.length)}if(r||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var C="//"===b.substr(0,2);!C||_&&g[_]||(b=b.substr(2),this.slashes=!0)}if(!g[_]&&(C||_&&!y[_])){for(var A,I,E=-1,T=0;T<h.length;T++){-1!==(x=b.indexOf(h[T]))&&(-1===E||x<E)&&(E=x)}-1!==(I=-1===E?b.lastIndexOf("@"):b.lastIndexOf("@",E))&&(A=b.slice(0,I),b=b.slice(I+1),this.auth=decodeURIComponent(A)),E=-1;for(T=0;T<l.length;T++){var x;-1!==(x=b.indexOf(l[T]))&&(-1===E||x<E)&&(E=x)}-1===E&&(E=b.length),this.host=b.slice(0,E),b=b.slice(E),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var k=this.hostname.split(/\./),P=(T=0,k.length);T<P;T++){var N=k[T];if(N&&!N.match(d)){for(var U="",q=0,D=N.length;q<D;q++)N.charCodeAt(q)>127?U+="x":U+=N[q];if(!U.match(d)){var O=k.slice(0,T),M=k.slice(T+1),L=N.match(f);L&&(O.push(L[1]),M.unshift(L[2])),M.length&&(b="/"+M.join(".")+b),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=n.toASCII(this.hostname));var j=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+j,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[w])for(T=0,P=p.length;T<P;T++){var B=p[T];if(-1!==b.indexOf(B)){var z=encodeURIComponent(B);z===B&&(z=escape(B)),b=b.split(B).join(z)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var H=b.indexOf("?");if(-1!==H?(this.search=b.substr(H),this.query=b.substr(H+1),t&&(this.query=v.parse(this.query)),b=b.slice(0,H)):t&&(this.search="",this.query={}),b&&(this.pathname=b),y[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var K=this.search||"";this.path=j+K}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var p=u[c];"protocol"!==p&&(r[p]=e[p])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var l=Object.keys(e),h=0;h<l.length;h++){var d=l[h];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",v=r.search||"";r.path=m+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),S=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=S||b||r.host&&e.pathname,w=_,C=r.pathname&&r.pathname.split("/")||[],A=(f=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===C[0]?C[0]=r.host:C.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),_=_&&(""===f[0]||""===C[0])),S)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,C=f;else if(f.length)C||(C=[]),C.pop(),C=C.concat(f),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(A)r.hostname=r.host=C.shift(),(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.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 I=C.slice(-1)[0],E=(r.host||e.host||C.length>1)&&("."===I||".."===I)||""===I,T=0,x=C.length;x>=0;
vendor: 1,827 bytes, lines 192-199
192x--)"."===(I=C[x])?C.splice(x,1):".."===I?(C.splice(x,1),T++):T&&(C.splice(x,1),T--);if(!_&&!w)for(;T--;T)C.unshift("..");!_||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),E&&"/"!==C.join("/").substr(-1)&&C.push("");var R,k=""===C[0]||C[0]&&"/"===C[0].charAt(0);A&&(r.hostname=r.host=k?"":C.length?C.shift():"",(R=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=R.shift(),r.host=r.hostname=R.shift()));return(_=_||r.host&&C.length)&&!k&&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},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},89:function(e,t,r){var n=r(41);n.crypto.lib=r(2076),n.Buffer=r(25).Buffer,n.url=r(76),n.querystring=r(312),n.realClock=r(2087),n.environment="js",n.createEventStream=r(2088).createEventStream,n.isBrowser=function(){return!0},n.isNode=function(){return!1};var i=r(23);if(e.exports=i,r(305),r(306),r(2094),r(2098),r(2099),r(2100),r(2105),i.XML.Parser=r(2106),r(2107),void 0===o)var o={browser:!0}},97:function(e,t,r){var n,i; 193/*! 194 * JavaScript Cookie v2.2.1 195 * https://github.com/js-cookie/js-cookie 196 * 197 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 198 * Released under the MIT license 199 */!function(o){if(void 0===(i="function"==typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=i),!0,e.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2}
199)+/g,decodeURIComponent)}return function r(n){function i(){}function o(t,r,o){if("undefined"!=typeof document){"number"==typeof(o=e({path:"/"},i.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(r);/^[\{\[]/.test(s)&&(r=s)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in o)o[u]&&(a+="; "+u,!0!==o[u]&&(a+="="+o[u].split(";")[0]));return document.cookie=t+"="+r+a}}function s(e,r){if("undefined"!=typeof document){for(var i={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),u=a.slice(1).join("=");r||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var c=t(a[0]);if(u=(n.read||n)(u,c)||t(u),r)try{u=JSON.parse(u)}catch(e){}if(i[c]=u,e===c)break}catch(e){}}return e?i[e]:i}}return i.set=o,i.get=function(e){return s(e,!1)},i.getJSON=function(e){return s(e,!0)},i.remove=function(t,r){o(t,"",e(r,{expires:-1}))},i.defaults={},i.withConverter=r,i}((function(){}))}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.