text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("aws-amplify",[],t):"object"==typeof exports?exports["aws-amplify"]=t():e["aws-amplify"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=168)}([function(e,t,n){var r={util:n(4)};({}).toString(),e.exports=r,r.util.update(r,{VERSION:"2.474.0",Signers:{},Protocol:{Json:n(50),Query:n(73),Rest:n(37),RestJson:n(75),RestXml:n(76)},XML:{Builder:n(175),Parser:null},JSON:{Builder:n(51),Parser:n(52)},Model:{Api:n(77),Operation:n(78),Shape:n(29),Paginator:n(79),ResourceWaiter:n(80)},apiLoader:n(180),EndpointCache:n(181).EndpointCache}),n(81),n(183),n(186),n(84),n(187),n(192),n(194),n(195),n(196),n(202),r.events=new r.SequentialExecutor,r.util.memoizedProperty(r,"endpointCache",function(){return new r.EndpointCache(r.config.endpointCacheSize)},!0)},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var i=n(36),o=n(6),a=n(40);r(n(36));var s=n(241);t.ClientDevice=s.default;var u=n(6);t.ConsoleLogger=u.ConsoleLogger,t.Logger=u.ConsoleLogger,r(n(243));var c=n(244);t.Hub=c.default;var l=n(245);t.I18n=l.default;var p=n(25);t.JS=p.default;var f=n(247);t.Signer=f.default;var d=n(248);t.Parser=d.default;var h=n(90);t.FacebookOAuth=h.FacebookOAuth,t.GoogleOAuth=h.GoogleOAuth,r(n(251));var m=n(252);t.Credentials=m.default;var y=n(253);t.ServiceWorker=y.default;var g=n(56);t.StorageHelper=g.default,t.MemoryStorage=g.MemoryStorage;var v=n(91);t.Platform=v.default;var b=n(91);t.Constants={userAgent:b.default.userAgent},t.default=a.default;var _=new o.ConsoleLogger("Core");i.AWS.util?i.AWS.util.userAgent=function(){return t.Constants.userAgent}:i.AWS.config?i.AWS.config.update({customUserAgent:t.Constants.userAgent}):_.warn("No AWS.config")},function(e,t,n){"use strict";var r=n(20);n.d(t,"a",function(){return r.a});var i=n(314);n.d(t,"e",function(){return i.a});var o=n(119);n.d(t,"c",function(){return o.a});var a=n(116);n.d(t,"d",function(){return a.a});var s=n(315);n.d(t,"b",function(){return s.a})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return a(e)||u(e)||l(e)||f(e)||h(e)||y(e)||v(e)||_(e)}function o(e){return i(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL type."),e}function a(e){return Object(W.a)(e,te)}function s(e){return a(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Scalar type."),e}function u(e){return Object(W.a)(e,ne)}function c(e){return u(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Object type."),e}function l(e){return Object(W.a)(e,re)}function p(e){return l(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Interface type."),e}function f(e){return Object(W.a)(e,ie)}function d(e){return f(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Union type."),e}function h(e){return Object(W.a)(e,oe)}function m(e){return h(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Enum type."),e}function y(e){return Object(W.a)(e,ae)}function g(e){return y(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Input Object type."),e}function v(e){return Object(W.a)(e,$.a)}function b(e){return v(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL List type."),e}function _(e){return Object(W.a)(e,$.b)}function S(e){return _(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL Non-Null type."),e}function E(e){return a(e)||h(e)||y(e)||R(e)&&E(e.ofType)}function I(e){return E(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL input type."),e}function w(e){return a(e)||u(e)||l(e)||f(e)||h(e)||R(e)&&w(e.ofType)}function C(e){return w(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL output type."),e}function T(e){return a(e)||h(e)}function N(e){return T(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL leaf type."),e}function A(e){return u(e)||l(e)||f(e)}function k(e){return A(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL composite type."),e}function O(e){return l(e)||f(e)}function P(e){return O(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL abstract type."),e}function R(e){return v(e)||_(e)}function x(e){return R(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL wrapping type."),e}function D(e){return i(e)&&!_(e)}function j(e){return D(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL nullable type."),e}function M(e){if(e)return _(e)?e.ofType:e}function U(e){return a(e)||u(e)||l(e)||f(e)||h(e)||y(e)}function L(e){return U(e)||Object(J.a)(0,"Expected "+String(e)+" to be a GraphQL named type."),e}function q(e){if(e){for(var t=e;R(t);)t=t.ofType;return t}}function B(e){return"function"==typeof e?e():e}function F(e,t){var n=B(t)||[];return Array.isArray(n)||Object(J.a)(0,e.name+" interfaces must be an Array or a function which returns an Array."),n}function V(e,t){var n=B(t)||{};z(n)||Object(J.a)(0,e.name+" fields must be an object with field names as keys or a function which returns such an object.");var r=Object.create(null);return Object.keys(n).forEach(function(t){var i=n[t];z(i)||Object(J.a)(0,e.name+"."+t+" field config must be an object"),i.hasOwnProperty("isDeprecated")&&Object(J.a)(0,e.name+"."+t+' should provide "deprecationReason" instead of "isDeprecated".');var o=ee({},i,{isDeprecated:Boolean(i.deprecationReason),name:t});K(o.resolve)||Object(J.a)(0,e.name+"."+t+" field resolver must be a function if provided, but got: "+String(o.resolve)+".");var a=i.args;a?(z(a)||Object(J.a)(0,e.name+"."+t+" args must be an object with argument names as keys."),o.args=Object.keys(a).map(function(e){var t=a[e];return{name:e,description:void 0===t.description?null:t.description,type:t.type,defaultValue:t.defaultValue,astNode:t.astNode}})):o.args=[],r[t]=o}),r}function z(e){return e&&"object"===(void 0===e?"undefined":Z(e))&&!Array.isArray(e)}function K(e){return null==e||"function"==typeof e}function G(e,t){var n=B(t)||[];return Array.isArray(n)||Object(J.a)(0,"Must provide Array of types or a function which returns such an array for Union "+e.name+"."),n}function H(e,t){return z(t)||Object(J.a)(0,e.name+" values must be an object with value names as keys."),Object.keys(t).map(function(n){var r=t[n];return z(r)||Object(J.a)(0,e.name+"."+n+' must refer to an object with a "value" key representing an internal value but got: '+String(r)+"."),r.hasOwnProperty("isDeprecated")&&Object(J.a)(0,e.name+"."+n+' should provide "deprecationReason" instead of "isDeprecated".'),{name:n,description:r.description,isDeprecated:Boolean(r.deprecationReason),deprecationReason:r.deprecationReason,astNode:r.astNode,value:r.hasOwnProperty("value")?r.value:n}})}t.N=i,t.u=o,t.M=a,t.t=s,t.K=u,t.r=c,t.E=l,t.l=p,t.O=f,t.v=d,t.B=h,t.i=m,t.C=y,t.j=g,t.G=v,t.n=b,t.I=_,t.p=S,t.D=E,t.k=I,t.L=w,t.s=C,t.F=T,t.m=N,t.A=A,t.h=k,t.z=O,t.g=P,t.P=R,t.w=x,t.J=D,t.q=j,t.y=M,t.H=U,t.o=L,t.x=q,n.d(t,"e",function(){return te}),n.d(t,"d",function(){return ne}),n.d(t,"c",function(){return re}),n.d(t,"f",function(){return ie}),n.d(t,"a",function(){return oe}),n.d(t,"b",function(){return ae});var W=n(60),J=n(9),Y=n(11),X=n(5),Q=n(115),$=n(12),Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this._scalarConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name."),"function"!=typeof t.serialize&&Object(J.a)(0,this.name+' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.'),(t.parseValue||t.parseLiteral)&&("function"!=typeof t.parseValue||"function"!=typeof t.parseLiteral)&&Object(J.a)(0,this.name+' must provide both "parseValue" and "parseLiteral" functions.')}return e.prototype.serialize=function(e){return(0,this._scalarConfig.serialize)(e)},e.prototype.parseValue=function(e){var t=this._scalarConfig.parseValue;if(!Object(Y.a)(e))return t?t(e):e},e.prototype.parseLiteral=function(e,t){var n=this._scalarConfig.parseLiteral;return n?n(e,t):Object(Q.a)(e,t)},e.prototype.toString=function(){return this.name},e}();te.prototype.toJSON=te.prototype.inspect=te.prototype.toString;var ne=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes,this.isTypeOf=t.isTypeOf,this._typeConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name."),t.isTypeOf&&"function"!=typeof t.isTypeOf&&Object(J.a)(0,this.name+' must provide "isTypeOf" as a function.')}return e.prototype.getFields=function(){return this._fields||(this._fields=V(this,this._typeConfig.fields))},e.prototype.getInterfaces=function(){return this._interfaces||(this._interfaces=F(this,this._typeConfig.interfaces))},e.prototype.toString=function(){return this.name},e}();ne.prototype.toJSON=ne.prototype.inspect=ne.prototype.toString;var re=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this.extensionASTNodes=t.extensionASTNodes,this.resolveType=t.resolveType,this._typeConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name."),t.resolveType&&"function"!=typeof t.resolveType&&Object(J.a)(0,this.name+' must provide "resolveType" as a function.')}return e.prototype.getFields=function(){return this._fields||(this._fields=V(this,this._typeConfig.fields))},e.prototype.toString=function(){return this.name},e}();re.prototype.toJSON=re.prototype.inspect=re.prototype.toString;var ie=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this.resolveType=t.resolveType,this._typeConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name."),t.resolveType&&"function"!=typeof t.resolveType&&Object(J.a)(0,this.name+' must provide "resolveType" as a function.')}return e.prototype.getTypes=function(){return this._types||(this._types=G(this,this._typeConfig.types))},e.prototype.toString=function(){return this.name},e}();ie.prototype.toJSON=ie.prototype.inspect=ie.prototype.toString;var oe=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this._enumConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name.")}return e.prototype.getValues=function(){return this._values||(this._values=H(this,this._enumConfig.values))},e.prototype.getValue=function(e){return this._getNameLookup()[e]},e.prototype.serialize=function(e){var t=this._getValueLookup().get(e);if(t)return t.name},e.prototype.parseValue=function(e){if("string"==typeof e){var t=this._getNameLookup()[e];if(t)return t.value}},e.prototype.parseLiteral=function(e,t){if(e.kind===X.a.ENUM){var n=this._getNameLookup()[e.value];if(n)return n.value}},e.prototype._getValueLookup=function(){if(!this._valueLookup){var e=new Map;this.getValues().forEach(function(t){e.set(t.value,t)}),this._valueLookup=e}return this._valueLookup},e.prototype._getNameLookup=function(){if(!this._nameLookup){var e=Object.create(null);this.getValues().forEach(function(t){e[t.name]=t}),this._nameLookup=e}return this._nameLookup},e.prototype.toString=function(){return this.name},e}();oe.prototype.toJSON=oe.prototype.inspect=oe.prototype.toString;var ae=function(){function e(t){r(this,e),this.name=t.name,this.description=t.description,this.astNode=t.astNode,this._typeConfig=t,"string"!=typeof t.name&&Object(J.a)(0,"Must provide name.")}return e.prototype.getFields=function(){return this._fields||(this._fields=this._defineFieldMap())},e.prototype._defineFieldMap=function(){var e=this,t=B(this._typeConfig.fields)||{};z(t)||Object(J.a)(0,this.name+" fields must be an object with field names as keys or a function which returns such an object.");var n=Object.create(null);return Object.keys(t).forEach(function(r){var i=ee({},t[r],{name:r});i.hasOwnProperty("resolve")&&Object(J.a)(0,e.name+"."+r+" field type has a resolve property, but Input Types cannot define resolvers."),n[r]=i}),n},e.prototype.toString=function(){return this.name},e}();ae.prototype.toJSON=ae.prototype.toString,ae.prototype.inspect=ae.prototype.toString},function(e,t,n){(function(t,r){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+"/"+n(0).VERSION;return"nodejs"===e&&(t+=" "+o.engine()),t},uriEscape:function(e){var t=encodeURIComponent(e);return t=t.replace(/[^A-Za-z0-9_.~\-%]+/g,escape),t=t.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=[],n=o.uriEscape,r=Object.keys(e).sort();return o.arrayEach(r,function(r){var i=e[r],a=n(r),s=a+"=";if(Array.isArray(i)){var u=[];o.arrayEach(i,function(e){u.push(n(e))}),s=a+"="+u.sort().join("&"+a+"=")}else void 0!==i&&null!==i&&(s=a+"="+n(i));t.push(s)}),t.join("&")},readFileSync:function(e){return o.isBrowser()?null:n(55).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||void 0===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||void 0===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,n){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,n);var r=new o.Buffer(e);return void 0!==t&&"function"==typeof r.fill&&r.fill(t,void 0,void 0,n),r},toStream:function(e){o.Buffer.isBuffer(e)||(e=o.buffer.toBuffer(e));var t=new o.stream.Readable,n=0;return t._read=function(r){if(n>=e.length)return t.push(null);var i=n+r;i>e.length&&(i=e.length),t.push(e.slice(n,i)),n=i},t},concat:function(e){var t,n=0,r=0,i=null;for(t=0;t<e.length;t++)n+=e[t].length;for(i=o.buffer.alloc(n),t=0;t<e.length;t++)e[t].copy(i,r),r+=e[t].length;return i}},string:{byteLength:function(e){if(null===e||void 0===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 n(55).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,n={};return o.arrayEach(e.split(/\r?\n/),function(e){e=e.split(/(^|\s)[;#]/)[0];var r=e.match(/^\s*\[([^\[\]]+)\]\s*$/);if(r)t=r[1];else if(t){var i=e.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);i&&(n[t]=n[t]||{},n[t][i[1]]=i[2])}}),n}},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);t.pop()(e.apply(null,t))}}},date:{getDate:function(){return i||(i=n(0)),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,n=-1;"string"==typeof e&&(e=o.buffer.toBuffer(e));for(var r=0;r<e.length;r++)n=n>>>8^t[255&(n^e.readUInt8(r))];return(-1^n)>>>0},hmac:function(e,t,n,r){return n||(n="binary"),"buffer"===n&&(n=void 0),r||(r="sha256"),"string"==typeof t&&(t=o.buffer.toBuffer(t)),o.crypto.lib.createHmac(r,e).update(t).digest(n)},md5:function(e,t,n){return o.crypto.hash("md5",e,t,n)},sha256:function(e,t,n){return o.crypto.hash("sha256",e,t,n)},hash:function(e,t,n,r){var i=o.crypto.createHash(e);n||(n="binary"),"buffer"===n&&(n=void 0),"string"==typeof t&&(t=o.buffer.toBuffer(t));var a=o.arraySliceFn(t),s=o.Buffer.isBuffer(t);if(o.isBrowser()&&"undefined"!=typeof ArrayBuffer&&t&&t.buffer instanceof ArrayBuffer&&(s=!0),r&&"object"==typeof t&&"function"==typeof t.on&&!s)t.on("data",function(e){i.update(e)}),t.on("error",function(e){r(e)}),t.on("end",function(){r(null,i.digest(n))});else{if(!r||!a||s||"undefined"==typeof FileReader){o.isBrowser()&&"object"==typeof t&&!s&&(t=new o.Buffer(new Uint8Array(t)));var u=i.update(t).digest(n);return r&&r(null,u),u}var c=0,l=new FileReader;l.onerror=function(){r(new Error("Failed to read data."))},l.onload=function(){var e=new o.Buffer(new Uint8Array(l.result));i.update(e),c+=e.length,l._continueReading()},l._continueReading=function(){if(c>=t.size)return void r(null,i.digest(n));var e=c+524288;e>t.size&&(e=t.size),l.readAsArrayBuffer(a.call(t,c,e))},l._continueReading()}},toHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push(("0"+e.charCodeAt(n).toString(16)).substr(-2,2));return t.join("")},createHash:function(e){return o.crypto.lib.createHash(e)}},abort:{},each:function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=t.call(this,n,e[n]);if(r===o.abort)break}},arrayEach:function(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=t.call(this,e[n],parseInt(n,10));if(r===o.abort)break}},update:function(e,t){return o.each(t,function(t,n){e[t]=n}),e},merge:function(e,t){return o.update(o.copy(e),t)},copy:function(e){if(null===e||void 0===e)return e;var t={};for(var n in e)t[n]=e[n];return t},isEmpty:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},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(),n=t.match(/^\s*function (.+)\(/);return n?n[1]:t},error:function(e,t){var n=null;return"string"==typeof e.message&&""!==e.message&&("string"==typeof t||t&&t.message)&&(n=o.copy(e),n.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,n&&(e.originalError=n),e},inherit:function(e,t){var n=null;if(void 0===t)t=e,e=Object,n={};else{var r=function(){};r.prototype=e.prototype,n=new r}return t.constructor===Object&&(t.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),t.constructor.prototype=n,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 n in arguments[t].prototype){var r=arguments[t].prototype[n];"constructor"!==n&&(e.prototype[n]=r)}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,n,r,i){var o={configurable:!0,enumerable:void 0===r||r};"function"!=typeof n||i?(o.value=n,o.writable=!0):o.get=n,Object.defineProperty(e,t,o)},memoizedProperty:function(e,t,n,r){var i=null;o.property(e,t,function(){return null===i&&(i=n()),i},r)},hoistPayloadMember:function(e){var t=e.request,n=t.operation,r=t.service.api.operations[n],i=r.output;if(i.payload&&!r.hasEventOutput){var a=i.members[i.payload],s=e.data[i.payload];"structure"===a.type&&o.each(s,function(t,n){o.property(e.data,t,n,!1)})}},computeSha256:function(e,t){if(o.isNode()){var r=o.stream.Stream,i=n(55);if("function"==typeof r&&e instanceof r){if("string"!=typeof e.path)return t(new Error("Non-file stream objects are not supported with SigV4"));var a={};"number"==typeof e.start&&(a.start=e.start),"number"==typeof e.end&&(a.end=e.end),e=i.createReadStream(e.path,a)}}o.crypto.sha256(e,"hex",function(e,n){e?t(e):t(null,n)})},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 n=!1;void 0===t&&i&&i.config&&(t=i.config.getPromisesDependency()),void 0===t&&"undefined"!=typeof Promise&&(t=Promise),"function"!=typeof t&&(n=!0),Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];n?o.deletePromisesFromClass&&o.deletePromisesFromClass():o.addPromisesToClass&&o.addPromisesToClass(t)}},promisifyMethod:function(e,t){return function(){var n=this;return new t(function(t,r){n[e](function(e,n){e?r(e):t(n)})})}},isDualstackAvailable:function(e){if(!e)return!1;var t=n(203);return"string"!=typeof e&&(e=e.serviceIdentifier),!("string"!=typeof e||!t.hasOwnProperty(e)||!t[e].dualstackAvailable)},calculateRetryDelay:function(e,t){t||(t={});var n=t.customBackoff||null;if("function"==typeof n)return n(e);var r="number"==typeof t.base?t.base:100;return Math.random()*(Math.pow(2,e)*r)},handleRequestWithRetries:function(e,t,n){t||(t={});var r=i.HttpClient.getInstance(),a=t.httpOptions||{},s=0,u=function(e){var r=t.maxRetries||0;if(e&&"TimeoutError"===e.code&&(e.retryable=!0),e&&e.retryable&&s<r){s++;var i=o.calculateRetryDelay(s,t.retryDelayOptions);setTimeout(c,i+(e.retryAfter||0))}else n(e)},c=function(){var t="";r.handleRequest(e,a,function(e){e.on("data",function(e){t+=e.toString()}),e.on("end",function(){var r=e.statusCode;if(r<300)n(null,t);else{var i=1e3*parseInt(e.headers["retry-after"],10)||0,a=o.error(new Error,{retryable:r>=500||429===r});i&&a.retryable&&(a.retryAfter=i),u(a)}})},u)};i.util.defer(c)},uuid:{v4:function(){return n(30).v4()}},convertPayloadToString:function(e){var t=e.request,n=t.operation,r=t.service.api.operations[n].output||{};r.payload&&e.data[r.payload]&&(e.data[r.payload]=e.data[r.payload].toString())},defer:function(e){"object"==typeof t&&"function"==typeof t.nextTick?t.nextTick(e):"function"==typeof r?r(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var t=e.service.api.operations;if(t){var n=(t||{})[e.operation];if(n&&n.input&&n.input.payload)return n.input.members[n.input.payload]}},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(t,n(10),n(172).setImmediate)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",VARIABLE:"Variable",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension",DIRECTIVE_DEFINITION:"DirectiveDefinition"})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(240))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return Object(p.a)(e,m)}function o(e,t){if(!t)return e;if(Object(s.P)(t))return o(e,t.ofType);if(e[t.name])return e[t.name]!==t&&Object(f.a)(0,'Schema must contain unique named types but contains multiple types named "'+t.name+'".'),e;e[t.name]=t;var n=e;return Object(s.O)(t)&&(n=t.getTypes().reduce(o,n)),Object(s.K)(t)&&(n=t.getInterfaces().reduce(o,n)),(Object(s.K)(t)||Object(s.E)(t))&&Object(d.a)(t.getFields()).forEach(function(e){if(e.args){var t=e.args.map(function(e){return e.type});n=t.reduce(o,n)}n=o(n,e.type)}),Object(s.C)(t)&&Object(d.a)(t.getFields()).forEach(function(e){n=o(n,e.type)}),n}function a(e,t){return Object(u.f)(t)?t.args.reduce(function(e,t){return o(e,t.type)},e):e}t.b=i,n.d(t,"a",function(){return m});var s=n(3),u=n(13),c=n(15),l=n(28),p=n(60),f=n(9),d=n(24),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=function(){function e(t){var n=this;r(this,e),t&&t.assumeValid?this.__validationErrors=[]:("object"!==(void 0===t?"undefined":h(t))&&Object(f.a)(0,"Must provide configuration object."),t.types&&!Array.isArray(t.types)&&Object(f.a)(0,'"types" must be Array if provided but got: '+String(t.types)+"."),t.directives&&!Array.isArray(t.directives)&&Object(f.a)(0,'"directives" must be Array if provided but got: '+String(t.directives)+"."),t.allowedLegacyNames&&!Array.isArray(t.allowedLegacyNames)&&Object(f.a)(0,'"allowedLegacyNames" must be Array if provided but got: '+String(t.allowedLegacyNames)+"."),this.__allowedLegacyNames=t.allowedLegacyNames),this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=t.directives||u.h,this.astNode=t.astNode;var i=[this.getQueryType(),this.getMutationType(),this.getSubscriptionType(),c.j],l=t.types;l&&(i=i.concat(l));var p=Object.create(null);p=i.reduce(o,p),p=this._directives.reduce(a,p),this._typeMap=p,this._implementations=Object.create(null),Object.keys(this._typeMap).forEach(function(e){var t=n._typeMap[e];Object(s.K)(t)&&t.getInterfaces().forEach(function(e){var r=n._implementations[e.name];r?r.push(t):n._implementations[e.name]=[t]})})}return e.prototype.getQueryType=function(){return this._queryType},e.prototype.getMutationType=function(){return this._mutationType},e.prototype.getSubscriptionType=function(){return this._subscriptionType},e.prototype.getTypeMap=function(){return this._typeMap},e.prototype.getType=function(e){return this.getTypeMap()[e]},e.prototype.getPossibleTypes=function(e){return Object(s.O)(e)?e.getTypes():this._implementations[e.name]},e.prototype.isPossibleType=function(e,t){var n=this._possibleTypeMap;if(n||(this._possibleTypeMap=n=Object.create(null)),!n[e.name]){var r=this.getPossibleTypes(e);Array.isArray(r)||Object(f.a)(0,"Could not find possible implementing types for "+e.name+" in schema. Check that schema.types is defined and is an array of all possible types in the schema."),n[e.name]=r.reduce(function(e,t){return e[t.name]=!0,e},Object.create(null))}return Boolean(n[e.name][t.name])},e.prototype.getDirectives=function(){return this._directives},e.prototype.getDirective=function(e){return Object(l.a)(this.getDirectives(),function(t){return t.name===e})},e}()},function(e,t,n){"use strict";function r(e){return"[object Array]"===C.call(e)}function i(e){return"[object ArrayBuffer]"===C.call(e)}function o(e){return"undefined"!=typeof FormData&&e instanceof FormData}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function u(e){return"number"==typeof e}function c(e){return void 0===e}function l(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===C.call(e)}function f(e){return"[object File]"===C.call(e)}function d(e){return"[object Blob]"===C.call(e)}function h(e){return"[object Function]"===C.call(e)}function m(e){return l(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function g(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function v(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function b(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function _(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=_(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)b(arguments[n],e);return t}function S(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=S(t[n],e):t[n]="object"==typeof e?S({},e):e}for(var t={},n=0,r=arguments.length;n<r;n++)b(arguments[n],e);return t}function E(e,t,n){return b(t,function(t,r){e[r]=n&&"function"==typeof t?I(t,n):t}),e}var I=n(154),w=n(355),C=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:i,isBuffer:w,isFormData:o,isArrayBufferView:a,isString:s,isNumber:u,isObject:l,isUndefined:c,isDate:p,isFile:f,isBlob:d,isFunction:h,isStream:m,isURLSearchParams:y,isStandardBrowserEnv:v,forEach:b,merge:_,deepMerge:S,extend:E,trim:g}},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t)}t.a=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,m=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],m=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t,n){"use strict";function r(e){return void 0===e||e!==e}t.a=r},function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);this.ofType=Object(o.u)(e)}function i(e){if(!(this instanceof i))return new i(e);this.ofType=Object(o.q)(e)}t.a=r,t.b=i;var o=n(3),a=r.prototype;a.toString=a.toJSON=a.inspect=function(){return"["+String(this.ofType)+"]"};var s=i.prototype;s.toString=s.toJSON=s.inspect=function(){return String(this.ofType)+"!"}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return Object(u.a)(e,p)}function o(e){return y.some(function(t){return t.name===e.name})}t.f=i,n.d(t,"c",function(){return p}),n.d(t,"d",function(){return f}),n.d(t,"e",function(){return d}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return m}),n.d(t,"h",function(){return y}),t.g=o;var a=n(12),s=n(18),u=n(60),c=n(9),l=n(26),p=function e(t){r(this,e),this.name=t.name,this.description=t.description,this.locations=t.locations,this.astNode=t.astNode,t.name||Object(c.a)(0,"Directive must be named."),Array.isArray(t.locations)||Object(c.a)(0,"Must provide locations for directive.");var n=t.args;n?(Array.isArray(n)&&Object(c.a)(0,"@"+t.name+" args must be an object with argument names as keys."),this.args=Object.keys(n).map(function(e){var t=n[e];return{name:e,description:void 0===t.description?null:t.description,type:t.type,defaultValue:t.defaultValue,astNode:t.astNode}})):this.args=[]},f=new p({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[l.a.FIELD,l.a.FRAGMENT_SPREAD,l.a.INLINE_FRAGMENT],args:{if:{type:Object(a.b)(s.a),description:"Included when true."}}}),d=new p({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[l.a.FIELD,l.a.FRAGMENT_SPREAD,l.a.INLINE_FRAGMENT],args:{if:{type:Object(a.b)(s.a),description:"Skipped when true."}}}),h="No longer supported",m=new p({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[l.a.FIELD_DEFINITION,l.a.ENUM_VALUE],args:{reason:{type:s.e,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).",defaultValue:h}}}),y=[f,d,m]},function(e,t,n){(function(t){var r=n(4);r.crypto.lib=n(206),r.Buffer=n(17).Buffer,r.url=n(31),r.querystring=n(89),r.realClock=n(218),r.environment="js",r.createEventStream=n(219).createEventStream,r.isBrowser=function(){return!0},r.isNode=function(){return!1};var i=n(0);e.exports=i,n(82),n(83),n(225),n(229),n(230),n(231),n(236),i.XML.Parser=n(237),n(238),void 0===t&&(t={browser:!0})}).call(t,n(10))},function(e,t,n){"use strict";function r(e){return Object(u.H)(e)&&(e.name===f.name||e.name===d.name||e.name===h.name||e.name===m.name||e.name===y.name||e.name===g.name||e.name===v.name||e.name===_.name)}n.d(t,"j",function(){return f}),n.d(t,"e",function(){return d}),n.d(t,"f",function(){return h}),n.d(t,"k",function(){return m}),n.d(t,"h",function(){return y}),n.d(t,"i",function(){return g}),n.d(t,"g",function(){return v}),n.d(t,"b",function(){return b}),n.d(t,"l",function(){return _}),n.d(t,"a",function(){return S}),n.d(t,"c",function(){return E}),n.d(t,"d",function(){return I}),n.d(t,"m",function(){return w}),t.n=r;var i=n(11),o=n(24),a=n(61),s=n(19),u=n(3),c=n(12),l=n(18),p=n(26),f=new u.d({name:"__Schema",isIntrospection:!0,description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{types:{description:"A list of all types supported by this server.",type:Object(c.b)(Object(c.a)(Object(c.b)(m))),resolve:function(e){return Object(o.a)(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:Object(c.b)(m),resolve:function(e){return e.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:m,resolve:function(e){return e.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:m,resolve:function(e){return e.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:Object(c.b)(Object(c.a)(Object(c.b)(d))),resolve:function(e){return e.getDirectives()}}}}}),d=new u.d({name:"__Directive",isIntrospection:!0,description:"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",fields:function(){return{name:{type:Object(c.b)(l.e)},description:{type:l.e},locations:{type:Object(c.b)(Object(c.a)(Object(c.b)(h)))},args:{type:Object(c.b)(Object(c.a)(Object(c.b)(g))),resolve:function(e){return e.args||[]}},onOperation:{deprecationReason:"Use `locations`.",type:Object(c.b)(l.a),resolve:function(e){return-1!==e.locations.indexOf(p.a.QUERY)||-1!==e.locations.indexOf(p.a.MUTATION)||-1!==e.locations.indexOf(p.a.SUBSCRIPTION)}},onFragment:{deprecationReason:"Use `locations`.",type:Object(c.b)(l.a),resolve:function(e){return-1!==e.locations.indexOf(p.a.FRAGMENT_SPREAD)||-1!==e.locations.indexOf(p.a.INLINE_FRAGMENT)||-1!==e.locations.indexOf(p.a.FRAGMENT_DEFINITION)}},onField:{deprecationReason:"Use `locations`.",type:Object(c.b)(l.a),resolve:function(e){return-1!==e.locations.indexOf(p.a.FIELD)}}}}}),h=new u.a({name:"__DirectiveLocation",isIntrospection:!0,description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:p.a.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:p.a.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:p.a.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:p.a.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:p.a.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:p.a.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:p.a.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},SCHEMA:{value:p.a.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:p.a.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:p.a.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:p.a.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:p.a.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:p.a.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:p.a.UNION,description:"Location adjacent to a union definition."},ENUM:{value:p.a.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:p.a.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:p.a.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:p.a.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),m=new u.d({name:"__Type",isIntrospection:!0,description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:Object(c.b)(_),resolve:function(e){if(Object(u.M)(e))return b.SCALAR;if(Object(u.K)(e))return b.OBJECT;if(Object(u.E)(e))return b.INTERFACE;if(Object(u.O)(e))return b.UNION;if(Object(u.B)(e))return b.ENUM;if(Object(u.C)(e))return b.INPUT_OBJECT;if(Object(u.G)(e))return b.LIST;if(Object(u.I)(e))return b.NON_NULL;throw new Error("Unknown kind of type: "+e)}},name:{type:l.e},description:{type:l.e},fields:{type:Object(c.a)(Object(c.b)(y)),args:{includeDeprecated:{type:l.a,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Object(u.K)(e)||Object(u.E)(e)){var r=Object(o.a)(e.getFields());return n||(r=r.filter(function(e){return!e.deprecationReason})),r}return null}},interfaces:{type:Object(c.a)(Object(c.b)(m)),resolve:function(e){if(Object(u.K)(e))return e.getInterfaces()}},possibleTypes:{type:Object(c.a)(Object(c.b)(m)),resolve:function(e,t,n,r){var i=r.schema;if(Object(u.z)(e))return i.getPossibleTypes(e)}},enumValues:{type:Object(c.a)(Object(c.b)(v)),args:{includeDeprecated:{type:l.a,defaultValue:!1}},resolve:function(e,t){var n=t.includeDeprecated;if(Object(u.B)(e)){var r=e.getValues();return n||(r=r.filter(function(e){return!e.deprecationReason})),r}}},inputFields:{type:Object(c.a)(Object(c.b)(g)),resolve:function(e){if(Object(u.C)(e))return Object(o.a)(e.getFields())}},ofType:{type:m}}}}),y=new u.d({name:"__Field",isIntrospection:!0,description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:Object(c.b)(l.e)},description:{type:l.e},args:{type:Object(c.b)(Object(c.a)(Object(c.b)(g))),resolve:function(e){return e.args||[]}},type:{type:Object(c.b)(m)},isDeprecated:{type:Object(c.b)(l.a)},deprecationReason:{type:l.e}}}}),g=new u.d({name:"__InputValue",isIntrospection:!0,description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:Object(c.b)(l.e)},description:{type:l.e},type:{type:Object(c.b)(m)},defaultValue:{type:l.e,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(e){return Object(i.a)(e.defaultValue)?null:Object(s.a)(Object(a.a)(e.defaultValue,e.type))}}}}}),v=new u.d({name:"__EnumValue",isIntrospection:!0,description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:Object(c.b)(l.e)},description:{type:l.e},isDeprecated:{type:Object(c.b)(l.a)},deprecationReason:{type:l.e}}}}),b={SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"},_=new u.a({name:"__TypeKind",isIntrospection:!0,description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:b.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:b.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:b.INTERFACE,description:"Indicates this type is an interface. `fields` and `possibleTypes` are valid fields."},UNION:{value:b.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:b.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:b.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:b.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:b.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),S={name:"__schema",type:Object(c.b)(f),description:"Access the current type schema of this server.",args:[],resolve:function(e,t,n,r){return r.schema}},E={name:"__type",type:m,description:"Request the type information of a single type.",args:[{name:"name",type:Object(c.b)(l.e)}],resolve:function(e,t,n,r){var i=t.name;return r.schema.getType(i)}},I={name:"__typename",type:Object(c.b)(l.e),description:"The name of the current Object type at runtime.",args:[],resolve:function(e,t,n,r){return r.parentType.name}},w=[f,d,h,m,y,g,v,_]},function(e,t,n){"use strict";function r(e,t){var n=void 0;if(t.kind===i.a.LIST_TYPE)return(n=r(e,t.type))&&Object(o.a)(n);if(t.kind===i.a.NON_NULL_TYPE)return(n=r(e,t.type))&&Object(o.b)(n);if(t.kind===i.a.NAMED_TYPE)return e.getType(t.name.value);throw new Error("Unexpected type kind: "+t.kind+".")}t.a=r;var i=n(5),o=n(12)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=o.prototype):(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return a(this,e,t,n)}function a(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?f(e,t,n,r):"string"==typeof t?l(e,t,n):d(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}function c(e,t){if(s(t),e=i(e,t<0?0:0|h(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function l(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|y(t,n);e=i(e,r);var a=e.write(t,n);return a!==r&&(e=e.slice(0,a)),e}function p(e,t){var n=t.length<0?0:0|h(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=p(e,t),e}function d(e,t){if(o.isBuffer(t)){var n=0|h(t.length);return e=i(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Y(t.length)?i(e,0):p(e,t);if("Buffer"===t.type&&$(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),o.alloc(+e)}function y(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(r)return K(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return N(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<s;c++)if(o(e,c)===o(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*a}else-1!==l&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;f<u;f++)if(o(e,c+f)!==o(t,f)){p=!1;break}if(p)return c}return-1}function S(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function E(e,t,n,r){return J(K(t,e.length-n),e,n,r)}function I(e,t,n,r){return J(G(t),e,n,r)}function w(e,t,n,r){return I(e,t,n,r)}function C(e,t,n,r){return J(W(t),e,n,r)}function T(e,t,n,r){return J(H(t,e.length-n),e,n,r)}function N(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&o)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return k(r)}function k(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=z(e[o]);return i}function x(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function U(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function q(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,r,52,8),n+8}function F(e){if(e=V(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function V(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function H(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function W(e){return X.toByteArray(F(e))}function J(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}/*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   */
  var X=n(208),Q=n(209),$=n(210);t.Buffer=o,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return u(null,e,t,n)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!$(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=y,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,u=Math.min(a,s),c=this.slice(r,i),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){a=c[p],s=l[p];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},o.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return S(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":return I(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=o.prototype;else{var i=t-e;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},o.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},o.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),Q.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),Q.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),Q.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),Q.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||j(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);j(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return q(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return q(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=o.isBuffer(e)?e:K(new o(e,r).toString()),u=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,n(22))},function(e,t,n){"use strict";function r(e){if(""===e)throw new TypeError("Int cannot represent non 32-bit signed integer value: (empty string)");var t=Number(e);if(t!==t||t>c||t<l)throw new TypeError("Int cannot represent non 32-bit signed integer value: "+String(e));var n=Math.floor(t);if(n!==t)throw new TypeError("Int cannot represent non-integer value: "+String(e));return n}function i(e){if(""===e)throw new TypeError("Float cannot represent non numeric value: (empty string)");var t=Number(e);if(t===t)return t;throw new TypeError("Float cannot represent non numeric value: "+String(e))}function o(e){if(Array.isArray(e))throw new TypeError("String cannot represent an array value: ["+String(e)+"]");return String(e)}function a(e){return Object(s.H)(e)&&(e.name===d.name||e.name===p.name||e.name===f.name||e.name===h.name||e.name===m.name)}n.d(t,"d",function(){return p}),n.d(t,"b",function(){return f}),n.d(t,"e",function(){return d}),n.d(t,"a",function(){return h}),n.d(t,"c",function(){return m}),n.d(t,"g",function(){return y}),t.f=a;var s=n(3),u=n(5),c=2147483647,l=-2147483648,p=new s.e({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. ",serialize:r,parseValue:r,parseLiteral:function(e){if(e.kind===u.a.INT){var t=parseInt(e.value,10);if(t<=c&&t>=l)return t}}}),f=new s.e({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point). ",serialize:i,parseValue:i,parseLiteral:function(e){return e.kind===u.a.FLOAT||e.kind===u.a.INT?parseFloat(e.value):void 0}}),d=new s.e({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:o,parseValue:o,parseLiteral:function(e){return e.kind===u.a.STRING?e.value:void 0}}),h=new s.e({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Boolean,parseValue:Boolean,parseLiteral:function(e){return e.kind===u.a.BOOLEAN?e.value:void 0}}),m=new s.e({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:String,parseValue:String,parseLiteral:function(e){return e.kind===u.a.STRING||e.kind===u.a.INT?e.value:void 0}}),y=[d,p,f,h,m]},function(e,t,n){"use strict";function r(e){return Object(l.c)(e,{leave:p})}function i(e){return function(t){return o([t.description,e(t)],"\n")}}function o(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function a(e){return e&&0!==e.length?"{\n"+u(o(e,"\n"))+"\n}":""}function s(e,t,n){return t?e+t+(n||""):""}function u(e){return e&&"  "+e.replace(/\n/g,"\n  ")}function c(e,t){var n=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'+(t?n:u(n))+'\n"""':'"""'+n.replace(/"$/,'"\n')+'"""'}t.a=r;var l=n(27),p={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return o(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=s("(",o(e.variableDefinitions,", "),")"),i=o(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?o([t,o([n,r]),i,a]," "):a},VariableDefinition:function(e){return e.variable+": "+e.type+s(" = ",e.defaultValue)},SelectionSet:function(e){return a(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet;return o([s("",t,": ")+n+s("(",o(r,", "),")"),o(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+s(" ",o(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return o(["...",s("on ",t),o(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment "+t+s("(",o(r,", "),")")+" on "+n+" "+s("",o(i," ")," ")+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?c(n,"description"===t):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+o(e.values,", ")+"]"},ObjectValue:function(e){return"{"+o(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+s("(",o(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return o(["schema",o(t," "),a(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:i(function(e){return o(["scalar",e.name,o(e.directives," ")]," ")}),ObjectTypeDefinition:i(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")}),FieldDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+s("(",o(n,", "),")")+": "+r+s(" ",o(i," "))}),InputValueDefinition:i(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return o([t+": "+n,s("= ",r),o(i," ")]," ")}),InterfaceTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["interface",t,o(n," "),a(r)]," ")}),UnionTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.types;return o(["union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")}),EnumTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.values;return o(["enum",t,o(n," "),a(r)]," ")}),EnumValueDefinition:i(function(e){return o([e.name,o(e.directives," ")]," ")}),InputObjectTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["input",t,o(n," "),a(r)]," ")}),ScalarTypeExtension:function(e){return o(["extend scalar",e.name,o(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["extend type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend interface",t,o(n," "),a(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return o(["extend union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return o(["extend enum",t,o(n," "),a(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend input",t,o(n," "),a(r)]," ")},DirectiveDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+s("(",o(n,", "),")")+" on "+o(r," | ")})}},function(e,t,n){"use strict";function r(e,t,n,i,a,s,u){var c=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,l=n;if(!l&&c){var p=c[0];l=p&&p.loc&&p.loc.source}var f=i;!f&&c&&(f=c.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),f&&0===f.length&&(f=void 0);var d=void 0;if(i&&n){var h=n;d=i.map(function(e){return Object(o.a)(h,e)})}else c&&(d=c.reduce(function(e,t){return t.loc&&e.push(Object(o.a)(t.loc.source,t.loc.start)),e},[]));Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:d||void 0,enumerable:!0},path:{value:a||void 0,enumerable:!0},nodes:{value:c||void 0},source:{value:l||void 0},positions:{value:f||void 0},originalError:{value:s},extensions:{value:u||s&&s.extensions}}),s&&s.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}t.a=r;var i=n(116),o=n(62);r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"},toString:{value:function(){return Object(i.a)(this)}}})},function(e,t,n){"use strict";function r(e,t){return e.reduce(function(e,n){return e[t(n)]=n,e},Object.create(null))}t.a=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){!function(n,r){e.exports=t=function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base=function(){return{extend:function(e){var t=n(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)}}}(),a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=0;i<t;i+=4){var o=function(t){var t=t,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,t=18e3*(65535&t)+(t>>16)&r;var i=(n<<16)+t&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}}(4294967296*(n||e.random()));n=987654071*o(),r.push(4294967296*o()|0)}return new a.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.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)))}},p=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=4*o,u=i/s;u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0);var c=u*o,l=e.min(4*c,i);if(c){for(var p=0;p<c;p+=o)this._doProcessBlock(r,p);var f=r.splice(0,c);n.sigBytes-=l}return new a.init(f,l)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),f=(i.Hasher=p.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e}()}()},function(e,t,n){"use strict";var r=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})};t.a=r},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=[{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"}],r=function(){function t(){}return t.isEmpty=function(e){return 0===Object.keys(e).length},t.sortByField=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort(function(e,n){var i=e[t],o=n[t];return void 0===o?void 0===i?0:1*r:void 0===i?-1*r:i<o?-1*r:i>o?1*r:0}),!0},t.objectLessAttributes=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach(function(e){delete n[e]})),n},t.filenameToContentType=function(e,t){void 0===t&&(t="application/octet-stream");var r=e.toLowerCase(),i=n.filter(function(e){return r.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",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},t.makeQuerablePromise=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then(function(e){return r=!0,t=!1,e},function(e){throw n=!0,t=!1,e});return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},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,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!t.isStrictObject(e))return e;var i={};for(var o in e)if(e.hasOwnProperty(o)){var a=n.includes(o)?o:o[0].toLowerCase()+o.slice(1);i[a]=r.includes(o)?e[o]:t.transferKeyToLowerCase(e[o],n,r)}return i},t.transferKeyToUpperCase=function(e,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!t.isStrictObject(e))return e;var i={};for(var o in e)if(e.hasOwnProperty(o)){var a=n.includes(o)?o:o[0].toUpperCase()+o.slice(1);i[a]=r.includes(o)?e[o]:t.transferKeyToUpperCase(e[o],n,r)}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.default=r}).call(t,n(10))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=void 0,o=Array.isArray(e),a=[e],l=-1,p=[],f=void 0,d=void 0,h=void 0,m=[],y=[],g=e;do{l++;var v=l===a.length,b=v&&0!==p.length;if(v){if(d=0===y.length?void 0:m[m.length-1],f=h,h=y.pop(),b){if(o)f=f.slice();else{var _={};for(var S in f)f.hasOwnProperty(S)&&(_[S]=f[S]);f=_}for(var E=0,I=0;I<p.length;I++){var w=p[I][0],C=p[I][1];o&&(w-=E),o&&null===C?(f.splice(w,1),E++):f[w]=C}}l=r.index,a=r.keys,p=r.edits,o=r.inArray,r=r.prev}else{if(d=h?o?l:a[l]:void 0,null===(f=h?h[d]:g)||void 0===f)continue;h&&m.push(d)}var T=void 0;if(!Array.isArray(f)){if(!i(f))throw new Error("Invalid AST Node: "+JSON.stringify(f));var N=s(t,f.kind,v);if(N){if((T=N.call(t,f,d,h,m,y))===c)break;if(!1===T){if(!v){m.pop();continue}}else if(void 0!==T&&(p.push([d,T]),!v)){if(!i(T)){m.pop();continue}f=T}}}void 0===T&&b&&p.push([d,f]),v?m.pop():(r={inArray:o,index:l,keys:a,edits:p,prev:r},o=Array.isArray(f),a=o?f:n[f.kind]||[],l=-1,p=[],h&&y.push(h),h=f)}while(void 0!==r);return 0!==p.length&&(g=p[p.length-1][1]),g}function i(e){return Boolean(e&&"string"==typeof e.kind)}function o(e){var t=new Array(e.length);return{enter:function(n){for(var r=0;r<e.length;r++)if(!t[r]){var i=s(e[r],n.kind,!1);if(i){var o=i.apply(e[r],arguments);if(!1===o)t[r]=n;else if(o===c)t[r]=c;else if(void 0!==o)return o}}},leave:function(n){for(var r=0;r<e.length;r++)if(t[r])t[r]===n&&(t[r]=null);else{var i=s(e[r],n.kind,!0);if(i){var o=i.apply(e[r],arguments);if(o===c)t[r]=c;else if(void 0!==o&&!1!==o)return o}}}}}function a(e,t){return{enter:function(n){e.enter(n);var r=s(t,n.kind,!1);if(r){var o=r.apply(t,arguments);return void 0!==o&&(e.leave(n),i(o)&&e.enter(o)),o}},leave:function(n){var r=s(t,n.kind,!0),i=void 0;return r&&(i=r.apply(t,arguments)),e.leave(n),i}}}function s(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}n.d(t,"a",function(){return c}),t.c=r,t.d=o,t.e=a,t.b=s;var u={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"]},c={}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}t.a=r},function(e,t,n){function r(e,t,n){null!==n&&void 0!==n&&v.property.apply(this,arguments)}function i(e,t){e.constructor.prototype[t]||v.memoizedProperty.apply(this,arguments)}function o(e,t,n){t=t||{},r(this,"shape",e.shape),r(this,"api",t.api,!1),r(this,"type",e.type),r(this,"enum",e.enum),r(this,"min",e.min),r(this,"max",e.max),r(this,"pattern",e.pattern),r(this,"location",e.location||this.location||"body"),r(this,"name",this.name||e.xmlName||e.queryName||e.locationName||n),r(this,"isStreaming",e.streaming||this.isStreaming||!1),r(this,"requiresLength",e.requiresLength,!1),r(this,"isComposite",e.isComposite||!1),r(this,"isShape",!0,!1),r(this,"isQueryName",Boolean(e.queryName),!1),r(this,"isLocationName",Boolean(e.locationName),!1),r(this,"isIdempotent",!0===e.idempotencyToken),r(this,"isJsonValue",!0===e.jsonvalue),r(this,"isSensitive",!0===e.sensitive||e.prototype&&!0===e.prototype.sensitive),r(this,"isEventStream",Boolean(e.eventstream),!1),r(this,"isEvent",Boolean(e.event),!1),r(this,"isEventPayload",Boolean(e.eventpayload),!1),r(this,"isEventHeader",Boolean(e.eventheader),!1),r(this,"isTimestampFormatSet",Boolean(e.timestampFormat)||e.prototype&&!0===e.prototype.isTimestampFormatSet,!1),r(this,"endpointDiscoveryId",Boolean(e.endpointdiscoveryid),!1),r(this,"hostLabel",Boolean(e.hostLabel),!1),t.documentation&&(r(this,"documentation",e.documentation),r(this,"documentationUrl",e.documentationUrl)),e.xmlAttribute&&r(this,"isXmlAttribute",e.xmlAttribute||!1),r(this,"defaultValue",null),this.toWireFormat=function(e){return null===e||void 0===e?"":e},this.toType=function(e){return e}}function a(e){o.apply(this,arguments),r(this,"isComposite",!0),e.flattened&&r(this,"flattened",e.flattened||!1)}function s(e,t){var n=this,s=null,u=!this.isShape;a.apply(this,arguments),u&&(r(this,"defaultValue",function(){return{}}),r(this,"members",{}),r(this,"memberNames",[]),r(this,"required",[]),r(this,"isRequired",function(){return!1})),e.members&&(r(this,"members",new g(e.members,t,function(e,n){return o.create(n,t,e)})),i(this,"memberNames",function(){return e.xmlOrder||Object.keys(e.members)}),e.event&&(i(this,"eventPayloadMemberName",function(){for(var e=n.members,t=n.memberNames,r=0,i=t.length;r<i;r++)if(e[t[r]].isEventPayload)return t[r]}),i(this,"eventHeaderMemberNames",function(){for(var e=n.members,t=n.memberNames,r=[],i=0,o=t.length;i<o;i++)e[t[i]].isEventHeader&&r.push(t[i]);return r}))),e.required&&(r(this,"required",e.required),r(this,"isRequired",function(t){if(!s){s={};for(var n=0;n<e.required.length;n++)s[e.required[n]]=!0}return s[t]},!1,!0)),r(this,"resultWrapper",e.resultWrapper||null),e.payload&&r(this,"payload",e.payload),"string"==typeof e.xmlNamespace?r(this,"xmlNamespaceUri",e.xmlNamespace):"object"==typeof e.xmlNamespace&&(r(this,"xmlNamespacePrefix",e.xmlNamespace.prefix),r(this,"xmlNamespaceUri",e.xmlNamespace.uri))}function u(e,t){var n=this,s=!this.isShape;if(a.apply(this,arguments),s&&r(this,"defaultValue",function(){return[]}),e.member&&i(this,"member",function(){return o.create(e.member,t)}),this.flattened){var u=this.name;i(this,"name",function(){return n.member.name||u})}}function c(e,t){var n=!this.isShape;a.apply(this,arguments),n&&(r(this,"defaultValue",function(){return{}}),r(this,"key",o.create({type:"string"},t)),r(this,"value",o.create({type:"string"},t))),e.key&&i(this,"key",function(){return o.create(e.key,t)}),e.value&&i(this,"value",function(){return o.create(e.value,t)})}function l(e){var t=this;if(o.apply(this,arguments),e.timestampFormat)r(this,"timestampFormat",e.timestampFormat);else if(t.isTimestampFormatSet&&this.timestampFormat)r(this,"timestampFormat",this.timestampFormat);else if("header"===this.location)r(this,"timestampFormat","rfc822");else if("querystring"===this.location)r(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":r(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":r(this,"timestampFormat","iso8601")}this.toType=function(e){return null===e||void 0===e?null:"function"==typeof e.toUTCString?e:"string"==typeof e||"number"==typeof e?v.date.parseTimestamp(e):null},this.toWireFormat=function(e){return v.date.format(e,t.timestampFormat)}}function p(){o.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 f(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseFloat(e)},this.toWireFormat=this.toType}function d(){o.apply(this,arguments),this.toType=function(e){return null===e||void 0===e?null:parseInt(e,10)},this.toWireFormat=this.toType}function h(){o.apply(this,arguments),this.toType=function(e){var t=v.base64.decode(e);if(this.isSensitive&&v.isNode()&&"function"==typeof v.Buffer.alloc){var n=v.Buffer.alloc(t.length,t);t.fill(0),t=n}return t},this.toWireFormat=v.base64.encode}function m(){h.apply(this,arguments)}function y(){o.apply(this,arguments),this.toType=function(e){return"boolean"==typeof e?e:null===e||void 0===e?null:"true"===e}}var g=n(74),v=n(4);o.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"},o.types={structure:s,list:u,map:c,boolean:y,timestamp:l,float:f,integer:d,string:p,base64:m,binary:h},o.resolve=function(e,t){if(e.shape){var n=t.api.shapes[e.shape];if(!n)throw new Error("Cannot find shape reference: "+e.shape);return n}return null},o.create=function(e,t,n){if(e.isShape)return e;var r=o.resolve(e,t);if(r){var i=Object.keys(e);t.documentation||(i=i.filter(function(e){return!e.match(/documentation/)}));var a=function(){r.constructor.call(this,e,t,n)};return a.prototype=r,new a}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(o.normalizedTypes[e.type]&&(e.type=o.normalizedTypes[e.type]),o.types[e.type])return new o.types[e.type](e,t,n);throw new Error("Unrecognized shape type: "+s)},o.shapes={StructureShape:s,ListShape:u,MapShape:c,StringShape:p,BooleanShape:y,Base64Shape:m},e.exports=o},function(e,t,n){var r=n(204),i=n(205),o=i;o.v1=r,o.v4=i,e.exports=o},function(e,t,n){"use strict";function r(){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}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(214),c=n(215);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["<",">",'"',"`"," ","\r","\n","\t"],h=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(h),y=["%","/","?",";","#"].concat(m),g=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},I=n(89);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var s=e;if(s=s.trim(),!n&&1===e.split("#").length){var p=f.exec(s);if(p)return this.path=s,this.href=s,this.pathname=p[1],p[2]?(this.search=p[2],this.query=t?I.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var d=l.exec(s);if(d){d=d[0];var h=d.toLowerCase();this.protocol=h,s=s.substr(d.length)}if(n||d||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var w="//"===s.substr(0,2);!w||d&&S[d]||(s=s.substr(2),this.slashes=!0)}if(!S[d]&&(w||d&&!E[d])){for(var C=-1,T=0;T<g.length;T++){var N=s.indexOf(g[T]);-1!==N&&(-1===C||N<C)&&(C=N)}var A,k;k=-1===C?s.lastIndexOf("@"):s.lastIndexOf("@",C),-1!==k&&(A=s.slice(0,k),s=s.slice(k+1),this.auth=decodeURIComponent(A)),C=-1;for(var T=0;T<y.length;T++){var N=s.indexOf(y[T]);-1!==N&&(-1===C||N<C)&&(C=N)}-1===C&&(C=s.length),this.host=s.slice(0,C),s=s.slice(C),this.parseHost(),this.hostname=this.hostname||"";var O="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!O)for(var P=this.hostname.split(/\./),T=0,R=P.length;T<R;T++){var x=P[T];if(x&&!x.match(v)){for(var D="",j=0,M=x.length;j<M;j++)x.charCodeAt(j)>127?D+="x":D+=x[j];if(!D.match(v)){var U=P.slice(0,T),L=P.slice(T+1),q=x.match(b);q&&(U.push(q[1]),L.unshift(q[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=u.toASCII(this.hostname));var B=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+B,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!_[h])for(var T=0,R=m.length;T<R;T++){var V=m[T];if(-1!==s.indexOf(V)){var z=encodeURIComponent(V);z===V&&(z=escape(V)),s=s.split(V).join(z)}}var K=s.indexOf("#");-1!==K&&(this.hash=s.substr(K),s=s.slice(0,K));var G=s.indexOf("?");if(-1!==G?(this.search=s.substr(G),this.query=s.substr(G+1),t&&(this.query=I.parse(this.query)),s=s.slice(0,G)):t&&(this.search="",this.query={}),s&&(this.pathname=s),E[h]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",H=this.search||"";this.path=B+H}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(o=I.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||E[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),a=a.replace("#","%23"),t+i+n+a+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(c.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var l=s[u];"protocol"!==l&&(n[l]=e[l])}return E[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!E[e.protocol]){for(var p=Object.keys(e),f=0;f<p.length;f++){var d=p[f];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||S[e.protocol])n.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),n.pathname=h.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",y=n.search||"";n.path=m+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var g=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=v||g||n.host&&e.pathname,_=b,I=n.pathname&&n.pathname.split("/")||[],h=e.pathname&&e.pathname.split("/")||[],w=n.protocol&&!E[n.protocol];if(w&&(n.hostname="",n.port=null,n.host&&(""===I[0]?I[0]=n.host:I.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),b=b&&(""===h[0]||""===I[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,I=h;else if(h.length)I||(I=[]),I.pop(),I=I.concat(h),n.search=e.search,n.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(w){n.hostname=n.host=I.shift();var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!I.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=I.slice(-1)[0],N=(n.host||e.host||I.length>1)&&("."===T||".."===T)||""===T,A=0,k=I.length;k>=0;k--)T=I[k],"."===T?I.splice(k,1):".."===T?(I.splice(k,1),A++):A&&(I.splice(k,1),A--);if(!b&&!_)for(;A--;A)I.unshift("..");!b||""===I[0]||I[0]&&"/"===I[0].charAt(0)||I.unshift(""),N&&"/"!==I.join("/").substr(-1)&&I.push("");var O=""===I[0]||I[0]&&"/"===I[0].charAt(0);if(w){n.hostname=n.host=O?"":I.length?I.shift():"";var C=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return b=b||n.host&&I.length,b&&!O&&I.unshift(""),I.length?n.pathname=I.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.sts={},r.STS=i.defineService("sts",["2011-06-15"]),n(226),Object.defineProperty(o.services.sts,"2011-06-15",{get:function(){var e=n(227);return e.paginators=n(228).pagination,e},enumerable:!0,configurable:!0}),e.exports=r.STS},function(e,t){function n(e){return!!a(e)}function r(e){var t=null!=e&&e.length;return"number"==typeof t&&t>=0&&t%1==0}function i(e){return Object(e)===e&&(r(e)||n(e))}function o(e){var t=a(e);if(t)return t.call(e)}function a(e){if(null!=e){var t=y&&e[y]||e["@@iterator"];if("function"==typeof t)return t}}function s(e){if(null!=e){var t=o(e);if(t)return t;if(r(e))return new u(e)}}function u(e){this._o=e,this._i=0}function c(e,t,n){if(null!=e){if("function"==typeof e.forEach)return e.forEach(t,n);var i=0,a=o(e);if(a){for(var s;!(s=a.next()).done;)if(t.call(n,s.value,i++,e),i>9999999)throw new TypeError("Near-infinite iteration.")}else if(r(e))for(;i<e.length;i++)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}}function l(e){return!!f(e)}function p(e){var t=f(e);if(t)return t.call(e)}function f(e){if(null!=e){var t=v&&e[v]||e["@@asyncIterator"];if("function"==typeof t)return t}}function d(e){if(null!=e){var t=p(e);if(t)return t;var n=s(e);if(n)return new h(n)}}function h(e){this._i=e}function m(e,t,n){var r=d(e);if(r){var i=0;return new Promise(function(o,a){function s(){return r.next().then(function(r){return r.done?o():Promise.resolve(t.call(n,r.value,i++,e)).then(s).catch(a),null}).catch(a),null}s()})}}var y="function"==typeof Symbol&&Symbol.iterator,g=y||"@@iterator";t.$$iterator=g,t.isIterable=n,t.isArrayLike=r,t.isCollection=i,t.getIterator=o,t.getIteratorMethod=a,t.createIterator=s,u.prototype[g]=function(){return this},u.prototype.next=function(){return void 0===this._o||this._i>=this._o.length?(this._o=void 0,{value:void 0,done:!0}):{value:this._o[this._i++],done:!1}},t.forEach=c;var v="function"==typeof Symbol&&Symbol.asyncIterator,b=v||"@@asyncIterator";t.$$asyncIterator=b,t.isAsyncIterable=l,t.getAsyncIterator=p,t.getAsyncIteratorMethod=f,t.createAsyncIterator=d,h.prototype[b]=function(){return this},h.prototype.next=function(){var e=this._i.next();return Promise.resolve(e.value).then(function(t){return{value:t,done:e.done}})},t.forAwaitEach=m},function(e,t,n){"use strict";function r(e,t){var n="string"==typeof e?new _e.a(e):e;if(!(n instanceof _e.a))throw new TypeError("Must provide Source. Received: "+String(n));return s(Object(Ee.b)(n,t||{}))}function i(e,t){var n="string"==typeof e?new _e.a(e):e,r=Object(Ee.b)(n,t||{});me(r,Ee.a.SOF);var i=w(r,!1);return me(r,Ee.a.EOF),i}function o(e,t){var n="string"==typeof e?new _e.a(e):e,r=Object(Ee.b)(n,t||{});me(r,Ee.a.SOF);var i=x(r);return me(r,Ee.a.EOF),i}function a(e){var t=me(e,Ee.a.NAME);return{kind:Ie.a.NAME,value:t.value,loc:pe(e,t)}}function s(e){var t=e.token;me(e,Ee.a.SOF);var n=[];do{n.push(u(e))}while(!he(e,Ee.a.EOF));return{kind:Ie.a.DOCUMENT,definitions:n,loc:pe(e,t)}}function u(e){if(de(e,Ee.a.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return c(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"extend":case"directive":return j(e)}else{if(de(e,Ee.a.BRACE_L))return c(e);if(M(e))return j(e)}throw ge(e)}function c(e){if(de(e,Ee.a.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return l(e);case"fragment":return E(e)}else if(de(e,Ee.a.BRACE_L))return l(e);throw ge(e)}function l(e){var t=e.token;if(de(e,Ee.a.BRACE_L))return{kind:Ie.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:m(e),loc:pe(e,t)};var n=p(e),r=void 0;return de(e,Ee.a.NAME)&&(r=a(e)),{kind:Ie.a.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:f(e),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function p(e){var t=me(e,Ee.a.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw ge(e,t)}function f(e){return de(e,Ee.a.PAREN_L)?be(e,Ee.a.PAREN_L,d,Ee.a.PAREN_R):[]}function d(e){var t=e.token;return{kind:Ie.a.VARIABLE_DEFINITION,variable:h(e),type:(me(e,Ee.a.COLON),x(e)),defaultValue:he(e,Ee.a.EQUALS)?w(e,!0):void 0,loc:pe(e,t)}}function h(e){var t=e.token;return me(e,Ee.a.DOLLAR),{kind:Ie.a.VARIABLE,name:a(e),loc:pe(e,t)}}function m(e){var t=e.token;return{kind:Ie.a.SELECTION_SET,selections:be(e,Ee.a.BRACE_L,y,Ee.a.BRACE_R),loc:pe(e,t)}}function y(e){return de(e,Ee.a.SPREAD)?S(e):g(e)}function g(e){var t=e.token,n=a(e),r=void 0,i=void 0;return he(e,Ee.a.COLON)?(r=n,i=a(e)):i=n,{kind:Ie.a.FIELD,alias:r,name:i,arguments:v(e,!1),directives:P(e,!1),selectionSet:de(e,Ee.a.BRACE_L)?m(e):void 0,loc:pe(e,t)}}function v(e,t){var n=t?_:b;return de(e,Ee.a.PAREN_L)?be(e,Ee.a.PAREN_L,n,Ee.a.PAREN_R):[]}function b(e){var t=e.token;return{kind:Ie.a.ARGUMENT,name:a(e),value:(me(e,Ee.a.COLON),w(e,!1)),loc:pe(e,t)}}function _(e){var t=e.token;return{kind:Ie.a.ARGUMENT,name:a(e),value:(me(e,Ee.a.COLON),T(e)),loc:pe(e,t)}}function S(e){var t=e.token;if(me(e,Ee.a.SPREAD),de(e,Ee.a.NAME)&&"on"!==e.token.value)return{kind:Ie.a.FRAGMENT_SPREAD,name:I(e),directives:P(e,!1),loc:pe(e,t)};var n=void 0;return"on"===e.token.value&&(e.advance(),n=D(e)),{kind:Ie.a.INLINE_FRAGMENT,typeCondition:n,directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function E(e){var t=e.token;return ye(e,"fragment"),e.options.experimentalFragmentVariables?{kind:Ie.a.FRAGMENT_DEFINITION,name:I(e),variableDefinitions:f(e),typeCondition:(ye(e,"on"),D(e)),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}:{kind:Ie.a.FRAGMENT_DEFINITION,name:I(e),typeCondition:(ye(e,"on"),D(e)),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function I(e){if("on"===e.token.value)throw ge(e);return a(e)}function w(e,t){var n=e.token;switch(n.kind){case Ee.a.BRACKET_L:return A(e,t);case Ee.a.BRACE_L:return k(e,t);case Ee.a.INT:return e.advance(),{kind:Ie.a.INT,value:n.value,loc:pe(e,n)};case Ee.a.FLOAT:return e.advance(),{kind:Ie.a.FLOAT,value:n.value,loc:pe(e,n)};case Ee.a.STRING:case Ee.a.BLOCK_STRING:return C(e);case Ee.a.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:Ie.a.BOOLEAN,value:"true"===n.value,loc:pe(e,n)}):"null"===n.value?(e.advance(),{kind:Ie.a.NULL,loc:pe(e,n)}):(e.advance(),{kind:Ie.a.ENUM,value:n.value,loc:pe(e,n)});case Ee.a.DOLLAR:if(!t)return h(e)}throw ge(e)}function C(e){var t=e.token;return e.advance(),{kind:Ie.a.STRING,value:t.value,block:t.kind===Ee.a.BLOCK_STRING,loc:pe(e,t)}}function T(e){return w(e,!0)}function N(e){return w(e,!1)}function A(e,t){var n=e.token,r=t?T:N;return{kind:Ie.a.LIST,values:ve(e,Ee.a.BRACKET_L,r,Ee.a.BRACKET_R),loc:pe(e,n)}}function k(e,t){var n=e.token;me(e,Ee.a.BRACE_L);for(var r=[];!he(e,Ee.a.BRACE_R);)r.push(O(e,t));return{kind:Ie.a.OBJECT,fields:r,loc:pe(e,n)}}function O(e,t){var n=e.token;return{kind:Ie.a.OBJECT_FIELD,name:a(e),value:(me(e,Ee.a.COLON),w(e,t)),loc:pe(e,n)}}function P(e,t){for(var n=[];de(e,Ee.a.AT);)n.push(R(e,t));return n}function R(e,t){var n=e.token;return me(e,Ee.a.AT),{kind:Ie.a.DIRECTIVE,name:a(e),arguments:v(e,t),loc:pe(e,n)}}function x(e){var t=e.token,n=void 0;return he(e,Ee.a.BRACKET_L)?(n=x(e),me(e,Ee.a.BRACKET_R),n={kind:Ie.a.LIST_TYPE,type:n,loc:pe(e,t)}):n=D(e),he(e,Ee.a.BANG)?{kind:Ie.a.NON_NULL_TYPE,type:n,loc:pe(e,t)}:n}function D(e){var t=e.token;return{kind:Ie.a.NAMED_TYPE,name:a(e),loc:pe(e,t)}}function j(e){var t=M(e)?e.lookahead():e.token;if(t.kind===Ee.a.NAME)switch(t.value){case"schema":return L(e);case"scalar":return B(e);case"type":return F(e);case"interface":return W(e);case"union":return J(e);case"enum":return X(e);case"input":return Z(e);case"extend":return te(e);case"directive":return ue(e)}throw ge(e,t)}function M(e){return de(e,Ee.a.STRING)||de(e,Ee.a.BLOCK_STRING)}function U(e){if(M(e))return C(e)}function L(e){var t=e.token;ye(e,"schema");var n=P(e,!0),r=be(e,Ee.a.BRACE_L,q,Ee.a.BRACE_R);return{kind:Ie.a.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:pe(e,t)}}function q(e){var t=e.token,n=p(e);me(e,Ee.a.COLON);var r=D(e);return{kind:Ie.a.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:pe(e,t)}}function B(e){var t=e.token,n=U(e);ye(e,"scalar");var r=a(e),i=P(e,!0);return{kind:Ie.a.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:pe(e,t)}}function F(e){var t=e.token,n=U(e);ye(e,"type");var r=a(e),i=V(e),o=P(e,!0),s=z(e);return{kind:Ie.a.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:s,loc:pe(e,t)}}function V(e){var t=[];if("implements"===e.token.value){e.advance(),he(e,Ee.a.AMP);do{t.push(D(e))}while(he(e,Ee.a.AMP)||e.options.allowLegacySDLImplementsInterfaces&&de(e,Ee.a.NAME))}return t}function z(e){return e.options.allowLegacySDLEmptyFields&&de(e,Ee.a.BRACE_L)&&e.lookahead().kind===Ee.a.BRACE_R?(e.advance(),e.advance(),[]):de(e,Ee.a.BRACE_L)?be(e,Ee.a.BRACE_L,K,Ee.a.BRACE_R):[]}function K(e){var t=e.token,n=U(e),r=a(e),i=G(e);me(e,Ee.a.COLON);var o=x(e),s=P(e,!0);return{kind:Ie.a.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:s,loc:pe(e,t)}}function G(e){return de(e,Ee.a.PAREN_L)?be(e,Ee.a.PAREN_L,H,Ee.a.PAREN_R):[]}function H(e){var t=e.token,n=U(e),r=a(e);me(e,Ee.a.COLON);var i=x(e),o=void 0;he(e,Ee.a.EQUALS)&&(o=T(e));var s=P(e,!0);return{kind:Ie.a.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:s,loc:pe(e,t)}}function W(e){var t=e.token,n=U(e);ye(e,"interface");var r=a(e),i=P(e,!0),o=z(e);return{kind:Ie.a.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:pe(e,t)}}function J(e){var t=e.token,n=U(e);ye(e,"union");var r=a(e),i=P(e,!0),o=Y(e);return{kind:Ie.a.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:pe(e,t)}}function Y(e){var t=[];if(he(e,Ee.a.EQUALS)){he(e,Ee.a.PIPE);do{t.push(D(e))}while(he(e,Ee.a.PIPE))}return t}function X(e){var t=e.token,n=U(e);ye(e,"enum");var r=a(e),i=P(e,!0),o=Q(e);return{kind:Ie.a.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:pe(e,t)}}function Q(e){return de(e,Ee.a.BRACE_L)?be(e,Ee.a.BRACE_L,$,Ee.a.BRACE_R):[]}function $(e){var t=e.token,n=U(e),r=a(e),i=P(e,!0);return{kind:Ie.a.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:pe(e,t)}}function Z(e){var t=e.token,n=U(e);ye(e,"input");var r=a(e),i=P(e,!0),o=ee(e);return{kind:Ie.a.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:pe(e,t)}}function ee(e){return de(e,Ee.a.BRACE_L)?be(e,Ee.a.BRACE_L,H,Ee.a.BRACE_R):[]}function te(e){var t=e.lookahead();if(t.kind===Ee.a.NAME)switch(t.value){case"scalar":return ne(e);case"type":return re(e);case"interface":return ie(e);case"union":return oe(e);case"enum":return ae(e);case"input":return se(e)}throw ge(e,t)}function ne(e){var t=e.token;ye(e,"extend"),ye(e,"scalar");var n=a(e),r=P(e,!0);if(0===r.length)throw ge(e);return{kind:Ie.a.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:pe(e,t)}}function re(e){var t=e.token;ye(e,"extend"),ye(e,"type");var n=a(e),r=V(e),i=P(e,!0),o=z(e);if(0===r.length&&0===i.length&&0===o.length)throw ge(e);return{kind:Ie.a.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:pe(e,t)}}function ie(e){var t=e.token;ye(e,"extend"),ye(e,"interface");var n=a(e),r=P(e,!0),i=z(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.a.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:pe(e,t)}}function oe(e){var t=e.token;ye(e,"extend"),ye(e,"union");var n=a(e),r=P(e,!0),i=Y(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.a.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:pe(e,t)}}function ae(e){var t=e.token;ye(e,"extend"),ye(e,"enum");var n=a(e),r=P(e,!0),i=Q(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.a.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:pe(e,t)}}function se(e){var t=e.token;ye(e,"extend"),ye(e,"input");var n=a(e),r=P(e,!0),i=ee(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.a.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:pe(e,t)}}function ue(e){var t=e.token,n=U(e);ye(e,"directive"),me(e,Ee.a.AT);var r=a(e),i=G(e);ye(e,"on");var o=ce(e);return{kind:Ie.a.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:pe(e,t)}}function ce(e){he(e,Ee.a.PIPE);var t=[];do{t.push(le(e))}while(he(e,Ee.a.PIPE));return t}function le(e){var t=e.token,n=a(e);if(we.a.hasOwnProperty(n.value))return n;throw ge(e,t)}function pe(e,t){if(!e.options.noLocation)return new fe(t,e.lastToken,e.source)}function fe(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function de(e,t){return e.token.kind===t}function he(e,t){var n=e.token.kind===t;return n&&e.advance(),n}function me(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw Object(Se.e)(e.source,n.start,"Expected "+t+", found "+Object(Ee.c)(n))}function ye(e,t){var n=e.token;if(n.kind===Ee.a.NAME&&n.value===t)return e.advance(),n;throw Object(Se.e)(e.source,n.start,'Expected "'+t+'", found '+Object(Ee.c)(n))}function ge(e,t){var n=t||e.token;return Object(Se.e)(e.source,n.start,"Unexpected "+Object(Ee.c)(n))}function ve(e,t,n,r){me(e,t);for(var i=[];!he(e,r);)i.push(n(e));return i}function be(e,t,n,r){me(e,t);for(var i=[n(e)];!he(e,r);)i.push(n(e));return i}t.a=r,t.c=i,t.b=o;var _e=n(118),Se=n(2),Ee=n(63),Ie=n(5),we=n(26);fe.prototype.toJSON=fe.prototype.inspect=function(){return{start:this.start,end:this.end}}},function(e,t,n){"use strict";function r(e,t){for(var n=Object.create(null),r=t.length,o=e.length/2,a=0;a<r;a++){var s=i(e,t[a]);s<=Math.max(o,t[a].length/2,1)&&(n[t[a]]=s)}return Object.keys(n).sort(function(e,t){return n[e]-n[t]})}function i(e,t){if(e===t)return 0;var n=void 0,r=void 0,i=[],o=e.toLowerCase(),a=t.toLowerCase(),s=o.length,u=a.length;if(o===a)return 1;for(n=0;n<=s;n++)i[n]=[n];for(r=1;r<=u;r++)i[0][r]=r;for(n=1;n<=s;n++)for(r=1;r<=u;r++){var c=o[n-1]===a[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+c),n>1&&r>1&&o[n-1]===a[r-2]&&o[n-2]===a[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+c))}return i[s][u]}t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(171);t.AWS=r},function(e,t,n){function r(e){e.httpRequest.method=e.service.api.operations[e.operation].httpMethod}function i(e,t,n,r){var i=[e,t].join("/");i=i.replace(/\/+/g,"/");var o={},a=!1;if(l.each(n.members,function(e,t){var n=r[e];if(null!==n&&void 0!==n)if("uri"===t.location){var s=new RegExp("\\{"+t.name+"(\\+)?\\}");i=i.replace(s,function(e,t){return(t?l.uriEscapePath:l.uriEscape)(String(n))})}else"querystring"===t.location&&(a=!0,"list"===t.type?o[t.name]=n.map(function(e){return l.uriEscape(t.member.toWireFormat(e).toString())}):"map"===t.type?l.each(n,function(e,t){Array.isArray(t)?o[e]=t.map(function(e){return l.uriEscape(String(e))}):o[e]=l.uriEscape(String(t))}):o[t.name]=l.uriEscape(t.toWireFormat(n).toString()))}),a){i+=i.indexOf("?")>=0?"&":"?";var s=[];l.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t<o[e].length;t++)s.push(l.uriEscape(String(e))+"="+o[e][t])}),i+=s.join("&")}return i}function o(e){var t=e.service.api.operations[e.operation],n=t.input,r=i(e.httpRequest.endpoint.path,t.httpPath,n,e.params);e.httpRequest.path=r}function a(e){var t=e.service.api.operations[e.operation];l.each(t.input.members,function(t,n){var r=e.params[t];null!==r&&void 0!==r&&("headers"===n.location&&"map"===n.type?l.each(r,function(t,r){e.httpRequest.headers[n.name+t]=r}):"header"===n.location&&(r=n.toWireFormat(r).toString(),n.isJsonValue&&(r=l.base64.encode(r)),e.httpRequest.headers[n.name]=r))})}function s(e){r(e),o(e),a(e),p(e)}function u(){}function c(e){var t=e.request,n={},r=e.httpResponse,i=t.service.api.operations[t.operation],o=i.output,a={};l.each(r.headers,function(e,t){a[e.toLowerCase()]=t}),l.each(o.members,function(e,t){var i=(t.name||e).toLowerCase();if("headers"===t.location&&"map"===t.type){n[e]={};var o=t.isLocationName?t.name:"",s=new RegExp("^"+o+"(.+)","i");l.each(r.headers,function(t,r){var i=t.match(s);null!==i&&(n[e][i[1]]=r)})}else if("header"===t.location){if(void 0!==a[i]){var u=t.isJsonValue?l.base64.decode(a[i]):a[i];n[e]=t.toType(u)}}else"statusCode"===t.location&&(n[e]=parseInt(r.statusCode,10))}),e.data=n}var l=n(4),p=n(53).populateHostPrefix;e.exports={buildRequest:s,extractError:u,extractData:c,generateURI:i}},function(e,t,n){function r(e){return"string"==typeof e?0===e.length:0===e.byteLength}function i(e){return"string"==typeof e&&(e=new o(e,"utf8")),ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var o=n(17).Buffer;"undefined"!=typeof ArrayBuffer&&void 0===ArrayBuffer.isView&&(ArrayBuffer.isView=function(e){return a.indexOf(Object.prototype.toString.call(e))>-1});var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object DataView]"];e.exports={isEmptyData:r,convertToBuffer:i}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=new r.ConsoleLogger("Amplify"),o=function(){function e(){}return e.register=function(t){i.debug("component registered in amplify",t),this._components.push(t),"function"==typeof t.getModuleName?e[t.getModuleName()]=t:i.debug("no getModuleName method for component",t)},e.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),i.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.Logger=r.ConsoleLogger,e.ServiceWorker=null,e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(260);t.BrowserStorageCache=i.default;var o=n(263);t.InMemoryCache=o.default,t.default=i.default,r.default.register(i.default)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(Object(D.b)(e)||Object(M.a)(0,"Expected "+String(e)+" to be a GraphQL schema."),e.__validationErrors)return e.__validationErrors;var t=new F(e);a(t),u(t),l(t);var n=t.getErrors();return e.__validationErrors=n,n}function o(e){var t=i(e);if(0!==t.length)throw new Error(t.map(function(e){return e.message}).join("\n\n"))}function a(e){var t=e.schema,n=t.getQueryType();n?Object(P.K)(n)||e.reportError("Query root type must be Object type, it cannot be "+String(n)+".",s(t,n,"query")):e.reportError("Query root type must be provided.",t.astNode);var r=t.getMutationType();r&&!Object(P.K)(r)&&e.reportError("Mutation root type must be Object type if provided, it cannot be "+String(r)+".",s(t,r,"mutation"));var i=t.getSubscriptionType();i&&!Object(P.K)(i)&&e.reportError("Subscription root type must be Object type if provided, it cannot be "+String(i)+".",s(t,i,"subscription"))}function s(e,t,n){var r=e.astNode,i=r&&r.operationTypes.find(function(e){return e.operation===n});return i?i.type:t&&t.astNode}function u(e){e.schema.getDirectives().forEach(function(t){if(!Object(R.f)(t))return void e.reportError("Expected directive but got: "+String(t)+".",t&&t.astNode);c(e,t);var n=Object.create(null);t.args.forEach(function(r){var i=r.name;if(c(e,r),n[i])return void e.reportError("Argument @"+t.name+"("+i+":) can only be defined once.",N(t,i));n[i]=!0,Object(P.D)(r.type)||e.reportError("The type of @"+t.name+"("+i+":) must be Input Type but got: "+String(r.type)+".",A(t,i))})})}function c(e,t){if(!e.schema.__allowedLegacyNames||-1===e.schema.__allowedLegacyNames.indexOf(t.name)){var n=Object(q.b)(t.name,t.astNode||void 0);n&&e.addError(n)}}function l(e){var t=e.schema.getTypeMap();Object(U.a)(t).forEach(function(t){if(!Object(P.H)(t))return void e.reportError("Expected GraphQL named type but got: "+String(t)+".",t&&t.astNode);Object(x.n)(t)||c(e,t),Object(P.K)(t)?(p(e,t),f(e,t)):Object(P.E)(t)?p(e,t):Object(P.O)(t)?h(e,t):Object(P.B)(t)?m(e,t):Object(P.C)(t)&&y(e,t)})}function p(e,t){var n=Object(U.a)(t.getFields());0===n.length&&e.reportError("Type "+t.name+" must define one or more fields.",v(t)),n.forEach(function(n){c(e,n);var r=E(t,n.name);if(r.length>1)return void e.reportError("Field "+t.name+"."+n.name+" can only be defined once.",r);Object(P.L)(n.type)||e.reportError("The type of "+t.name+"."+n.name+" must be Output Type but got: "+String(n.type)+".",I(t,n.name));var i=Object.create(null);n.args.forEach(function(r){var o=r.name;c(e,r),i[o]&&e.reportError("Field argument "+t.name+"."+n.name+"("+o+":) can only be defined once.",C(t,n.name,o)),i[o]=!0,Object(P.D)(r.type)||e.reportError("The type of "+t.name+"."+n.name+"("+o+":) must be Input Type but got: "+String(r.type)+".",T(t,n.name,o))})})}function f(e,t){var n=Object.create(null);t.getInterfaces().forEach(function(r){if(n[r.name])return void e.reportError("Type "+t.name+" can only implement "+r.name+" once.",_(t,r));n[r.name]=!0,d(e,t,r)})}function d(e,t,n){if(!Object(P.E)(n))return void e.reportError("Type "+String(t)+" must only implement Interface types, it cannot implement "+String(n)+".",b(t,n));var r=t.getFields(),i=n.getFields();Object.keys(i).forEach(function(o){var a=r[o],s=i[o];if(!a)return void e.reportError("Interface field "+n.name+"."+o+" expected but "+t.name+" does not provide it.",[S(n,o),t.astNode]);Object(B.c)(e.schema,a.type,s.type)||e.reportError("Interface field "+n.name+"."+o+" expects type "+String(s.type)+" but "+t.name+"."+o+" is type "+String(a.type)+".",[I(n,o),I(t,o)]),s.args.forEach(function(r){var i=r.name,s=Object(j.a)(a.args,function(e){return e.name===i});if(!s)return void e.reportError("Interface field argument "+n.name+"."+o+"("+i+":) expected but "+t.name+"."+o+" does not provide it.",[w(n,o,i),S(t,o)]);Object(B.b)(r.type,s.type)||e.reportError("Interface field argument "+n.name+"."+o+"("+i+":) expects type "+String(r.type)+" but "+t.name+"."+o+"("+i+":) is type "+String(s.type)+".",[T(n,o,i),T(t,o,i)])}),a.args.forEach(function(r){var i=r.name;!Object(j.a)(s.args,function(e){return e.name===i})&&Object(P.I)(r.type)&&e.reportError("Object field argument "+t.name+"."+o+"("+i+":) is of required type "+String(r.type)+" but is not also provided by the Interface field "+n.name+"."+o+".",[T(t,o,i),S(n,o)])})})}function h(e,t){var n=t.getTypes();0===n.length&&e.reportError("Union type "+t.name+" must define one or more member types.",t.astNode);var r=Object.create(null);n.forEach(function(n){if(r[n.name])return void e.reportError("Union type "+t.name+" can only include type "+n.name+" once.",k(t,n.name));r[n.name]=!0,Object(P.K)(n)||e.reportError("Union type "+t.name+" can only include Object types, it cannot include "+String(n)+".",k(t,String(n)))})}function m(e,t){var n=t.getValues();0===n.length&&e.reportError("Enum type "+t.name+" must define one or more values.",t.astNode),n.forEach(function(n){var r=n.name,i=O(t,r);i&&i.length>1&&e.reportError("Enum type "+t.name+" can include value "+r+" only once.",i),c(e,n),"true"!==r&&"false"!==r&&"null"!==r||e.reportError("Enum type "+t.name+" cannot include value: "+r+".",n.astNode)})}function y(e,t){var n=Object(U.a)(t.getFields());0===n.length&&e.reportError("Input Object type "+t.name+" must define one or more fields.",t.astNode),n.forEach(function(n){c(e,n),Object(P.D)(n.type)||e.reportError("The type of "+t.name+"."+n.name+" must be Input Type but got: "+String(n.type)+".",n.astNode&&n.astNode.type)})}function g(e){return e.astNode?e.extensionASTNodes?[e.astNode].concat(e.extensionASTNodes):[e.astNode]:e.extensionASTNodes||[]}function v(e){return e.astNode?e.extensionASTNodes?[e.astNode].concat(e.extensionASTNodes):[e.astNode]:e.extensionASTNodes||[]}function b(e,t){return _(e,t)[0]}function _(e,t){for(var n=[],r=g(e),i=0;i<r.length;i++){var o=r[i];o&&o.interfaces&&o.interfaces.forEach(function(e){e.name.value===t.name&&n.push(e)})}return n}function S(e,t){return E(e,t)[0]}function E(e,t){for(var n=[],r=v(e),i=0;i<r.length;i++){var o=r[i];o&&o.fields&&o.fields.forEach(function(e){e.name.value===t&&n.push(e)})}return n}function I(e,t){var n=S(e,t);return n&&n.type}function w(e,t,n){return C(e,t,n)[0]}function C(e,t,n){var r=[],i=S(e,t);return i&&i.arguments&&i.arguments.forEach(function(e){e.name.value===n&&r.push(e)}),r}function T(e,t,n){var r=w(e,t,n);return r&&r.type}function N(e,t){var n=[],r=e.astNode;return r&&r.arguments&&r.arguments.forEach(function(e){e.name.value===t&&n.push(e)}),n}function A(e,t){var n=N(e,t)[0];return n&&n.type}function k(e,t){return e.astNode&&e.astNode.types&&e.astNode.types.filter(function(e){return e.name.value===t})}function O(e,t){return e.astNode&&e.astNode.values&&e.astNode.values.filter(function(e){return e.name.value===t})}t.b=i,t.a=o;var P=n(3),R=n(13),x=n(15),D=n(7),j=n(28),M=n(9),U=n(24),L=n(20),q=n(117),B=n(45),F=function(){function e(t){r(this,e),this._errors=[],this.schema=t}return e.prototype.reportError=function(e,t){var n=(Array.isArray(t)?t:[t]).filter(Boolean);this.addError(new L.a(e,n))},e.prototype.addError=function(e){this._errors.push(e)},e.prototype.getErrors=function(){return this._errors},e}()},function(e,t,n){"use strict";function r(e,t,n){return e.reduce(function(e,r){return e[t(r)]=n(r),e},Object.create(null))}t.a=r},function(e,t,n){"use strict";function r(e){return null===e||void 0===e||e!==e}t.a=r},function(e,t,n){"use strict";function r(e,t){return e===t||(Object(a.I)(e)&&Object(a.I)(t)?r(e.ofType,t.ofType):!(!Object(a.G)(e)||!Object(a.G)(t))&&r(e.ofType,t.ofType))}function i(e,t,n){return t===n||(Object(a.I)(n)?!!Object(a.I)(t)&&i(e,t.ofType,n.ofType):Object(a.I)(t)?i(e,t.ofType,n):Object(a.G)(n)?!!Object(a.G)(t)&&i(e,t.ofType,n.ofType):!Object(a.G)(t)&&!!(Object(a.z)(n)&&Object(a.K)(t)&&e.isPossibleType(n,t)))}function o(e,t,n){var r=n;return t===r||(Object(a.z)(t)?Object(a.z)(r)?e.getPossibleTypes(t).some(function(t){return e.isPossibleType(r,t)}):e.isPossibleType(t,r):!!Object(a.z)(r)&&e.isPossibleType(r,t))}t.b=r,t.c=i,t.a=o;var a=n(3)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n){var r=n.name.value;return r===s.a.name&&e.getQueryType()===t?s.a:r===s.c.name&&e.getQueryType()===t?s.c:r===s.d.name&&Object(a.A)(t)?s.d:Object(a.K)(t)||Object(a.E)(t)?t.getFields()[r]:void 0}n.d(t,"a",function(){return l});var o=n(5),a=n(3),s=n(15),u=n(16),c=n(28),l=function(){function e(t,n,o){r(this,e),this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n||i,o&&(Object(a.D)(o)&&this._inputTypeStack.push(o),Object(a.A)(o)&&this._parentTypeStack.push(o),Object(a.L)(o)&&this._typeStack.push(o))}return e.prototype.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},e.prototype.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},e.prototype.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},e.prototype.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},e.prototype.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},e.prototype.getDirective=function(){return this._directive},e.prototype.getArgument=function(){return this._argument},e.prototype.getEnumValue=function(){return this._enumValue},e.prototype.enter=function(e){var t=this._schema;switch(e.kind){case o.a.SELECTION_SET:var n=Object(a.x)(this.getType());this._parentTypeStack.push(Object(a.A)(n)?n:void 0);break;case o.a.FIELD:var r=this.getParentType(),i=void 0,s=void 0;r&&(i=this._getFieldDef(t,r,e))&&(s=i.type),this._fieldDefStack.push(i),this._typeStack.push(Object(a.L)(s)?s:void 0);break;case o.a.DIRECTIVE:this._directive=t.getDirective(e.name.value);break;case o.a.OPERATION_DEFINITION:var l=void 0;"query"===e.operation?l=t.getQueryType():"mutation"===e.operation?l=t.getMutationType():"subscription"===e.operation&&(l=t.getSubscriptionType()),this._typeStack.push(Object(a.K)(l)?l:void 0);break;case o.a.INLINE_FRAGMENT:case o.a.FRAGMENT_DEFINITION:var p=e.typeCondition,f=p?Object(u.a)(t,p):Object(a.x)(this.getType());this._typeStack.push(Object(a.L)(f)?f:void 0);break;case o.a.VARIABLE_DEFINITION:var d=Object(u.a)(t,e.type);this._inputTypeStack.push(Object(a.D)(d)?d:void 0);break;case o.a.ARGUMENT:var h=void 0,m=void 0,y=this.getDirective()||this.getFieldDef();y&&(h=Object(c.a)(y.args,function(t){return t.name===e.name.value}))&&(m=h.type),this._argument=h,this._inputTypeStack.push(Object(a.D)(m)?m:void 0);break;case o.a.LIST:var g=Object(a.y)(this.getInputType()),v=Object(a.G)(g)?g.ofType:g;this._inputTypeStack.push(Object(a.D)(v)?v:void 0);break;case o.a.OBJECT_FIELD:var b=Object(a.x)(this.getInputType()),_=void 0;if(Object(a.C)(b)){var S=b.getFields()[e.name.value];S&&(_=S.type)}this._inputTypeStack.push(Object(a.D)(_)?_:void 0);break;case o.a.ENUM:var E=Object(a.x)(this.getInputType()),I=void 0;Object(a.B)(E)&&(I=E.getValue(e.value)),this._enumValue=I}},e.prototype.leave=function(e){switch(e.kind){case o.a.SELECTION_SET:this._parentTypeStack.pop();break;case o.a.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case o.a.DIRECTIVE:this._directive=null;break;case o.a.OPERATION_DEFINITION:case o.a.INLINE_FRAGMENT:case o.a.FRAGMENT_DEFINITION:this._typeStack.pop();break;case o.a.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case o.a.ARGUMENT:this._argument=null,this._inputTypeStack.pop();break;case o.a.LIST:case o.a.OBJECT_FIELD:this._inputTypeStack.pop();break;case o.a.ENUM:this._enumValue=null}},e}()},function(e,t,n){"use strict";function r(e,t,n,r,o,a,s){return 1===arguments.length?i(e.schema,e.document,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver):i(e,t,n,r,o,a,s)}function i(e,t,n,r,i,a,s){u(e,t,i);var p=c(e,t,n,r,i,a,s);return Array.isArray(p)?{errors:p}:o(p,l(p,p.operation,n))}function o(e,t){var n=Object(U.a)(t);return n?n.then(function(t){return o(e,t)}):0===e.errors.length?{data:t}:{errors:e.errors,data:t}}function a(e){for(var t=[],n=e;n;)t.push(n.key),n=n.prev;return t.reverse()}function s(e,t){return{prev:e,key:t}}function u(e,t,n){t||Object(L.a)(0,"Must provide document"),Object(X.a)(e),n&&"object"!==(void 0===n?"undefined":Q(n))&&Object(L.a)(0,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function c(e,t,n,r,i,o,a){for(var s=[],u=void 0,c=!1,l=Object.create(null),p=0;p<t.definitions.length;p++){var f=t.definitions[p];switch(f.kind){case G.a.OPERATION_DEFINITION:!o&&u?c=!0:(!o||f.name&&f.name.value===o)&&(u=f);break;case G.a.FRAGMENT_DEFINITION:l[f.name.value]=f}}u?c&&s.push(new M.a("Must provide operation name if query contains multiple operations.")):o?s.push(new M.a('Unknown operation named "'+o+'".')):s.push(new M.a("Must provide an operation."));var d=void 0;if(u){var h=Object(H.c)(e,u.variableDefinitions||[],i||{});h.errors?s.push.apply(s,h.errors):d=h.coerced}return 0!==s.length?s:(u||Object(L.a)(0,"Has operation if no errors."),d||Object(L.a)(0,"Has variables if no errors."),{schema:e,fragments:l,rootValue:n,contextValue:r,operation:u,variableValues:d,fieldResolver:a||Z,errors:s})}function l(e,t,n){var r=p(e.schema,t),i=h(e,r,t.selectionSet,Object.create(null),Object.create(null));try{var o="mutation"===t.operation?f(e,r,n,void 0,i):d(e,r,n,void 0,i),a=Object(U.a)(o);return a?a.then(void 0,function(t){return e.errors.push(t),Promise.resolve(null)}):o}catch(t){return e.errors.push(t),null}}function p(e,t){switch(t.operation){case"query":var n=e.getQueryType();if(!n)throw new M.a("Schema does not define the required query root type.",[t]);return n;case"mutation":var r=e.getMutationType();if(!r)throw new M.a("Schema is not configured for mutations.",[t]);return r;case"subscription":var i=e.getSubscriptionType();if(!i)throw new M.a("Schema is not configured for subscriptions.",[t]);return i;default:throw new M.a("Can only execute queries, mutations and subscriptions.",[t])}}function f(e,t,n,r,i){return Object(z.a)(Object.keys(i),function(o,a){var u=i[a],c=s(r,a),l=v(e,t,n,u,c);if(void 0===l)return o;var p=Object(U.a)(l);return p?p.then(function(e){return o[a]=e,o}):(o[a]=l,o)},Object.create(null))}function d(e,t,n,r,i){var o=!1,a=Object.keys(i).reduce(function(a,u){var c=i[u],l=s(r,u),p=v(e,t,n,c,l);return void 0===p?a:(a[u]=p,Object(U.a)(p)&&(o=!0),a)},Object.create(null));return o?Object(V.a)(a):a}function h(e,t,n,r,i){for(var o=0;o<n.selections.length;o++){var a=n.selections[o];switch(a.kind){case G.a.FIELD:if(!m(e,a))continue;var s=g(a);r[s]||(r[s]=[]),r[s].push(a);break;case G.a.INLINE_FRAGMENT:if(!m(e,a)||!y(e,a,t))continue;h(e,t,a.selectionSet,r,i);break;case G.a.FRAGMENT_SPREAD:var u=a.name.value;if(i[u]||!m(e,a))continue;i[u]=!0;var c=e.fragments[u];if(!c||!y(e,c,t))continue;h(e,t,c.selectionSet,r,i)}}return r}function m(e,t){var n=Object(H.b)(Y.e,t,e.variableValues);if(n&&!0===n.if)return!1;var r=Object(H.b)(Y.d,t,e.variableValues);return!r||!1!==r.if}function y(e,t,n){var r=t.typeCondition;if(!r)return!0;var i=Object(K.a)(e.schema,r);return i===n||!!Object(W.z)(i)&&e.schema.isPossibleType(i,n)}function g(e){return e.alias?e.alias.value:e.name.value}function v(e,t,n,r,i){var o=r[0],a=o.name.value,s=D(e.schema,t,a);if(s){var u=s.resolve||e.fieldResolver,c=b(e,s,r,t,i),l=_(e,s,r,u,n,c);return E(e,s.type,r,c,i,l)}}function b(e,t,n,r,i){return{fieldName:n[0].name.value,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function _(e,t,n,r,i,o){try{var a=Object(H.a)(t,n[0],e.variableValues),s=e.contextValue,u=r(i,a,s,o),c=Object(U.a)(u);return c?c.then(void 0,S):u}catch(e){return S(e)}}function S(e){return e instanceof Error?e:new Error(e||void 0)}function E(e,t,n,r,i,o){if(Object(W.I)(t))return I(e,t,n,r,i,o);try{var a=I(e,t,n,r,i,o),s=Object(U.a)(a);return s?s.then(void 0,function(t){return e.errors.push(t),Promise.resolve(null)}):a}catch(t){return e.errors.push(t),null}}function I(e,t,n,r,i,o){try{var s=w(e,t,n,r,i,o),u=Object(U.a)(s);return u?u.then(void 0,function(e){return Promise.reject(Object(M.c)(S(e),n,a(i)))}):s}catch(e){throw Object(M.c)(S(e),n,a(i))}}function w(e,t,n,r,i,o){var a=Object(U.a)(o);if(a)return a.then(function(o){return w(e,t,n,r,i,o)});if(o instanceof Error)throw o;if(Object(W.I)(t)){var s=w(e,t.ofType,n,r,i,o);if(null===s)throw new Error("Cannot return null for non-nullable field "+r.parentType.name+"."+r.fieldName+".");return s}if(Object(B.a)(o))return null;if(Object(W.G)(t))return C(e,t,n,r,i,o);if(Object(W.F)(t))return T(t,o);if(Object(W.z)(t))return N(e,t,n,r,i,o);if(Object(W.K)(t))return k(e,t,n,r,i,o);throw new Error('Cannot complete value of unexpected type "'+String(t)+'".')}function C(e,t,n,r,i,o){Object(j.isCollection)(o)||Object(L.a)(0,"Expected Iterable, but did not find one for field "+r.parentType.name+"."+r.fieldName+".");var a=t.ofType,u=!1,c=[];return Object(j.forEach)(o,function(t,o){var l=s(i,o),p=E(e,a,n,r,l,t);!u&&Object(U.a)(p)&&(u=!0),c.push(p)}),u?Promise.all(c):c}function T(e,t){e.serialize||Object(L.a)(0,"Missing serialize method on type");var n=e.serialize(t);if(Object(q.a)(n))throw new Error('Expected a value of type "'+String(e)+'" but received: '+String(t));return n}function N(e,t,n,r,i,o){var a=t.resolveType?t.resolveType(o,e.contextValue,r):x(o,e.contextValue,r,t),s=Object(U.a)(a);return s?s.then(function(a){return k(e,A(a,e,t,n,r,o),n,r,i,o)}):k(e,A(a,e,t,n,r,o),n,r,i,o)}function A(e,t,n,r,i,o){var a="string"==typeof e?t.schema.getType(e):e;if(!Object(W.K)(a))throw new M.a("Abstract type "+n.name+" must resolve to an Object type at runtime for field "+i.parentType.name+"."+i.fieldName+' with value "'+String(o)+'", received "'+String(a)+'". Either the '+n.name+' type should provide a "resolveType" function or each possible types should provide an "isTypeOf" function.',r);if(!t.schema.isPossibleType(n,a))throw new M.a('Runtime Object type "'+a.name+'" is not a possible type for "'+n.name+'".',r);return a}function k(e,t,n,r,i,o){if(t.isTypeOf){var a=t.isTypeOf(o,e.contextValue,r),s=Object(U.a)(a);if(s)return s.then(function(a){if(!a)throw O(t,o,n);return P(e,t,n,r,i,o)});if(!a)throw O(t,o,n)}return P(e,t,n,r,i,o)}function O(e,t,n){return new M.a('Expected value of type "'+e.name+'" but got: '+String(t)+".",n)}function P(e,t,n,r,i,o){return d(e,t,o,i,$(e,t,n))}function R(e,t,n){for(var r=Object.create(null),i=Object.create(null),o=0;o<n.length;o++){var a=n[o].selectionSet;a&&(r=h(e,t,a,r,i))}return r}function x(e,t,n,r){if(null!==e&&"object"===(void 0===e?"undefined":Q(e))&&"string"==typeof e.__typename)return e.__typename;for(var i=n.schema.getPossibleTypes(r),o=[],a=0;a<i.length;a++){var s=i[a];if(s.isTypeOf){var u=s.isTypeOf(e,t,n),c=Object(U.a)(u);if(c)o[a]=c;else if(u)return s}}return o.length?Promise.all(o).then(function(e){for(var t=0;t<e.length;t++)if(e[t])return i[t]}):void 0}function D(e,t,n){return n===J.a.name&&e.getQueryType()===t?J.a:n===J.c.name&&e.getQueryType()===t?J.c:n===J.d.name?J.d:t.getFields()[n]}t.g=r,t.k=a,t.a=s,t.b=u,t.c=c,t.i=p,t.e=h,t.d=b,t.j=_,n.d(t,"f",function(){return Z}),t.h=D;var j=n(33),M=(n.n(j),n(2)),U=n(147),L=n(9),q=n(11),B=n(44),F=n(317),V=n(318),z=n(319),K=n(16),G=n(5),H=n(68),W=n(3),J=(n(7),n(15)),Y=n(13),X=n(42),Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=Object(F.a)(R),Z=function(e,t,n,r){if("object"===(void 0===e?"undefined":Q(e))||"function"==typeof e){var i=e[r.fieldName];return"function"==typeof i?e[r.fieldName](t,n,r):i}}},function(e,t,n){"use strict";function r(e,t,n){if(e){if(Object(c.I)(t)){if(e.kind===u.a.NULL)return;return r(e,t.ofType,n)}if(e.kind===u.a.NULL)return null;if(e.kind===u.a.VARIABLE){var l=e.name.value;if(!n||Object(a.a)(n[l]))return;return n[l]}if(Object(c.G)(t)){var p=t.ofType;if(e.kind===u.a.LIST){for(var f=[],d=e.values,h=0;h<d.length;h++)if(i(d[h],n)){if(Object(c.I)(p))return;f.push(null)}else{var m=r(d[h],p,n);if(Object(a.a)(m))return;f.push(m)}return f}var y=r(e,p,n);if(Object(a.a)(y))return;return[y]}if(Object(c.C)(t)){if(e.kind!==u.a.OBJECT)return;for(var g=Object.create(null),v=Object(o.a)(e.fields,function(e){return e.name.value}),b=Object(s.a)(t.getFields()),_=0;_<b.length;_++){var S=b[_],E=v[S.name];if(E&&!i(E.value,n)){var I=r(E.value,S.type,n);if(Object(a.a)(I))return;g[S.name]=I}else if(Object(a.a)(S.defaultValue)){if(Object(c.I)(S.type))return}else g[S.name]=S.defaultValue}return g}if(Object(c.B)(t)){if(e.kind!==u.a.ENUM)return;var w=t.getValue(e.value);if(!w)return;return w.value}if(Object(c.M)(t)){var C=void 0;try{C=t.parseLiteral(e,n)}catch(e){return}if(Object(a.a)(C))return;return C}throw new Error("Unknown type: "+t+".")}}function i(e,t){return e.kind===u.a.VARIABLE&&(!t||Object(a.a)(t[e.name.value]))}t.a=r;var o=n(21),a=n(11),s=n(24),u=n(5),c=n(3)},function(e,t,n){e.exports=n(351).Observable},function(e,t,n){function r(e){var t=e.httpRequest,n=e.service.api,r=n.targetPrefix+"."+n.operations[e.operation].name,i=n.jsonVersion||"1.0",o=n.operations[e.operation].input,a=new s;1===i&&(i="1.0"),t.body=a.build(e.params||{},o),t.headers["Content-Type"]="application/x-amz-json-"+i,t.headers["X-Amz-Target"]=r,c(e)}function i(e){var t={},n=e.httpResponse;if(t.code=n.headers["x-amzn-errortype"]||"UnknownError","string"==typeof t.code&&(t.code=t.code.split(":")[0]),n.body.length>0)try{var r=JSON.parse(n.body.toString());(r.__type||r.code)&&(t.code=(r.__type||r.code).split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=r.message||r.Message||null}catch(r){t.statusCode=n.statusCode,t.message=n.statusMessage}else t.statusCode=n.statusCode,t.message=n.statusCode.toString();e.error=a.error(new Error,t)}function o(e){var t=e.httpResponse.body.toString()||"{}";if(!1===e.request.service.config.convertResponseTypes)e.data=JSON.parse(t);else{var n=e.request.service.api.operations[e.request.operation],r=n.output||{},i=new u;e.data=i.parse(t,r)}}var a=n(4),s=n(51),u=n(52),c=n(53).populateHostPrefix;e.exports={buildRequest:r,extractError:i,extractData:o}},function(e,t,n){function r(){}function i(e,t){if(t&&void 0!==e&&null!==e)switch(t.type){case"structure":return o(e,t);case"map":return s(e,t);case"list":return a(e,t);default:return u(e,t)}}function o(e,t){var n={};return c.each(e,function(e,r){var o=t.members[e];if(o){if("body"!==o.location)return;var a=o.isLocationName?o.name:e,s=i(r,o);void 0!==s&&(n[a]=s)}}),n}function a(e,t){var n=[];return c.arrayEach(e,function(e){var r=i(e,t.member);void 0!==r&&n.push(r)}),n}function s(e,t){var n={};return c.each(e,function(e,r){var o=i(r,t.value);void 0!==o&&(n[e]=o)}),n}function u(e,t){return t.toWireFormat(e)}var c=n(4);r.prototype.build=function(e,t){return JSON.stringify(i(e,t))},e.exports=r},function(e,t,n){function r(){}function i(e,t){if(t&&void 0!==e)switch(t.type){case"structure":return o(e,t);case"map":return s(e,t);case"list":return a(e,t);default:return u(e,t)}}function o(e,t){if(null!=e){var n={},r=t.members;return c.each(r,function(t,r){var o=r.isLocationName?r.name:t;if(Object.prototype.hasOwnProperty.call(e,o)){var a=e[o],s=i(a,r);void 0!==s&&(n[t]=s)}}),n}}function a(e,t){if(null!=e){var n=[];return c.arrayEach(e,function(e){var r=i(e,t.member);void 0===r?n.push(null):n.push(r)}),n}}function s(e,t){if(null!=e){var n={};return c.each(e,function(e,r){var o=i(r,t.value);n[e]=void 0===o?null:o}),n}}function u(e,t){return t.toType(e)}var c=n(4);r.prototype.parse=function(e,t){return i(JSON.parse(e),t)},e.exports=r},function(e,t,n){function r(e){if(!e.service.config.hostPrefixEnabled)return e;var t=e.service.api.operations[e.operation];if(i(e))return e;if(t.endpoint&&t.endpoint.hostPrefix){var n=t.endpoint.hostPrefix,r=o(n,e.params,t.input);a(e.httpRequest.endpoint,r),s(e.httpRequest.endpoint.hostname)}return e}function i(e){var t=e.service.api,n=t.operations[e.operation],r=t.endpointOperation&&t.endpointOperation===u.string.lowerFirst(n.name);return"NULL"!==n.endpointDiscoveryRequired||!0===r}function o(e,t,n){return u.each(n.members,function(n,r){if(!0===r.hostLabel){if("string"!=typeof t[n]||""===t[n])throw u.error(new Error,{message:"Parameter "+n+" should be a non-empty string.",code:"InvalidParameter"});var i=new RegExp("\\{"+n+"\\}","g");e=e.replace(i,t[n])}}),e}function a(e,t){e.host&&(e.host=t+e.host),e.hostname&&(e.hostname=t+e.hostname)}function s(e){var t=e.split("."),n=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/;u.arrayEach(t,function(e){if(!e.length||e.length<1||e.length>63)throw u.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!n.test(e))throw c.util.error(new Error,{code:"ValidationError",message:e+" is not hostname compatible."})})}var u=n(4),c=n(0);e.exports={populateHostPrefix:r}},function(e,t,n){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e,i){if(e===i)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(i))return!1;if(!0===t(e)){if(e.length!==i.length)return!1;for(var o=0;o<e.length;o++)if(!1===r(e[o],i[o]))return!1;return!0}if(!0===n(e)){var a={};for(var s in e)if(hasOwnProperty.call(e,s)){if(!1===r(e[s],i[s]))return!1;a[s]=!0}for(var u in i)if(hasOwnProperty.call(i,u)&&!0!==a[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(n(e)){for(var r in e)if(e.hasOwnProperty(r))return!1;return!0}return!1}function o(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)n.push(e[t[r]]);return n}function a(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e}function s(e){return e>="0"&&e<="9"||"-"===e}function u(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e}function c(){}function l(){}function p(e){this.runtime=e}function f(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[g]}]},avg:{_func:this._functionAvg,_signature:[{types:[I]}]},ceil:{_func:this._functionCeil,_signature:[{types:[g]}]},contains:{_func:this._functionContains,_signature:[{types:[b,_]},{types:[v]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[b]},{types:[b]}]},floor:{_func:this._functionFloor,_signature:[{types:[g]}]},length:{_func:this._functionLength,_signature:[{types:[b,_,S]}]},map:{_func:this._functionMap,_signature:[{types:[E]},{types:[_]}]},max:{_func:this._functionMax,_signature:[{types:[I,w]}]},merge:{_func:this._functionMerge,_signature:[{types:[S],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[_]},{types:[E]}]},sum:{_func:this._functionSum,_signature:[{types:[I]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[b]},{types:[b]}]},min:{_func:this._functionMin,_signature:[{types:[I,w]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[_]},{types:[E]}]},type:{_func:this._functionType,_signature:[{types:[v]}]},keys:{_func:this._functionKeys,_signature:[{types:[S]}]},values:{_func:this._functionValues,_signature:[{types:[S]}]},sort:{_func:this._functionSort,_signature:[{types:[w,I]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[_]},{types:[E]}]},join:{_func:this._functionJoin,_signature:[{types:[b]},{types:[w]}]},reverse:{_func:this._functionReverse,_signature:[{types:[b,_]}]},to_array:{_func:this._functionToArray,_signature:[{types:[v]}]},to_string:{_func:this._functionToString,_signature:[{types:[v]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[v]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[v],variadic:!0}]}}}function d(e){return(new l).parse(e)}function h(e){return(new c).tokenize(e)}function m(e,t){var n=new l,r=new f,i=new p(r);r._interpreter=i;var o=n.parse(t);return i.search(o,e)}var y;y="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]};var g=0,v=1,b=2,_=3,S=4,E=6,I=8,w=9,C={".":"Dot","*":"Star",",":"Comma",":":"Colon","{":"Lbrace","}":"Rbrace","]":"Rbracket","(":"Lparen",")":"Rparen","@":"Current"},T={"<":!0,">":!0,"=":!0,"!":!0},N={" ":!0,"\t":!0,"\n":!0};c.prototype={tokenize:function(e){var t=[];this._current=0;for(var n,r,i;this._current<e.length;)if(a(e[this._current]))n=this._current,r=this._consumeUnquotedIdentifier(e),t.push({type:"UnquotedIdentifier",value:r,start:n});else if(void 0!==C[e[this._current]])t.push({type:C[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(s(e[this._current]))i=this._consumeNumber(e),t.push(i);else if("["===e[this._current])i=this._consumeLBracket(e),t.push(i);else if('"'===e[this._current])n=this._current,r=this._consumeQuotedIdentifier(e),t.push({type:"QuotedIdentifier",value:r,start:n});else if("'"===e[this._current])n=this._current,r=this._consumeRawStringLiteral(e),t.push({type:"Literal",value:r,start:n});else if("`"===e[this._current]){n=this._current;var o=this._consumeLiteral(e);t.push({type:"Literal",value:o,start:n})}else if(void 0!==T[e[this._current]])t.push(this._consumeOperator(e));else if(void 0!==N[e[this._current]])this._current++;else if("&"===e[this._current])n=this._current,this._current++,"&"===e[this._current]?(this._current++,t.push({type:"And",value:"&&",start:n})):t.push({type:"Expref",value:"&",start:n});else{if("|"!==e[this._current]){var u=new Error("Unknown character:"+e[this._current]);throw u.name="LexerError",u}n=this._current,this._current++,"|"===e[this._current]?(this._current++,t.push({type:"Or",value:"||",start:n})):t.push({type:"Pipe",value:"|",start:n})}return t},_consumeUnquotedIdentifier:function(e){var t=this._current;for(this._current++;this._current<e.length&&u(e[this._current]);)this._current++;return e.slice(t,this._current)},_consumeQuotedIdentifier:function(e){var t=this._current;this._current++;for(var n=e.length;'"'!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&'"'!==e[r+1]?r++:r+=2,this._current=r}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){var t=this._current;this._current++;for(var n=e.length;"'"!==e[this._current]&&this._current<n;){var r=this._current;"\\"!==e[r]||"\\"!==e[r+1]&&"'"!==e[r+1]?r++:r+=2,this._current=r}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){var t=this._current;this._current++;for(var n=e.length;s(e[this._current])&&this._current<n;)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,n=e[t];return this._current++,"!"===n?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===n?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===n?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t,n=this._current,r=e.length;"`"!==e[this._current]&&this._current<r;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}var o=y(e.slice(n,this._current));return o=o.replace("\\`","`"),t=this._looksLikeJSON(o)?JSON.parse(o):JSON.parse('"'+o+'"'),this._current++,t},_looksLikeJSON:function(e){var t='[{"',n=["true","false","null"],r="-0123456789";if(""===e)return!1;if(t.indexOf(e[0])>=0)return!0;if(n.indexOf(e)>=0)return!0;if(!(r.indexOf(e[0])>=0))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var A={};A.EOF=0,A.UnquotedIdentifier=0,A.QuotedIdentifier=0,A.Rbracket=0,A.Rparen=0,A.Comma=0,A.Rbrace=0,A.Number=0,A.Current=0,A.Expref=0,A.Pipe=1,A.Or=2,A.And=3,A.EQ=5,A.GT=5,A.LT=5,A.GTE=5,A.LTE=5,A.NE=5,A.Flatten=9,A.Star=20,A.Filter=21,A.Dot=40,A.Not=45,A.Lbrace=50,A.Lbracket=55,A.Lparen=60,l.prototype={parse:function(e){this._loadTokens(e),this.index=0;var t=this.expression(0);if("EOF"!==this._lookahead(0)){var n=this._lookaheadToken(0),r=new Error("Unexpected token type: "+n.type+", value: "+n.value);throw r.name="ParserError",r}return t},_loadTokens:function(e){var t=new c,n=t.tokenize(e);n.push({type:"EOF",value:"",start:e.length}),this.tokens=n},expression:function(e){var t=this._lookaheadToken(0);this._advance();for(var n=this.nud(t),r=this._lookahead(0);e<A[r];)this._advance(),n=this.led(r,n),r=this._lookahead(0);return n},_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,n,r;switch(e.type){case"Literal":return{type:"Literal",value:e.value};case"UnquotedIdentifier":return{type:"Field",name:e.value};case"QuotedIdentifier":var i={type:"Field",name:e.value};if("Lparen"===this._lookahead(0))throw new Error("Quoted identifier not allowed for function names.");return i;case"Not":return n=this.expression(A.Not),{type:"NotExpression",children:[n]};case"Star":return t={type:"Identity"},n=null,n="Rbracket"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(A.Star),{type:"ValueProjection",children:[t,n]};case"Filter":return this.led(e.type,{type:"Identity"});case"Lbrace":return this._parseMultiselectHash();case"Flatten":return t={type:"Flatten",children:[{type:"Identity"}]},n=this._parseProjectionRHS(A.Flatten),{type:"Projection",children:[t,n]};case"Lbracket":return"Number"===this._lookahead(0)||"Colon"===this._lookahead(0)?(n=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},n)):"Star"===this._lookahead(0)&&"Rbracket"===this._lookahead(1)?(this._advance(),this._advance(),n=this._parseProjectionRHS(A.Star),{type:"Projection",children:[{type:"Identity"},n]}):this._parseMultiselectList();case"Current":return{type:"Current"};case"Expref":return r=this.expression(A.Expref),{type:"ExpressionReference",children:[r]};case"Lparen":for(var o=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(r={type:"Current"},this._advance()):r=this.expression(0),o.push(r);return this._match("Rparen"),o[0];default:this._errorToken(e)}},led:function(e,t){var n;switch(e){case"Dot":var r=A.Dot;return"Star"!==this._lookahead(0)?(n=this._parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this._advance(),n=this._parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case"Pipe":return n=this.expression(A.Pipe),{type:"Pipe",children:[t,n]};case"Or":return n=this.expression(A.Or),{type:"OrExpression",children:[t,n]};case"And":return n=this.expression(A.And),{type:"AndExpression",children:[t,n]};case"Lparen":for(var i,o=t.name,a=[];"Rparen"!==this._lookahead(0);)"Current"===this._lookahead(0)?(i={type:"Current"},this._advance()):i=this.expression(0),"Comma"===this._lookahead(0)&&this._match("Comma"),a.push(i);return this._match("Rparen"),{type:"Function",name:o,children:a};case"Filter":var s=this.expression(0);return this._match("Rbracket"),n="Flatten"===this._lookahead(0)?{type:"Identity"}:this._parseProjectionRHS(A.Filter),{type:"FilterProjection",children:[t,n,s]};case"Flatten":return{type:"Projection",children:[{type:"Flatten",children:[t]},this._parseProjectionRHS(A.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?(n=this._parseIndexExpression(),this._projectIfSlice(t,n)):(this._match("Star"),this._match("Rbracket"),n=this._parseProjectionRHS(A.Star),{type:"Projection",children:[t,n]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){if(this._lookahead(0)!==e){var t=this._lookaheadToken(0),n=new Error("Expected "+e+", got: "+t.type);throw n.name="ParserError",n}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 n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{type:"Projection",children:[n,this._parseProjectionRHS(A.Star)]}:n},_parseSliceExpression:function(){for(var e=[null,null,null],t=0,n=this._lookahead(0);"Rbracket"!==n&&t<3;){if("Colon"===n)t++,this._advance();else{if("Number"!==n){var r=this._lookahead(0),i=new Error("Syntax error, unexpected token: "+r.value+"("+r.type+")");throw i.name="Parsererror",i}e[t]=this._lookaheadToken(0).value,this._advance()}n=this._lookahead(0)}return this._match("Rbracket"),{type:"Slice",children:e}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(A[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(A[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 n=this._lookaheadToken(0),r=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")");throw r.name="ParserError",r}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,n,r,i=[],o=["UnquotedIdentifier","QuotedIdentifier"];;){if(e=this._lookaheadToken(0),o.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(t=e.value,this._advance(),this._match("Colon"),n=this.expression(0),r={type:"KeyValuePair",name:t,value:n},i.push(r),"Comma"===this._lookahead(0))this._match("Comma");else if("Rbrace"===this._lookahead(0)){this._match("Rbrace");break}}return{type:"MultiSelectHash",children:i}}},p.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,a){var s,u,c,l,p,f,d,h,m;switch(e.type){case"Field":return null===a?null:n(a)?(f=a[e.name],void 0===f?null:f):null;case"Subexpression":for(c=this.visit(e.children[0],a),m=1;m<e.children.length;m++)if(null===(c=this.visit(e.children[1],c)))return null;return c;case"IndexExpression":return d=this.visit(e.children[0],a),this.visit(e.children[1],d);case"Index":if(!t(a))return null;var y=e.value;return y<0&&(y=a.length+y),c=a[y],void 0===c&&(c=null),c;case"Slice":if(!t(a))return null;var g=e.children.slice(0),v=this.computeSliceParams(a.length,g),b=v[0],_=v[1],S=v[2];if(c=[],S>0)for(m=b;m<_;m+=S)c.push(a[m]);else for(m=b;m>_;m+=S)c.push(a[m]);return c;case"Projection":var E=this.visit(e.children[0],a);if(!t(E))return null;for(h=[],m=0;m<E.length;m++)null!==(u=this.visit(e.children[1],E[m]))&&h.push(u);return h;case"ValueProjection":if(E=this.visit(e.children[0],a),!n(E))return null;h=[];var I=o(E);for(m=0;m<I.length;m++)null!==(u=this.visit(e.children[1],I[m]))&&h.push(u);return h;case"FilterProjection":if(E=this.visit(e.children[0],a),!t(E))return null;var w=[],C=[];for(m=0;m<E.length;m++)s=this.visit(e.children[2],E[m]),i(s)||w.push(E[m]);for(var T=0;T<w.length;T++)null!==(u=this.visit(e.children[1],w[T]))&&C.push(u);return C;case"Comparator":switch(l=this.visit(e.children[0],a),p=this.visit(e.children[1],a),e.name){case"EQ":c=r(l,p);break;case"NE":c=!r(l,p);break;case"GT":c=l>p;break;case"GTE":c=l>=p;break;case"LT":c=l<p;break;case"LTE":c=l<=p;break;default:throw new Error("Unknown comparator: "+e.name)}return c;case"Flatten":var N=this.visit(e.children[0],a);if(!t(N))return null;var A=[];for(m=0;m<N.length;m++)u=N[m],t(u)?A.push.apply(A,u):A.push(u);return A;case"Identity":return a;case"MultiSelectList":if(null===a)return null;for(h=[],m=0;m<e.children.length;m++)h.push(this.visit(e.children[m],a));return h;case"MultiSelectHash":if(null===a)return null;h={};var k;for(m=0;m<e.children.length;m++)k=e.children[m],h[k.name]=this.visit(k.value,a);return h;case"OrExpression":return s=this.visit(e.children[0],a),i(s)&&(s=this.visit(e.children[1],a)),s;case"AndExpression":return l=this.visit(e.children[0],a),!0===i(l)?l:this.visit(e.children[1],a);case"NotExpression":return l=this.visit(e.children[0],a),i(l);case"Literal":return e.value;case"Pipe":return d=this.visit(e.children[0],a),this.visit(e.children[1],d);case"Current":return a;case"Function":var O=[];for(m=0;m<e.children.length;m++)O.push(this.visit(e.children[m],a));return this.runtime.callFunction(e.name,O);case"ExpressionReference":var P=e.children[0];return P.jmespathType="Expref",P;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var n=t[0],r=t[1],i=t[2],o=[null,null,null];if(null===i)i=1;else if(0===i){var a=new Error("Invalid slice, step cannot be 0");throw a.name="RuntimeError",a}var s=i<0;return n=null===n?s?e-1:0:this.capSliceRange(e,n,i),r=null===r?s?-1:e:this.capSliceRange(e,r,i),o[0]=n,o[1]=r,o[2]=i,o},capSliceRange:function(e,t,n){return t<0?(t+=e)<0&&(t=n<0?-1:0):t>=e&&(t=n<0?e-1:e),t}},f.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var r;if(n[n.length-1].variadic){if(t.length<n.length)throw r=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+n.length+r+" but received "+t.length)}else if(t.length!==n.length)throw r=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+n.length+r+" but received "+t.length);for(var i,o,a,s=0;s<n.length;s++){a=!1,i=n[s].types,o=this._getTypeName(t[s]);for(var u=0;u<i.length;u++)if(this._typeMatches(o,i[u],t[s])){a=!0;break}if(!a)throw new Error("TypeError: "+e+"() expected argument "+(s+1)+" to be type "+i+" but received type "+o+" instead.")}},_typeMatches:function(e,t,n){if(t===v)return!0;if(t!==w&&t!==I&&t!==_)return e===t;if(t===_)return e===_;if(e===_){var r;t===I?r=g:t===w&&(r=b);for(var i=0;i<n.length;i++)if(!this._typeMatches(this._getTypeName(n[i]),r,n[i]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return b;case"[object Number]":return g;case"[object Array]":return _;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return"Expref"===e.jmespathType?E:S}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0],n=e[1];return-1!==t.indexOf(n,t.length-n.length)},_functionReverse:function(e){if(this._getTypeName(e[0])===b){for(var t=e[0],n="",r=t.length-1;r>=0;r--)n+=t[r];return n}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,n=e[0],r=0;r<n.length;r++)t+=n[r];return t/n.length},_functionContains:function(e){return e[0].indexOf(e[1])>=0},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return n(e[0])?Object.keys(e[0]).length:e[0].length},_functionMap:function(e){for(var t=[],n=this._interpreter,r=e[0],i=e[1],o=0;o<i.length;o++)t.push(n.visit(r,i[o]));return t},_functionMerge:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var i in r)t[i]=r[i]}return t},_functionMax:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===g)return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r<t.length;r++)n.localeCompare(t[r])<0&&(n=t[r]);return n}return null},_functionMin:function(e){if(e[0].length>0){if(this._getTypeName(e[0][0])===g)return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],r=1;r<t.length;r++)t[r].localeCompare(n)<0&&(n=t[r]);return n}return null},_functionSum:function(e){for(var t=0,n=e[0],r=0;r<n.length;r++)t+=n[r];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case g:return"number";case b:return"string";case _:return"array";case S:return"object";case 5:return"boolean";case E:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],n=Object.keys(t),r=[],i=0;i<n.length;i++)r.push(t[n[i]]);return r},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return this._getTypeName(e[0])===_?e[0]:[e[0]]},_functionToString:function(e){return this._getTypeName(e[0])===b?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t,n=this._getTypeName(e[0]);return n===g?e[0]:n!==b||(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 n=this._interpreter,r=e[1],i=this._getTypeName(n.visit(r,t[0]));if([g,b].indexOf(i)<0)throw new Error("TypeError");for(var o=this,a=[],s=0;s<t.length;s++)a.push([s,t[s]]);a.sort(function(e,t){var a=n.visit(r,e[1]),s=n.visit(r,t[1]);if(o._getTypeName(a)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(a));if(o._getTypeName(s)!==i)throw new Error("TypeError: expected "+i+", received "+o._getTypeName(s));return a>s?1:a<s?-1:e[0]-t[0]});for(var u=0;u<a.length;u++)t[u]=a[u][1];return t},_functionMaxBy:function(e){for(var t,n,r=e[1],i=e[0],o=this.createKeyFunction(r,[g,b]),a=-1/0,s=0;s<i.length;s++)(n=o(i[s]))>a&&(a=n,t=i[s]);return t},_functionMinBy:function(e){for(var t,n,r=e[1],i=e[0],o=this.createKeyFunction(r,[g,b]),a=1/0,s=0;s<i.length;s++)(n=o(i[s]))<a&&(a=n,t=i[s]);return t},createKeyFunction:function(e,t){var n=this,r=this._interpreter;return function(i){var o=r.visit(e,i);if(t.indexOf(n._getTypeName(o))<0){var a="TypeError: expected one of "+t+", received "+n._getTypeName(o);throw new Error(a)}return o}}},e.tokenize=h,e.compile=d,e.search=m,e.strictDeepEqual=r}(t)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},i=function(){function e(){}return e.setItem=function(e,t){return r[e]=t,r[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0},e.removeItem=function(e){return delete r[e]},e.clear=function(){return r={}},e}();t.MemoryStorage=i;var o=function(){function e(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(e){this.storageWindow=i}}return e.prototype.getStorage=function(){return this.storageWindow},e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(261));var r=n(262);t.CacheList=r.default},function(e,t,n){"use strict";function r(e,t){if(e&&1===e.nodeType&&t){if("string"==typeof t||1===t.nodeType)return e===t||i(e,t);if("length"in t)for(var n=0,r=void 0;r=t[n];n++)if(e===r||i(e,r))return!0}return!1}function i(e,t){if("string"!=typeof t)return!1;if(s)return s.call(e,t);for(var n=e.parentNode.querySelectorAll(t),r=0,i=void 0;i=n[r];r++)if(i===e)return!0;return!1}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=o.JS.browserOrNode().isBrowser&&window.Element?window.Element.prototype:null,s=a?a.matches||a.matchesSelector||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector:null;t.default=r},function(e,t,n){!function(r,i){e.exports=t=function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[],u=[];!function(){function e(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)(function(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0})(n)&&(r<8&&(s[r]=e(t.pow(n,.5))),u[r]=e(t.pow(n,1/3)),r++),n++}();var c=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],p=n[6],f=n[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var h=c[d-15],m=(h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3,y=c[d-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[d]=m+c[d-7]+g+c[d-16]}var v=s&l^~s&p,b=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),S=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),E=f+S+v+u[d]+c[d],I=_+b;f=p,p=l,l=s,s=a+E|0,a=o,o=i,i=r,r=E+I|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+p|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(l),n.HmacSHA256=o._createHmacHelper(l)}(Math),e.SHA256}(n(23))}()},function(e,t,n){"use strict";(function(e){t.a=function(e,t){return e instanceof t}}).call(t,n(10))},function(e,t,n){"use strict";function r(e,t){var n=e;if(Object(c.I)(t)){var d=r(n,t.ofType);return d&&d.kind===u.a.NULL?null:d}if(null===n)return{kind:u.a.NULL};if(Object(a.a)(n))return null;if(Object(c.G)(t)){var h=t.ofType;if(Object(i.isCollection)(n)){var m=[];return Object(i.forEach)(n,function(e){var t=r(e,h);t&&m.push(t)}),{kind:u.a.LIST,values:m}}return r(n,h)}if(Object(c.C)(t)){if(null===n||"object"!==(void 0===n?"undefined":p(n)))return null;var y=Object(s.a)(t.getFields()),g=[];return y.forEach(function(e){var t=r(n[e.name],e.type);t&&g.push({kind:u.a.OBJECT_FIELD,name:{kind:u.a.NAME,value:e.name},value:t})}),{kind:u.a.OBJECT,fields:g}}if(Object(c.M)(t)||Object(c.B)(t)){var v=t.serialize(n);if(Object(o.a)(v))return null;if("boolean"==typeof v)return{kind:u.a.BOOLEAN,value:v};if("number"==typeof v){var b=String(v);return f.test(b)?{kind:u.a.INT,value:b}:{kind:u.a.FLOAT,value:b}}if("string"==typeof v)return Object(c.B)(t)?{kind:u.a.ENUM,value:v}:t===l.c&&f.test(v)?{kind:u.a.INT,value:v}:{kind:u.a.STRING,value:v};throw new TypeError("Cannot convert value to AST: "+String(v))}throw new Error("Unknown type: "+t+".")}t.a=r;var i=n(33),o=(n.n(i),n(44)),a=n(11),s=n(24),u=n(5),c=n(3),l=n(18),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=/^-?(0|[1-9][0-9]*)$/},function(e,t,n){"use strict";function r(e,t){for(var n=/\r\n|[\n\r]/g,r=1,i=t+1,o=void 0;(o=n.exec(e.body))&&o.index<t;)r+=1,i=t+1-(o.index+o[0].length);return{line:r,column:i}}t.a=r},function(e,t,n){"use strict";function r(e,t){var n=new s(E.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:i,lookahead:o}}function i(){return this.lastToken=this.token,this.token=this.lookahead()}function o(){var e=this.token;if(e.kind!==E.EOF)do{e=e.next||(e.next=c(this,e))}while(e.kind===E.COMMENT);return e}function a(e){var t=e.value;return t?e.kind+' "'+t+'"':e.kind}function s(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function u(e){return isNaN(e)?E.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function c(e,t){var n=e.source,r=n.body,i=r.length,o=p(r,t.end,e),a=e.line,c=1+o-e.lineStart;if(o>=i)return new s(E.EOF,i,i,a,c,t);var h=I.call(r,o);if(h<32&&9!==h&&10!==h&&13!==h)throw Object(_.e)(n,o,"Cannot contain the invalid character "+u(h)+".");switch(h){case 33:return new s(E.BANG,o,o+1,a,c,t);case 35:return f(n,o,a,c,t);case 36:return new s(E.DOLLAR,o,o+1,a,c,t);case 38:return new s(E.AMP,o,o+1,a,c,t);case 40:return new s(E.PAREN_L,o,o+1,a,c,t);case 41:return new s(E.PAREN_R,o,o+1,a,c,t);case 46:if(46===I.call(r,o+1)&&46===I.call(r,o+2))return new s(E.SPREAD,o,o+3,a,c,t);break;case 58:return new s(E.COLON,o,o+1,a,c,t);case 61:return new s(E.EQUALS,o,o+1,a,c,t);case 64:return new s(E.AT,o,o+1,a,c,t);case 91:return new s(E.BRACKET_L,o,o+1,a,c,t);case 93:return new s(E.BRACKET_R,o,o+1,a,c,t);case 123:return new s(E.BRACE_L,o,o+1,a,c,t);case 124:return new s(E.PIPE,o,o+1,a,c,t);case 125:return new s(E.BRACE_R,o,o+1,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return b(n,o,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d(n,o,h,a,c,t);case 34:return 34===I.call(r,o+1)&&34===I.call(r,o+2)?y(n,o,a,c,t):m(n,o,a,c,t)}throw Object(_.e)(n,o,l(h))}function l(e){return 39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character "+u(e)+"."}function p(e,t,n){for(var r=e.length,i=t;i<r;){var o=I.call(e,i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++n.line,n.lineStart=i;else{if(13!==o)break;10===I.call(e,i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}function f(e,t,n,r,i){var o=e.body,a=void 0,u=t;do{a=I.call(o,++u)}while(null!==a&&(a>31||9===a));return new s(E.COMMENT,t,u,n,r,i,w.call(o,t+1,u))}function d(e,t,n,r,i,o){var a=e.body,c=n,l=t,p=!1;if(45===c&&(c=I.call(a,++l)),48===c){if((c=I.call(a,++l))>=48&&c<=57)throw Object(_.e)(e,l,"Invalid number, unexpected digit after 0: "+u(c)+".")}else l=h(e,l,c),c=I.call(a,l);return 46===c&&(p=!0,c=I.call(a,++l),l=h(e,l,c),c=I.call(a,l)),69!==c&&101!==c||(p=!0,c=I.call(a,++l),43!==c&&45!==c||(c=I.call(a,++l)),l=h(e,l,c)),new s(p?E.FLOAT:E.INT,t,l,r,i,o,w.call(a,t,l))}function h(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=I.call(r,++i)}while(o>=48&&o<=57);return i}throw Object(_.e)(e,i,"Invalid number, expected digit but got: "+u(o)+".")}function m(e,t,n,r,i){for(var o=e.body,a=t+1,c=a,l=0,p="";a<o.length&&null!==(l=I.call(o,a))&&10!==l&&13!==l;){if(34===l)return p+=w.call(o,c,a),new s(E.STRING,t,a+1,n,r,i,p);if(l<32&&9!==l)throw Object(_.e)(e,a,"Invalid character within String: "+u(l)+".");if(++a,92===l){switch(p+=w.call(o,c,a-1),l=I.call(o,a)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var f=g(I.call(o,a+1),I.call(o,a+2),I.call(o,a+3),I.call(o,a+4));if(f<0)throw Object(_.e)(e,a,"Invalid character escape sequence: \\u"+o.slice(a+1,a+5)+".");p+=String.fromCharCode(f),a+=4;break;default:throw Object(_.e)(e,a,"Invalid character escape sequence: \\"+String.fromCharCode(l)+".")}++a,c=a}}throw Object(_.e)(e,a,"Unterminated string.")}function y(e,t,n,r,i){for(var o=e.body,a=t+3,c=a,l=0,p="";a<o.length&&null!==(l=I.call(o,a));){if(34===l&&34===I.call(o,a+1)&&34===I.call(o,a+2))return p+=w.call(o,c,a),new s(E.BLOCK_STRING,t,a+3,n,r,i,Object(S.a)(p));if(l<32&&9!==l&&10!==l&&13!==l)throw Object(_.e)(e,a,"Invalid character within String: "+u(l)+".");92===l&&34===I.call(o,a+1)&&34===I.call(o,a+2)&&34===I.call(o,a+3)?(p+=w.call(o,c,a)+'"""',a+=4,c=a):++a}throw Object(_.e)(e,a,"Unterminated string.")}function g(e,t,n,r){return v(e)<<12|v(t)<<8|v(n)<<4|v(r)}function v(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function b(e,t,n,r,i){for(var o=e.body,a=o.length,u=t+1,c=0;u!==a&&null!==(c=I.call(o,u))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++u;return new s(E.NAME,t,u,n,r,i,w.call(o,t,u))}t.b=r,n.d(t,"a",function(){return E}),t.c=a;var _=n(2),S=n(120),E=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),I=String.prototype.charCodeAt,w=String.prototype.slice;s.prototype.toJSON=s.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n,r){return t||Object(a.a)(0,"Must provide document"),Object(c.a)(e),o(e,r||new l.a(e),t,n||p.a)}function o(e,t,n,r){var i=new f(e,n,t),o=r.map(function(e){return e(i)});return Object(s.c)(n,Object(s.e)(t,Object(s.d)(o))),i.getErrors()}t.b=i,n.d(t,"a",function(){return f});var a=n(9),s=(n(2),n(27)),u=n(5),c=(n(7),n(42)),l=n(46),p=n(121),f=function(){function e(t,n,i){r(this,e),this._schema=t,this._ast=n,this._typeInfo=i,this._errors=[],this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}return e.prototype.reportError=function(e){this._errors.push(e)},e.prototype.getErrors=function(){return this._errors},e.prototype.getSchema=function(){return this._schema},e.prototype.getDocument=function(){return this._ast},e.prototype.getFragment=function(e){var t=this._fragments;return t||(this._fragments=t=this.getDocument().definitions.reduce(function(e,t){return t.kind===u.a.FRAGMENT_DEFINITION&&(e[t.name.value]=t),e},Object.create(null))),t[e]},e.prototype.getFragmentSpreads=function(e){var t=this._fragmentSpreads.get(e);if(!t){t=[];for(var n=[e];0!==n.length;)for(var r=n.pop(),i=0;i<r.selections.length;i++){var o=r.selections[i];o.kind===u.a.FRAGMENT_SPREAD?t.push(o):o.selectionSet&&n.push(o.selectionSet)}this._fragmentSpreads.set(e,t)}return t},e.prototype.getRecursivelyReferencedFragments=function(e){var t=this._recursivelyReferencedFragments.get(e);if(!t){t=[];for(var n=Object.create(null),r=[e.selectionSet];0!==r.length;)for(var i=r.pop(),o=this.getFragmentSpreads(i),a=0;a<o.length;a++){var s=o[a].name.value;if(!0!==n[s]){n[s]=!0;var u=this.getFragment(s);u&&(t.push(u),r.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(e,t)}return t},e.prototype.getVariableUsages=function(e){var t=this._variableUsages.get(e);if(!t){var n=[],r=new l.a(this._schema);Object(s.c)(e,Object(s.e)(r,{VariableDefinition:function(){return!1},Variable:function(e){n.push({node:e,type:r.getInputType()})}})),t=n,this._variableUsages.set(e,t)}return t},e.prototype.getRecursiveVariableUsages=function(e){var t=this._recursiveVariableUsages.get(e);if(!t){t=this.getVariableUsages(e);for(var n=this.getRecursivelyReferencedFragments(e),r=0;r<n.length;r++)Array.prototype.push.apply(t,this.getVariableUsages(n[r]));this._recursiveVariableUsages.set(e,t)}return t},e.prototype.getType=function(){return this._typeInfo.getType()},e.prototype.getParentType=function(){return this._typeInfo.getParentType()},e.prototype.getInputType=function(){return this._typeInfo.getInputType()},e.prototype.getParentInputType=function(){return this._typeInfo.getParentInputType()},e.prototype.getFieldDef=function(){return this._typeInfo.getFieldDef()},e.prototype.getDirective=function(){return this._typeInfo.getDirective()},e.prototype.getArgument=function(){return this._typeInfo.getArgument()},e}()},function(e,t,n){"use strict";function r(e){return Object(i.a)(e.map(function(e){return'"'+e+'"'}))}t.a=r;var i=n(66)},function(e,t,n){"use strict";function r(e){var t=e.slice(0,i);return t.reduce(function(e,n,r){return e+(t.length>2?", ":" ")+(r===t.length-1?"or ":"")+n})}t.a=r;var i=5},function(e,t,n){"use strict";function r(e,t,n){return"Expected type "+e+", found "+t+(n?"; "+n:".")}function i(e,t,n){return"Field "+e+"."+t+" of required type "+n+" was not provided."}function o(e,t,n){return'Field "'+t+'" is not defined by type '+e+(n?"; "+n:".")}function a(e){return{NullValue:function(t){var n=e.getInputType();Object(p.I)(n)&&e.reportError(new c.a(r(String(n),Object(l.a)(t)),t))},ListValue:function(t){var n=Object(p.y)(e.getParentInputType());if(!Object(p.G)(n))return s(e,t),!1},ObjectValue:function(t){var n=Object(p.x)(e.getInputType());if(!Object(p.C)(n))return s(e,t),!1;var r=n.getFields(),o=Object(d.a)(t.fields,function(e){return e.name.value});Object.keys(r).forEach(function(a){var s=r[a].type;!o[a]&&Object(p.I)(s)&&e.reportError(new c.a(i(n.name,a,String(s)),t))})},ObjectField:function(t){var n=Object(p.x)(e.getParentInputType());if(!e.getInputType()&&Object(p.C)(n)){var r=Object(m.a)(t.name.value,Object.keys(n.getFields())),i=0!==r.length?"Did you mean "+Object(h.a)(r)+"?":void 0;e.reportError(new c.a(o(n.name,t.name.value,i),t))}},EnumValue:function(t){var n=Object(p.x)(e.getInputType());Object(p.B)(n)?n.getValue(t.value)||e.reportError(new c.a(r(n.name,Object(l.a)(t),u(n,t)),t)):s(e,t)},IntValue:function(t){return s(e,t)},FloatValue:function(t){return s(e,t)},StringValue:function(t){return s(e,t)},BooleanValue:function(t){return s(e,t)}}}function s(e,t){var n=e.getInputType();if(n){var i=Object(p.x)(n);if(!Object(p.M)(i))return void e.reportError(new c.a(r(String(n),Object(l.a)(t),u(i,t)),t));try{var o=i.parseLiteral(t,void 0);Object(f.a)(o)&&e.reportError(new c.a(r(String(n),Object(l.a)(t)),t))}catch(i){e.reportError(new c.a(r(String(n),Object(l.a)(t),i.message),t,void 0,void 0,void 0,i))}}}function u(e,t){if(Object(p.B)(e)){var n=Object(m.a)(Object(l.a)(t),e.getValues().map(function(e){return e.name}));if(0!==n.length)return"Did you mean the enum value "+Object(h.a)(n)+"?"}}t.a=a;var c=n(2),l=n(19),p=n(3),f=n(11),d=n(21),h=n(66),m=n(35)},function(e,t,n){"use strict";function r(e,t,n){for(var r=[],i={},o=0;o<t.length;o++){var s=t[o],c=s.variable.name.value,d=Object(p.a)(e,s.type);if(Object(m.D)(d)){var y=n[c];if(Object(u.a)(y))Object(m.I)(d)?r.push(new a.a('Variable "$'+c+'" of required type "'+String(d)+'" was not provided.',[s])):s.defaultValue&&(i[c]=Object(f.a)(s.defaultValue,d));else{var g=Object(l.a)(y,d,s),v=g.errors;v?function(){var e='Variable "$'+c+'" got invalid value '+JSON.stringify(y)+"; ";v.forEach(function(t){t.message=e+t.message}),r.push.apply(r,v)}():i[c]=g.value}}else r.push(new a.a('Variable "$'+c+'" expected value of type "'+Object(h.a)(s.type)+'" which cannot be used as an input type.',[s.type]))}return 0===r.length?{errors:void 0,coerced:i}:{errors:r,coerced:void 0}}function i(e,t,n){var r={},i=e.args,o=t.arguments;if(!i||!o)return r;for(var s=Object(c.a)(o,function(e){return e.name.value}),l=0;l<i.length;l++){var p=i[l],y=p.name,g=p.type,v=s[y],b=p.defaultValue;if(v)if(v.value.kind===d.a.VARIABLE){var _=v.value.name.value;if(n&&Object.prototype.hasOwnProperty.call(n,_)&&!Object(u.a)(n[_]))r[y]=n[_];else if(Object(u.a)(b)){if(Object(m.I)(g))throw new a.a('Argument "'+y+'" of required type "'+String(g)+'" was provided the variable "$'+_+'" which was not provided a runtime value.',[v.value])}else r[y]=b}else{var S=v.value,E=Object(f.a)(S,g,n);if(Object(u.a)(E))throw new a.a('Argument "'+y+'" has invalid value '+Object(h.a)(S)+".",[v.value]);r[y]=E}else if(Object(u.a)(b)){if(Object(m.I)(g))throw new a.a('Argument "'+y+'" of required type "'+String(g)+'" was not provided.',[t])}else r[y]=b}return r}function o(e,t,n){var r=t.directives&&Object(s.a)(t.directives,function(t){return t.name.value===e.name});if(r)return i(e,r,n)}t.c=r,t.a=i,t.b=o;var a=n(2),s=n(28),u=n(11),c=n(21),l=n(69),p=n(16),f=n(48),d=n(5),h=n(19),m=n(3)},function(e,t,n){"use strict";function r(e,t,n,m){if(Object(y.I)(t))return Object(f.a)(e)?o([u("Expected non-nullable type "+String(t)+" not to be null",n,m)]):r(e,t.ofType,n,m);if(Object(f.a)(e))return i(null);if(Object(y.M)(t))try{var b=t.parseValue(e);return Object(p.a)(b)?o([u("Expected type "+t.name,n,m)]):i(b)}catch(e){return o([u("Expected type "+t.name,n,m,e.message,e)])}if(Object(y.B)(t)){if("string"==typeof e){var _=t.getValue(e);if(_)return i(_.value)}var S=Object(h.a)(String(e),t.getValues().map(function(e){return e.name})),E=0!==S.length?"did you mean "+Object(d.a)(S)+"?":void 0;return o([u("Expected type "+t.name,n,m,E)])}if(Object(y.G)(t)){var I=t.ofType;if(Object(l.isCollection)(e)){var w=void 0,C=[];return Object(l.forEach)(e,function(e,t){var i=r(e,I,n,s(m,t));i.errors?w=a(w,i.errors):w||C.push(i.value)}),w?o(w):i(C)}var T=r(e,I,n);return T.errors?T:i([T.value])}if(Object(y.C)(t)){if("object"!==(void 0===e?"undefined":g(e)))return o([u("Expected type "+t.name+" to be an object",n,m)]);var N=void 0,A={},k=t.getFields();for(var O in k)if(v.call(k,O)){var P=k[O],R=e[O];if(Object(p.a)(R))Object(p.a)(P.defaultValue)?Object(y.I)(P.type)&&(N=a(N,u("Field "+c(s(m,O))+" of required type "+String(P.type)+" was not provided",n))):A[O]=P.defaultValue;else{var x=r(R,P.type,n,s(m,O));x.errors?N=a(N,x.errors):N||(A[O]=x.value)}}for(var D in e)if(v.call(e,D)&&!k[D]){var j=Object(h.a)(D,Object.keys(k)),M=0!==j.length?"did you mean "+Object(d.a)(j)+"?":void 0;N=a(N,u('Field "'+D+'" is not defined by type '+t.name,n,m,M))}return N?o(N):i(A)}throw new Error("Unexpected type: "+t+".")}function i(e){return{errors:void 0,value:e}}function o(e){return{errors:e,value:void 0}}function a(e,t){return(e||[]).concat(t)}function s(e,t){return{prev:e,key:t}}function u(e,t,n,r,i){var o=c(n);return new m.a(e+(o?" at "+o:"")+(r?"; "+r:"."),t,void 0,void 0,void 0,i)}function c(e){for(var t="",n=e;n;)t=("string"==typeof n.key?"."+n.key:"["+String(n.key)+"]")+t,n=n.prev;return t?"value"+t:""}t.a=r;var l=n(33),p=(n.n(l),n(11)),f=n(44),d=n(66),h=n(35),m=n(2),y=n(3),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";function r(e,t,n,i,a,s,u){var c=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,l=n;if(!l&&c){var p=c[0];l=p&&p.loc&&p.loc.source}var f=i;!f&&c&&(f=c.reduce(function(e,t){return t.loc&&e.push(t.loc.start),e},[])),f&&0===f.length&&(f=void 0);var d=void 0;if(i&&n){var h=n;d=i.map(function(e){return(0,o.getLocation)(h,e)})}else c&&(d=c.reduce(function(e,t){return t.loc&&e.push((0,o.getLocation)(t.loc.source,t.loc.start)),e},[]));Object.defineProperties(this,{message:{value:e,enumerable:!0,writable:!0},locations:{value:d||void 0,enumerable:!0},path:{value:a||void 0,enumerable:!0},nodes:{value:c||void 0},source:{value:l||void 0},positions:{value:f||void 0},originalError:{value:s},extensions:{value:u||s&&s.extensions}}),s&&s.stack?Object.defineProperty(this,"stack",{value:s.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLError=r;var i=n(152),o=n(153);r.prototype=Object.create(Error.prototype,{constructor:{value:r},name:{value:"GraphQLError"},toString:{value:function(){return(0,i.printError)(this)}}})},function(e,t,n){"use strict";function r(e,t){for(var n=e.split("/"),r=n.length,i=t.split("/"),o=0;o<r;++o){var a=n[o],s=i[o];if("#"===a)return i.length>=r;if("+"!==a&&a!==s)return!1}return r===i.length}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},s=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},u=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var l=n(374),p=n(30),f=n(49),d=n(163),h=n(1),m=new h.ConsoleLogger("MqttOverWSProvider");t.mqttTopicMatch=r;var y=function(){function e(){this.promises=new Map}return e.prototype.get=function(e,t){return s(this,void 0,void 0,function(){var n;return u(this,function(r){return(n=this.promises.get(e))?[2,n]:(n=t(e),this.promises.set(e,n),[2,n])})})},Object.defineProperty(e.prototype,"allClients",{get:function(){return Array.from(this.promises.keys())},enumerable:!0,configurable:!0}),e.prototype.remove=function(e){this.promises.delete(e)},e}(),g="undefined"!=typeof Symbol?Symbol("topic"):"@@topic",v=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,a({},t,{clientId:t.clientId||p.v4()}))||this;return n._clientsQueue=new y,n._topicObservers=new Map,n}return o(t,e),Object.defineProperty(t.prototype,"clientId",{get:function(){return this.options.clientId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endpoint",{get:function(){return this.options.aws_pubsub_endpoint},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientsQueue",{get:function(){return this._clientsQueue},enumerable:!0,configurable:!0}),t.prototype.getTopicForValue=function(e){return"object"===(void 0===e?"undefined":i(e))&&e[g]},t.prototype.getProviderName=function(){return"MqttOverWSProvider"},t.prototype.onDisconnect=function(e){var t=e.clientId,n=e.errorCode,r=c(e,["clientId","errorCode"]);0!==n&&m.warn(t,JSON.stringify(a({errorCode:n},r),null,2))},t.prototype.newClient=function(e){var t=e.url,n=e.clientId;return s(this,void 0,void 0,function(){var e,r=this;return u(this,function(i){switch(i.label){case 0:return m.debug("Creating new MQTT client",n),e=new l.Client(t,n),e.onMessageArrived=function(e){var t=e.destinationName,n=e.payloadString;r._onMessage(t,n)},e.onConnectionLost=function(e){var t=e.errorCode,i=c(e,["errorCode"]);r.onDisconnect(a({clientId:n,errorCode:t},i))},[4,new Promise(function(t,n){e.connect({useSSL:!0,mqttVersion:3,onSuccess:function(){return t(e)},onFailure:n})})];case 1:return i.sent(),[2,e]}})})},t.prototype.connect=function(e,t){return void 0===t&&(t={}),s(this,void 0,void 0,function(){var n=this;return u(this,function(r){switch(r.label){case 0:return[4,this.clientsQueue.get(e,function(e){return n.newClient(a({},t,{clientId:e}))})];case 1:return[2,r.sent()]}})})},t.prototype.disconnect=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.clientsQueue.get(e,function(){return null})];case 1:return t=n.sent(),t&&t.isConnected()&&t.disconnect(),this.clientsQueue.remove(e),[2]}})})},t.prototype.publish=function(e,t){return s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return n=[].concat(e),r=JSON.stringify(t),[4,this.endpoint];case 1:return i=a.sent(),[4,this.connect(this.clientId,{url:i})];case 2:return o=a.sent(),m.debug("Publishing to topic(s)",n.join(","),r),n.forEach(function(e){return o.send(e,r)}),[2]}})})},t.prototype._onMessage=function(e,t){try{var n=[];this._topicObservers.forEach(function(t,i){r(i,e)&&n.push(t)});var o=JSON.parse(t);"object"===(void 0===o?"undefined":i(o))&&(o[g]=e),n.forEach(function(e){e.forEach(function(e){return e.next(o)})})}catch(e){m.warn("Error handling message",e,t)}},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=[].concat(e);return m.debug("Subscribing to topic(s)",r.join(",")),new f(function(e){r.forEach(function(t){var r=n._topicObservers.get(t);r||(r=new Set,n._topicObservers.set(t,r)),r.add(e)});var i,o=t.clientId,a=void 0===o?n.clientId:o;return function(){s(n,void 0,void 0,function(){var n,o,s,c;return u(this,function(u){switch(u.label){case 0:return n=t.url,void 0!==n?[3,2]:[4,this.endpoint];case 1:return s=u.sent(),[3,3];case 2:s=n,u.label=3;case 3:o=s,u.label=4;case 4:return u.trys.push([4,6,,7]),[4,this.connect(a,{url:o})];case 5:return i=u.sent(),r.forEach(function(e){i.subscribe(e)}),[3,7];case 6:return c=u.sent(),e.error(c),[3,7];case 7:return[2]}})})}(),function(){return m.debug("Unsubscribing from topic(s)",r.join(",")),i&&(r.forEach(function(e){i.isConnected()&&i.unsubscribe(e);var t=n._topicObservers.get(e)||new Set;t.forEach(function(e){return e.complete()}),t.clear()}),n.disconnect(a)),null}})},t}(d.AbstractPubSubProvider);t.MqttOverWSProvider=v},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(Error);t.XRError=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRNoSceneConfiguredError=o;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRSceneNotFoundError=a;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRSceneNotLoadedError=s;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRNoDomElement=u;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRSceneLoadFailure=c;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(i);t.XRProviderNotConfigured=l},function(e,t,n){function r(e){var t=e.service.api.operations[e.operation],n=e.httpRequest;n.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",n.params={Version:e.service.api.apiVersion,Action:t.name},(new u).serialize(e.params,t.input,function(e,t){n.params[e]=t}),n.body=s.queryParamsToString(n.params),l(e)}function i(e){var t,n=e.httpResponse.body.toString();if(n.match("<UnknownOperationException"))t={Code:"UnknownOperation",Message:"Unknown operation "+e.request.operation};else try{t=(new a.XML.Parser).parse(n)}catch(n){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=s.error(new Error,{code:t.Code,message:t.Message}):e.error=s.error(new Error,{code:e.httpResponse.statusCode,message:null})}function o(e){var t=e.request,n=t.service.api.operations[t.operation],r=n.output||{},i=r;if(i.resultWrapper){var o=c.create({type:"structure"});o.members[i.resultWrapper]=r,o.memberNames=[i.resultWrapper],s.property(r,"name",r.resultWrapper),r=o}var u=new a.XML.Parser;if(r&&r.members&&!r.members._XAMZRequestId){var l=c.create({type:"string"},{api:{protocol:"query"}},"requestId");r.members._XAMZRequestId=l}var p=u.parse(e.httpResponse.body.toString(),r);e.requestId=p._XAMZRequestId||p.requestId,p._XAMZRequestId&&delete p._XAMZRequestId,i.resultWrapper&&p[i.resultWrapper]&&(s.update(p,p[i.resultWrapper]),delete p[i.resultWrapper]),e.data=p}var a=n(0),s=n(4),u=n(174),c=n(29),l=n(53).populateHostPrefix;e.exports={buildRequest:r,extractError:i,extractData:o}},function(e,t,n){function r(e,t,n,r){o(this,r(e),function(){return n(e,t)})}function i(e,t,n,i,o){i=i||String;var a=this;for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r.call(a,s,e[s],n,i),o&&o(s,e[s]))}var o=n(4).memoizedProperty;e.exports=i},function(e,t,n){function r(e){var t=new p,n=e.service.api.operations[e.operation].input;if(n.payload){var r={},o=n.members[n.payload];if(void 0===(r=e.params[n.payload]))return;"structure"===o.type?(e.httpRequest.body=t.build(r,o),i(e)):(e.httpRequest.body=r,("binary"===o.type||o.isStreaming)&&i(e,!0))}else{var a=t.build(e.params,n);"{}"===a&&"GET"===e.httpRequest.method||(e.httpRequest.body=a),i(e)}}function i(e,t){if(e.service.api.operations[e.operation].input,!e.httpRequest.headers["Content-Type"]){var n=t?"binary/octet-stream":"application/json";e.httpRequest.headers["Content-Type"]=n}}function o(e){c.buildRequest(e),["HEAD","DELETE"].indexOf(e.httpRequest.method)<0&&r(e)}function a(e){l.extractError(e)}function s(e){c.extractData(e);var t,n=e.request,r=n.service.api.operations[n.operation],i=n.service.api.operations[n.operation].output||{};if(r.hasEventOutput,i.payload){var o=i.members[i.payload],a=e.httpResponse.body;if(o.isEventStream)t=new f,e.data[payload]=u.createEventStream(2===AWS.HttpClient.streamsApiVersion?e.httpResponse.stream:a,t,o);else if("structure"===o.type||"list"===o.type){var t=new f;e.data[i.payload]=t.parse(a,o)}else"binary"===o.type||o.isStreaming?e.data[i.payload]=a:e.data[i.payload]=o.toType(a)}else{var s=e.data;l.extractData(e),e.data=u.merge(s,e.data)}}var u=n(4),c=n(37),l=n(50),p=n(51),f=n(52);e.exports={buildRequest:o,extractError:a,extractData:s}},function(e,t,n){function r(e){var t=e.service.api.operations[e.operation].input,n=new s.XML.Builder,r=e.params,i=t.payload;if(i){var o=t.members[i];if(void 0===(r=r[i]))return;if("structure"===o.type){var a=o.name;e.httpRequest.body=n.toXML(r,o,a,!0)}else e.httpRequest.body=r}else e.httpRequest.body=n.toXML(r,t,t.name||t.shape||u.string.upperFirst(e.operation)+"Request")}function i(e){c.buildRequest(e),["GET","HEAD"].indexOf(e.httpRequest.method)<0&&r(e)}function o(e){c.extractError(e);var t;try{t=(new s.XML.Parser).parse(e.httpResponse.body.toString())}catch(n){t={Code:e.httpResponse.statusCode,Message:e.httpResponse.statusMessage}}t.Errors&&(t=t.Errors),t.Error&&(t=t.Error),t.Code?e.error=u.error(new Error,{code:t.Code,message:t.Message}):e.error=u.error(new Error,{code:e.httpResponse.statusCode,message:null})}function a(e){c.extractData(e);var t,n=e.request,r=e.httpResponse.body,i=n.service.api.operations[n.operation],o=i.output,a=(i.hasEventOutput,o.payload);if(a){var l=o.members[a];l.isEventStream?(t=new s.XML.Parser,e.data[a]=u.createEventStream(2===s.HttpClient.streamsApiVersion?e.httpResponse.stream:e.httpResponse.body,t,l)):"structure"===l.type?(t=new s.XML.Parser,e.data[a]=t.parse(r.toString(),l)):"binary"===l.type||l.isStreaming?e.data[a]=r:e.data[a]=l.toType(r)}else if(r.length>0){t=new s.XML.Parser;var p=t.parse(r.toString(),o);u.update(e.data,p)}}var s=n(0),u=n(4),c=n(37);e.exports={buildRequest:i,extractError:o,extractData:a}},function(e,t,n){function r(e,t){function n(e,t){!0===t.endpointoperation&&l(r,"endpointOperation",c.string.lowerFirst(e))}var r=this;e=e||{},t=t||{},t.api=this,e.metadata=e.metadata||{},l(this,"isApi",!0,!1),l(this,"apiVersion",e.metadata.apiVersion),l(this,"endpointPrefix",e.metadata.endpointPrefix),l(this,"signingName",e.metadata.signingName),l(this,"globalEndpoint",e.metadata.globalEndpoint),l(this,"signatureVersion",e.metadata.signatureVersion),l(this,"jsonVersion",e.metadata.jsonVersion),l(this,"targetPrefix",e.metadata.targetPrefix),l(this,"protocol",e.metadata.protocol),l(this,"timestampFormat",e.metadata.timestampFormat),l(this,"xmlNamespaceUri",e.metadata.xmlNamespace),l(this,"abbreviation",e.metadata.serviceAbbreviation),l(this,"fullName",e.metadata.serviceFullName),l(this,"serviceId",e.metadata.serviceId),p(this,"className",function(){var t=e.metadata.serviceAbbreviation||e.metadata.serviceFullName;return t?(t=t.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""),"ElasticLoadBalancing"===t&&(t="ELB"),t):null}),l(this,"operations",new i(e.operations,t,function(e,n){return new o(e,n,t)},c.string.lowerFirst,n)),l(this,"shapes",new i(e.shapes,t,function(e,n){return a.create(n,t)})),l(this,"paginators",new i(e.paginators,t,function(e,n){return new s(e,n,t)})),l(this,"waiters",new i(e.waiters,t,function(e,n){return new u(e,n,t)},c.string.lowerFirst)),t.documentation&&(l(this,"documentation",e.documentation),l(this,"documentationUrl",e.documentationUrl))}var i=n(74),o=n(78),a=n(29),s=n(79),u=n(80),c=n(4),l=c.property,p=c.memoizedProperty;e.exports=r},function(e,t,n){function r(e,t,n){var r=this;n=n||{},s(this,"name",t.name||e),s(this,"api",n.api,!1),t.http=t.http||{},s(this,"endpoint",t.endpoint),s(this,"httpMethod",t.http.method||"POST"),s(this,"httpPath",t.http.requestUri||"/"),s(this,"authtype",t.authtype||""),s(this,"endpointDiscoveryRequired",t.endpointdiscovery?t.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),u(this,"input",function(){return t.input?o.create(t.input,n):new o.create({type:"structure"},n)}),u(this,"output",function(){return t.output?o.create(t.output,n):new o.create({type:"structure"},n)}),u(this,"errors",function(){var e=[];if(!t.errors)return null;for(var r=0;r<t.errors.length;r++)e.push(o.create(t.errors[r],n));return e}),u(this,"paginator",function(){return n.api.paginators[e]}),n.documentation&&(s(this,"documentation",t.documentation),s(this,"documentationUrl",t.documentationUrl)),u(this,"idempotentMembers",function(){var e=[],t=r.input,n=t.members;if(!t.members)return e;for(var i in n)n.hasOwnProperty(i)&&!0===n[i].isIdempotent&&e.push(i);return e}),u(this,"hasEventOutput",function(){return i(r.output)})}function i(e){var t=e.members,n=e.payload;if(!e.members)return!1;if(n)return t[n].isEventStream;for(var r in t)if(!t.hasOwnProperty(r)&&!0===t[r].isEventStream)return!0;return!1}var o=n(29),a=n(4),s=a.property,u=a.memoizedProperty;e.exports=r},function(e,t,n){function r(e,t){i(this,"inputToken",t.input_token),i(this,"limitKey",t.limit_key),i(this,"moreResults",t.more_results),i(this,"outputToken",t.output_token),i(this,"resultKey",t.result_key)}var i=n(4).property;e.exports=r},function(e,t,n){function r(e,t,n){n=n||{},o(this,"name",e),o(this,"api",n.api,!1),t.operation&&o(this,"operation",i.string.lowerFirst(t.operation));var r=this;["type","description","delay","maxAttempts","acceptors"].forEach(function(e){var n=t[e];n&&o(r,e,n)})}var i=n(4),o=i.property;e.exports=r},function(e,t,n){var r=n(0);r.SequentialExecutor=r.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t,n){return this._events[e]?n?this._events[e].unshift(t):this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t,n){return t._isAsync=!0,this.on(e,t,n)},removeListener:function(e,t){var n=this._events[e];if(n){for(var r=n.length,i=-1,o=0;o<r;++o)n[o]===t&&(i=o);i>-1&&n.splice(i,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,n){n||(n=function(){});var r=this.listeners(e),i=r.length;return this.callListeners(r,t,n),i>0},callListeners:function(e,t,n,i){function o(i){if(i&&(s=r.util.error(s||new Error,i),a._haltHandlersOnError))return n.call(a,s);a.callListeners(e,t,n,s)}for(var a=this,s=i||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(a,t.concat([o]));try{u.apply(a,t)}catch(e){s=r.util.error(s||new Error,e)}if(s&&a._haltHandlersOnError)return void n.call(a,s)}n.call(a,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),r.util.each(e,function(e,n){"function"==typeof n&&(n=[n]),r.util.arrayEach(n,function(n){t.on(e,n)})}),t},addNamedListener:function(e,t,n,r){return this[e]=n,this.addListener(t,n,r),this},addNamedAsyncListener:function(e,t,n,r){return n._isAsync=!0,this.addNamedListener(e,t,n,r)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),r.SequentialExecutor.prototype.addListener=r.SequentialExecutor.prototype.on,e.exports=r.SequentialExecutor},function(e,t,n){var r=n(0);r.Credentials=r.util.inherit({constructor:function(){if(r.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=r.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(n){n||(t.expired=!1),e&&e(n)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,t){var n=this;1===n.refreshCallbacks.push(e)&&n.load(function(e){r.util.arrayEach(n.refreshCallbacks,function(n){t?n(e):r.util.defer(function(){n(e)})}),n.refreshCallbacks.length=0})},load:function(e){e()}}),r.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=r.util.promisifyMethod("get",e),this.prototype.refreshPromise=r.util.promisifyMethod("refresh",e)},r.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise},r.util.addPromises(r.Credentials)},function(e,t,n){var r=n(0);r.CredentialProviderChain=r.util.inherit(r.Credentials,{constructor:function(e){this.providers=e||r.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){function t(e,a){if(!e&&a||i===o.length)return r.util.arrayEach(n.resolveCallbacks,function(t){t(e,a)}),void(n.resolveCallbacks.length=0);var s=o[i++];a="function"==typeof s?s.call():s,a.get?a.get(function(e){t(e,e?null:a)}):t(null,a)}var n=this;if(0===n.providers.length)return e(new Error("No providers")),n;if(1===n.resolveCallbacks.push(e)){var i=0,o=n.providers.slice(0);t()}return n}}),r.CredentialProviderChain.defaultProviders=[],r.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=r.util.promisifyMethod("resolve",e)},r.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise},r.util.addPromises(r.CredentialProviderChain)},function(e,t,n){var r=n(0),i=r.util.inherit;r.Endpoint=i({constructor:function(e,t){if(r.util.hideProperties(this,["slashes","auth","hash","search","query"]),void 0===e||null===e)throw new Error("Invalid endpoint: "+e);if("string"!=typeof e)return r.util.copy(e);e.match(/^http/)||(e=((t&&void 0!==t.sslEnabled?t.sslEnabled:r.config.sslEnabled)?"https":"http")+"://"+e),r.util.update(this,r.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port="https:"===this.protocol?443:80}}),r.HttpRequest=i({constructor:function(e,t){e=new r.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()]=r.util.userAgent()},getUserAgentHeaderName:function(){return(r.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=r.util.queryStringParse(e),r.util.queryParamsToString(e)):""},updateEndpoint:function(e){var t=new r.Endpoint(e);this.endpoint=t,this.path=t.path||"/"}}),r.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}}),r.HttpClient=i({}),r.HttpClient.getInstance=function(){return void 0===this.singleton&&(this.singleton=new this),this.singleton}},function(e,t,n){var r=n(0),i=r.util.inherit;r.Signers.V3=i(r.Signers.RequestSigner,{addAuthorization:function(e,t){var n=r.util.date.rfc822(t);this.request.headers["X-Amz-Date"]=n,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,n)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return r.util.arrayEach(this.headersToSign(),function(t){e.push(t.toLowerCase())}),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,t=[];return r.util.arrayEach(this.headersToSign(),function(n){t.push(n.toLowerCase().trim()+":"+String(e[n]).trim())}),t.sort().join("\n")+"\n"},headersToSign:function(){var e=[];return r.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 r.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),r.util.crypto.sha256(e.join("\n"))}}),e.exports=r.Signers.V3},function(e,t,n){var r=n(0),i={},o=[];e.exports={createScope:function(e,t,n){return[e.substr(0,8),t,n,"aws4_request"].join("/")},getSigningKey:function(e,t,n,a,s){var u=r.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),c=[u,t,n,a].join("_");if((s=!1!==s)&&c in i)return i[c];var l=r.util.crypto.hmac("AWS4"+e.secretAccessKey,t,"buffer"),p=r.util.crypto.hmac(l,n,"buffer"),f=r.util.crypto.hmac(p,a,"buffer"),d=r.util.crypto.hmac(f,"aws4_request","buffer");return s&&(i[c]=d,o.push(c),o.length>50&&delete i[o.shift()]),d},emptyCache:function(){i={},o=[]}}},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){function n(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("")}for(var r=[],i=0;i<256;++i)r[i]=(i+256).toString(16).substr(1);e.exports=n},function(e,t,n){"use strict";t.decode=t.parse=n(216),t.encode=t.stringify=n(217)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(249),i=n(250),o=new r.default;t.GoogleOAuth=o;var a=new i.default;t.FacebookOAuth=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(255),i={userAgent:"aws-amplify/"+r.version+" js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(i.product=navigator.product||"",i.navigator=navigator||null,navigator.product){case"ReactNative":i.userAgent="aws-amplify/"+r.version+" react-native",i.isReactNative=!0;break;default:i.userAgent="aws-amplify/"+r.version+" js",i.isReactNative=!1}t.default=i},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},o=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},a=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var u=n(1),c=n(256),l=n(258),p=n(41),f=n(30),d="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",h=function(e,t){u.Hub.dispatch("analytics",{event:e,data:t},"Analytics",d)},m=new u.ConsoleLogger("AWSPinpointProvider"),y=[429,500],g=[202],v=1e3,b=100,_=5e3,S=5,E=function(){function e(e){this._endpointGenerating=!0,this._buffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||v,this._config.flushSize=this._config.flushSize||b,this._config.flushInterval=this._config.flushInterval||_,this._config.resendLimit=this._config.resendLimit||S,this._clientInfo=u.ClientDevice.clientInfo()}return e.prototype._setupTimer=function(){var e=this;this._timer&&clearInterval(this._timer);var t=this._config,n=t.flushSize,r=t.flushInterval,i=this;this._timer=setInterval(function(){for(var t=e._buffer.length<n?e._buffer.length:n,r=0;r<t;r+=1){var o=e._buffer.shift(),a=o.params,s=o.handlers;if(i._send(a,s),e._endpointGenerating)break}},r)},e.prototype._putToBuffer=function(e,t){var n=this._config.bufferSize;if(!(this._buffer.length<n))return m.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;m.debug("configure Analytics",e);var n=e||{};if(this._config=Object.assign({},this._config,n),this._config.appId&&!this._config.disabled){if(this._config.endpointId)h("pinpointProvider_configured",null);else{var r=this.getProviderName()+"_"+this._config.appId;this._getEndpointId(r).then(function(e){m.debug("setting endpoint id from the cache",e),t._config.endpointId=e,h("pinpointProvider_configured",null)}).catch(function(e){m.debug("Failed to generate endpointId",e)})}this._setupTimer()}else this._timer&&clearInterval(this._timer);return this._config},e.prototype.record=function(e,t){return o(this,void 0,void 0,function(){var n,r;return a(this,function(i){switch(i.label){case 0:return[4,this._getCredentials()];case 1:return(n=i.sent())&&this._config.appId&&this._config.region?(r=(new Date).getTime(),this._generateSession(e),e.event.eventId=f.v1(),Object.assign(e,{timestamp:r,config:this._config,credentials:n}),e.event.immediate?[2,this._send(e,t)]:(this._putToBuffer(e,t),[2])):(m.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||f.v1();var t=e.event;switch(t.name){case"_session.start":this._sessionStartTimestamp=(new Date).getTime(),this._sessionId=f.v1(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()};break;case"_session.stop":var n=(new Date).getTime();this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||f.v1(),t.session={Id:this._sessionId,Duration:n-this._sessionStartTimestamp,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString(),StopTimestamp:new Date(n).toISOString()},this._sessionId=void 0,this._sessionStartTimestamp=void 0;break;default:this._sessionStartTimestamp=this._sessionStartTimestamp||(new Date).getTime(),this._sessionId=this._sessionId||f.v1(),t.session={Id:this._sessionId,StartTimestamp:new Date(this._sessionStartTimestamp).toISOString()}}},e.prototype._send=function(e,t){return o(this,void 0,void 0,function(){var n,r;return a(this,function(i){switch(n=e.event,r=e.config,n.name){case"_update_endpoint":return[2,this._updateEndpoint(e,t)];default:return[2,this._record(e,t)]}return[2]})})},e.prototype._generateBatchItemContext=function(e){var t=e.event,n=e.timestamp,r=e.config,i=(e.credentials,t.name),o=t.attributes,a=t.metrics,s=t.eventId,u=t.session,c=r.appId,l=r.endpointId,p={},f={ApplicationId:c,EventsRequest:{BatchItem:{}}};f.EventsRequest.BatchItem[l]={};var d=f.EventsRequest.BatchItem[l];return d.Endpoint=p,d.Events={},d.Events[s]={EventType:i,Timestamp:new Date(n).toISOString(),Attributes:o,Metrics:a,Session:u},f},e.prototype._pinpointPutEvents=function(e,t){return o(this,void 0,void 0,function(){var n,r,i,o,s=this;return a(this,function(a){return n=e.event.eventId,r=e.config.endpointId,i=this._generateBatchItemContext(e),m.debug("pinpoint put events with params",i),o=this.pinpointClient.putEvents(i),o.on("build",function(){o.httpRequest.path=o.httpRequest.path+"/legacy"}),o.send(function(i,o){if(i)return m.error("record event failed. ",i),m.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=r,u=n,c=o.EventsResponse.Results[a].EventsItemResponse[u],l=c.StatusCode,p=c.Message;return g.includes(l)?(s._endpointGenerating=!1,m.debug("record event success. ",o),t.resolve(o)):y.includes(l)?void s._retry(e,t):(m.error("Event "+n+" is not accepted, the error is "+p),t.reject(o))}),[2]})})},e.prototype._retry=function(e,t){var n=e.config.resendLimit;e.resendLimit="number"==typeof e.resendLimit?e.resendLimit:n,e.resendLimit-- >0?(m.debug("resending event "+e.eventName+" with "+e.resendLimit+" retry times left"),this._putToBuffer(e,t)):m.debug("retry times used up for event "+e.eventName)},e.prototype._record=function(e,t){return o(this,void 0,void 0,function(){var n,r,i,o;return a(this,function(a){return n=e.event,r=e.timestamp,i=e.config,o=e.credentials,this._initClients(i,o),[2,this._pinpointPutEvents(e,t)]})})},e.prototype._updateEndpoint=function(e,t){return o(this,void 0,void 0,function(){var n,r,i,o,s,c,l,p,f,d,h=this;return a(this,function(a){return n=e.timestamp,r=e.config,i=e.credentials,o=e.event,s=r.appId,c=r.region,l=r.endpointId,this._initClients(r,i),p=this._endpointRequest(r,u.JS.transferKeyToLowerCase(o,[],["attributes","userAttributes","Attributes","UserAttributes"])),f={ApplicationId:s,EndpointId:l,EndpointRequest:p},d=this,m.debug("updateEndpoint with params: ",f),d.pinpointClient.updateEndpoint(f,function(n,r){return n?(m.debug("updateEndpoint failed",n),"Exceeded maximum endpoint per user count 10"!==n.message?t.reject(n):void h._removeUnusedEndpoints(s,p.User.UserId).then(function(){m.debug("Remove the unused endpoints successfully"),h._retry(e,t)}).catch(function(e){return m.warn("Failed to remove unused endpoints with error: "+e),m.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(n)})):(m.debug("updateEndpoint success",r),h._endpointGenerating=!1,t.resolve(r))}),[2]})})},e.prototype._removeUnusedEndpoints=function(e,t){return o(this,void 0,void 0,function(){var n=this;return a(this,function(r){return[2,new Promise(function(r,i){n.pinpointClient.getUserEndpoints({ApplicationId:e,UserId:t},function(o,a){if(o)return m.debug("Failed to get endpoints associated with the userId: "+t+" with error",o),i(o);var s=a.EndpointsResponse.Item;m.debug("get endpoints associated with the userId: "+t+" with data",s);for(var u=s[0],c=1;c<s.length;c++){var l=Date.parse(u.EffectiveDate),p=Date.parse(s[c].EffectiveDate);if(isNaN(l))break;if(isNaN(p)){u=s[c];break}p<l&&(u=s[c])}var f={ApplicationId:e,EndpointId:u.Id,EndpointRequest:{User:{UserId:""}}};n.pinpointClient.updateEndpoint(f,function(e,t){return e?(m.debug("Failed to update the endpoint",e),i(e)):(m.debug("The old endpoint is updated with an empty string for user id"),r(t))})})})]})})},e.prototype._initClients=function(e,t){return o(this,void 0,void 0,function(){var n;return a(this,function(r){return m.debug("init clients"),this.mobileAnalytics&&this.pinpointClient&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId?(m.debug("no change for aws credentials, directly return from init"),[2]):(this._config.credentials=t,n=e.region,m.debug("init clients with credentials",t),this.mobileAnalytics=new c({credentials:t,region:n}),this.pinpointClient=new l({region:n,credentials:t}),u.Platform.isReactNative&&this.pinpointClient.customizeRequests(function(e){e.on("build",function(e){e.httpRequest.headers["user-agent"]=u.Platform.userAgent})}),[2])})})},e.prototype._getEndpointId=function(e){return o(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:return[4,p.default.getItem(e)];case 1:return t=n.sent(),m.debug("endpointId from cache",t,"type",void 0===t?"undefined":r(t)),t||(t=f.v1(),p.default.setItem(e,t)),[2,t]}})})},e.prototype._endpointRequest=function(e,t){var n=e.credentials,r=this._clientInfo||{},o=e.clientContext||{},a=e.endpoint||{},c={appVersion:r.appVersion,make:r.make,model:r.model,modelVersion:r.version,platform:r.platform},l=s(o,["clientId","appTitle","appVersionName","appVersionCode","appPackageName"]),p=t.address?"android"===r.platform?"GCM":"APNS":void 0,d=i({channelType:p,requestId:f.v1(),effectiveDate:(new Date).toISOString()},a,t,{attributes:i({},a.attributes,t.attributes),demographic:i({},c,l,a.demographic,t.demographic),location:i({},a.location,t.location),metrics:i({},a.metrics,t.metrics),user:{userId:t.userId||a.userId||n.identityId,userAttributes:i({},a.userAttributes,t.userAttributes)}}),h=(d.userId,d.userAttributes,d.name,d.session,d.eventId,d.immediate,s(d,["userId","userAttributes","name","session","eventId","immediate"]));return u.JS.transferKeyToUpperCase(h,[],["metrics","userAttributes","attributes"])},e.prototype._getCredentials=function(){return u.Credentials.get().then(function(e){return e?(m.debug("set credentials for analytics",e),u.Credentials.shear(e)):null}).catch(function(e){return m.debug("ensure credentials error",e),null})},e.category="Analytics",e.providerName="AWSPinpoint",e}();t.default=E},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(57),o=n(1),a=new o.ConsoleLogger("StorageCache"),s=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(){i.isInteger(this.config.capacityInBytes)||(a.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.defaultConfig.capacityInBytes),i.isInteger(this.config.itemMaxSize)||(a.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.defaultConfig.itemMaxSize),i.isInteger(this.config.defaultTTL)||(a.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultConfig.defaultTTL),i.isInteger(this.config.defaultPriority)||(a.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultConfig.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(a.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.defaultConfig.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(a.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultConfig.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(a.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.defaultConfig.warningThreshold),this.config.capacityInBytes>5242880&&(a.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.defaultConfig.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var o={key:e,data:t,timestamp:i.getCurrTime(),visitedTime:i.getCurrTime(),priority:n.priority,expires:n.expires,type:void 0===t?"undefined":r(t),byteSize:0};return o.byteSize=i.getByteLength(JSON.stringify(o)),o.byteSize=i.getByteLength(JSON.stringify(o)),o},e.prototype.configure=function(e){return e?(e.keyPrefix&&a.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}();t.default=s},function(e,t,n){"use strict";function r(e,t,n){if(void 0===n&&(n=!1),e&&1===e.nodeType&&t)for(var r,a=(n?[e]:[]).concat(o.default(e)),s=0;r=a[s];s++)if(i.default(r,t))return r}Object.defineProperty(t,"__esModule",{value:!0});var i=n(58),o=n(95);t.default=r},function(e,t,n){"use strict";function r(e){for(var t=[],n=e;n&&n.parentNode&&1===n.parentNode.nodeType;)n=n.parentNode,t.push(n);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){(function(e,r){var i;(function(){function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function s(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function u(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function c(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function l(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function p(e,t){return!!(null==e?0:e.length)&&E(e,t,0)>-1}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function d(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function h(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function m(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function y(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function g(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function v(e){return e.split("")}function b(e){return e.match(Mt)||[]}function _(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function S(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function E(e,t,n){return t===t?Y(e,t,n):S(e,w,n)}function I(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function w(e){return e!==e}function C(e,t){var n=null==e?0:e.length;return n?O(e,t)/n:Re}function T(e){return function(t){return null==t?ne:t[e]}}function N(e){return function(t){return null==e?ne:e[t]}}function A(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function k(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function O(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);o!==ne&&(n=n===ne?o:n+o)}return n}function P(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function R(e,t){return d(t,function(t){return[t,e[t]]})}function x(e){return function(t){return e(t)}}function D(e,t){return d(t,function(t){return e[t]})}function j(e,t){return e.has(t)}function M(e,t){for(var n=-1,r=e.length;++n<r&&E(t,e[n],0)>-1;);return n}function U(e,t){for(var n=e.length;n--&&E(t,e[n],0)>-1;);return n}function L(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function q(e){return"\\"+In[e]}function B(e,t){return null==e?ne:e[t]}function F(e){return hn.test(e)}function V(e){return mn.test(e)}function z(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function K(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function G(e,t){return function(n){return e(t(n))}}function H(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==se||(e[n]=se,o[i++]=n)}return o}function W(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function J(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function Y(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function X(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function Q(e){return F(e)?Z(e):Bn(e)}function $(e){return F(e)?ee(e):v(e)}function Z(e){for(var t=fn.lastIndex=0;fn.test(e);)++t;return t}function ee(e){return e.match(fn)||[]}function te(e){return e.match(dn)||[]}var ne,re=200,ie="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",oe="Expected a function",ae="__lodash_hash_undefined__",se="__lodash_placeholder__",ue=1,ce=2,le=4,pe=1,fe=2,de=1,he=2,me=4,ye=8,ge=16,ve=32,be=64,_e=128,Se=256,Ee=512,Ie=30,we="...",Ce=800,Te=16,Ne=1,Ae=2,ke=1/0,Oe=9007199254740991,Pe=1.7976931348623157e308,Re=NaN,xe=4294967295,De=xe-1,je=xe>>>1,Me=[["ary",_e],["bind",de],["bindKey",he],["curry",ye],["curryRight",ge],["flip",Ee],["partial",ve],["partialRight",be],["rearg",Se]],Ue="[object Arguments]",Le="[object Array]",qe="[object AsyncFunction]",Be="[object Boolean]",Fe="[object Date]",Ve="[object DOMException]",ze="[object Error]",Ke="[object Function]",Ge="[object GeneratorFunction]",He="[object Map]",We="[object Number]",Je="[object Null]",Ye="[object Object]",Xe="[object Proxy]",Qe="[object RegExp]",$e="[object Set]",Ze="[object String]",et="[object Symbol]",tt="[object Undefined]",nt="[object WeakMap]",rt="[object WeakSet]",it="[object ArrayBuffer]",ot="[object DataView]",at="[object Float32Array]",st="[object Float64Array]",ut="[object Int8Array]",ct="[object Int16Array]",lt="[object Int32Array]",pt="[object Uint8Array]",ft="[object Uint8ClampedArray]",dt="[object Uint16Array]",ht="[object Uint32Array]",mt=/\b__p \+= '';/g,yt=/\b(__p \+=) '' \+/g,gt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,_t=RegExp(vt.source),St=RegExp(bt.source),Et=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,wt=/<%=([\s\S]+?)%>/g,Ct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tt=/^\w*$/,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,At=/[\\^$.*+?()[\]{}|]/g,kt=RegExp(At.source),Ot=/^\s+|\s+$/g,Pt=/^\s+/,Rt=/\s+$/,xt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Dt=/\{\n\/\* \[wrapped with (.+)\] \*/,jt=/,? & /,Mt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ut=/\\(\\)?/g,Lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qt=/\w*$/,Bt=/^[-+]0x[0-9a-f]+$/i,Ft=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,zt=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Wt=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Yt="\\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",Xt="["+Yt+"]",Qt="["+Jt+"]",$t="[a-z\\xdf-\\xf6\\xf8-\\xff]",Zt="\\ud83c[\\udffb-\\udfff]",en="(?:\\ud83c[\\udde6-\\uddff]){2}",tn="[\\ud800-\\udbff][\\udc00-\\udfff]",nn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",rn="(?:"+$t+"|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])",on="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",an="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",en,tn].join("|")+")[\\ufe0e\\ufe0f]?"+on+")*",sn="[\\ufe0e\\ufe0f]?"+on+an,un="(?:"+["[\\u2700-\\u27bf]",en,tn].join("|")+")"+sn,cn="(?:"+["[^\\ud800-\\udfff]"+Qt+"?",Qt,en,tn,"[\\ud800-\\udfff]"].join("|")+")",ln=RegExp("['’]","g"),pn=RegExp(Qt,"g"),fn=RegExp(Zt+"(?="+Zt+")|"+cn+sn,"g"),dn=RegExp([nn+"?"+$t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Xt,nn,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\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\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Xt,nn+rn,"$"].join("|")+")",nn+"?"+rn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",nn+"+(?:['’](?: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_])","\\d+",un].join("|"),"g"),hn=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),mn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yn=["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"],gn=-1,vn={};vn[at]=vn[st]=vn[ut]=vn[ct]=vn[lt]=vn[pt]=vn[ft]=vn[dt]=vn[ht]=!0,vn[Ue]=vn[Le]=vn[it]=vn[Be]=vn[ot]=vn[Fe]=vn[ze]=vn[Ke]=vn[He]=vn[We]=vn[Ye]=vn[Qe]=vn[$e]=vn[Ze]=vn[nt]=!1;var bn={};bn[Ue]=bn[Le]=bn[it]=bn[ot]=bn[Be]=bn[Fe]=bn[at]=bn[st]=bn[ut]=bn[ct]=bn[lt]=bn[He]=bn[We]=bn[Ye]=bn[Qe]=bn[$e]=bn[Ze]=bn[et]=bn[pt]=bn[ft]=bn[dt]=bn[ht]=!0,bn[ze]=bn[Ke]=bn[nt]=!1;var _n={"À":"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","ć":"c","ĉ":"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","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"},Sn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},En={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},In={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wn=parseFloat,Cn=parseInt,Tn="object"==typeof e&&e&&e.Object===Object&&e,Nn="object"==typeof self&&self&&self.Object===Object&&self,An=Tn||Nn||Function("return this")(),kn="object"==typeof t&&t&&!t.nodeType&&t,On=kn&&"object"==typeof r&&r&&!r.nodeType&&r,Pn=On&&On.exports===kn,Rn=Pn&&Tn.process,xn=function(){try{return On&&On.require&&On.require("util").types||Rn&&Rn.binding&&Rn.binding("util")}catch(e){}}(),Dn=xn&&xn.isArrayBuffer,jn=xn&&xn.isDate,Mn=xn&&xn.isMap,Un=xn&&xn.isRegExp,Ln=xn&&xn.isSet,qn=xn&&xn.isTypedArray,Bn=T("length"),Fn=N(_n),Vn=N(Sn),zn=N(En),Kn=function e(t){function n(e){if(eu(e)&&!ff(e)&&!(e instanceof v)){if(e instanceof i)return e;if(pl.call(e,"__wrapped__"))return Qo(e)}return new i(e)}function r(){}function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ne}function v(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xe,this.__views__=[]}function N(){var e=new v(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e}function Y(){if(this.__filtered__){var e=new v(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Z(){var e=this.__wrapped__.value(),t=this.__dir__,n=ff(e),r=t<0,i=n?e.length:0,o=So(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,p=l.length,f=0,d=Fl(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return hi(e,this.__actions__);var h=[];e:for(;u--&&f<d;){c+=t;for(var m=-1,y=e[c];++m<p;){var g=l[m],v=g.iteratee,b=g.type,_=v(y);if(b==Ae)y=_;else if(!_){if(b==Ne)continue e;break e}}h[f++]=y}return h}function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mt(){this.__data__=Ql?Ql(null):{},this.size=0}function Jt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Yt(e){var t=this.__data__;if(Ql){var n=t[e];return n===ae?ne:n}return pl.call(t,e)?t[e]:ne}function Xt(e){var t=this.__data__;return Ql?t[e]!==ne:pl.call(t,e)}function Qt(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ql&&t===ne?ae:t,this}function $t(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Zt(){this.__data__=[],this.size=0}function en(e){var t=this.__data__,n=Hn(t,e);return!(n<0||(n==t.length-1?t.pop():Cl.call(t,n,1),--this.size,0))}function tn(e){var t=this.__data__,n=Hn(t,e);return n<0?ne:t[n][1]}function nn(e){return Hn(this.__data__,e)>-1}function rn(e,t){var n=this.__data__,r=Hn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function on(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function an(){this.size=0,this.__data__={hash:new ee,map:new(Wl||$t),string:new ee}}function sn(e){var t=go(this,e).delete(e);return this.size-=t?1:0,t}function un(e){return go(this,e).get(e)}function cn(e){return go(this,e).has(e)}function fn(e,t){var n=go(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function dn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new on;++t<n;)this.add(e[t])}function hn(e){return this.__data__.set(e,ae),this}function mn(e){return this.__data__.has(e)}function _n(e){var t=this.__data__=new $t(e);this.size=t.size}function Sn(){this.__data__=new $t,this.size=0}function En(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function In(e){return this.__data__.get(e)}function Tn(e){return this.__data__.has(e)}function Nn(e,t){var n=this.__data__;if(n instanceof $t){var r=n.__data__;if(!Wl||r.length<re-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new on(r)}return n.set(e,t),this.size=n.size,this}function kn(e,t){var n=ff(e),r=!n&&pf(e),i=!n&&!r&&hf(e),o=!n&&!r&&!i&&bf(e),a=n||r||i||o,s=a?P(e.length,il):[],u=s.length;for(var c in e)!t&&!pl.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ko(c,u))||s.push(c);return s}function On(e){var t=e.length;return t?e[Yr(0,t-1)]:ne}function Rn(e,t){return Wo(Pi(e),$n(t,0,e.length))}function xn(e){return Wo(Pi(e))}function Bn(e,t,n){(n===ne||Bs(e[t],n))&&(n!==ne||t in e)||Xn(e,t,n)}function Gn(e,t,n){var r=e[t];pl.call(e,t)&&Bs(r,n)&&(n!==ne||t in e)||Xn(e,t,n)}function Hn(e,t){for(var n=e.length;n--;)if(Bs(e[n][0],t))return n;return-1}function Wn(e,t,n,r){return cp(e,function(e,i,o){t(r,e,n(e),o)}),r}function Jn(e,t){return e&&Ri(t,ju(t),e)}function Yn(e,t){return e&&Ri(t,Mu(t),e)}function Xn(e,t,n){"__proto__"==t&&kl?kl(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qn(e,t){for(var n=-1,r=t.length,i=Qc(r),o=null==e;++n<r;)i[n]=o?ne:Ru(e,t[n]);return i}function $n(e,t,n){return e===e&&(n!==ne&&(e=e<=n?e:n),t!==ne&&(e=e>=t?e:t)),e}function Zn(e,t,n,r,i,o){var a,u=t&ue,c=t&ce,l=t&le;if(n&&(a=i?n(e,r,i,o):n(e)),a!==ne)return a;if(!Zs(e))return e;var p=ff(e);if(p){if(a=wo(e),!u)return Pi(e,a)}else{var f=Sp(e),d=f==Ke||f==Ge;if(hf(e))return Si(e,u);if(f==Ye||f==Ue||d&&!i){if(a=c||d?{}:Co(e),!u)return c?Di(e,Yn(a,e)):xi(e,Jn(a,e))}else{if(!bn[f])return i?e:{};a=To(e,f,u)}}o||(o=new _n);var h=o.get(e);if(h)return h;if(o.set(e,a),vf(e))return e.forEach(function(r){a.add(Zn(r,t,n,r,e,o))}),a;if(yf(e))return e.forEach(function(r,i){a.set(i,Zn(r,t,n,i,e,o))}),a;var m=l?c?fo:po:c?Mu:ju,y=p?ne:m(e);return s(y||e,function(r,i){y&&(i=r,r=e[i]),Gn(a,i,Zn(r,t,n,i,e,o))}),a}function er(e){var t=ju(e);return function(n){return tr(n,e,t)}}function tr(e,t,n){var r=n.length;if(null==e)return!r;for(e=nl(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===ne&&!(i in e)||!o(a))return!1}return!0}function nr(e,t,n){if("function"!=typeof e)throw new ol(oe);return wp(function(){e.apply(ne,n)},t)}function rr(e,t,n,r){var i=-1,o=p,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=d(t,x(n))),r?(o=f,a=!1):t.length>=re&&(o=j,a=!1,t=new dn(t));e:for(;++i<s;){var l=e[i],h=null==n?l:n(l);if(l=r||0!==l?l:0,a&&h===h){for(var m=c;m--;)if(t[m]===h)continue e;u.push(l)}else o(t,h,r)||u.push(l)}return u}function ir(e,t){var n=!0;return cp(e,function(e,r,i){return n=!!t(e,r,i)}),n}function or(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(s===ne?a===a&&!pu(a):n(a,s)))var s=a,u=o}return u}function ar(e,t,n,r){var i=e.length;for(n=gu(n),n<0&&(n=-n>i?0:i+n),r=r===ne||r>i?i:gu(r),r<0&&(r+=i),r=n>r?0:vu(r);n<r;)e[n++]=t;return e}function sr(e,t){var n=[];return cp(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function ur(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Ao),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?ur(s,t-1,n,r,i):h(i,s):r||(i[i.length]=s)}return i}function cr(e,t){return e&&pp(e,t,ju)}function lr(e,t){return e&&fp(e,t,ju)}function pr(e,t){return l(t,function(t){return Xs(e[t])})}function fr(e,t){t=bi(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[Jo(t[n++])];return n&&n==r?e:ne}function dr(e,t,n){var r=t(e);return ff(e)?r:h(r,n(e))}function hr(e){return null==e?e===ne?tt:Je:Al&&Al in nl(e)?_o(e):Bo(e)}function mr(e,t){return e>t}function yr(e,t){return null!=e&&pl.call(e,t)}function gr(e,t){return null!=e&&t in nl(e)}function vr(e,t,n){return e>=Fl(t,n)&&e<Bl(t,n)}function br(e,t,n){for(var r=n?f:p,i=e[0].length,o=e.length,a=o,s=Qc(o),u=1/0,c=[];a--;){var l=e[a];a&&t&&(l=d(l,x(t))),u=Fl(l.length,u),s[a]=!n&&(t||i>=120&&l.length>=120)?new dn(a&&l):ne}l=e[0];var h=-1,m=s[0];e:for(;++h<i&&c.length<u;){var y=l[h],g=t?t(y):y;if(y=n||0!==y?y:0,!(m?j(m,g):r(c,g,n))){for(a=o;--a;){var v=s[a];if(!(v?j(v,g):r(e[a],g,n)))continue e}m&&m.push(g),c.push(y)}}return c}function _r(e,t,n,r){return cr(e,function(e,i,o){t(r,n(e),i,o)}),r}function Sr(e,t,n){t=bi(t,e),e=Vo(e,t);var r=null==e?e:e[Jo(ya(t))];return null==r?ne:o(r,e,n)}function Er(e){return eu(e)&&hr(e)==Ue}function Ir(e){return eu(e)&&hr(e)==it}function wr(e){return eu(e)&&hr(e)==Fe}function Cr(e,t,n,r,i){return e===t||(null==e||null==t||!eu(e)&&!eu(t)?e!==e&&t!==t:Tr(e,t,n,r,Cr,i))}function Tr(e,t,n,r,i,o){var a=ff(e),s=ff(t),u=a?Le:Sp(e),c=s?Le:Sp(t);u=u==Ue?Ye:u,c=c==Ue?Ye:c;var l=u==Ye,p=c==Ye,f=u==c;if(f&&hf(e)){if(!hf(t))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new _n),a||bf(e)?so(e,t,n,r,i,o):uo(e,t,u,n,r,i,o);if(!(n&pe)){var d=l&&pl.call(e,"__wrapped__"),h=p&&pl.call(t,"__wrapped__");if(d||h){var m=d?e.value():e,y=h?t.value():t;return o||(o=new _n),i(m,y,n,r,o)}}return!!f&&(o||(o=new _n),co(e,t,n,r,i,o))}function Nr(e){return eu(e)&&Sp(e)==He}function Ar(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=nl(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var u=s[0],c=e[u],l=s[1];if(a&&s[2]){if(c===ne&&!(u in e))return!1}else{var p=new _n;if(r)var f=r(c,l,u,e,t,p);if(!(f===ne?Cr(l,c,pe|fe,r,p):f))return!1}}return!0}function kr(e){return!(!Zs(e)||Do(e))&&(Xs(e)?gl:Vt).test(Yo(e))}function Or(e){return eu(e)&&hr(e)==Qe}function Pr(e){return eu(e)&&Sp(e)==$e}function Rr(e){return eu(e)&&$s(e.length)&&!!vn[hr(e)]}function xr(e){return"function"==typeof e?e:null==e?Cc:"object"==typeof e?ff(e)?qr(e[0],e[1]):Lr(e):xc(e)}function Dr(e){if(!jo(e))return ql(e);var t=[];for(var n in nl(e))pl.call(e,n)&&"constructor"!=n&&t.push(n);return t}function jr(e){if(!Zs(e))return qo(e);var t=jo(e),n=[];for(var r in e)("constructor"!=r||!t&&pl.call(e,r))&&n.push(r);return n}function Mr(e,t){return e<t}function Ur(e,t){var n=-1,r=Fs(e)?Qc(e.length):[];return cp(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Lr(e){var t=vo(e);return 1==t.length&&t[0][2]?Uo(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function qr(e,t){return Po(e)&&Mo(t)?Uo(Jo(e),t):function(n){var r=Ru(n,e);return r===ne&&r===t?Du(n,e):Cr(t,r,pe|fe)}}function Br(e,t,n,r,i){e!==t&&pp(t,function(o,a){if(Zs(o))i||(i=new _n),Fr(e,t,a,n,Br,r,i);else{var s=r?r(Ko(e,a),o,a+"",e,t,i):ne;s===ne&&(s=o),Bn(e,a,s)}},Mu)}function Fr(e,t,n,r,i,o,a){var s=Ko(e,n),u=Ko(t,n),c=a.get(u);if(c)return void Bn(e,n,c);var l=o?o(s,u,n+"",e,t,a):ne,p=l===ne;if(p){var f=ff(u),d=!f&&hf(u),h=!f&&!d&&bf(u);l=u,f||d||h?ff(s)?l=s:Vs(s)?l=Pi(s):d?(p=!1,l=Si(u,!0)):h?(p=!1,l=Ti(u,!0)):l=[]:uu(u)||pf(u)?(l=s,pf(s)?l=_u(s):Zs(s)&&!Xs(s)||(l=Co(u))):p=!1}p&&(a.set(u,l),i(l,u,r,o,a),a.delete(u)),Bn(e,n,l)}function Vr(e,t){var n=e.length;if(n)return t+=t<0?n:0,ko(t,n)?e[t]:ne}function zr(e,t,n){var r=-1;return t=d(t.length?t:[Cc],x(yo())),k(Ur(e,function(e,n,i){return{criteria:d(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return Ai(e,t,n)})}function Kr(e,t){return Gr(e,t,function(t,n){return Du(e,n)})}function Gr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=fr(e,a);n(s,a)&&ti(o,bi(a,e),s)}return o}function Hr(e){return function(t){return fr(t,e)}}function Wr(e,t,n,r){var i=r?I:E,o=-1,a=t.length,s=e;for(e===t&&(t=Pi(t)),n&&(s=d(e,x(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Cl.call(s,u,1),Cl.call(e,u,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ko(i)?Cl.call(e,i,1):pi(e,i)}}return e}function Yr(e,t){return e+Dl(Kl()*(t-e+1))}function Xr(e,t,n,r){for(var i=-1,o=Bl(xl((t-e)/(n||1)),0),a=Qc(o);o--;)a[r?o:++i]=e,e+=n;return a}function Qr(e,t){var n="";if(!e||t<1||t>Oe)return n;do{t%2&&(n+=e),(t=Dl(t/2))&&(e+=e)}while(t);return n}function $r(e,t){return Cp(Fo(e,t,Cc),e+"")}function Zr(e){return On(Ju(e))}function ei(e,t){var n=Ju(e);return Wo(n,$n(t,0,n.length))}function ti(e,t,n,r){if(!Zs(e))return e;t=bi(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++i<o;){var u=Jo(t[i]),c=n;if(i!=a){var l=s[u];(c=r?r(l,u,s):ne)===ne&&(c=Zs(l)?l:ko(t[i+1])?[]:{})}Gn(s,u,c),s=s[u]}return e}function ni(e){return Wo(Ju(e))}function ri(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Qc(i);++r<i;)o[r]=e[r+t];return o}function ii(e,t){var n;return cp(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=je){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!pu(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,Cc,n)}function ai(e,t,n,r){t=n(t);for(var i=0,o=null==e?0:e.length,a=t!==t,s=null===t,u=pu(t),c=t===ne;i<o;){var l=Dl((i+o)/2),p=n(e[l]),f=p!==ne,d=null===p,h=p===p,m=pu(p);if(a)var y=r||h;else y=c?h&&(r||f):s?h&&f&&(r||!d):u?h&&f&&!d&&(r||!m):!d&&!m&&(r?p<=t:p<t);y?i=l+1:o=l}return Fl(o,De)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Bs(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:pu(e)?Re:+e}function ci(e){if("string"==typeof e)return e;if(ff(e))return d(e,ci)+"";if(pu(e))return sp?sp.call(e):"";var t=e+"";return"0"==t&&1/e==-ke?"-0":t}function li(e,t,n){var r=-1,i=p,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=f;else if(o>=re){var c=t?null:gp(e);if(c)return W(c);a=!1,i=j,u=new dn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var h=u.length;h--;)if(u[h]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function pi(e,t){return t=bi(t,e),null==(e=Vo(e,t))||delete e[Jo(ya(t))]}function fi(e,t,n,r){return ti(e,t,n(fr(e,t)),r)}function di(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function hi(e,t){var n=e;return n instanceof v&&(n=n.value()),m(t,function(e,t){return t.func.apply(t.thisArg,h([e],t.args))},n)}function mi(e,t,n){var r=e.length;if(r<2)return r?li(e[0]):[];for(var i=-1,o=Qc(r);++i<r;)for(var a=e[i],s=-1;++s<r;)s!=i&&(o[i]=rr(o[i]||a,e[s],t,n));return li(ur(o,1),t,n)}function yi(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:ne;n(a,e[r],s)}return a}function gi(e){return Vs(e)?e:[]}function vi(e){return"function"==typeof e?e:Cc}function bi(e,t){return ff(e)?e:Po(e,t)?[e]:Tp(Eu(e))}function _i(e,t,n){var r=e.length;return n=n===ne?r:n,!t&&n>=r?e:ri(e,t,n)}function Si(e,t){if(t)return e.slice();var n=e.length,r=Sl?Sl(n):new e.constructor(n);return e.copy(r),r}function Ei(e){var t=new e.constructor(e.byteLength);return new _l(t).set(new _l(e)),t}function Ii(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function wi(e){var t=new e.constructor(e.source,qt.exec(e));return t.lastIndex=e.lastIndex,t}function Ci(e){return ap?nl(ap.call(e)):{}}function Ti(e,t){var n=t?Ei(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ni(e,t){if(e!==t){var n=e!==ne,r=null===e,i=e===e,o=pu(e),a=t!==ne,s=null===t,u=t===t,c=pu(t);if(!s&&!c&&!o&&e>t||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!u)return-1}return 0}function Ai(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var u=Ni(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}function ki(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,u=t.length,c=Bl(o-a,0),l=Qc(u+c),p=!r;++s<u;)l[s]=t[s];for(;++i<a;)(p||i<o)&&(l[n[i]]=e[i]);for(;c--;)l[s++]=e[i++];return l}function Oi(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,u=-1,c=t.length,l=Bl(o-s,0),p=Qc(l+c),f=!r;++i<l;)p[i]=e[i];for(var d=i;++u<c;)p[d+u]=t[u];for(;++a<s;)(f||i<o)&&(p[d+n[a]]=e[i++]);return p}function Pi(e,t){var n=-1,r=e.length;for(t||(t=Qc(r));++n<r;)t[n]=e[n];return t}function Ri(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],u=r?r(n[s],e[s],s,n,e):ne;u===ne&&(u=e[s]),i?Xn(n,s,u):Gn(n,s,u)}return n}function xi(e,t){return Ri(e,bp(e),t)}function Di(e,t){return Ri(e,_p(e),t)}function ji(e,t){return function(n,r){var i=ff(n)?a:Wn,o=t?t():{};return i(n,e,yo(r,2),o)}}function Mi(e){return $r(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:ne,a=i>2?n[2]:ne;for(o=e.length>3&&"function"==typeof o?(i--,o):ne,a&&Oo(n[0],n[1],a)&&(o=i<3?ne:o,i=1),t=nl(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}function Ui(e,t){return function(n,r){if(null==n)return n;if(!Fs(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=nl(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Li(e){return function(t,n,r){for(var i=-1,o=nl(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function qi(e,t,n){function r(){return(this&&this!==An&&this instanceof r?o:e).apply(i?n:this,arguments)}var i=t&de,o=Vi(e);return r}function Bi(e){return function(t){t=Eu(t);var n=F(t)?$(t):ne,r=n?n[0]:t.charAt(0),i=n?_i(n,1).join(""):t.slice(1);return r[e]()+i}}function Fi(e){return function(t){return m(_c(ec(t).replace(ln,"")),e,"")}}function Vi(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 n=up(e.prototype),r=e.apply(n,t);return Zs(r)?r:n}}function zi(e,t,n){function r(){for(var a=arguments.length,s=Qc(a),u=a,c=mo(r);u--;)s[u]=arguments[u];var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:H(s,c);return(a-=l.length)<n?eo(e,t,Hi,r.placeholder,ne,s,l,ne,ne,n-a):o(this&&this!==An&&this instanceof r?i:e,this,s)}var i=Vi(e);return r}function Ki(e){return function(t,n,r){var i=nl(t);if(!Fs(t)){var o=yo(n,3);t=ju(t),n=function(e){return o(i[e],e,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:ne}}function Gi(e){return lo(function(t){var n=t.length,r=n,o=i.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ol(oe);if(o&&!s&&"wrapper"==ho(a))var s=new i([],!0)}for(r=s?r:n;++r<n;){a=t[r];var u=ho(a),c="wrapper"==u?vp(a):ne;s=c&&xo(c[0])&&c[1]==(_e|ye|ve|Se)&&!c[4].length&&1==c[9]?s[ho(c[0])].apply(s,c[3]):1==a.length&&xo(a)?s[u]():s.thru(a)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&ff(r))return s.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function Hi(e,t,n,r,i,o,a,s,u,c){function l(){for(var g=arguments.length,v=Qc(g),b=g;b--;)v[b]=arguments[b];if(h)var _=mo(l),S=L(v,_);if(r&&(v=ki(v,r,i,h)),o&&(v=Oi(v,o,a,h)),g-=S,h&&g<c){var E=H(v,_);return eo(e,t,Hi,l.placeholder,n,v,E,s,u,c-g)}var I=f?n:this,w=d?I[e]:e;return g=v.length,s?v=zo(v,s):m&&g>1&&v.reverse(),p&&u<g&&(v.length=u),this&&this!==An&&this instanceof l&&(w=y||Vi(w)),w.apply(I,v)}var p=t&_e,f=t&de,d=t&he,h=t&(ye|ge),m=t&Ee,y=d?ne:Vi(e);return l}function Wi(e,t){return function(n,r){return _r(n,e,t(r),{})}}function Ji(e,t){return function(n,r){var i;if(n===ne&&r===ne)return t;if(n!==ne&&(i=n),r!==ne){if(i===ne)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),i=e(n,r)}return i}}function Yi(e){return lo(function(t){return t=d(t,x(yo())),$r(function(n){var r=this;return e(t,function(e){return o(e,r,n)})})})}function Xi(e,t){t=t===ne?" ":ci(t);var n=t.length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,xl(e/Q(t)));return F(t)?_i($(r),0,e).join(""):r.slice(0,e)}function Qi(e,t,n,r){function i(){for(var t=-1,u=arguments.length,c=-1,l=r.length,p=Qc(l+u),f=this&&this!==An&&this instanceof i?s:e;++c<l;)p[c]=r[c];for(;u--;)p[c++]=arguments[++t];return o(f,a?n:this,p)}var a=t&de,s=Vi(e);return i}function $i(e){return function(t,n,r){return r&&"number"!=typeof r&&Oo(t,n,r)&&(n=r=ne),t=yu(t),n===ne?(n=t,t=0):n=yu(n),r=r===ne?t<n?1:-1:yu(r),Xr(t,n,r,e)}}function Zi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=bu(t),n=bu(n)),e(t,n)}}function eo(e,t,n,r,i,o,a,s,u,c){var l=t&ye,p=l?a:ne,f=l?ne:a,d=l?o:ne,h=l?ne:o;t|=l?ve:be,(t&=~(l?be:ve))&me||(t&=~(de|he));var m=[e,t,i,d,p,h,f,s,u,c],y=n.apply(ne,m);return xo(e)&&Ip(y,m),y.placeholder=r,Go(y,e,t)}function to(e){var t=tl[e];return function(e,n){if(e=bu(e),n=null==n?0:Fl(gu(n),292)){var r=(Eu(e)+"e").split("e");return r=(Eu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function no(e){return function(t){var n=Sp(t);return n==He?K(t):n==$e?J(t):R(t,e(t))}}function ro(e,t,n,r,i,o,a,s){var u=t&he;if(!u&&"function"!=typeof e)throw new ol(oe);var c=r?r.length:0;if(c||(t&=~(ve|be),r=i=ne),a=a===ne?a:Bl(gu(a),0),s=s===ne?s:gu(s),c-=i?i.length:0,t&be){var l=r,p=i;r=i=ne}var f=u?ne:vp(e),d=[e,t,n,r,i,l,p,o,a,s];if(f&&Lo(d,f),e=d[0],t=d[1],n=d[2],r=d[3],i=d[4],s=d[9]=d[9]===ne?u?0:e.length:Bl(d[9]-c,0),!s&&t&(ye|ge)&&(t&=~(ye|ge)),t&&t!=de)h=t==ye||t==ge?zi(e,t,s):t!=ve&&t!=(de|ve)||i.length?Hi.apply(ne,d):Qi(e,t,n,r);else var h=qi(e,t,n);return Go((f?dp:Ip)(h,d),e,t)}function io(e,t,n,r){return e===ne||Bs(e,ul[n])&&!pl.call(r,n)?t:e}function oo(e,t,n,r,i,o){return Zs(e)&&Zs(t)&&(o.set(t,e),Br(e,t,ne,oo,o),o.delete(t)),e}function ao(e){return uu(e)?ne:e}function so(e,t,n,r,i,o){var a=n&pe,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var l=-1,p=!0,f=n&fe?new dn:ne;for(o.set(e,t),o.set(t,e);++l<s;){var d=e[l],h=t[l];if(r)var m=a?r(h,d,l,t,e,o):r(d,h,l,e,t,o);if(m!==ne){if(m)continue;p=!1;break}if(f){if(!g(t,function(e,t){if(!j(f,t)&&(d===e||i(d,e,n,r,o)))return f.push(t)})){p=!1;break}}else if(d!==h&&!i(d,h,n,r,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function uo(e,t,n,r,i,o,a){switch(n){case ot:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case it:return!(e.byteLength!=t.byteLength||!o(new _l(e),new _l(t)));case Be:case Fe:case We:return Bs(+e,+t);case ze:return e.name==t.name&&e.message==t.message;case Qe:case Ze:return e==t+"";case He:var s=K;case $e:var u=r&pe;if(s||(s=W),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=fe,a.set(e,t);var l=so(s(e),s(t),r,i,o,a);return a.delete(e),l;case et:if(ap)return ap.call(e)==ap.call(t)}return!1}function co(e,t,n,r,i,o){var a=n&pe,s=po(e),u=s.length;if(u!=po(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:pl.call(t,l)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var f=!0;o.set(e,t),o.set(t,e);for(var d=a;++c<u;){l=s[c];var h=e[l],m=t[l];if(r)var y=a?r(m,h,l,t,e,o):r(h,m,l,e,t,o);if(!(y===ne?h===m||i(h,m,n,r,o):y)){f=!1;break}d||(d="constructor"==l)}if(f&&!d){var g=e.constructor,v=t.constructor;g!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof v&&v instanceof v)&&(f=!1)}return o.delete(e),o.delete(t),f}function lo(e){return Cp(Fo(e,ne,ua),e+"")}function po(e){return dr(e,ju,bp)}function fo(e){return dr(e,Mu,_p)}function ho(e){for(var t=e.name+"",n=Zl[t],r=pl.call(Zl,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function mo(e){return(pl.call(n,"placeholder")?n:e).placeholder}function yo(){var e=n.iteratee||Tc;return e=e===Tc?xr:e,arguments.length?e(arguments[0],arguments[1]):e}function go(e,t){var n=e.__data__;return Ro(t)?n["string"==typeof t?"string":"hash"]:n.map}function vo(e){for(var t=ju(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Mo(i)]}return t}function bo(e,t){var n=B(e,t);return kr(n)?n:ne}function _o(e){var t=pl.call(e,Al),n=e[Al];try{e[Al]=ne;var r=!0}catch(e){}var i=hl.call(e);return r&&(t?e[Al]=n:delete e[Al]),i}function So(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=Fl(t,e+a);break;case"takeRight":e=Bl(e,t-a)}}return{start:e,end:t}}function Eo(e){var t=e.match(Dt);return t?t[1].split(jt):[]}function Io(e,t,n){t=bi(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Jo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&$s(i)&&ko(a,i)&&(ff(e)||pf(e))}function wo(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&pl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Co(e){return"function"!=typeof e.constructor||jo(e)?{}:up(El(e))}function To(e,t,n){var r=e.constructor;switch(t){case it:return Ei(e);case Be:case Fe:return new r(+e);case ot:return Ii(e,n);case at:case st:case ut:case ct:case lt:case pt:case ft:case dt:case ht:return Ti(e,n);case He:return new r;case We:case Ze:return new r(e);case Qe:return wi(e);case $e:return new r;case et:return Ci(e)}}function No(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(xt,"{\n/* [wrapped with "+t+"] */\n")}function Ao(e){return ff(e)||pf(e)||!!(Tl&&e&&e[Tl])}function ko(e,t){var n=typeof e;return!!(t=null==t?Oe:t)&&("number"==n||"symbol"!=n&&Kt.test(e))&&e>-1&&e%1==0&&e<t}function Oo(e,t,n){if(!Zs(n))return!1;var r=typeof t;return!!("number"==r?Fs(n)&&ko(t,n.length):"string"==r&&t in n)&&Bs(n[t],e)}function Po(e,t){if(ff(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!pu(e))||Tt.test(e)||!Ct.test(e)||null!=t&&e in nl(t)}function Ro(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function xo(e){var t=ho(e),r=n[t];if("function"!=typeof r||!(t in v.prototype))return!1;if(e===r)return!0;var i=vp(r);return!!i&&e===i[0]}function Do(e){return!!dl&&dl in e}function jo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ul)}function Mo(e){return e===e&&!Zs(e)}function Uo(e,t){return function(n){return null!=n&&n[e]===t&&(t!==ne||e in nl(n))}}function Lo(e,t){var n=e[1],r=t[1],i=n|r,o=i<(de|he|_e),a=r==_e&&n==ye||r==_e&&n==Se&&e[7].length<=t[8]||r==(_e|Se)&&t[7].length<=t[8]&&n==ye;if(!o&&!a)return e;r&de&&(e[2]=t[2],i|=n&de?0:me);var s=t[3];if(s){var u=e[3];e[3]=u?ki(u,s,t[4]):s,e[4]=u?H(e[3],se):t[4]}return s=t[5],s&&(u=e[5],e[5]=u?Oi(u,s,t[6]):s,e[6]=u?H(e[5],se):t[6]),s=t[7],s&&(e[7]=s),r&_e&&(e[8]=null==e[8]?t[8]:Fl(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function qo(e){var t=[];if(null!=e)for(var n in nl(e))t.push(n);return t}function Bo(e){return hl.call(e)}function Fo(e,t,n){return t=Bl(t===ne?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=Bl(r.length-t,0),s=Qc(a);++i<a;)s[i]=r[t+i];i=-1;for(var u=Qc(t+1);++i<t;)u[i]=r[i];return u[t]=n(s),o(e,this,u)}}function Vo(e,t){return t.length<2?e:fr(e,ri(t,0,-1))}function zo(e,t){for(var n=e.length,r=Fl(t.length,n),i=Pi(e);r--;){var o=t[r];e[r]=ko(o,n)?i[o]:ne}return e}function Ko(e,t){if("__proto__"!=t)return e[t]}function Go(e,t,n){var r=t+"";return Cp(e,No(r,Xo(Eo(r),n)))}function Ho(e){var t=0,n=0;return function(){var r=Vl(),i=Te-(r-n);if(n=r,i>0){if(++t>=Ce)return arguments[0]}else t=0;return e.apply(ne,arguments)}}function Wo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ne?r:t;++n<t;){var o=Yr(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}function Jo(e){if("string"==typeof e||pu(e))return e;var t=e+"";return"0"==t&&1/e==-ke?"-0":t}function Yo(e){if(null!=e){try{return ll.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Xo(e,t){return s(Me,function(n){var r="_."+n[0];t&n[1]&&!p(e,r)&&e.push(r)}),e.sort()}function Qo(e){if(e instanceof v)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function $o(e,t,n){t=(n?Oo(e,t,n):t===ne)?1:Bl(gu(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,o=0,a=Qc(xl(r/t));i<r;)a[o++]=ri(e,i,i+=t);return a}function Zo(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function ea(){var e=arguments.length;if(!e)return[];for(var t=Qc(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return h(ff(n)?Pi(n):[n],ur(t,1))}function ta(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ne?1:gu(t),ri(e,t<0?0:t,r)):[]}function na(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ne?1:gu(t),t=r-t,ri(e,0,t<0?0:t)):[]}function ra(e,t){return e&&e.length?di(e,yo(t,3),!0,!0):[]}function ia(e,t){return e&&e.length?di(e,yo(t,3),!0):[]}function oa(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Oo(e,t,n)&&(n=0,r=i),ar(e,t,n,r)):[]}function aa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:gu(n);return i<0&&(i=Bl(r+i,0)),S(e,yo(t,3),i)}function sa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==ne&&(i=gu(n),i=n<0?Bl(r+i,0):Fl(i,r-1)),S(e,yo(t,3),i,!0)}function ua(e){return(null==e?0:e.length)?ur(e,1):[]}function ca(e){return(null==e?0:e.length)?ur(e,ke):[]}function la(e,t){return(null==e?0:e.length)?(t=t===ne?1:gu(t),ur(e,t)):[]}function pa(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function fa(e){return e&&e.length?e[0]:ne}function da(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:gu(n);return i<0&&(i=Bl(r+i,0)),E(e,t,i)}function ha(e){return(null==e?0:e.length)?ri(e,0,-1):[]}function ma(e,t){return null==e?"":Ll.call(e,t)}function ya(e){var t=null==e?0:e.length;return t?e[t-1]:ne}function ga(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==ne&&(i=gu(n),i=i<0?Bl(r+i,0):Fl(i,r-1)),t===t?X(e,t,i):S(e,w,i,!0)}function va(e,t){return e&&e.length?Vr(e,gu(t)):ne}function ba(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}function _a(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,yo(n,2)):e}function Sa(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ne,n):e}function Ea(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=yo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Jr(e,i),n}function Ia(e){return null==e?e:Gl.call(e)}function wa(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&Oo(e,t,n)?(t=0,n=r):(t=null==t?0:gu(t),n=n===ne?r:gu(n)),ri(e,t,n)):[]}function Ca(e,t){return oi(e,t)}function Ta(e,t,n){return ai(e,t,yo(n,2))}function Na(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Bs(e[r],t))return r}return-1}function Aa(e,t){return oi(e,t,!0)}function ka(e,t,n){return ai(e,t,yo(n,2),!0)}function Oa(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Bs(e[n],t))return n}return-1}function Pa(e){return e&&e.length?si(e):[]}function Ra(e,t){return e&&e.length?si(e,yo(t,2)):[]}function xa(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]}function Da(e,t,n){return e&&e.length?(t=n||t===ne?1:gu(t),ri(e,0,t<0?0:t)):[]}function ja(e,t,n){var r=null==e?0:e.length;return r?(t=n||t===ne?1:gu(t),t=r-t,ri(e,t<0?0:t,r)):[]}function Ma(e,t){return e&&e.length?di(e,yo(t,3),!1,!0):[]}function Ua(e,t){return e&&e.length?di(e,yo(t,3)):[]}function La(e){return e&&e.length?li(e):[]}function qa(e,t){return e&&e.length?li(e,yo(t,2)):[]}function Ba(e,t){return t="function"==typeof t?t:ne,e&&e.length?li(e,ne,t):[]}function Fa(e){if(!e||!e.length)return[];var t=0;return e=l(e,function(e){if(Vs(e))return t=Bl(e.length,t),!0}),P(t,function(t){return d(e,T(t))})}function Va(e,t){if(!e||!e.length)return[];var n=Fa(e);return null==t?n:d(n,function(e){return o(t,ne,e)})}function za(e,t){return yi(e||[],t||[],Gn)}function Ka(e,t){return yi(e||[],t||[],ti)}function Ga(e){var t=n(e);return t.__chain__=!0,t}function Ha(e,t){return t(e),e}function Wa(e,t){return t(e)}function Ja(){return Ga(this)}function Ya(){return new i(this.value(),this.__chain__)}function Xa(){this.__values__===ne&&(this.__values__=mu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?ne:this.__values__[this.__index__++]}}function Qa(){return this}function $a(e){for(var t,n=this;n instanceof r;){var i=Qo(n);i.__index__=0,i.__values__=ne,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function Za(){var e=this.__wrapped__;if(e instanceof v){var t=e;return this.__actions__.length&&(t=new v(this)),t=t.reverse(),t.__actions__.push({func:Wa,args:[Ia],thisArg:ne}),new i(t,this.__chain__)}return this.thru(Ia)}function es(){return hi(this.__wrapped__,this.__actions__)}function ts(e,t,n){var r=ff(e)?c:ir;return n&&Oo(e,t,n)&&(t=ne),r(e,yo(t,3))}function ns(e,t){return(ff(e)?l:sr)(e,yo(t,3))}function rs(e,t){return ur(cs(e,t),1)}function is(e,t){return ur(cs(e,t),ke)}function os(e,t,n){return n=n===ne?1:gu(n),ur(cs(e,t),n)}function as(e,t){return(ff(e)?s:cp)(e,yo(t,3))}function ss(e,t){return(ff(e)?u:lp)(e,yo(t,3))}function us(e,t,n,r){e=Fs(e)?e:Ju(e),n=n&&!r?gu(n):0;var i=e.length;return n<0&&(n=Bl(i+n,0)),lu(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&E(e,t,n)>-1}function cs(e,t){return(ff(e)?d:Ur)(e,yo(t,3))}function ls(e,t,n,r){return null==e?[]:(ff(t)||(t=null==t?[]:[t]),n=r?ne:n,ff(n)||(n=null==n?[]:[n]),zr(e,t,n))}function ps(e,t,n){var r=ff(e)?m:A,i=arguments.length<3;return r(e,yo(t,4),n,i,cp)}function fs(e,t,n){var r=ff(e)?y:A,i=arguments.length<3;return r(e,yo(t,4),n,i,lp)}function ds(e,t){return(ff(e)?l:sr)(e,Ns(yo(t,3)))}function hs(e){return(ff(e)?On:Zr)(e)}function ms(e,t,n){return t=(n?Oo(e,t,n):t===ne)?1:gu(t),(ff(e)?Rn:ei)(e,t)}function ys(e){return(ff(e)?xn:ni)(e)}function gs(e){if(null==e)return 0;if(Fs(e))return lu(e)?Q(e):e.length;var t=Sp(e);return t==He||t==$e?e.size:Dr(e).length}function vs(e,t,n){var r=ff(e)?g:ii;return n&&Oo(e,t,n)&&(t=ne),r(e,yo(t,3))}function bs(e,t){if("function"!=typeof t)throw new ol(oe);return e=gu(e),function(){if(--e<1)return t.apply(this,arguments)}}function _s(e,t,n){return t=n?ne:t,t=e&&null==t?e.length:t,ro(e,_e,ne,ne,ne,ne,t)}function Ss(e,t){var n;if("function"!=typeof t)throw new ol(oe);return e=gu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ne),n}}function Es(e,t,n){t=n?ne:t;var r=ro(e,ye,ne,ne,ne,ne,ne,t);return r.placeholder=Es.placeholder,r}function Is(e,t,n){t=n?ne:t;var r=ro(e,ge,ne,ne,ne,ne,ne,t);return r.placeholder=Is.placeholder,r}function ws(e,t,n){function r(t){var n=f,r=d;return f=d=ne,v=t,m=e.apply(r,n)}function i(e){return v=e,y=wp(s,t),b?r(e):m}function o(e){var n=e-g,r=e-v,i=t-n;return _?Fl(i,h-r):i}function a(e){var n=e-g,r=e-v;return g===ne||n>=t||n<0||_&&r>=h}function s(){var e=Zp();if(a(e))return u(e);y=wp(s,o(e))}function u(e){return y=ne,S&&f?r(e):(f=d=ne,m)}function c(){y!==ne&&yp(y),v=0,f=g=d=y=ne}function l(){return y===ne?m:u(Zp())}function p(){var e=Zp(),n=a(e);if(f=arguments,d=this,g=e,n){if(y===ne)return i(g);if(_)return y=wp(s,t),r(g)}return y===ne&&(y=wp(s,t)),m}var f,d,h,m,y,g,v=0,b=!1,_=!1,S=!0;if("function"!=typeof e)throw new ol(oe);return t=bu(t)||0,Zs(n)&&(b=!!n.leading,_="maxWait"in n,h=_?Bl(bu(n.maxWait)||0,t):h,S="trailing"in n?!!n.trailing:S),p.cancel=c,p.flush=l,p}function Cs(e){return ro(e,Ee)}function Ts(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ol(oe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ts.Cache||on),n}function Ns(e){if("function"!=typeof e)throw new ol(oe);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)}}function As(e){return Ss(2,e)}function ks(e,t){if("function"!=typeof e)throw new ol(oe);return t=t===ne?t:gu(t),$r(e,t)}function Os(e,t){if("function"!=typeof e)throw new ol(oe);return t=null==t?0:Bl(gu(t),0),$r(function(n){var r=n[t],i=_i(n,0,t);return r&&h(i,r),o(e,this,i)})}function Ps(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ol(oe);return Zs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ws(e,t,{leading:r,maxWait:t,trailing:i})}function Rs(e){return _s(e,1)}function xs(e,t){return af(vi(t),e)}function Ds(){if(!arguments.length)return[];var e=arguments[0];return ff(e)?e:[e]}function js(e){return Zn(e,le)}function Ms(e,t){return t="function"==typeof t?t:ne,Zn(e,le,t)}function Us(e){return Zn(e,ue|le)}function Ls(e,t){return t="function"==typeof t?t:ne,Zn(e,ue|le,t)}function qs(e,t){return null==t||tr(e,t,ju(t))}function Bs(e,t){return e===t||e!==e&&t!==t}function Fs(e){return null!=e&&$s(e.length)&&!Xs(e)}function Vs(e){return eu(e)&&Fs(e)}function zs(e){return!0===e||!1===e||eu(e)&&hr(e)==Be}function Ks(e){return eu(e)&&1===e.nodeType&&!uu(e)}function Gs(e){if(null==e)return!0;if(Fs(e)&&(ff(e)||"string"==typeof e||"function"==typeof e.splice||hf(e)||bf(e)||pf(e)))return!e.length;var t=Sp(e);if(t==He||t==$e)return!e.size;if(jo(e))return!Dr(e).length;for(var n in e)if(pl.call(e,n))return!1;return!0}function Hs(e,t){return Cr(e,t)}function Ws(e,t,n){n="function"==typeof n?n:ne;var r=n?n(e,t):ne;return r===ne?Cr(e,t,ne,n):!!r}function Js(e){if(!eu(e))return!1;var t=hr(e);return t==ze||t==Ve||"string"==typeof e.message&&"string"==typeof e.name&&!uu(e)}function Ys(e){return"number"==typeof e&&Ul(e)}function Xs(e){if(!Zs(e))return!1;var t=hr(e);return t==Ke||t==Ge||t==qe||t==Xe}function Qs(e){return"number"==typeof e&&e==gu(e)}function $s(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Oe}function Zs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eu(e){return null!=e&&"object"==typeof e}function tu(e,t){return e===t||Ar(e,t,vo(t))}function nu(e,t,n){return n="function"==typeof n?n:ne,Ar(e,t,vo(t),n)}function ru(e){return su(e)&&e!=+e}function iu(e){if(Ep(e))throw new Zc(ie);return kr(e)}function ou(e){return null===e}function au(e){return null==e}function su(e){return"number"==typeof e||eu(e)&&hr(e)==We}function uu(e){if(!eu(e)||hr(e)!=Ye)return!1;var t=El(e);if(null===t)return!0;var n=pl.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ll.call(n)==ml}function cu(e){return Qs(e)&&e>=-Oe&&e<=Oe}function lu(e){return"string"==typeof e||!ff(e)&&eu(e)&&hr(e)==Ze}function pu(e){return"symbol"==typeof e||eu(e)&&hr(e)==et}function fu(e){return e===ne}function du(e){return eu(e)&&Sp(e)==nt}function hu(e){return eu(e)&&hr(e)==rt}function mu(e){if(!e)return[];if(Fs(e))return lu(e)?$(e):Pi(e);if(Nl&&e[Nl])return z(e[Nl]());var t=Sp(e);return(t==He?K:t==$e?W:Ju)(e)}function yu(e){return e?(e=bu(e))===ke||e===-ke?(e<0?-1:1)*Pe:e===e?e:0:0===e?e:0}function gu(e){var t=yu(e),n=t%1;return t===t?n?t-n:t:0}function vu(e){return e?$n(gu(e),0,xe):0}function bu(e){if("number"==typeof e)return e;if(pu(e))return Re;if(Zs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Zs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ot,"");var n=Ft.test(e);return n||zt.test(e)?Cn(e.slice(2),n?2:8):Bt.test(e)?Re:+e}function _u(e){return Ri(e,Mu(e))}function Su(e){return e?$n(gu(e),-Oe,Oe):0===e?e:0}function Eu(e){return null==e?"":ci(e)}function Iu(e,t){var n=up(e);return null==t?n:Jn(n,t)}function wu(e,t){return _(e,yo(t,3),cr)}function Cu(e,t){return _(e,yo(t,3),lr)}function Tu(e,t){return null==e?e:pp(e,yo(t,3),Mu)}function Nu(e,t){return null==e?e:fp(e,yo(t,3),Mu)}function Au(e,t){return e&&cr(e,yo(t,3))}function ku(e,t){return e&&lr(e,yo(t,3))}function Ou(e){return null==e?[]:pr(e,ju(e))}function Pu(e){return null==e?[]:pr(e,Mu(e))}function Ru(e,t,n){var r=null==e?ne:fr(e,t);return r===ne?n:r}function xu(e,t){return null!=e&&Io(e,t,yr)}function Du(e,t){return null!=e&&Io(e,t,gr)}function ju(e){return Fs(e)?kn(e):Dr(e)}function Mu(e){return Fs(e)?kn(e,!0):jr(e)}function Uu(e,t){var n={};return t=yo(t,3),cr(e,function(e,r,i){Xn(n,t(e,r,i),e)}),n}function Lu(e,t){var n={};return t=yo(t,3),cr(e,function(e,r,i){Xn(n,r,t(e,r,i))}),n}function qu(e,t){return Bu(e,Ns(yo(t)))}function Bu(e,t){if(null==e)return{};var n=d(fo(e),function(e){return[e]});return t=yo(t),Gr(e,n,function(e,n){return t(e,n[0])})}function Fu(e,t,n){t=bi(t,e);var r=-1,i=t.length;for(i||(i=1,e=ne);++r<i;){var o=null==e?ne:e[Jo(t[r])];o===ne&&(r=i,o=n),e=Xs(o)?o.call(e):o}return e}function Vu(e,t,n){return null==e?e:ti(e,t,n)}function zu(e,t,n,r){return r="function"==typeof r?r:ne,null==e?e:ti(e,t,n,r)}function Ku(e,t,n){var r=ff(e),i=r||hf(e)||bf(e);if(t=yo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Zs(e)&&Xs(o)?up(El(e)):{}}return(i?s:cr)(e,function(e,r,i){return t(n,e,r,i)}),n}function Gu(e,t){return null==e||pi(e,t)}function Hu(e,t,n){return null==e?e:fi(e,t,vi(n))}function Wu(e,t,n,r){return r="function"==typeof r?r:ne,null==e?e:fi(e,t,vi(n),r)}function Ju(e){return null==e?[]:D(e,ju(e))}function Yu(e){return null==e?[]:D(e,Mu(e))}function Xu(e,t,n){return n===ne&&(n=t,t=ne),n!==ne&&(n=bu(n),n=n===n?n:0),t!==ne&&(t=bu(t),t=t===t?t:0),$n(bu(e),t,n)}function Qu(e,t,n){return t=yu(t),n===ne?(n=t,t=0):n=yu(n),e=bu(e),vr(e,t,n)}function $u(e,t,n){if(n&&"boolean"!=typeof n&&Oo(e,t,n)&&(t=n=ne),n===ne&&("boolean"==typeof t?(n=t,t=ne):"boolean"==typeof e&&(n=e,e=ne)),e===ne&&t===ne?(e=0,t=1):(e=yu(e),t===ne?(t=e,e=0):t=yu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Kl();return Fl(e+i*(t-e+wn("1e-"+((i+"").length-1))),t)}return Yr(e,t)}function Zu(e){return Gf(Eu(e).toLowerCase())}function ec(e){return(e=Eu(e))&&e.replace(Gt,Fn).replace(pn,"")}function tc(e,t,n){e=Eu(e),t=ci(t);var r=e.length;n=n===ne?r:$n(gu(n),0,r);var i=n;return(n-=t.length)>=0&&e.slice(n,i)==t}function nc(e){return e=Eu(e),e&&St.test(e)?e.replace(bt,Vn):e}function rc(e){return e=Eu(e),e&&kt.test(e)?e.replace(At,"\\$&"):e}function ic(e,t,n){e=Eu(e),t=gu(t);var r=t?Q(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Xi(Dl(i),n)+e+Xi(xl(i),n)}function oc(e,t,n){e=Eu(e),t=gu(t);var r=t?Q(e):0;return t&&r<t?e+Xi(t-r,n):e}function ac(e,t,n){e=Eu(e),t=gu(t);var r=t?Q(e):0;return t&&r<t?Xi(t-r,n)+e:e}function sc(e,t,n){return n||null==t?t=0:t&&(t=+t),zl(Eu(e).replace(Pt,""),t||0)}function uc(e,t,n){return t=(n?Oo(e,t,n):t===ne)?1:gu(t),Qr(Eu(e),t)}function cc(){var e=arguments,t=Eu(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function lc(e,t,n){return n&&"number"!=typeof n&&Oo(e,t,n)&&(t=n=ne),(n=n===ne?xe:n>>>0)?(e=Eu(e),e&&("string"==typeof t||null!=t&&!gf(t))&&!(t=ci(t))&&F(e)?_i($(e),0,n):e.split(t,n)):[]}function pc(e,t,n){return e=Eu(e),n=null==n?0:$n(gu(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t}function fc(e,t,r){var i=n.templateSettings;r&&Oo(e,t,r)&&(t=ne),e=Eu(e),t=wf({},t,i,io);var o,a,s=wf({},t.imports,i.imports,io),u=ju(s),c=D(s,u),l=0,p=t.interpolate||Ht,f="__p += '",d=rl((t.escape||Ht).source+"|"+p.source+"|"+(p===wt?Lt:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),h="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++gn+"]")+"\n";e.replace(d,function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Wt,q),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),f+="';\n";var m=t.variable;m||(f="with (obj) {\n"+f+"\n}\n"),f=(a?f.replace(mt,""):f).replace(yt,"$1").replace(gt,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Hf(function(){return el(u,h+"return "+f).apply(ne,c)});if(y.source=f,Js(y))throw y;return y}function dc(e){return Eu(e).toLowerCase()}function hc(e){return Eu(e).toUpperCase()}function mc(e,t,n){if((e=Eu(e))&&(n||t===ne))return e.replace(Ot,"");if(!e||!(t=ci(t)))return e;var r=$(e),i=$(t);return _i(r,M(r,i),U(r,i)+1).join("")}function yc(e,t,n){if((e=Eu(e))&&(n||t===ne))return e.replace(Rt,"");if(!e||!(t=ci(t)))return e;var r=$(e);return _i(r,0,U(r,$(t))+1).join("")}function gc(e,t,n){if((e=Eu(e))&&(n||t===ne))return e.replace(Pt,"");if(!e||!(t=ci(t)))return e;var r=$(e);return _i(r,M(r,$(t))).join("")}function vc(e,t){var n=Ie,r=we;if(Zs(t)){var i="separator"in t?t.separator:i;n="length"in t?gu(t.length):n,r="omission"in t?ci(t.omission):r}e=Eu(e);var o=e.length;if(F(e)){var a=$(e);o=a.length}if(n>=o)return e;var s=n-Q(r);if(s<1)return r;var u=a?_i(a,0,s).join(""):e.slice(0,s);if(i===ne)return u+r;if(a&&(s+=u.length-s),gf(i)){if(e.slice(s).search(i)){var c,l=u;for(i.global||(i=rl(i.source,Eu(qt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var p=c.index;u=u.slice(0,p===ne?s:p)}}else if(e.indexOf(ci(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r}function bc(e){return e=Eu(e),e&&_t.test(e)?e.replace(vt,zn):e}function _c(e,t,n){return e=Eu(e),t=n?ne:t,t===ne?V(e)?te(e):b(e):e.match(t)||[]}function Sc(e){var t=null==e?0:e.length,n=yo();return e=t?d(e,function(e){if("function"!=typeof e[1])throw new ol(oe);return[n(e[0]),e[1]]}):[],$r(function(n){for(var r=-1;++r<t;){var i=e[r];if(o(i[0],this,n))return o(i[1],this,n)}})}function Ec(e){return er(Zn(e,ue))}function Ic(e){return function(){return e}}function wc(e,t){return null==e||e!==e?t:e}function Cc(e){return e}function Tc(e){return xr("function"==typeof e?e:Zn(e,ue))}function Nc(e){return Lr(Zn(e,ue))}function Ac(e,t){return qr(e,Zn(t,ue))}function kc(e,t,n){var r=ju(t),i=pr(t,r);null!=n||Zs(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=pr(t,ju(t)));var o=!(Zs(n)&&"chain"in n&&!n.chain),a=Xs(e);return s(i,function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Pi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,h([this.value()],arguments))})}),e}function Oc(){return An._===this&&(An._=yl),this}function Pc(){}function Rc(e){return e=gu(e),$r(function(t){return Vr(t,e)})}function xc(e){return Po(e)?T(Jo(e)):Hr(e)}function Dc(e){return function(t){return null==e?ne:fr(e,t)}}function jc(){return[]}function Mc(){return!1}function Uc(){return{}}function Lc(){return""}function qc(){return!0}function Bc(e,t){if((e=gu(e))<1||e>Oe)return[];var n=xe,r=Fl(e,xe);t=yo(t),e-=xe;for(var i=P(r,t);++n<e;)t(n);return i}function Fc(e){return ff(e)?d(e,Jo):pu(e)?[e]:Pi(Tp(Eu(e)))}function Vc(e){var t=++fl;return Eu(e)+t}function zc(e){return e&&e.length?or(e,Cc,mr):ne}function Kc(e,t){return e&&e.length?or(e,yo(t,2),mr):ne}function Gc(e){return C(e,Cc)}function Hc(e,t){return C(e,yo(t,2))}function Wc(e){return e&&e.length?or(e,Cc,Mr):ne}function Jc(e,t){return e&&e.length?or(e,yo(t,2),Mr):ne}function Yc(e){return e&&e.length?O(e,Cc):0}function Xc(e,t){return e&&e.length?O(e,yo(t,2)):0}t=null==t?An:Kn.defaults(An.Object(),t,Kn.pick(An,yn));var Qc=t.Array,$c=t.Date,Zc=t.Error,el=t.Function,tl=t.Math,nl=t.Object,rl=t.RegExp,il=t.String,ol=t.TypeError,al=Qc.prototype,sl=el.prototype,ul=nl.prototype,cl=t["__core-js_shared__"],ll=sl.toString,pl=ul.hasOwnProperty,fl=0,dl=function(){var e=/[^.]+$/.exec(cl&&cl.keys&&cl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),hl=ul.toString,ml=ll.call(nl),yl=An._,gl=rl("^"+ll.call(pl).replace(At,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vl=Pn?t.Buffer:ne,bl=t.Symbol,_l=t.Uint8Array,Sl=vl?vl.allocUnsafe:ne,El=G(nl.getPrototypeOf,nl),Il=nl.create,wl=ul.propertyIsEnumerable,Cl=al.splice,Tl=bl?bl.isConcatSpreadable:ne,Nl=bl?bl.iterator:ne,Al=bl?bl.toStringTag:ne,kl=function(){try{var e=bo(nl,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ol=t.clearTimeout!==An.clearTimeout&&t.clearTimeout,Pl=$c&&$c.now!==An.Date.now&&$c.now,Rl=t.setTimeout!==An.setTimeout&&t.setTimeout,xl=tl.ceil,Dl=tl.floor,jl=nl.getOwnPropertySymbols,Ml=vl?vl.isBuffer:ne,Ul=t.isFinite,Ll=al.join,ql=G(nl.keys,nl),Bl=tl.max,Fl=tl.min,Vl=$c.now,zl=t.parseInt,Kl=tl.random,Gl=al.reverse,Hl=bo(t,"DataView"),Wl=bo(t,"Map"),Jl=bo(t,"Promise"),Yl=bo(t,"Set"),Xl=bo(t,"WeakMap"),Ql=bo(nl,"create"),$l=Xl&&new Xl,Zl={},ep=Yo(Hl),tp=Yo(Wl),np=Yo(Jl),rp=Yo(Yl),ip=Yo(Xl),op=bl?bl.prototype:ne,ap=op?op.valueOf:ne,sp=op?op.toString:ne,up=function(){function e(){}return function(t){if(!Zs(t))return{};if(Il)return Il(t);e.prototype=t;var n=new e;return e.prototype=ne,n}}();n.templateSettings={escape:Et,evaluate:It,interpolate:wt,variable:"",imports:{_:n}},n.prototype=r.prototype,n.prototype.constructor=n,i.prototype=up(r.prototype),i.prototype.constructor=i,v.prototype=up(r.prototype),v.prototype.constructor=v,ee.prototype.clear=Mt,ee.prototype.delete=Jt,ee.prototype.get=Yt,ee.prototype.has=Xt,ee.prototype.set=Qt,$t.prototype.clear=Zt,$t.prototype.delete=en,$t.prototype.get=tn,$t.prototype.has=nn,$t.prototype.set=rn,on.prototype.clear=an,on.prototype.delete=sn,on.prototype.get=un,on.prototype.has=cn,on.prototype.set=fn,dn.prototype.add=dn.prototype.push=hn,dn.prototype.has=mn,_n.prototype.clear=Sn,_n.prototype.delete=En,_n.prototype.get=In,_n.prototype.has=Tn,_n.prototype.set=Nn;var cp=Ui(cr),lp=Ui(lr,!0),pp=Li(),fp=Li(!0),dp=$l?function(e,t){return $l.set(e,t),e}:Cc,hp=kl?function(e,t){return kl(e,"toString",{configurable:!0,enumerable:!1,value:Ic(t),writable:!0})}:Cc,mp=$r,yp=Ol||function(e){return An.clearTimeout(e)},gp=Yl&&1/W(new Yl([,-0]))[1]==ke?function(e){return new Yl(e)}:Pc,vp=$l?function(e){return $l.get(e)}:Pc,bp=jl?function(e){return null==e?[]:(e=nl(e),l(jl(e),function(t){return wl.call(e,t)}))}:jc,_p=jl?function(e){for(var t=[];e;)h(t,bp(e)),e=El(e);return t}:jc,Sp=hr;(Hl&&Sp(new Hl(new ArrayBuffer(1)))!=ot||Wl&&Sp(new Wl)!=He||Jl&&"[object Promise]"!=Sp(Jl.resolve())||Yl&&Sp(new Yl)!=$e||Xl&&Sp(new Xl)!=nt)&&(Sp=function(e){var t=hr(e),n=t==Ye?e.constructor:ne,r=n?Yo(n):"";if(r)switch(r){case ep:return ot;case tp:return He;case np:return"[object Promise]";case rp:return $e;case ip:return nt}return t});var Ep=cl?Xs:Mc,Ip=Ho(dp),wp=Rl||function(e,t){return An.setTimeout(e,t)},Cp=Ho(hp),Tp=function(e){var t=Ts(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Nt,function(e,n,r,i){t.push(r?i.replace(Ut,"$1"):n||e)}),t}),Np=$r(function(e,t){return Vs(e)?rr(e,ur(t,1,Vs,!0)):[]}),Ap=$r(function(e,t){var n=ya(t);return Vs(n)&&(n=ne),Vs(e)?rr(e,ur(t,1,Vs,!0),yo(n,2)):[]}),kp=$r(function(e,t){var n=ya(t);return Vs(n)&&(n=ne),Vs(e)?rr(e,ur(t,1,Vs,!0),ne,n):[]}),Op=$r(function(e){var t=d(e,gi);return t.length&&t[0]===e[0]?br(t):[]}),Pp=$r(function(e){var t=ya(e),n=d(e,gi);return t===ya(n)?t=ne:n.pop(),n.length&&n[0]===e[0]?br(n,yo(t,2)):[]}),Rp=$r(function(e){var t=ya(e),n=d(e,gi);return t="function"==typeof t?t:ne,t&&n.pop(),n.length&&n[0]===e[0]?br(n,ne,t):[]}),xp=$r(ba),Dp=lo(function(e,t){var n=null==e?0:e.length,r=Qn(e,t);return Jr(e,d(t,function(e){return ko(e,n)?+e:e}).sort(Ni)),r}),jp=$r(function(e){return li(ur(e,1,Vs,!0))}),Mp=$r(function(e){var t=ya(e);return Vs(t)&&(t=ne),li(ur(e,1,Vs,!0),yo(t,2))}),Up=$r(function(e){var t=ya(e);return t="function"==typeof t?t:ne,li(ur(e,1,Vs,!0),ne,t)}),Lp=$r(function(e,t){return Vs(e)?rr(e,t):[]}),qp=$r(function(e){return mi(l(e,Vs))}),Bp=$r(function(e){var t=ya(e);return Vs(t)&&(t=ne),mi(l(e,Vs),yo(t,2))}),Fp=$r(function(e){var t=ya(e);return t="function"==typeof t?t:ne,mi(l(e,Vs),ne,t)}),Vp=$r(Fa),zp=$r(function(e){var t=e.length,n=t>1?e[t-1]:ne;return n="function"==typeof n?(e.pop(),n):ne,Va(e,n)}),Kp=lo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Qn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof v&&ko(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Wa,args:[o],thisArg:ne}),new i(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ne),e})):this.thru(o)}),Gp=ji(function(e,t,n){pl.call(e,n)?++e[n]:Xn(e,n,1)}),Hp=Ki(aa),Wp=Ki(sa),Jp=ji(function(e,t,n){pl.call(e,n)?e[n].push(t):Xn(e,n,[t])}),Yp=$r(function(e,t,n){var r=-1,i="function"==typeof t,a=Fs(e)?Qc(e.length):[];return cp(e,function(e){a[++r]=i?o(t,e,n):Sr(e,t,n)}),a}),Xp=ji(function(e,t,n){Xn(e,n,t)}),Qp=ji(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),$p=$r(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Oo(e,t[0],t[1])?t=[]:n>2&&Oo(t[0],t[1],t[2])&&(t=[t[0]]),zr(e,ur(t,1),[])}),Zp=Pl||function(){return An.Date.now()},ef=$r(function(e,t,n){var r=de;if(n.length){var i=H(n,mo(ef));r|=ve}return ro(e,r,t,n,i)}),tf=$r(function(e,t,n){var r=de|he;if(n.length){var i=H(n,mo(tf));r|=ve}return ro(t,r,e,n,i)}),nf=$r(function(e,t){return nr(e,1,t)}),rf=$r(function(e,t,n){return nr(e,bu(t)||0,n)});Ts.Cache=on;var of=mp(function(e,t){t=1==t.length&&ff(t[0])?d(t[0],x(yo())):d(ur(t,1),x(yo()));var n=t.length;return $r(function(r){for(var i=-1,a=Fl(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return o(e,this,r)})}),af=$r(function(e,t){var n=H(t,mo(af));return ro(e,ve,ne,t,n)}),sf=$r(function(e,t){var n=H(t,mo(sf));return ro(e,be,ne,t,n)}),uf=lo(function(e,t){return ro(e,Se,ne,ne,ne,t)}),cf=Zi(mr),lf=Zi(function(e,t){return e>=t}),pf=Er(function(){return arguments}())?Er:function(e){return eu(e)&&pl.call(e,"callee")&&!wl.call(e,"callee")},ff=Qc.isArray,df=Dn?x(Dn):Ir,hf=Ml||Mc,mf=jn?x(jn):wr,yf=Mn?x(Mn):Nr,gf=Un?x(Un):Or,vf=Ln?x(Ln):Pr,bf=qn?x(qn):Rr,_f=Zi(Mr),Sf=Zi(function(e,t){return e<=t}),Ef=Mi(function(e,t){if(jo(t)||Fs(t))return void Ri(t,ju(t),e);for(var n in t)pl.call(t,n)&&Gn(e,n,t[n])}),If=Mi(function(e,t){Ri(t,Mu(t),e)}),wf=Mi(function(e,t,n,r){Ri(t,Mu(t),e,r)}),Cf=Mi(function(e,t,n,r){Ri(t,ju(t),e,r)}),Tf=lo(Qn),Nf=$r(function(e,t){e=nl(e);var n=-1,r=t.length,i=r>2?t[2]:ne;for(i&&Oo(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Mu(o),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(l===ne||Bs(l,ul[c])&&!pl.call(e,c))&&(e[c]=o[c])}return e}),Af=$r(function(e){return e.push(ne,oo),o(xf,ne,e)}),kf=Wi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=hl.call(t)),e[t]=n},Ic(Cc)),Of=Wi(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=hl.call(t)),pl.call(e,t)?e[t].push(n):e[t]=[n]},yo),Pf=$r(Sr),Rf=Mi(function(e,t,n){Br(e,t,n)}),xf=Mi(function(e,t,n,r){Br(e,t,n,r)}),Df=lo(function(e,t){var n={};if(null==e)return n;var r=!1;t=d(t,function(t){return t=bi(t,e),r||(r=t.length>1),t}),Ri(e,fo(e),n),r&&(n=Zn(n,ue|ce|le,ao));for(var i=t.length;i--;)pi(n,t[i]);return n}),jf=lo(function(e,t){return null==e?{}:Kr(e,t)}),Mf=no(ju),Uf=no(Mu),Lf=Fi(function(e,t,n){return t=t.toLowerCase(),e+(n?Zu(t):t)}),qf=Fi(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Bf=Fi(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ff=Bi("toLowerCase"),Vf=Fi(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),zf=Fi(function(e,t,n){return e+(n?" ":"")+Gf(t)}),Kf=Fi(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Gf=Bi("toUpperCase"),Hf=$r(function(e,t){try{return o(e,ne,t)}catch(e){return Js(e)?e:new Zc(e)}}),Wf=lo(function(e,t){return s(t,function(t){t=Jo(t),Xn(e,t,ef(e[t],e))}),e}),Jf=Gi(),Yf=Gi(!0),Xf=$r(function(e,t){return function(n){return Sr(n,e,t)}}),Qf=$r(function(e,t){return function(n){return Sr(e,n,t)}}),$f=Yi(d),Zf=Yi(c),ed=Yi(g),td=$i(),nd=$i(!0),rd=Ji(function(e,t){return e+t},0),id=to("ceil"),od=Ji(function(e,t){return e/t},1),ad=to("floor"),sd=Ji(function(e,t){return e*t},1),ud=to("round"),cd=Ji(function(e,t){return e-t},0);return n.after=bs,n.ary=_s,n.assign=Ef,n.assignIn=If,n.assignInWith=wf,n.assignWith=Cf,n.at=Tf,n.before=Ss,n.bind=ef,n.bindAll=Wf,n.bindKey=tf,n.castArray=Ds,n.chain=Ga,n.chunk=$o,n.compact=Zo,n.concat=ea,n.cond=Sc,n.conforms=Ec,n.constant=Ic,n.countBy=Gp,n.create=Iu,n.curry=Es,n.curryRight=Is,n.debounce=ws,n.defaults=Nf,n.defaultsDeep=Af,n.defer=nf,n.delay=rf,n.difference=Np,n.differenceBy=Ap,n.differenceWith=kp,n.drop=ta,n.dropRight=na,n.dropRightWhile=ra,n.dropWhile=ia,n.fill=oa,n.filter=ns,n.flatMap=rs,n.flatMapDeep=is,n.flatMapDepth=os,n.flatten=ua,n.flattenDeep=ca,n.flattenDepth=la,n.flip=Cs,n.flow=Jf,n.flowRight=Yf,n.fromPairs=pa,n.functions=Ou,n.functionsIn=Pu,n.groupBy=Jp,n.initial=ha,n.intersection=Op,n.intersectionBy=Pp,n.intersectionWith=Rp,n.invert=kf,n.invertBy=Of,n.invokeMap=Yp,n.iteratee=Tc,n.keyBy=Xp,n.keys=ju,n.keysIn=Mu,n.map=cs,n.mapKeys=Uu,n.mapValues=Lu,n.matches=Nc,n.matchesProperty=Ac,n.memoize=Ts,n.merge=Rf,n.mergeWith=xf,n.method=Xf,n.methodOf=Qf,n.mixin=kc,n.negate=Ns,n.nthArg=Rc,n.omit=Df,n.omitBy=qu,n.once=As,n.orderBy=ls,n.over=$f,n.overArgs=of,n.overEvery=Zf,n.overSome=ed,n.partial=af,n.partialRight=sf,n.partition=Qp,n.pick=jf,n.pickBy=Bu,n.property=xc,n.propertyOf=Dc,n.pull=xp,n.pullAll=ba,n.pullAllBy=_a,n.pullAllWith=Sa,n.pullAt=Dp,n.range=td,n.rangeRight=nd,n.rearg=uf,n.reject=ds,n.remove=Ea,n.rest=ks,n.reverse=Ia,n.sampleSize=ms,n.set=Vu,n.setWith=zu,n.shuffle=ys,n.slice=wa,n.sortBy=$p,n.sortedUniq=Pa,n.sortedUniqBy=Ra,n.split=lc,n.spread=Os,n.tail=xa,n.take=Da,n.takeRight=ja,n.takeRightWhile=Ma,n.takeWhile=Ua,n.tap=Ha,n.throttle=Ps,n.thru=Wa,n.toArray=mu,n.toPairs=Mf,n.toPairsIn=Uf,n.toPath=Fc,n.toPlainObject=_u,n.transform=Ku,n.unary=Rs,n.union=jp,n.unionBy=Mp,n.unionWith=Up,n.uniq=La,n.uniqBy=qa,n.uniqWith=Ba,n.unset=Gu,n.unzip=Fa,n.unzipWith=Va,n.update=Hu,n.updateWith=Wu,n.values=Ju,n.valuesIn=Yu,n.without=Lp,n.words=_c,n.wrap=xs,n.xor=qp,n.xorBy=Bp,n.xorWith=Fp,n.zip=Vp,n.zipObject=za,n.zipObjectDeep=Ka,n.zipWith=zp,n.entries=Mf,n.entriesIn=Uf,n.extend=If,n.extendWith=wf,kc(n,n),n.add=rd,n.attempt=Hf,n.camelCase=Lf,n.capitalize=Zu,n.ceil=id,n.clamp=Xu,n.clone=js,n.cloneDeep=Us,n.cloneDeepWith=Ls,n.cloneWith=Ms,n.conformsTo=qs,n.deburr=ec,n.defaultTo=wc,n.divide=od,n.endsWith=tc,n.eq=Bs,n.escape=nc,n.escapeRegExp=rc,n.every=ts,n.find=Hp,n.findIndex=aa,n.findKey=wu,n.findLast=Wp,n.findLastIndex=sa,n.findLastKey=Cu,n.floor=ad,n.forEach=as,n.forEachRight=ss,n.forIn=Tu,n.forInRight=Nu,n.forOwn=Au,n.forOwnRight=ku,n.get=Ru,n.gt=cf,n.gte=lf,n.has=xu,n.hasIn=Du,n.head=fa,n.identity=Cc,n.includes=us,n.indexOf=da,n.inRange=Qu,n.invoke=Pf,n.isArguments=pf,n.isArray=ff,n.isArrayBuffer=df,n.isArrayLike=Fs,n.isArrayLikeObject=Vs,n.isBoolean=zs,n.isBuffer=hf,n.isDate=mf,n.isElement=Ks,n.isEmpty=Gs,n.isEqual=Hs,n.isEqualWith=Ws,n.isError=Js,n.isFinite=Ys,n.isFunction=Xs,n.isInteger=Qs,n.isLength=$s,n.isMap=yf,n.isMatch=tu,n.isMatchWith=nu,n.isNaN=ru,n.isNative=iu,n.isNil=au,n.isNull=ou,n.isNumber=su,n.isObject=Zs,n.isObjectLike=eu,n.isPlainObject=uu,n.isRegExp=gf,n.isSafeInteger=cu,n.isSet=vf,n.isString=lu,n.isSymbol=pu,n.isTypedArray=bf,n.isUndefined=fu,n.isWeakMap=du,n.isWeakSet=hu,n.join=ma,n.kebabCase=qf,n.last=ya,n.lastIndexOf=ga,n.lowerCase=Bf,n.lowerFirst=Ff,n.lt=_f,n.lte=Sf,n.max=zc,n.maxBy=Kc,n.mean=Gc,n.meanBy=Hc,n.min=Wc,n.minBy=Jc,n.stubArray=jc,n.stubFalse=Mc,n.stubObject=Uc,n.stubString=Lc,n.stubTrue=qc,n.multiply=sd,n.nth=va,n.noConflict=Oc,n.noop=Pc,n.now=Zp,n.pad=ic,n.padEnd=oc,n.padStart=ac,n.parseInt=sc,n.random=$u,n.reduce=ps,n.reduceRight=fs,n.repeat=uc,n.replace=cc,n.result=Fu,n.round=ud,n.runInContext=e,n.sample=hs,n.size=gs,n.snakeCase=Vf,n.some=vs,n.sortedIndex=Ca,n.sortedIndexBy=Ta,n.sortedIndexOf=Na,n.sortedLastIndex=Aa,n.sortedLastIndexBy=ka,n.sortedLastIndexOf=Oa,n.startCase=zf,n.startsWith=pc,n.subtract=cd,n.sum=Yc,n.sumBy=Xc,n.template=fc,n.times=Bc,n.toFinite=yu,n.toInteger=gu,n.toLength=vu,n.toLower=dc,n.toNumber=bu,n.toSafeInteger=Su,n.toString=Eu,n.toUpper=hc,n.trim=mc,n.trimEnd=yc,n.trimStart=gc,n.truncate=vc,n.unescape=bc,n.uniqueId=Vc,n.upperCase=Kf,n.upperFirst=Gf,n.each=as,n.eachRight=ss,n.first=fa,kc(n,function(){var e={};return cr(n,function(t,r){pl.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION="4.17.11",s(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),s(["drop","take"],function(e,t){v.prototype[e]=function(n){n=n===ne?1:Bl(gu(n),0);var r=this.__filtered__&&!t?new v(this):this.clone();return r.__filtered__?r.__takeCount__=Fl(n,r.__takeCount__):r.__views__.push({size:Fl(n,xe),type:e+(r.__dir__<0?"Right":"")}),r},v.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),s(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==Ne||3==n;v.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:yo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),s(["head","last"],function(e,t){var n="take"+(t?"Right":"");v.prototype[e]=function(){return this[n](1).value()[0]}}),s(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");v.prototype[e]=function(){return this.__filtered__?new v(this):this[n](1)}}),v.prototype.compact=function(){return this.filter(Cc)},v.prototype.find=function(e){return this.filter(e).head()},v.prototype.findLast=function(e){return this.reverse().find(e)},v.prototype.invokeMap=$r(function(e,t){return"function"==typeof e?new v(this):this.map(function(n){return Sr(n,e,t)})}),v.prototype.reject=function(e){return this.filter(Ns(yo(e)))},v.prototype.slice=function(e,t){e=gu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new v(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ne&&(t=gu(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},v.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},v.prototype.toArray=function(){return this.take(xe)},cr(v.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=n[o?"take"+("last"==t?"Right":""):t],s=o||/^find/.test(t);a&&(n.prototype[t]=function(){var t=this.__wrapped__,u=o?[1]:arguments,c=t instanceof v,l=u[0],p=c||ff(t),f=function(e){var t=a.apply(n,h([e],u));return o&&d?t[0]:t};p&&r&&"function"==typeof l&&1!=l.length&&(c=p=!1);var d=this.__chain__,m=!!this.__actions__.length,y=s&&!d,g=c&&!m;if(!s&&p){t=g?t:new v(this);var b=e.apply(t,u);return b.__actions__.push({func:Wa,args:[f],thisArg:ne}),new i(b,d)}return y&&g?e.apply(this,u):(b=this.thru(f),y?o?b.value()[0]:b.value():b)})}),s(["pop","push","shift","sort","splice","unshift"],function(e){var t=al[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(ff(n)?n:[],e)}return this[r](function(n){return t.apply(ff(n)?n:[],e)})}}),cr(v.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"";(Zl[i]||(Zl[i]=[])).push({name:t,func:r})}}),Zl[Hi(ne,he).name]=[{name:"wrapper",func:ne}],v.prototype.clone=N,v.prototype.reverse=Y,v.prototype.value=Z,n.prototype.at=Kp,n.prototype.chain=Ja,n.prototype.commit=Ya,n.prototype.next=Xa,n.prototype.plant=$a,n.prototype.reverse=Za,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=es,n.prototype.first=n.prototype.head,Nl&&(n.prototype[Nl]=Qa),n}();An._=Kn,(i=function(){return Kn}.call(t,n,t,r))!==ne&&(r.exports=i)}).call(this)}).call(t,n(22),n(39)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(288);t.AuthClass=r.default,t.CognitoHostedUIIdentityProvider=r.CognitoHostedUIIdentityProvider;var i=n(99);t.CognitoUser=i.CognitoUser,t.CookieStorage=i.CookieStorage;var o=n(1),a=new o.ConsoleLogger("Auth"),s=null;s||(a.debug("Create Auth Instance"),s=new r.default(null));var u=s;o.default.register(u),t.default=u},function(e,t,n){"use strict";function r(e){return e&&e.hasOwnProperty("provider")}function i(e){return e&&e.hasOwnProperty("customProvider")}function o(e){return void 0!==e.redirectSignIn}function a(e){return!!e.username}Object.defineProperty(t,"__esModule",{value:!0}),!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon"}(t.CognitoHostedUIIdentityProvider||(t.CognitoHostedUIIdentityProvider={})),t.isFederatedSignInOptions=r,t.isFederatedSignInOptionsCustom=i,t.isCognitoHostedOpts=o,t.isUsernamePasswordOpts=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(290);Object.defineProperty(t,"AuthenticationDetails",{enumerable:!0,get:function(){return r(i).default}});var o=n(100);Object.defineProperty(t,"AuthenticationHelper",{enumerable:!0,get:function(){return r(o).default}});var a=n(104);Object.defineProperty(t,"CognitoAccessToken",{enumerable:!0,get:function(){return r(a).default}});var s=n(106);Object.defineProperty(t,"CognitoIdToken",{enumerable:!0,get:function(){return r(s).default}});var u=n(107);Object.defineProperty(t,"CognitoRefreshToken",{enumerable:!0,get:function(){return r(u).default}});var c=n(108);Object.defineProperty(t,"CognitoUser",{enumerable:!0,get:function(){return r(c).default}});var l=n(112);Object.defineProperty(t,"CognitoUserAttribute",{enumerable:!0,get:function(){return r(l).default}});var p=n(292);Object.defineProperty(t,"CognitoUserPool",{enumerable:!0,get:function(){return r(p).default}});var f=n(110);Object.defineProperty(t,"CognitoUserSession",{enumerable:!0,get:function(){return r(f).default}});var d=n(295);Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return r(d).default}});var h=n(111);Object.defineProperty(t,"DateHelper",{enumerable:!0,get:function(){return r(h).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(23),s=r(a);n(101);var u=n(59),c=r(u),l=n(102),p=r(l),f=n(103),d=r(f),h=function(e){return o.Buffer.from(s.default.lib.WordArray.random(e).toString(),"hex")},m="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",y=function(){function e(t){i(this,e),this.N=new d.default(m,16),this.g=new d.default("2",16),this.k=new d.default(this.hexHash("00"+this.N.toString(16)+"0"+this.g.toString(16)),16),this.smallAValue=this.generateRandomSmallA(),this.getLargeAValue(function(){}),this.infoBits=o.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(n,r){n&&e(n,null),t.largeAValue=r,e(null,t.largeAValue)})},e.prototype.generateRandomSmallA=function(){var e=h(128).toString("hex");return new d.default(e,16).mod(this.N)},e.prototype.generateRandomString=function(){return h(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,n){var r=this;this.randomPassword=this.generateRandomString();var i=""+e+t+":"+this.randomPassword,o=this.hash(i),a=h(16).toString("hex");this.SaltToHashDevices=this.padHex(new d.default(a,16)),this.g.modPow(new d.default(this.hexHash(this.SaltToHashDevices+o),16),this.N,function(e,t){e&&n(e,null),r.verifierDevices=r.padHex(t),n(null,null)})},e.prototype.calculateA=function(e,t){var n=this;this.g.modPow(e,this.N,function(e,r){e&&t(e,null),r.mod(n.N).equals(d.default.ZERO)&&t(new Error("Illegal paramater. A mod N cannot be 0."),null),t(null,r)})},e.prototype.calculateU=function(e,t){return this.UHexHash=this.hexHash(this.padHex(e)+this.padHex(t)),new d.default(this.UHexHash,16)},e.prototype.hash=function(e){var t=e instanceof o.Buffer?s.default.lib.WordArray.create(e):e,n=(0,c.default)(t).toString();return new Array(64-n.length).join("0")+n},e.prototype.hexHash=function(e){return this.hash(o.Buffer.from(e,"hex"))},e.prototype.computehkdf=function(e,t){var n=s.default.lib.WordArray.create(o.Buffer.concat([this.infoBits,o.Buffer.from(String.fromCharCode(1),"utf8")])),r=e instanceof o.Buffer?s.default.lib.WordArray.create(e):e,i=t instanceof o.Buffer?s.default.lib.WordArray.create(t):t,a=(0,p.default)(r,i),u=(0,p.default)(n,a);return o.Buffer.from(u.toString(),"hex").slice(0,16)},e.prototype.getPasswordAuthenticationKey=function(e,t,n,r,i){var a=this;if(n.mod(this.N).equals(d.default.ZERO))throw new Error("B cannot be zero.");if(this.UValue=this.calculateU(this.largeAValue,n),this.UValue.equals(d.default.ZERO))throw new Error("U cannot be zero.");var s=""+this.poolName+e+":"+t,u=this.hash(s),c=new d.default(this.hexHash(this.padHex(r)+u),16);this.calculateS(c,n,function(e,t){e&&i(e,null);var n=a.computehkdf(o.Buffer.from(a.padHex(t),"hex"),o.Buffer.from(a.padHex(a.UValue.toString(16)),"hex"));i(null,n)})},e.prototype.calculateS=function(e,t,n){var r=this;this.g.modPow(e,this.N,function(i,o){i&&n(i,null),t.subtract(r.k.multiply(o)).modPow(r.smallAValue.add(r.UValue.multiply(e)),r.N,function(e,t){e&&n(e,null),n(null,t.mod(r.N))})})},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}();t.default=y},function(e,t,n){!function(r,i){e.exports=t=function(e){return function(){if("function"==typeof ArrayBuffer){var t=e,n=t.lib,r=n.WordArray,i=r.init;(r.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 t=e.byteLength,n=[],r=0;r<t;r++)n[r>>>2]|=e[r]<<24-r%4*8;i.call(this,n,t)}else i.apply(this,arguments)}).prototype=r}}(),e.lib.WordArray}(n(23))}()},function(e,t,n){!function(r,i,o){e.exports=t=function(e){return e.HmacSHA256}(n(23),n(59),n(291))}()},function(e,t,n){"use strict";function r(e,t){null!=e&&this.fromString(e,t)}function i(){return new r(null)}function o(e,t,n,r,i,o){for(;--o>=0;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i}function a(e,t,n,r,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;u=a*u+((32767&l)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(l>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i}function s(e,t,n,r,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;u=a*u+((16383&l)<<14)+n[r]+i,i=(u>>28)+(l>>14)+s*c,n[r++]=268435455&u}return i}function u(e){return J.charAt(e)}function c(e,t){var n=Y[e.charCodeAt(t)];return null==n?-1:n}function l(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function p(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}function f(e){var t=i();return t.fromInt(e),t}function d(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");n=2}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=c(e,i);s<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=n)>=this.DB&&(a-=this.DB))}this.clamp(),o&&r.ZERO.subTo(this,this)}function h(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function m(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 n,r=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-- >0)for(s<this.DB&&(n=this[a]>>s)>0&&(i=!0,o=u(n));a>=0;)s<t?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&r,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(o+=u(n));return i?o:"0"}function y(){var e=i();return r.ZERO.subTo(this,e),e}function g(){return this.s<0?this.negate():this}function v(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function b(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function _(){return this.t<=0?0:this.DB*(this.t-1)+b(this[this.t-1]^this.s&this.DM)}function S(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function E(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function I(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>i|s,s=(this[n]&o)<<r;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()}function w(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}function C(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()}function T(e,t){var n=this.abs(),i=e.abs(),o=n.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+n.t]=n.am(0,i[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&r.ZERO.subTo(t,t)}function N(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function A(e,t,n){var o=e.abs();if(!(o.t<=0)){var a=this.abs();if(a.t<o.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=i());var s=i(),u=this.s,c=e.s,l=this.DB-b(o[o.t-1]);l>0?(o.lShiftTo(l,s),a.lShiftTo(l,n)):(o.copyTo(s),a.copyTo(n));var p=s.t,f=s[p-1];if(0!=f){var d=f*(1<<this.F1)+(p>1?s[p-2]>>this.F2:0),h=this.FV/d,m=(1<<this.F1)/d,y=1<<this.F2,g=n.t,v=g-p,_=null==t?i():t;for(s.dlShiftTo(v,_),n.compareTo(_)>=0&&(n[n.t++]=1,n.subTo(_,n)),r.ONE.dlShiftTo(p,_),_.subTo(s,s);s.t<p;)s[s.t++]=0;for(;--v>=0;){var S=n[--g]==f?this.DM:Math.floor(n[g]*h+(n[g-1]+y)*m);if((n[g]+=s.am(0,S,n,v,0,p))<S)for(s.dlShiftTo(v,_),n.subTo(_,n);n[g]<--S;)n.subTo(_,n)}null!=t&&(n.drShiftTo(p,t),u!=c&&r.ZERO.subTo(t,t)),n.t=p,n.clamp(),l>0&&n.rShiftTo(l,n),u<0&&r.ZERO.subTo(n,n)}}}function k(e){var t=i();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(r.ZERO)>0&&e.subTo(t,t),t}function O(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function P(e){return 0==this.compareTo(e)}function R(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()}function x(e){var t=i();return this.addTo(e,t),t}function D(e){var t=i();return this.subTo(e,t),t}function j(e){var t=i();return this.multiplyTo(e,t),t}function M(e){var t=i();return this.divRemTo(e,t,null),t}function U(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function L(e){var t=i();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(r.ZERO)>0&&this.m.subTo(t,t),t}function q(e){var t=i();return e.copyTo(t),this.reduce(t),t}function B(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function F(e,t){e.squareTo(t),this.reduce(t)}function V(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function z(e,t,n){var r,o=e.bitLength(),a=f(1),s=new U(t);if(o<=0)return a;r=o<18?1:o<48?3:o<144?4:o<768?5:6;var u=new Array,c=3,l=r-1,p=(1<<r)-1;if(u[1]=s.convert(this),r>1){var d=i();for(s.sqrTo(u[1],d);c<=p;)u[c]=i(),s.mulTo(d,u[c-2],u[c]),c+=2}var h,m,y=e.t-1,g=!0,v=i();for(o=b(e[y])-1;y>=0;){for(o>=l?h=e[y]>>o-l&p:(h=(e[y]&(1<<o+1)-1)<<l-o,y>0&&(h|=e[y-1]>>this.DB+o-l)),c=r;0==(1&h);)h>>=1,--c;if((o-=c)<0&&(o+=this.DB,--y),g)u[h].copyTo(a),g=!1;else{for(;c>1;)s.sqrTo(a,v),s.sqrTo(v,a),c-=2;c>0?s.sqrTo(a,v):(m=a,a=v,v=m),s.mulTo(v,u[h],a)}for(;y>=0&&0==(e[y]&1<<o);)s.sqrTo(a,v),m=a,a=v,v=m,--o<0&&(o=this.DB-1,--y)}var _=s.revert(a);return n(null,_),_}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var K,G="undefined"!=typeof navigator;G&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=a,K=30):G&&"Netscape"!=navigator.appName?(r.prototype.am=o,K=26):(r.prototype.am=s,K=28),r.prototype.DB=K,r.prototype.DM=(1<<K)-1,r.prototype.DV=1<<K,r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-K,r.prototype.F2=2*K-52;var H,W,J="0123456789abcdefghijklmnopqrstuvwxyz",Y=new Array;for(H="0".charCodeAt(0),W=0;W<=9;++W)Y[H++]=W;for(H="a".charCodeAt(0),W=10;W<36;++W)Y[H++]=W;for(H="A".charCodeAt(0),W=10;W<36;++W)Y[H++]=W;U.prototype.convert=L,U.prototype.revert=q,U.prototype.reduce=B,U.prototype.mulTo=V,U.prototype.sqrTo=F,r.prototype.copyTo=l,r.prototype.fromInt=p,r.prototype.fromString=d,r.prototype.clamp=h,r.prototype.dlShiftTo=S,r.prototype.drShiftTo=E,r.prototype.lShiftTo=I,r.prototype.rShiftTo=w,r.prototype.subTo=C,r.prototype.multiplyTo=T,r.prototype.squareTo=N,r.prototype.divRemTo=A,r.prototype.invDigit=O,r.prototype.addTo=R,r.prototype.toString=m,r.prototype.negate=y,r.prototype.abs=g,r.prototype.compareTo=v,r.prototype.bitLength=_,r.prototype.mod=k,r.prototype.equals=P,r.prototype.add=x,r.prototype.subtract=D,r.prototype.multiply=j,r.prototype.divide=M,r.prototype.modPow=z,r.ZERO=f(0),r.ONE=f(1)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(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)}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(105),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.AccessToken;return r(this,t),i(this,e.call(this,o||""))}return o(t,e),t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(17),o=function(){function e(t){r(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(i.Buffer.from(e,"base64").toString("utf8"))}catch(e){return{}}},e}();t.default=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(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)}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=n(105),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.IdToken;return r(this,t),i(this,e.call(this,o||""))}return o(t,e),t}(u.default);t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.RefreshToken;r(this,e),this.token=n||""}return e.prototype.getToken=function(){return this.token},e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),a=n(23),s=r(a),u=n(101),c=(r(u),n(109)),l=r(c),p=n(102),f=r(p),d=n(103),h=r(d),m=n(100),y=r(m),g=n(104),v=r(g),b=n(106),_=r(b),S=n(107),E=r(S),I=n(110),w=r(I),C=n(111),T=r(C),N=n(112),A=r(N),k=n(113),O=r(k),P=function(){function e(t){if(i(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 O.default).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 n=this,r=e.getAuthParameters();r.USERNAME=this.username;var i={AuthFlow:"CUSTOM_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:e.getValidationData()};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",i,function(e,r){if(e)return t.onFailure(e);var i=r.ChallengeName,o=r.ChallengeParameters;return"CUSTOM_CHALLENGE"===i?(n.Session=r.Session,t.customChallenge(o)):(n.signInUserSession=n.getCognitoUserSession(r.AuthenticationResult),n.cacheTokens(),t.onSuccess(n.signInUserSession))})},e.prototype.authenticateUser=function(e,t){return"USER_PASSWORD_AUTH"===this.authenticationFlowType?this.authenticateUserPlainUsernamePassword(e,t):"USER_SRP_AUTH"===this.authenticationFlowType||"CUSTOM_AUTH"===this.authenticationFlowType?this.authenticateUserDefaultAuth(e,t):t.onFailure(new Error("Authentication flow type is invalid."))},e.prototype.authenticateUserDefaultAuth=function(e,t){var n=this,r=new y.default(this.pool.getUserPoolId().split("_")[1]),i=new T.default,a=void 0,u=void 0,c={};null!=this.deviceKey&&(c.DEVICE_KEY=this.deviceKey),c.USERNAME=this.username,r.getLargeAValue(function(p,d){p&&t.onFailure(p),c.SRP_A=d.toString(16),"CUSTOM_AUTH"===n.authenticationFlowType&&(c.CHALLENGE_NAME="SRP_A");var m={AuthFlow:n.authenticationFlowType,ClientId:n.pool.getClientId(),AuthParameters:c,ClientMetadata:e.getValidationData()};n.getUserContextData(n.username)&&(m.UserContextData=n.getUserContextData(n.username)),n.client.request("InitiateAuth",m,function(c,p){if(c)return t.onFailure(c);var d=p.ChallengeParameters;n.username=d.USER_ID_FOR_SRP,a=new h.default(d.SRP_B,16),u=new h.default(d.SALT,16),n.getCachedDeviceKeyAndPassword(),r.getPasswordAuthenticationKey(n.username,e.getPassword(),a,u,function(e,a){e&&t.onFailure(e);var u=i.getNowString(),c=s.default.lib.WordArray.create(o.Buffer.concat([o.Buffer.from(n.pool.getUserPoolId().split("_")[1],"utf8"),o.Buffer.from(n.username,"utf8"),o.Buffer.from(d.SECRET_BLOCK,"base64"),o.Buffer.from(u,"utf8")])),h=s.default.lib.WordArray.create(a),m=l.default.stringify((0,f.default)(c,h)),y={};y.USERNAME=n.username,y.PASSWORD_CLAIM_SECRET_BLOCK=d.SECRET_BLOCK,y.TIMESTAMP=u,y.PASSWORD_CLAIM_SIGNATURE=m,null!=n.deviceKey&&(y.DEVICE_KEY=n.deviceKey);var g={ChallengeName:"PASSWORD_VERIFIER",ClientId:n.pool.getClientId(),ChallengeResponses:y,Session:p.Session};n.getUserContextData()&&(g.UserContextData=n.getUserContextData()),function e(t,r){return n.client.request("RespondToAuthChallenge",t,function(i,o){return i&&"ResourceNotFoundException"===i.code&&-1!==i.message.toLowerCase().indexOf("device")?(y.DEVICE_KEY=null,n.deviceKey=null,n.randomPassword=null,n.deviceGroupKey=null,n.clearCachedDeviceKeyAndPassword(),e(t,r)):r(i,o)})}(g,function(e,i){return e?t.onFailure(e):n.authenticateUserInternal(i,r,t)})})})})},e.prototype.authenticateUserPlainUsernamePassword=function(e,t){var n=this,r={};if(r.USERNAME=this.username,r.PASSWORD=e.getPassword(),!r.PASSWORD)return void t.onFailure(new Error("PASSWORD parameter is required"));var i=new y.default(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var o={AuthFlow:"USER_PASSWORD_AUTH",ClientId:this.pool.getClientId(),AuthParameters:r,ClientMetadata:e.getValidationData()};this.getUserContextData(this.username)&&(o.UserContextData=this.getUserContextData(this.username)),this.client.request("InitiateAuth",o,function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,i,t)})},e.prototype.authenticateUserInternal=function(e,t,n){var r=this,i=e.ChallengeName,a=e.ChallengeParameters;if("SMS_MFA"===i)return this.Session=e.Session,n.mfaRequired(i,a);if("SELECT_MFA_TYPE"===i)return this.Session=e.Session,n.selectMFAType(i,a);if("MFA_SETUP"===i)return this.Session=e.Session,n.mfaSetup(i,a);if("SOFTWARE_TOKEN_MFA"===i)return this.Session=e.Session,n.totpRequired(i,a);if("CUSTOM_CHALLENGE"===i)return this.Session=e.Session,n.customChallenge(a);if("NEW_PASSWORD_REQUIRED"===i){this.Session=e.Session;var s=null,u=null,c=[],l=t.getNewPasswordRequiredChallengeUserAttributePrefix();if(a&&(s=JSON.parse(e.ChallengeParameters.userAttributes),u=JSON.parse(e.ChallengeParameters.requiredAttributes)),u)for(var p=0;p<u.length;p++)c[p]=u[p].substr(l.length);return n.newPasswordRequired(s,c)}if("DEVICE_SRP_AUTH"===i)return void this.getDeviceResponse(n);this.signInUserSession=this.getCognitoUserSession(e.AuthenticationResult),this.challengeName=i,this.cacheTokens();var f=e.AuthenticationResult.NewDeviceMetadata;if(null==f)return n.onSuccess(this.signInUserSession);t.generateHashDevice(e.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,e.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(i){if(i)return n.onFailure(i);var a={Salt:o.Buffer.from(t.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:o.Buffer.from(t.getVerifierDevices(),"hex").toString("base64")};r.verifierDevices=a.PasswordVerifier,r.deviceGroupKey=f.DeviceGroupKey,r.randomPassword=t.getRandomPassword(),r.client.request("ConfirmDevice",{DeviceKey:f.DeviceKey,AccessToken:r.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:a,DeviceName:navigator.userAgent},function(t,i){return t?n.onFailure(t):(r.deviceKey=e.AuthenticationResult.NewDeviceMetadata.DeviceKey,r.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?n.onSuccess(r.signInUserSession,i.UserConfirmationNecessary):n.onSuccess(r.signInUserSession))})})},e.prototype.completeNewPasswordChallenge=function(e,t,n){var r=this;if(!e)return n.onFailure(new Error("New password is required."));var i=new y.default(this.pool.getUserPoolId().split("_")[1]),o=i.getNewPasswordRequiredChallengeUserAttributePrefix(),a={};t&&Object.keys(t).forEach(function(e){a[o+e]=t[e]}),a.NEW_PASSWORD=e,a.USERNAME=this.username;var s={ChallengeName:"NEW_PASSWORD_REQUIRED",ClientId:this.pool.getClientId(),ChallengeResponses:a,Session:this.Session};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(e,t){return e?n.onFailure(e):r.authenticateUserInternal(t,i,n)})},e.prototype.getDeviceResponse=function(e){var t=this,n=new y.default(this.deviceGroupKey),r=new T.default,i={};i.USERNAME=this.username,i.DEVICE_KEY=this.deviceKey,n.getLargeAValue(function(a,u){a&&e.onFailure(a),i.SRP_A=u.toString(16);var c={ChallengeName:"DEVICE_SRP_AUTH",ClientId:t.pool.getClientId(),ChallengeResponses:i};t.getUserContextData()&&(c.UserContextData=t.getUserContextData()),t.client.request("RespondToAuthChallenge",c,function(i,a){if(i)return e.onFailure(i);var u=a.ChallengeParameters,c=new h.default(u.SRP_B,16),p=new h.default(u.SALT,16);n.getPasswordAuthenticationKey(t.deviceKey,t.randomPassword,c,p,function(n,i){if(n)return e.onFailure(n);var c=r.getNowString(),p=s.default.lib.WordArray.create(o.Buffer.concat([o.Buffer.from(t.deviceGroupKey,"utf8"),o.Buffer.from(t.deviceKey,"utf8"),o.Buffer.from(u.SECRET_BLOCK,"base64"),o.Buffer.from(c,"utf8")])),d=s.default.lib.WordArray.create(i),h=l.default.stringify((0,f.default)(p,d)),m={};m.USERNAME=t.username,m.PASSWORD_CLAIM_SECRET_BLOCK=u.SECRET_BLOCK,m.TIMESTAMP=c,m.PASSWORD_CLAIM_SIGNATURE=h,m.DEVICE_KEY=t.deviceKey;var y={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:t.pool.getClientId(),ChallengeResponses:m,Session:a.Session};t.getUserContextData()&&(y.UserContextData=t.getUserContextData()),t.client.request("RespondToAuthChallenge",y,function(n,r){return n?e.onFailure(n):(t.signInUserSession=t.getCognitoUserSession(r.AuthenticationResult),t.cacheTokens(),e.onSuccess(t.signInUserSession))})})})})},e.prototype.confirmRegistration=function(e,t,n){var r={ClientId:this.pool.getClientId(),ConfirmationCode:e,Username:this.username,ForceAliasCreation:t};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("ConfirmSignUp",r,function(e){return e?n(e,null):n(null,"SUCCESS")})},e.prototype.sendCustomChallengeAnswer=function(e,t){var n=this,r={};r.USERNAME=this.username,r.ANSWER=e;var i=new y.default(this.pool.getUserPoolId().split("_")[1]);this.getCachedDeviceKeyAndPassword(),null!=this.deviceKey&&(r.DEVICE_KEY=this.deviceKey);var o={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(o.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",o,function(e,r){return e?t.onFailure(e):n.authenticateUserInternal(r,i,t)})},e.prototype.sendMFACode=function(e,t,n){var r=this,i={};i.USERNAME=this.username,i.SMS_MFA_CODE=e;var a=n||"SMS_MFA";"SOFTWARE_TOKEN_MFA"===a&&(i.SOFTWARE_TOKEN_MFA_CODE=e),null!=this.deviceKey&&(i.DEVICE_KEY=this.deviceKey);var s={ChallengeName:a,ChallengeResponses:i,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",s,function(e,n){if(e)return t.onFailure(e);if("DEVICE_SRP_AUTH"===n.ChallengeName)return void r.getDeviceResponse(t);if(r.signInUserSession=r.getCognitoUserSession(n.AuthenticationResult),r.cacheTokens(),null==n.AuthenticationResult.NewDeviceMetadata)return t.onSuccess(r.signInUserSession);var i=new y.default(r.pool.getUserPoolId().split("_")[1]);i.generateHashDevice(n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,n.AuthenticationResult.NewDeviceMetadata.DeviceKey,function(e){if(e)return t.onFailure(e);var a={Salt:o.Buffer.from(i.getSaltDevices(),"hex").toString("base64"),PasswordVerifier:o.Buffer.from(i.getVerifierDevices(),"hex").toString("base64")};r.verifierDevices=a.PasswordVerifier,r.deviceGroupKey=n.AuthenticationResult.NewDeviceMetadata.DeviceGroupKey,r.randomPassword=i.getRandomPassword(),r.client.request("ConfirmDevice",{DeviceKey:n.AuthenticationResult.NewDeviceMetadata.DeviceKey,AccessToken:r.signInUserSession.getAccessToken().getJwtToken(),DeviceSecretVerifierConfig:a,DeviceName:navigator.userAgent},function(e,i){return e?t.onFailure(e):(r.deviceKey=n.AuthenticationResult.NewDeviceMetadata.DeviceKey,r.cacheDeviceKeyAndPassword(),!0===i.UserConfirmationNecessary?t.onSuccess(r.signInUserSession,i.UserConfirmationNecessary):t.onSuccess(r.signInUserSession))})})})},e.prototype.changePassword=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("ChangePassword",{PreviousPassword:e,ProposedPassword:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?n(e,null):n(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=[],n={DeliveryMedium:"SMS",AttributeName:"phone_number"};t.push(n),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,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n(new Error("User is not authenticated"),null);this.client.request("SetUserMFAPreference",{SMSMfaSettings:e,SoftwareTokenMfaSettings:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?n(e,null):n(null,"SUCCESS")})},e.prototype.disableMFA=function(e){if(null==this.signInUserSession||!this.signInUserSession.isValid())return e(new Error("User is not authenticated"),null);var t=[];this.client.request("SetUserSettings",{MFAOptions:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t){return t?e(t,null):e(null,"SUCCESS")})},e.prototype.deleteUser=function(e){var t=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()},function(n){return n?e(n,null):(t.clearCachedUser(),e(null,"SUCCESS"))})},e.prototype.updateAttributes=function(e,t){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},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,n){if(t)return e(t,null);for(var r=[],i=0;i<n.UserAttributes.length;i++){var o={Name:n.UserAttributes[i].Name,Value:n.UserAttributes[i].Value},a=new A.default(o);r.push(a)}return e(null,r)})},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,n){return t?e(t,null):e(null,n.MFAOptions)})},e.prototype.getUserData=function(e,t){var n=this;if(null==this.signInUserSession||!this.signInUserSession.isValid())return this.clearCachedUserData(),e(new Error("User is not authenticated"),null);var r=!!t&&t.bypassCache,i=this.storage.getItem(this.userDataKey);if(!i||r)this.client.request("GetUser",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(t,r){if(t)return e(t,null);n.cacheUserData(r);var i=n.signInUserSession.getRefreshToken();if(!i||!i.getToken())return e(null,r);n.refreshSession(i,function(t,n){return t?e(t,null):e(null,r)})});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){var t={ClientId:this.pool.getClientId(),Username:this.username};this.client.request("ResendConfirmationCode",t,function(t,n){return t?e(t,null):e(null,n)})},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,n=t+".idToken",r=t+".accessToken",i=t+".refreshToken",o=t+".clockDrift";if(this.storage.getItem(n)){var a=new _.default({IdToken:this.storage.getItem(n)}),s=new v.default({AccessToken:this.storage.getItem(r)}),u=new E.default({RefreshToken:this.storage.getItem(i)}),c=parseInt(this.storage.getItem(o),0)||0,l={IdToken:a,AccessToken:s,RefreshToken:u,ClockDrift:c},p=new w.default(l);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){var n=this,r={};r.REFRESH_TOKEN=e.getToken();var i="CognitoIdentityServiceProvider."+this.pool.getClientId(),o=i+".LastAuthUser";if(this.storage.getItem(o)){this.username=this.storage.getItem(o);var a=i+"."+this.username+".deviceKey";this.deviceKey=this.storage.getItem(a),r.DEVICE_KEY=this.deviceKey}var s={ClientId:this.pool.getClientId(),AuthFlow:"REFRESH_TOKEN_AUTH",AuthParameters:r};this.getUserContextData()&&(s.UserContextData=this.getUserContextData()),this.client.request("InitiateAuth",s,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",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+"."+this.username+".clockDrift",o=e+".LastAuthUser";this.storage.setItem(t,this.signInUserSession.getIdToken().getJwtToken()),this.storage.setItem(n,this.signInUserSession.getAccessToken().getJwtToken()),this.storage.setItem(r,this.signInUserSession.getRefreshToken().getToken()),this.storage.setItem(i,""+this.signInUserSession.getClockDrift()),this.storage.setItem(o,this.username)},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",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.setItem(t,this.deviceKey),this.storage.setItem(n,this.randomPassword),this.storage.setItem(r,this.deviceGroupKey)},e.prototype.getCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.getItem(t)&&(this.deviceKey=this.storage.getItem(t),this.randomPassword=this.storage.getItem(n),this.deviceGroupKey=this.storage.getItem(r))},e.prototype.clearCachedDeviceKeyAndPassword=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId()+"."+this.username,t=e+".deviceKey",n=e+".randomPasswordKey",r=e+".deviceGroupKey";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r)},e.prototype.clearCachedTokens=function(){var e="CognitoIdentityServiceProvider."+this.pool.getClientId(),t=e+"."+this.username+".idToken",n=e+"."+this.username+".accessToken",r=e+"."+this.username+".refreshToken",i=e+".LastAuthUser",o=e+"."+this.username+".clockDrift";this.storage.removeItem(t),this.storage.removeItem(n),this.storage.removeItem(r),this.storage.removeItem(i),this.storage.removeItem(o)},e.prototype.getCognitoUserSession=function(e){var t=new _.default(e),n=new v.default(e),r=new E.default(e),i={IdToken:t,AccessToken:n,RefreshToken:r};return new w.default(i)},e.prototype.forgotPassword=function(e){var t={ClientId:this.pool.getClientId(),Username:this.username};this.getUserContextData()&&(t.UserContextData=this.getUserContextData()),this.client.request("ForgotPassword",t,function(t,n){return t?e.onFailure(t):"function"==typeof e.inputVerificationCode?e.inputVerificationCode(n):e.onSuccess(n)})},e.prototype.confirmPassword=function(e,t,n){var r={ClientId:this.pool.getClientId(),Username:this.username,ConfirmationCode:e,Password:t};this.getUserContextData()&&(r.UserContextData=this.getUserContextData()),this.client.request("ConfirmForgotPassword",r,function(e){return e?n.onFailure(e):n.onSuccess()})},e.prototype.getAttributeVerificationCode=function(e,t){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()},function(e,n){return e?t.onFailure(e):"function"==typeof t.inputVerificationCode?t.inputVerificationCode(n):t.onSuccess()})},e.prototype.verifyAttribute=function(e,t,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.onFailure(new Error("User is not authenticated"));this.client.request("VerifyUserAttribute",{AttributeName:e,Code:t,AccessToken:this.signInUserSession.getAccessToken().getJwtToken()},function(e){return e?n.onFailure(e):n.onSuccess("SUCCESS")})},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,n){return t?e.onFailure(t):e.onSuccess(n)})},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(n){return t.deviceKey=null,t.deviceGroupKey=null,t.randomPassword=null,t.clearCachedDeviceKeyAndPassword(),e.onSuccess(n)}})},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,n){if(null==this.signInUserSession||!this.signInUserSession.isValid())return n.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?n.onFailure(e):n.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(n){return n?e.onFailure(n):(t.clearCachedUser(),e.onSuccess("SUCCESS"))})},e.prototype.signOut=function(){this.signInUserSession=null,this.clearCachedUser()},e.prototype.sendMFASelectionAnswer=function(e,t){var n=this,r={};r.USERNAME=this.username,r.ANSWER=e;var i={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:r,ClientId:this.pool.getClientId(),Session:this.Session};this.getUserContextData()&&(i.UserContextData=this.getUserContextData()),this.client.request("RespondToAuthChallenge",i,function(r,i){return r?t.onFailure(r):(n.Session=i.Session,"SMS_MFA"===e?t.mfaRequired(i.challengeName,i.challengeParameters):"SOFTWARE_TOKEN_MFA"===e?t.totpRequired(i.challengeName,i.challengeParameters):void 0)})},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,n){return t?e.onFailure(t):e.associateSecretCode(n.SecretCode)}):this.client.request("AssociateSoftwareToken",{Session:this.Session},function(n,r){return n?e.onFailure(n):(t.Session=r.Session,e.associateSecretCode(r.SecretCode))})},e.prototype.verifySoftwareToken=function(e,t,n){var r=this;null!=this.signInUserSession&&this.signInUserSession.isValid()?this.client.request("VerifySoftwareToken",{AccessToken:this.signInUserSession.getAccessToken().getJwtToken(),UserCode:e,FriendlyDeviceName:t},function(e,t){return e?n.onFailure(e):n.onSuccess(t)}):this.client.request("VerifySoftwareToken",{Session:this.Session,UserCode:e,FriendlyDeviceName:t},function(e,t){if(e)return n.onFailure(e);r.Session=t.Session;var i={};i.USERNAME=r.username;var o={ChallengeName:"MFA_SETUP",ClientId:r.pool.getClientId(),ChallengeResponses:i,Session:r.Session};r.getUserContextData()&&(o.UserContextData=r.getUserContextData()),r.client.request("RespondToAuthChallenge",o,function(e,t){return e?n.onFailure(e):(r.signInUserSession=r.getCognitoUserSession(t.AuthenticationResult),r.cacheTokens(),n.onSuccess(r.signInUserSession))})})},e}();t.default=P},function(e,t,n){!function(r,i){e.exports=t=function(e){return function(){function t(e,t,n){for(var r=[],o=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2,u=n[e.charCodeAt(a)]>>>6-a%4*2;r[o>>>2]|=(s|u)<<24-o%4*8,o++}return i.create(r,o)}var n=e,r=n.lib,i=r.WordArray;n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var a=t[o>>>2]>>>24-o%4*8&255,s=t[o+1>>>2]>>>24-(o+1)%4*8&255,u=t[o+2>>>2]>>>24-(o+2)%4*8&255,c=a<<16|s<<8|u,l=0;l<4&&o+.75*l<n;l++)i.push(r.charAt(c>>>6*(3-l)&63));var p=r.charAt(64);if(p)for(;i.length%4;)i.push(p);return i.join("")},parse:function(e){var n=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(n=s)}return t(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(n(23))}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.IdToken,i=t.RefreshToken,o=t.AccessToken,a=t.ClockDrift;if(r(this,e),null==o||null==n)throw new Error("Id token and Access Token must be present.");this.idToken=n,this.refreshToken=i,this.accessToken=o,this.clockDrift=void 0===a?this.calculateClockDrift():a}return e.prototype.getIdToken=function(){return this.idToken},e.prototype.getRefreshToken=function(){return this.refreshToken},e.prototype.getAccessToken=function(){return this.accessToken},e.prototype.getClockDrift=function(){return this.clockDrift},e.prototype.calculateClockDrift=function(){return Math.floor(new Date/1e3)-Math.min(this.accessToken.getIssuedAt(),this.idToken.getIssuedAt())},e.prototype.isValid=function(){var e=Math.floor(new Date/1e3),t=e-this.clockDrift;return t<this.accessToken.getExpiration()&&t<this.idToken.getExpiration()},e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=function(){function e(){r(this,e)}return e.prototype.getNowString=function(){var e=new Date,t=o[e.getUTCDay()],n=i[e.getUTCMonth()],r=e.getUTCDate(),a=e.getUTCHours();a<10&&(a="0"+a);var s=e.getUTCMinutes();s<10&&(s="0"+s);var u=e.getUTCSeconds();return u<10&&(u="0"+u),t+" "+n+" "+r+" "+a+":"+s+":"+u+" UTC "+e.getUTCFullYear()},e}();t.default=a},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.Name,i=t.Value;r(this,e),this.Name=n||"",this.Value=i||""}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}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i={},o=function(){function e(){r(this,e)}return e.setItem=function(e,t){return i[e]=t,i[e]},e.getItem=function(e){return Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0},e.removeItem=function(e){return delete i[e]},e.clear=function(){return i={}},e}(),a=function(){function e(){r(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=o}}return e.prototype.getStorage=function(){return this.storageWindow},e}();t.default=a},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(303),u=new a.ConsoleLogger("AWSS3Provider"),c="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",l=function(e,t,n,r,i){e&&a.Hub.dispatch("storage",{event:t,data:{attrs:n,metrics:r},message:i},"Storage",c)},p=function(){function e(e){this._config=e||{},u.debug("Storage Options",this._config)}return e.prototype.getCategory=function(){return e.CATEGORY},e.prototype.getProviderName=function(){return e.PROVIDER_NAME},e.prototype.configure=function(e){if(u.debug("configure Storage",e),!e)return this._config;var t=a.Parser.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,t.Storage),this._config.bucket||u.debug("Do not have bucket yet"),this._config},e.prototype.get=function(e,t){return i(this,void 0,void 0,function(){var n,r,i,a,s,c,p,f,d,h,m,y,g;return o(this,function(o){switch(o.label){case 0:return[4,this._ensureCredentials()];case 1:return(n=o.sent())?(r=Object.assign({},this._config,t),i=r.bucket,a=r.region,s=r.credentials,c=r.level,p=r.download,f=r.track,d=r.expires,h=this._prefix(r),m=h+e,y=this._createS3(r),u.debug("get "+e+" from "+m),g={Bucket:i,Key:m},!0===p?[2,new Promise(function(t,n){y.getObject(g,function(r,i){r?(l(f,"download",{method:"get",result:"failed"},null,"Download failed with "+r.message),n(r)):(l(f,"download",{method:"get",result:"success"},{fileSize:Number(i.Body.length)},"Download success for "+e),t(i))})})]:(d&&(g.Expires=d),[2,new Promise(function(t,n){try{var r=y.getSignedUrl("getObject",g);l(f,"getSignedUrl",{method:"get",result:"success"},null,"Signed URL: "+r),t(r)}catch(t){u.warn("get signed url error",t),l(f,"getSignedUrl",{method:"get",result:"failed"},null,"Could not get a signed URL for "+e),n(t)}})])):[2,Promise.reject("No credentials")]}})})},e.prototype.put=function(e,t,n){return i(this,void 0,void 0,function(){var i,a,s,c,p,f,d,h,m,y,g,v,b,_,S,E,I,w,C,T,N,A,k,O,P,R,x;return o(this,function(o){switch(o.label){case 0:return[4,this._ensureCredentials()];case 1:if(!(i=o.sent()))return[2,Promise.reject("No credentials")];a=Object.assign({},this._config,n),s=a.bucket,c=a.region,p=a.credentials,f=a.level,d=a.track,h=a.progressCallback,m=a.contentType,y=a.contentDisposition,g=a.cacheControl,v=a.expires,b=a.metadata,_=a.tagging,S=a.serverSideEncryption,E=a.SSECustomerAlgorithm,I=a.SSECustomerKey,w=a.SSECustomerKeyMD5,C=a.SSEKMSKeyId,T=m||"binary/octet-stream",N=this._prefix(a),A=N+e,k=this._createS3(a),u.debug("put "+e+" to "+A),O={Bucket:s,Key:A,Body:t,ContentType:T},g&&(O.CacheControl=g),y&&(O.ContentDisposition=y),v&&(O.Expires=v),b&&(O.Metadata=b),_&&(O.Tagging=_),S&&(O.ServerSideEncryption=S,E&&(O.SSECustomerAlgorithm=E),I&&(O.SSECustomerKey=I),w&&(O.SSECustomerKeyMD5=w),C&&(O.SSEKMSKeyId=C)),o.label=2;case 2:return o.trys.push([2,4,,5]),P=k.upload(O).on("httpUploadProgress",function(e){h&&("function"==typeof h?h(e):u.warn("progressCallback should be a function, not a "+(void 0===h?"undefined":r(h))))}),[4,P.promise()];case 3:return R=o.sent(),u.debug("upload result",R),l(d,"upload",{method:"put",result:"success"},null,"Upload success for "+e),[2,{key:R.Key.substr(N.length)}];case 4:throw x=o.sent(),u.warn("error uploading",x),l(d,"upload",{method:"put",result:"failed"},null,"Error uploading "+e),x;case 5:return[2]}})})},e.prototype.remove=function(e,t){return i(this,void 0,void 0,function(){var n,r,i,a,s,c,p,f,d,h,m;return o(this,function(o){switch(o.label){case 0:return[4,this._ensureCredentials()];case 1:return(n=o.sent())?(r=Object.assign({},this._config,t),i=r.bucket,a=r.region,s=r.credentials,c=r.level,p=r.track,f=this._prefix(r),d=f+e,h=this._createS3(r),u.debug("remove "+e+" from "+d),m={Bucket:i,Key:d},[2,new Promise(function(t,n){h.deleteObject(m,function(r,i){r?(l(p,"delete",{method:"remove",result:"failed"},null,"Deletion of "+e+" failed with "+r),n(r)):(l(p,"delete",{method:"remove",result:"success"},null,"Deleted "+e+" successfully"),t(i))})})]):[2,Promise.reject("No credentials")]}})})},e.prototype.list=function(e,t){return i(this,void 0,void 0,function(){var n,r,i,a,s,c,p,f,d,h,m,y;return o(this,function(o){switch(o.label){case 0:return[4,this._ensureCredentials()];case 1:return(n=o.sent())?(r=Object.assign({},this._config,t),i=r.bucket,a=r.region,s=r.credentials,c=r.level,p=r.download,f=r.track,d=this._prefix(r),h=d+e,m=this._createS3(r),u.debug("list "+e+" from "+h),y={Bucket:i,Prefix:h},[2,new Promise(function(e,t){m.listObjects(y,function(n,r){if(n)u.warn("list error",n),l(f,"list",{method:"list",result:"failed"},null,"Listing items failed: "+n.message),t(n);else{var i=r.Contents.map(function(e){return{key:e.Key.substr(d.length),eTag:e.ETag,lastModified:e.LastModified,size:e.Size}});l(f,"list",{method:"list",result:"success"},null,i.length+" items returned from list operation"),u.debug("list",i),e(i)}})})]):[2,Promise.reject("No credentials")]}})})},e.prototype._ensureCredentials=function(){var e=this;return a.Credentials.get().then(function(t){if(!t)return!1;var n=a.Credentials.shear(t);return u.debug("set credentials for storage",n),e._config.credentials=n,!0}).catch(function(e){return u.warn("ensure credentials error",e),!1})},e.prototype._prefix=function(e){var t=e.credentials,n=e.level,r=e.customPrefix||{},i=e.identityId||t.identityId,o=(void 0!==r.private?r.private:"private/")+i+"/",a=(void 0!==r.protected?r.protected:"protected/")+i+"/",s=void 0!==r.public?r.public:"public/";switch(n){case"private":return o;case"protected":return a;default:return s}},e.prototype._createS3=function(e){var t=e.bucket,n=e.region,r=e.credentials;return new s({apiVersion:"2006-03-01",params:{Bucket:t},signatureVersion:"v4",region:n,credentials:r})},e.CATEGORY="Storage",e.PROVIDER_NAME="AWSS3",e}();t.default=p},function(e,t,n){"use strict";function r(e,t){switch(e.kind){case a.a.NULL:return null;case a.a.INT:return parseInt(e.value,10);case a.a.FLOAT:return parseFloat(e.value);case a.a.STRING:case a.a.ENUM:case a.a.BOOLEAN:return e.value;case a.a.LIST:return e.values.map(function(e){return r(e,t)});case a.a.OBJECT:return Object(i.a)(e.fields,function(e){return e.name.value},function(e){return r(e.value,t)});case a.a.VARIABLE:var n=e.name.value;return t&&!Object(o.a)(t[n])?t[n]:void 0}throw new Error("Unexpected value kind: "+e.kind)}t.a=r;var i=n(43),o=n(11),a=n(5)},function(e,t,n){"use strict";function r(e){var t=[];if(e.nodes)e.nodes.forEach(function(e){e.loc&&t.push(i(e.loc.source,Object(u.a)(e.loc.source,e.loc.start)))});else if(e.source&&e.locations){var n=e.source;e.locations.forEach(function(e){t.push(i(n,e))})}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}function i(e,t){var n=t.line,r=e.locationOffset.line-1,i=o(e,t),u=n+r,c=t.column+i,l=(u-1).toString(),p=u.toString(),f=(u+1).toString(),d=f.length,h=e.body.split(/\r\n|[\n\r]/g);return h[0]=a(e.locationOffset.column-1)+h[0],[e.name+" ("+u+":"+c+")",n>=2&&s(d,l)+": "+h[n-2],s(d,p)+": "+h[n-1],a(2+d+c-1)+"^",n<h.length&&s(d,f)+": "+h[n]].filter(Boolean).join("\n")}function o(e,t){return 1===t.line?e.locationOffset.column-1:0}function a(e){return Array(e+1).join(" ")}function s(e,t){return a(e-t.length)+t}t.a=r;var u=n(62)},function(e,t,n){"use strict";function r(e){var t=i(e);if(t)throw t;return e}function i(e,t){return"string"!=typeof e&&Object(a.a)(0,"Expected string"),e.length>1&&"_"===e[0]&&"_"===e[1]&&"__configs__"!==e?new o.a('Name "'+e+'" must not begin with "__", which is reserved by GraphQL introspection.',t):s.test(e)?void 0:new o.a('Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "'+e+'" does not.',t)}t.a=r,t.b=i;var o=n(20),a=n(9),s=/^[_a-zA-Z][_a-zA-Z0-9]*$/},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return o});var i=n(9),o=function e(t,n,o){r(this,e),this.body=t,this.name=n||"GraphQL request",this.locationOffset=o||{line:1,column:1},this.locationOffset.line>0||Object(i.a)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||Object(i.a)(0,"column in locationOffset is 1-indexed and must be positive")}},function(e,t,n){"use strict";function r(e,t,n){return e&&Array.isArray(e.path)?e:new i.a(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)}t.a=r;var i=n(20)},function(e,t,n){"use strict";function r(e){for(var t=e.split(/\r\n|[\n\r]/g),n=null,r=1;r<t.length;r++){var a=t[r],s=i(a);if(s<a.length&&(null===n||s<n)&&0===(n=s))break}if(n)for(var u=1;u<t.length;u++)t[u]=t[u].slice(n);for(;t.length>0&&o(t[0]);)t.shift();for(;t.length>0&&o(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=0;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;return t}function o(e){return i(e)===e.length}t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return O});var r=n(316),i=n(122),o=n(123),a=n(124),s=n(125),u=n(126),c=n(127),l=n(128),p=n(129),f=n(130),d=n(131),h=n(132),m=n(133),y=n(134),g=n(135),v=n(136),b=n(137),_=n(138),S=n(139),E=n(140),I=n(141),w=n(67),C=n(142),T=n(143),N=n(144),A=n(145),k=n(146),O=[r.a,i.a,o.a,a.a,s.a,u.a,c.a,l.a,p.a,f.a,d.a,h.a,m.a,y.a,g.a,v.a,b.a,_.a,S.a,E.a,I.a,w.a,C.a,T.a,N.a,A.a,k.a]},function(e,t,n){"use strict";function r(e){return'There can be only one operation named "'+e+'".'}function i(e){var t=Object.create(null);return{OperationDefinition:function(n){var i=n.name;return i&&(t[i.value]?e.reportError(new o.a(r(i.value),[t[i.value],i])):t[i.value]=i),!1},FragmentDefinition:function(){return!1}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(){return"This anonymous operation must be the only defined operation."}function i(e){var t=0;return{Document:function(e){t=e.definitions.filter(function(e){return e.kind===a.a.OPERATION_DEFINITION}).length},OperationDefinition:function(n){!n.name&&t>1&&e.reportError(new o.a(r(),[n]))}}}t.a=i;var o=n(2),a=n(5)},function(e,t,n){"use strict";function r(e){return(e?'Subscription "'+e+'" ':"Anonymous Subscription ")+"must select only one top level field."}function i(e){return{OperationDefinition:function(t){"subscription"===t.operation&&1!==t.selectionSet.selections.length&&e.reportError(new o.a(r(t.name&&t.name.value),t.selectionSet.selections.slice(1)))}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t){var n='Unknown type "'+e+'".';return t.length&&(n+=" Did you mean "+Object(s.a)(t)+"?"),n}function i(e){return{ObjectTypeDefinition:function(){return!1},InterfaceTypeDefinition:function(){return!1},UnionTypeDefinition:function(){return!1},InputObjectTypeDefinition:function(){return!1},NamedType:function(t){var n=e.getSchema(),i=t.name.value;n.getType(i)||e.reportError(new o.a(r(i,Object(a.a)(i,Object.keys(n.getTypeMap()))),[t]))}}}t.a=i;var o=n(2),a=n(35),s=n(65)},function(e,t,n){"use strict";function r(e){return'Fragment cannot condition on non composite type "'+String(e)+'".'}function i(e,t){return'Fragment "'+e+'" cannot condition on non composite type "'+String(t)+'".'}function o(e){return{InlineFragment:function(t){var n=t.typeCondition;if(n){var i=Object(c.a)(e.getSchema(),n);i&&!Object(u.A)(i)&&e.reportError(new a.a(r(Object(s.a)(n)),[n]))}},FragmentDefinition:function(t){var n=Object(c.a)(e.getSchema(),t.typeCondition);n&&!Object(u.A)(n)&&e.reportError(new a.a(i(t.name.value,Object(s.a)(t.typeCondition)),[t.typeCondition]))}}}t.a=o;var a=n(2),s=n(19),u=n(3),c=n(16)},function(e,t,n){"use strict";function r(e,t){return'Variable "$'+e+'" cannot be non-input type "'+t+'".'}function i(e){return{VariableDefinition:function(t){var n=Object(u.a)(e.getSchema(),t.type);if(n&&!Object(s.D)(n)){var i=t.variable.name.value;e.reportError(new o.a(r(i,Object(a.a)(t.type)),[t.type]))}}}}t.a=i;var o=n(2),a=n(19),s=n(3),u=n(16)},function(e,t,n){"use strict";function r(e,t){return'Field "'+e+'" must not have a selection since type "'+String(t)+'" has no subfields.'}function i(e,t){return'Field "'+e+'" of type "'+String(t)+'" must have a selection of subfields. Did you mean "'+e+' { ... }"?'}function o(e){return{Field:function(t){var n=e.getType(),o=t.selectionSet;n&&(Object(s.F)(Object(s.x)(n))?o&&e.reportError(new a.a(r(t.name.value,n),[o])):o||e.reportError(new a.a(i(t.name.value,n),[t])))}}}t.a=o;var a=n(2),s=n(3)},function(e,t,n){"use strict";function r(e,t,n,r){var i='Cannot query field "'+e+'" on type "'+t+'".';return 0!==n.length?i+=" Did you mean to use an inline fragment on "+Object(c.a)(n)+"?":0!==r.length&&(i+=" Did you mean "+Object(c.a)(r)+"?"),i}function i(e){return{Field:function(t){var n=e.getParentType();if(n&&!e.getFieldDef()){var i=e.getSchema(),u=t.name.value,c=o(i,n,u),l=0!==c.length?[]:a(i,n,u);e.reportError(new s.a(r(u,n.name,c,l),[t]))}}}}function o(e,t,n){if(Object(l.z)(t)){var r=[],i=Object.create(null);return e.getPossibleTypes(t).forEach(function(e){e.getFields()[n]&&(r.push(e.name),e.getInterfaces().forEach(function(e){e.getFields()[n]&&(i[e.name]=(i[e.name]||0)+1)}))}),Object.keys(i).sort(function(e,t){return i[t]-i[e]}).concat(r)}return[]}function a(e,t,n){if(Object(l.K)(t)||Object(l.E)(t)){var r=Object.keys(t.getFields());return Object(u.a)(n,r)}return[]}t.a=i;var s=n(2),u=n(35),c=n(65),l=n(3)},function(e,t,n){"use strict";function r(e){return'There can be only one fragment named "'+e+'".'}function i(e){var t=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(n){var i=n.name.value;return t[i]?e.reportError(new o.a(r(i),[t[i],n.name])):t[i]=n.name,!1}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e){return'Unknown fragment "'+e+'".'}function i(e){return{FragmentSpread:function(t){var n=t.name.value;e.getFragment(n)||e.reportError(new o.a(r(n),[t.name]))}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e){return'Fragment "'+e+'" is never used.'}function i(e){var t=[],n=[];return{OperationDefinition:function(e){return t.push(e),!1},FragmentDefinition:function(e){return n.push(e),!1},Document:{leave:function(){var i=Object.create(null);t.forEach(function(t){e.getRecursivelyReferencedFragments(t).forEach(function(e){i[e.name.value]=!0})}),n.forEach(function(t){var n=t.name.value;!0!==i[n]&&e.reportError(new o.a(r(n),[t]))})}}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t,n){return'Fragment "'+e+'" cannot be spread here as objects of type "'+String(t)+'" can never be of type "'+String(n)+'".'}function i(e,t){return'Fragment cannot be spread here as objects of type "'+String(e)+'" can never be of type "'+String(t)+'".'}function o(e){return{InlineFragment:function(t){var n=e.getType(),r=e.getParentType();Object(l.A)(n)&&Object(l.A)(r)&&!Object(u.a)(e.getSchema(),n,r)&&e.reportError(new s.a(i(r,n),[t]))},FragmentSpread:function(t){var n=t.name.value,i=a(e,n),o=e.getParentType();i&&o&&!Object(u.a)(e.getSchema(),i,o)&&e.reportError(new s.a(r(n,o,i),[t]))}}}function a(e,t){var n=e.getFragment(t);if(n){var r=Object(c.a)(e.getSchema(),n.typeCondition);if(Object(l.A)(r))return r}}t.a=o;var s=n(2),u=n(45),c=n(16),l=n(3)},function(e,t,n){"use strict";function r(e,t){return'Cannot spread fragment "'+e+'" within itself'+(t.length?" via "+t.join(", "):"")+"."}function i(e){function t(s){var u=s.name.value;n[u]=!0;var c=e.getFragmentSpreads(s.selectionSet);if(0!==c.length){a[u]=i.length;for(var l=0;l<c.length;l++){var p=c[l],f=p.name.value,d=a[f];if(void 0===d){if(i.push(p),!n[f]){var h=e.getFragment(f);h&&t(h)}i.pop()}else{var m=i.slice(d);e.reportError(new o.a(r(f,m.map(function(e){return e.name.value})),m.concat(p)))}}a[u]=void 0}}var n=Object.create(null),i=[],a=Object.create(null);return{OperationDefinition:function(){return!1},FragmentDefinition:function(e){return n[e.name.value]||t(e),!1}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e){return'There can be only one variable named "'+e+'".'}function i(e){var t=Object.create(null);return{OperationDefinition:function(){t=Object.create(null)},VariableDefinition:function(n){var i=n.variable.name.value;t[i]?e.reportError(new o.a(r(i),[t[i],n.variable.name])):t[i]=n.variable.name}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t){return t?'Variable "$'+e+'" is not defined by operation "'+t+'".':'Variable "$'+e+'" is not defined.'}function i(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(n){e.getRecursiveVariableUsages(n).forEach(function(i){var a=i.node,s=a.name.value;!0!==t[s]&&e.reportError(new o.a(r(s,n.name&&n.name.value),[a,n]))})}},VariableDefinition:function(e){t[e.variable.name.value]=!0}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t){return t?'Variable "$'+e+'" is never used in operation "'+t+'".':'Variable "$'+e+'" is never used.'}function i(e){var t=[];return{OperationDefinition:{enter:function(){t=[]},leave:function(n){var i=Object.create(null),a=e.getRecursiveVariableUsages(n),s=n.name?n.name.value:null;a.forEach(function(e){var t=e.node;i[t.name.value]=!0}),t.forEach(function(t){var n=t.variable.name.value;!0!==i[n]&&e.reportError(new o.a(r(n,s),[t]))})}},VariableDefinition:function(e){t.push(e)}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e){return'Unknown directive "'+e+'".'}function i(e,t){return'Directive "'+e+'" may not be used on '+t+"."}function o(e){return{Directive:function(t,n,o,c,l){var p=Object(u.a)(e.getSchema().getDirectives(),function(e){return e.name===t.name.value});if(!p)return void e.reportError(new s.a(r(t.name.value),[t]));var f=a(l);f&&-1===p.locations.indexOf(f)&&e.reportError(new s.a(i(t.name.value,f),[t]))}}}function a(e){var t=e[e.length-1];if(!Array.isArray(t))switch(t.kind){case c.a.OPERATION_DEFINITION:switch(t.operation){case"query":return l.a.QUERY;case"mutation":return l.a.MUTATION;case"subscription":return l.a.SUBSCRIPTION}break;case c.a.FIELD:return l.a.FIELD;case c.a.FRAGMENT_SPREAD:return l.a.FRAGMENT_SPREAD;case c.a.INLINE_FRAGMENT:return l.a.INLINE_FRAGMENT;case c.a.FRAGMENT_DEFINITION:return l.a.FRAGMENT_DEFINITION;case c.a.SCHEMA_DEFINITION:return l.a.SCHEMA;case c.a.SCALAR_TYPE_DEFINITION:case c.a.SCALAR_TYPE_EXTENSION:return l.a.SCALAR;case c.a.OBJECT_TYPE_DEFINITION:case c.a.OBJECT_TYPE_EXTENSION:return l.a.OBJECT;case c.a.FIELD_DEFINITION:return l.a.FIELD_DEFINITION;case c.a.INTERFACE_TYPE_DEFINITION:case c.a.INTERFACE_TYPE_EXTENSION:return l.a.INTERFACE;case c.a.UNION_TYPE_DEFINITION:case c.a.UNION_TYPE_EXTENSION:return l.a.UNION;case c.a.ENUM_TYPE_DEFINITION:case c.a.ENUM_TYPE_EXTENSION:return l.a.ENUM;case c.a.ENUM_VALUE_DEFINITION:return l.a.ENUM_VALUE;case c.a.INPUT_OBJECT_TYPE_DEFINITION:case c.a.INPUT_OBJECT_TYPE_EXTENSION:return l.a.INPUT_OBJECT;case c.a.INPUT_VALUE_DEFINITION:return e[e.length-3].kind===c.a.INPUT_OBJECT_TYPE_DEFINITION?l.a.INPUT_FIELD_DEFINITION:l.a.ARGUMENT_DEFINITION}}t.a=o;var s=n(2),u=n(28),c=n(5),l=n(26)},function(e,t,n){"use strict";function r(e){return'The directive "'+e+'" can only be used once at this location.'}function i(e){return{enter:function(t){var n=t.directives;if(n){var i=Object.create(null);n.forEach(function(t){var n=t.name.value;i[n]?e.reportError(new o.a(r(n),[i[n],t])):i[n]=t})}}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t,n,r){var i='Unknown argument "'+e+'" on field "'+t+'" of type "'+n+'".';return r.length&&(i+=" Did you mean "+Object(u.a)(r)+"?"),i}function i(e,t,n){var r='Unknown argument "'+e+'" on directive "@'+t+'".';return n.length&&(r+=" Did you mean "+Object(u.a)(n)+"?"),r}function o(e){return{Argument:function(t,n,o,u,l){if(!e.getArgument()){var p=l[l.length-1];if(p.kind===c.a.FIELD){var f=e.getFieldDef(),d=e.getParentType();f&&d&&e.reportError(new a.a(r(t.name.value,f.name,d.name,Object(s.a)(t.name.value,f.args.map(function(e){return e.name}))),[t]))}else if(p.kind===c.a.DIRECTIVE){var h=e.getDirective();h&&e.reportError(new a.a(i(t.name.value,h.name,Object(s.a)(t.name.value,h.args.map(function(e){return e.name}))),[t]))}}}}}t.a=o;var a=n(2),s=n(35),u=n(65),c=n(5)},function(e,t,n){"use strict";function r(e){return'There can be only one argument named "'+e+'".'}function i(e){var t=Object.create(null);return{Field:function(){t=Object.create(null)},Directive:function(){t=Object.create(null)},Argument:function(n){var i=n.name.value;return t[i]?e.reportError(new o.a(r(i),[t[i],n.name])):t[i]=n.name,!1}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e,t,n){return'Field "'+e+'" argument "'+t+'" of type "'+String(n)+'" is required but not provided.'}function i(e,t,n){return'Directive "@'+e+'" argument "'+t+'" of type "'+String(n)+'" is required but not provided.'}function o(e){return{Field:{leave:function(t){var n=e.getFieldDef();if(!n)return!1;var i=t.arguments||[],o=Object(s.a)(i,function(e){return e.name.value});n.args.forEach(function(n){!o[n.name]&&Object(u.I)(n.type)&&e.reportError(new a.a(r(t.name.value,n.name,n.type),[t]))})}},Directive:{leave:function(t){var n=e.getDirective();if(!n)return!1;var r=t.arguments||[],o=Object(s.a)(r,function(e){return e.name.value});n.args.forEach(function(n){!o[n.name]&&Object(u.I)(n.type)&&e.reportError(new a.a(i(t.name.value,n.name,n.type),[t]))})}}}}t.a=o;var a=n(2),s=n(21),u=n(3)},function(e,t,n){"use strict";function r(e,t,n){return'Variable "$'+e+'" of type "'+String(t)+'" is required and will not use the default value. Perhaps you meant to use type "'+String(n)+'".'}function i(e){return{VariableDefinition:function(t){var n=t.variable.name.value,i=t.defaultValue,s=e.getInputType();return Object(a.I)(s)&&i&&e.reportError(new o.a(r(n,s,s.ofType),[i])),!1},SelectionSet:function(){return!1},FragmentDefinition:function(){return!1}}}t.a=i;var o=n(2),a=n(3)},function(e,t,n){"use strict";function r(e,t,n){return'Variable "$'+e+'" of type "'+String(t)+'" used in position expecting type "'+String(n)+'".'}function i(e){var t=Object.create(null);return{OperationDefinition:{enter:function(){t=Object.create(null)},leave:function(n){e.getRecursiveVariableUsages(n).forEach(function(n){var i=n.node,s=n.type,u=i.name.value,p=t[u];if(p&&s){var f=e.getSchema(),d=Object(l.a)(f,p.type);d&&!Object(c.c)(f,o(d,p),s)&&e.reportError(new a.a(r(u,d,s),[p,i]))}})}},VariableDefinition:function(e){t[e.variable.name.value]=e}}}function o(e,t){return!t.defaultValue||Object(s.I)(e)?e:Object(u.b)(e)}t.a=i;var a=n(2),s=n(3),u=n(12),c=n(45),l=n(16)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return'Fields "'+e+'" conflict because '+o(t)+". Use different aliases on the fields to fetch both if this was intentional."}function o(e){return Array.isArray(e)?e.map(function(e){return'subfields "'+e[0]+'" conflict because '+o(e[1])}).join(" and "):e}function a(e){var t=new A,n=new Map;return{SelectionSet:function(r){s(e,n,t,e.getParentType(),r).forEach(function(t){var n=t[0],r=n[0],o=n[1],a=t[1],s=t[2];return e.reportError(new E.a(i(r,o),a.concat(s)))})}}}function s(e,t,n,r,i){var o=[],a=g(e,t,r,i),s=a[0],l=a[1];if(p(e,o,t,n,s),0!==l.length)for(var f=Object.create(null),d=0;d<l.length;d++){u(e,o,t,f,n,!1,s,l[d]);for(var h=d+1;h<l.length;h++)c(e,o,t,n,!1,l[d],l[h])}return o}function u(e,t,n,r,i,o,a,s){if(!r[s]){r[s]=!0;var c=e.getFragment(s);if(c){var l=v(e,n,c),p=l[0],d=l[1];if(a!==p){f(e,t,n,i,o,a,p);for(var h=0;h<d.length;h++)u(e,t,n,r,i,o,a,d[h])}}}}function c(e,t,n,r,i,o,a){if(o!==a&&!r.has(o,a,i)){r.add(o,a,i);var s=e.getFragment(o),u=e.getFragment(a);if(s&&u){var l=v(e,n,s),p=l[0],d=l[1],h=v(e,n,u),m=h[0],y=h[1];f(e,t,n,r,i,p,m);for(var g=0;g<y.length;g++)c(e,t,n,r,i,o,y[g]);for(var b=0;b<d.length;b++)c(e,t,n,r,i,d[b],a)}}}function l(e,t,n,r,i,o,a,s){var l=[],p=g(e,t,i,o),d=p[0],h=p[1],m=g(e,t,a,s),y=m[0],v=m[1];if(f(e,l,t,n,r,d,y),0!==v.length)for(var b=Object.create(null),_=0;_<v.length;_++)u(e,l,t,b,n,r,d,v[_]);if(0!==h.length)for(var S=Object.create(null),E=0;E<h.length;E++)u(e,l,t,S,n,r,y,h[E]);for(var I=0;I<h.length;I++)for(var w=0;w<v.length;w++)c(e,l,t,n,r,h[I],v[w]);return l}function p(e,t,n,r,i){Object.keys(i).forEach(function(o){var a=i[o];if(a.length>1)for(var s=0;s<a.length;s++)for(var u=s+1;u<a.length;u++){var c=d(e,n,r,!1,o,a[s],a[u]);c&&t.push(c)}})}function f(e,t,n,r,i,o,a){Object.keys(o).forEach(function(s){var u=a[s];if(u)for(var c=o[s],l=0;l<c.length;l++)for(var p=0;p<u.length;p++){var f=d(e,n,r,i,s,c[l],u[p]);f&&t.push(f)}})}function d(e,t,n,r,i,o,a){var s=o[0],u=o[1],c=o[2],p=a[0],f=a[1],d=a[2],m=r||s!==p&&Object(T.K)(s)&&Object(T.K)(p),g=c&&c.type,v=d&&d.type;if(!m){var b=u.name.value,S=f.name.value;if(b!==S)return[[i,b+" and "+S+" are different fields"],[u],[f]];if(!h(u.arguments||[],f.arguments||[]))return[[i,"they have differing arguments"],[u],[f]]}if(g&&v&&y(g,v))return[[i,"they return conflicting types "+String(g)+" and "+String(v)],[u],[f]];var E=u.selectionSet,I=f.selectionSet;return E&&I?_(l(e,t,n,m,Object(T.x)(g),E,Object(T.x)(v),I),i,u,f):void 0}function h(e,t){return e.length===t.length&&e.every(function(e){var n=Object(I.a)(t,function(t){return t.name.value===e.name.value});return!!n&&m(e.value,n.value)})}function m(e,t){return!e&&!t||Object(C.a)(e)===Object(C.a)(t)}function y(e,t){return Object(T.G)(e)?!Object(T.G)(t)||y(e.ofType,t.ofType):!!Object(T.G)(t)||(Object(T.I)(e)?!Object(T.I)(t)||y(e.ofType,t.ofType):!!Object(T.I)(t)||!(!Object(T.F)(e)&&!Object(T.F)(t))&&e!==t)}function g(e,t,n,r){var i=t.get(r);if(!i){var o=Object.create(null),a=Object.create(null);b(e,n,r,o,a),i=[o,Object.keys(a)],t.set(r,i)}return i}function v(e,t,n){return t.get(n.selectionSet)||g(e,t,Object(N.a)(e.getSchema(),n.typeCondition),n.selectionSet)}function b(e,t,n,r,i){for(var o=0;o<n.selections.length;o++){var a=n.selections[o];switch(a.kind){case w.a.FIELD:var s=a.name.value,u=void 0;(Object(T.K)(t)||Object(T.E)(t))&&(u=t.getFields()[s]);var c=a.alias?a.alias.value:s;r[c]||(r[c]=[]),r[c].push([t,a,u]);break;case w.a.FRAGMENT_SPREAD:i[a.name.value]=!0;break;case w.a.INLINE_FRAGMENT:var l=a.typeCondition;b(e,l?Object(N.a)(e.getSchema(),l):t,a.selectionSet,r,i)}}}function _(e,t,n,r){if(e.length>0)return[[t,e.map(function(e){return e[0]})],e.reduce(function(e,t){var n=t[1];return e.concat(n)},[n]),e.reduce(function(e,t){var n=t[2];return e.concat(n)},[r])]}function S(e,t,n,r){var i=e[t];i||(i=Object.create(null),e[t]=i),i[n]=r}t.a=a;var E=n(2),I=n(28),w=n(5),C=n(19),T=n(3),N=n(16),A=function(){function e(){r(this,e),this._data=Object.create(null)}return e.prototype.has=function(e,t,n){var r=this._data[e],i=r&&r[t];return void 0!==i&&(!1!==n||!1===i)},e.prototype.add=function(e,t,n){S(this._data,e,t,n),S(this._data,t,e,n)},e}()},function(e,t,n){"use strict";function r(e){return'There can be only one input field named "'+e+'".'}function i(e){var t=[],n=Object.create(null);return{ObjectValue:{enter:function(){t.push(n),n=Object.create(null)},leave:function(){n=t.pop()}},ObjectField:function(t){var i=t.name.value;return n[i]?e.reportError(new o.a(r(i),[n[i],t.name])):n[i]=t.name,!1}}}t.a=i;var o=n(2)},function(e,t,n){"use strict";function r(e){if("object"===(void 0===e?"undefined":i(e))&&null!==e&&"function"==typeof e.then)return e}t.a=r;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}},function(e,t,n){"use strict";function r(e){var t=!(e&&!1===e.descriptions);return"\n    query IntrospectionQuery {\n      __schema {\n        queryType { name }\n        mutationType { name }\n        subscriptionType { name }\n        types {\n          ...FullType\n        }\n        directives {\n          name\n          "+(t?"description":"")+"\n          locations\n          args {\n            ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment FullType on __Type {\n      kind\n      name\n      "+(t?"description":"")+"\n      fields(includeDeprecated: true) {\n        name\n        "+(t?"description":"")+"\n        args {\n          ...InputValue\n        }\n        type {\n          ...TypeRef\n        }\n        isDeprecated\n        deprecationReason\n      }\n      inputFields {\n        ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n      }\n      enumValues(includeDeprecated: true) {\n        name\n        "+(t?"description":"")+"\n        isDeprecated\n        deprecationReason\n      }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n    fragment InputValue on __InputValue {\n      name\n      "+(t?"description":"")+"\n      type { ...TypeRef }\n      defaultValue\n    }\n\n    fragment TypeRef on __Type {\n      kind\n      name\n      ofType {\n        kind\n        name\n        ofType {\n          kind\n          name\n          ofType {\n            kind\n            name\n            ofType {\n              kind\n              name\n              ofType {\n                kind\n                name\n                ofType {\n                  kind\n                  name\n                  ofType {\n                    kind\n                    name\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  "}t.a=r,n.d(t,"b",function(){return i});var i=r()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(t.kind===v.a.LIST_TYPE)return Object(_.a)(i(e,t.type));if(t.kind===v.a.NON_NULL_TYPE){var n=i(e,t.type);return Object(_.b)(Object(b.q)(n))}return e}function o(e){for(var t=e;t.kind===v.a.LIST_TYPE||t.kind===v.a.NON_NULL_TYPE;)t=t.type;return t}function a(e,t){if(!e||e.kind!==v.a.DOCUMENT)throw new Error("Must provide a document ast.");for(var n=void 0,r=[],i=Object.create(null),o=[],a=0;a<e.definitions.length;a++){var s=e.definitions[a];switch(s.kind){case v.a.SCHEMA_DEFINITION:if(n)throw new Error("Must provide only one schema definition.");n=s;break;case v.a.SCALAR_TYPE_DEFINITION:case v.a.OBJECT_TYPE_DEFINITION:case v.a.INTERFACE_TYPE_DEFINITION:case v.a.ENUM_TYPE_DEFINITION:case v.a.UNION_TYPE_DEFINITION:case v.a.INPUT_OBJECT_TYPE_DEFINITION:var u=s.name.value;if(i[u])throw new Error('Type "'+u+'" was defined more than once.');r.push(s),i[u]=s;break;case v.a.DIRECTIVE_DEFINITION:o.push(s)}}var c=n?function(e){var t={};return e.operationTypes.forEach(function(e){var n=e.type.name.value,r=e.operation;if(t[r])throw new Error("Must provide only one "+r+" type in schema.");if(!i[n])throw new Error("Specified "+r+' type "'+n+'" not found in document.');t[r]=n}),t}(n):{query:i.Query?"Query":null,mutation:i.Mutation?"Mutation":null,subscription:i.Subscription?"Subscription":null},l=new C(i,t,function(e){throw new Error('Type "'+e+'" not found in document.')}),p=r.map(function(e){return l.buildType(e.name.value)}),f=o.map(function(e){return l.buildDirective(e)});return f.some(function(e){return"skip"===e.name})||f.push(S.e),f.some(function(e){return"include"===e.name})||f.push(S.d),f.some(function(e){return"deprecated"===e.name})||f.push(S.b),new w.a({query:c.query?l.buildType(c.query):null,mutation:c.mutation?l.buildType(c.mutation):null,subscription:c.subscription?l.buildType(c.subscription):null,types:p,directives:f,astNode:n,assumeValid:t&&t.assumeValid})}function s(e){var t=Object(g.b)(S.b,e);return t&&t.reason}function u(e,t){if(e.description)return e.description.value;if(t&&t.commentDescriptions){var n=c(e);if(void 0!==n)return Object(h.a)("\n"+n)}}function c(e){var t=e.loc;if(t){for(var n=[],r=t.startToken.prev;r&&r.kind===m.a.COMMENT&&r.next&&r.prev&&r.line+1===r.next.line&&r.line!==r.prev.line;){var i=String(r.value);n.push(i),r=r.prev}return n.reverse().join("\n")}}function l(e){return a(Object(y.a)(e))}t.b=a,n.d(t,"a",function(){return C}),t.d=u,t.c=l;var p=n(21),f=n(43),d=n(48),h=n(120),m=n(63),y=n(34),g=n(68),v=n(5),b=n(3),_=n(12),S=n(13),E=n(15),I=n(18),w=n(7),C=function(){function e(t,n,i){r(this,e),this._typeDefinitionsMap=t,this._options=n,this._resolveType=i,this._cache=Object(p.a)(I.g.concat(E.m),function(e){return e.name})}return e.prototype._buildType=function(e,t){if(!this._cache[e]){var n=this._typeDefinitionsMap[e];this._cache[e]=n?this._makeSchemaDef(n):this._resolveType(e,t)}return this._cache[e]},e.prototype.buildType=function(e){return"string"==typeof e?this._buildType(e):this._buildType(e.name.value,e)},e.prototype._buildWrappedType=function(e){return i(this.buildType(o(e)),e)},e.prototype.buildDirective=function(e){return new S.c({name:e.name.value,description:u(e,this._options),locations:e.locations.map(function(e){return e.value}),args:e.arguments&&this._makeInputValues(e.arguments),astNode:e})},e.prototype.buildField=function(e){return{type:this._buildWrappedType(e.type),description:u(e,this._options),args:e.arguments&&this._makeInputValues(e.arguments),deprecationReason:s(e),astNode:e}},e.prototype._makeSchemaDef=function(e){switch(e.kind){case v.a.OBJECT_TYPE_DEFINITION:return this._makeTypeDef(e);case v.a.INTERFACE_TYPE_DEFINITION:return this._makeInterfaceDef(e);case v.a.ENUM_TYPE_DEFINITION:return this._makeEnumDef(e);case v.a.UNION_TYPE_DEFINITION:return this._makeUnionDef(e);case v.a.SCALAR_TYPE_DEFINITION:return this._makeScalarDef(e);case v.a.INPUT_OBJECT_TYPE_DEFINITION:return this._makeInputObjectDef(e);default:throw new Error('Type kind "'+e.kind+'" not supported.')}},e.prototype._makeTypeDef=function(e){var t=this,n=e.name.value;return new b.d({name:n,description:u(e,this._options),fields:function(){return t._makeFieldDefMap(e)},interfaces:function(){return t._makeImplementedInterfaces(e)},astNode:e})},e.prototype._makeFieldDefMap=function(e){var t=this;return e.fields?Object(f.a)(e.fields,function(e){return e.name.value},function(e){return t.buildField(e)}):{}},e.prototype._makeImplementedInterfaces=function(e){var t=this;return e.interfaces&&e.interfaces.map(function(e){return t.buildType(e)})},e.prototype._makeInputValues=function(e){var t=this;return Object(f.a)(e,function(e){return e.name.value},function(e){var n=t._buildWrappedType(e.type);return{type:n,description:u(e,t._options),defaultValue:Object(d.a)(e.defaultValue,n),astNode:e}})},e.prototype._makeInterfaceDef=function(e){var t=this;return new b.c({name:e.name.value,description:u(e,this._options),fields:function(){return t._makeFieldDefMap(e)},astNode:e})},e.prototype._makeEnumDef=function(e){var t=this;return new b.a({name:e.name.value,description:u(e,this._options),values:e.values?Object(f.a)(e.values,function(e){return e.name.value},function(e){return{description:u(e,t._options),deprecationReason:s(e),astNode:e}}):{},astNode:e})},e.prototype._makeUnionDef=function(e){var t=this;return new b.f({name:e.name.value,description:u(e,this._options),types:e.types?e.types.map(function(e){return t.buildType(e)}):[],astNode:e})},e.prototype._makeScalarDef=function(e){return new b.e({name:e.name.value,description:u(e,this._options),astNode:e,serialize:function(e){return e}})},e.prototype._makeInputObjectDef=function(e){var t=this;return new b.b({name:e.name.value,description:u(e,this._options),fields:function(){return e.fields?t._makeInputValues(e.fields):{}},astNode:e})},e}()},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(70);Object.defineProperty(t,"GraphQLError",{enumerable:!0,get:function(){return r.GraphQLError}});var i=n(344);Object.defineProperty(t,"syntaxError",{enumerable:!0,get:function(){return i.syntaxError}});var o=n(345);Object.defineProperty(t,"locatedError",{enumerable:!0,get:function(){return o.locatedError}});var a=n(152);Object.defineProperty(t,"printError",{enumerable:!0,get:function(){return a.printError}});var s=n(346);Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return s.formatError}})},function(e,t,n){"use strict";function r(e){var t=[];if(e.nodes)e.nodes.forEach(function(e){e.loc&&t.push(i(e.loc.source,(0,u.getLocation)(e.loc.source,e.loc.start)))});else if(e.source&&e.locations){var n=e.source;e.locations.forEach(function(e){t.push(i(n,e))})}return 0===t.length?e.message:[e.message].concat(t).join("\n\n")+"\n"}function i(e,t){var n=t.line,r=e.locationOffset.line-1,i=o(e,t),u=n+r,c=t.column+i,l=(u-1).toString(),p=u.toString(),f=(u+1).toString(),d=f.length,h=e.body.split(/\r\n|[\n\r]/g);return h[0]=a(e.locationOffset.column-1)+h[0],[e.name+" ("+u+":"+c+")",n>=2&&s(d,l)+": "+h[n-2],s(d,p)+": "+h[n-1],a(2+d+c-1)+"^",n<h.length&&s(d,f)+": "+h[n]].filter(Boolean).join("\n")}function o(e,t){return 1===t.line?e.locationOffset.column-1:0}function a(e){return Array(e+1).join(" ")}function s(e,t){return a(e-t.length)+t}Object.defineProperty(t,"__esModule",{value:!0}),t.printError=r;var u=n(153)},function(e,t,n){"use strict";function r(e,t){for(var n=/\r\n|[\n\r]/g,r=1,i=t+1,o=void 0;(o=n.exec(e.body))&&o.index<t;)r+=1,i=t+1-(o.index+o[0].length);return{line:r,column:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(8);e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(i.isURLSearchParams(t))o=t.toString();else{var a=[];i.forEach(t,function(e,t){null!==e&&void 0!==e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";(function(t){function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var i=n(8),o=n(360),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?e=n(158):"undefined"!=typeof XMLHttpRequest&&(e=n(158)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){s.headers[e]={}}),i.forEach(["post","put","patch"],function(e){s.headers[e]=i.merge(a)}),e.exports=s}).call(t,n(10))},function(e,t,n){"use strict";var r=n(8),i=n(361),o=n(155),a=n(363),s=n(364),u=n(159);e.exports=function(e){return new Promise(function(t,c){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var d=e.auth.username||"",h=e.auth.password||"";p.Authorization="Basic "+btoa(d+":"+h)}if(f.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?f.response:f.responseText,o={data:r,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};i(t,c,o),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){c(u("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var m=n(365),y=(e.withCredentials||s(e.url))&&e.xsrfCookieName?m.read(e.xsrfCookieName):void 0;y&&(p[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&r.forEach(p,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)}),e.withCredentials&&(f.withCredentials=!0),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){f&&(f.abort(),c(e),f=null)}),void 0===l&&(l=null),f.send(l)})}},function(e,t,n){"use strict";var r=n(362);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){t=t||{};var n={};return r.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(n[e]=t[e])}),r.forEach(["headers","auth","proxy"],function(i){r.isObject(t[i])?n[i]=r.deepMerge(e[i],t[i]):void 0!==t[i]?n[i]=t[i]:r.isObject(e[i])?n[i]=r.deepMerge(e[i]):void 0!==e[i]&&(n[i]=e[i])}),r.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(r){void 0!==t[r]?n[r]=t[r]:void 0!==e[r]&&(n[r]=e[r])}),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"!=typeof Symbol&&"function"==typeof Symbol.for;t.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER=r?Symbol.for("INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"):"@@INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER"},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=new i.ConsoleLogger("AbstractPubSubProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=r({},e,this._config),o.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"PubSub"},Object.defineProperty(e.prototype,"options",{get:function(){return r({},this._config)},enumerable:!0,configurable:!0}),e}();t.AbstractPubSubProvider=a},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(71),s=n(1),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"region",{get:function(){return this.options.aws_pubsub_region},enumerable:!0,configurable:!0}),t.prototype.getProviderName=function(){return"AWSIoTProvider"},Object.defineProperty(t.prototype,"endpoint",{get:function(){var e=this;return function(){return i(e,void 0,void 0,function(){var e,t,n,r,i,a,u;return o(this,function(o){switch(o.label){case 0:return e=this.options.aws_pubsub_endpoint,t={service:"iotdevicegateway",region:this.region},[4,s.Credentials.get()];case 1:return n=o.sent(),r=n.accessKeyId,i=n.secretAccessKey,a=n.sessionToken,u=s.Signer.signUrl(e,{access_key:r,secret_key:i,session_token:a},t),[2,u]}})})}()},enumerable:!0,configurable:!0}),t}(a.MqttOverWSProvider);t.AWSIoTProvider=u},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(166),s=n(378),u=n(1),c=new u.ConsoleLogger("AWSLexProvider"),l=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.aws_lex=new s({region:n._config.region}),n._botsCompleteCallback={},n}return r(t,e),t.prototype.getProviderName=function(){return"AWSLexProvider"},t.prototype.responseCallback=function(e,t,n,r,i){var o=this;if(e)return void r(e);c.debug("postContent state",t.dialogState),"ReadyForFulfillment"!==t.dialogState&&"Fulfilled"!==t.dialogState||("function"==typeof this._botsCompleteCallback[i]&&setTimeout(function(){return o._botsCompleteCallback[i](null,{slots:t.slots})},0),this._config&&"function"==typeof this._config[i].onComplete&&setTimeout(function(){return o._config[i].onComplete(null,{slots:t.slots})},0)),n(t),"Failed"===t.dialogState&&("function"==typeof this._botsCompleteCallback[i]&&setTimeout(function(){return o._botsCompleteCallback[i]("Bot conversation failed")},0),this._config&&"function"==typeof this._config[i].onComplete&&setTimeout(function(){return o._config[i].onComplete("Bot conversation failed")},0))},t.prototype.sendMessage=function(e,t){var n=this;return new Promise(function(r,a){return i(n,void 0,void 0,function(){var n,i,l=this;return o(this,function(o){switch(o.label){case 0:return this._config[e]?[4,u.Credentials.get()]:[2,a("Bot "+e+" does not exist")];case 1:return(n=o.sent())?(u.AWS.config.update({credentials:n}),this.aws_lex=new s({region:this._config[e].region,credentials:n}),"string"==typeof t?(i={botAlias:this._config[e].alias,botName:e,inputText:t,userId:n.identityId},c.debug("postText to lex",t),this.aws_lex.postText(i,function(t,n){l.responseCallback(t,n,r,a,e)})):(i="voice"===t.options.messageType?{botAlias:this._config[e].alias,botName:e,contentType:"audio/x-l16; sample-rate=16000",inputStream:t.content,userId:n.identityId,accept:"audio/mpeg"}:{botAlias:this._config[e].alias,botName:e,contentType:"text/plain; charset=utf-8",inputStream:t.content,userId:n.identityId,accept:"audio/mpeg"},c.debug("postContent to lex",t),this.aws_lex.postContent(i,function(t,n){l.responseCallback(t,n,r,a,e)})),[2]):[2,a("No credentials")]}})})})},t.prototype.onComplete=function(e,t){if(!this._config[e])throw new ErrorEvent("Bot "+e+" does not exist");this._botsCompleteCallback[e]=t},t}(a.AbstractInteractionsProvider);t.AWSLexProvider=l},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=new i.ConsoleLogger("AbstractInteractionsProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=r({},this._config,e),o.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"Interactions"},Object.defineProperty(e.prototype,"options",{get:function(){return r({},this._config)},enumerable:!0,configurable:!0}),e}();t.AbstractInteractionsProvider=a},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},o=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},a=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),u=n(384),c=n(72),l=new s.ConsoleLogger("SumerianProvider"),p=function(e){function t(t){return void 0===t&&(t={}),e.call(this,t)||this}return r(t,e),t.prototype.getProviderName=function(){return"SumerianProvider"},t.prototype.loadScript=function(e){return o(this,void 0,void 0,function(){return a(this,function(t){return[2,new Promise(function(t,n){var r=document.createElement("script");r.src=e,r.addEventListener("load",function(e){t()}),r.addEventListener("error",function(t){n(new Error("Failed to load script: "+e))}),document.head.appendChild(r)})]})})},t.prototype.loadScene=function(e,t,n){return o(this,void 0,void 0,function(){var r,r,o,r,u,r,p,f,d,r,h,m,y,g,v,b,_,S,E,I,w,C,T,N,A,k,O,P,R,x,D;return a(this,function(a){switch(a.label){case 0:if(!e)throw r="No scene name passed into loadScene",l.error(r),new c.XRSceneLoadFailure(r);if(!t)throw r="No dom element id passed into loadScene",l.error(r),new c.XRNoDomElement(r);if(!(o=document.getElementById(t)))throw r="DOM element id, "+t+" not found",l.error(r),new c.XRNoDomElement(r);if(u=this.getScene(e),!u.sceneConfig)throw r="No scene config configured for scene: "+e,l.error(r),new c.XRSceneLoadFailure(r);if(p=u.sceneConfig.url,f=u.sceneConfig.sceneId,u.sceneConfig.hasOwnProperty("region"))d=u.sceneConfig.region;else{if(!this.options.hasOwnProperty("region"))throw r="No region configured for scene: "+e,l.error(r),new c.XRSceneLoadFailure(r);d=this.options.region}h={region:d,customUserAgent:s.Constants.userAgent+"-SumerianScene"},m={headers:{"X-Amz-User-Agent":s.Constants.userAgent}},y=p,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,s.Credentials.get()];case 2:return g=a.sent(),h.credentials=g,v={secret_key:g.secretAccessKey,access_key:g.accessKeyId,session_token:g.sessionToken},b={region:d,service:"sumerian"},_=s.Signer.sign({method:"GET",url:p},v,b),m.headers=i({},m.headers,_.headers),y=_.url,[3,4];case 3:return S=a.sent(),l.debug("No credentials available, the request will be unsigned"),[3,4];case 4:return[4,fetch(y,m)];case 5:return E=a.sent(),[4,E.json()];case 6:if(I=a.sent(),403===E.status)throw I.message?(l.error("Failure to authenticate user: "+I.message),new c.XRSceneLoadFailure("Failure to authenticate user: "+I.message)):(l.error("Failure to authenticate user"),new c.XRSceneLoadFailure("Failure to authenticate user"));return w=I.bundleData[f],[4,fetch(w.url,{headers:w.headers})];case 7:return C=a.sent(),[4,C.json()];case 8:T=a.sent(),a.label=9;case 9:return a.trys.push([9,11,,12]),[4,this.loadScript(T[f].bootstrapperUrl)];case 10:return a.sent(),[3,12];case 11:throw N=a.sent(),l.error(N),new c.XRSceneLoadFailure(N);case 12:return A=n.progressCallback?n.progressCallback:void 0,k=u.publishParamOverrides?u.publishParamOverrides:void 0,O={element:o,sceneId:f,sceneBundle:T,apiResponse:I,progressCallback:A,publishParamOverrides:k,awsSDKConfigOverride:h},[4,window.SumerianBootstrapper.loadScene(O)];case 13:for(P=a.sent(),u.sceneController=P,u.isLoaded=!0,R=0,x=P.sceneLoadWarnings;R<x.length;R++)D=x[R],l.warn("loadScene warning: "+D);return[2]}})})},t.prototype.isSceneLoaded=function(e){return this.getScene(e).isLoaded||!1},t.prototype.getScene=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw l.error(t),new c.XRNoSceneConfiguredError(t)}if(!e){var t="No scene name was passed";throw l.error(t),new c.XRSceneNotFoundError(t)}if(!this.options.scenes[e]){var t="Scene '"+e+"' is not configured";throw l.error(t),new c.XRSceneNotFoundError(t)}return this.options.scenes[e]},t.prototype.getSceneController=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw l.error(t),new c.XRNoSceneConfiguredError(t)}var n=this.options.scenes[e];if(!n){var t="Scene '"+e+"' is not configured";throw l.error(t),new c.XRSceneNotFoundError(t)}var r=n.sceneController;if(!r){var t="Scene controller for '"+e+"' has not been loaded";throw l.error(t),new c.XRSceneNotLoadedError(t)}return r},t.prototype.isVRCapable=function(e){return this.getSceneController(e).vrCapable},t.prototype.isVRPresentationActive=function(e){return this.getSceneController(e).vrPresentationActive},t.prototype.start=function(e){this.getSceneController(e).start()},t.prototype.enterVR=function(e){this.getSceneController(e).enterVR()},t.prototype.exitVR=function(e){this.getSceneController(e).exitVR()},t.prototype.isMuted=function(e){return this.getSceneController(e).muted},t.prototype.setMuted=function(e,t){this.getSceneController(e).muted=t},t.prototype.onSceneEvent=function(e,t,n){this.getSceneController(e).on(t,n)},t.prototype.enableAudio=function(e){this.getSceneController(e).enableAudio()},t}(u.AbstractXRProvider);t.SumerianProvider=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(169);t.Analytics=r.default,t.AnalyticsClass=r.AnalyticsClass,t.AWSPinpointProvider=r.AWSPinpointProvider,t.AWSKinesisProvider=r.AWSKinesisProvider,t.AmazonPersonalizeProvider=r.AmazonPersonalizeProvider;var i=n(97);t.Auth=i.default,t.AuthClass=i.AuthClass;var o=n(301);t.Storage=o.default,t.StorageClass=o.StorageClass;var a=n(310);t.API=a.default,t.APIClass=a.APIClass,t.graphqlOperation=a.graphqlOperation;var s=n(370);t.PubSub=s.default,t.PubSubClass=s.PubSubClass;var u=n(41);t.Cache=u.default;var c=n(375);t.Interactions=c.default,t.InteractionsClass=c.InteractionsClass;var l=n(381);t.UI=l;var p=n(382);t.XR=p.default,t.XRClass=p.XRClass;var f=n(1);t.Logger=f.ConsoleLogger,t.Hub=f.Hub,t.JS=f.JS,t.ClientDevice=f.ClientDevice,t.Signer=f.Signer,t.I18n=f.I18n,t.ServiceWorker=f.ServiceWorker,t.default=f.default,f.default.Auth=i.default,f.default.Analytics=r.default,f.default.API=a.default,f.default.Storage=o.default,f.default.I18n=f.I18n,f.default.Cache=u.default,f.default.PubSub=s.default,f.default.Logger=f.ConsoleLogger,f.default.ServiceWorker=f.ServiceWorker,f.default.Interactions=c.default,f.default.UI=l,f.default.XR=p.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(170);t.AnalyticsClass=r.default;var i=n(1),o=new i.ConsoleLogger("Analytics"),a=!1,s=!1,u=!1,c=null;c||(o.debug("Create Analytics Instance"),c=new r.default);var l=c;i.default.register(l),t.default=l,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(274));var p=function(e){var t=e.channel,n=e.payload;switch(e.source,o.debug("on hub capsule "+t,n),t){case"auth":d(n);break;case"storage":f(n);break;case"analytics":h(n)}},f=function(e){var t=e.data,n=t.attrs,r=t.metrics;n&&l.record({name:"Storage",attributes:n,metrics:r})},d=function(e){var t=e.event;if(t)switch(t){case"signIn":l.record({name:"_userauth.sign_in"});break;case"signUp":l.record({name:"_userauth.sign_up"});break;case"signOut":break;case"signIn_failure":l.record({name:"_userauth.auth_fail"});break;case"configured":(s=!0)&&u&&m()}},h=function(e){var t=e.event;if(t)switch(t){case"pinpointProvider_configured":u=!0,s&&u&&m()}},m=function(){var e=l.configure();!a&&e.autoSessionRecord&&(l.updateEndpoint({immediate:!0}).catch(function(e){o.debug("Failed to update the endpoint",e)}),a=!0),l.autoTrack("session",{enable:e.autoSessionRecord})};i.Hub.listen("auth",p),i.Hub.listen("storage",p),i.Hub.listen("analytics",p)},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(92),u=n(264),c=new a.ConsoleLogger("AnalyticsClass"),l="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",p=function(e,t,n){a.Hub.dispatch("analytics",{event:e,data:t,message:n},"Analytics",l)},f={pageView:u.PageViewTracker,event:u.EventTracker,session:u.SessionTracker},d=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;c.debug("configure Analytics",e);var n=a.Parser.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,n.Analytics,e),this._config.disabled&&(this._disabled=!0),this._pluggables.forEach(function(e){var n="AWSPinpoint"!==e.getProviderName()||t._config.AWSPinpoint?t._config[e.getProviderName()]:t._config;e.configure(r({disabled:t._config.disabled},n))}),0===this._pluggables.length&&this.addPluggable(new s.default),void 0===this._config.autoSessionRecord&&(this._config.autoSessionRecord=!0),p("configured",null,"The Analytics category has been configured successfully"),c.debug("current configuration",this._config),this._config},e.prototype.addPluggable=function(e){if(e&&"Analytics"===e.getCategory()){this._pluggables.push(e);var t="AWSPinpoint"!==e.getProviderName()||this._config.AWSPinpoint?this._config[e.getProviderName()]:this._config,n=r({disabled:this._config.disabled},t);return e.configure(n),n}},e.prototype.getPluggable=function(e){for(var t=0;t<this._pluggables.length;t+=1){var n=this._pluggables[t];if(n.getProviderName()===e)return n}return c.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 c.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 i(this,void 0,void 0,function(){var t;return o(this,function(n){return t={event:{name:"_session.start"},provider:e},[2,this._sendEvent(t)]})})},e.prototype.stopSession=function(e){return i(this,void 0,void 0,function(){var t;return o(this,function(n){return t={event:{name:"_session.stop"},provider:e},[2,this._sendEvent(t)]})})},e.prototype.record=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){return this.isAnalyticsConfigured()?(i=null,i="string"==typeof e?{event:{name:e,attributes:t,metrics:n},provider:"AWSPinpoint"}:{event:e,provider:t},[2,this._sendEvent(i)]):(r="Analytics has not been configured",c.debug(r),[2,Promise.reject(new Error(r))])})})},e.prototype.updateEndpoint=function(e,t){return i(this,void 0,void 0,function(){var n;return o(this,function(r){return n=Object.assign({name:"_update_endpoint"},e),[2,this.record(n,t)]})})},e.prototype._sendEvent=function(e){var t=this;if(!this.isAnalyticsConfigured()){var n="Analytics has not been configured";return c.debug(n),Promise.reject(new Error(n))}if(this._disabled)return c.debug("Analytics has been disabled"),Promise.resolve();var r=e.provider?e.provider:"AWSPinpoint";return new Promise(function(n,i){t._pluggables.forEach(function(t){t.getProviderName()===r&&t.record(e,{resolve:n,reject:i})})})},e.prototype.autoTrack=function(e,t){if(!f[e])return void c.debug("invalid tracker type");"session"===e&&(this._config.autoSessionRecord=t.enable);var n=this._trackers[e];n?n.configure(t):this._trackers[e]=new f[e](this.record,t)},e.prototype.isAnalyticsConfigured=function(){return this._config&&Object.entries(this._config).length>0},e}();t.default=d},function(e,t,n){n(14);var r=n(0);"undefined"!=typeof window&&(window.AWS=r),e.exports=r,"undefined"!=typeof self&&(self.AWS=r)},function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,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))},n(173),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(t,n(22))},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function o(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(n,r)}}function a(e){if(l)setTimeout(a,0,e);else{var t=c[e];if(t){l=!0;try{o(t)}finally{i(e),l=!1}}}}if(!e.setImmediate){var s,u=1,c={},l=!1,p=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var e=p.documentElement;s=function(t){var n=p.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),f.setImmediate=r,f.clearImmediate=i}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(22),n(10))},function(e,t,n){function r(){}function i(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function o(e,t,n,r){c.each(n.members,function(n,o){var a=t[n];if(null!==a&&void 0!==a){var s=i(o);s=e?e+"."+s:s,u(s,a,o,r)}})}function a(e,t,n,r){var i=1;c.each(t,function(t,o){var a=n.flattened?".":".entry.",s=a+i+++".",c=s+(n.key.name||"key"),l=s+(n.value.name||"value");u(e+c,t,n.key,r),u(e+l,o,n.value,r)})}function s(e,t,n,r){var o=n.member||{};if(0===t.length)return void r.call(this,e,null);c.arrayEach(t,function(t,a){var s="."+(a+1);if("ec2"===n.api.protocol)s+="";else if(n.flattened){if(o.name){var c=e.split(".");c.pop(),c.push(i(o)),e=c.join(".")}}else s="."+(o.name?o.name:"member")+s;u(e+s,t,o,r)})}function u(e,t,n,r){null!==t&&void 0!==t&&("structure"===n.type?o(e,t,n,r):"list"===n.type?s(e,t,n,r):"map"===n.type?a(e,t,n,r):r(e,n.toWireFormat(t).toString()))}var c=n(4);r.prototype.serialize=function(e,t,n){o("",e,t,n)},e.exports=r},function(e,t,n){function r(){}function i(e,t,n){switch(n.type){case"structure":return o(e,t,n);case"map":return a(e,t,n);case"list":return s(e,t,n);default:return u(e,t,n)}}function o(e,t,n){l.arrayEach(n.memberNames,function(r){var o=n.members[r];if("body"===o.location){var a=t[r],s=o.name;if(void 0!==a&&null!==a)if(o.isXmlAttribute)e.addAttribute(s,a);else if(o.flattened)i(e,a,o);else{var u=new p(s);e.addChildNode(u),c(u,o),i(u,a,o)}}})}function a(e,t,n){var r=n.key.name||"key",o=n.value.name||"value";l.each(t,function(t,a){var s=new p(n.flattened?n.name:"entry");e.addChildNode(s);var u=new p(r),c=new p(o);s.addChildNode(u),s.addChildNode(c),i(u,t,n.key),i(c,a,n.value)})}function s(e,t,n){n.flattened?l.arrayEach(t,function(t){var r=n.member.name||n.name,o=new p(r);e.addChildNode(o),i(o,t,n.member)}):l.arrayEach(t,function(t){var r=n.member.name||"member",o=new p(r);e.addChildNode(o),i(o,t,n.member)})}function u(e,t,n){e.addChildNode(new f(n.toWireFormat(t)))}function c(e,t,n){var r,i="xmlns";t.xmlNamespaceUri?(r=t.xmlNamespaceUri,t.xmlNamespacePrefix&&(i+=":"+t.xmlNamespacePrefix)):n&&t.api.xmlNamespaceUri&&(r=t.api.xmlNamespaceUri),r&&e.addAttribute(i,r)}var l=n(4),p=n(176).XmlNode,f=n(178).XmlText;r.prototype.toXML=function(e,t,n,r){var o=new p(n);return c(o,t,!0),i(o,e,t),o.children.length>0||r?o.toString():""},e.exports=r},function(e,t,n){function r(e,t){void 0===t&&(t=[]),this.name=e,this.children=t,this.attributes={}}var i=n(177).escapeAttribute;r.prototype.addAttribute=function(e,t){return this.attributes[e]=t,this},r.prototype.addChildNode=function(e){return this.children.push(e),this},r.prototype.removeAttribute=function(e){return delete this.attributes[e],this},r.prototype.toString=function(){for(var e=Boolean(this.children.length),t="<"+this.name,n=this.attributes,r=0,o=Object.keys(n);r<o.length;r++){var a=o[r],s=n[a];void 0!==s&&null!==s&&(t+=" "+a+'="'+i(""+s)+'"')}return t+=e?">"+this.children.map(function(e){return e.toString()}).join("")+"</"+this.name+">":"/>"},e.exports={XmlNode:r}},function(e,t){function n(e){return e.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}e.exports={escapeAttribute:n}},function(e,t,n){function r(e){this.value=e}var i=n(179).escapeElement;r.prototype.toString=function(){return i(""+this.value)},e.exports={XmlText:r}},function(e,t){function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}e.exports={escapeElement:n}},function(e,t){function n(e,t){if(!n.services.hasOwnProperty(e))throw new Error("InvalidService: Failed to load api for "+e);return n.services[e][t]}n.services={},e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(182),i=1e3,o=function(){function e(e){void 0===e&&(e=i),this.maxSize=e,this.cache=new r.LRUCache(e)}return Object.defineProperty(e.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),e.prototype.put=function(t,n){var r="string"!=typeof t?e.getKeyString(t):t,i=this.populateValue(n);this.cache.put(r,i)},e.prototype.get=function(t){var n="string"!=typeof t?e.getKeyString(t):t,r=Date.now(),i=this.cache.get(n);if(i)for(var o=0;o<i.length;o++){var a=i[o];if(a.Expire<r)return void this.cache.remove(n)}return i},e.getKeyString=function(e){for(var t=[],n=Object.keys(e).sort(),r=0;r<n.length;r++){var i=n[r];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 n="string"!=typeof t?e.getKeyString(t):t;this.cache.remove(n)},e}();t.EndpointCache=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.key=e,this.value=t}return e}(),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 n=this.removeFromTail(),i=n.key;delete this.nodeMap[i]}var o=new r(e,t);this.nodeMap[e]=o,this.prependToList(o)},e.prototype.empty=function(){for(var e=Object.keys(this.nodeMap),t=0;t<e.length;t++){var n=e[t],r=this.nodeMap[n];this.detachFromList(r),delete this.nodeMap[n]}},e}();t.LRUCache=i},function(e,t,n){(function(t){var r=n(0),i=n(77),o=n(184),a=r.util.inherit,s=0;r.Service=a({constructor:function(e){if(!this.loadServiceClass)throw r.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});if(t){var n=r.util.copy(e),i=new t(e);return Object.defineProperty(i,"_originalConfig",{get:function(){return n},enumerable:!1,configurable:!0}),i._clientId=++s,i}this.initialize(e)},initialize:function(e){var n=r.config[this.serviceIdentifier];if(this.config=new r.Config(r.config),n&&this.config.update(n,!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),r.SequentialExecutor.call(this),r.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||r.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(r.util.isEmpty(this.api)){if(t.apiConfig)return r.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){t=new r.Config(r.config),t.update(e,!0);var n=t.apiVersions[this.constructor.serviceIdentifier];return n=n||t.apiVersion,this.getLatestServiceClass(n)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&r.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?r.util.isType(e,Date)&&(e=r.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(),n=null,i=t.length-1;i>=0;i--)if("*"!==t[i][t[i].length-1]&&(n=t[i]),t[i].substr(0,10)<=e)return n;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,n){if("function"==typeof t&&(n=t,t=null),t=t||{},this.config.params){var i=this.api.operations[e];i&&(t=r.util.copy(t),r.util.each(this.config.params,function(e,n){i.input.members[e]&&(void 0!==t[e]&&null!==t[e]||(t[e]=n))}))}var o=new r.Request(this,e,t);return this.addAllRequestListeners(o),this.attachMonitoringEmitter(o),n&&o.send(n),o},makeUnauthenticatedRequest:function(e,t,n){"function"==typeof t&&(n=t,t={});var r=this.makeRequest(e,t).toUnauthenticated();return n?r.send(n):r},waitFor:function(e,t,n){return new r.ResourceWaiter(this,e).wait(t,n)},addAllRequestListeners:function(e){for(var t=[r.events,r.EventListeners.Core,this.serviceInterface(),r.EventListeners.CorePost],n=0;n<t.length;n++)t[n]&&e.addListeners(t[n]);this.config.paramValidation||e.removeListener("validate",r.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(r.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],n={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()},r=e.response;if(r.httpResponse.statusCode&&(n.FinalHttpStatusCode=r.httpResponse.statusCode),r.error){var i=r.error;r.httpResponse.statusCode>299?(i.code&&(n.FinalAwsException=i.code),i.message&&(n.FinalAwsExceptionMessage=i.message)):((i.code||i.name)&&(n.FinalSdkException=i.code||i.name),i.message&&(n.FinalSdkExceptionMessage=i.message))}return n},apiAttemptEvent:function(e){var t=e.service.api.operations[e.operation],n={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()},r=e.response;return r.httpResponse.statusCode&&(n.HttpStatusCode=r.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(n.AccessKey=e.service.config.credentials.accessKeyId),r.httpResponse.headers?(e.httpRequest.headers["x-amz-security-token"]&&(n.SessionToken=e.httpRequest.headers["x-amz-security-token"]),r.httpResponse.headers["x-amzn-requestid"]&&(n.XAmznRequestId=r.httpResponse.headers["x-amzn-requestid"]),r.httpResponse.headers["x-amz-request-id"]&&(n.XAmzRequestId=r.httpResponse.headers["x-amz-request-id"]),r.httpResponse.headers["x-amz-id-2"]&&(n.XAmzId2=r.httpResponse.headers["x-amz-id-2"]),n):n},attemptFailEvent:function(e){var t=this.apiAttemptEvent(e),n=e.response,r=n.error;return n.httpResponse.statusCode>299?(r.code&&(t.AwsException=r.code),r.message&&(t.AwsExceptionMessage=r.message)):((r.code||r.name)&&(t.SdkException=r.code||r.name),r.message&&(t.SdkExceptionMessage=r.message)),t},attachMonitoringEmitter:function(e){var t,n,i,o,a,s,u=0,c=this;e.on("validate",function(){o=r.util.realClock.now(),s=Date.now()},!0),e.on("sign",function(){n=r.util.realClock.now(),t=Date.now(),a=e.httpRequest.region,u++},!0),e.on("validateResponse",function(){i=Math.round(r.util.realClock.now()-n)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var n=c.apiAttemptEvent(e);n.Timestamp=t,n.AttemptLatency=i>=0?i:0,n.Region=a,c.emit("apiCallAttempt",[n])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var o=c.attemptFailEvent(e);o.Timestamp=t,i=i||Math.round(r.util.realClock.now()-n),o.AttemptLatency=i>=0?i:0,o.Region=a,c.emit("apiCallAttempt",[o])}),e.addNamedListener("API_CALL","complete",function(){var t=c.apiCallEvent(e);if(t.AttemptCount=u,!(t.AttemptCount<=0)){t.Timestamp=s;var n=Math.round(r.util.realClock.now()-o);t.Latency=n>=0?n: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,n=null,i="";return e&&(n=(e.service.api.operations||{})[e.operation]||null,i=n?n.authtype:""),t=this.config.signatureVersion?this.config.signatureVersion:"v4"===i||"v4-unsigned-body"===i?"v4":this.api.signatureVersion,r.Signers.RequestSigner.getVersion(t)},serviceInterface:function(){switch(this.api.protocol){case"ec2":case"query":return r.EventListeners.Query;case"json":return r.EventListeners.Json;case"rest-json":return r.EventListeners.RestJson;case"rest-xml":return r.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 r.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().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.replace(/\{service\}/g,this.api.endpointPrefix),t=t.replace(/\{region\}/g,this.config.region),t=t.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new r.Endpoint(e,this.config)},paginationConfig:function(e,t){var n=this.api.operations[e].paginator;if(!n){if(t){var i=new Error;throw r.util.error(i,"No pagination configuration for "+e)}return null}return n}}),r.util.update(r.Service,{defineMethods:function(e){r.util.each(e.prototype.api.operations,function(t){e.prototype[t]||("none"===e.prototype.api.operations[t].authtype?e.prototype[t]=function(e,n){return this.makeUnauthenticatedRequest(t,e,n)}:e.prototype[t]=function(e,n){return this.makeRequest(t,e,n)})})},defineService:function(e,t,n){r.Service._serviceMap[e]=!0,Array.isArray(t)||(n=t,t=[]);var i=a(r.Service,n||{});if("string"==typeof e){r.Service.addVersions(i,t);var o=i.serviceIdentifier||e;i.serviceIdentifier=o}else i.prototype.api=e,r.Service.defineMethods(i);if(r.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&r.util.clientSideMonitoring){var s=r.util.clientSideMonitoring.Publisher,u=r.util.clientSideMonitoring.configProvider,c=u();this.prototype.publisher=new s(c),c.enabled&&(r.Service._clientSideMonitoring=!0)}return r.SequentialExecutor.call(i.prototype),r.Service.addDefaultMonitoringListeners(i.prototype),i},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var n=0;n<t.length;n++)void 0===e.services[t[n]]&&(e.services[t[n]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(e,t,n){function o(e){e.isApi?s.prototype.api=e:s.prototype.api=new i(e)}var s=a(e,{serviceIdentifier:e.serviceIdentifier});if("string"==typeof t){if(n)o(n);else try{o(r.apiLoader(e.serviceIdentifier,t))}catch(n){throw r.util.error(n,{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]=s}else o(t);return r.Service.defineMethods(s),s},hasService:function(e){return Object.prototype.hasOwnProperty.call(r.Service._serviceMap,e)},addDefaultMonitoringListeners:function(e){e.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",function(t){var n=Object.getPrototypeOf(e);n._events&&n.emit("apiCallAttempt",[t])}),e.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",function(t){var n=Object.getPrototypeOf(e);n._events&&n.emit("apiCall",[t])})},_serviceMap:{}}),r.util.mixin(r.Service,r.SequentialExecutor),e.exports=r.Service}).call(t,n(10))},function(e,t,n){function r(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}function i(e){var t=e.config.region,n=r(t),i=e.api.endpointPrefix;return[[t,i],[n,i],[t,"*"],[n,"*"],["*",i],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})}function o(e,t){s.each(t,function(t,n){"globalEndpoint"!==t&&(void 0!==e.config[t]&&null!==e.config[t]||(e.config[t]=n))})}function a(e){for(var t=i(e),n=0;n<t.length;n++){var r=t[n];if(r&&Object.prototype.hasOwnProperty.call(u.rules,r)){var a=u.rules[r];return"string"==typeof a&&(a=u.patterns[a]),e.config.useDualstack&&s.isDualstackAvailable(e)&&(a=s.copy(a),a.endpoint="{service}.dualstack.{region}.amazonaws.com"),e.isGlobalEndpoint=!!a.globalEndpoint,a.signatureVersion||(a.signatureVersion="v4"),void o(e,a)}}}var s=n(4),u=n(185);e.exports=a},function(e,t){e.exports={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:!0},"*/route53":{endpoint:"https://{service}.amazonaws.com",signatureVersion:"v3https",globalEndpoint:!0},"*/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:!0},globalGovCloud:{endpoint:"{service}.us-gov.amazonaws.com"},s3signature:{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"s3"}}}},function(e,t,n){var r=n(0);n(82),n(83);var i;r.Config=r.util.inherit({constructor:function(e){void 0===e&&(e={}),e=this.extractCredentials(e),r.util.each.call(this,this.keys,function(t,n){this.set(t,e[t],n)})},getCredentials:function(e){function t(t){e(t,t?null:i.credentials)}function n(e,t){return new r.util.error(t||new Error,{code:"CredentialsError",message:e,name:"CredentialsError"})}var i=this;i.credentials?"function"==typeof i.credentials.get?function(){i.credentials.get(function(e){e&&(e=n("Could not load credentials from "+i.credentials.constructor.name,e)),t(e)})}():function(){var e=null;i.credentials.accessKeyId&&i.credentials.secretAccessKey||(e=n("Missing credentials")),t(e)}():i.credentialProvider?i.credentialProvider.resolve(function(e,r){e&&(e=n("Could not load credentials from any providers",e)),i.credentials=r,t(e)}):t(n("No credentials to load"))},update:function(e,t){t=t||!1,e=this.extractCredentials(e),r.util.each.call(this,e,function(e,n){(t||Object.prototype.hasOwnProperty.call(this.keys,e)||r.Service.hasService(e))&&this.set(e,n)})},loadFromPath:function(e){this.clear();var t=JSON.parse(r.util.readFileSync(e)),n=new r.FileSystemCredentials(e),i=new r.CredentialProviderChain;return i.providers.unshift(n),i.resolve(function(e,n){if(e)throw e;t.credentials=n}),this.constructor(t),this},clear:function(){r.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,n){void 0===t?(void 0===n&&(n=this.keys[e]),this[e]="function"==typeof n?n.call(this):n):"httpOptions"===e&&this[e]?this[e]=r.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=r.util.copy(e),e.credentials=new r.Credentials(e)),e},setPromisesDependency:function(e){i=e,null===e&&"function"==typeof Promise&&(i=Promise);var t=[r.Request,r.Credentials,r.CredentialProviderChain];r.S3&&r.S3.ManagedUpload&&t.push(r.S3.ManagedUpload),r.util.addPromises(t,i)},getPromisesDependency:function(){return i}}),r.config=new r.Config},function(e,t,n){function r(e){if(!e.service.api.operations)return"";var t=e.service.api.operations[e.operation];return t?t.authtype:""}var i=n(0),o=n(81),a=n(188).discoverEndpoint;i.EventListeners={Core:{}},i.EventListeners={Core:(new o).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){if(!e.service.api.signatureVersion)return t();e.service.config.getCredentials(function(n){n&&(e.response.error=i.util.error(n,{code:"CredentialsError",message:"Missing credentials in config"})),t()})}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=i.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 n=t.idempotentMembers;if(n.length){for(var r=i.util.copy(e.params),o=0,a=n.length;o<a;o++)r[n[o]]||(r[n[o]]=i.util.uuid.v4());e.params=r}}}}),e("VALIDATE_PARAMETERS","validate",function(e){if(e.service.api.operations){var t=e.service.api.operations[e.operation].input,n=e.service.config.paramValidation;new i.ParamValidator(n).validate(t,e.params)}}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),e.service.api.operations){var n=e.service.api.operations[e.operation],r=n?n.authtype:"";if(!e.service.api.signatureVersion&&!r)return t();if(e.service.getSignerClass(e)===i.Signers.V4){var o=e.httpRequest.body||"";if(r.indexOf("unsigned-body")>=0)return e.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",t();i.util.computeSha256(o,function(n,r){n?t(n):(e.httpRequest.headers["X-Amz-Content-Sha256"]=r,t())})}else t()}}),e("SET_CONTENT_LENGTH","afterBuild",function(e){var t=r(e),n=i.util.getRequestPayloadShape(e);if(void 0===e.httpRequest.headers["Content-Length"])try{var o=i.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=o}catch(r){if(n&&n.isStreaming){if(n.requiresLength)throw r;if(t.indexOf("unsigned-body")>=0)return void(e.httpRequest.headers["Transfer-Encoding"]="chunked");throw r}throw r}}),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 i.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",a,!0),t("SIGN","sign",function(e,t){var n=e.service,r=e.service.api.operations||{},i=r[e.operation],o=i?i.authtype:"";if(!n.api.signatureVersion&&!o)return t();n.config.getCredentials(function(r,o){if(r)return e.response.error=r,t();try{var a=n.getSkewCorrectedDate(),s=n.getSignerClass(e),u=new s(e.httpRequest,n.api.signingName||n.api.endpointPrefix,{signatureCache:n.config.signatureCache,operation:i,signatureVersion:n.api.signatureVersion});u.setServiceClientId(n._clientId),delete e.httpRequest.headers.Authorization,delete e.httpRequest.headers.Date,delete e.httpRequest.headers["X-Amz-Date"],u.addAuthorization(o,a),e.signedAt=a}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=i.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),t("SEND","send",function(e,t){function n(n){e.httpResponse.stream=n;var r=e.request.httpRequest.stream,o=e.request.service,a=o.api,s=e.request.operation,u=a.operations[s]||{};n.on("headers",function(r,a,s){if(e.request.emit("httpHeaders",[r,a,e,s]),!e.httpResponse.streaming)if(2===i.HttpClient.streamsApiVersion){if(u.hasEventOutput&&o.successfulResponse(e))return e.request.emit("httpDone"),void t();n.on("readable",function(){var t=n.read();null!==t&&e.request.emit("httpData",[t,e])})}else n.on("data",function(t){e.request.emit("httpData",[t,e])})}),n.on("end",function(){if(!r||!r.didCallback){if(2===i.HttpClient.streamsApiVersion&&u.hasEventOutput&&o.successfulResponse(e))return;e.request.emit("httpDone"),t()}})}function r(t){t.on("sendProgress",function(t){e.request.emit("httpUploadProgress",[t,e])}),t.on("receiveProgress",function(t){e.request.emit("httpDownloadProgress",[t,e])})}function o(n){if("RequestAbortedError"!==n.code){var r="TimeoutError"===n.code?n.code:"NetworkingError";n=i.util.error(n,{code:r,region:e.request.httpRequest.region,hostname:e.request.httpRequest.endpoint.hostname,retryable:!0})}e.error=n,e.request.emit("httpError",[e.error,e],function(){t()})}function a(){var t=i.HttpClient.getInstance(),a=e.request.service.config.httpOptions||{};try{r(t.handleRequest(e.request.httpRequest,a,n,o))}catch(e){o(e)}}e.httpResponse._abortCallback=t,e.error=null,e.data=null,(e.request.service.getSkewCorrectedDate()-this.signedAt)/1e3>=600?this.emit("sign",[this],function(e){e?t(e):a()}):a()}),e("HTTP_HEADERS","httpHeaders",function(e,t,n,r){n.httpResponse.statusCode=e,n.httpResponse.statusMessage=r,n.httpResponse.headers=t,n.httpResponse.body=i.util.buffer.toBuffer(""),n.httpResponse.buffers=[],n.httpResponse.numBytes=0;var o=t.date||t.Date,a=n.request.service;if(o){var s=Date.parse(o);a.config.correctClockSkew&&a.isClockSkewed(s)&&a.applyClockOffset(s)}}),e("HTTP_DATA","httpData",function(e,t){if(e){if(i.util.isNode()){t.httpResponse.numBytes+=e.length;var n=t.httpResponse.headers["content-length"],r={loaded:t.httpResponse.numBytes,total:n};t.request.emit("httpDownloadProgress",[r,t])}t.httpResponse.buffers.push(i.util.buffer.toBuffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=i.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 i.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 n,r=!1;e.error&&(n=e.error.retryDelay||0,e.error.retryable&&e.retryCount<e.maxRetries?(e.retryCount++,r=!0):e.error.redirect&&e.redirectCount<e.maxRedirects&&(e.redirectCount++,r=!0)),r?(e.error=null,setTimeout(t,n)):t()})}),CorePost:(new o).addNamedListeners(function(e){e("EXTRACT_REQUEST_ID","extractData",i.util.extractRequestId),e("EXTRACT_REQUEST_ID","extractError",i.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=i.util.error(new Error(t),{code:"UnknownEndpoint",region:e.region,hostname:e.hostname,retryable:!0,originalError:e})}})}),Logger:(new o).addNamedListeners(function(e){e("LOG_REQUEST","complete",function(e){function t(e,n){if(!n)return n;switch(e.type){case"structure":var r={};return i.util.each(n,function(n,i){Object.prototype.hasOwnProperty.call(e.members,n)?r[n]=t(e.members[n],i):r[n]=i}),r;case"list":var o=[];return i.util.arrayEach(n,function(n,r){o.push(t(e.member,n))}),o;case"map":var a={};return i.util.each(n,function(n,r){a[n]=t(e.value,r)}),a;default:return e.isSensitive?"***SensitiveInformation***":n}}var r=e.request,o=r.service.config.logger;if(o){var a=function(){var a=e.request.service.getSkewCorrectedDate().getTime(),s=(a-r.startTime.getTime())/1e3,u=!!o.isTTY,c=e.httpResponse.statusCode,l=r.params;r.service.api.operations&&r.service.api.operations[r.operation]&&r.service.api.operations[r.operation].input&&(l=t(r.service.api.operations[r.operation].input,r.params));var p=n(189).inspect(l,!0,null),f="";return u&&(f+="[33m"),f+="[AWS "+r.service.serviceIdentifier+" "+c,f+=" "+s.toString()+"s "+e.retryCount+" retries]",u&&(f+="[0;1m"),f+=" "+i.util.string.lowerFirst(r.operation),f+="("+p+")",u&&(f+="[0m"),f}();"function"==typeof o.log?o.log(a):"function"==typeof o.write&&o.write(a+"\n")}})}),Json:(new o).addNamedListeners(function(e){var t=n(50);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Rest:(new o).addNamedListeners(function(e){var t=n(37);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestJson:(new o).addNamedListeners(function(e){var t=n(75);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),RestXml:(new o).addNamedListeners(function(e){var t=n(76);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)}),Query:(new o).addNamedListeners(function(e){var t=n(73);e("BUILD","build",t.buildRequest),e("EXTRACT_DATA","extractData",t.extractData),e("EXTRACT_ERROR","extractError",t.extractError)})}},function(e,t,n){(function(t){function r(e){var t=e.service,n=t.api||{},r={};return t.config.region&&(r.region=t.config.region),n.serviceId&&(r.serviceId=n.serviceId),t.config.credentials.accessKeyId&&(r.accessKeyId=t.config.credentials.accessKeyId),r}function i(e,t,n){n&&void 0!==t&&null!==t&&"structure"===n.type&&n.required&&n.required.length>0&&m.arrayEach(n.required,function(r){var o=n.members[r];if(!0===o.endpointDiscoveryId){var a=o.isLocationName?o.name:r;e[a]=String(t[r])}else i(e,t[r],o)})}function o(e,t){var n={};return i(n,e.params,t),n}function a(e){var t=e.service,n=t.api,i=n.operations?n.operations[e.operation]:void 0,a=i?i.input:void 0,s=o(e,a),c=r(e);Object.keys(s).length>0&&(c=m.update(c,s),i&&(c.operation=i.name));var l=h.endpointCache.get(c);if(!l||1!==l.length||""!==l[0].Address)if(l&&l.length>0)e.httpRequest.updateEndpoint(l[0].Address);else{var p=t.makeRequest(n.endpointOperation,{Operation:i.name,Identifiers:s});u(p),p.removeListener("validate",h.EventListeners.Core.VALIDATE_PARAMETERS),p.removeListener("retry",h.EventListeners.Core.RETRY_CHECK),h.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}]),p.send(function(e,t){t&&t.Endpoints?h.endpointCache.put(c,t.Endpoints):e&&h.endpointCache.put(c,[{Address:"",CachePeriodInMinutes:1}])})}}function s(e,t){var n=e.service,i=n.api,a=i.operations?i.operations[e.operation]:void 0,s=a?a.input:void 0,c=o(e,s),l=r(e);Object.keys(c).length>0&&(l=m.update(l,c),a&&(l.operation=a.name));var p=h.EndpointCache.getKeyString(l),f=h.endpointCache.get(p);if(f&&1===f.length&&""===f[0].Address)return g[p]||(g[p]=[]),void g[p].push({request:e,callback:t});if(f&&f.length>0)e.httpRequest.updateEndpoint(f[0].Address),t();else{var d=n.makeRequest(i.endpointOperation,{Operation:a.name,Identifiers:c});d.removeListener("validate",h.EventListeners.Core.VALIDATE_PARAMETERS),u(d),h.endpointCache.put(p,[{Address:"",CachePeriodInMinutes:60}]),d.send(function(n,r){if(n){var i={code:"EndpointDiscoveryException",message:"Request cannot be fulfilled without specifying an endpoint",retryable:!1};if(e.response.error=m.error(n,i),h.endpointCache.remove(l),g[p]){var o=g[p];m.arrayEach(o,function(e){e.request.response.error=m.error(n,i),e.callback()}),delete g[p]}}else if(r&&(h.endpointCache.put(p,r.Endpoints),e.httpRequest.updateEndpoint(r.Endpoints[0].Address),g[p])){var o=g[p];m.arrayEach(o,function(e){e.request.httpRequest.updateEndpoint(r.Endpoints[0].Address),e.callback()}),delete g[p]}t()})}}function u(e){var t=e.service.api,n=t.apiVersion;n&&!e.httpRequest.headers["x-amz-api-version"]&&(e.httpRequest.headers["x-amz-api-version"]=n)}function c(e){var t=e.error,n=e.httpResponse;if(t&&("InvalidEndpointException"===t.code||421===n.statusCode)){var i=e.request,a=i.service.api.operations||{},s=a[i.operation]?a[i.operation].input:void 0,u=o(i,s),c=r(i);Object.keys(u).length>0&&(c=m.update(c,u),a[i.operation]&&(c.operation=a[i.operation].name)),h.endpointCache.remove(c)}}function l(e){if(e._originalConfig&&e._originalConfig.endpoint&&!0===e._originalConfig.endpointDiscoveryEnabled)throw m.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var t=h.config[e.serviceIdentifier]||{};return Boolean(h.config.endpoint||t.endpoint||e._originalConfig&&e._originalConfig.endpoint)}function p(e){return["false","0"].indexOf(e)>=0}function f(e){if(!0===(e.service||{}).config.endpointDiscoveryEnabled)return!0;if(m.isBrowser())return!1;for(var n=0;n<y.length;n++){var r=y[n];if(Object.prototype.hasOwnProperty.call(t.env,r)){if(""===t.env[r]||void 0===t.env[r])throw m.error(new Error,{code:"ConfigurationException",message:"environmental variable "+r+" cannot be set to nothing"});if(!p(t.env[r]))return!0}}var i={};try{i=h.util.iniLoader?h.util.iniLoader.loadFrom({isConfig:!0,filename:t.env[h.util.sharedConfigFileEnv]}):{}}catch(e){}var o=i[t.env.AWS_PROFILE||h.util.defaultProfile]||{};if(Object.prototype.hasOwnProperty.call(o,"endpoint_discovery_enabled")){if(void 0===o.endpoint_discovery_enabled)throw m.error(new Error,{code:"ConfigurationException",message:"config file entry 'endpoint_discovery_enabled' cannot be set to nothing"});if(!p(o.endpoint_discovery_enabled))return!0}return!1}function d(e,t){var n=e.service||{};if(l(n)||e.isPresigned())return t();if(!f(e))return t();e.httpRequest.appendToUserAgent("endpoint-discovery");var r=n.api.operations||{},i=r[e.operation];switch(i?i.endpointDiscoveryRequired:"NULL"){case"OPTIONAL":a(e),e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",c),t();break;case"REQUIRED":e.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",c),s(e,t);break;case"NULL":default:t()}}var h=n(0),m=n(4),y=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"],g={};e.exports={discoverEndpoint:d,requiredDiscoverEndpoint:s,optionalDiscoverEndpoint:a,marshallCustomIdentifiers:o,getCacheKey:r,invalidateCachedEndpoint:c}}).call(t,n(10))},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),S(r.showHidden)&&(r.showHidden=!1),S(r.depth)&&(r.depth=2),S(r.colors)&&(r.colors=!1),S(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&T(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=u(e,i,r)),i}var o=c(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),C(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(T(n)){var y=n.name?": "+n.name:"";return e.stylize("[Function"+y+"]","special")}if(E(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(C(n))return l(n)}var g="",v=!1,_=["{","}"];if(h(n)&&(v=!0,_=["[","]"]),T(n)&&(g=" [Function"+(n.name?": "+n.name:"")+"]"),E(n)&&(g=" "+RegExp.prototype.toString.call(n)),w(n)&&(g=" "+Date.prototype.toUTCString.call(n)),C(n)&&(g=" "+l(n)),0===a.length&&(!v||0==n.length))return _[0]+g+_[1];if(r<0)return E(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var S;return S=v?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,v)}),e.seen.pop(),d(S,g,_)}function c(e,t){if(S(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)P(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))}),o}function f(e,t,n,r,i,o){var a,s,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),P(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=y(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return"   "+e}).join("\n"))):s=e.stylize("[Circular]","special")),S(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function S(e){return void 0===e}function E(e){return I(e)&&"[object RegExp]"===A(e)}function I(e){return"object"==typeof e&&null!==e}function w(e){return I(e)&&"[object Date]"===A(e)}function C(e){return I(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function N(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function A(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var R=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,a=String(e).replace(R,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<o;s=r[++n])y(s)||!I(s)?a+=" "+s:a+=" "+i(s);return a},t.deprecate=function(n,i){function o(){if(!a){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),a=!0}return n.apply(this,arguments)}if(S(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var a=!1;return o};var x,D={};t.debuglog=function(e){if(S(x)&&(x=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!D[e])if(new RegExp("\\b"+e+"\\b","i").test(x)){var n=r.pid;D[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else D[e]=function(){};return D[e]},t.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=g,t.isNumber=v,t.isString=b,t.isSymbol=_,t.isUndefined=S,t.isRegExp=E,t.isObject=I,t.isDate=w,t.isError=C,t.isFunction=T,t.isPrimitive=N,t.isBuffer=n(190);var j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",O(),t.format.apply(t,arguments))},t.inherits=n(191),t._extend=function(e,t){if(!t||!I(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,n(22),n(10))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},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 n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(e){function t(e){return Object.prototype.hasOwnProperty.call(u,e._asm.currentState)}var r=n(0),i=n(193),o=r.util.inherit,a=r.util.domain,s=n(54),u={success:1,error:1,complete:1},c=new i;c.setupStates=function(){var e=function(e,n){var r=this;r._haltHandlersOnError=!1,r.emit(r._asm.currentState,function(e){if(e)if(t(r)){if(!(a&&r.domain instanceof a.Domain))throw e;e.domainEmitter=r,e.domain=r.domain,e.domainThrown=!1,r.domain.emit("error",e)}else r.response.error=e,n(e);else n(r.response.error)})};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)},c.setupStates(),r.Request=o({constructor:function(e,t,n){var o=e.endpoint,s=e.config.region,u=e.config.customUserAgent;e.isGlobalEndpoint&&(s="us-east-1"),this.domain=a&&a.active,this.service=e,this.operation=t,this.params=n||{},this.httpRequest=new r.HttpRequest(o,s),this.httpRequest.appendToUserAgent(u),this.startTime=e.getSkewCorrectedDate(),this.response=new r.Response(this),this._asm=new i(c.states,"validate"),this._haltHandlersOnError=!1,r.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=r.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){function t(n){e.call(n,n.error,n.data,function(i){!1!==i&&(n.hasNextPage()?n.nextPage().on("complete",t).send():e.call(n,null,null,r.util.fn.noop))})}e=r.util.fn.makeAsync(e,3),this.on("complete",t).send()},eachItem:function(e){function t(t,i){if(t)return e(t,null);if(null===i)return e(null,null);var o=n.service.paginationConfig(n.operation),a=o.resultKey;Array.isArray(a)&&(a=a[0]);var u=s.search(i,a),c=!0;return r.util.arrayEach(u,function(t){if(!1===(c=e(null,t)))return r.util.abort}),c}var n=this;this.eachPage(t)},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var t=r.util.stream,n=this,i=null;return 2===r.HttpClient.streamsApiVersion?(i=new t.PassThrough,e.nextTick(function(){n.send()})):(i=new t.Stream,i.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,a){if(e<300){n.removeListener("httpData",r.EventListeners.Core.HTTP_DATA),n.removeListener("httpError",r.EventListeners.Core.HTTP_ERROR),n.on("httpError",function(e){a.error=e,a.error.retryable=!1});var s,u=!1;if("HEAD"!==n.httpRequest.method&&(s=parseInt(o["content-length"],10)),void 0!==s&&!isNaN(s)&&s>=0){u=!0;var c=0}var l=function(){u&&c!==s?i.emit("error",r.util.error(new Error("Stream content length mismatch. Received "+c+" of "+s+" bytes."),{code:"StreamContentLengthMismatch"})):2===r.HttpClient.streamsApiVersion?i.end():i.emit("end")},p=a.httpResponse.createUnbufferedStream();if(2===r.HttpClient.streamsApiVersion)if(u){var f=new t.PassThrough;f._write=function(e){return e&&e.length&&(c+=e.length),t.PassThrough.prototype._write.apply(this,arguments)},f.on("end",l),i.on("error",function(e){u=!1,p.unpipe(f),f.emit("end"),f.end()}),p.pipe(f).pipe(i,{end:!1})}else p.pipe(i);else u&&p.on("data",function(e){e&&e.length&&(c+=e.length)}),p.on("data",function(e){i.emit("data",e)}),p.on("end",l);p.on("error",function(e){u=!1,i.emit("error",e)})}}),i},emitEvent:function(e,t,n){"function"==typeof t&&(n=t,t=null),n||(n=function(){}),t||(t=this.eventParameters(e,this.response)),r.SequentialExecutor.prototype.emit.call(this,e,t,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,t){return t||"function"!=typeof e||(t=e,e=null),(new r.Signers.Presign).sign(this.toGet(),e,t)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",r.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",r.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}}),r.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var t=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(e,n){t.on("complete",function(t){t.error?n(t.error):e(Object.defineProperty(t.data||{},"$response",{value:t}))}),t.runTo()})}},r.Request.deletePromisesFromClass=function(){delete this.prototype.promise},r.util.addPromises(r.Request),r.util.mixin(r.Request,r.SequentialExecutor)}).call(t,n(10))},function(e,t){function n(e,t){this.currentState=t||null,this.states=e||{}}n.prototype.runTo=function(e,t,n,r){"function"==typeof e&&(r=n,n=t,t=e,e=null);var i=this,o=i.states[i.currentState];o.fn.call(n||i,r,function(r){if(r){if(!o.fail)return t?t.call(n,r):null;i.currentState=o.fail}else{if(!o.accept)return t?t.call(n):null;i.currentState=o.accept}if(i.currentState===e)return t?t.call(n,r):null;i.runTo(e,t,n,r)})},n.prototype.addState=function(e,t,n,r){return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),this.currentState||(this.currentState=e),this.states[e]={accept:t,fail:n,fn:r},this},e.exports=n},function(e,t,n){var r=n(0),i=r.util.inherit,o=n(54);r.Response=i({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new r.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,n=this.request.service,i=this.request.operation;try{t=n.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=r.util.copy(this.request.params);if(this.nextPageTokens){var a=t.inputToken;"string"==typeof a&&(a=[a]);for(var s=0;s<a.length;s++)o[a[s]]=this.nextPageTokens[s];return n.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]),r.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}})},function(e,t,n){function r(e){var t=e.request._waiter,n=t.config.acceptors,r=!1,i="retry";n.forEach(function(n){if(!r){var o=t.matchers[n.matcher];o&&o(e,n.expected,n.argument)&&(r=!0,i=n.state)}}),!r&&e.error&&(i="failure"),"success"===i?t.setSuccess(e):t.setError(e,"retry"===i)}var i=n(0),o=i.util.inherit,a=n(54);i.ResourceWaiter=o({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,n){try{var r=a.search(e.data,n)}catch(e){return!1}return a.strictDeepEqual(r,t)},pathAll:function(e,t,n){try{var r=a.search(e.data,n)}catch(e){return!1}Array.isArray(r)||(r=[r]);var i=r.length;if(!i)return!1;for(var o=0;o<i;o++)if(!a.strictDeepEqual(r[o],t))return!1;return!0},pathAny:function(e,t,n){try{var r=a.search(e.data,n)}catch(e){return!1}Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++)if(a.strictDeepEqual(r[o],t))return!0;return!1},status:function(e,t){var n=e.httpResponse.statusCode;return"number"==typeof n&&n===t},error:function(e,t){return"string"==typeof t&&e.error?t===e.error.code:t===!!e.error}},listeners:(new i.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",r),e("CHECK_ERROR","extractError",r)}),wait:function(e,t){"function"==typeof e&&(t=e,e=void 0),e&&e.$waiter&&(e=i.util.copy(e),"number"==typeof e.$waiter.delay&&(this.config.delay=e.$waiter.delay),"number"==typeof e.$waiter.maxAttempts&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var n=this.service.makeRequest(this.config.operation,e);return n._waiter=this,n.response.maxRetries=this.config.maxAttempts,n.addListeners(this.listeners),t&&n.send(t),n},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,t){e.data=null,e.error=i.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 i.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=i.util.copy(this.service.api.waiters[e])}})},function(e,t,n){var r=n(0),i=r.util.inherit;r.Signers.RequestSigner=i({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}}),r.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return r.Signers.V2;case"v3":return r.Signers.V3;case"s3v4":case"v4":return r.Signers.V4;case"s3":return r.Signers.S3;case"v3https":return r.Signers.V3Https}throw new Error("Unknown signing version "+e)},n(197),n(85),n(198),n(199),n(200),n(201)},function(e,t,n){var r=n(0),i=r.util.inherit;r.Signers.V2=i(r.Signers.RequestSigner,{addAuthorization:function(e,t){t||(t=r.util.date.getDate());var n=this.request;n.params.Timestamp=r.util.date.iso8601(t),n.params.SignatureVersion="2",n.params.SignatureMethod="HmacSHA256",n.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(n.params.SecurityToken=e.sessionToken),delete n.params.Signature,n.params.Signature=this.signature(e),n.body=r.util.queryParamsToString(n.params),n.headers["Content-Length"]=n.body.length},signature:function(e){return r.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(r.util.queryParamsToString(this.request.params)),e.join("\n")}}),e.exports=r.Signers.V2},function(e,t,n){var r=n(0),i=r.util.inherit;n(85),r.Signers.V3Https=i(r.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=r.Signers.V3Https},function(e,t,n){var r=n(0),i=n(86),o=r.util.inherit;r.Signers.V4=o(r.Signers.RequestSigner,{constructor:function(e,t,n){r.Signers.RequestSigner.call(this,e),this.serviceName=t,n=n||{},this.signatureCache="boolean"!=typeof n.signatureCache||n.signatureCache,this.operation=n.operation,this.signatureVersion=n.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,t){var n=r.util.date.iso8601(t).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,n):this.addHeaders(e,n),this.request.headers.Authorization=this.authorization(e,n)},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 n=this.credentialString(t),i={"X-Amz-Date":t,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+n,"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"]),r.util.each.call(this,this.request.headers,function(e,t){if("presigned-expires"!==e&&this.isSignableHeader(e)){var n=e.toLowerCase();0===n.indexOf("x-amz-meta-")?i[n]=t:0===n.indexOf("x-amz-")&&(i[e]=t)}});var o=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=o+r.util.queryParamsToString(i)},authorization:function(e,t){var n=[],r=this.credentialString(t);return n.push(this.algorithm+" Credential="+e.accessKeyId+"/"+r),n.push("SignedHeaders="+this.signedHeaders()),n.push("Signature="+this.signature(e,t)),n.join(", ")},signature:function(e,t){var n=i.getSigningKey(e,t.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return r.util.crypto.hmac(n,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=r.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=[];r.util.each.call(this,this.request.headers,function(t,n){e.push([t,n])}),e.sort(function(e,t){return e[0].toLowerCase()<t[0].toLowerCase()?-1:1});var t=[];return r.util.arrayEach.call(this,e,function(e){var n=e[0].toLowerCase();if(this.isSignableHeader(n)){var i=e[1];if(void 0===i||null===i||"function"!=typeof i.toString)throw r.util.error(new Error("Header "+n+" contains invalid value"),{code:"InvalidHeader"});t.push(n+":"+this.canonicalHeaderValues(i.toString()))}}),t.join("\n")},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return r.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 r.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=r.Signers.V4},function(e,t,n){var r=n(0),i=r.util.inherit;r.Signers.S3=i(r.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"]=r.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var n=this.sign(e.secretAccessKey,this.stringToSign()),i="AWS "+e.accessKeyId+":"+n;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 n=this.canonicalizedAmzHeaders();return n&&t.push(n),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];r.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 r.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("?"),n=t[0],i=t[1],o="";if(e.virtualHostedBucket&&(o+="/"+e.virtualHostedBucket),o+=n,i){var a=[];r.util.arrayEach.call(this,i.split("&"),function(e){var t=e.split("=")[0],n=e.split("=")[1];if(this.subResources[t]||this.responseHeaders[t]){var r={name:t};void 0!==n&&(this.subResources[t]?r.value=n:r.value=decodeURIComponent(n)),a.push(r)}}),a.sort(function(e,t){return e.name<t.name?-1:1}),a.length&&(i=[],r.util.arrayEach(a,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 r.util.crypto.hmac(e,t,"base64","sha1")}}),e.exports=r.Signers.S3},function(e,t,n){function r(e){var t=e.httpRequest.headers[s],n=e.service.getSignerClass(e);if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],n===o.Signers.V4){if(t>604800)throw o.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[s]=t}else{if(n!==o.Signers.S3)throw o.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});var r=e.service?e.service.getSkewCorrectedDate():o.util.date.getDate();e.httpRequest.headers[s]=parseInt(o.util.date.unixTimestamp(r)+t,10).toString()}}function i(e){var t=e.httpRequest.endpoint,n=o.util.urlParse(e.httpRequest.path),r={};n.search&&(r=o.util.queryStringParse(n.search.substr(1)));var i=e.httpRequest.headers.Authorization.split(" ");if("AWS"===i[0])i=i[1].split(":"),r.AWSAccessKeyId=i[0],r.Signature=i[1],o.util.each(e.httpRequest.headers,function(e,t){e===s&&(e="Expires"),0===e.indexOf("x-amz-meta-")&&(delete r[e],e=e.toLowerCase()),r[e]=t}),delete e.httpRequest.headers[s],delete r.Authorization,delete r.Host;else if("AWS4-HMAC-SHA256"===i[0]){i.shift();var a=i.join(" "),u=a.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];r["X-Amz-Signature"]=u,delete r.Expires}t.pathname=n.pathname,t.search=o.util.queryParamsToString(r)}var o=n(0),a=o.util.inherit,s="presigned-expires";o.Signers.Presign=a({sign:function(e,t,n){if(e.httpRequest.headers[s]=t||3600,e.on("build",r),e.on("sign",i),e.removeListener("afterBuild",o.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",o.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!n){if(e.build(),e.response.error)throw e.response.error;return o.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?n(this.response.error):n(null,o.util.urlFormat(e.httpRequest.endpoint))})}}),e.exports=o.Signers.Presign},function(e,t,n){var r=n(0);r.ParamValidator=r.util.inherit({constructor:function(e){!0!==e&&void 0!==e||(e={min:!0}),this.validation=e},validate:function(e,t,n){if(this.errors=[],this.validateMember(e,t||{},n||"params"),this.errors.length>1){var i=this.errors.join("\n* ");throw i="There were "+this.errors.length+" validation errors:\n* "+i,r.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(r.util.error(new Error(t),{code:e}))},validateStructure:function(e,t,n){this.validateType(t,n,["object"],"structure");for(var r,i=0;e.required&&i<e.required.length;i++){r=e.required[i];var o=t[r];void 0!==o&&null!==o||this.fail("MissingRequiredParameter","Missing required key '"+r+"' in "+n)}for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=t[r],s=e.members[r];if(void 0!==s){var u=[n,r].join(".");this.validateMember(s,a,u)}else this.fail("UnexpectedParameter","Unexpected key '"+r+"' found in "+n)}return!0},validateMember:function(e,t,n){switch(e.type){case"structure":return this.validateStructure(e,t,n);case"list":return this.validateList(e,t,n);case"map":return this.validateMap(e,t,n);default:return this.validateScalar(e,t,n)}},validateList:function(e,t,n){if(this.validateType(t,n,[Array])){this.validateRange(e,t.length,n,"list member count");for(var r=0;r<t.length;r++)this.validateMember(e.member,t[r],n+"["+r+"]")}},validateMap:function(e,t,n){if(this.validateType(t,n,["object"],"map")){var r=0;for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(this.validateMember(e.key,i,n+"[key='"+i+"']"),this.validateMember(e.value,t[i],n+"['"+i+"']"),r++);this.validateRange(e,r,n,"map member count")}},validateScalar:function(e,t,n){switch(e.type){case null:case void 0:case"string":return this.validateString(e,t,n);case"base64":case"binary":return this.validatePayload(t,n);case"integer":case"float":return this.validateNumber(e,t,n);case"boolean":return this.validateType(t,n,["boolean"]);case"timestamp":return this.validateType(t,n,[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 "+n)}},validateString:function(e,t,n){var r=["string"];e.isJsonValue&&(r=r.concat(["number","object","boolean"])),null!==t&&this.validateType(t,n,r)&&(this.validateEnum(e,t,n),this.validateRange(e,t.length,n,"string length"),this.validatePattern(e,t,n),this.validateUri(e,t,n))},validateUri:function(e,t,n){"uri"===e.location&&0===t.length&&this.fail("UriParameterError",'Expected uri parameter to have length >= 1, but found "'+t+'" for '+n)},validatePattern:function(e,t,n){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 "+n))},validateRange:function(e,t,n,r){this.validation.min&&void 0!==e.min&&t<e.min&&this.fail("MinRangeError","Expected "+r+" >= "+e.min+", but found "+t+" for "+n),this.validation.max&&void 0!==e.max&&t>e.max&&this.fail("MaxRangeError","Expected "+r+" <= "+e.max+", but found "+t+" for "+n)},validateEnum:function(e,t,n){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 "+n)},validateType:function(e,t,n,i){if(null===e||void 0===e)return!1;for(var o=!1,a=0;a<n.length;a++){if("string"==typeof n[a]){if(typeof e===n[a])return!0}else if(n[a]instanceof RegExp){if((e||"").toString().match(n[a]))return!0}else{if(e instanceof n[a])return!0;if(r.util.isType(e,n[a]))return!0;i||o||(n=n.slice()),n[a]=r.util.typeName(n[a])}o=!0}var s=i;s||(s=n.join(", ").replace(/,([^,]+)$/,", or$1"));var u=s.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+t+" to be a"+u+" "+s),!1},validateNumber:function(e,t,n){if(null!==t&&void 0!==t){if("string"==typeof t){var r=parseFloat(t);r.toString()===t&&(t=r)}this.validateType(t,n,["number"])&&this.validateRange(e,t,n,"numeric value")}},validatePayload:function(e,t){if(null!==e&&void 0!==e&&"string"!=typeof e&&(!e||"number"!=typeof e.byteLength)){if(r.util.isNode()){var n=r.util.stream.Stream;if(r.util.Buffer.isBuffer(e)||e instanceof n)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(r.util.isType(e,i[o]))return;if(r.util.typeName(e.constructor)===i[o])return}this.fail("InvalidParameterType","Expected "+t+" to be a string, Buffer, Stream, Blob, or typed array object")}}})},function(e,t){e.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},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*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},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:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM",cors:!0},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},s3control:{name:"S3Control",dualstackAvailable:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay"},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},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:!0},costexplorer:{prefix:"ce",name:"CostExplorer",cors:!0},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData",cors:!0},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend",cors:!0},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia",cors:!0},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia",cors:!0},kinesisvideo:{name:"KinesisVideo",cors:!0},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate",cors:!0},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups",cors:!0},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:!0},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:!0},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"},personalizeevents:{prefix:"personalize-events",name:"PersonalizeEvents"},personalizeruntime:{prefix:"personalize-runtime",name:"PersonalizeRuntime"}}},function(e,t,n){function r(e,t,n){var r=t&&n||0,l=t||[];e=e||{};var p=e.node||i,f=void 0!==e.clockseq?e.clockseq:o;if(null==p||null==f){var d=a();null==p&&(p=i=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==f&&(f=o=16383&(d[6]<<8|d[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,y=h-u+(m-c)/1e4;if(y<0&&void 0===e.clockseq&&(f=f+1&16383),(y<0||h>u)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=h,c=m,o=f,h+=122192928e5;var g=(1e4*(268435455&h)+m)%4294967296;l[r++]=g>>>24&255,l[r++]=g>>>16&255,l[r++]=g>>>8&255,l[r++]=255&g;var v=h/4294967296*1e4&268435455;l[r++]=v>>>8&255,l[r++]=255&v,l[r++]=v>>>24&15|16,l[r++]=v>>>16&255,l[r++]=f>>>8|128,l[r++]=255&f;for(var b=0;b<6;++b)l[r+b]=p[b];return t||s(l)}var i,o,a=n(87),s=n(88),u=0,c=0;e.exports=r},function(e,t,n){function r(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var a=e.random||(e.rng||i)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[r+s]=a[s];return t||o(a)}var i=n(87),o=n(88);e.exports=r},function(e,t,n){var r=n(207),i=n(211),o=n(212),a=n(213);e.exports={createHash:function(e){if("md5"===(e=e.toLowerCase()))return new i;if("sha256"===e)return new a;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 r(i,t);if("sha256"===e)return new r(a,t);if("sha1"===e)return new r(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")}}},function(e,t,n){function r(e,t){this.hash=new e,this.outer=new e;var n=i(e,t),r=new Uint8Array(e.BLOCK_SIZE);r.set(n);for(var o=0;o<e.BLOCK_SIZE;o++)n[o]^=54,r[o]^=92;this.hash.update(n),this.outer.update(r);for(var o=0;o<n.byteLength;o++)n[o]=0}function i(e,t){var n=o.convertToBuffer(t);if(n.byteLength>e.BLOCK_SIZE){var r=new e;r.update(n),n=r.digest()}var i=new Uint8Array(e.BLOCK_SIZE);return i.set(n),i}var o=n(38);e.exports=r,r.prototype.update=function(e){if(o.isEmptyData(e)||this.error)return this;try{this.hash.update(o.convertToBuffer(e))}catch(e){this.error=e}return this},r.prototype.digest=function(e){return this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest(e)}},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i}function o(e,t,n){return 3*(t+n)/4-n}function a(e){for(var t,n=r(e),i=n[0],a=n[1],s=new f(o(e,i,a)),u=0,c=a>0?i-4:i,l=0;l<c;l+=4)t=p[e.charCodeAt(l)]<<18|p[e.charCodeAt(l+1)]<<12|p[e.charCodeAt(l+2)]<<6|p[e.charCodeAt(l+3)],s[u++]=t>>16&255,s[u++]=t>>8&255,s[u++]=255&t;return 2===a&&(t=p[e.charCodeAt(l)]<<2|p[e.charCodeAt(l+1)]>>4,s[u++]=255&t),1===a&&(t=p[e.charCodeAt(l)]<<10|p[e.charCodeAt(l+1)]<<4|p[e.charCodeAt(l+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s}function s(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function u(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(s(r));return i.join("")}function c(e){for(var t,n=e.length,r=n%3,i=[],o=0,a=n-r;o<a;o+=16383)i.push(u(e,o,o+16383>a?a:o+16383));return 1===r?(t=e[n-1],i.push(l[t>>2]+l[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(l[t>>10]+l[t>>4&63]+l[t<<2&63]+"=")),i.join("")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=c;for(var l=[],p=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h<m;++h)l[h]=d[h],p[d.charCodeAt(h)]=h;p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,p=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=h,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+d]=255&a,d+=h,a/=256,c-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){function r(){this.state=[1732584193,4023233417,2562383102,271733878],this.buffer=new DataView(new ArrayBuffer(p)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}function i(e,t,n,r,i,o){return((t=(t+e&4294967295)+(r+o&4294967295)&4294967295)<<i|t>>>32-i)+n&4294967295}function o(e,t,n,r,o,a,s){return i(t&n|~t&r,e,t,o,a,s)}function a(e,t,n,r,o,a,s){return i(t&r|n&~r,e,t,o,a,s)}function s(e,t,n,r,o,a,s){return i(t^n^r,e,t,o,a,s)}function u(e,t,n,r,o,a,s){return i(n^(t|~r),e,t,o,a,s)}var c=n(38),l=n(17).Buffer,p=64;e.exports=r,r.BLOCK_SIZE=p,r.prototype.update=function(e){if(c.isEmptyData(e))return this;if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=c.convertToBuffer(e),n=0,r=t.byteLength;for(this.bytesHashed+=r;r>0;)this.buffer.setUint8(this.bufferLength++,t[n++]),r--,this.bufferLength===p&&(this.hashBuffer(),this.bufferLength=0);return this},r.prototype.digest=function(e){if(!this.finished){var t=this,n=t.buffer,r=t.bufferLength,i=t.bytesHashed,o=8*i;if(n.setUint8(this.bufferLength++,128),r%p>=p-8){for(var a=this.bufferLength;a<p;a++)n.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(var a=this.bufferLength;a<p-8;a++)n.setUint8(a,0);n.setUint32(p-8,o>>>0,!0),n.setUint32(p-4,Math.floor(o/4294967296),!0),this.hashBuffer(),this.finished=!0}for(var s=new DataView(new ArrayBuffer(16)),a=0;a<4;a++)s.setUint32(4*a,this.state[a],!0);var u=new l(s.buffer,s.byteOffset,s.byteLength);return e?u.toString(e):u},r.prototype.hashBuffer=function(){var e=this,t=e.buffer,n=e.state,r=n[0],i=n[1],c=n[2],l=n[3];r=o(r,i,c,l,t.getUint32(0,!0),7,3614090360),l=o(l,r,i,c,t.getUint32(4,!0),12,3905402710),c=o(c,l,r,i,t.getUint32(8,!0),17,606105819),i=o(i,c,l,r,t.getUint32(12,!0),22,3250441966),r=o(r,i,c,l,t.getUint32(16,!0),7,4118548399),l=o(l,r,i,c,t.getUint32(20,!0),12,1200080426),c=o(c,l,r,i,t.getUint32(24,!0),17,2821735955),i=o(i,c,l,r,t.getUint32(28,!0),22,4249261313),r=o(r,i,c,l,t.getUint32(32,!0),7,1770035416),l=o(l,r,i,c,t.getUint32(36,!0),12,2336552879),c=o(c,l,r,i,t.getUint32(40,!0),17,4294925233),i=o(i,c,l,r,t.getUint32(44,!0),22,2304563134),r=o(r,i,c,l,t.getUint32(48,!0),7,1804603682),l=o(l,r,i,c,t.getUint32(52,!0),12,4254626195),c=o(c,l,r,i,t.getUint32(56,!0),17,2792965006),i=o(i,c,l,r,t.getUint32(60,!0),22,1236535329),r=a(r,i,c,l,t.getUint32(4,!0),5,4129170786),l=a(l,r,i,c,t.getUint32(24,!0),9,3225465664),c=a(c,l,r,i,t.getUint32(44,!0),14,643717713),i=a(i,c,l,r,t.getUint32(0,!0),20,3921069994),r=a(r,i,c,l,t.getUint32(20,!0),5,3593408605),l=a(l,r,i,c,t.getUint32(40,!0),9,38016083),c=a(c,l,r,i,t.getUint32(60,!0),14,3634488961),i=a(i,c,l,r,t.getUint32(16,!0),20,3889429448),r=a(r,i,c,l,t.getUint32(36,!0),5,568446438),l=a(l,r,i,c,t.getUint32(56,!0),9,3275163606),c=a(c,l,r,i,t.getUint32(12,!0),14,4107603335),i=a(i,c,l,r,t.getUint32(32,!0),20,1163531501),r=a(r,i,c,l,t.getUint32(52,!0),5,2850285829),l=a(l,r,i,c,t.getUint32(8,!0),9,4243563512),c=a(c,l,r,i,t.getUint32(28,!0),14,1735328473),i=a(i,c,l,r,t.getUint32(48,!0),20,2368359562),r=s(r,i,c,l,t.getUint32(20,!0),4,4294588738),l=s(l,r,i,c,t.getUint32(32,!0),11,2272392833),c=s(c,l,r,i,t.getUint32(44,!0),16,1839030562),i=s(i,c,l,r,t.getUint32(56,!0),23,4259657740),r=s(r,i,c,l,t.getUint32(4,!0),4,2763975236),l=s(l,r,i,c,t.getUint32(16,!0),11,1272893353),c=s(c,l,r,i,t.getUint32(28,!0),16,4139469664),i=s(i,c,l,r,t.getUint32(40,!0),23,3200236656),r=s(r,i,c,l,t.getUint32(52,!0),4,681279174),l=s(l,r,i,c,t.getUint32(0,!0),11,3936430074),c=s(c,l,r,i,t.getUint32(12,!0),16,3572445317),i=s(i,c,l,r,t.getUint32(24,!0),23,76029189),r=s(r,i,c,l,t.getUint32(36,!0),4,3654602809),l=s(l,r,i,c,t.getUint32(48,!0),11,3873151461),c=s(c,l,r,i,t.getUint32(60,!0),16,530742520),i=s(i,c,l,r,t.getUint32(8,!0),23,3299628645),r=u(r,i,c,l,t.getUint32(0,!0),6,4096336452),l=u(l,r,i,c,t.getUint32(28,!0),10,1126891415),c=u(c,l,r,i,t.getUint32(56,!0),15,2878612391),i=u(i,c,l,r,t.getUint32(20,!0),21,4237533241),r=u(r,i,c,l,t.getUint32(48,!0),6,1700485571),l=u(l,r,i,c,t.getUint32(12,!0),10,2399980690),c=u(c,l,r,i,t.getUint32(40,!0),15,4293915773),i=u(i,c,l,r,t.getUint32(4,!0),21,2240044497),r=u(r,i,c,l,t.getUint32(32,!0),6,1873313359),l=u(l,r,i,c,t.getUint32(60,!0),10,4264355552),c=u(c,l,r,i,t.getUint32(24,!0),15,2734768916),i=u(i,c,l,r,t.getUint32(52,!0),21,1309151649),r=u(r,i,c,l,t.getUint32(16,!0),6,4149444226),l=u(l,r,i,c,t.getUint32(44,!0),10,3174756917),c=u(c,l,r,i,t.getUint32(8,!0),15,718787259),i=u(i,c,l,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=i+n[1]&4294967295,n[2]=c+n[2]&4294967295,n[3]=l+n[3]&4294967295}},function(e,t,n){function r(){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}var i=n(17).Buffer,o=n(38);new Uint32Array([1518500249,1859775393,-1894007588,-899497514]),Math.pow(2,53),e.exports=r,r.BLOCK_SIZE=64,r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;e=o.convertToBuffer(e);var t=e.length;this.totalLength+=8*t;for(var n=0;n<t;n++)this.write(e[n]);return this},r.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()},r.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 n=new i(20),r=new DataView(n.buffer);return r.setUint32(0,this.h0,!1),r.setUint32(4,this.h1,!1),r.setUint32(8,this.h2,!1),r.setUint32(12,this.h3,!1),r.setUint32(16,this.h4,!1),e?n.toString(e):n},r.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 n,r,i=this.h0,o=this.h1,a=this.h2,s=this.h3,u=this.h4;for(e=0;e<80;e++){e<20?(n=s^o&(a^s),r=1518500249):e<40?(n=o^a^s,r=1859775393):e<60?(n=o&a|s&(o|a),r=2400959708):(n=o^a^s,r=3395469782);var c=(i<<5|i>>>27)+n+u+r+(0|this.block[e]);u=s,s=a,a=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+a|0,this.h3=this.h3+s|0,this.h4=this.h4+u|0,this.offset=0,e=0;e<16;e++)this.block[e]=0}},function(e,t,n){function r(){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}var i=n(17).Buffer,o=n(38),a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=Math.pow(2,53)-1;e.exports=r,r.BLOCK_SIZE=64,r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");if(o.isEmptyData(e))return this;e=o.convertToBuffer(e);var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0);return this},r.prototype.digest=function(e){if(!this.finished){var t=8*this.bytesHashed,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%64>=56){for(var o=this.bufferLength;o<64;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<56;o++)n.setUint8(o,0);n.setUint32(56,Math.floor(t/4294967296),!0),n.setUint32(60,t),this.hashBuffer(),this.finished=!0}for(var a=new i(32),o=0;o<8;o++)a[4*o]=this.state[o]>>>24&255,a[4*o+1]=this.state[o]>>>16&255,a[4*o+2]=this.state[o]>>>8&255,a[4*o+3]=this.state[o]>>>0&255;return e?a.toString(e):a},r.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,r=n[0],i=n[1],o=n[2],s=n[3],u=n[4],c=n[5],l=n[6],p=n[7],f=0;f<64;f++){if(f<16)this.temp[f]=(255&t[4*f])<<24|(255&t[4*f+1])<<16|(255&t[4*f+2])<<8|255&t[4*f+3];else{var d=this.temp[f-2],h=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10;d=this.temp[f-15];var m=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(h+this.temp[f-7]|0)+(m+this.temp[f-16]|0)}var y=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&c^~u&l)|0)+(p+(a[f]+this.temp[f]|0)|0)|0,g=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&o^i&o)|0;p=l,l=c,c=u,u=s+y|0,s=o,o=i,i=r,r=y+g|0}n[0]+=r,n[1]+=i,n[2]+=o,n[3]+=s,n[4]+=u,n[5]+=c,n[6]+=l,n[7]+=p}},function(e,t,n){(function(e,r){var i;!function(r){function o(e){throw new RangeError(O[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(k,"."),r+a(e.split("."),t).join(".")}function u(e){for(var t,n,r=[],i=0,o=e.length;i<o;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<o?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function c(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=x(e>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function l(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function p(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function f(e,t,n){var r=0;for(e=n?R(e/I):e>>1,e+=R(e/t);e>P*S>>1;r+=b)e=R(e/P);return R(r+(P+1)*e/(e+E))}function d(e){var t,n,r,i,a,s,u,p,d,h,m=[],y=e.length,g=0,E=C,I=w;for(n=e.lastIndexOf(T),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&o("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(a=g,s=1,u=b;i>=y&&o("invalid-input"),p=l(e.charCodeAt(i++)),(p>=b||p>R((v-g)/s))&&o("overflow"),g+=p*s,d=u<=I?_:u>=I+S?S:u-I,!(p<d);u+=b)h=b-d,s>R(v/h)&&o("overflow"),s*=h;t=m.length+1,I=f(g-a,t,0==a),R(g/t)>v-E&&o("overflow"),E+=R(g/t),g%=t,m.splice(g++,0,E)}return c(m)}function h(e){var t,n,r,i,a,s,c,l,d,h,m,y,g,E,I,N=[];for(e=u(e),y=e.length,t=C,n=0,a=w,s=0;s<y;++s)(m=e[s])<128&&N.push(x(m));for(r=i=N.length,i&&N.push(T);r<y;){for(c=v,s=0;s<y;++s)(m=e[s])>=t&&m<c&&(c=m);for(g=r+1,c-t>R((v-n)/g)&&o("overflow"),n+=(c-t)*g,t=c,s=0;s<y;++s)if(m=e[s],m<t&&++n>v&&o("overflow"),m==t){for(l=n,d=b;h=d<=a?_:d>=a+S?S:d-a,!(l<h);d+=b)I=l-h,E=b-h,N.push(x(p(h+I%E,0))),l=R(I/E);N.push(x(p(l,0))),a=f(n,g,r==i),n=0,++r}++n,++t}return N.join("")}function m(e){return s(e,function(e){return N.test(e)?d(e.slice(4).toLowerCase()):e})}function y(e){return s(e,function(e){return A.test(e)?"xn--"+h(e):e})}var g,v=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,2147483647),b=36,_=1,S=26,E=38,I=700,w=72,C=128,T="-",N=/^xn--/,A=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=b-_,R=Math.floor,x=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:u,encode:c},decode:d,encode:h,toASCII:y,toUnicode:m},void 0!==(i=function(){return g}.call(t,n,t,e))&&(e.exports=i)}()}).call(t,n(39)(e),n(22))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var p,f,d,h,m=e[l].replace(s,"%20"),y=m.indexOf(n);y>=0?(p=m.substr(0,y),f=m.substr(y+1)):(p=m,f=""),d=decodeURIComponent(p),h=decodeURIComponent(f),r(a,d)?i(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(a(e),function(a){var s=encodeURIComponent(i(a))+n;return o(e[a])?r(e[a],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[a]))}).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t){e.exports={now:function(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}}},function(e,t,n){function r(e,t,n){for(var r=i(e),a=[],s=0;s<r.length;s++)a.push(o(t,r[s],n));return a}var i=n(220).eventMessageChunker,o=n(221).parseEvent;e.exports={createEventStream:r}},function(e,t){function n(e){for(var t=[],n=0;n<e.length;){var r=e.readInt32BE(n),i=e.slice(n,r+n);n+=r,t.push(i)}return t}e.exports={eventMessageChunker:n}},function(e,t,n){function r(e,t,n){var r=o(t),a=r.headers[":message-type"];if(a){if("error"===a.value)throw i(r);if("event"!==a.value)return}var s=r.headers[":event-type"],u=n.members[s.value];if(u){var c={},l=u.eventPayloadMemberName;if(l){var p=u.members[l];"binary"===p.type?c[l]=r.body:c[l]=e.parse(r.body.toString(),p)}for(var f=u.eventHeaderMemberNames,d=0;d<f.length;d++){var h=f[d];r.headers[h]&&(c[h]=u.members[h].toType(r.headers[h].value))}var m={};return m[s.value]=c,m}}function i(e){var t=e.headers[":error-code"],n=e.headers[":error-message"],r=new Error(n.value||n);return r.code=r.name=t.value||t,r}var o=n(222).parseMessage;e.exports={parseEvent:r}},function(e,t,n){function r(e){for(var t={},n=0;n<e.length;){var r=e.readUInt8(n++),i=e.slice(n,n+r).toString();switch(n+=r,e.readUInt8(n++)){case 0:t[i]={type:s,value:!0};break;case 1:t[i]={type:s,value:!1};break;case 2:t[i]={type:u,value:e.readInt8(n++)};break;case 3:t[i]={type:c,value:e.readInt16BE(n)},n+=2;break;case 4:t[i]={type:l,value:e.readInt32BE(n)},n+=4;break;case 5:t[i]={type:p,value:new o(e.slice(n,n+8))},n+=8;break;case 6:var a=e.readUInt16BE(n);n+=2,t[i]={type:f,value:e.slice(n,n+a)},n+=a;break;case 7:var y=e.readUInt16BE(n);n+=2,t[i]={type:d,value:e.slice(n,n+y).toString()},n+=y;break;case 8:t[i]={type:h,value:new Date(new o(e.slice(n,n+8)).valueOf())},n+=8;break;case 9:var g=e.slice(n,n+16).toString("hex");n+=16,t[i]={type:m,value:g.substr(0,8)+"-"+g.substr(8,4)+"-"+g.substr(12,4)+"-"+g.substr(16,4)+"-"+g.substr(20)};break;default:throw new Error("Unrecognized header type tag")}}return t}function i(e){var t=a(e);return{headers:r(t.headers),body:t.body}}var o=n(223).Int64,a=n(224).splitMessage,s="boolean",u="byte",c="short",l="integer",p="long",f="binary",d="string",h="timestamp",m="uuid";e.exports={parseMessage:i}},function(e,t,n){function r(e){if(8!==e.length)throw new Error("Int64 buffers must be exactly 8 bytes");o.Buffer.isBuffer(e)||(e=a(e)),this.bytes=e}function i(e){for(var t=0;t<8;t++)e[t]^=255;for(var t=7;t>-1&&0==++e[t];t--);}var o=n(0).util,a=o.buffer.toBuffer;r.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),n=7,o=Math.abs(Math.round(e));n>-1&&o>0;n--,o/=256)t[n]=o;return e<0&&i(t),new r(t)},r.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&i(e),parseInt(e.toString("hex"),16)*(t?-1:1)},r.prototype.toString=function(){return String(this.valueOf())},e.exports={Int64:r}},function(e,t,n){function r(e){if(i.Buffer.isBuffer(e)||(e=o(e)),e.length<c)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(s);if(t!==i.crypto.crc32(e.slice(0,s)))throw new Error("The prelude checksum specified in the message ("+t+") does not match the calculated CRC32 checksum.");var n=e.readUInt32BE(e.length-u);if(n!==i.crypto.crc32(e.slice(0,e.length-u)))throw new Error("The message checksum did not match the expected value of "+n);var r=s+u,l=r+e.readUInt32BE(a);return{headers:e.slice(r,l),body:e.slice(l,e.length-u)}}var i=n(0).util,o=i.buffer.toBuffer,a=4,s=2*a,u=4,c=s+2*u;e.exports={splitMessage:r}},function(e,t,n){var r=n(0),i=n(32);r.TemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.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||r.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(n,r){n||t.service.credentialsFrom(r,t),e(n)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||r.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;"function"!=typeof this.masterCredentials.get&&(this.masterCredentials=new r.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new i({params:this.params})}})},function(e,t,n){var r=n(0);r.util.update(r.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new r.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)}})},function(e,t){e.exports={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:{}}}},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:{}}}}}},function(e,t){e.exports={pagination:{}}},function(e,t,n){var r=n(0),i=n(32);r.ChainableTemporaryCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var t=r.util.copy(e.params)||{};if(t.RoleArn&&(t.RoleSessionName=t.RoleSessionName||"temporary-credentials"),t.SerialNumber){if(!e.tokenCodeFn||"function"!=typeof e.tokenCodeFn)throw new r.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}this.service=new i({params:t,credentials:e.masterCredentials||r.config.credentials})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this,n=t.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode(function(r,i){var o={};if(r)return void e(r);i&&(o.TokenCode=i),t.service[n](o,function(n,r){n||t.service.credentialsFrom(r,t),e(n)})})},getTokenCode:function(e){var t=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,function(n,i){if(n){var o=n;return n instanceof Error&&(o=n.message),void e(r.util.error(new Error("Error fetching MFA token: "+o),{code:t.errorCode}))}e(null,i)}):e(null)}})},function(e,t,n){var r=n(0),i=n(32);r.WebIdentityCredentials=r.util.inherit(r.Credentials,{constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=r.util.copy(t||{})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithWebIdentity(function(n,r){t.data=null,n||(t.data=r,t.service.credentialsFrom(r,t)),e(n)})},createClients:function(){if(!this.service){var e=r.util.merge({},this._clientConfig);e.params=this.params,this.service=new i(e)}}})},function(e,t,n){var r=n(0),i=n(232),o=n(32);r.CognitoIdentityCredentials=r.util.inherit(r.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,t){r.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=r.util.copy(t||{}),this.loadCachedId();var n=this;Object.defineProperty(this,"identityId",{get:function(){return n.loadCachedId(),n._identityId||n.params.IdentityId},set:function(e){n._identityId=e}})},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.data=null,t._identityId=null,t.getId(function(n){n?(t.clearIdOnNotAuthorized(n),e(n)):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){var t=this;"NotAuthorizedException"==e.code&&t.clearCachedId()},getId:function(e){var t=this;if("string"==typeof t.params.IdentityId)return e(null,t.params.IdentityId);t.cognito.getId(function(n,r){!n&&r.IdentityId?(t.params.IdentityId=r.IdentityId,e(null,r.IdentityId)):e(n)})},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(n,r){n?t.clearIdOnNotAuthorized(n):(t.cacheId(r),t.data=r,t.loadCredentials(t.data,t)),e(n)})},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken(function(n,r){n?(t.clearIdOnNotAuthorized(n),e(n)):(t.cacheId(r),t.params.WebIdentityToken=r.Token,t.webIdentityCredentials.refresh(function(n){n||(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(n)}))})},loadCachedId:function(){var e=this;if(r.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var n=Object.keys(e.params.Logins);0!==(e.getStorage("providers")||"").split(",").filter(function(e){return-1!==n.indexOf(e)}).length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){var e=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new r.WebIdentityCredentials(this.params,e),!this.cognito){var t=r.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,r.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=r.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{}}}()})},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.cognitoidentity={},r.CognitoIdentity=i.defineService("cognitoidentity",["2014-06-30"]),n(233),Object.defineProperty(o.services.cognitoidentity,"2014-06-30",{get:function(){var e=n(234);return e.paginators=n(235).pagination,e},enumerable:!0,configurable:!0}),e.exports=r.CognitoIdentity},function(e,t,n){var r=n(0);r.util.update(r.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)}})},function(e,t){e.exports={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"},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"}}},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:{}}}}}}}}}}}},function(e,t){e.exports={pagination:{}}},function(e,t,n){var r=n(0),i=n(32);r.SAMLCredentials=r.util.inherit(r.Credentials,{constructor:function(e){r.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||r.util.fn.callback)},load:function(e){var t=this;t.createClients(),t.service.assumeRoleWithSAML(function(n,r){n||t.service.credentialsFrom(r,t),e(n)})},createClients:function(){this.service=this.service||new i({params:this.params})}})},function(e,t,n){function r(){}function i(e,t){for(var n=e.getElementsByTagName(t),r=0,i=n.length;r<i;r++)if(n[r].parentNode===e)return n[r]}function o(e,t){switch(t||(t={}),t.type){case"structure":return a(e,t);case"map":return s(e,t);case"list":return u(e,t);case void 0:case null:return l(e);default:return c(e,t)}}function a(e,t){var n={};return null===e?n:(p.each(t.members,function(t,r){if(r.isXmlAttribute){if(Object.prototype.hasOwnProperty.call(e.attributes,r.name)){var a=e.attributes[r.name].value;n[t]=o({textContent:a},r)}}else{var s=r.flattened?e:i(e,r.name);s?n[t]=o(s,r):r.flattened||"list"!==r.type||(n[t]=r.defaultValue)}}),n)}function s(e,t){for(var n={},r=t.key.name||"key",a=t.value.name||"value",s=t.flattened?t.name:"entry",u=e.firstElementChild;u;){if(u.nodeName===s){var c=i(u,r).textContent,l=i(u,a);n[c]=o(l,t.value)}u=u.nextElementSibling}return n}function u(e,t){for(var n=[],r=t.flattened?t.name:t.member.name||"member",i=e.firstElementChild;i;)i.nodeName===r&&n.push(o(i,t.member)),i=i.nextElementSibling;return n}function c(e,t){if(e.getAttribute){var n=e.getAttribute("encoding");"base64"===n&&(t=new f.create({type:n}))}var r=e.textContent;return""===r&&(r=null),"function"==typeof t.toType?t.toType(r):r}function l(e){if(void 0===e||null===e)return"";if(!e.firstElementChild)return null===e.parentNode.parentNode?{}:0===e.childNodes.length?"":e.textContent;for(var t={type:"structure",members:{}},n=e.firstElementChild;n;){var r=n.nodeName;Object.prototype.hasOwnProperty.call(t.members,r)?t.members[r].type="list":t.members[r]={name:r},n=n.nextElementSibling}return a(e,t)}var p=n(4),f=n(29);r.prototype.parse=function(e,t){if(""===e.replace(/^\s+/,""))return{};var n,r;try{if(window.DOMParser){try{n=(new DOMParser).parseFromString(e,"text/xml")}catch(e){throw p.error(new Error("Parse error in document"),{originalError:e,code:"XMLParserError",retryable:!0})}if(null===n.documentElement)throw p.error(new Error("Cannot parse empty document."),{code:"XMLParserError",retryable:!0});var a=n.getElementsByTagName("parsererror")[0];if(a&&(a.parentNode===n||"body"===a.parentNode.nodeName||a.parentNode.parentNode===n||"body"===a.parentNode.parentNode.nodeName)){var s=a.getElementsByTagName("div")[0]||a;throw p.error(new Error(s.textContent||"Parser error in document"),{code:"XMLParserError",retryable:!0})}}else{if(!window.ActiveXObject)throw new Error("Cannot load XML parser");if(n=new window.ActiveXObject("Microsoft.XMLDOM"),n.async=!1,!n.loadXML(e))throw p.error(new Error("Parse error in document"),{code:"XMLParserError",retryable:!0})}}catch(e){r=e}if(n&&n.documentElement&&!r){var u=o(n.documentElement,t),c=i(n.documentElement,"ResponseMetadata");return c&&(u.ResponseMetadata=o(c,{})),u}if(r)throw p.error(r||new Error,{code:"XMLParserError",retryable:!0});return{}},e.exports=r},function(e,t,n){var r=n(0),i=n(239).EventEmitter;n(84),r.XHRClient=r.util.inherit({handleRequest:function(e,t,n,o){var a=this,s=e.endpoint,u=new i,c=s.protocol+"//"+s.hostname;80!==s.port&&443!==s.port&&(c+=":"+s.port),c+=e.path;var l=new XMLHttpRequest,p=!1;e.stream=l,l.addEventListener("readystatechange",function(){try{if(0===l.status)return}catch(e){return}this.readyState>=this.HEADERS_RECEIVED&&!p&&(u.statusCode=l.status,u.headers=a.parseHeaders(l.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers,l.statusText),p=!0),this.readyState===this.DONE&&a.finishRequest(l,u)},!1),l.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),l.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),l.addEventListener("timeout",function(){o(r.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),l.addEventListener("error",function(){o(r.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),l.addEventListener("abort",function(){o(r.util.error(new Error("Request aborted"),{code:"RequestAbortedError"}))},!1),n(u),l.open(e.method,c,!1!==t.xhrAsync),r.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&l.setRequestHeader(e,t)}),t.timeout&&!1!==t.xhrAsync&&(l.timeout=t.timeout),t.xhrWithCredentials&&(l.withCredentials=!0);try{l.responseType="arraybuffer"}catch(e){}try{e.body?l.send(e.body):l.send()}catch(t){if(!e.body||"object"!=typeof e.body.buffer)throw t;l.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return r.util.arrayEach(e.split(/\r?\n/),function(e){var n=e.split(":",1)[0],r=e.substring(n.length+2);n.length>0&&(t[n.toLowerCase()]=r)}),t},finishRequest:function(e,t){var n;if("arraybuffer"===e.responseType&&e.response){var i=e.response;n=new r.util.Buffer(i.byteLength);for(var o=new Uint8Array(i),a=0;a<n.length;++a)n[a]=o[a]}try{n||"string"!=typeof e.responseText||(n=new r.util.Buffer(e.responseText))}catch(e){}n&&t.emit("data",n),t.emit("end")}}),r.HttpClient.prototype=r.XHRClient.prototype,r.HttpClient.streamsApiVersion=1},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5},i=function(){function e(e,t){void 0===t&&(t="WARN"),this.name=e,this.level=t}return e.prototype._padding=function(e){return e<10?"0"+e:""+e},e.prototype._ts=function(){var e=new Date;return[this._padding(e.getMinutes()),this._padding(e.getSeconds())].join(":")+"."+e.getMilliseconds()},e.prototype._log=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.level;if(e.LOG_LEVEL&&(o=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(o=window.LOG_LEVEL),r[t]>=r[o]){var a=console.log.bind(console);"ERROR"===t&&console.error&&(a=console.error.bind(console)),"WARN"===t&&console.warn&&(a=console.warn.bind(console));var s="["+t+"] "+this._ts()+" "+this.name;if(1===n.length&&"string"==typeof n[0])a(s+" - "+n[0]);else if(1===n.length)a(s,n[0]);else if("string"==typeof n[0]){var u=n.slice(1);1===u.length&&(u=u[0]),a(s+" - "+n[0],u)}else a(s,n)}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["INFO"].concat(e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["INFO"].concat(e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["WARN"].concat(e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["ERROR"].concat(e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["DEBUG"].concat(e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,["VERBOSE"].concat(e))},e.LOG_LEVEL=null,e}();t.ConsoleLogger=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(242),i=function(){function e(){}return e.clientInfo=function(){return r.clientInfo()},e.dimension=function(){return r.dimension()},e}();t.default=i},function(e,t,n){"use strict";function r(){return"undefined"==typeof window?{}:i()}function i(){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,n=e.product,r=e.vendor,i=e.userAgent,o=e.language,u=s(i),l=a();return{platform:t,make:n||r,model:u.type,version:u.version,appVersion:[u.type,u.version].join("/"),language:o,timezone:l}}function o(){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}}function a(){var e=/\(([A-Za-z\s].*)\)/.exec((new Date).toString());return e?e[1]||"":""}function s(e){var t=/.+(Opera[\s[A-Z]*|OPR[\sA-Z]*)\/([0-9\.]+).*/i.exec(e);if(t)return{type:t[1],version:t[2]};var n=/.+(Chrome|Firefox|FxiOS)\/([0-9\.]+).*/i.exec(e);if(n)return{type:n[1],version:n[2]};var r=/.+(Trident|Edge)\/([0-9\.]+).*/i.exec(e);if(r)return{type:r[1],version:r[2]};var i=/.+(Safari)\/([0-9\.]+).*/i.exec(e);if(i)return{type:i[1],version:i[2]};var o=/.+(AppleWebKit)\/([0-9\.]+).*/i.exec(e);if(o)return{type:o[1],version:o[2]};var a=/.*([A-Z]+)\/([0-9\.]+).*/i.exec(e);return a?{type:a[1],version:a[2]}:{type:"",version:""}}Object.defineProperty(t,"__esModule",{value:!0});var u=n(6),c=new u.ConsoleLogger("ClientDevice_Browser");t.clientInfo=r,t.dimension=o},function(e,t,n){"use strict";function r(e){return new Error("Missing config value of "+e)}function i(e){return new Error("Invalid parameter value of "+e)}Object.defineProperty(t,"__esModule",{value:!0}),t.missingConfig=r,t.invalidParameter=i},function(e,t,n){"use strict";function r(e){return void 0!==e.onHubCapsule}var i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=new o.ConsoleLogger("Hub"),s="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",u=function(){function e(e){this.listeners=[],this.patterns=[],this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","xr"],this.name=e}return e.prototype.remove=function(e,t){if(e instanceof RegExp){var n=this.patterns.find(function(t){return t.pattern.source===e.source});if(!n)return void a.warn("No listeners for "+e);this.patterns=this.patterns.filter(function(e){return e!==n}).slice()}else{var r=this.listeners[e];if(!r)return void a.warn("No listeners for "+e);this.listeners[e]=r.filter(function(e){return e.callback!==t}).slice()}},e.prototype.dispatch=function(e,t,n,r){void 0===n&&(n=""),this.protectedChannels.indexOf(e)>-1&&(r===s||a.warn("WARNING: "+e+" is protected and dispatching on it can have unintended consequences"));var o={channel:e,payload:i({},t),source:n,patternInfo:[]};try{this._toListeners(o)}catch(e){a.error(e)}},e.prototype.listen=function(e,t,n){void 0===n&&(n="noname");var i;if(r(t))a.warn("WARNING onHubCapsule is Deprecated. Please pass in a callback."),i=t.onHubCapsule.bind(t);else{if("function"!=typeof t)throw new Error("No callback supplied to Hub");i=t}if(e instanceof RegExp)this.patterns.push({pattern:e,callback:i});else{var o=this.listeners[e];o||(o=[],this.listeners[e]=o),o.push({name:n,callback:i})}},e.prototype._toListeners=function(e){var t=e.channel,n=e.payload,r=this.listeners[t];if(r&&r.forEach(function(r){a.debug("Dispatching to "+t+" with ",n);try{r.callback(e)}catch(e){a.error(e)}}),this.patterns.length>0){if(!n.message)return void a.warn("Cannot perform pattern matching without a message key");var o=n.message;this.patterns.forEach(function(t){var n=o.match(t.pattern);if(n){var r=n.slice(1),s=i({},e,{patternInfo:r});try{t.callback(s)}catch(e){a.error(e)}}})}},e}();t.HubClass=u;var c=new u("__default__");t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(246),i=n(6),o=n(40),a=new i.ConsoleLogger("I18n"),s=null,u=null,c=function(){function e(){}return e.configure=function(t){return a.debug("configure I18n"),t?(s=Object.assign({},s,t.I18n||t),e.createInstance(),s):s},e.getModuleName=function(){return"I18n"},e.createInstance=function(){a.debug("create I18n instance"),u||(u=new r.I18n(s))},e.setLanguage=function(t){return e.checkConfig(),u.setLanguage(t)},e.get=function(t,n){return e.checkConfig()?u.get(t,n):void 0===n?t:n},e.putVocabulariesForLanguage=function(t,n){return e.checkConfig(),u.putVocabulariesForLanguage(t,n)},e.putVocabularies=function(t){return e.checkConfig(),u.putVocabularies(t)},e.checkConfig=function(){return u||(u=new r.I18n(s)),!0},e}();o.default.register(c),t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=new r.ConsoleLogger("I18n"),o=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),i.debug(this._lang)}return e.prototype.setLanguage=function(e){this._lang=e},e.prototype.get=function(e,t){if(void 0===t&&(t=void 0),!this._lang)return void 0!==t?t:e;var n=this._lang,r=this.getByLanguage(e,n);return r||(n.indexOf("-")>0&&(r=this.getByLanguage(e,n.split("-")[0])),r||(void 0!==t?t:e))},e.prototype.getByLanguage=function(e,t,n){if(void 0===n&&(n=null),!t)return n;var r=this._dict[t];return r?r[e]:n},e.prototype.putVocabulariesForLanguage=function(e,t){var n=this._dict[e];n||(n=this._dict[e]={}),Object.assign(n,t)},e.prototype.putVocabularies=function(e){var t=this;Object.keys(e).map(function(n){t.putVocabulariesForLanguage(n,e[n])})},e}();t.I18n=o},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(36),s=new o.ConsoleLogger("Signer"),u=n(31),c=a.AWS.util.crypto,l=function(e,t,n){return c.lib.createHmac("sha256",e).update(t,"utf8").digest(n)},p=function(e){var t=e||"";return c.createHash("sha256").update(t,"utf8").digest("hex")},f=function(e){return e.replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},d=function(e){return e&&0!==e.length?e.split("&").map(function(e){var t=e.split("=");if(1===t.length)return e;var n=f(t[1]);return t[0]+"="+n}).sort(function(e,t){return e<t?-1:1}).join("&"):""},h=function(e){return e&&0!==Object.keys(e).length?Object.keys(e).map(function(t){return{key:t.toLowerCase(),value:e[t]?e[t].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":""},m=function(e){return Object.keys(e).map(function(e){return e.toLowerCase()}).sort().join(";")},y=function(e){var t=u.parse(e.url);return[e.method||"/",encodeURIComponent(t.pathname).replace(/%2F/gi,"/"),d(t.query),h(e.headers),m(e.headers),p(e.data)].join("\n")},g=function(e){var t=u.parse(e.url),n=t.host,r=n.match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com$/),i=(r||[]).slice(1,3);return"es"===i[1]&&(i=i.reverse()),{service:e.service||i[0],region:e.region||i[1]}},v=function(e,t,n){return[e,t,n,"aws4_request"].join("/")},b=function(e,t,n,r){return[e,n,r,p(t)].join("\n")},_=function(e,t,n){s.debug(n);var r="AWS4"+e,i=l(r,t),o=l(i,n.region),a=l(o,n.service);return l(a,"aws4_request")},S=function(e,t){return l(e,t,"hex")},E=function(e,t,n,r,i){return[e+" Credential="+t+"/"+n,"SignedHeaders="+r,"Signature="+i].join(", ")},I=function(e,t,n){void 0===n&&(n=null),e.headers=e.headers||{};var r=new Date,i=r.toISOString().replace(/[:\-]|\.\d{3}/g,""),o=i.substr(0,8),a=u.parse(e.url);e.headers.host=a.host,e.headers["x-amz-date"]=i,t.session_token&&(e.headers["X-Amz-Security-Token"]=t.session_token);var c=y(e);s.debug(c);var l=n||g(e),p=v(o,l.region,l.service),f=b("AWS4-HMAC-SHA256",c,i,p),d=_(t.secret_key,o,l),h=S(d,f),I=E("AWS4-HMAC-SHA256",t.access_key,p,m(e.headers),h);return e.headers.Authorization=I,e},w=function(e,t,n,o){var a=(new Date).toISOString().replace(/[:\-]|\.\d{3}/g,""),s=a.substr(0,8),c=u.parse(e,!0,!0),l=(c.search,i(c,["search"])),p=l.host,f={host:p},d=n||g({url:u.format(l)}),h=d.region,m=d.service,E=v(s,h,m),I=t.session_token&&"iotdevicegateway"!==m,w=r({"X-Amz-Algorithm":"AWS4-HMAC-SHA256","X-Amz-Credential":[t.access_key,E].join("/"),"X-Amz-Date":a.substr(0,16)},I?{"X-Amz-Security-Token":""+t.session_token}:{},o?{"X-Amz-Expires":""+o}:{},{"X-Amz-SignedHeaders":Object.keys(f).join(",")}),C=y({method:"GET",url:u.format(r({},l,{query:r({},l.query,w)})),headers:f}),T=b("AWS4-HMAC-SHA256",C,a,E),N=_(t.secret_key,s,{region:h,service:m}),A=S(N,T),k=r({"X-Amz-Signature":A},t.session_token&&{"X-Amz-Security-Token":t.session_token});return u.format({protocol:l.protocol,slashes:!0,hostname:l.hostname,pathname:l.pathname,query:r({},l.query,w,k)})},C=function(){function e(){}return e.sign=I,e.signUrl=w,e}();t.default=C},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=new r.ConsoleLogger("Parser"),o=function(){function e(){}return e.parseMobilehubConfig=function(e){var t={};if(e.aws_mobile_analytics_app_id){var n={AWSPinpoint:{appId:e.aws_mobile_analytics_app_id,region:e.aws_mobile_analytics_app_region}};t.Analytics=n}if(e.aws_cognito_identity_pool_id||e.aws_user_pools_id){var r={userPoolId:e.aws_user_pools_id,userPoolWebClientId:e.aws_user_pools_web_client_id,region:e.aws_cognito_region,identityPoolId:e.aws_cognito_identity_pool_id,mandatorySignIn:"enable"===e.aws_mandatory_sign_in};t.Auth=r}var o;return o=e.aws_user_files_s3_bucket?{AWSS3:{bucket:e.aws_user_files_s3_bucket,region:e.aws_user_files_s3_bucket_region}}:e?e.Storage||e:{},t.Analytics=Object.assign({},t.Analytics,e.Analytics),t.Auth=Object.assign({},t.Auth,e.Auth),t.Storage=Object.assign({},o),i.debug("parse config",e,"to amplifyconfig",t),t},e}();t.default=o},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(25),s=new o.ConsoleLogger("CognitoCredentials"),u=new Promise(function(e,t){return a.default.browserOrNode().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(s.debug("google api already loaded"),e()):void setTimeout(function(){return e()},2e3):(s.debug("not in the browser, directly resolved"),e())}),c=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(s.debug("need to wait for the Google SDK loaded"),[4,u]);case 1:e.sent(),this.initialized=!0,s.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}})})},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return a.default.browserOrNode().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise(function(t,n){e.getAuthInstance().then(function(e){e||(console.log("google Auth undefiend"),n("google Auth undefiend"));var r=e.currentUser.get();r.isSignedIn()?(s.debug("refreshing the google access token"),r.reloadAuthResponse().then(function(e){var n=e.id_token,i=e.expires_at,o=r.getBasicProfile();o.getEmail(),o.getName(),t({token:n,expires_at:i})})):n("User is not signed in with Google")}).catch(function(e){s.debug("Failed to refresh google token",e),n("Failed to refresh google token")})}):(s.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}();t.default=c},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(25),s=new o.ConsoleLogger("CognitoCredentials"),u=new Promise(function(e,t){return a.default.browserOrNode().isBrowser?window.FB?(s.debug("FB SDK already loaded"),e()):void setTimeout(function(){return e()},2e3):(s.debug("not in the browser, directly resolved"),e())}),c=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return r(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return this.initialized?[3,2]:(s.debug("need to wait for the Facebook SDK loaded"),[4,u]);case 1:e.sent(),this.initialized=!0,s.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}})})},e.prototype._refreshFacebookTokenImpl=function(){var e=null;return a.default.browserOrNode().isBrowser&&(e=window.FB),e?new Promise(function(t,n){e.getLoginStatus(function(e){e&&e.authResponse||(s.debug("no response from facebook when refreshing the jwt token"),n("no response from facebook when refreshing the jwt token"));var r=e.authResponse,i=r.accessToken,o=r.expiresIn,a=new Date,u=1e3*o+a.getTime();i||(s.debug("the jwtToken is undefined"),n("the jwtToken is undefined")),t({token:i,expires_at:u})},{scope:"public_profile,email"})}):(s.debug("no fb sdk available"),Promise.reject("no fb sdk available"))},e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(25),i=n(56),o={};t.Linking=o;var a={addEventListener:function(e,t){}};t.AppState=a;var s=r.default.browserOrNode().isBrowser?(new i.default).getStorage():void 0;t.AsyncStorage=s},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(56),u=n(36),c=n(25),l=n(90),p=n(40),f=new a.ConsoleLogger("Credentials"),d=function(){function e(e){this._gettingCredPromise=null,this._refreshHandlers={},this.configure(e),this._refreshHandlers.google=l.GoogleOAuth.refreshGoogleToken,this._refreshHandlers.facebook=l.FacebookOAuth.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=r({},this._refreshHandlers,t)),this._storage=this._config.storage,this._storage||(this._storage=(new s.default).getStorage()),this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),this._config},e.prototype.get=function(){return f.debug("getting credentials"),this._pickupCredentials()},e.prototype._pickupCredentials=function(){return f.debug("picking up credentials"),this._gettingCredPromise&&this._gettingCredPromise.isPending()?f.debug("getting old cred promise"):(f.debug("getting new cred promise"),u.AWS.config&&u.AWS.config.credentials&&u.AWS.config.credentials instanceof u.AWS.Credentials?this._gettingCredPromise=c.default.makeQuerablePromise(this._setCredentialsFromAWS()):this._gettingCredPromise=c.default.makeQuerablePromise(this._keepAlive())),this._gettingCredPromise},e.prototype._keepAlive=function(){f.debug("checking if credentials exists and not expired");var e=this._credentials;return e&&!this._isExpired(e)?(f.debug("credentials not changed and not expired, directly return"),Promise.resolve(e)):(f.debug("need to get a new credential or refresh the existing one"),p.default.Auth&&"function"==typeof p.default.Auth.currentUserCredentials?p.default.Auth.currentUserCredentials():Promise.reject("No Auth module registered in Amplify"))},e.prototype.refreshFederatedToken=function(e){var t=this;f.debug("Getting federated credentials");var n=e.provider,r=e.user,i=e.token,o=e.expires_at,a=e.identity_id,s=this;return f.debug("checking if federated jwt token expired"),o>(new Date).getTime()?(f.debug("token not expired"),this._setCredentialsFromFederation({provider:n,token:i,user:r,identity_id:a,expires_at:o})):s._refreshHandlers[n]&&"function"==typeof s._refreshHandlers[n]?(f.debug("getting refreshed jwt token from federation provider"),s._refreshHandlers[n]().then(function(e){return f.debug("refresh federated token sucessfully",e),i=e.token,a=e.identity_id,o=e.expires_at,s._setCredentialsFromFederation({provider:n,token:i,user:r,identity_id:a,expires_at:o})}).catch(function(e){return f.debug("refresh federated token failed",e),t.clear(),Promise.reject("refreshing federation token failed: "+e)})):(f.debug("no refresh handler for provider:",n),this.clear(),Promise.reject("no refresh handler for provider"))},e.prototype._isExpired=function(e){if(!e)return f.debug("no credentials for expiration check"),!0;f.debug("is this credentials expired?",e);var t=(new Date).getTime(),n=e.expired,r=e.expireTime;return!(!n&&r>t+6e5)},e.prototype._setCredentialsForGuest=function(){return i(this,void 0,void 0,function(){var e,t,n,r,a,s,c,l,p,d=this;return o(this,function(h){switch(h.label){case 0:if(e=!1,f.debug("setting credentials for guest"),t=this._config,n=t.identityPoolId,r=t.region,a=t.mandatorySignIn)return[2,Promise.reject("cannot get guest credentials when mandatory signin enabled")];if(!n)return f.debug("No Cognito Federated Identity pool provided"),[2,Promise.reject("No Cognito Federated Identity pool provided")];s=void 0,h.label=1;case 1:return h.trys.push([1,3,,4]),[4,this._storageSync];case 2:return h.sent(),s=this._storage.getItem("CognitoIdentityId-"+n),[3,4];case 3:return c=h.sent(),f.debug("Failed to get the cached identityId",c),[3,4];case 4:return l=new u.AWS.CognitoIdentityCredentials({IdentityPoolId:n,IdentityId:s||void 0},{region:r}),p=this,[2,this._loadCredentials(l,"guest",!1,null).then(function(e){return e}).catch(function(t){return i(d,void 0,void 0,function(){var i;return o(this,function(o){return"ResourceNotFoundException"!==t.code||t.message!=="Identity '"+s+"' not found."||e?[2,t]:(e=!0,f.debug("Failed to load guest credentials"),this._storage.removeItem("CognitoIdentityId-"+n),l.clearCachedId(),i=new u.AWS.CognitoIdentityCredentials({IdentityPoolId:n,IdentityId:void 0},{region:r}),[2,this._loadCredentials(i,"guest",!1,null)])})})})]}})})},e.prototype._setCredentialsFromAWS=function(){var e=u.AWS.config.credentials;return f.debug("setting credentials from aws"),e instanceof u.AWS.Credentials?Promise.resolve(e):(f.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,n=e.token,r=e.identity_id,i=(e.user,e.expires_at,{google:"accounts.google.com",facebook:"graph.facebook.com",amazon:"www.amazon.com",developer:"cognito-identity.amazonaws.com"}),o=i[t]||t;if(!o)return Promise.reject("You must specify a federated provider");var a={};a[o]=n;var s=this._config,c=s.identityPoolId,l=s.region;if(!c)return f.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var p=new u.AWS.CognitoIdentityCredentials({IdentityPoolId:c,IdentityId:r,Logins:a},{region:l});return this._loadCredentials(p,"federated",!0,e)},e.prototype._setCredentialsFromSession=function(e){f.debug("set credentials from session");var t=e.getIdToken().getJwtToken(),n=this._config,r=n.region,i=n.userPoolId,o=n.identityPoolId;if(!o)return f.debug("No Cognito Federated Identity pool provided"),Promise.reject("No Cognito Federated Identity pool provided");var a="cognito-idp."+r+".amazonaws.com/"+i,s={};s[a]=t;var c=new u.AWS.CognitoIdentityCredentials({IdentityPoolId:o,Logins:s},{region:r});return this._loadCredentials(c,"userPool",!0,null)},e.prototype._loadCredentials=function(e,t,n,r){var a=this,s=this,u=this._config.identityPoolId;return new Promise(function(c,l){e.get(function(d){return i(a,void 0,void 0,function(){var i,a,h,m,y,g;return o(this,function(o){switch(o.label){case 0:if(d)return f.debug("Failed to load credentials",e),l(d),[2];if(f.debug("Load credentials successfully",e),s._credentials=e,s._credentials.authenticated=n,s._credentials_source=t,"federated"===t){i=Object.assign({id:this._credentials.identityId},r.user),a=r.provider,h=r.token,m=r.expires_at,y=r.identity_id;try{this._storage.setItem("aws-amplify-federatedInfo",JSON.stringify({provider:a,token:h,user:i,expires_at:m,identity_id:y}))}catch(e){f.debug("Failed to put federated info into auth storage",e)}p.default.Cache&&"function"==typeof p.default.Cache.setItem?p.default.Cache.setItem("federatedInfo",{provider:a,token:h,user:i,expires_at:m,identity_id:y},{priority:1}):f.debug("No Cache module registered in Amplify")}if("guest"!==t)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._storageSync];case 2:return o.sent(),this._storage.setItem("CognitoIdentityId-"+u,e.identityId),[3,4];case 3:return g=o.sent(),f.debug("Failed to cache identityId",g),[3,4];case 4:return c(s._credentials),[2]}})})})})},e.prototype.set=function(e,t){return"session"===t?this._setCredentialsFromSession(e):"federation"===t?this._setCredentialsFromFederation(e):"guest"===t?this._setCredentialsForGuest():(f.debug("no source specified for setting credentials"),Promise.reject("invalid source"))},e.prototype.clear=function(){return i(this,void 0,void 0,function(){var e,t,n,r;return o(this,function(i){switch(i.label){case 0:return e=this._config,t=e.identityPoolId,n=e.region,t&&(r=new u.AWS.CognitoIdentityCredentials({IdentityPoolId:t},{region:n}),r.clearCachedId()),this._credentials=null,this._credentials_source=null,this._storage.removeItem("aws-amplify-federatedInfo"),p.default.Cache&&"function"==typeof p.default.Cache.setItem?[4,p.default.Cache.removeItem("federatedInfo")]:[3,2];case 1:return i.sent(),[3,3];case 2:f.debug("No Cache module registered in Amplify"),i.label=3;case 3:return[2]}})})},e.prototype.shear=function(e){return{accessKeyId:e.accessKeyId,sessionToken:e.sessionToken,secretAccessKey:e.secretAccessKey,identityId:e.identityId,authenticated:e.authenticated}},e}();t.Credentials=d;var h=new d(null);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(254);t.default=r.default},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(25),a=n(40),s=function(){function e(){this._logger=new i.ConsoleLogger("ServiceWorker")}return Object.defineProperty(e.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;return void 0===e&&(e="/service-worker.js"),void 0===t&&(t="/"),this._logger.debug("registering "+e),this._logger.debug("registering service worker with scope "+t),new Promise(function(r,i){if(!(navigator&&"serviceWorker"in navigator))return i(new Error("Service Worker not available"));navigator.serviceWorker.register(e,{scope:t}).then(function(e){return e.installing?n._serviceWorker=e.installing:e.waiting?n._serviceWorker=e.waiting:e.active&&(n._serviceWorker=e.active),n._registration=e,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+e),r(e)}).catch(function(e){return n._logger.debug("Service Worker Registration Failed "+e),i(e)})})},e.prototype.enablePush=function(e){var t=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=e,new Promise(function(n,r){if(!o.default.browserOrNode().isBrowser)return r(new Error("Service Worker not available"));t._registration.pushManager.getSubscription().then(function(r){if(!r)return t._logger.debug("User is NOT subscribed to push"),t._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t._urlB64ToUint8Array(e)}).then(function(e){t._subscription=e,t._logger.debug("User subscribed: "+JSON.stringify(e)),n(e)}).catch(function(e){t._logger.error(e)});t._subscription=r,t._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)})})},e.prototype._urlB64ToUint8Array=function(e){for(var t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i},e.prototype.send=function(e){this._serviceWorker&&this._serviceWorker.postMessage("object"===(void 0===e?"undefined":r(e))?JSON.stringify(e):e)},e.prototype._setupListeners=function(){var e=this;this._serviceWorker.addEventListener("statechange",function(t){var n=e._serviceWorker.state;e._logger.debug("ServiceWorker statechange: "+n),a.default.Analytics&&"function"==typeof a.default.Analytics.record&&a.default.Analytics.record({name:"ServiceWorker",attributes:{state:n}})}),this._serviceWorker.addEventListener("message",function(t){e._logger.debug("ServiceWorker message event: "+t)})},e}();t.default=s},function(e,t){e.exports={name:"@aws-amplify/core",version:"1.0.28-unstable.3",description:"Core category of aws-amplify",main:"./lib/index.js",module:"./lib/index.js",typings:"./lib/index.d.ts",publishConfig:{access:"public"},scripts:{test:"tslint 'src/**/*.ts' && jest --coverage","build-with-test":"npm run clean && npm test && tsc && webpack",build:"npm run clean && tsc && webpack",clean:"rimraf lib lib-esm dist",format:"tsfmt --useTsfmt tsfmt.json -r src/**/*.ts",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:"git+https://github.com/aws/aws-amplify.git"},author:"Amazon Web Services",license:"Apache-2.0",bugs:{url:"https://github.com/aws/aws-amplify/issues"},homepage:"https://github.com/aws/aws-amplify#readme",devDependencies:{"@types/jest":"^20.0.8","@types/node":"^8.10.15","awesome-typescript-loader":"^3.2.2","babel-loader":"^7.1.2","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","compression-webpack-plugin":"^1.1.3",find:"^0.2.7",jest:"^22.4.3","json-loader":"^0.5.7","prepend-file":"^1.3.1",prettier:"^1.7.4",rimraf:"^2.6.2","source-map-loader":"^0.2.1","ts-jest":"^22.0.0",tslint:"^5.7.0","tslint-config-airbnb":"^5.8.0","typescript-formatter":"^6.0.0","uglifyjs-webpack-plugin":"^0.4.6",webpack:"^3.5.5"},dependencies:{"aws-sdk":"2.474.0",url:"^0.11.0"},jest:{transform:{"^.+\\.(js|jsx|ts|tsx)$":"<rootDir>../../node_modules/ts-jest/preprocessor.js"},testRegex:"(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",moduleFileExtensions:["ts","tsx","js","json","jsx"],testEnvironment:"jsdom",mapCoverage:!0,coverageThreshold:{global:{branches:0,functions:0,lines:0,statements:0}},testURL:"http://localhost/",coveragePathIgnorePatterns:["/node_modules/"]}}},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.mobileanalytics={},r.MobileAnalytics=i.defineService("mobileanalytics",["2014-06-05"]),Object.defineProperty(o.services.mobileanalytics,"2014-06-05",{get:function(){return n(257)},enumerable:!0,configurable:!0}),e.exports=r.MobileAnalytics},function(e,t){e.exports={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:{}}},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.pinpoint={},r.Pinpoint=i.defineService("pinpoint",["2016-12-01"]),Object.defineProperty(o.services.pinpoint,"2016-12-01",{get:function(){return n(259)},enumerable:!0,configurable:!0}),e.exports=r.Pinpoint},function(e,t){e.exports={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:[]}},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:[]}},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:[]}},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"}},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:"S42"}},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:"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:[]}},NextToken:{}},required:[]}},required:["ActivitiesResponse"],payload:"ActivitiesResponse"}},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:"S4k"}},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:"S4k"}},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:{},LastModifiedDate:{},Version:{type:"integer"}}}}},required:[]}},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:"S53"}},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:"S5b"}},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:"S53"}},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:"S5b"}},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:"S5n"}},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:"S5n"}},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:"S5z"}},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:[]}},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:[]},Timestamp:{}},required:[]}}},required:[]}}},required:[]}},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:[]}},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:"S6u"},MessageConfiguration:{shape:"S6w"},TraceId:{}},required:[]}},required:["ApplicationId","MessageRequest"],payload:"MessageRequest"},output:{type:"structure",members:{MessageResponse:{type:"structure",members:{ApplicationId:{},EndpointResult:{shape:"S7c"},RequestId:{},Result:{type:"map",key:{},value:{type:"structure",members:{DeliveryStatus:{},MessageId:{},StatusCode:{type:"integer"},StatusMessage:{},UpdatedToken:{}},required:[]}}},required:[]}},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:"S6w"},TraceId:{},Users:{shape:"S6u"}},required:[]}},required:["ApplicationId","SendUsersMessageRequest"],payload:"SendUsersMessageRequest"},output:{type:"structure",members:{SendUsersMessageResponse:{type:"structure",members:{ApplicationId:{},RequestId:{},Result:{type:"map",key:{},value:{shape:"S7c"}}},required:[]}},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:"S5z"}},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:[]},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:{}},required:[]},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:{type:"structure",members:{APNSSandboxChannelRequest:{type:"structure",members:{BundleId:{},Certificate:{},DefaultAuthenticationMethod:{},Enabled:{type:"boolean"},PrivateKey:{},TeamId:{},TokenKey:{},TokenKeyId:{}},required:[]},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:{}},required:[]},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:{}},required:[]},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:"S42"}},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:[]}},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:[]}},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:"S8h"}},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:[]}},required:["ApplicationId","EndpointBatchRequest"],payload:"EndpointBatchRequest"},output:{type:"structure",members:{MessageBody:{shape:"S8h"}},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:[]}},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:[]}},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:[]}},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:{},Name:{},tags:{shape:"S4",locationName:"tags"}},required:[]},S8:{type:"structure",members:{AdditionalTreatments:{type:"list",member:{type:"structure",members:{MessageConfiguration:{shape:"Sb"},Schedule:{shape:"Sj"},SizePercent:{type:"integer"},TreatmentDescription:{},TreatmentName:{}},required:[]}},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:[]},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:{}},required:[]},Sj:{type:"structure",members:{EndTime:{},EventFilter:{type:"structure",members:{Dimensions:{type:"structure",members:{Attributes:{shape:"Sm"},EventType:{shape:"Sq"},Metrics:{shape:"Ss"}}},FilterType:{}},required:[]},Frequency:{},IsLocalTime:{type:"boolean"},QuietTime:{shape:"Sx"},StartTime:{},Timezone:{}},required:[]},Sm:{type:"map",key:{},value:{type:"structure",members:{AttributeType:{},Values:{shape:"Sp"}},required:[]}},Sp:{type:"list",member:{}},Sq:{type:"structure",members:{DimensionType:{},Values:{shape:"Sp"}},required:[]},Ss:{type:"map",key:{},value:{type:"structure",members:{ComparisonOperator:{},Value:{type:"double"}},required:[]}},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:[]}},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:[]},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:[]},FailedPieces:{type:"integer"},Failures:{shape:"Sp"},Id:{},JobStatus:{},TotalFailures:{type:"integer"},TotalPieces:{type:"integer"},TotalProcessed:{type:"integer"},Type:{}},required:[]},S1h:{type:"structure",members:{ApplicationId:{},CompletedPieces:{type:"integer"},CompletionDate:{},CreationDate:{},Definition:{type:"structure",members:{DefineSegment:{type:"boolean"},ExternalId:{},Format:{},RegisterEndpoints:{type:"boolean"},RoleArn:{},S3Url:{},SegmentId:{},SegmentName:{}},required:[]},FailedPieces:{type:"integer"},Failures:{shape:"Sp"},Id:{},JobStatus:{},TotalFailures:{type:"integer"},TotalPieces:{type:"integer"},TotalProcessed:{type:"integer"},Type:{}},required:[]},S1k:{type:"structure",members:{Dimensions:{shape:"S1l"},Name:{},SegmentGroups:{shape:"S1u"},tags:{shape:"S4",locationName:"tags"}},required:[]},S1l:{type:"structure",members:{Attributes:{shape:"Sm"},Behavior:{type:"structure",members:{Recency:{type:"structure",members:{Duration:{},RecencyType:{}},required:[]}}},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:[]},RangeInKilometers:{type:"double"}},required:[]}}},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:[]}},SourceType:{},Type:{}},required:[]}},Include:{}},required:[]},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:[]},LastModifiedDate:{},Name:{},SegmentGroups:{shape:"S1u"},SegmentType:{},tags:{shape:"S4",locationName:"tags"},Version:{type:"integer"}},required:[]},S2a:{type:"structure",members:{ApplicationId:{},CreationDate:{},Enabled:{type:"boolean"},HasCredential:{type:"boolean"},Id:{},IsArchived:{type:"boolean"},LastModifiedBy:{},LastModifiedDate:{},Platform:{},Version:{type:"integer"}},required:[]},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:[]},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:[]},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:[]},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:[]},S2r:{type:"structure",members:{ApplicationId:{},CreationDate:{},Credential:{},Enabled:{type:"boolean"},HasCredential:{type:"boolean"},Id:{},IsArchived:{type:"boolean"},LastModifiedBy:{},LastModifiedDate:{},Platform:{},Version:{type:"integer"}},required:[]},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:[]},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:[]},S3b:{type:"structure",members:{ApplicationId:{},CreationDate:{},Credential:{},Enabled:{type:"boolean"},HasCredential:{type:"boolean"},Id:{},IsArchived:{type:"boolean"},LastModifiedBy:{},LastModifiedDate:{},Platform:{},Version:{type:"integer"}},required:[]},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:[]},S3j:{type:"structure",members:{Item:{type:"list",member:{shape:"S2z"}}},required:[]},S3n:{type:"structure",members:{ApplicationId:{},CreationDate:{},Enabled:{type:"boolean"},HasCredential:{type:"boolean"},Id:{},IsArchived:{type:"boolean"},LastModifiedBy:{},LastModifiedDate:{},Platform:{},Version:{type:"integer"}},required:[]},S42:{type:"structure",members:{ApplicationId:{},CampaignHook:{shape:"Sy"},LastModifiedDate:{},Limits:{shape:"S10"},QuietTime:{shape:"Sx"}},required:[]},S4k:{type:"structure",members:{Item:{type:"list",member:{shape:"S12"}},NextToken:{}},required:[]},S53:{type:"structure",members:{Item:{type:"list",member:{shape:"S1a"}},NextToken:{}},required:[]},S5b:{type:"structure",members:{Item:{type:"list",member:{shape:"S1h"}},NextToken:{}},required:[]},S5n:{type:"structure",members:{Item:{type:"list",member:{shape:"S24"}},NextToken:{}},required:[]},S5z:{type:"structure",members:{tags:{shape:"S4",locationName:"tags"}},required:["tags"]},S6u:{type:"map",key:{},value:{type:"structure",members:{BodyOverride:{},Context:{shape:"S4"},RawContent:{},Substitutions:{shape:"S30"},TitleOverride:{}}}},S6w:{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"},SimpleEmail:{type:"structure",members:{HtmlPart:{shape:"S76"},Subject:{shape:"S76"},TextPart:{shape:"S76"}}},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:{}}}},required:[]},S76:{type:"structure",members:{Charset:{},Data:{}}},S7c:{type:"map",key:{},value:{type:"structure",members:{Address:{},DeliveryStatus:{},MessageId:{},StatusCode:{type:"integer"},StatusMessage:{},UpdatedToken:{}},required:[]}},S8h:{type:"structure",members:{Message:{},RequestID:{}}}}}},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(57),o=n(93),a=n(1),s=new a.ConsoleLogger("Cache"),u=function(e){function t(t){var n=this,r=t?Object.assign({},i.defaultConfig,t):i.defaultConfig;return n=e.call(this,r)||this,n.config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return r(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=i.getCurrTime(),this.config.storage.setItem(t,JSON.stringify(e)),e},t.prototype._isExpired=function(e){var t=this.config.storage.getItem(e),n=JSON.parse(t);return i.getCurrTime()>=n.expires},t.prototype._removeItem=function(e,t){var n=t||JSON.parse(this.config.storage.getItem(e)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(e)},t.prototype._setItem=function(e,t){this._increaseCurSizeInBytes(t.byteSize);try{this.config.storage.setItem(e,JSON.stringify(t))}catch(e){this._decreaseCurSizeInBytes(t.byteSize),s.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(var n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var a=JSON.parse(o);n.push(a)}}n.sort(function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1});for(var i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){s.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return void s.warn("Invalid key: should not be empty or 'CurSize'");if(void 0===t)return void s.warn("The value of item should not be undefined!");var o={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+i.getCurrTime()};if(o.priority<1||o.priority>5)return void s.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");var a=this.fillCacheItem(r,t,o);if(a.byteSize>this.config.itemMaxSize)return void s.warn("Item with key: "+e+" you are trying to put into is too big!");try{var u=this.config.storage.getItem(r);if(u&&this._removeItem(r,JSON.parse(u).byteSize),this._isCacheFull(a.byteSize)){var c=this._findValidKeys();if(this._isCacheFull(a.byteSize)){var l=this._sizeToPop(a.byteSize);this._popOutItems(c,l)}}this._setItem(r,a)}catch(e){s.warn("setItem failed! "+e)}},t.prototype.getItem=function(e,t){s.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return s.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return i=this._refreshItem(i,r),i.data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return s.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){s.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(e){s.warn("removeItem failed! "+e)}},t.prototype.clear=function(){s.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(var t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){s.warn("clear failed! "+e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&n!==this.cacheCurSizeKey&&e.push(n.substring(this.config.keyPrefix.length))}return e},t.prototype.getCacheCurSize=function(){var e=this.config.storage.getItem(this.cacheCurSizeKey);return e||(this.config.storage.setItem(this.cacheCurSizeKey,"0"),e="0"),Number(e)},t.prototype.createInstance=function(e){return e.keyPrefix&&e.keyPrefix!==i.defaultConfig.keyPrefix||(s.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=i.getCurrTime.toString()),new t(e)},t}(o.default);t.BrowserStorageCache=u;var c=new u;t.default=c},function(e,t,n){"use strict";function r(e){var t=0;t=e.length;for(var n=e.length;n>=0;n-=1){var r=e.charCodeAt(n);r>127&&r<=2047?t+=1:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&(n-=1)}return t}function i(){return(new Date).getTime()}function o(e){return Number.isInteger?Number.isInteger(e):a(e)}function a(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}Object.defineProperty(t,"__esModule",{value:!0});var s=n(1);t.defaultConfig={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new s.StorageHelper).getStorage()},t.getByteLength=r,t.getCurrTime=i,t.isInteger=o;var u={},c=function(){function e(){}return e.clear=function(){u={}},e.getItem=function(e){return u[e]||null},e.setItem=function(e,t){u[e]=t},e.removeItem=function(e){delete u[e]},e}();t.CacheObject=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.key=e||"",this.prevNode=null,this.nextNode=null}return e}(),i=function(){function e(){this.head=new r,this.tail=new r,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 r(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 n=t[e];this.hashtable.hasOwnProperty(n)&&delete this.hashtable[n]}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}();t.default=i},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(57),o=n(93),a=n(1),s=new a.ConsoleLogger("InMemoryCache"),u=function(e){function t(t){var n=this,r=t?Object.assign({},i.defaultConfig,t):i.defaultConfig;n=e.call(this,r)||this,s.debug("now we start!"),n.cacheList=[],n.curSizeInBytes=0,n.maxPriority=5,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n);for(var o=0;o<n.maxPriority;o+=1)n.cacheList[o]=new i.CacheList;return n}return r(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=i.CacheObject.getItem(e),n=JSON.parse(t);return i.getCurrTime()>=n.expires},t.prototype._removeItem=function(e,t){this.cacheList[t].removeItem(e),this._decreaseCurSizeInBytes(JSON.parse(i.CacheObject.getItem(e)).byteSize),i.CacheObject.removeItem(e)},t.prototype._setItem=function(e,t,n){this.cacheList[n].insertItem(e),this._increaseCurSizeInBytes(t.byteSize),i.CacheObject.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,n=0;n<this.maxPriority;n+=1)if(this.cacheList[n].containsKey(t))return n+1;return-1},t.prototype.setItem=function(e,t,n){var r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return void s.warn("Invalid key: should not be empty or 'CurSize'");if(void 0===t)return void s.warn("The value of item should not be undefined!");var o={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+i.getCurrTime()};if(o.priority<1||o.priority>5)return void s.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");var a=this.fillCacheItem(r,t,o);if(a.byteSize>this.config.itemMaxSize)return void s.warn("Item with key: "+e+" you are trying to put into is too big!");var u=this.containsKey(e);-1!==u&&this._removeItem(r,u-1);for(var c=this.maxPriority-1;this._isCacheFull(a.byteSize)&&c>=0;)if(this.cacheList[c].isEmpty())c-=1;else{var l=this.cacheList[c].getLastItem();this._removeItem(l,c)}this._setItem(r,a,Number(a.priority)-1)},t.prototype.getItem=function(e,t){var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return s.warn("Invalid key: should not be empty or 'CurSize'"),null;var o=this.containsKey(e);if(-1!==o){if(!this._isExpired(r)){n=i.CacheObject.getItem(r);var a=JSON.parse(n);return this.cacheList[a.priority-1].refresh(r),a.data}this._removeItem(r,o-1)}if(t&&void 0!==t.callback){var u=t.callback();return null!==u&&this.setItem(e,u,t),u}return null},t.prototype.removeItem=function(e){var t=this.config.keyPrefix+e,n=this.containsKey(e);-1!==n&&this._removeItem(t,n-1)},t.prototype.clear=function(){for(var e=0;e<this.maxPriority;e+=1)for(var t=0,n=this.cacheList[e].getKeys();t<n.length;t++){var r=n[t];this._removeItem(r,e)}},t.prototype.getAllKeys=function(){for(var e=[],t=0;t<this.maxPriority;t+=1)for(var n=0,r=this.cacheList[t].getKeys();n<r.length;n++){var i=r[n];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}(o.default);t.InMemoryCache=u;var c=new u;t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(265);t.PageViewTracker=r.default;var i=n(267);t.EventTracker=i.default;var o=n(273);t.SessionTracker=o.default},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(266),a=n(1),s=new a.ConsoleLogger("PageViewTracker"),u="aws-amplify-analytics-prevUrl",c=function(){return a.JS.browserOrNode().isBrowser?window.location.origin+window.location.pathname:""},l={enable:!1,provider:"AWSPinpoint",getUrl:c},p=function(){function e(e,t){s.debug("initialize pageview tracker with opts",t),this._config=Object.assign({},l,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(u)===this._config.getUrl()&&(s.debug("the url is same"),!0)},e.prototype._pageViewTrackDefault=function(){return r(this,void 0,void 0,function(){var e,t,n,r;return i(this,function(i){switch(i.label){case 0:return a.JS.browserOrNode().isBrowser&&window.addEventListener&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(s.debug("not in the supported web enviroment"),[2]);case 1:return n=i.sent(),[3,3];case 2:n=this._config.attributes,i.label=3;case 3:return t=n,r=Object.assign({url:e},t),this._config.enable&&!this._isSameUrl()&&(this._tracker({name:this._config.eventName||"pageView",attributes:r},this._config.provider).catch(function(e){s.debug("Failed to record the page view event",e)}),sessionStorage.setItem(u,e)),[2]}})})},e.prototype._trackFunc=function(){return r(this,void 0,void 0,function(){var e,t,n,r;return i(this,function(i){switch(i.label){case 0:return a.JS.browserOrNode().isBrowser&&window.addEventListener&&history.pushState&&window.sessionStorage?(e=this._config.getUrl(),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]):(s.debug("not in the supported web enviroment"),[2]);case 1:return n=i.sent(),[3,3];case 2:n=this._config.attributes,i.label=3;case 3:return t=n,r=Object.assign({url:e},t),this._isSameUrl()||(this._tracker({name:this._config.eventName||"pageView",attributes:r},this._config.provider).catch(function(e){s.debug("Failed to record the page view event",e)}),sessionStorage.setItem(u,e)),[2]}})})},e.prototype._pageViewTrackSPA=function(){if(!a.JS.browserOrNode().isBrowser||!window.addEventListener||!history.pushState)return void s.debug("not in the supported web enviroment");this._config.enable&&!this._hasEnabled?(o.default.add(history,"pushState",this._trackFunc),o.default.add(history,"replaceState",this._trackFunc),window.addEventListener("popstate",this._trackFunc),this._trackFunc(),this._hasEnabled=!0):(o.default.remove(history,"pushState"),o.default.remove(history,"replaceState"),window.removeEventListener("popstate",this._trackFunc),this._hasEnabled=!1)},e}();t.default=p},function(e,t,n){"use strict";function r(e,t){var n=i.filter(function(n){return n.context===e&&n.methodName===t})[0];return n||(n=new o(e,t),i.push(n)),n}Object.defineProperty(t,"__esModule",{value:!0});var i=[],o=function(){function e(e,t){this.context=e,this.methodName=t,this._originalMethod=e[t].bind(e)}return e.add=function(e,t,n){r(e,t).set(n)},e.remove=function(e,t){r(e,t).remove()},e.prototype.set=function(e){var t=this;this.context[this.methodName]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t._originalMethod.apply(t,n))}},e.prototype.remove=function(){this.context[this.methodName]=this._originalMethod},e}();t.default=o},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(268),a=n(1),s=new a.ConsoleLogger("EventTracker"),u={enable:!1,events:["click"],selectorPrefix:"data-amplify-analytics-",provider:"AWSPinpoint"},c=function(){function e(e,t){if(!a.JS.browserOrNode().isBrowser||!window.addEventListener)return void s.debug("not in the supported web environment");this._config=Object.assign({},u,t),this._tracker=e,this._delegates={},this._trackFunc=this._trackFunc.bind(this),s.debug("initialize pageview tracker with opts",this._config),this.configure(this._config)}return e.prototype.configure=function(e){var t=this;if(Object.assign(this._config,e),this._config.enable){if(this._config.enable&&0===Object.keys(this._delegates).length){var n="["+this._config.selectorPrefix+"on]";this._config.events.forEach(function(e){t._delegates[e]=o.delegate(document,e,n,t._trackFunc,{composed:!0,useCapture:!0})})}}else Object.keys(this._delegates).forEach(function(e){"function"==typeof t._delegates[e].destroy&&t._delegates[e].destroy()}),this._delegates={};return this._config},e.prototype._trackFunc=function(e,t){return r(this,void 0,void 0,function(){var n,r,o,a,u,c,l;return i(this,function(i){switch(i.label){case 0:return n={},r=t.getAttribute(this._config.selectorPrefix+"on").split(/\s*,\s*/),o=t.getAttribute(this._config.selectorPrefix+"name"),a=t.getAttribute(this._config.selectorPrefix+"attrs"),a&&a.split(/\s*,\s*/).forEach(function(e){var t=e.trim().split(/\s*:\s*/);n[t[0]]=t[1]}),"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return c=i.sent(),[3,3];case 2:c=this._config.attributes,i.label=3;case 3:return u=c,l=Object.assign({type:e.type,target:e.target.localName+" with id "+e.target.id},u,n),s.debug("events needed to be recorded",r),s.debug("attributes needed to be attached",n),r.indexOf(e.type)<0?(s.debug("event "+e.type+" is not selected to be recorded"),[2]):(this._tracker({name:o||"event",attributes:l},this._config.provider).catch(function(t){s.debug("Failed to record the "+e.type+" event', "+t)}),[2])}})})},e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94);t.closest=r.default;var i=n(269);t.delegate=i.default;var o=n(270);t.dispatch=o.default;var a=n(271);t.getAttributes=a.default;var s=n(58);t.matches=s.default;var u=n(95);t.parents=u.default;var c=n(272);t.parseUrl=c.default},function(e,t,n){"use strict";function r(e,t,n,r,a){void 0===a&&(a={});var s=function(e){var t;if(a.composed&&"function"==typeof e.composedPath)for(var s=e.composedPath(),u=0,c=void 0;c=s[u];u++)1===c.nodeType&&o.default(c,n)&&(t=c);else t=i.default(e.target,n,!0);t&&r.call(t,e,t)};return e.addEventListener(t,s,a.useCapture),{destroy:function(){e.removeEventListener(t,s,a.useCapture)}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(94),o=n(58);t.default=r},function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n="Event"),void 0===r&&(r={});var o,a,s=r,u=n;"object"===(void 0===u?"undefined":i(u))&&(s=u,u="Event"),s.bubbles=s.bubbles||!1,s.cancelable=s.cancelable||!1,s.composed=s.composed||!1,"detail"in s&&(a=!0),u=a?"CustomEvent":u;try{o=new window[u](t,s)}catch(e){o=document.createEvent(u);var c="init"+(a?"Custom":"")+"Event";o[c](t,s.bubbles,s.cancelable,s.detail)}return e.dispatchEvent(o)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t={};if(!e||1!==e.nodeType)return t;var n=e.attributes;if(0===n.length)return{};for(var r=0,i=void 0;i=n[r];r++)t[i.name]=i.value;return t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";function r(e){var t=e;if(t=t&&"."!==t?t:location.href,c[t])return c[t];if(u.href=t,"."===t.charAt(0)||"/"===t.charAt(0))return r(u.href);var n=u.port===o||u.port===a?"":u.port;n="0"===n?"":n;var i=u.host.replace(s,""),l=u.origin?u.origin:u.protocol+"//"+i,p="/"===u.pathname.charAt(0)?u.pathname:"/"+u.pathname;return c[t]={hash:u.hash,host:i,hostname:u.hostname,href:u.href,origin:l,pathname:p,port:n,protocol:u.protocol,search:u.search}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o="80",a="443",s=RegExp(":("+o+"|"+a+")$"),u=i.JS.browserOrNode().isBrowser?document.createElement("a"):null,c={};t.default=r},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=new o.ConsoleLogger("SessionTracker"),s={enable:!1,provider:"AWSPinpoint"},u=!1,c=function(){function e(e,t){this._config=Object.assign({},s,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(!o.JS.browserOrNode().isBrowser)return!1;if(!document||!document.addEventListener)return a.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 a.debug("not in the supported web environment"),!1;this._hidden="webkitHidden",this._visibilityChange="webkitvisibilitychange"}return!0},e.prototype._trackFunc=function(){return r(this,void 0,void 0,function(){var e,t,n;return i(this,function(r){switch(r.label){case 0:return"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()];case 1:return t=r.sent(),[3,3];case 2:t=this._config.attributes,r.label=3;case 3:return e=t,n=Object.assign({},e),document[this._hidden]?this._tracker({name:"_session.stop",attributes:n},this._config.provider).catch(function(e){a.debug("record session stop event failed.",e)}):this._tracker({name:"_session.start",attributes:n},this._config.provider).catch(function(e){a.debug("record session start event failed.",e)}),[2]}})})},e.prototype._trackBeforeUnload=function(){var e=this;("function"==typeof this._config.attributes?Promise.resolve(this._config.attributes()):Promise.resolve(this._config.attributes)).then(function(t){var n=Object.assign({},t);e._tracker({name:"_session.stop",attributes:n,immediate:!0},e._config.provider).catch(function(e){a.debug("record session stop event failed.",e)})})},e.prototype._sendInitialEvent=function(){return r(this,void 0,void 0,function(){var e,t,n;return i(this,function(r){switch(r.label){case 0:return u?(a.debug("the start session has been sent when the page is loaded"),[2]):(u=!0,"function"!=typeof this._config.attributes?[3,2]:[4,this._config.attributes()]);case 1:return t=r.sent(),[3,3];case 2:t=this._config.attributes,r.label=3;case 3:return e=t,n=Object.assign({},e),this._tracker({name:"_session.start",attributes:n},this._config.provider).catch(function(e){a.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}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92);t.AWSPinpointProvider=r.default;var i=n(275);t.AWSKinesisProvider=i.default;var o=n(280);t.AmazonPersonalizeProvider=o.default},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(276),s=new o.ConsoleLogger("AWSKineisProvider"),u=1e3,c=100,l=5e3,p=5,f=function(){function e(e){this._buffer=[],this._config=e||{},this._config.bufferSize=this._config.bufferSize||u,this._config.flushSize=this._config.flushSize||c,this._config.flushInterval=this._config.flushInterval||l,this._config.resendLimit=this._config.resendLimit||p,this._setupTimer()}return e.prototype._setupTimer=function(){var e=this;this._timer&&clearInterval(this._timer);var t=this._config,n=t.flushSize,r=t.flushInterval,i=this;this._timer=setInterval(function(){for(var t=e._buffer.length<n?e._buffer.length:n,r=[],o=0;o<t;o+=1){var a=e._buffer.shift();r.push(a)}i._sendFromBuffer(r)},r)},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AWSKinesis"},e.prototype.configure=function(e){s.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 r(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return[4,this._getCredentials()];case 1:return(t=n.sent())?(Object.assign(e,{config:this._config,credentials:t}),[2,this._putToBuffer(e)]):[2,Promise.resolve(!1)]}})})},e.prototype.updateEndpoint=function(e){return s.debug("updateEndpoint is not implemented in Kinesis provider"),Promise.resolve(!0)},e.prototype._putToBuffer=function(e){return this._buffer.length<u?(this._buffer.push(e),Promise.resolve(!0)):(s.debug("exceed analytics events buffer size"),Promise.reject(!1))},e.prototype._sendFromBuffer=function(e){for(var t=this,n=[],r=null,i=[],o=0;o<e.length;o+=1){var a=e[o].credentials;0===o?(i.push(e[o]),r=a):a.sessionToken===r.sessionToken&&a.identityId===r.identityId?(s.debug("no change for cred, put event in the same group"),i.push(e[o])):(n.push(i),i=[],i.push(e[o]),r=a)}n.push(i),n.map(function(e){t._sendEvents(e)})},e.prototype._sendEvents=function(e){var t=this;if(0!==e.length){var n=e[0],r=n.config,i=n.credentials;if(!this._init(r,i))return!1;var o={};e.map(function(e){var t=e.event,n=t.streamName;void 0===o[n]&&(o[n]=[]);var r=JSON.stringify(t.data),a=t.partitionKey||"partition-"+i.identityId,s={Data:r,PartitionKey:a};o[n].push(s)}),Object.keys(o).map(function(e){s.debug("putting records to kinesis with records",o[e]),t._kinesis.putRecords({Records:o[e],StreamName:e},function(t,n){t?s.debug("Failed to upload records to Kinesis",t):s.debug("Upload records to stream",e)})})}},e.prototype._init=function(e,t){if(s.debug("init clients"),this._kinesis&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return s.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var n=e.region;return s.debug("initialize kinesis with credentials",t),this._kinesis=new a({apiVersion:"2013-12-02",region:n,credentials:t}),!0},e.prototype._getCredentials=function(){var e=this;return o.Credentials.get().then(function(t){return t?(s.debug("set credentials for analytics",e._config.credentials),o.Credentials.shear(t)):null}).catch(function(e){return s.debug("ensure credentials error",e),null})},e}();t.default=f},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.kinesis={},r.Kinesis=i.defineService("kinesis",["2013-12-02"]),Object.defineProperty(o.services.kinesis,"2013-12-02",{get:function(){var e=n(277);return e.paginators=n(278).pagination,e.waiters=n(279).waiters,e},enumerable:!0,configurable:!0}),e.exports=r.Kinesis},function(e,t){e.exports={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:{}}}},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"}}}}}},function(e,t){e.exports={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"}}}},function(e,t){e.exports={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"}]}}}},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(281),s=n(284),u=n(96),c=new o.ConsoleLogger("AmazonPersonalizeProvider"),l=5,p=10,f=5e3,d=function(){function e(e){this._buffer=[],this._config=e||{},this._config.flushSize=this._config.flushSize>0&&this._config.flushSize<=p?this._config.flushSize:l,this._config.flushInterval=this._config.flushInterval||f,this._sessionManager=new s.SessionInfoManager,u.isEmpty(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._isBrowser=o.JS.browserOrNode().isBrowser,this._setupTimer()}return e.prototype._setupTimer=function(){this._timer&&clearInterval(this._timer);var e=this._config,t=(e.flushSize,e.flushInterval),n=this;this._timer=setInterval(function(){n._sendFromBuffer()},t)},e.prototype.record=function(e){return r(this,void 0,void 0,function(){var t,n,r,o,a,l;return i(this,function(i){switch(i.label){case 0:return[4,this._getCredentials()];case 1:return(t=i.sent())?(Object.assign(e,{config:this._config,credentials:t,sentAt:(new Date).getTime()/1e3}),n=e.event,r=n.eventType,o=n.properties,"Identify"===r?(this._sessionManager.updateSessionInfo(o&&o.userId?o.userId:"",this._sessionInfo),[2]):(u.isEmpty(e.event.userId)||this._sessionManager.updateSessionInfo(e.event.userId,this._sessionInfo),a=this.generateRequestParams(e,this._sessionInfo),"MediaAutoTrack"!==r?[3,7]:this._isBrowser?u.isEmpty(u.get(a,"eventData.properties.domElementId",null))?[3,3]:[4,this.isElementFullyLoaded(this.loadElement,a.eventData.properties.domElementId,500,5)]:[3,5])):[2,Promise.resolve(!1)];case 2:return l=i.sent(),l?new s.MediaAutoTrack(a,this):c.debug("Cannot find the media element."),[3,4];case 3:c.debug("Missing domElementId field in 'properties' for MediaAutoTrack event type."),i.label=4;case 4:return[3,6];case 5:c.debug("MediaAutoTrack only for browser"),i.label=6;case 6:return[2];case 7:return[2,this.putToBuffer(a)]}})})},e.prototype.loadElement=function(e){return new Promise(function(t,n){return document.getElementById(e)&&document.getElementById(e).clientHeight?t(!0):n(!0)})},e.prototype.isElementFullyLoaded=function(e,t,n,r){var i=this,o=function(e){return new Promise(function(t){return setTimeout(t,e)})};return new Promise(function(a,s){return e(t).then(a).catch(function(u){return r-1>0?o(n).then(i.isElementFullyLoaded.bind(null,e,t,n,r-1)).then(a).catch(s):s(u)})})},e.prototype.getCategory=function(){return"Analytics"},e.prototype.getProviderName=function(){return"AmazonPersonalize"},e.prototype.configure=function(e){c.debug("configure Analytics",e);var t=e||{};return this._config=Object.assign({},this._config,t),u.isEmpty(this._config.trackingId)||(this._sessionInfo=this._sessionManager.retrieveSessionInfo(this._config.trackingId)),this._setupTimer(),this._config},e.prototype.generateRequestParams=function(e,t){var n={},r=e.event,i=r.eventType,o=r.properties;return n.eventData={eventType:i,properties:o},n.sessionInfo=t,n.sentAt=e.sentAt,n.credentials=e.credentials,n.config=e.config,n},e.prototype._sendEvents=function(e){var t=e.length;if(0===t)return void c.debug("events array is empty, directly return");var n=e[0],r=n.config,i=n.credentials,o=n.sessionInfo;if(!this._init(r,i))return!1;if(t>0){for(var a=[],s=0;s<t;s+=1){var u=e.shift(),l=this._generateSingleRecordPayload(u,o);a.push(l)}var p={};p.trackingId=o.trackingId,p.sessionId=o.sessionId,p.userId=o.userId,p.eventList=a,this._personalize.putEvents(p,function(e,t){e?c.debug("Failed to call putEvents in Personalize",e):c.debug("Put events")})}},e.prototype.putToBuffer=function(e){return this._buffer.length<this._config.flushSize?this._buffer.push(e):(this._buffer.push(e),this._sendFromBuffer()),Promise.resolve(!0)},e.prototype._sendFromBuffer=function(){var e=this,t=this._buffer.length;if(!(t<=0)){for(var n=[],r=null,i=[],o=0;o<t;o+=1){var a=this._buffer.shift(),s=a.credentials,l=a.sessionInfo;0===o?(i.push(a),r=s):u.isEqual(l,this._sessionInfo)&&s.sessionToken===r.sessionToken&&s.identityId===r.identityId?(c.debug("no change for cred, put event in the same group"),i.push(a)):(n.push(i),i=[],i.push(a),r=s,this._sessionInfo=l)}n.push(i),n.map(function(t){e._sendEvents(t)})}},e.prototype._generateSingleRecordPayload=function(e,t){var n=e.eventData,r=e.sentAt,i={};return i.sentAt=r,i.properties=n.properties,i.eventId=this._sessionManager.getTimerKey()+t.sessionId,i.eventType=n.eventType,i},e.prototype._init=function(e,t){if(c.debug("init clients"),this._personalize&&this._config.credentials&&this._config.credentials.sessionToken===t.sessionToken&&this._config.credentials.identityId===t.identityId)return c.debug("no change for analytics config, directly return from init"),!0;this._config.credentials=t;var n=e.region;return c.debug("initialize personalize with credentials",t),this._personalize=new a({apiVersion:"2018-03-22",region:n,credentials:t}),!0},e.prototype._getCredentials=function(){var e=this;return o.Credentials.get().then(function(t){return t?(c.debug("set credentials for analytics",e._config.credentials),o.Credentials.shear(t)):null}).catch(function(e){return c.debug("ensure credentials error",e),null})},e}();t.default=d},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.personalizeevents={},r.PersonalizeEvents=i.defineService("personalizeevents",["2018-03-22"]),Object.defineProperty(o.services.personalizeevents,"2018-03-22",{get:function(){var e=n(282);return e.paginators=n(283).pagination,e},enumerable:!0,configurable:!0}),e.exports=r.PersonalizeEvents},function(e,t){e.exports={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:!0},sentAt:{type:"timestamp"}}}}}}}},shapes:{}}},function(e,t){e.exports={pagination:{}}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(285)),r(n(286))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(96),i=n(30),o=n(1),a=n(41),s=(new o.ConsoleLogger("AmazonPersonalizeProvider"),function(){function e(e){void 0===e&&(e=""),this._isBrowser=o.JS.browserOrNode().isBrowser,this._timerKey=i.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=i.v1().substr(0,15)},3e4)},e.prototype.storeValue=function(e,t){var n=new Date,r=new Date;r.setTime(n.getTime()+6048e5),a.default.setItem(this._getCachePrefix(e),t,{expires:r.getTime()})},e.prototype.retrieveValue=function(e){return a.default.getItem(this._getCachePrefix(e))},e.prototype._getCachePrefix=function(e){return this._isBrowser?e+"."+window.location.host:"peronslize"},e.prototype.getTimerKey=function(){return this._timerKey},e.prototype.updateSessionInfo=function(e,t){var n=t.userId,r=t.sessionId;if(this._isRequireNewSession(e,n,r)){var o=i.v1();this.storeValue("_awsct_uid",e),this.storeValue("_awsct_sid",o),t.sessionId=o}else this._isRequireUpdateSessionInfo(e,n,r)&&this.storeValue("_awsct_uid",e);t.userId=e},e.prototype._isRequireUpdateSessionInfo=function(e,t,n){return!r.isEmpty(n)&&r.isEmpty(t)&&!r.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"),r.isEmpty(t.sessionId)&&(t.sessionId=i.v1(),this.storeValue("_awsct_sid",t.sessionId)),this.storeValue("_awsct",e),t},e.prototype._isRequireNewSession=function(e,t,n){var i=r.isEmpty(n),o=r.isEmpty(e)&&!r.isEmpty(t),a=!r.isEmpty(e)&&!r.isEmpty(t)&&!r.isEqual(e,t);return i||o||a},e}());t.SessionInfoManager=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(287);!function(e){e.PLAY="play",e.PAUSE="pause",e.ENDED="Ended"}(r||(r={}));var o;!function(e){e.IFRAME="IFRAME",e.VIDEO="VIDEO",e.AUDIO="AUDIO"}(o||(o={}));var a;!function(e){e.PLAY="Play",e.ENDED="Ended",e.PAUSE="Pause",e.TIME_WATCHED="TimeWatched"}(a||(a={}));var s=function(){function e(e,t){var n;this.eventActionMapping=(n={},n[a.ENDED]=this.endedEventAction.bind(this),n[a.PLAY]=this.playEventAction.bind(this),n[a.PAUSE]=this.pauseEventAction.bind(this),n);var r=e.eventData;this._params=e,this._mediaElement=document.getElementById(r.properties.domElementId),this._started=!1,this._provider=t,{IFRAME:this._iframeMediaTracker,VIDEO:this._html5MediaTracker,AUDIO:this._html5MediaTracker}[this._mediaElement.tagName].bind(this)()}return e.prototype._iframeMediaTracker=function(){var e=this;setInterval(function(){e._started&&e.recordEvent(o.IFRAME,a.TIME_WATCHED)},3e3),i.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:a.ENDED,1:a.PLAY,2:a.PAUSE},n=t[e.data];n&&this.eventActionMapping[n](o.IFRAME)},e.prototype._html5MediaTracker=function(){var e=this;setInterval(function(){e._started&&e.recordEvent(o.VIDEO,a.TIME_WATCHED)},3e3),this._mediaElement.addEventListener(r.PLAY,function(){e.eventActionMapping[a.PLAY](o.VIDEO)},!1),this._mediaElement.addEventListener(r.PAUSE,function(){e.eventActionMapping[a.PAUSE](o.VIDEO)},!1),this._mediaElement.addEventListener(r.ENDED,function(){e.eventActionMapping[a.ENDED](o.VIDEO)},!1)},e.prototype.playEventAction=function(e){this._started=!0,this.recordEvent(e,a.PLAY)},e.prototype.pauseEventAction=function(e){this._started=!1,this.recordEvent(e,a.PAUSE)},e.prototype.endedEventAction=function(e){this._started=!1,this.recordEvent(e,a.ENDED)},e.prototype.recordEvent=function(e,t){var n=Object.assign({},this._params),r=n.eventData;r.eventType=t,e===o.VIDEO?(r.properties.timestamp=this._mediaElement.currentTime,r.properties.duration=this._mediaElement.duration):(r.properties.timestamp=this._financial(this._iframePlayer.getCurrentTime()),r.properties.duration=this._financial(this._iframePlayer.getDuration()));var i=parseFloat(r.properties.timestamp)/parseFloat(r.properties.duration);r.properties.eventValue=Number(i.toFixed(4)),delete r.properties.domElementId,this._provider.putToBuffer(n)},e.prototype._financial=function(e){return Number.parseFloat(e).toFixed(4)},e}();t.MediaAutoTrack=s},function(e,t){!function(t){var n={src:"https://www.youtube.com/iframe_api",loading:!1,loaded:!1,listeners:[],load:function(e){var n=this;if(this.listeners.push(e),this.loaded)return void setTimeout(function(){n.done()});if(!this.loading){this.loading=!0,t.onYouTubeIframeAPIReady=function(){n.loaded=!0,n.done()};var r=document.createElement("script");r.type="text/javascript",r.src=this.src,document.body.appendChild(r)}},done:function(){for(delete t.onYouTubeIframeAPIReady;this.listeners.length;)this.listeners.pop()(t.YT)}};void 0!==e&&e.exports?e.exports=n:t.YouTubeIframeLoader=n}(window)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a,s=n(289),u=n(1),c=n(99),l=n(31),p=n(297),f=n(300),d=new u.ConsoleLogger("AuthClass"),h="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",m=function(e,t,n){u.Hub.dispatch("auth",{event:e,data:t,message:n},"Auth",h)};!function(e){e.Cognito="COGNITO",e.Google="Google",e.Facebook="Facebook",e.Amazon="LoginWithAmazon"}(a=t.CognitoHostedUIIdentityProvider||(t.CognitoHostedUIIdentityProvider={}));var y=function(){function e(e){var t=this;this.userPool=null,this.user=null,this.configure(e),this.currentUserCredentials=this.currentUserCredentials.bind(this),u.AWS.config?u.AWS.config.update({customUserAgent:u.Constants.userAgent}):d.warn("No AWS.config"),u.Hub.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||{};d.debug("configure Auth");var n=Object.assign({},this._config,u.Parser.parseMobilehubConfig(e).Auth,e);this._config=n;var r=this._config,i=r.userPoolId,o=r.userPoolWebClientId,a=r.cookieStorage,l=r.oauth,h=r.region,y=r.identityPoolId,g=r.mandatorySignIn,v=r.refreshHandlers,b=r.identityPoolRegion;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw d.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=a?new c.CookieStorage(a):(new u.StorageHelper).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var _={UserPoolId:i,ClientId:o};_.Storage=this._storage,this.userPool=new c.CognitoUserPool(_)}u.Credentials.configure({mandatorySignIn:g,region:b||h,userPoolId:i,identityPoolId:y,refreshHandlers:v,storage:this._storage});var S=l?s.isCognitoHostedOpts(this._config.oauth)?l:l.awsCognito:void 0;if(S){var E=Object.assign({cognitoClientId:o,UserPoolId:i,domain:S.domain,scopes:S.scope,redirectSignIn:S.redirectSignIn,redirectSignOut:S.redirectSignOut,responseType:S.responseType,Storage:this._storage,urlOpener:S.urlOpener},S.options);this._oAuthHandler=new p.default({scopes:E.scopes,config:E,cognitoClientId:E.cognitoClientId}),f.default(function(e){var n=e.url;t._handleAuthResponse(n)})}return m("configured",null,"The Auth category has been configured successfully"),this._config},e.prototype.signUp=function(e){for(var t=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this.userPool)return Promise.reject("No userPool");var o=null,a=null,s=[],u=null;if(e&&"string"==typeof e){o=e,a=n?n[0]:null;var c=n?n[1]:null,l=n?n[2]:null;c&&s.push({Name:"email",Value:c}),l&&s.push({Name:"phone_number",Value:l})}else{if(!e||"object"!==(void 0===e?"undefined":r(e)))return Promise.reject("The first parameter should either be non-null string or object");o=e.username,a=e.password;var p=e.attributes;p&&Object.keys(p).map(function(e){var t={Name:e,Value:p[e]};s.push(t)}),u=e.validationData||null}return o?a?(d.debug("signUp attrs:",s),d.debug("signUp validation data:",u),new Promise(function(e,n){t.userPool.signUp(o,a,s,u,function(t,r){t?(m("signUp_failure",t,o+" failed to signup"),n(t)):(m("signUp",r,o+" has signed up successfully"),e(r))})})):Promise.reject("Password cannot be empty"):Promise.reject("Username cannot be empty")},e.prototype.confirmSignUp=function(e,t,n){if(!this.userPool)return Promise.reject("No userPool");if(!e)return Promise.reject("Username cannot be empty");if(!t)return Promise.reject("Code cannot be empty");var r=this.createCognitoUser(e),i=!n||"boolean"!=typeof n.forceAliasCreation||n.forceAliasCreation;return new Promise(function(e,n){r.confirmRegistration(t,i,function(t,r){t?n(t):e(r)})})},e.prototype.resendSignUp=function(e){if(!this.userPool)return Promise.reject("No userPool");if(!e)return Promise.reject("Username cannot be empty");var t=this.createCognitoUser(e);return new Promise(function(e,n){t.resendConfirmationCode(function(t,r){t?n(t):e(r)})})},e.prototype.signIn=function(e,t){if(!this.userPool)return Promise.reject("No userPool");var n=null,r=null,i={};if("string"==typeof e)n=e,r=t;else{if(!s.isUsernamePasswordOpts(e))return Promise.reject(new Error("The username should either be a string or one of the sign in types"));void 0!==t&&d.warn("The password should be defined under the first parameter object!"),n=e.username,r=e.password,i=e.validationData}if(!n)return Promise.reject("Username cannot be empty");var o=new c.AuthenticationDetails({Username:n,Password:r,ValidationData:i});return r?this.signInWithPassword(o):this.signInWithoutPassword(o)},e.prototype.authCallbacks=function(e,t,n){var r=this,a=this;return{onSuccess:function(s){return i(r,void 0,void 0,function(){var r,i,c,l;return o(this,function(o){switch(o.label){case 0:d.debug(s),delete e.challengeName,delete e.challengeParam,o.label=1;case 1:return o.trys.push([1,4,5,9]),[4,u.Credentials.clear()];case 2:return o.sent(),[4,u.Credentials.set(s,"session")];case 3:return r=o.sent(),d.debug("succeed to get cognito credentials",r),[3,9];case 4:return i=o.sent(),d.debug("cannot get cognito credentials",i),[3,9];case 5:return o.trys.push([5,7,,8]),[4,this.currentUserPoolUser()];case 6:return c=o.sent(),a.user=c,m("signIn",c,"A user "+e.getUsername()+" has been signed in"),t(c),[3,8];case 7:return l=o.sent(),d.error("Failed to get the signed in user",l),n(l),[3,8];case 8:return[7];case 9:return[2]}})})},onFailure:function(t){d.debug("signIn failure",t),m("signIn_failure",t,e.getUsername()+" failed to signin"),n(t)},customChallenge:function(n){d.debug("signIn custom challenge answer required"),e.challengeName="CUSTOM_CHALLENGE",e.challengeParam=n,t(e)},mfaRequired:function(n,r){d.debug("signIn MFA required"),e.challengeName=n,e.challengeParam=r,t(e)},mfaSetup:function(n,r){d.debug("signIn mfa setup",n),e.challengeName=n,e.challengeParam=r,t(e)},newPasswordRequired:function(n,r){d.debug("signIn new password"),e.challengeName="NEW_PASSWORD_REQUIRED",e.challengeParam={userAttributes:n,requiredAttributes:r},t(e)},totpRequired:function(n,r){d.debug("signIn totpRequired"),e.challengeName=n,e.challengeParam=r,t(e)},selectMFAType:function(n,r){d.debug("signIn selectMFAType",n),e.challengeName=n,e.challengeParam=r,t(e)}}},e.prototype.signInWithPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return new Promise(function(r,i){n.authenticateUser(e,t.authCallbacks(n,r,i))})},e.prototype.signInWithoutPassword=function(e){var t=this,n=this.createCognitoUser(e.getUsername());return n.setAuthenticationFlowType("CUSTOM_AUTH"),new Promise(function(r,i){n.initiateAuth(e,t.authCallbacks(n,r,i))})},e.prototype.getMFAOptions=function(e){return new Promise(function(t,n){e.getMFAOptions(function(e,r){if(e)return d.debug("get MFA Options failed",e),void n(e);d.debug("get MFA options success",r),t(r)})})},e.prototype.getPreferredMFA=function(e,t){var n=this;return new Promise(function(r,i){var o=!!t&&t.bypassCache;e.getUserData(function(e,t){if(e)return d.debug("getting preferred mfa failed",e),void i(e);var o=n._getMfaTypeFromUserData(t);return o?void r(o):void i("invalid MFA Type")},{bypassCache:o})})},e.prototype._getMfaTypeFromUserData=function(e){var t=null,n=e.PreferredMfaSetting;if(n)t=n;else{var r=e.UserMFASettingList;r?0===r.length?t="NOMFA":d.debug("invalid case for getPreferredMFA",e):t=e.MFAOptions?"SMS_MFA":"NOMFA"}return t},e.prototype._getUserData=function(e,t){return new Promise(function(n,r){e.getUserData(function(e,t){return e?(d.debug("getting user data failed",e),void r(e)):void n(t)},t)})},e.prototype.setPreferredMFA=function(e,t){return i(this,void 0,void 0,function(){var n,r,i,a,s,u,c;return o(this,function(o){switch(o.label){case 0:return[4,this._getUserData(e,{bypassCache:!0})];case 1:switch(n=o.sent(),r=null,i=null,a=t){case"TOTP":return[3,2];case"SMS":return[3,3];case"NOMFA":return[3,4]}return[3,6];case 2:return i={PreferredMfa:!0,Enabled:!0},[3,7];case 3:return r={PreferredMfa:!0,Enabled:!0},[3,7];case 4:return s=n.UserMFASettingList,[4,this._getMfaTypeFromUserData(n)];case 5:if("NOMFA"===(u=o.sent()))return[2,Promise.resolve("No change for mfa type")];if("SMS_MFA"===u)r={PreferredMfa:!1,Enabled:!1};else{if("SOFTWARE_TOKEN_MFA"!==u)return[2,Promise.reject("invalid MFA type")];i={PreferredMfa:!1,Enabled:!1}}return s&&0!==s.length&&s.forEach(function(e){"SMS_MFA"===e?r={PreferredMfa:!1,Enabled:!1}:"SOFTWARE_TOKEN_MFA"===e&&(i={PreferredMfa:!1,Enabled:!1})}),[3,7];case 6:return d.debug("no validmfa method provided"),[2,Promise.reject("no validmfa method provided")];case 7:return c=this,[2,new Promise(function(t,n){e.setUserMfaPreference(r,i,function(r,i){if(r)return d.debug("Set user mfa preference error",r),n(r);d.debug("Set user mfa success",i),d.debug("Caching the latest user data into local"),e.getUserData(function(e,r){return e?(d.debug("getting user data failed",e),n(e)):t(i)},{bypassCache:!0})})})]}})})},e.prototype.disableSMS=function(e){return new Promise(function(t,n){e.disableMFA(function(e,r){if(e)return d.debug("disable mfa failed",e),void n(e);d.debug("disable mfa succeed",r),t(r)})})},e.prototype.enableSMS=function(e){return new Promise(function(t,n){e.enableMFA(function(e,r){if(e)return d.debug("enable mfa failed",e),void n(e);d.debug("enable mfa succeed",r),t(r)})})},e.prototype.setupTOTP=function(e){return new Promise(function(t,n){e.associateSoftwareToken({onFailure:function(e){d.debug("associateSoftwareToken failed",e),n(e)},associateSecretCode:function(e){d.debug("associateSoftwareToken sucess",e),t(e)}})})},e.prototype.verifyTotpToken=function(e,t){return d.debug("verfication totp token",e,t),new Promise(function(n,r){e.verifySoftwareToken(t,"My TOTP device",{onFailure:function(e){d.debug("verifyTotpToken failed",e),r(e)},onSuccess:function(e){d.debug("verifyTotpToken success",e),n(e)}})})},e.prototype.confirmSignIn=function(e,t,n){var r=this;if(!t)return Promise.reject("Code cannot be empty");var a=this;return new Promise(function(s,c){e.sendMFACode(t,{onSuccess:function(t){return i(r,void 0,void 0,function(){var n,r;return o(this,function(i){switch(i.label){case 0:d.debug(t),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,u.Credentials.clear()];case 2:return i.sent(),[4,u.Credentials.set(t,"session")];case 3:return n=i.sent(),d.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=i.sent(),d.debug("cannot get cognito credentials",r),[3,6];case 5:return a.user=e,m("signIn",e,e+" has signed in"),s(e),[7];case 6:return[2]}})})},onFailure:function(e){d.debug("confirm signIn failure",e),c(e)}},n)})},e.prototype.completeNewPassword=function(e,t,n){var r=this;if(!t)return Promise.reject("Password cannot be empty");var a=this;return new Promise(function(s,c){e.completeNewPasswordChallenge(t,n,{onSuccess:function(t){return i(r,void 0,void 0,function(){var n,r;return o(this,function(i){switch(i.label){case 0:d.debug(t),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,u.Credentials.clear()];case 2:return i.sent(),[4,u.Credentials.set(t,"session")];case 3:return n=i.sent(),d.debug("succeed to get cognito credentials",n),[3,6];case 4:return r=i.sent(),d.debug("cannot get cognito credentials",r),[3,6];case 5:return a.user=e,m("signIn",e,e+" has signed in"),s(e),[7];case 6:return[2]}})})},onFailure:function(e){d.debug("completeNewPassword failure",e),m("completeNewPassword_failure",e,r.user+" failed to complete the new password flow"),c(e)},mfaRequired:function(t,n){d.debug("signIn MFA required"),e.challengeName=t,e.challengeParam=n,s(e)},mfaSetup:function(t,n){d.debug("signIn mfa setup",t),e.challengeName=t,e.challengeParam=n,s(e)}})})},e.prototype.sendCustomChallengeAnswer=function(e,t){var n=this;return this.userPool?t?new Promise(function(r,i){e.sendCustomChallengeAnswer(t,n.authCallbacks(e,r,i))}):Promise.reject("Challenge response cannot be empty"):Promise.reject("No userPool")},e.prototype.updateUserAttributes=function(e,t){var n=[],r=this;return new Promise(function(i,o){r.userSession(e).then(function(r){for(var a in t)if("sub"!==a&&a.indexOf("_verified")<0){var s={Name:a,Value:t[a]};n.push(s)}e.updateAttributes(n,function(e,t){return e?o(e):i(t)})})})},e.prototype.userAttributes=function(e){var t=this;return new Promise(function(n,r){t.userSession(e).then(function(t){e.getUserAttributes(function(e,t){e?r(e):n(t)})})})},e.prototype.verifiedContact=function(e){var t=this;return this.userAttributes(e).then(function(e){var n=t.attributesToObject(e),r={},i={};return n.email&&(n.email_verified?i.email=n.email:r.email=n.email),n.phone_number&&(n.phone_number_verified?i.phone_number=n.phone_number:r.phone_number=n.phone_number),{verified:i,unverified:r}})},e.prototype.currentUserPoolUser=function(e){var t=this;if(!this.userPool)return Promise.reject("No userPool");var n=this;return new Promise(function(r,i){t._storageSync.then(function(){var t=n.userPool.getCurrentUser();if(!t)return d.debug("Failed to get user from user pool"),void i("No current user");t.getSession(function(o,a){if(o)return d.debug("Failed to get the user session",o),void i(o);var s=!!e&&e.bypassCache,u=a.getAccessToken().decodePayload().scope;if(!(void 0===u?"":u).split(" ").includes("aws.cognito.signin.user.admin"))return d.debug("Unable to get the user data because the aws.cognito.signin.user.admin is not in the scopes of the access token"),r(t);t.getUserData(function(e,o){if(e)return d.debug("getting user data failed",e),void("User is disabled"===e.message||"User does not exist."===e.message?i(e):r(t));for(var a=o.PreferredMfaSetting||"NOMFA",s=[],u=0;u<o.UserAttributes.length;u++){var l={Name:o.UserAttributes[u].Name,Value:o.UserAttributes[u].Value},p=new c.CognitoUserAttribute(l);s.push(p)}var f=n.attributesToObject(s);return Object.assign(t,{attributes:f,preferredMFA:a}),r(t)},{bypassCache:s})})}).catch(function(e){return d.debug("Failed to sync cache info into memory",e),i(e)})})},e.prototype.currentAuthenticatedUser=function(e){return i(this,void 0,void 0,function(){var t,n,r,i;return o(this,function(o){switch(o.label){case 0:d.debug("getting current authenticted 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 n=o.sent(),d.debug("Failed to sync cache info into memory",n),n;case 4:try{t=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo")).user}catch(e){d.debug("cannot load federated user from auth storage")}return t?(this.user=t,d.debug("get current authenticated federated user",this.user),[2,this.user]):[3,5];case 5:d.debug("get current authenticated userpool user"),r=null,o.label=6;case 6:return o.trys.push([6,8,,9]),[4,this.currentUserPoolUser(e)];case 7:return r=o.sent(),[3,9];case 8:throw i=o.sent(),"No userPool"===i&&d.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"),d.debug("The user is not authenticated by the error",i),"not authenticated";case 9:return this.user=r,[2,this.user]}})})},e.prototype.currentSession=function(){var e=this;return d.debug("Getting current session"),this.userPool?new Promise(function(t,n){e.currentUserPoolUser().then(function(r){e.userSession(r).then(function(e){t(e)}).catch(function(e){d.debug("Failed to get the current session",e),n(e)})}).catch(function(e){d.debug("Failed to get the current user",e),n(e)})}):Promise.reject("No userPool")},e.prototype.userSession=function(e){return e?new Promise(function(t,n){d.debug("Getting the session from this user:",e),e.getSession(function(r,i){return r?(d.debug("Failed to get the session from user",e),void n(r)):(d.debug("Succeed to get the user session",i),void t(i))})}):(d.debug("the user is null"),Promise.reject("Failed to get the session because the user is empty"))},e.prototype.currentUserCredentials=function(){return i(this,void 0,void 0,function(){var e,t,n;return o(this,function(r){switch(r.label){case 0:e=this,d.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 t=r.sent(),d.debug("Failed to sync cache info into memory",t),t;case 4:n=null;try{n=JSON.parse(this._storage.getItem("aws-amplify-federatedInfo"))}catch(e){d.debug("failed to get or parse item aws-amplify-federatedInfo",e)}return n?[2,u.Credentials.refreshFederatedToken(n)]:[2,this.currentSession().then(function(e){return d.debug("getting session success",e),u.Credentials.set(e,"session")}).catch(function(e){return d.debug("getting session failed",e),u.Credentials.set(null,"guest")})]}})})},e.prototype.currentCredentials=function(){return d.debug("getting current credntials"),u.Credentials.get()},e.prototype.verifyUserAttribute=function(e,t){return new Promise(function(n,r){e.getAttributeVerificationCode(t,{onSuccess:function(){return n()},onFailure:function(e){return r(e)}})})},e.prototype.verifyUserAttributeSubmit=function(e,t,n){return n?new Promise(function(r,i){e.verifyAttribute(t,n,{onSuccess:function(e){r(e)},onFailure:function(e){i(e)}})}):Promise.reject("Code cannot be empty")},e.prototype.verifyCurrentUserAttribute=function(e){var t=this;return t.currentUserPoolUser().then(function(n){return t.verifyUserAttribute(n,e)})},e.prototype.verifyCurrentUserAttributeSubmit=function(e,t){var n=this;return n.currentUserPoolUser().then(function(r){return n.verifyUserAttributeSubmit(r,e,t)})},e.prototype.cognitoIdentitySignOut=function(e,t){return i(this,void 0,void 0,function(){var n,r,i=this;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this._storageSync];case 1:return o.sent(),[3,3];case 2:throw n=o.sent(),d.debug("Failed to sync cache info into memory",n),n;case 3:return r=this._oAuthHandler&&"true"===this._storage.getItem("amplify-signin-with-hostedUI"),[2,new Promise(function(n,o){if(!e||!e.global)return d.debug("user sign out",t),t.signOut(),r?i._oAuthHandler.signOut().then(function(){return n()}):n();d.debug("user global sign out",t),t.getSession(function(e,a){if(e)return d.debug("failed to get the user session",e),o(e);t.globalSignOut({onSuccess:function(e){return d.debug("global sign out success"),r?i._oAuthHandler.signOut().then(function(){return n()}):n()},onFailure:function(e){return d.debug("global sign out failed",e),o(e)}})})})]}})})},e.prototype.signOut=function(e){return i(this,void 0,void 0,function(){var t,n;return o(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 t=r.sent(),d.debug("failed to clear cached items"),[3,3];case 3:return this.userPool?(n=this.userPool.getCurrentUser(),n?[4,this.cognitoIdentitySignOut(e,n)]:[3,5]):[3,7];case 4:return r.sent(),[3,6];case 5:d.debug("no current Cognito user"),r.label=6;case 6:return[3,8];case 7:d.debug("no Congito User pool"),r.label=8;case 8:return m("signOut",this.user,"A user has been signed out"),this.user=null,[2]}})})},e.prototype.cleanCachedItems=function(){return i(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,u.Credentials.clear()];case 1:return e.sent(),[2]}})})},e.prototype.changePassword=function(e,t,n){var r=this;return new Promise(function(i,o){r.userSession(e).then(function(r){e.changePassword(t,n,function(e,t){return e?(d.debug("change password failure",e),o(e)):i(t)})})})},e.prototype.forgotPassword=function(e){if(!this.userPool)return Promise.reject("No userPool");if(!e)return Promise.reject("Username cannot be empty");var t=this.createCognitoUser(e);return new Promise(function(e,n){t.forgotPassword({onSuccess:function(){e()},onFailure:function(e){d.debug("forgot password failure",e),n(e)},inputVerificationCode:function(t){e(t)}})})},e.prototype.forgotPasswordSubmit=function(e,t,n){if(!this.userPool)return Promise.reject("No userPool");if(!e)return Promise.reject("Username cannot be empty");if(!t)return Promise.reject("Code cannot be empty");if(!n)return Promise.reject("Password cannot be empty");var r=this.createCognitoUser(e);return new Promise(function(e,i){r.confirmPassword(t,n,{onSuccess:function(){e()},onFailure:function(e){i(e)}})})},e.prototype.currentUserInfo=function(){return i(this,void 0,void 0,function(){var e,t,n,r,i,a,s,c,t;return o(this,function(o){switch(o.label){case 0:return e=u.Credentials.getCredSource(),e&&"aws"!==e&&"userPool"!==e?[3,9]:[4,this.currentUserPoolUser().catch(function(e){return d.debug(e)})];case 1:if(!(t=o.sent()))return[2,null];o.label=2;case 2:return o.trys.push([2,8,,9]),[4,this.userAttributes(t)];case 3:n=o.sent(),r=this.attributesToObject(n),i=null,o.label=4;case 4:return o.trys.push([4,6,,7]),[4,this.currentCredentials()];case 5:return i=o.sent(),[3,7];case 6:return a=o.sent(),d.debug("Failed to retrieve credentials while getting current user info",a),[3,7];case 7:return s={id:i?i.identityId:void 0,username:t.getUsername(),attributes:r},[2,s];case 8:return c=o.sent(),d.debug("currentUserInfo error",c),[2,{}];case 9:return"federated"===e?(t=this.user,[2,t||{}]):[2]}})})},e.prototype.federatedSignIn=function(e,t,n){return i(this,void 0,void 0,function(){var r,i,c,l,i,p,f,h,y,g,v,b;return o(this,function(o){switch(o.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 s.isFederatedSignInOptions(e)||s.isFederatedSignInOptionsCustom(e)||void 0===e?(r=e||{provider:a.Cognito},i=s.isFederatedSignInOptions(r)?r.provider:r.customProvider,this._config.userPoolId&&(c=s.isCognitoHostedOpts(this._config.oauth)?this._config.userPoolWebClientId:this._config.oauth.clientID,l=s.isCognitoHostedOpts(this._config.oauth)?this._config.oauth.redirectSignIn:this._config.oauth.redirectUri,this._oAuthHandler.oauthSignIn(this._config.oauth.responseType,this._config.oauth.domain,l,c,i)),[3,8]):[3,1];case 1:i=e,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.currentAuthenticatedUser()];case 3:return p=o.sent(),d.warn("There is already a signed in user: "+p+" in your app.\n                You should not call Auth.federatedSignIn method again as it may cause unexpected behavior."),[3,5];case 4:return f=o.sent(),[3,5];case 5:return h=t.token,y=t.identity_id,g=t.expires_at,[4,u.Credentials.set({provider:i,token:h,identity_id:y,user:n,expires_at:g},"federation")];case 6:return v=o.sent(),[4,this.currentAuthenticatedUser()];case 7:return b=o.sent(),m("signIn",b,"A user "+b.username+" has been signed in"),d.debug("federated sign in credentials",v),[2,v];case 8:return[2]}})})},e.prototype._handleAuthResponse=function(e){return i(this,void 0,void 0,function(){var t,n,r,i,a,s,p,f,h,y,g;return o(this,function(o){switch(o.label){case 0:if(!this._config.userPoolId)throw new Error("OAuth responses require a User Pool defined in config");if(t=e||(u.JS.browserOrNode().isBrowser?window.location.href:null),n=!!(l.parse(t).query||"").split("&").map(function(e){return e.split("=")}).find(function(e){var t=e[0];return"code"===t||"error"===t}),r=!!(l.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}),!n&&!r)return[3,6];o.label=1;case 1:return o.trys.push([1,5,,6]),[4,this._oAuthHandler.handleAuthResponse(t)];case 2:return i=o.sent(),a=i.accessToken,s=i.idToken,p=i.refreshToken,f=new c.CognitoUserSession({IdToken:new c.CognitoIdToken({IdToken:s}),RefreshToken:new c.CognitoRefreshToken({RefreshToken:p}),AccessToken:new c.CognitoAccessToken({AccessToken:a})}),h=void 0,this._config.identityPoolId?[4,u.Credentials.set(f,"session")]:[3,4];case 3:h=o.sent(),d.debug("AWS credentials",h),o.label=4;case 4:return y=this.createCognitoUser(f.getIdToken().decodePayload()["cognito:username"]),m("signIn",y,"A user "+y.getUsername()+" has been signed in"),m("cognitoHostedUI",y,"A user "+y.getUsername()+" has been signed in via Cognito Hosted UI"),y.setSignInUserSession(f),window&&void 0!==window.history&&window.history.replaceState({},null,this._config.oauth.redirectSignIn),[2,h];case 5:throw g=o.sent(),d.debug("Error in cognito hosted auth response",g),m("signIn_failure",g,"The OAuth response flow failed"),m("cognitoHostedUI_failure",g,"A failure occurred when returning to the Cognito Hosted UI"),g;case 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 n=this._config.authenticationFlowType,r=new c.CognitoUser(t);return n&&r.setAuthenticationFlowType(n),r},e.prototype._isValidAuthStorage=function(e){return!!e&&"function"==typeof e.getItem&&"function"==typeof e.setItem&&"function"==typeof e.removeItem&&"function"==typeof e.clear},e}();t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(98))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});/*!
   * Copyright 2016 Amazon.com,
   * Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Amazon Software License (the "License").
   * You may not use this file except in compliance with the
   * License. A copy of the License is located at
   *
   *     http://aws.amazon.com/asl/
   *
   * or in the "license" file accompanying this file. This file is
   * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   * CONDITIONS OF ANY KIND, express or implied. See the License
   * for the specific language governing permissions and
   * limitations under the License.
   */
  var i=function(){function e(t){r(this,e);var n=t||{},i=n.ValidationData,o=n.Username,a=n.Password,s=n.AuthParameters;this.validationData=i||{},this.authParameters=s||{},this.username=o,this.password=a}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}();t.default=i},function(e,t,n){!function(r,i){e.exports=t=function(e){!function(){var t=e,n=t.lib,r=n.Base,i=t.enc,o=i.Utf8;t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),a=this._iKey=t.clone(),s=i.words,u=a.words,c=0;c<n;c++)s[c]^=1549556828,u[c]^=909522486;i.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}()}(n(23))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=n(293),a=r(o),s=n(108),u=r(s),c=n(113),l=r(c),p=function(){function e(t){i(this,e);var n=t||{},r=n.UserPoolId,o=n.ClientId,s=n.endpoint,u=n.AdvancedSecurityDataCollectionFlag;if(!r||!o)throw new Error("Both UserPoolId and ClientId are required.");if(!/^[\w-]+_.+$/.test(r))throw new Error("Invalid UserPoolId format.");var c=r.split("_")[0];this.userPoolId=r,this.clientId=o,this.client=new a.default(c,s),this.advancedSecurityDataCollectionFlag=!1!==u,this.storage=t.Storage||(new l.default).getStorage()}return e.prototype.getUserPoolId=function(){return this.userPoolId},e.prototype.getClientId=function(){return this.clientId},e.prototype.signUp=function(e,t,n,r,i){var o=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,function(t,n){if(t)return i(t,null);var r={Username:e,Pool:o,Storage:o.storage},a={user:new u.default(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,a)})},e.prototype.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new u.default(n)}return null},e.prototype.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}();t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(294),o=function(e){return e&&e.__esModule?e:{default:e}}(i),a=function(){function e(t,n){r(this,e),this.endpoint=n||"https://cognito-idp."+t+".amazonaws.com/",this.userAgent=o.default.prototype.userAgent||"aws-amplify/0.1.x js"}return e.prototype.request=function(e,t,n){var r={"Content-Type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityProviderService."+e,"X-Amz-User-Agent":this.userAgent},i={headers:r,method:"POST",mode:"cors",cache:"no-cache",body:JSON.stringify(t)},o=void 0,a=void 0;fetch(this.endpoint,i).then(function(e){return o=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(o.ok)return n(null,e);a=e;var t=(e.__type||e.code).split("#").pop(),r={code:t,name:t,message:e.message||e.Message||null};return n(r)}).catch(function(e){if(!(o&&o.headers&&o.headers.get("x-amzn-errortype"))){if(e instanceof Error&&"Network error"===e.message){var t={code:"NetworkError",name:e.name,message:e.message};return n(t)}return n(e)}try{var r=o.headers.get("x-amzn-errortype").split(":")[0],i={code:r,name:r,statusCode:o.status,message:o.status?o.status.toString():null};return n(i)}catch(t){return n(e)}})},e}();t.default=a},function(e,t,n){"use strict";function r(){}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.prototype.userAgent="aws-amplify/0.1.x js"},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=n(296),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(i),a=function(){function e(t){if(r(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 o.set(e,t,{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure}),o.get(e)},e.prototype.getItem=function(e){return o.get(e)},e.prototype.removeItem=function(e){return o.remove(e,{path:this.path,domain:this.domain,secure:this.secure})},e.prototype.clear=function(){var e=o.get(),t=void 0;for(t=0;t<e.length;++t)o.remove(e[t]);return{}},e}();t.default=a},function(e,t,n){var r,i;!function(o){if(r=o,void 0!==(i="function"==typeof r?r.call(t,n,t,e):r)&&(e.exports=i),!0,e.exports=o(),!!0){var a=window.Cookies,s=window.Cookies=o();s.noConflict=function(){return window.Cookies=a,s}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(n){function r(t,i,o){var a;if("undefined"!=typeof document){if(arguments.length>1){if(o=e({path:"/"},r.defaults,o),"number"==typeof o.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*o.expires),o.expires=s}o.expires=o.expires?o.expires.toUTCString():"";try{a=JSON.stringify(i),/^[\{\[]/.test(a)&&(i=a)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).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)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape);var u="";for(var c in o)o[c]&&(u+="; "+c,!0!==o[c]&&(u+="="+o[c]));return document.cookie=t+"="+i+u}t||(a={});for(var l=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,f=0;f<l.length;f++){var d=l[f].split("="),h=d.slice(1).join("=");this.json||'"'!==h.charAt(0)||(h=h.slice(1,-1));try{var m=d[0].replace(p,decodeURIComponent);if(h=n.read?n.read(h,m):n(h,m)||h.replace(p,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===m){a=h;break}t||(a[m]=h)}catch(e){}}return a}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}return t(function(){})})},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(31),s=n(298),u=n(299),c=n(98),l=n(1),p=n(59),f=n(109),d="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",h=function(e,t,n){l.Hub.dispatch("auth",{event:e,data:t,message:n},"Auth",d)},m=new l.ConsoleLogger("OAuth"),y=function(){function e(e){var t=e.config,n=e.cognitoClientId,r=e.scopes,i=void 0===r?[]:r;this._urlOpener=t.urlOpener||s.launchUri,this._config=t,this._cognitoClientId=n,this._scopes=i}return e.prototype.oauthSignIn=function(e,t,n,i,o){void 0===e&&(e="code"),void 0===o&&(o=c.CognitoHostedUIIdentityProvider.Cognito);var a=this._generateState(32);u.setState(a);var s=this._generateRandom(128);u.setPKCE(s);var l=this._generateChallenge(s),p=Object.entries(r({redirect_uri:n,response_type:e,client_id:i,identity_provider:o,scopes:this._scopes,state:a},"code"===e?{code_challenge:l}:{},"code"===e?{code_challenge_method:"S256"}:{})).map(function(e){var t=e[0],n=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(n)}).join("&"),f="https://"+t+"/oauth2/authorize?"+p;m.debug("Redirecting to "+f),this._urlOpener(f,n)},e.prototype._handleCodeFlow=function(e){return i(this,void 0,void 0,function(){var t,n,i,s,l,p,f,d,y,g,v,b;return o(this,function(o){switch(o.label){case 0:return(t=(a.parse(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n,i=t[0],o=t[1];return r({},e,(n={},n[i]=o,n))},{code:void 0}).code)?(n="https://"+this._config.domain+"/oauth2/token",h("codeFlow",{},"Retrieving tokens from "+n),i=c.isCognitoHostedOpts(this._config)?this._cognitoClientId:this._config.clientID,s=c.isCognitoHostedOpts(this._config)?this._config.redirectSignIn:this._config.redirectUri,l=u.getPKCE(),p=r({grant_type:"authorization_code",code:t,client_id:i,redirect_uri:s},l?{code_verifier:l}:{}),m.debug("Calling token endpoint: "+n+" with",p),f=Object.entries(p).map(function(e){var t=e[0],n=e[1];return encodeURIComponent(t)+"="+encodeURIComponent(n)}).join("&"),[4,fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"undefined"!=typeof URLSearchParams?new URLSearchParams(f):f})]):[2];case 1:return[4,o.sent().json()];case 2:if(d=o.sent(),y=d.access_token,g=d.refresh_token,v=d.id_token,b=d.error)throw new Error(b);return[2,{accessToken:y,refreshToken:g,idToken:v}]}})})},e.prototype._handleImplicitFlow=function(e){return i(this,void 0,void 0,function(){var t,n,i;return o(this,function(o){return t=a.parse(e).hash.substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n,i=t[0],o=t[1];return r({},e,(n={},n[i]=o,n))},{id_token:void 0,access_token:void 0}),n=t.id_token,i=t.access_token,h("implicitFlow",{},"Got tokens from "+e),m.debug("Retrieving implicit tokens from "+e+" with"),[2,{accessToken:i,idToken:n,refreshToken:null}]})})},e.prototype.handleAuthResponse=function(e){return i(this,void 0,void 0,function(){var t,n,i;return o(this,function(o){if(t=e?r({},(a.parse(e).hash||"#").substr(1).split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n=t[0],r=t[1];return e[n]=r,e},{}),(a.parse(e).query||"").split("&").map(function(e){return e.split("=")}).reduce(function(e,t){var n=t[0],r=t[1];return e[n]=r,e},{})):{},n=t.error,i=t.error_description,n)throw new Error(i);return this._validateState(t),m.debug("Starting "+this._config.responseType+" flow with "+e),"code"===this._config.responseType?[2,this._handleCodeFlow(e)]:[2,this._handleImplicitFlow(e)]})})},e.prototype._validateState=function(e){if(e){var t=u.getState(),n=e.state;if(t&&t!==n)throw new Error("Invalid state in OAuth flow")}},e.prototype.signOut=function(){return i(this,void 0,void 0,function(){var e,t,n;return o(this,function(r){return e="https://"+this._config.domain+"/logout?",t=c.isCognitoHostedOpts(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=c.isCognitoHostedOpts(this._config)?this._config.redirectSignOut:this._config.returnTo,e+=Object.entries({client_id:t,logout_uri:encodeURIComponent(n)}).map(function(e){return e[0]+"="+e[1]}).join("&"),h("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+e),m.debug("Signing out from "+e),this._urlOpener(e),[2]})})},e.prototype._generateState=function(e){for(var t="",n=e,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)t+=r[Math.round(Math.random()*(r.length-1))];return t},e.prototype._generateChallenge=function(e){return this._base64URL(p(e))},e.prototype._base64URL=function(e){return e.toString(f).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},e.prototype._generateRandom=function(e){var t=new Uint8Array(e);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(t);else for(var n=0;n<e;n+=1)t[n]=Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~".length|0;return this._bufferToString(t)},e.prototype._bufferToString=function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=0;r<e.byteLength;r+=1){var i=e[r]%t.length;n.push(t[i])}return n.join("")},e}();t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchUri=function(e){return window.open(e,"_self")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setState=function(e){window.sessionStorage.setItem("oauth_state",e)},t.getState=function(){var e=window.sessionStorage.getItem("oauth_state");return window.sessionStorage.removeItem("oauth_state"),e},t.setPKCE=function(e){window.sessionStorage.setItem("ouath_pkce_key",e)},t.getPKCE=function(){var e=window.sessionStorage.getItem("ouath_pkce_key");return window.sessionStorage.removeItem("ouath_pkce_key"),e},t.clearAll=function(){window.sessionStorage.removeItem("ouath_pkce_key"),window.sessionStorage.removeItem("oauth_state")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);t.default=function(e){if(r.JS.browserOrNode().isBrowser&&window.location)e({url:window.location.href});else if(!r.JS.browserOrNode().isNode)throw new Error("Not supported")}},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(302);t.StorageClass=i.default;var o=n(1),a=new o.ConsoleLogger("Storage"),s=null;if(!s){a.debug("Create Storage Instance"),s=new i.default,s.vault=new i.default;var u=s.configure;s.configure=function(e){a.debug("storage configure called");var t=r({},u.call(s,e));Object.keys(t).forEach(function(e){"string"!=typeof t[e]&&(t[e]=r({},t[e],{level:"private"}))}),a.debug("storage vault configure called"),s.vault.configure(t)}}var c=s;o.default.register(c),t.default=c,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(309))},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(114),u=new a.ConsoleLogger("StorageClass"),c=function(){function e(){this._config={},this._pluggables=[],u.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return e.prototype.getModuleName=function(){return"Storage"},e.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory())return this._pluggables.push(e),e.configure(this._config[e.getProviderName()])},e.prototype.getPluggable=function(e){var t=this._pluggables.find(function(t){return t.getProviderName()===e});return void 0===t?(u.debug("No plugin found with providerName",e),null):t},e.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter(function(t){return t.getProviderName()!==e})},e.prototype.configure=function(e){var t=this;if(u.debug("configure Storage"),!e)return this._config;var n=a.Parser.parseMobilehubConfig(e),i=n.Storage,o=i.bucket,c=i.region,l=i.level,p=i.track,f=i.customPrefix;return(o||c||l||p||f)&&!n.Storage.AWSS3&&(n.Storage.AWSS3={}),o&&(n.Storage.AWSS3.bucket=o,delete n.Storage.bucket),c&&(n.Storage.AWSS3.region=c,delete n.Storage.region),l&&(n.Storage.AWSS3.level=l,delete n.Storage.level),p&&(n.Storage.AWSS3.track=p,delete n.Storage.track),f&&(n.Storage.AWSS3.customPrefix=f,delete n.Storage.customPrefix),Object.keys(n.Storage).forEach(function(e){"string"!=typeof n.Storage[e]&&(t._config[e]=r({},t._config[e],n.Storage[e]))}),this._pluggables.forEach(function(e){e.configure(t._config[e.getProviderName()])}),0===this._pluggables.length&&this.addPluggable(new s.default),this._config},e.prototype.get=function(e,t){return i(this,void 0,void 0,function(){var n,r,i;return o(this,function(o){return n=(t||{}).provider,r=void 0===n?"AWSS3":n,i=this._pluggables.find(function(e){return e.getProviderName()===r}),void 0===i&&(u.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.get(e,t)]})})},e.prototype.put=function(e,t,n){return i(this,void 0,void 0,function(){var r,i,a;return o(this,function(o){return r=(n||{}).provider,i=void 0===r?"AWSS3":r,a=this._pluggables.find(function(e){return e.getProviderName()===i}),void 0===a&&(u.debug("No plugin found with providerName",i),Promise.reject("No plugin found in Storage for the provider")),[2,a.put(e,t,n)]})})},e.prototype.remove=function(e,t){return i(this,void 0,void 0,function(){var n,r,i;return o(this,function(o){return n=(t||{}).provider,r=void 0===n?"AWSS3":n,i=this._pluggables.find(function(e){return e.getProviderName()===r}),void 0===i&&(u.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.remove(e,t)]})})},e.prototype.list=function(e,t){return i(this,void 0,void 0,function(){var n,r,i;return o(this,function(o){return n=(t||{}).provider,r=void 0===n?"AWSS3":n,i=this._pluggables.find(function(e){return e.getProviderName()===r}),void 0===i&&(u.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.list(e,t)]})})},e}();t.default=c},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.s3={},r.S3=i.defineService("s3",["2006-03-01"]),n(304),Object.defineProperty(o.services.s3,"2006-03-01",{get:function(){var e=n(306);return e.paginators=n(307).pagination,e.waiters=n(308).waiters,e},enumerable:!0,configurable:!0}),e.exports=r.S3},function(e,t,n){var r=n(0),i=n(86);n(305);var o={completeMultipartUpload:!0,copyObject:!0,uploadPartCopy:!0},a=["AuthorizationHeaderMalformed","BadRequest","PermanentRedirect",301];r.util.update(r.S3.prototype,{getSignatureVersion:function(e){var t=this.api.signatureVersion,n=this._originalConfig?this._originalConfig.signatureVersion:null,r=this.config.signatureVersion,i=!!e&&e.isPresigned();return n?n="v2"===n?"s3":n:(!0!==i?t="v4":r&&(t=r),t)},getSignerClass:function(e){var t=this.getSignatureVersion(e);return r.Signers.RequestSigner.getVersion(t)},validateService:function(){var e,t=[];if(this.config.region||(this.config.region="us-east-1"),!this.config.endpoint&&this.config.s3BucketEndpoint&&t.push("An endpoint must be provided when configuring `s3BucketEndpoint` to true."),1===t.length?e=t[0]:t.length>1&&(e="Multiple configuration errors:\n"+t.join("\n")),e)throw r.util.error(new Error,{name:"InvalidEndpoint",message:e})},shouldDisableBodySigning:function(e){var t=this.getSignerClass();return!0===this.config.s3DisableBodySigning&&t===r.Signers.V4&&"https:"===e.httpRequest.endpoint.protocol},setupRequestListeners:function(e){e.addListener("validate",this.validateScheme),e.addListener("validate",this.validateBucketEndpoint),e.addListener("validate",this.correctBucketRegionFromCache),e.addListener("validate",this.validateBucketName,!0),e.addListener("build",this.addContentType),e.addListener("build",this.populateURI),e.addListener("build",this.computeContentMd5),e.addListener("build",this.computeSseCustomerKeyMd5),e.addListener("afterBuild",this.addExpect100Continue),e.removeListener("validate",r.EventListeners.Core.VALIDATE_REGION),e.addListener("extractError",this.extractError),e.onAsync("extractError",this.requestBucketRegion),e.addListener("extractData",this.extractData),e.addListener("extractData",r.util.hoistPayloadMember),e.addListener("beforePresign",this.prepareSignedUrl),r.util.isBrowser()&&e.onAsync("retry",this.reqRegionForNetworkingError),this.shouldDisableBodySigning(e)&&(e.removeListener("afterBuild",r.EventListeners.Core.COMPUTE_SHA256),e.addListener("afterBuild",this.disableBodySigning))},validateScheme:function(e){var t=e.params,n=e.httpRequest.endpoint.protocol;if((t.SSECustomerKey||t.CopySourceSSECustomerKey)&&"https:"!==n)throw r.util.error(new Error,{code:"ConfigError",message:"Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration"})},validateBucketEndpoint:function(e){if(!e.params.Bucket&&e.service.config.s3BucketEndpoint)throw r.util.error(new Error,{code:"ConfigError",message:"Cannot send requests to root API with `s3BucketEndpoint` set."})},validateBucketName:function(e){var t=e.service,n=t.getSignatureVersion(e),i=e.params&&e.params.Bucket,o=e.params&&e.params.Key,a=i&&i.indexOf("/");if(i&&a>=0)if("string"==typeof o&&a>0){e.params=r.util.copy(e.params);var s=i.substr(a+1)||"";e.params.Key=s+"/"+o,e.params.Bucket=i.substr(0,a)}else if("v4"===n){var u="Bucket names cannot contain forward slashes. Bucket: "+i;throw r.util.error(new Error,{code:"InvalidBucket",message:u})}},isValidAccelerateOperation:function(e){return-1===["createBucket","deleteBucket","listBuckets"].indexOf(e)},populateURI:function(e){var t=e.httpRequest,n=e.params.Bucket,r=e.service,i=t.endpoint;if(n&&!r.pathStyleBucketName(n)){r.config.useAccelerateEndpoint&&r.isValidAccelerateOperation(e.operation)?r.config.useDualstack?i.hostname=n+".s3-accelerate.dualstack.amazonaws.com":i.hostname=n+".s3-accelerate.amazonaws.com":r.config.s3BucketEndpoint||(i.hostname=n+"."+i.hostname);var o=i.port;i.host=80!==o&&443!==o?i.hostname+":"+i.port:i.hostname,t.virtualHostedBucket=n,r.removeVirtualHostedBucketFromPath(e)}},removeVirtualHostedBucketFromPath:function(e){var t=e.httpRequest,n=t.virtualHostedBucket;if(n&&t.path){if(e.params&&e.params.Key){var i="/"+r.util.uriEscapePath(e.params.Key);if(0===t.path.indexOf(i)&&(t.path.length===i.length||"?"===t.path[i.length]))return}t.path=t.path.replace(new RegExp("/"+n),""),"/"!==t.path[0]&&(t.path="/"+t.path)}},addExpect100Continue:function(e){var t=e.httpRequest.headers["Content-Length"];r.util.isNode()&&(t>=1048576||e.params.Body instanceof r.util.stream.Stream)&&(e.httpRequest.headers.Expect="100-continue")},addContentType:function(e){var t=e.httpRequest;if("GET"===t.method||"HEAD"===t.method)return void delete t.headers["Content-Type"];t.headers["Content-Type"]||(t.headers["Content-Type"]="application/octet-stream");var n=t.headers["Content-Type"];if(r.util.isBrowser())if("string"!=typeof t.body||n.match(/;\s*charset=/)){var i=function(e,t,n){return t+n.toUpperCase()};t.headers["Content-Type"]=n.replace(/(;\s*charset=)(.+)$/,i)}else t.headers["Content-Type"]+="; charset=UTF-8"},computableChecksumOperations:{putBucketCors:!0,putBucketLifecycle:!0,putBucketLifecycleConfiguration:!0,putBucketTagging:!0,deleteObjects:!0,putBucketReplication:!0,putObjectLegalHold:!0,putObjectRetention:!0,putObjectLockConfiguration:!0},willComputeChecksums:function(e){if(this.computableChecksumOperations[e.operation])return!0;if(!this.config.computeChecksums)return!1;if(!r.util.Buffer.isBuffer(e.httpRequest.body)&&"string"!=typeof e.httpRequest.body)return!1;var t=e.service.api.operations[e.operation].input.members;return!(!e.service.shouldDisableBodySigning(e)||Object.prototype.hasOwnProperty.call(e.httpRequest.headers,"presigned-expires")||!t.ContentMD5||e.params.ContentMD5)||!(e.service.getSignerClass(e)===r.Signers.V4&&t.ContentMD5&&!t.ContentMD5.required)&&(!(!t.ContentMD5||e.params.ContentMD5)||void 0)},computeContentMd5:function(e){if(e.service.willComputeChecksums(e)){var t=r.util.crypto.md5(e.httpRequest.body,"base64");e.httpRequest.headers["Content-MD5"]=t}},computeSseCustomerKeyMd5:function(e){var t={SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"};r.util.each(t,function(t,n){if(e.params[t]){var i=r.util.crypto.md5(e.params[t],"base64");e.httpRequest.headers[n]=i}})},pathStyleBucketName:function(e){return!(!this.config.s3ForcePathStyle&&(this.config.s3BucketEndpoint||this.dnsCompatibleBucketName(e)&&(!this.config.sslEnabled||!e.match(/\./))))},dnsCompatibleBucketName:function(e){var t=e,n=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),r=new RegExp(/(\d+\.){3}\d+/),i=new RegExp(/\.\./);return!(!t.match(n)||t.match(r)||t.match(i))},successfulResponse:function(e){var t=e.request,n=e.httpResponse;return(!o[t.operation]||!n.body.toString().match("<Error>"))&&n.statusCode<300},retryableError:function(e,t){return!(!o[t.operation]||200!==e.statusCode)||(!t._requestRegionForBucket||!t.service.bucketRegionCache[t._requestRegionForBucket])&&(!(!e||"RequestTimeout"!==e.code)||(e&&-1!=a.indexOf(e.code)&&e.region&&e.region!=t.httpRequest.region?(t.httpRequest.region=e.region,301===e.statusCode&&t.service.updateReqBucketRegion(t),!0):r.Service.prototype.retryableError.call(this,e,t)))},updateReqBucketRegion:function(e,t){var n=e.httpRequest;if("string"==typeof t&&t.length&&(n.region=t),n.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)){var i=e.service,o=i.config,a=o.s3BucketEndpoint;a&&delete o.s3BucketEndpoint;var s=r.util.copy(o);delete s.endpoint,s.region=n.region,n.endpoint=new r.S3(s).endpoint,i.populateURI(e),o.s3BucketEndpoint=a,n.headers.Host=n.endpoint.host,"validate"===e._asm.currentState&&(e.removeListener("build",i.populateURI),e.addListener("build",i.removeVirtualHostedBucketFromPath))}},extractData:function(e){var t=e.request;if("getBucketLocation"===t.operation){var n=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,e.data.LocationConstraint=n?n[1]:""}var r=t.params.Bucket||null;if("deleteBucket"!==t.operation||"string"!=typeof r||e.error){var i=e.httpResponse.headers||{},o=i["x-amz-bucket-region"]||null;if(!o&&"createBucket"===t.operation&&!e.error){var a=t.params.CreateBucketConfiguration;o=a?"EU"===a.LocationConstraint?"eu-west-1":a.LocationConstraint:"us-east-1"}o&&r&&o!==t.service.bucketRegionCache[r]&&(t.service.bucketRegionCache[r]=o)}else t.service.clearBucketRegionCache(r);t.service.extractRequestIds(e)},extractError:function(e){var t={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},n=e.request,i=e.httpResponse.statusCode,o=e.httpResponse.body||"",a=e.httpResponse.headers||{},s=a["x-amz-bucket-region"]||null,u=n.params.Bucket||null,c=n.service.bucketRegionCache;s&&u&&s!==c[u]&&(c[u]=s);var l;if(t[i]&&0===o.length)u&&!s&&(l=c[u]||null)!==n.httpRequest.region&&(s=l),e.error=r.util.error(new Error,{code:t[i],message:null,region:s});else{var p=(new r.XML.Parser).parse(o.toString());p.Region&&!s?(s=p.Region,u&&s!==c[u]&&(c[u]=s)):!u||s||p.Region||(l=c[u]||null)!==n.httpRequest.region&&(s=l),e.error=r.util.error(new Error,{code:p.Code||i,message:p.Message||null,region:s})}n.service.extractRequestIds(e)},requestBucketRegion:function(e,t){var n=e.error,i=e.request,o=i.params.Bucket||null;if(!n||!o||n.region||"listObjects"===i.operation||r.util.isNode()&&"headBucket"===i.operation||400===n.statusCode&&"headObject"!==i.operation||-1===a.indexOf(n.code))return t();var s=r.util.isNode()?"headBucket":"listObjects",u={Bucket:o};"listObjects"===s&&(u.MaxKeys=0);var c=i.service[s](u);c._requestRegionForBucket=o,c.send(function(){var e=i.service.bucketRegionCache[o]||null;n.region=e,t()})},reqRegionForNetworkingError:function(e,t){if(!r.util.isBrowser())return t();var n=e.error,i=e.request,o=i.params.Bucket;if(!n||"NetworkingError"!==n.code||!o||"us-east-1"===i.httpRequest.region)return t();var a=i.service,s=a.bucketRegionCache,u=s[o]||null;if(u&&u!==i.httpRequest.region)a.updateReqBucketRegion(i,u),t();else if(a.dnsCompatibleBucketName(o))if(i.httpRequest.virtualHostedBucket){var c=a.listObjects({Bucket:o,MaxKeys:0});a.updateReqBucketRegion(c,"us-east-1"),c._requestRegionForBucket=o,c.send(function(){var e=a.bucketRegionCache[o]||null;e&&e!==i.httpRequest.region&&a.updateReqBucketRegion(i,e),t()})}else t();else a.updateReqBucketRegion(i,"us-east-1"),"us-east-1"!==s[o]&&(s[o]="us-east-1"),t()},bucketRegionCache:{},clearBucketRegionCache:function(e){var t=this.bucketRegionCache;e?"string"==typeof e&&(e=[e]):e=Object.keys(t);for(var n=0;n<e.length;n++)delete t[e[n]];return t},correctBucketRegionFromCache:function(e){var t=e.params.Bucket||null;if(t){var n=e.service,r=e.httpRequest.region,i=n.bucketRegionCache[t];i&&i!==r&&n.updateReqBucketRegion(e,i)}},extractRequestIds:function(e){var t=e.httpResponse.headers?e.httpResponse.headers["x-amz-id-2"]:null,n=e.httpResponse.headers?e.httpResponse.headers["x-amz-cf-id"]:null;e.extendedRequestId=t,e.cfId=n,e.error&&(e.error.requestId=e.requestId||null,e.error.extendedRequestId=t,e.error.cfId=n)},getSignedUrl:function(e,t,n){t=r.util.copy(t||{});var i=t.Expires||900;if("number"!=typeof i)throw r.util.error(new Error,{code:"InvalidParameterException",message:"The expiration must be a number, received "+typeof i});delete t.Expires;var o=this.makeRequest(e,t);if(!n)return o.presign(i,n);r.util.defer(function(){o.presign(i,n)})},createPresignedPost:function(e,t){function n(){return{url:r.util.urlFormat(u),fields:a.preparePostFields(s.credentials,s.region,o,e.Fields,e.Conditions,e.Expires)}}"function"==typeof e&&void 0===t&&(t=e,e=null),e=r.util.copy(e||{});var i=this.config.params||{},o=e.Bucket||i.Bucket,a=this,s=this.config,u=r.util.copy(this.endpoint);if(s.s3BucketEndpoint||(u.pathname="/"+o),!t)return n();s.getCredentials(function(e){e&&t(e),t(null,n())})},preparePostFields:function(e,t,n,o,a,s){var u=this.getSkewCorrectedDate();if(!e||!t||!n)throw new Error("Unable to create a POST object policy without a bucket, region, and credentials");o=r.util.copy(o||{}),a=(a||[]).slice(0),s=s||3600;var c=r.util.date.iso8601(u).replace(/[:\-]|\.\d{3}/g,""),l=c.substr(0,8),p=i.createScope(l,t,"s3"),f=e.accessKeyId+"/"+p;o.bucket=n,o["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",o["X-Amz-Credential"]=f,o["X-Amz-Date"]=c,e.sessionToken&&(o["X-Amz-Security-Token"]=e.sessionToken);for(var d in o)if(o.hasOwnProperty(d)){var h={};h[d]=o[d],a.push(h)}return o.Policy=this.preparePostPolicy(new Date(u.valueOf()+1e3*s),a),o["X-Amz-Signature"]=r.util.crypto.hmac(i.getSigningKey(e,l,t,"s3",!0),o.Policy,"hex"),o},preparePostPolicy:function(e,t){return r.util.base64.encode(JSON.stringify({expiration:r.util.date.iso8601(e),conditions:t}))},prepareSignedUrl:function(e){e.addListener("validate",e.service.noPresignedContentLength),e.removeListener("build",e.service.addContentType),e.params.Body?e.addListener("afterBuild",r.EventListeners.Core.COMPUTE_SHA256):e.removeListener("build",e.service.computeContentMd5)},disableBodySigning:function(e){var t=e.httpRequest.headers;Object.prototype.hasOwnProperty.call(t,"presigned-expires")||(t["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD")},noPresignedContentLength:function(e){if(void 0!==e.params.ContentLength)throw r.util.error(new Error,{code:"UnexpectedParameter",message:"ContentLength is not supported in pre-signed URLs."})},createBucket:function(e,t){return"function"!=typeof e&&e||(t=t||e,e={}),this.endpoint.hostname===this.api.globalEndpoint||e.CreateBucketConfiguration||(e.CreateBucketConfiguration={LocationConstraint:this.config.region}),this.makeRequest("createBucket",e,t)},upload:function(e,t,n){"function"==typeof t&&void 0===n&&(n=t,t=null),t=t||{},t=r.util.merge(t||{},{service:this,params:e});var i=new r.S3.ManagedUpload(t);return"function"==typeof n&&i.send(n),i}})},function(e,t,n){var r=n(0),i=r.util.string.byteLength,o=r.util.Buffer;r.S3.ManagedUpload=r.util.inherit({constructor:function(e){var t=this;r.SequentialExecutor.call(t),t.body=null,t.sliceFn=null,t.callback=null,t.parts={},t.completeInfo=[],t.fillQueue=function(){t.callback(new Error("Unsupported body payload "+typeof t.body))},t.configure(e)},configure:function(e){if(e=e||{},this.partSize=this.minPartSize,e.queueSize&&(this.queueSize=e.queueSize),e.partSize&&(this.partSize=e.partSize),e.leavePartsOnError&&(this.leavePartsOnError=!0),e.tags){if(!Array.isArray(e.tags))throw new Error("Tags must be specified as an array; "+typeof e.tags+" provided.");this.tags=e.tags}if(this.partSize<this.minPartSize)throw new Error("partSize must be greater than "+this.minPartSize);this.service=e.service,this.bindServiceObject(e.params),this.validateBody(),this.adjustTotalBytes()},leavePartsOnError:!1,queueSize:4,partSize:null,minPartSize:5242880,maxTotalParts:1e4,send:function(e){var t=this;t.failed=!1,t.callback=e||function(e){if(e)throw e};var n=!0;if(t.sliceFn)t.fillQueue=t.fillBuffer;else if(r.util.isNode()){var i=r.util.stream.Stream;t.body instanceof i&&(n=!1,t.fillQueue=t.fillStream,t.partBuffers=[],t.body.on("error",function(e){t.cleanup(e)}).on("readable",function(){t.fillQueue()}).on("end",function(){t.isDoneChunking=!0,t.numParts=t.totalPartNumbers,t.fillQueue.call(t),t.isDoneChunking&&t.totalPartNumbers>=1&&t.doneParts===t.numParts&&t.finishMultiPart()}))}n&&t.fillQueue.call(t)},abort:function(){var e=this;!0===e.isDoneChunking&&1===e.totalPartNumbers&&e.singlePart?e.singlePart.abort():e.cleanup(r.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1}))},validateBody:function(){var e=this;if(e.body=e.service.config.params.Body,"string"==typeof e.body)e.body=r.util.buffer.toBuffer(e.body);else if(!e.body)throw new Error("params.Body is required");e.sliceFn=r.util.arraySliceFn(e.body)},bindServiceObject:function(e){e=e||{};var t=this;if(t.service){var n=t.service,i=r.util.copy(n.config);i.signatureVersion=n.getSignatureVersion(),t.service=new n.constructor.__super__(i),t.service.config.params=r.util.merge(t.service.config.params||{},e)}else t.service=new r.S3({params:e})},adjustTotalBytes:function(){var e=this;try{e.totalBytes=i(e.body)}catch(e){}if(e.totalBytes){var t=Math.ceil(e.totalBytes/e.maxTotalParts);t>e.partSize&&(e.partSize=t)}else e.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var e=this,t=i(e.body);if(0===t)return e.isDoneChunking=!0,e.numParts=1,void e.nextChunk(e.body);for(;e.activeParts<e.queueSize&&e.partPos<t;){var n=Math.min(e.partPos+e.partSize,t),r=e.sliceFn.call(e.body,e.partPos,n);e.partPos+=e.partSize,(i(r)<e.partSize||e.partPos===t)&&(e.isDoneChunking=!0,e.numParts=e.totalPartNumbers+1),e.nextChunk(r)}},fillStream:function(){var e=this;if(!(e.activeParts>=e.queueSize)){var t=e.body.read(e.partSize-e.partBufferLength)||e.body.read();if(t&&(e.partBuffers.push(t),e.partBufferLength+=t.length,e.totalChunkedBytes+=t.length),e.partBufferLength>=e.partSize){var n=1===e.partBuffers.length?e.partBuffers[0]:o.concat(e.partBuffers);if(e.partBuffers=[],e.partBufferLength=0,n.length>e.partSize){var r=n.slice(e.partSize);e.partBuffers.push(r),e.partBufferLength+=r.length,n=n.slice(0,e.partSize)}e.nextChunk(n)}e.isDoneChunking&&!e.isDoneSending&&(n=1===e.partBuffers.length?e.partBuffers[0]:o.concat(e.partBuffers),e.partBuffers=[],e.partBufferLength=0,e.totalBytes=e.totalChunkedBytes,e.isDoneSending=!0,(0===e.numParts||n.length>0)&&(e.numParts++,e.nextChunk(n))),e.body.read(0)}},nextChunk:function(e){var t=this;if(t.failed)return null;var n=++t.totalPartNumbers;if(t.isDoneChunking&&1===n){var i={Body:e};this.tags&&(i.Tagging=this.getTaggingHeader());var o=t.service.putObject(i);return o._managedUpload=t,o.on("httpUploadProgress",t.progress).send(t.finishSinglePart),t.singlePart=o,null}if(t.service.config.params.ContentMD5){var a=r.util.error(new Error("The Content-MD5 you specified is invalid for multi-part uploads."),{code:"InvalidDigest",retryable:!1});return t.cleanup(a),null}if(t.completeInfo[n]&&null!==t.completeInfo[n].ETag)return null;t.activeParts++,t.service.config.params.UploadId?t.uploadPart(e,n):t.multipartReq?t.queueChunks(e,n):(t.multipartReq=t.service.createMultipartUpload(),t.multipartReq.on("success",function(e){t.service.config.params.UploadId=e.data.UploadId,t.multipartReq=null}),t.queueChunks(e,n),t.multipartReq.on("error",function(e){t.cleanup(e)}),t.multipartReq.send())},getTaggingHeader:function(){for(var e=[],t=0;t<this.tags.length;t++)e.push(r.util.uriEscape(this.tags[t].Key)+"="+r.util.uriEscape(this.tags[t].Value));return e.join("&")},uploadPart:function(e,t){var n=this,i={Body:e,ContentLength:r.util.string.byteLength(e),PartNumber:t},o={ETag:null,PartNumber:t};n.completeInfo[t]=o;var a=n.service.uploadPart(i);n.parts[t]=a,a._lastUploadedBytes=0,a._managedUpload=n,a.on("httpUploadProgress",n.progress),a.send(function(e,a){if(delete n.parts[i.PartNumber],n.activeParts--,!(e||a&&a.ETag)){var s="No access to ETag property on response.";r.util.isBrowser()&&(s+=" Check CORS configuration to expose ETag header."),e=r.util.error(new Error(s),{code:"ETagMissing",retryable:!1})}return e?n.cleanup(e):n.completeInfo[t]&&null!==n.completeInfo[t].ETag?null:(o.ETag=a.ETag,n.doneParts++,void(n.isDoneChunking&&n.doneParts===n.numParts?n.finishMultiPart():n.fillQueue.call(n)))})},queueChunks:function(e,t){var n=this;n.multipartReq.on("success",function(){n.uploadPart(e,t)})},cleanup:function(e){var t=this;t.failed||("function"==typeof t.body.removeAllListeners&&"function"==typeof t.body.resume&&(t.body.removeAllListeners("readable"),t.body.removeAllListeners("end"),t.body.resume()),t.multipartReq&&(t.multipartReq.removeAllListeners("success"),t.multipartReq.removeAllListeners("error"),t.multipartReq.removeAllListeners("complete"),delete t.multipartReq),t.service.config.params.UploadId&&!t.leavePartsOnError?t.service.abortMultipartUpload().send():t.leavePartsOnError&&(t.isDoneChunking=!1),r.util.each(t.parts,function(e,t){t.removeAllListeners("complete"),t.abort()}),t.activeParts=0,t.partPos=0,t.numParts=0,t.totalPartNumbers=0,t.parts={},t.failed=!0,t.callback(e))},finishMultiPart:function(){var e=this,t={MultipartUpload:{Parts:e.completeInfo.slice(1)}};e.service.completeMultipartUpload(t,function(t,n){if(t)return e.cleanup(t);if(n&&"string"==typeof n.Location&&(n.Location=n.Location.replace(/%2F/g,"/")),Array.isArray(e.tags)){for(var r=0;r<e.tags.length;r++)e.tags[r].Value=String(e.tags[r].Value);e.service.putObjectTagging({Tagging:{TagSet:e.tags}},function(t,r){t?e.callback(t):e.callback(t,n)})}else e.callback(t,n)})},finishSinglePart:function(e,t){var n=this.request._managedUpload,r=this.request.httpRequest,i=r.endpoint;if(e)return n.callback(e);t.Location=[i.protocol,"//",i.host,r.path].join(""),t.key=this.request.params.Key,t.Key=this.request.params.Key,t.Bucket=this.request.params.Bucket,n.callback(e,t)},progress:function(e){var t=this._managedUpload;"putObject"===this.operation?(e.part=1,e.key=this.params.Key):(t.totalUploadedBytes+=e.loaded-this._lastUploadedBytes,this._lastUploadedBytes=e.loaded,e={loaded:t.totalUploadedBytes,total:t.totalBytes,part:this.params.PartNumber,key:this.params.Key}),t.emit("httpUploadProgress",[e])}}),r.util.mixin(r.S3.ManagedUpload,r.SequentialExecutor),r.S3.ManagedUpload.addPromisesToClass=function(e){this.prototype.promise=r.util.promisifyMethod("send",e)},r.S3.ManagedUpload.deletePromisesFromClass=function(){delete this.prototype.promise},r.util.addPromises(r.S3.ManagedUpload),e.exports=r.S3.ManagedUpload},function(e,t){e.exports={version:"2.0",metadata:{apiVersion:"2006-03-01",checksumFormat:"md5",endpointPrefix:"s3",globalEndpoint:"s3.amazonaws.com",protocol:"rest-xml",serviceAbbreviation:"Amazon S3",serviceFullName:"Amazon Simple Storage Service",serviceId:"S3",signatureVersion:"s3",uid:"s3-2006-03-01"},operations:{AbortMultipartUpload:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}",responseCode:204},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CompleteMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MultipartUpload:{locationName:"CompleteMultipartUpload",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{ETag:{},PartNumber:{type:"integer"}}},flattened:!0}}},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"MultipartUpload"},output:{type:"structure",members:{Location:{},Bucket:{},Key:{},Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CopyObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},MetadataDirective:{location:"header",locationName:"x-amz-metadata-directive"},TaggingDirective:{location:"header",locationName:"x-amz-tagging-directive"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1c",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1g",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}}},output:{type:"structure",members:{CopyObjectResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},Expiration:{location:"header",locationName:"x-amz-expiration"},CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},VersionId:{location:"header",locationName:"x-amz-version-id"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyObjectResult"},alias:"PutObjectCopy"},CreateBucket:{http:{method:"PUT",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CreateBucketConfiguration:{locationName:"CreateBucketConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LocationConstraint:{}}},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},ObjectLockEnabledForBucket:{location:"header",locationName:"x-amz-bucket-object-lock-enabled",type:"boolean"}},payload:"CreateBucketConfiguration"},output:{type:"structure",members:{Location:{location:"header",locationName:"Location"}}},alias:"PutBucket"},CreateMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}?uploads"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1g",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{locationName:"Bucket"},Key:{},UploadId:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},alias:"InitiateMultipartUpload"},DeleteBucket:{http:{method:"DELETE",requestUri:"/{Bucket}",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketAnalyticsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?analytics",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketCors:{http:{method:"DELETE",requestUri:"/{Bucket}?cors",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketEncryption:{http:{method:"DELETE",requestUri:"/{Bucket}?encryption",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketInventoryConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?inventory",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketLifecycle:{http:{method:"DELETE",requestUri:"/{Bucket}?lifecycle",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketMetricsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?metrics",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketPolicy:{http:{method:"DELETE",requestUri:"/{Bucket}?policy",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketReplication:{http:{method:"DELETE",requestUri:"/{Bucket}?replication",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketTagging:{http:{method:"DELETE",requestUri:"/{Bucket}?tagging",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteBucketWebsite:{http:{method:"DELETE",requestUri:"/{Bucket}?website",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},DeleteObject:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}",responseCode:204},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MFA:{location:"header",locationName:"x-amz-mfa"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},VersionId:{location:"header",locationName:"x-amz-version-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},DeleteObjectTagging:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}?tagging",responseCode:204},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"}}},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}}},DeleteObjects:{http:{requestUri:"/{Bucket}?delete"},input:{type:"structure",required:["Bucket","Delete"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delete:{locationName:"Delete",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Objects"],members:{Objects:{locationName:"Object",type:"list",member:{type:"structure",required:["Key"],members:{Key:{},VersionId:{}}},flattened:!0},Quiet:{type:"boolean"}}},MFA:{location:"header",locationName:"x-amz-mfa"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"}},payload:"Delete"},output:{type:"structure",members:{Deleted:{type:"list",member:{type:"structure",members:{Key:{},VersionId:{},DeleteMarker:{type:"boolean"},DeleteMarkerVersionId:{}}},flattened:!0},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},Errors:{locationName:"Error",type:"list",member:{type:"structure",members:{Key:{},VersionId:{},Code:{},Message:{}}},flattened:!0}}},alias:"DeleteMultipleObjects"},DeletePublicAccessBlock:{http:{method:"DELETE",requestUri:"/{Bucket}?publicAccessBlock",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},GetBucketAccelerateConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Status:{}}}},GetBucketAcl:{http:{method:"GET",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Owner:{shape:"S31"},Grants:{shape:"S34",locationName:"AccessControlList"}}}},GetBucketAnalyticsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{AnalyticsConfiguration:{shape:"S3d"}},payload:"AnalyticsConfiguration"}},GetBucketCors:{http:{method:"GET",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{CORSRules:{shape:"S3t",locationName:"CORSRule"}}}},GetBucketEncryption:{http:{method:"GET",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{ServerSideEncryptionConfiguration:{shape:"S46"}},payload:"ServerSideEncryptionConfiguration"}},GetBucketInventoryConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{InventoryConfiguration:{shape:"S4c"}},payload:"InventoryConfiguration"}},GetBucketLifecycle:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Rules:{shape:"S4s",locationName:"Rule"}}},deprecated:!0},GetBucketLifecycleConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Rules:{shape:"S57",locationName:"Rule"}}}},GetBucketLocation:{http:{method:"GET",requestUri:"/{Bucket}?location"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{LocationConstraint:{}}}},GetBucketLogging:{http:{method:"GET",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{LoggingEnabled:{shape:"S5h"}}}},GetBucketMetricsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{MetricsConfiguration:{shape:"S5p"}},payload:"MetricsConfiguration"}},GetBucketNotification:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S5s"},output:{shape:"S5t"},deprecated:!0},GetBucketNotificationConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S5s"},output:{shape:"S64"}},GetBucketPolicy:{http:{method:"GET",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Policy:{}},payload:"Policy"}},GetBucketPolicyStatus:{http:{method:"GET",requestUri:"/{Bucket}?policyStatus"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{PolicyStatus:{type:"structure",members:{IsPublic:{locationName:"IsPublic",type:"boolean"}}}},payload:"PolicyStatus"}},GetBucketReplication:{http:{method:"GET",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{ReplicationConfiguration:{shape:"S6r"}},payload:"ReplicationConfiguration"}},GetBucketRequestPayment:{http:{method:"GET",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Payer:{}}}},GetBucketTagging:{http:{method:"GET",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3j"}}}},GetBucketVersioning:{http:{method:"GET",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{Status:{},MFADelete:{locationName:"MfaDelete"}}}},GetBucketWebsite:{http:{method:"GET",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{RedirectAllRequestsTo:{shape:"S7k"},IndexDocument:{shape:"S7n"},ErrorDocument:{shape:"S7p"},RoutingRules:{shape:"S7q"}}}},GetObject:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},ResponseCacheControl:{location:"querystring",locationName:"response-cache-control"},ResponseContentDisposition:{location:"querystring",locationName:"response-content-disposition"},ResponseContentEncoding:{location:"querystring",locationName:"response-content-encoding"},ResponseContentLanguage:{location:"querystring",locationName:"response-content-language"},ResponseContentType:{location:"querystring",locationName:"response-content-type"},ResponseExpires:{location:"querystring",locationName:"response-expires",type:"timestamp"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentRange:{location:"header",locationName:"Content-Range"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"},TagCount:{location:"header",locationName:"x-amz-tagging-count",type:"integer"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1g",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}},payload:"Body"}},GetObjectAcl:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{Owner:{shape:"S31"},Grants:{shape:"S34",locationName:"AccessControlList"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},GetObjectLegalHold:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?legal-hold"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{LegalHold:{shape:"S8p"}},payload:"LegalHold"}},GetObjectLockConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?object-lock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{ObjectLockConfiguration:{shape:"S8s"}},payload:"ObjectLockConfiguration"}},GetObjectRetention:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?retention"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{Retention:{shape:"S90"}},payload:"Retention"}},GetObjectTagging:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"}}},output:{type:"structure",required:["TagSet"],members:{VersionId:{location:"header",locationName:"x-amz-version-id"},TagSet:{shape:"S3j"}}}},GetObjectTorrent:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?torrent"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"Body"}},GetPublicAccessBlock:{http:{method:"GET",requestUri:"/{Bucket}?publicAccessBlock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},output:{type:"structure",members:{PublicAccessBlockConfiguration:{shape:"S97"}},payload:"PublicAccessBlockConfiguration"}},HeadBucket:{http:{method:"HEAD",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}}},HeadObject:{http:{method:"HEAD",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1g",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}}}},ListBucketAnalyticsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},AnalyticsConfigurationList:{locationName:"AnalyticsConfiguration",type:"list",member:{shape:"S3d"},flattened:!0}}}},ListBucketInventoryConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{ContinuationToken:{},InventoryConfigurationList:{locationName:"InventoryConfiguration",type:"list",member:{shape:"S4c"},flattened:!0},IsTruncated:{type:"boolean"},NextContinuationToken:{}}}},ListBucketMetricsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},MetricsConfigurationList:{locationName:"MetricsConfiguration",type:"list",member:{shape:"S5p"},flattened:!0}}}},ListBuckets:{http:{method:"GET"},output:{type:"structure",members:{Buckets:{type:"list",member:{locationName:"Bucket",type:"structure",members:{Name:{},CreationDate:{type:"timestamp"}}}},Owner:{shape:"S31"}}},alias:"GetService"},ListMultipartUploads:{http:{method:"GET",requestUri:"/{Bucket}?uploads"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxUploads:{location:"querystring",locationName:"max-uploads",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},UploadIdMarker:{location:"querystring",locationName:"upload-id-marker"}}},output:{type:"structure",members:{Bucket:{},KeyMarker:{},UploadIdMarker:{},NextKeyMarker:{},Prefix:{},Delimiter:{},NextUploadIdMarker:{},MaxUploads:{type:"integer"},IsTruncated:{type:"boolean"},Uploads:{locationName:"Upload",type:"list",member:{type:"structure",members:{UploadId:{},Key:{},Initiated:{type:"timestamp"},StorageClass:{},Owner:{shape:"S31"},Initiator:{shape:"Sa4"}}},flattened:!0},CommonPrefixes:{shape:"Sa5"},EncodingType:{}}}},ListObjectVersions:{http:{method:"GET",requestUri:"/{Bucket}?versions"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},VersionIdMarker:{location:"querystring",locationName:"version-id-marker"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},KeyMarker:{},VersionIdMarker:{},NextKeyMarker:{},NextVersionIdMarker:{},Versions:{locationName:"Version",type:"list",member:{type:"structure",members:{ETag:{},Size:{type:"integer"},StorageClass:{},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"},Owner:{shape:"S31"}}},flattened:!0},DeleteMarkers:{locationName:"DeleteMarker",type:"list",member:{type:"structure",members:{Owner:{shape:"S31"},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"}}},flattened:!0},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sa5"},EncodingType:{}}},alias:"GetBucketObjectVersions"},ListObjects:{http:{method:"GET",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},Marker:{location:"querystring",locationName:"marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Marker:{},NextMarker:{},Contents:{shape:"San"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sa5"},EncodingType:{}}},alias:"GetBucket"},ListObjectsV2:{http:{method:"GET",requestUri:"/{Bucket}?list-type=2"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},FetchOwner:{location:"querystring",locationName:"fetch-owner",type:"boolean"},StartAfter:{location:"querystring",locationName:"start-after"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Contents:{shape:"San"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sa5"},EncodingType:{},KeyCount:{type:"integer"},ContinuationToken:{},NextContinuationToken:{},StartAfter:{}}}},ListParts:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MaxParts:{location:"querystring",locationName:"max-parts",type:"integer"},PartNumberMarker:{location:"querystring",locationName:"part-number-marker",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{},Key:{},UploadId:{},PartNumberMarker:{type:"integer"},NextPartNumberMarker:{type:"integer"},MaxParts:{type:"integer"},IsTruncated:{type:"boolean"},Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{PartNumber:{type:"integer"},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"}}},flattened:!0},Initiator:{shape:"Sa4"},Owner:{shape:"S31"},StorageClass:{},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutBucketAccelerateConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket","AccelerateConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},AccelerateConfiguration:{locationName:"AccelerateConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Status:{}}}},payload:"AccelerateConfiguration"}},PutBucketAcl:{http:{method:"PUT",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sb5",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"}},payload:"AccessControlPolicy"}},PutBucketAnalyticsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id","AnalyticsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},AnalyticsConfiguration:{shape:"S3d",locationName:"AnalyticsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"AnalyticsConfiguration"}},PutBucketCors:{http:{method:"PUT",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket","CORSConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},CORSConfiguration:{locationName:"CORSConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["CORSRules"],members:{CORSRules:{shape:"S3t",locationName:"CORSRule"}}},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"CORSConfiguration"}},PutBucketEncryption:{http:{method:"PUT",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket","ServerSideEncryptionConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ServerSideEncryptionConfiguration:{shape:"S46",locationName:"ServerSideEncryptionConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"ServerSideEncryptionConfiguration"}},PutBucketInventoryConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id","InventoryConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},InventoryConfiguration:{shape:"S4c",locationName:"InventoryConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"InventoryConfiguration"}},PutBucketLifecycle:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S4s",locationName:"Rule"}}}},payload:"LifecycleConfiguration"},deprecated:!0},PutBucketLifecycleConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S57",locationName:"Rule"}}}},payload:"LifecycleConfiguration"}},PutBucketLogging:{http:{method:"PUT",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket","BucketLoggingStatus"],members:{Bucket:{location:"uri",locationName:"Bucket"},BucketLoggingStatus:{locationName:"BucketLoggingStatus",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LoggingEnabled:{shape:"S5h"}}},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"BucketLoggingStatus"}},PutBucketMetricsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id","MetricsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},MetricsConfiguration:{shape:"S5p",locationName:"MetricsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"MetricsConfiguration"}},PutBucketNotification:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},NotificationConfiguration:{shape:"S5t",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"NotificationConfiguration"},deprecated:!0},PutBucketNotificationConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},NotificationConfiguration:{shape:"S64",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"NotificationConfiguration"}},PutBucketPolicy:{http:{method:"PUT",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket","Policy"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ConfirmRemoveSelfBucketAccess:{location:"header",locationName:"x-amz-confirm-remove-self-bucket-access",type:"boolean"},Policy:{}},payload:"Policy"}},PutBucketReplication:{http:{method:"PUT",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket","ReplicationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ReplicationConfiguration:{shape:"S6r",locationName:"ReplicationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Token:{location:"header",locationName:"x-amz-bucket-object-lock-token"}},payload:"ReplicationConfiguration"}},PutBucketRequestPayment:{http:{method:"PUT",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket","RequestPaymentConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},RequestPaymentConfiguration:{locationName:"RequestPaymentConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Payer"],members:{Payer:{}}}},payload:"RequestPaymentConfiguration"}},PutBucketTagging:{http:{method:"PUT",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Sbs",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"Tagging"}},PutBucketVersioning:{http:{method:"PUT",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket","VersioningConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},MFA:{location:"header",locationName:"x-amz-mfa"},VersioningConfiguration:{locationName:"VersioningConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{MFADelete:{locationName:"MfaDelete"},Status:{}}}},payload:"VersioningConfiguration"}},PutBucketWebsite:{http:{method:"PUT",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket","WebsiteConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},WebsiteConfiguration:{locationName:"WebsiteConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{ErrorDocument:{shape:"S7p"},IndexDocument:{shape:"S7n"},RedirectAllRequestsTo:{shape:"S7k"},RoutingRules:{shape:"S7q"}}}},payload:"WebsiteConfiguration"}},PutObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S11",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1g",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}},payload:"Body"},output:{type:"structure",members:{Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{location:"header",locationName:"ETag"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectAcl:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sb5",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"}},payload:"AccessControlPolicy"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectLegalHold:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?legal-hold"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},LegalHold:{shape:"S8p",locationName:"LegalHold",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"LegalHold"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectLockConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?object-lock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ObjectLockConfiguration:{shape:"S8s",locationName:"ObjectLockConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Token:{location:"header",locationName:"x-amz-bucket-object-lock-token"},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"ObjectLockConfiguration"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectRetention:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?retention"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},Retention:{shape:"S90",locationName:"Retention",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"},ContentMD5:{location:"header",locationName:"Content-MD5"}},payload:"Retention"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectTagging:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Sbs",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"Tagging"},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}}},PutPublicAccessBlock:{http:{method:"PUT",requestUri:"/{Bucket}?publicAccessBlock"},input:{type:"structure",required:["Bucket","PublicAccessBlockConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},PublicAccessBlockConfiguration:{shape:"S97",locationName:"PublicAccessBlockConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"PublicAccessBlockConfiguration"}},RestoreObject:{http:{requestUri:"/{Bucket}/{Key+}?restore"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RestoreRequest:{locationName:"RestoreRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Days:{type:"integer"},GlacierJobParameters:{type:"structure",required:["Tier"],members:{Tier:{}}},Type:{},Tier:{},Description:{},SelectParameters:{type:"structure",required:["InputSerialization","ExpressionType","Expression","OutputSerialization"],members:{InputSerialization:{shape:"Sci"},ExpressionType:{},Expression:{},OutputSerialization:{shape:"Scx"}}},OutputLocation:{type:"structure",members:{S3:{type:"structure",required:["BucketName","Prefix"],members:{BucketName:{},Prefix:{},Encryption:{type:"structure",required:["EncryptionType"],members:{EncryptionType:{},KMSKeyId:{shape:"Sj"},KMSContext:{}}},CannedACL:{},AccessControlList:{shape:"S34"},Tagging:{shape:"Sbs"},UserMetadata:{type:"list",member:{locationName:"MetadataEntry",type:"structure",members:{Name:{},Value:{}}}},StorageClass:{}}}}}}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"RestoreRequest"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"},RestoreOutputPath:{location:"header",locationName:"x-amz-restore-output-path"}}},alias:"PostObjectRestore"},SelectObjectContent:{http:{requestUri:"/{Bucket}/{Key+}?select&select-type=2"},input:{locationName:"SelectObjectContentRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Bucket","Key","Expression","ExpressionType","InputSerialization","OutputSerialization"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},Expression:{},ExpressionType:{},RequestProgress:{type:"structure",members:{Enabled:{type:"boolean"}}},InputSerialization:{shape:"Sci"},OutputSerialization:{shape:"Scx"}}},output:{type:"structure",members:{Payload:{type:"structure",members:{Records:{type:"structure",members:{Payload:{eventpayload:!0,type:"blob"}},event:!0},Stats:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Progress:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Cont:{type:"structure",members:{},event:!0},End:{type:"structure",members:{},event:!0}},eventstream:!0}},payload:"Payload"}},UploadPart:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","PartNumber","UploadId"],members:{Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"Body"},output:{type:"structure",members:{ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},ETag:{location:"header",locationName:"ETag"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},UploadPartCopy:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key","PartNumber","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},CopySourceRange:{location:"header",locationName:"x-amz-copy-source-range"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S19",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1c",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",members:{CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},CopyPartResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sj",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyPartResult"}}},shapes:{Sj:{type:"string",sensitive:!0},S11:{type:"map",key:{},value:{}},S19:{type:"blob",sensitive:!0},S1c:{type:"blob",sensitive:!0},S1g:{type:"timestamp",timestampFormat:"iso8601"},S31:{type:"structure",members:{DisplayName:{},ID:{}}},S34:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S36"},Permission:{}}}},S36:{type:"structure",required:["Type"],members:{DisplayName:{},EmailAddress:{},ID:{},Type:{locationName:"xsi:type",xmlAttribute:!0},URI:{}},xmlNamespace:{prefix:"xsi",uri:"http://www.w3.org/2001/XMLSchema-instance"}},S3d:{type:"structure",required:["Id","StorageClassAnalysis"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3g"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3j",flattened:!0,locationName:"Tag"}}}}},StorageClassAnalysis:{type:"structure",members:{DataExport:{type:"structure",required:["OutputSchemaVersion","Destination"],members:{OutputSchemaVersion:{},Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Format","Bucket"],members:{Format:{},BucketAccountId:{},Bucket:{},Prefix:{}}}}}}}}}}},S3g:{type:"structure",required:["Key","Value"],members:{Key:{},Value:{}}},S3j:{type:"list",member:{shape:"S3g",locationName:"Tag"}},S3t:{type:"list",member:{type:"structure",required:["AllowedMethods","AllowedOrigins"],members:{AllowedHeaders:{locationName:"AllowedHeader",type:"list",member:{},flattened:!0},AllowedMethods:{locationName:"AllowedMethod",type:"list",member:{},flattened:!0},AllowedOrigins:{locationName:"AllowedOrigin",type:"list",member:{},flattened:!0},ExposeHeaders:{locationName:"ExposeHeader",type:"list",member:{},flattened:!0},MaxAgeSeconds:{type:"integer"}}},flattened:!0},S46:{type:"structure",required:["Rules"],members:{Rules:{locationName:"Rule",type:"list",member:{type:"structure",members:{ApplyServerSideEncryptionByDefault:{type:"structure",required:["SSEAlgorithm"],members:{SSEAlgorithm:{},KMSMasterKeyID:{shape:"Sj"}}}}},flattened:!0}}},S4c:{type:"structure",required:["Destination","IsEnabled","Id","IncludedObjectVersions","Schedule"],members:{Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Bucket","Format"],members:{AccountId:{},Bucket:{},Format:{},Prefix:{},Encryption:{type:"structure",members:{SSES3:{locationName:"SSE-S3",type:"structure",members:{}},SSEKMS:{locationName:"SSE-KMS",type:"structure",required:["KeyId"],members:{KeyId:{shape:"Sj"}}}}}}}}},IsEnabled:{type:"boolean"},Filter:{type:"structure",required:["Prefix"],members:{Prefix:{}}},Id:{},IncludedObjectVersions:{},OptionalFields:{type:"list",member:{locationName:"Field"}},Schedule:{type:"structure",required:["Frequency"],members:{Frequency:{}}}}},S4s:{type:"list",member:{type:"structure",required:["Prefix","Status"],members:{Expiration:{shape:"S4u"},ID:{},Prefix:{},Status:{},Transition:{shape:"S4z"},NoncurrentVersionTransition:{shape:"S51"},NoncurrentVersionExpiration:{shape:"S52"},AbortIncompleteMultipartUpload:{shape:"S53"}}},flattened:!0},S4u:{type:"structure",members:{Date:{shape:"S4v"},Days:{type:"integer"},ExpiredObjectDeleteMarker:{type:"boolean"}}},S4v:{type:"timestamp",timestampFormat:"iso8601"},S4z:{type:"structure",members:{Date:{shape:"S4v"},Days:{type:"integer"},StorageClass:{}}},S51:{type:"structure",members:{NoncurrentDays:{type:"integer"},StorageClass:{}}},S52:{type:"structure",members:{NoncurrentDays:{type:"integer"}}},S53:{type:"structure",members:{DaysAfterInitiation:{type:"integer"}}},S57:{type:"list",member:{type:"structure",required:["Status"],members:{Expiration:{shape:"S4u"},ID:{},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3g"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3j",flattened:!0,locationName:"Tag"}}}}},Status:{},Transitions:{locationName:"Transition",type:"list",member:{shape:"S4z"},flattened:!0},NoncurrentVersionTransitions:{locationName:"NoncurrentVersionTransition",type:"list",member:{shape:"S51"},flattened:!0},NoncurrentVersionExpiration:{shape:"S52"},AbortIncompleteMultipartUpload:{shape:"S53"}}},flattened:!0},S5h:{type:"structure",required:["TargetBucket","TargetPrefix"],members:{TargetBucket:{},TargetGrants:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S36"},Permission:{}}}},TargetPrefix:{}}},S5p:{type:"structure",required:["Id"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3g"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3j",flattened:!0,locationName:"Tag"}}}}}}},S5s:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"}}},S5t:{type:"structure",members:{TopicConfiguration:{type:"structure",members:{Id:{},Events:{shape:"S5w",locationName:"Event"},Event:{deprecated:!0},Topic:{}}},QueueConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S5w",locationName:"Event"},Queue:{}}},CloudFunctionConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S5w",locationName:"Event"},CloudFunction:{},InvocationRole:{}}}}},S5w:{type:"list",member:{},flattened:!0},S64:{type:"structure",members:{TopicConfigurations:{locationName:"TopicConfiguration",type:"list",member:{type:"structure",required:["TopicArn","Events"],members:{Id:{},TopicArn:{locationName:"Topic"},Events:{shape:"S5w",locationName:"Event"},Filter:{shape:"S67"}}},flattened:!0},QueueConfigurations:{locationName:"QueueConfiguration",type:"list",member:{type:"structure",required:["QueueArn","Events"],members:{Id:{},QueueArn:{locationName:"Queue"},Events:{shape:"S5w",locationName:"Event"},Filter:{shape:"S67"}}},flattened:!0},LambdaFunctionConfigurations:{locationName:"CloudFunctionConfiguration",type:"list",member:{type:"structure",required:["LambdaFunctionArn","Events"],members:{Id:{},LambdaFunctionArn:{locationName:"CloudFunction"},Events:{shape:"S5w",locationName:"Event"},Filter:{shape:"S67"}}},flattened:!0}}},S67:{type:"structure",members:{Key:{locationName:"S3Key",type:"structure",members:{FilterRules:{locationName:"FilterRule",type:"list",member:{type:"structure",members:{Name:{},Value:{}}},flattened:!0}}}}},S6r:{type:"structure",required:["Role","Rules"],members:{Role:{},Rules:{locationName:"Rule",type:"list",member:{type:"structure",required:["Status","Destination"],members:{ID:{},Priority:{type:"integer"},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3g"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3j",flattened:!0,locationName:"Tag"}}}}},Status:{},SourceSelectionCriteria:{type:"structure",members:{SseKmsEncryptedObjects:{type:"structure",required:["Status"],members:{Status:{}}}}},Destination:{type:"structure",required:["Bucket"],members:{Bucket:{},Account:{},StorageClass:{},AccessControlTranslation:{type:"structure",required:["Owner"],members:{Owner:{}}},EncryptionConfiguration:{type:"structure",members:{ReplicaKmsKeyID:{}}}}},DeleteMarkerReplication:{type:"structure",members:{Status:{}}}}},flattened:!0}}},S7k:{type:"structure",required:["HostName"],members:{HostName:{},Protocol:{}}},S7n:{type:"structure",required:["Suffix"],members:{Suffix:{}}},S7p:{type:"structure",required:["Key"],members:{Key:{}}},S7q:{type:"list",member:{locationName:"RoutingRule",type:"structure",required:["Redirect"],members:{Condition:{type:"structure",members:{HttpErrorCodeReturnedEquals:{},KeyPrefixEquals:{}}},Redirect:{type:"structure",members:{HostName:{},HttpRedirectCode:{},Protocol:{},ReplaceKeyPrefixWith:{},ReplaceKeyWith:{}}}}}},S8p:{type:"structure",members:{Status:{}}},S8s:{type:"structure",members:{ObjectLockEnabled:{},Rule:{type:"structure",members:{DefaultRetention:{type:"structure",members:{Mode:{},Days:{type:"integer"},Years:{type:"integer"}}}}}}},S90:{type:"structure",members:{Mode:{},RetainUntilDate:{shape:"S4v"}}},S97:{type:"structure",members:{BlockPublicAcls:{locationName:"BlockPublicAcls",type:"boolean"},IgnorePublicAcls:{locationName:"IgnorePublicAcls",type:"boolean"},BlockPublicPolicy:{locationName:"BlockPublicPolicy",type:"boolean"},RestrictPublicBuckets:{locationName:"RestrictPublicBuckets",type:"boolean"}}},Sa4:{type:"structure",members:{ID:{},DisplayName:{}}},Sa5:{type:"list",member:{type:"structure",members:{Prefix:{}}},flattened:!0},San:{type:"list",member:{type:"structure",members:{Key:{},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"},StorageClass:{},Owner:{shape:"S31"}}},flattened:!0},Sb5:{type:"structure",members:{Grants:{shape:"S34",locationName:"AccessControlList"},Owner:{shape:"S31"}}},Sbs:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3j"}}},Sci:{type:"structure",members:{CSV:{type:"structure",members:{FileHeaderInfo:{},Comments:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{},AllowQuotedRecordDelimiter:{type:"boolean"}}},CompressionType:{},JSON:{type:"structure",members:{Type:{}}},Parquet:{type:"structure",members:{}}}},Scx:{type:"structure",members:{CSV:{type:"structure",members:{QuoteFields:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{}}},JSON:{type:"structure",members:{RecordDelimiter:{}}}}}}}},function(e,t){e.exports={pagination:{ListBuckets:{result_key:"Buckets"},ListMultipartUploads:{input_token:["KeyMarker","UploadIdMarker"],limit_key:"MaxUploads",more_results:"IsTruncated",output_token:["NextKeyMarker","NextUploadIdMarker"],result_key:["Uploads","CommonPrefixes"]},ListObjectVersions:{input_token:["KeyMarker","VersionIdMarker"],limit_key:"MaxKeys",more_results:"IsTruncated",output_token:["NextKeyMarker","NextVersionIdMarker"],result_key:["Versions","DeleteMarkers","CommonPrefixes"]},ListObjects:{input_token:"Marker",limit_key:"MaxKeys",more_results:"IsTruncated",output_token:"NextMarker || Contents[-1].Key",result_key:["Contents","CommonPrefixes"]},ListObjectsV2:{input_token:"ContinuationToken",limit_key:"MaxKeys",output_token:"NextContinuationToken",result_key:["Contents","CommonPrefixes"]},ListParts:{input_token:"PartNumberMarker",limit_key:"MaxParts",more_results:"IsTruncated",output_token:"NextPartNumberMarker",result_key:"Parts"}}}},function(e,t){e.exports={version:2,waiters:{BucketExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:301,matcher:"status",state:"success"},{expected:403,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},BucketNotExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]},ObjectExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},ObjectNotExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(114);t.AWSS3Provider=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(311);t.APIClass=r.default,t.graphqlOperation=r.graphqlOperation;var i=n(1),o=new i.ConsoleLogger("API"),a=null;a||(o.debug("Create API Instance"),a=new r.default(null));var s=a;i.default.register(s),t.default=s},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(312),u=n(340),c=n(342),l=n(49),p=n(352),f=n(1),d=n(97),h=n(41),m=n(162),y=n(30),g=new f.ConsoleLogger("API");t.graphqlOperation=function(e,t){return void 0===t&&(t={}),{query:e,variables:t}};var v=function(){function e(e){this._api=null,this._pubSub=f.default.PubSub,this.clientIdentifier=y.v4(),this._options=e,g.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){var t=e||{},n=t.API,i=void 0===n?{}:n,o=a(t,["API"]),s=r({},o,i);if(g.debug("configure API",{opt:s}),s.aws_project_region){if(s.aws_cloud_logic_custom){var u=s.aws_cloud_logic_custom;s.endpoints="string"==typeof u?JSON.parse(u):u}s=Object.assign({},s,{region:s.aws_project_region,header:{}})}return Array.isArray(s.endpoints)||(s.endpoints=[]),s.endpoints.forEach(function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(g.warn("API "+e.name+", custom_header should be a function"),e.custom_header=void 0)}),void 0!==s.graphql_headers&&"function"!=typeof s.graphql_headers&&(g.warn("graphql_headers should be a function"),s.graphql_headers=void 0),this._options=Object.assign({},this._options,s),this.createInstance(),this._options},e.prototype.createInstance=function(){return g.debug("create API instance"),this._options?(this._api=new p.RestClient(this._options),!0):Promise.reject("API not configured")},e.prototype.get=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.get(i+t,n)]}})})},e.prototype.post=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.post(i+t,n)]}})})},e.prototype.put=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.put(i+t,n)]}})})},e.prototype.patch=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.patch(i+t,n)]}})})},e.prototype.del=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.del(i+t,n)]}})})},e.prototype.head=function(e,t,n){return i(this,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:if(this._api)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),[2,Promise.reject(r)];case 4:return i=this._api.endpoint(e),0===i.length?[2,Promise.reject("API "+e+" does not exist")]:[2,this._api.head(i+t,n)]}})})},e.prototype.endpoint=function(e){return i(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:if(this._api)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.createInstance()];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),[2,Promise.reject(t)];case 4:return[2,this._api.endpoint(e)]}})})},e.prototype._headerBasedAuth=function(e){return i(this,void 0,void 0,function(){var t,n,r,i,a,s,u,c,l;return o(this,function(o){switch(o.label){case 0:switch(t=this._options,n=t.aws_appsync_authenticationType,r=t.aws_appsync_apiKey,i=e||n||"AWS_IAM",a={},s=i){case"API_KEY":return[3,1];case"AWS_IAM":return[3,2];case"OPENID_CONNECT":return[3,4];case"AMAZON_COGNITO_USER_POOLS":return[3,6]}return[3,8];case 1:if(!r)throw new Error("No api-key configured");return a={Authorization:null,"X-Api-Key":r},[3,9];case 2:return[4,this._ensureCredentials()];case 3:if(!(u=o.sent()))throw new Error("No credentials");return[3,9];case 4:return[4,h.default.getItem("federatedInfo")];case 5:if(!(c=o.sent())||!c.token)throw new Error("No federated jwt");return a={Authorization:c.token},[3,9];case 6:return[4,d.default.currentSession()];case 7:return l=o.sent(),a={Authorization:l.getAccessToken().getJwtToken()},[3,9];case 8:return a={Authorization:null},[3,9];case 9:return[2,a]}})})},e.prototype.getGraphqlOperationType=function(e){return c.parse(e).definitions[0].operation},e.prototype.graphql=function(e){var t=e.query,n=e.variables,r=void 0===n?{}:n,i=e.authMode,o="string"==typeof t?c.parse(t):c.parse(u.print(t)),a=o.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0],s=void 0===a?{}:a,l=s.operation;switch(l){case"query":case"mutation":return this._graphql({query:o,variables:r,authMode:i});case"subscription":return this._graphqlSubscribe({query:o,variables:r,authMode:i})}throw new Error("invalid operation type: "+l)},e.prototype._graphql=function(e,t){var n=e.query,a=e.variables,c=e.authMode;return void 0===t&&(t={}),i(this,void 0,void 0,function(){var e,i,l,p,f,d,h,m,y,g,v,b,_,S,E,I,w,C,T;return o(this,function(o){switch(o.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:o.sent(),o.label=2;case 2:return e=this._options,i=e.aws_appsync_region,l=e.aws_appsync_graphqlEndpoint,p=e.graphql_headers,f=void 0===p?function(){return{}}:p,d=e.graphql_endpoint,h=e.graphql_endpoint_iam_region,y=[{}],g=!d,g?[4,this._headerBasedAuth(c)]:[3,4];case 3:g=o.sent(),o.label=4;case 4:return y=y.concat([g]),v=d,v?h?[4,this._headerBasedAuth(c)]:[3,6]:[3,8];case 5:return b=o.sent(),[3,7];case 6:b={Authorization:null},o.label=7;case 7:v=b,o.label=8;case 8:return y=y.concat([v,t]),[4,f({query:n,variables:a})];case 9:if(m=r.apply(void 0,y.concat([o.sent()])),_={query:u.print(n),variables:a},S={headers:m,body:_,signerServiceInfo:{service:d?"execute-api":"appsync",region:d?h:i}},!(E=d||l))throw I=new s.GraphQLError("No graphql endpoint provided."),{data:{},errors:[I]};o.label=10;case 10:return o.trys.push([10,12,,13]),[4,this._api.post(E,S)];case 11:return w=o.sent(),[3,13];case 12:return C=o.sent(),w={data:{},errors:[new s.GraphQLError(C.message)]},[3,13];case 13:if((T=w.errors)&&T.length)throw w;return[2,w]}})})},e.prototype._graphqlSubscribe=function(e){var t=this,n=e.query,a=e.variables,u=e.authMode;if(f.default.PubSub&&"function"==typeof f.default.PubSub.subscribe)return new l(function(e){var c=null;return function(){i(t,void 0,void 0,function(){var t,i,l,p,d,h,y,g;return o(this,function(o){switch(o.label){case 0:t=this._options.aws_appsync_authenticationType,i=u||t,l=r({},"API_KEY"===i?{"x-amz-subscriber-id":this.clientIdentifier}:{}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this._graphql({query:n,variables:a,authMode:u},l)];case 2:return p=o.sent().extensions.subscription,d=p.newSubscriptions,h=Object.getOwnPropertyNames(d).map(function(e){return d[e].topic}),y=f.default.PubSub.subscribe(h,r({},p,{provider:m.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER})),c=y.subscribe({next:function(t){return e.next(t)},complete:function(){return e.complete()},error:function(t){var n=r({},t);n.errors||(n.errors=[r({},new s.GraphQLError("Network Error"))]),e.error(n)}}),[3,4];case 3:return g=o.sent(),e.error(g),[3,4];case 4:return[2]}})})}(),function(){c&&c.unsubscribe()}});throw g.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},e.prototype._ensureCredentials=function(){return f.Credentials.get().then(function(e){if(!e)return!1;var t=f.Credentials.shear(e);return g.debug("set credentials for api",t),!0}).catch(function(e){return g.warn("ensure credentials error",e),!1})},e}();t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(313);n.d(t,"graphql",function(){return r.a}),n.d(t,"graphqlSync",function(){return r.b});var i=n(320);n.d(t,"GraphQLSchema",function(){return i.p}),n.d(t,"GraphQLScalarType",function(){return i.o}),n.d(t,"GraphQLObjectType",function(){return i.n}),n.d(t,"GraphQLInterfaceType",function(){return i.k}),n.d(t,"GraphQLUnionType",function(){return i.s}),n.d(t,"GraphQLEnumType",function(){return i.e}),n.d(t,"GraphQLInputObjectType",function(){return i.i}),n.d(t,"GraphQLList",function(){return i.l}),n.d(t,"GraphQLNonNull",function(){return i.m}),n.d(t,"GraphQLDirective",function(){return i.d}),n.d(t,"TypeKind",function(){return i.u}),n.d(t,"specifiedScalarTypes",function(){return i._23}),n.d(t,"GraphQLInt",function(){return i.j}),n.d(t,"GraphQLFloat",function(){return i.f}),n.d(t,"GraphQLString",function(){return i.r}),n.d(t,"GraphQLBoolean",function(){return i.b}),n.d(t,"GraphQLID",function(){return i.g}),n.d(t,"specifiedDirectives",function(){return i._22}),n.d(t,"GraphQLIncludeDirective",function(){return i.h}),n.d(t,"GraphQLSkipDirective",function(){return i.q}),n.d(t,"GraphQLDeprecatedDirective",function(){return i.c}),n.d(t,"DEFAULT_DEPRECATION_REASON",function(){return i.a}),n.d(t,"SchemaMetaFieldDef",function(){return i.t}),n.d(t,"TypeMetaFieldDef",function(){return i.v}),n.d(t,"TypeNameMetaFieldDef",function(){return i.w}),n.d(t,"introspectionTypes",function(){return i.Z}),n.d(t,"__Schema",function(){return i.C}),n.d(t,"__Directive",function(){return i.x}),n.d(t,"__DirectiveLocation",function(){return i.y}),n.d(t,"__Type",function(){return i.D}),n.d(t,"__Field",function(){return i.A}),n.d(t,"__InputValue",function(){return i.B}),n.d(t,"__EnumValue",function(){return i.z}),n.d(t,"__TypeKind",function(){return i.E}),n.d(t,"isSchema",function(){return i._16}),n.d(t,"isDirective",function(){return i._2}),n.d(t,"isType",function(){return i._19}),n.d(t,"isScalarType",function(){return i._15}),n.d(t,"isObjectType",function(){return i._13}),n.d(t,"isInterfaceType",function(){return i._6}),n.d(t,"isUnionType",function(){return i._20}),n.d(t,"isEnumType",function(){return i._3}),n.d(t,"isInputObjectType",function(){return i._4}),n.d(t,"isListType",function(){return i._9}),n.d(t,"isNonNullType",function(){return i._11}),n.d(t,"isInputType",function(){return i._5}),n.d(t,"isOutputType",function(){return i._14}),n.d(t,"isLeafType",function(){return i._8}),n.d(t,"isCompositeType",function(){return i._1}),n.d(t,"isAbstractType",function(){return i._0}),n.d(t,"isWrappingType",function(){return i._21}),n.d(t,"isNullableType",function(){return i._12}),n.d(t,"isNamedType",function(){return i._10}),n.d(t,"isSpecifiedScalarType",function(){return i._18}),n.d(t,"isIntrospectionType",function(){return i._7}),n.d(t,"isSpecifiedDirective",function(){return i._17}),n.d(t,"assertType",function(){return i.T}),n.d(t,"assertScalarType",function(){return i.S}),n.d(t,"assertObjectType",function(){return i.Q}),n.d(t,"assertInterfaceType",function(){return i.K}),n.d(t,"assertUnionType",function(){return i.U}),n.d(t,"assertEnumType",function(){return i.H}),n.d(t,"assertInputObjectType",function(){return i.I}),n.d(t,"assertListType",function(){return i.M}),n.d(t,"assertNonNullType",function(){return i.O}),n.d(t,"assertInputType",function(){return i.J}),n.d(t,"assertOutputType",function(){return i.R}),n.d(t,"assertLeafType",function(){return i.L}),n.d(t,"assertCompositeType",function(){return i.G}),n.d(t,"assertAbstractType",function(){return i.F}),n.d(t,"assertWrappingType",function(){return i.W}),n.d(t,"assertNullableType",function(){return i.P}),n.d(t,"assertNamedType",function(){return i.N}),n.d(t,"getNullableType",function(){return i.Y}),n.d(t,"getNamedType",function(){return i.X}),n.d(t,"validateSchema",function(){return i._24}),n.d(t,"assertValidSchema",function(){return i.V});var o=n(321);n.d(t,"Source",function(){return o.d}),n.d(t,"getLocation",function(){return o.f}),n.d(t,"parse",function(){return o.h}),n.d(t,"parseValue",function(){return o.j}),n.d(t,"parseType",function(){return o.i}),n.d(t,"print",function(){return o.k}),n.d(t,"visit",function(){return o.l}),n.d(t,"visitInParallel",function(){return o.m}),n.d(t,"visitWithTypeInfo",function(){return o.n}),n.d(t,"getVisitFn",function(){return o.g}),n.d(t,"Kind",function(){return o.c}),n.d(t,"TokenKind",function(){return o.e}),n.d(t,"DirectiveLocation",function(){return o.b}),n.d(t,"BREAK",function(){return o.a});var a=n(322);n.d(t,"execute",function(){return a.b}),n.d(t,"defaultFieldResolver",function(){return a.a}),n.d(t,"responsePathAsArray",function(){return a.d}),n.d(t,"getDirectiveValues",function(){return a.c});var s=n(323);n.d(t,"subscribe",function(){return s.b}),n.d(t,"createSourceEventStream",function(){return s.a});var u=n(326);n.d(t,"validate",function(){return u.C}),n.d(t,"ValidationContext",function(){return u.w}),n.d(t,"specifiedRules",function(){return u.B}),n.d(t,"FieldsOnCorrectTypeRule",function(){return u.a}),n.d(t,"FragmentsOnCompositeTypesRule",function(){return u.b}),n.d(t,"KnownArgumentNamesRule",function(){return u.c}),n.d(t,"KnownDirectivesRule",function(){return u.d}),n.d(t,"KnownFragmentNamesRule",function(){return u.e}),n.d(t,"KnownTypeNamesRule",function(){return u.f}),n.d(t,"LoneAnonymousOperationRule",function(){return u.g}),n.d(t,"NoFragmentCyclesRule",function(){return u.h}),n.d(t,"NoUndefinedVariablesRule",function(){return u.i}),n.d(t,"NoUnusedFragmentsRule",function(){return u.j}),n.d(t,"NoUnusedVariablesRule",function(){return u.k}),n.d(t,"OverlappingFieldsCanBeMergedRule",function(){return u.l}),n.d(t,"PossibleFragmentSpreadsRule",function(){return u.m}),n.d(t,"ProvidedNonNullArgumentsRule",function(){return u.n}),n.d(t,"ScalarLeafsRule",function(){return u.o}),n.d(t,"SingleFieldSubscriptionsRule",function(){return u.p}),n.d(t,"UniqueArgumentNamesRule",function(){return u.q}),n.d(t,"UniqueDirectivesPerLocationRule",function(){return u.r}),n.d(t,"UniqueFragmentNamesRule",function(){return u.s}),n.d(t,"UniqueInputFieldNamesRule",function(){return u.t}),n.d(t,"UniqueOperationNamesRule",function(){return u.u}),n.d(t,"UniqueVariableNamesRule",function(){return u.v}),n.d(t,"ValuesOfCorrectTypeRule",function(){return u.x}),n.d(t,"VariablesAreInputTypesRule",function(){return u.y}),n.d(t,"VariablesDefaultValueAllowedRule",function(){return u.z}),n.d(t,"VariablesInAllowedPositionRule",function(){return u.A});var c=n(2);n.d(t,"GraphQLError",function(){return c.a}),n.d(t,"formatError",function(){return c.b}),n.d(t,"printError",function(){return c.d});var l=n(327);n.d(t,"getIntrospectionQuery",function(){return l.q}),n.d(t,"introspectionQuery",function(){return l.t}),n.d(t,"getOperationAST",function(){return l.r}),n.d(t,"introspectionFromSchema",function(){return l.s}),n.d(t,"buildClientSchema",function(){return l.g}),n.d(t,"buildASTSchema",function(){return l.f}),n.d(t,"buildSchema",function(){return l.h}),n.d(t,"getDescription",function(){return l.p}),n.d(t,"extendSchema",function(){return l.l}),n.d(t,"lexicographicSortSchema",function(){return l.y}),n.d(t,"printSchema",function(){return l.A}),n.d(t,"printIntrospectionSchema",function(){return l.z}),n.d(t,"printType",function(){return l.B}),n.d(t,"typeFromAST",function(){return l.D}),n.d(t,"valueFromAST",function(){return l.E}),n.d(t,"valueFromASTUntyped",function(){return l.F}),n.d(t,"astFromValue",function(){return l.e}),n.d(t,"TypeInfo",function(){return l.c}),n.d(t,"coerceValue",function(){return l.i}),n.d(t,"isValidJSValue",function(){return l.w}),n.d(t,"isValidLiteralValue",function(){return l.x}),n.d(t,"concatAST",function(){return l.j}),n.d(t,"separateOperations",function(){return l.C}),n.d(t,"isEqualType",function(){return l.u}),n.d(t,"isTypeSubTypeOf",function(){return l.v}),n.d(t,"doTypesOverlap",function(){return l.k}),n.d(t,"assertValidName",function(){return l.d}),n.d(t,"findBreakingChanges",function(){return l.m}),n.d(t,"findDangerousChanges",function(){return l.n}),n.d(t,"BreakingChangeType",function(){return l.a}),n.d(t,"DangerousChangeType",function(){return l.b}),n.d(t,"findDeprecatedUsages",function(){return l.o})},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s){var u=arguments;return new Promise(function(c){return c(1===u.length?o(e.schema,e.source,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver):o(e,t,n,r,i,a,s))})}function i(e,t,n,r,i,a,s){var u=1===arguments.length?o(e.schema,e.source,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver):o(e,t,n,r,i,a,s);if(u.then)throw new Error("GraphQL execution failed to complete synchronously.");return u}function o(e,t,n,r,i,o,l){var p=Object(a.b)(e);if(p.length>0)return{errors:p};var f=void 0;try{f=Object(s.a)(t)}catch(e){return{errors:[e]}}var d=Object(u.b)(e,f);return d.length>0?{errors:d}:Object(c.g)(e,f,n,r,i,o,l)}t.a=r,t.b=i;var a=n(42),s=n(34),u=n(64),c=n(47)},function(e,t,n){"use strict";function r(e,t,n){return new i.a("Syntax Error: "+n,void 0,e,[t])}t.a=r;var i=n(20)},function(e,t,n){"use strict";function r(e){return e||Object(i.a)(0,"Received null or undefined error."),o({},e.extensions,{message:e.message||"An unknown error occurred.",locations:e.locations,path:e.path})}t.a=r;var i=n(9),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";function r(e){return"The "+e+" definition is not executable."}function i(e){return{Document:function(t){return t.definitions.forEach(function(t){t.kind!==a.a.OPERATION_DEFINITION&&t.kind!==a.a.FRAGMENT_DEFINITION&&e.reportError(new o.a(r(t.kind===a.a.SCHEMA_DEFINITION?"schema":t.name.value),[t]))}),!1}}}t.a=i;var o=n(2),a=n(5)},function(e,t,n){"use strict";function r(e){function t(t,r,i){n||(n=new WeakMap);var o=n.get(t),a=void 0;if(o){if(a=o.get(r)){var s=a.get(i);if(void 0!==s)return s}}else o=new WeakMap,n.set(t,o);a||(a=new WeakMap,o.set(r,a));var u=e.apply(this,arguments);return a.set(i,u),u}var n=void 0;return t}t.a=r},function(e,t,n){"use strict";function r(e){var t=Object.keys(e),n=t.map(function(t){return e[t]});return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return e[t[r]]=n,e},Object.create(null))})}t.a=r},function(e,t,n){"use strict";function r(e,t,n){return e.reduce(function(e,n){var r=Object(i.a)(e);return r?r.then(function(e){return t(e,n)}):t(e,n)},n)}t.a=r;var i=n(147)},function(e,t,n){"use strict";var r=n(7);n.d(t,"_16",function(){return r.b}),n.d(t,"p",function(){return r.a});var i=n(3);n.d(t,"_19",function(){return i.N}),n.d(t,"_15",function(){return i.M}),n.d(t,"_13",function(){return i.K}),n.d(t,"_6",function(){return i.E}),n.d(t,"_20",function(){return i.O}),n.d(t,"_3",function(){return i.B}),n.d(t,"_4",function(){return i.C}),n.d(t,"_9",function(){return i.G}),n.d(t,"_11",function(){return i.I}),n.d(t,"_5",function(){return i.D}),n.d(t,"_14",function(){return i.L}),n.d(t,"_8",function(){return i.F}),n.d(t,"_1",function(){return i.A}),n.d(t,"_0",function(){return i.z}),n.d(t,"_21",function(){return i.P}),n.d(t,"_12",function(){return i.J}),n.d(t,"_10",function(){return i.H}),n.d(t,"T",function(){return i.u}),n.d(t,"S",function(){return i.t}),n.d(t,"Q",function(){return i.r}),n.d(t,"K",function(){return i.l}),n.d(t,"U",function(){return i.v}),n.d(t,"H",function(){return i.i}),n.d(t,"I",function(){return i.j}),n.d(t,"M",function(){return i.n}),n.d(t,"O",function(){return i.p}),n.d(t,"J",function(){return i.k}),n.d(t,"R",function(){return i.s}),n.d(t,"L",function(){return i.m}),n.d(t,"G",function(){return i.h}),n.d(t,"F",function(){return i.g}),n.d(t,"W",function(){return i.w}),n.d(t,"P",function(){return i.q}),n.d(t,"N",function(){return i.o}),n.d(t,"Y",function(){return i.y}),n.d(t,"X",function(){return i.x}),n.d(t,"o",function(){return i.e}),n.d(t,"n",function(){return i.d}),n.d(t,"k",function(){return i.c}),n.d(t,"s",function(){return i.f}),n.d(t,"e",function(){return i.a}),n.d(t,"i",function(){return i.b});var o=n(12);n.d(t,"l",function(){return o.a}),n.d(t,"m",function(){return o.b});var a=n(13);n.d(t,"_2",function(){return a.f}),n.d(t,"d",function(){return a.c}),n.d(t,"_17",function(){return a.g}),n.d(t,"_22",function(){return a.h}),n.d(t,"h",function(){return a.d}),n.d(t,"q",function(){return a.e}),n.d(t,"c",function(){return a.b}),n.d(t,"a",function(){return a.a});var s=n(18);n.d(t,"_18",function(){return s.f}),n.d(t,"_23",function(){return s.g}),n.d(t,"j",function(){return s.d}),n.d(t,"f",function(){return s.b}),n.d(t,"r",function(){return s.e}),n.d(t,"b",function(){return s.a}),n.d(t,"g",function(){return s.c});var u=n(15);n.d(t,"u",function(){return u.b}),n.d(t,"_7",function(){return u.n}),n.d(t,"Z",function(){return u.m}),n.d(t,"C",function(){return u.j}),n.d(t,"x",function(){return u.e}),n.d(t,"y",function(){return u.f}),n.d(t,"D",function(){return u.k}),n.d(t,"A",function(){return u.h}),n.d(t,"B",function(){return u.i}),n.d(t,"z",function(){return u.g}),n.d(t,"E",function(){return u.l}),n.d(t,"t",function(){return u.a}),n.d(t,"v",function(){return u.c}),n.d(t,"w",function(){return u.d});var c=n(42);n.d(t,"_24",function(){return c.b}),n.d(t,"V",function(){return c.a})},function(e,t,n){"use strict";var r=n(62);n.d(t,"f",function(){return r.a});var i=n(5);n.d(t,"c",function(){return i.a});var o=n(63);n.d(t,"e",function(){return o.a});var a=n(34);n.d(t,"h",function(){return a.a}),n.d(t,"j",function(){return a.c}),n.d(t,"i",function(){return a.b});var s=n(19);n.d(t,"k",function(){return s.a});var u=n(118);n.d(t,"d",function(){return u.a});var c=n(27);n.d(t,"l",function(){return c.c}),n.d(t,"m",function(){return c.d}),n.d(t,"n",function(){return c.e}),n.d(t,"g",function(){return c.b}),n.d(t,"a",function(){return c.a});var l=n(26);n.d(t,"b",function(){return l.a})},function(e,t,n){"use strict";var r=n(47);n.d(t,"b",function(){return r.g}),n.d(t,"a",function(){return r.f}),n.d(t,"d",function(){return r.k});var i=n(68);n.d(t,"c",function(){return i.b})},function(e,t,n){"use strict";var r=n(324);n.d(t,"b",function(){return r.b}),n.d(t,"a",function(){return r.a})},function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){return 1===arguments.length?o(e.schema,e.document,e.rootValue,e.contextValue,e.variableValues,e.operationName,e.fieldResolver,e.subscribeFieldResolver):o(e,t,n,r,i,a,s,u)}function i(e){if(e instanceof u.a)return{errors:[e]};throw e}function o(e,t,n,r,o,u,c,f){var d=function(n){return Object(l.g)(e,t,n,r,o,u,c)};return a(e,t,n,r,o,u,f).then(function(e){return Object(s.isAsyncIterable)(e)?Object(p.a)(e,d,i):e},i)}function a(e,t,n,r,i,o,a){Object(l.b)(e,t,i);try{var p=Object(l.c)(e,t,n,r,i,o,a);if(Array.isArray(p))return Promise.resolve({errors:p});var f=Object(l.i)(e,p.operation),d=Object(l.e)(p,f,p.operation.selectionSet,Object.create(null),Object.create(null)),h=Object.keys(d),m=h[0],y=d[m],g=y[0],v=g.name.value,b=Object(l.h)(e,f,v);if(!b)throw new u.a('The subscription field "'+v+'" is not defined.',y);var _=b.subscribe||p.fieldResolver,S=Object(l.a)(void 0,m),E=Object(l.d)(p,b,y,f,S),I=Object(l.j)(p,b,y,_,n,E);return Promise.resolve(I).then(function(e){if(e instanceof Error)throw Object(c.a)(e,y,Object(l.k)(S));if(Object(s.isAsyncIterable)(e))return e;throw new Error("Subscription field must return Async Iterable. Received: "+String(e))})}catch(e){return Promise.reject(e)}}t.b=r,t.a=a;var s=n(33),u=(n.n(s),n(20)),c=n(119),l=n(47),p=(n(7),n(325))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){function i(e){return e.done?e:o(e.value,t).then(a,l)}var u=Object(s.getAsyncIterator)(e),c=void 0,l=void 0;"function"==typeof u.return&&(c=u.return,l=function(e){var t=function(){return Promise.reject(e)};return c.call(u).then(t,t)});var p=void 0;if(n){var f=n;p=function(e){return o(e,f).then(a,l)}}return r({next:function(){return u.next().then(i,p)},return:function(){return c?c.call(u).then(i,p):Promise.resolve({value:void 0,done:!0})},throw:function(e){return"function"==typeof u.throw?u.throw(e).then(i,p):Promise.reject(e).catch(l)}},s.$$asyncIterator,function(){return this})}function o(e,t){return new Promise(function(n){return n(t(e))})}function a(e){return{value:e,done:!1}}t.a=i;var s=n(33);n.n(s)},function(e,t,n){"use strict";var r=n(64);n.d(t,"C",function(){return r.b}),n.d(t,"w",function(){return r.a});var i=n(121);n.d(t,"B",function(){return i.a});var o=n(129);n.d(t,"a",function(){return o.a});var a=n(126);n.d(t,"b",function(){return a.a});var s=n(140);n.d(t,"c",function(){return s.a});var u=n(138);n.d(t,"d",function(){return u.a});var c=n(131);n.d(t,"e",function(){return c.a});var l=n(125);n.d(t,"f",function(){return l.a});var p=n(123);n.d(t,"g",function(){return p.a});var f=n(134);n.d(t,"h",function(){return f.a});var d=n(136);n.d(t,"i",function(){return d.a});var h=n(132);n.d(t,"j",function(){return h.a});var m=n(137);n.d(t,"k",function(){return m.a});var y=n(145);n.d(t,"l",function(){return y.a});var g=n(133);n.d(t,"m",function(){return g.a});var v=n(142);n.d(t,"n",function(){return v.a});var b=n(128);n.d(t,"o",function(){return b.a});var _=n(124);n.d(t,"p",function(){return _.a});var S=n(141);n.d(t,"q",function(){return S.a});var E=n(139);n.d(t,"r",function(){return E.a});var I=n(130);n.d(t,"s",function(){return I.a});var w=n(146);n.d(t,"t",function(){return w.a});var C=n(122);n.d(t,"u",function(){return C.a});var T=n(135);n.d(t,"v",function(){return T.a});var N=n(67);n.d(t,"x",function(){return N.a});var A=n(127);n.d(t,"y",function(){return A.a});var k=n(143);n.d(t,"z",function(){return k.a});var O=n(144);n.d(t,"A",function(){return O.a})},function(e,t,n){"use strict";var r=n(148);n.d(t,"q",function(){return r.a}),n.d(t,"t",function(){return r.b});var i=n(328);n.d(t,"r",function(){return i.a});var o=n(329);n.d(t,"s",function(){return o.a});var a=n(330);n.d(t,"g",function(){return a.a});var s=n(149);n.d(t,"f",function(){return s.b}),n.d(t,"h",function(){return s.c}),n.d(t,"p",function(){return s.d});var u=n(331);n.d(t,"l",function(){return u.a});var c=n(332);n.d(t,"y",function(){return c.a});var l=n(333);n.d(t,"A",function(){return l.b}),n.d(t,"B",function(){return l.c}),n.d(t,"z",function(){return l.a});var p=n(16);n.d(t,"D",function(){return p.a});var f=n(48);n.d(t,"E",function(){return f.a});var d=n(115);n.d(t,"F",function(){return d.a});var h=n(61);n.d(t,"e",function(){return h.a});var m=n(46);n.d(t,"c",function(){return m.a});var y=n(69);n.d(t,"i",function(){return y.a});var g=n(334);n.d(t,"w",function(){return g.a});var v=n(335);n.d(t,"x",function(){return v.a});var b=n(336);n.d(t,"j",function(){return b.a});var _=n(337);n.d(t,"C",function(){return _.a});var S=n(45);n.d(t,"u",function(){return S.b}),n.d(t,"v",function(){return S.c}),n.d(t,"k",function(){return S.a});var E=n(117);n.d(t,"d",function(){return E.a});var I=n(338);n.d(t,"a",function(){return I.a}),n.d(t,"b",function(){return I.b}),n.d(t,"m",function(){return I.c}),n.d(t,"n",function(){return I.d});var w=n(339);n.d(t,"o",function(){return w.a})},function(e,t,n){"use strict";function r(e,t){for(var n=null,r=0;r<e.definitions.length;r++){var o=e.definitions[r];if(o.kind===i.a.OPERATION_DEFINITION)if(t){if(o.name&&o.name.value===t)return o}else{if(n)return null;n=o}}return n}t.a=r;var i=n(5)},function(e,t,n){"use strict";function r(e,t){var n=Object(s.a)(Object(o.a)(t)),r=Object(a.g)(e,n);return(r.then||r.errors||!r.data)&&Object(i.a)(0),r.data}t.a=r;var i=n(9),o=n(148),a=(n(7),n(47)),s=n(34)},function(e,t,n){"use strict";function r(e,t){function n(e){if(e.kind===h.b.LIST){var t=e.ofType;if(!t)throw new Error("Decorated type deeper than introspection query.");return Object(f.a)(n(t))}if(e.kind===h.b.NON_NULL){var i=e.ofType;if(!i)throw new Error("Decorated type deeper than introspection query.");var o=n(i);return Object(f.b)(Object(p.q)(o))}if(!e.name)throw new Error("Unknown type reference: "+JSON.stringify(e));return r(e.name)}function r(e){if(x[e])return x[e];var t=R[e];if(!t)throw new Error("Invalid or incomplete schema, unknown type: "+e+". Ensure that a full introspection query is used in order to build a client schema.");var n=_(t);return x[e]=n,n}function y(e){var t=n(e);return Object(p.D)(t)||Object(i.a)(0,"Introspection must provide input type for arguments."),t}function g(e){var t=n(e);return Object(p.L)(t)||Object(i.a)(0,"Introspection must provide output type for fields."),t}function v(e){var t=n(e);return Object(p.r)(t)}function b(e){var t=n(e);return Object(p.l)(t)}function _(e){if(e&&e.name&&e.kind)switch(e.kind){case h.b.SCALAR:return S(e);case h.b.OBJECT:return E(e);case h.b.INTERFACE:return I(e);case h.b.UNION:return w(e);case h.b.ENUM:return C(e);case h.b.INPUT_OBJECT:return T(e)}throw new Error("Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema:"+JSON.stringify(e))}function S(e){return new p.e({name:e.name,description:e.description,serialize:function(e){return e}})}function E(e){if(!e.interfaces)throw new Error("Introspection result missing interfaces: "+JSON.stringify(e));return new p.d({name:e.name,description:e.description,interfaces:e.interfaces.map(b),fields:function(){return N(e)}})}function I(e){return new p.c({name:e.name,description:e.description,fields:function(){return N(e)}})}function w(e){if(!e.possibleTypes)throw new Error("Introspection result missing possibleTypes: "+JSON.stringify(e));return new p.f({name:e.name,description:e.description,types:e.possibleTypes.map(v)})}function C(e){if(!e.enumValues)throw new Error("Introspection result missing enumValues: "+JSON.stringify(e));return new p.a({name:e.name,description:e.description,values:Object(a.a)(e.enumValues,function(e){return e.name},function(e){return{description:e.description,deprecationReason:e.deprecationReason}})})}function T(e){if(!e.inputFields)throw new Error("Introspection result missing inputFields: "+JSON.stringify(e));return new p.b({name:e.name,description:e.description,fields:function(){return A(e.inputFields)}})}function N(e){if(!e.fields)throw new Error("Introspection result missing fields: "+JSON.stringify(e));return Object(a.a)(e.fields,function(e){return e.name},function(e){if(!e.args)throw new Error("Introspection result missing field args: "+JSON.stringify(e));return{description:e.description,deprecationReason:e.deprecationReason,type:g(e.type),args:A(e.args)}})}function A(e){return Object(a.a)(e,function(e){return e.name},k)}function k(e){var t=y(e.type),n=e.defaultValue?Object(s.a)(Object(u.c)(e.defaultValue),t):void 0;return{name:e.name,description:e.description,type:t,defaultValue:n}}function O(e){var t=e.locations?e.locations.slice():[].concat(e.onField?[l.a.FIELD]:[],e.onOperation?[l.a.QUERY,l.a.MUTATION,l.a.SUBSCRIPTION]:[],e.onFragment?[l.a.FRAGMENT_DEFINITION,l.a.FRAGMENT_SPREAD,l.a.INLINE_FRAGMENT]:[]);if(!e.args)throw new Error("Introspection result missing directive args: "+JSON.stringify(e));return new d.c({name:e.name,description:e.description,locations:t,args:A(e.args)})}var P=e.__schema,R=Object(o.a)(P.types,function(e){return e.name}),x=Object(o.a)(m.g.concat(h.m),function(e){return e.name}),D=P.types.map(function(e){return r(e.name)}),j=P.queryType?v(P.queryType):null,M=P.mutationType?v(P.mutationType):null,U=P.subscriptionType?v(P.subscriptionType):null,L=P.directives?P.directives.map(O):[];return new c.a({query:j,mutation:M,subscription:U,types:D,directives:L,assumeValid:t&&t.assumeValid})}t.a=r;var i=n(9),o=n(21),a=n(43),s=n(48),u=n(34),c=n(7),l=n(26),p=n(3),f=n(12),d=n(13),h=n(15),m=n(18)},function(e,t,n){"use strict";function r(e,t,n){function r(e){return k.buildType(e.name)}function f(e){return Object(c.K)(e)?d(e):Object(c.E)(e)?h(e):Object(c.O)(e)?m(e):e}function d(e){var t=e.name,n=_[t]?e.extensionASTNodes?e.extensionASTNodes.concat(_[t]):_[t]:e.extensionASTNodes;return new c.d({name:t,description:e.description,interfaces:function(){return y(e)},fields:function(){return g(e)},astNode:e.astNode,extensionASTNodes:n,isTypeOf:e.isTypeOf})}function h(e){return new c.c({name:e.name,description:e.description,fields:function(){return g(e)},astNode:e.astNode,resolveType:e.resolveType})}function m(e){return new c.f({name:e.name,description:e.description,types:e.getTypes().map(r),astNode:e.astNode,resolveType:e.resolveType})}function y(e){var t=e.getInterfaces().map(r),n=_[e.name];return n&&n.forEach(function(e){e.interfaces.forEach(function(e){t.push(k.buildType(e))})}),t}function g(e){var t=Object.create(null),n=e.getFields();Object.keys(n).forEach(function(e){var r=n[e];t[e]={description:r.description,deprecationReason:r.deprecationReason,type:v(r.type),args:Object(o.a)(r.args,function(e){return e.name}),astNode:r.astNode,resolve:r.resolve}});var r=_[e.name];return r&&r.forEach(function(r){r.fields.forEach(function(r){var i=r.name.value;if(n[i])throw new s.a('Field "'+e.name+"."+i+'" already exists in the schema. It cannot also be defined in this type extension.',[r]);t[i]=k.buildField(r)})}),t}function v(e){return Object(c.G)(e)?Object(l.a)(v(e.ofType)):Object(c.I)(e)?Object(l.b)(v(e.ofType)):r(e)}Object(u.b)(e)||Object(i.a)(0,"Must provide valid GraphQLSchema"),t&&t.kind===p.a.DOCUMENT||Object(i.a)(0,"Must provide valid Document AST");for(var b=Object.create(null),_=Object.create(null),S=[],E=0;E<t.definitions.length;E++){var I=t.definitions[E];switch(I.kind){case p.a.OBJECT_TYPE_DEFINITION:case p.a.INTERFACE_TYPE_DEFINITION:case p.a.ENUM_TYPE_DEFINITION:case p.a.UNION_TYPE_DEFINITION:case p.a.SCALAR_TYPE_DEFINITION:case p.a.INPUT_OBJECT_TYPE_DEFINITION:var w=I.name.value;if(e.getType(w))throw new s.a('Type "'+w+'" already exists in the schema. It cannot also be defined in this type definition.',[I]);b[w]=I;break;case p.a.OBJECT_TYPE_EXTENSION:var C=I.name.value,T=e.getType(C);if(!T)throw new s.a('Cannot extend type "'+C+'" because it does not exist in the existing schema.',[I]);if(!Object(c.K)(T))throw new s.a('Cannot extend non-object type "'+C+'".',[I]);var N=_[C];N?N.push(I):N=[I],_[C]=N;break;case p.a.DIRECTIVE_DEFINITION:var A=I.name.value;if(e.getDirective(A))throw new s.a('Directive "'+A+'" already exists in the schema. It cannot be redefined.',[I]);S.push(I);break;case p.a.SCALAR_TYPE_EXTENSION:case p.a.INTERFACE_TYPE_EXTENSION:case p.a.UNION_TYPE_EXTENSION:case p.a.ENUM_TYPE_EXTENSION:case p.a.INPUT_OBJECT_TYPE_EXTENSION:throw new Error("The "+I.kind+" kind is not yet supported by extendSchema().")}}if(0===Object.keys(_).length&&0===Object.keys(b).length&&0===S.length)return e;var k=new a.a(b,n,function(t,n){var r=e.getType(t);if(r)return f(r);if(n)throw new s.a('Unknown type: "'+t+'". Ensure that this type exists either in the original schema, or is added in a type definition.',[n]);throw Object(s.a)("Missing type from schema")}),O=e.getQueryType(),P=O?k.buildType(O.name):null,R=e.getMutationType(),x=R?k.buildType(R.name):null,D=e.getSubscriptionType(),j=D?k.buildType(D.name):null,M=e.getTypeMap(),U=Object.keys(M).map(function(e){return k.buildType(e)});return Object.keys(b).forEach(function(e){U.push(k.buildType(e))}),new u.a({query:P,mutation:x,subscription:j,types:U,directives:function(){var t=e.getDirectives();t||Object(i.a)(0,"schema must have default directives");var n=S.map(function(e){return k.buildDirective(e)});return t.concat(n)}(),astNode:e.astNode,allowedLegacyNames:e.__allowedLegacyNames&&e.__allowedLegacyNames.slice()})}t.a=r;var i=n(9),o=n(21),a=n(149),s=n(20),u=n(7),c=n(3),l=n(12),p=(n(13),n(5))},function(e,t,n){"use strict";function r(e){function t(e){return new l.c({name:e.name,description:e.description,locations:a(e.locations,function(e){return e}),args:n(e.args),astNode:e.astNode})}function n(e){return Object(s.a)(o(e),function(e){return e.name},function(e){return m({},e,{type:g(e.type)})})}function r(e){return function(){return i(e,function(e){return{type:g(e.type),args:n(e.args),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,description:e.description,astNode:e.astNode}})}}function y(e){return function(){return i(e,function(e){return{type:g(e.type),defaultValue:e.defaultValue,description:e.description,astNode:e.astNode}})}}function g(e){return Object(f.G)(e)?new p.a(g(e.ofType)):Object(f.I)(e)?new p.b(g(e.ofType)):b(e)}function v(e){return function(){return o(e).map(b)}}function b(e){if(Object(d.f)(e)||Object(h.n)(e))return e;var t=S[e.name];return t||(t=_(e),S[e.name]=t),t}function _(e){if(Object(f.M)(e))return e;if(Object(f.K)(e))return new f.d({name:e.name,interfaces:v(e.getInterfaces()),fields:r(e.getFields()),isTypeOf:e.isTypeOf,description:e.description,astNode:e.astNode,extensionASTNodes:e.extensionASTNodes});if(Object(f.E)(e))return new f.c({name:e.name,fields:r(e.getFields()),resolveType:e.resolveType,description:e.description,astNode:e.astNode,extensionASTNodes:e.extensionASTNodes});if(Object(f.O)(e))return new f.f({name:e.name,types:v(e.getTypes()),resolveType:e.resolveType,description:e.description,astNode:e.astNode});if(Object(f.B)(e))return new f.a({name:e.name,values:Object(s.a)(o(e.getValues()),function(e){return e.name},function(e){return{value:e.value,deprecationReason:e.deprecationReason,description:e.description,astNode:e.astNode}}),description:e.description,astNode:e.astNode});if(Object(f.C)(e))return new f.b({name:e.name,fields:y(e.getFields()),description:e.description,astNode:e.astNode});throw new Error('Unknown type: "'+e+'"')}var S=Object.create(null),E=function(e){return e&&b(e)};return new c.a({types:o(Object(u.a)(e.getTypeMap()).map(b)),directives:o(e.getDirectives()).map(t),query:E(e.getQueryType()),mutation:E(e.getMutationType()),subscription:E(e.getSubscriptionType()),astNode:e.astNode})}function i(e,t){var n=Object.create(null),r=a(Object.keys(e),function(e){return e}),i=!0,o=!1,s=void 0;try{for(var u,c=r[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var l=u.value,p=e[l];n[l]=t?t(p):p}}catch(e){o=!0,s=e}finally{try{!i&&c.return&&c.return()}finally{if(o)throw s}}return n}function o(e){return a(e,function(e){return e.name})}function a(e,t){return e.slice().sort(function(e,n){var r=t(e),i=t(n);return r.localeCompare(i)})}t.a=r;var s=n(43),u=n(24),c=n(7),l=n(13),p=n(12),f=n(3),d=n(18),h=n(15),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";function r(e,t){return a(e,function(e){return!Object(D.g)(e)},o,t)}function i(e,t){return a(e,D.g,j.n,t)}function o(e){return!Object(x.f)(e)&&!Object(j.n)(e)}function a(e,t,n,r){var i=e.getDirectives().filter(t),o=e.getTypeMap(),a=Object(k.a)(o).sort(function(e,t){return e.name.localeCompare(t.name)}).filter(n);return[s(e)].concat(i.map(function(e){return _(e,r)}),a.map(function(e){return c(e,r)})).filter(Boolean).join("\n\n")+"\n"}function s(e){if(!u(e)){var t=[],n=e.getQueryType();n&&t.push("  query: "+n.name);var r=e.getMutationType();r&&t.push("  mutation: "+r.name);var i=e.getSubscriptionType();return i&&t.push("  subscription: "+i.name),"schema {\n"+t.join("\n")+"\n}"}}function u(e){var t=e.getQueryType();if(t&&"Query"!==t.name)return!1;var n=e.getMutationType();if(n&&"Mutation"!==n.name)return!1;var r=e.getSubscriptionType();return!r||"Subscription"===r.name}function c(e,t){if(Object(R.M)(e))return l(e,t);if(Object(R.K)(e))return p(e,t);if(Object(R.E)(e))return f(e,t);if(Object(R.O)(e))return d(e,t);if(Object(R.B)(e))return h(e,t);if(Object(R.C)(e))return y(e,t);throw new Error("Unknown type: "+e+".")}function l(e,t){return E(t,e)+"scalar "+e.name}function p(e,t){var n=e.getInterfaces(),r=n.length?" implements "+n.map(function(e){return e.name}).join(" & "):"";return E(t,e)+"type "+e.name+r+" {\n"+g(t,e)+"\n}"}function f(e,t){return E(t,e)+"interface "+e.name+" {\n"+g(t,e)+"\n}"}function d(e,t){return E(t,e)+"union "+e.name+" = "+e.getTypes().join(" | ")}function h(e,t){return E(t,e)+"enum "+e.name+" {\n"+m(e.getValues(),t)+"\n}"}function m(e,t){return e.map(function(e,n){return E(t,e,"  ",!n)+"  "+e.name+S(e)}).join("\n")}function y(e,t){var n=Object(k.a)(e.getFields());return E(t,e)+"input "+e.name+" {\n"+n.map(function(e,n){return E(t,e,"  ",!n)+"  "+b(e)}).join("\n")+"\n}"}function g(e,t){return Object(k.a)(t.getFields()).map(function(t,n){return E(e,t,"  ",!n)+"  "+t.name+v(e,t.args,"  ")+": "+String(t.type)+S(t)}).join("\n")}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return 0===t.length?"":t.every(function(e){return!e.description})?"("+t.map(b).join(", ")+")":"(\n"+t.map(function(t,r){return E(e,t,"  "+n,!r)+"  "+n+b(t)}).join("\n")+"\n"+n+")"}function b(e){var t=e.name+": "+String(e.type);return Object(A.a)(e.defaultValue)||(t+=" = "+Object(P.a)(Object(O.a)(e.defaultValue,e.type))),t}function _(e,t){return E(t,e)+"directive @"+e.name+v(t,e.args)+" on "+e.locations.join(" | ")}function S(e){if(!e.isDeprecated)return"";var t=e.deprecationReason;return Object(N.a)(t)||""===t||t===D.a?" @deprecated":" @deprecated(reason: "+Object(P.a)(Object(O.a)(t,x.e))+")"}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!t.description)return"";var i=C(t.description,120-n.length);if(e&&e.commentDescriptions)return w(i,n,r);var o=n&&!r?"\n"+n+'"""':n+'"""';if(1===i.length&&i[0].length<70&&'"'!==i[0][i[0].length-1])return o+I(i[0])+'"""\n';var a=" "===i[0][0]||"\t"===i[0][0];a||(o+="\n");for(var s=0;s<i.length;s++)0===s&&a||(o+=n),o+=I(i[s])+"\n";return o+=n+'"""\n'}function I(e){return e.replace(/"""/g,'\\"""')}function w(e,t,n){for(var r=t&&!n?"\n":"",i=0;i<e.length;i++)""===e[i]?r+=t+"#\n":r+=t+"# "+e[i]+"\n";return r}function C(e,t){for(var n=[],r=e.split("\n"),i=0;i<r.length;i++)if(""===r[i])n.push(r[i]);else for(var o=T(r[i],t),a=0;a<o.length;a++)n.push(o[a]);return n}function T(e,t){if(e.length<t+5)return[e];var n=e.split(new RegExp("((?: |^).{15,"+(t-40)+"}(?= |$))"));if(n.length<4)return[e];for(var r=[n[0]+n[1]+n[2]],i=3;i<n.length;i+=2)r.push(n[i].slice(1)+n[i+1]);return r}t.b=r,t.a=i,t.c=c;var N=n(44),A=n(11),k=n(24),O=n(61),P=n(19),R=n(3),x=n(18),D=n(13),j=n(15)},function(e,t,n){"use strict";function r(e,t){var n=Object(i.a)(e,t).errors;return n?n.map(function(e){return e.message}):[]}t.a=r;var i=n(69)},function(e,t,n){"use strict";function r(e,t){var n=new s.a({}),r={kind:o.a.DOCUMENT,definitions:[]},l=new i.a(n,void 0,e),p=new c.a(n,r,l),f=Object(u.a)(p);return Object(a.c)(t,Object(a.e)(l,f)),p.getErrors()}t.a=r;var i=n(46),o=n(5),a=n(27),s=n(7),u=n(67),c=n(64)},function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].definitions,i=0;i<r.length;i++)t.push(r[i]);return{kind:"Document",definitions:t}}t.a=r},function(e,t,n){"use strict";function r(e){var t=[],n=Object.create(null),r=new Map,s=Object.create(null),u=void 0,c=0;Object(a.c)(e,{OperationDefinition:function(e){u=i(e),t.push(e),r.set(e,c++)},FragmentDefinition:function(e){u=e.name.value,n[u]=e,r.set(e,c++)},FragmentSpread:function(e){var t=e.name.value;(s[u]||(s[u]=Object.create(null)))[t]=!0}});var l=Object.create(null);return t.forEach(function(e){var t=i(e),a=Object.create(null);o(a,s,t);var u=[e];Object.keys(a).forEach(function(e){u.push(n[e])}),u.sort(function(e,t){return(r.get(e)||0)-(r.get(t)||0)}),l[t]={kind:"Document",definitions:u}}),l}function i(e){return e.name?e.name.value:""}function o(e,t,n){var r=t[n];r&&Object.keys(r).forEach(function(n){e[n]||(e[n]=!0,o(e,t,n))})}t.a=r;var a=n(27)},function(e,t,n){"use strict";function r(e,t){return[].concat(o(e,t),a(e,t),c(e,t),l(e,t).breakingChanges,d(e,t),m(e,t),s(e,t).breakingChanges,g(e,t),b(e,t),S(e,t),I(e,t),C(e,t))}function i(e,t){return[].concat(s(e,t).dangerousChanges,y(e,t),v(e,t),h(e,t),l(e,t).dangerousChanges)}function o(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){r[e]||i.push({type:O.TYPE_REMOVED,description:e+" was removed."})}),i}function a(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){if(r[e]){var t=n[e],o=r[e];t.constructor!==o.constructor&&i.push({type:O.TYPE_CHANGED_KIND,description:e+" changed from "+u(t)+" to "+u(o)+"."})}}),i}function s(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[],o=[];return Object.keys(n).forEach(function(e){var t=n[e],a=r[e];if((Object(A.K)(t)||Object(A.E)(t))&&(Object(A.K)(a)||Object(A.E)(a))&&a.constructor===t.constructor){var s=t.getFields(),u=a.getFields();Object.keys(s).forEach(function(e){u[e]&&(s[e].args.forEach(function(n){var r=u[e].args,a=r.find(function(e){return e.name===n.name});a?f(n.type,a.type)?void 0!==n.defaultValue&&n.defaultValue!==a.defaultValue&&o.push({type:P.ARG_DEFAULT_VALUE_CHANGE,description:t.name+"."+e+" arg "+n.name+" has changed defaultValue"}):i.push({type:O.ARG_CHANGED_KIND,description:t.name+"."+e+" arg "+n.name+" has changed type from "+n.type.toString()+" to "+a.type.toString()}):i.push({type:O.ARG_REMOVED,description:t.name+"."+e+" arg "+n.name+" was removed"})}),u[e].args.forEach(function(t){s[e].args.find(function(e){return e.name===t.name})||(Object(A.I)(t.type)?i.push({type:O.NON_NULL_ARG_ADDED,description:"A non-null arg "+t.name+" on "+a.name+"."+e+" was added"}):o.push({type:P.NULLABLE_ARG_ADDED,description:"A nullable arg "+t.name+" on "+a.name+"."+e+" was added"}))}))})}}),{breakingChanges:i,dangerousChanges:o}}function u(e){if(Object(A.M)(e))return"a Scalar type";if(Object(A.K)(e))return"an Object type";if(Object(A.E)(e))return"an Interface type";if(Object(A.O)(e))return"a Union type";if(Object(A.B)(e))return"an Enum type";if(Object(A.C)(e))return"an Input type";throw new TypeError("Unknown type "+e.constructor.name)}function c(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){var t=n[e],o=r[e];if((Object(A.K)(t)||Object(A.E)(t))&&(Object(A.K)(o)||Object(A.E)(o))&&o.constructor===t.constructor){var a=t.getFields(),s=o.getFields();Object.keys(a).forEach(function(t){if(t in s){var n=a[t].type,r=s[t].type;if(!p(n,r)){var o=Object(A.H)(n)?n.name:n.toString(),u=Object(A.H)(r)?r.name:r.toString();i.push({type:O.FIELD_CHANGED_KIND,description:e+"."+t+" changed type from "+o+" to "+u+"."})}}else i.push({type:O.FIELD_REMOVED,description:e+"."+t+" was removed."})})}}),i}function l(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[],o=[];return Object.keys(n).forEach(function(e){var t=n[e],a=r[e];if(Object(A.C)(t)&&Object(A.C)(a)){var s=t.getFields(),u=a.getFields();Object.keys(s).forEach(function(t){if(t in u){var n=s[t].type,r=u[t].type;if(!f(n,r)){var o=Object(A.H)(n)?n.name:n.toString(),a=Object(A.H)(r)?r.name:r.toString();i.push({type:O.FIELD_CHANGED_KIND,description:e+"."+t+" changed type from "+o+" to "+a+"."})}}else i.push({type:O.FIELD_REMOVED,description:e+"."+t+" was removed."})}),Object.keys(u).forEach(function(e){e in s||(Object(A.I)(u[e].type)?i.push({type:O.NON_NULL_INPUT_FIELD_ADDED,description:"A non-null field "+e+" on input type "+a.name+" was added."}):o.push({type:P.NULLABLE_INPUT_FIELD_ADDED,description:"A nullable field "+e+" on input type "+a.name+" was added."}))})}}),{breakingChanges:i,dangerousChanges:o}}function p(e,t){return Object(A.H)(e)?Object(A.H)(t)&&e.name===t.name||Object(A.I)(t)&&p(e,t.ofType):Object(A.G)(e)?Object(A.G)(t)&&p(e.ofType,t.ofType)||Object(A.I)(t)&&p(e,t.ofType):!!Object(A.I)(e)&&Object(A.I)(t)&&p(e.ofType,t.ofType)}function f(e,t){return Object(A.H)(e)?Object(A.H)(t)&&e.name===t.name:Object(A.G)(e)?Object(A.G)(t)&&f(e.ofType,t.ofType):!!Object(A.I)(e)&&(Object(A.I)(t)&&f(e.ofType,t.ofType)||!Object(A.I)(t)&&f(e.ofType,t))}function d(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){var t=n[e],o=r[e];if(Object(A.O)(t)&&Object(A.O)(o)){var a=Object.create(null);o.getTypes().forEach(function(e){a[e.name]=!0}),t.getTypes().forEach(function(t){a[t.name]||i.push({type:O.TYPE_REMOVED_FROM_UNION,description:t.name+" was removed from union type "+e+"."})})}}),i}function h(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(r).forEach(function(e){var t=n[e],o=r[e];if(Object(A.O)(t)&&Object(A.O)(o)){var a=Object.create(null);t.getTypes().forEach(function(e){a[e.name]=!0}),o.getTypes().forEach(function(t){a[t.name]||i.push({type:P.TYPE_ADDED_TO_UNION,description:t.name+" was added to union type "+e+"."})})}}),i}function m(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){var t=n[e],o=r[e];if(Object(A.B)(t)&&Object(A.B)(o)){var a=Object.create(null);o.getValues().forEach(function(e){a[e.name]=!0}),t.getValues().forEach(function(t){a[t.name]||i.push({type:O.VALUE_REMOVED_FROM_ENUM,description:t.name+" was removed from enum type "+e+"."})})}}),i}function y(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){var t=n[e],o=r[e];if(Object(A.B)(t)&&Object(A.B)(o)){var a=Object.create(null);t.getValues().forEach(function(e){a[e.name]=!0}),o.getValues().forEach(function(t){a[t.name]||i.push({type:P.VALUE_ADDED_TO_ENUM,description:t.name+" was added to enum type "+e+"."})})}}),i}function g(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(n).forEach(function(e){var t=n[e],o=r[e];if(Object(A.K)(t)&&Object(A.K)(o)){var a=t.getInterfaces(),s=o.getInterfaces();a.forEach(function(t){s.some(function(e){return e.name===t.name})||i.push({type:O.INTERFACE_REMOVED_FROM_OBJECT,description:e+" no longer implements interface "+t.name+"."})})}}),i}function v(e,t){var n=e.getTypeMap(),r=t.getTypeMap(),i=[];return Object.keys(r).forEach(function(e){var t=n[e],o=r[e];if(Object(A.K)(t)&&Object(A.K)(o)){var a=t.getInterfaces();o.getInterfaces().forEach(function(t){a.some(function(e){return e.name===t.name})||i.push({type:P.INTERFACE_ADDED_TO_OBJECT,description:t.name+" added to interfaces implemented by "+e+"."})})}}),i}function b(e,t){var n=[],r=T(t);return e.getDirectives().forEach(function(e){r[e.name]||n.push({type:O.DIRECTIVE_REMOVED,description:e.name+" was removed"})}),n}function _(e,t){var n=[],r=N(t);return e.args.forEach(function(e){r[e.name]||n.push(e)}),n}function S(e,t){var n=[],r=T(e);return t.getDirectives().forEach(function(e){var t=r[e.name];t&&_(t,e).forEach(function(t){n.push({type:O.DIRECTIVE_ARG_REMOVED,description:t.name+" was removed from "+e.name})})}),n}function E(e,t){var n=[],r=N(e);return t.args.forEach(function(e){r[e.name]||n.push(e)}),n}function I(e,t){var n=[],r=T(e);return t.getDirectives().forEach(function(e){var t=r[e.name];t&&E(t,e).forEach(function(t){Object(A.I)(t.type)&&n.push({type:O.NON_NULL_DIRECTIVE_ARG_ADDED,description:"A non-null arg "+t.name+" on directive "+e.name+" was added"})})}),n}function w(e,t){var n=[],r=new Set(t.locations);return e.locations.forEach(function(e){r.has(e)||n.push(e)}),n}function C(e,t){var n=[],r=T(e);return t.getDirectives().forEach(function(e){var t=r[e.name];t&&w(t,e).forEach(function(t){n.push({type:O.DIRECTIVE_LOCATION_REMOVED,description:t+" was removed from "+e.name})})}),n}function T(e){return Object(k.a)(e.getDirectives(),function(e){return e.name})}function N(e){return Object(k.a)(e.args,function(e){return e.name})}n.d(t,"a",function(){return O}),n.d(t,"b",function(){return P}),t.c=r,t.d=i;var A=n(3),k=(n(13),n(7),n(21)),O={FIELD_CHANGED_KIND:"FIELD_CHANGED_KIND",FIELD_REMOVED:"FIELD_REMOVED",TYPE_CHANGED_KIND:"TYPE_CHANGED_KIND",TYPE_REMOVED:"TYPE_REMOVED",TYPE_REMOVED_FROM_UNION:"TYPE_REMOVED_FROM_UNION",VALUE_REMOVED_FROM_ENUM:"VALUE_REMOVED_FROM_ENUM",ARG_REMOVED:"ARG_REMOVED",ARG_CHANGED_KIND:"ARG_CHANGED_KIND",NON_NULL_ARG_ADDED:"NON_NULL_ARG_ADDED",NON_NULL_INPUT_FIELD_ADDED:"NON_NULL_INPUT_FIELD_ADDED",INTERFACE_REMOVED_FROM_OBJECT:"INTERFACE_REMOVED_FROM_OBJECT",DIRECTIVE_REMOVED:"DIRECTIVE_REMOVED",DIRECTIVE_ARG_REMOVED:"DIRECTIVE_ARG_REMOVED",DIRECTIVE_LOCATION_REMOVED:"DIRECTIVE_LOCATION_REMOVED",NON_NULL_DIRECTIVE_ARG_ADDED:"NON_NULL_DIRECTIVE_ARG_ADDED"},P={ARG_DEFAULT_VALUE_CHANGE:"ARG_DEFAULT_VALUE_CHANGE",VALUE_ADDED_TO_ENUM:"VALUE_ADDED_TO_ENUM",INTERFACE_ADDED_TO_OBJECT:"INTERFACE_ADDED_TO_OBJECT",TYPE_ADDED_TO_UNION:"TYPE_ADDED_TO_UNION",NULLABLE_INPUT_FIELD_ADDED:"NULLABLE_INPUT_FIELD_ADDED",NULLABLE_ARG_ADDED:"NULLABLE_ARG_ADDED"}},function(e,t,n){"use strict";function r(e,t){var n=[],r=new s.a(e);return Object(o.c)(t,Object(o.e)(r,{Field:function(e){var t=r.getFieldDef();if(t&&t.isDeprecated){var o=r.getParentType();if(o){var a=t.deprecationReason;n.push(new i.a("The field "+o.name+"."+t.name+" is deprecated."+(a?" "+a:""),[e]))}}},EnumValue:function(e){var t=r.getEnumValue();if(t&&t.isDeprecated){var o=Object(a.x)(r.getInputType());if(o){var s=t.deprecationReason;n.push(new i.a("The enum value "+o.name+"."+t.name+" is deprecated."+(s?" "+s:""),[e]))}}}})),n}t.a=r;var i=n(20),o=n(27),a=n(3),s=(n(7),n(46))},function(e,t,n){"use strict";function r(e){return(0,l.visit)(e,{leave:p})}function i(e){return function(t){return o([t.description,e(t)],"\n")}}function o(e,t){return e?e.filter(function(e){return e}).join(t||""):""}function a(e){return e&&0!==e.length?"{\n"+u(o(e,"\n"))+"\n}":""}function s(e,t,n){return t?e+t+(n||""):""}function u(e){return e&&"  "+e.replace(/\n/g,"\n  ")}function c(e,t){var n=e.replace(/"""/g,'\\"""');return" "!==e[0]&&"\t"!==e[0]||-1!==e.indexOf("\n")?'"""\n'+(t?n:u(n))+'\n"""':'"""'+n.replace(/"$/,'"\n')+'"""'}Object.defineProperty(t,"__esModule",{value:!0}),t.print=r;var l=n(341),p={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return o(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=s("(",o(e.variableDefinitions,", "),")"),i=o(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?o([t,o([n,r]),i,a]," "):a},VariableDefinition:function(e){return e.variable+": "+e.type+s(" = ",e.defaultValue)},SelectionSet:function(e){return a(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet;return o([s("",t,": ")+n+s("(",o(r,", "),")"),o(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+s(" ",o(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return o(["...",s("on ",t),o(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment "+t+s("(",o(r,", "),")")+" on "+n+" "+s("",o(i," ")," ")+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?c(n,"description"===t):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+o(e.values,", ")+"]"},ObjectValue:function(e){return"{"+o(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+s("(",o(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:function(e){var t=e.directives,n=e.operationTypes;return o(["schema",o(t," "),a(n)]," ")},OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:i(function(e){return o(["scalar",e.name,o(e.directives," ")]," ")}),ObjectTypeDefinition:i(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")}),FieldDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+s("(",o(n,", "),")")+": "+r+s(" ",o(i," "))}),InputValueDefinition:i(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return o([t+": "+n,s("= ",r),o(i," ")]," ")}),InterfaceTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["interface",t,o(n," "),a(r)]," ")}),UnionTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.types;return o(["union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")}),EnumTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.values;return o(["enum",t,o(n," "),a(r)]," ")}),EnumValueDefinition:i(function(e){return o([e.name,o(e.directives," ")]," ")}),InputObjectTypeDefinition:i(function(e){var t=e.name,n=e.directives,r=e.fields;return o(["input",t,o(n," "),a(r)]," ")}),ScalarTypeExtension:function(e){return o(["extend scalar",e.name,o(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return o(["extend type",t,s("implements ",o(n," & ")),o(r," "),a(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend interface",t,o(n," "),a(r)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return o(["extend union",t,o(n," "),r&&0!==r.length?"= "+o(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return o(["extend enum",t,o(n," "),a(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return o(["extend input",t,o(n," "),a(r)]," ")},DirectiveDefinition:i(function(e){var t=e.name,n=e.arguments,r=e.locations;return"directive @"+t+s("(",o(n,", "),")")+" on "+o(r," | ")})}},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=void 0,o=Array.isArray(e),a=[e],l=-1,p=[],f=void 0,d=void 0,h=void 0,m=[],y=[],g=e;do{l++;var v=l===a.length,b=v&&0!==p.length;if(v){if(d=0===y.length?void 0:m[m.length-1],f=h,h=y.pop(),b){if(o)f=f.slice();else{var _={};for(var S in f)f.hasOwnProperty(S)&&(_[S]=f[S]);f=_}for(var E=0,I=0;I<p.length;I++){var w=p[I][0],C=p[I][1];o&&(w-=E),o&&null===C?(f.splice(w,1),E++):f[w]=C}}l=r.index,a=r.keys,p=r.edits,o=r.inArray,r=r.prev}else{if(d=h?o?l:a[l]:void 0,null===(f=h?h[d]:g)||void 0===f)continue;h&&m.push(d)}var T=void 0;if(!Array.isArray(f)){if(!i(f))throw new Error("Invalid AST Node: "+JSON.stringify(f));var N=s(t,f.kind,v);if(N){if((T=N.call(t,f,d,h,m,y))===c)break;if(!1===T){if(!v){m.pop();continue}}else if(void 0!==T&&(p.push([d,T]),!v)){if(!i(T)){m.pop();continue}f=T}}}void 0===T&&b&&p.push([d,f]),v?m.pop():(r={inArray:o,index:l,keys:a,edits:p,prev:r},o=Array.isArray(f),a=o?f:n[f.kind]||[],l=-1,p=[],h&&y.push(h),h=f)}while(void 0!==r);return 0!==p.length&&(g=p[p.length-1][1]),g}function i(e){return Boolean(e&&"string"==typeof e.kind)}function o(e){var t=new Array(e.length);return{enter:function(n){for(var r=0;r<e.length;r++)if(!t[r]){var i=s(e[r],n.kind,!1);if(i){var o=i.apply(e[r],arguments);if(!1===o)t[r]=n;else if(o===c)t[r]=c;else if(void 0!==o)return o}}},leave:function(n){for(var r=0;r<e.length;r++)if(t[r])t[r]===n&&(t[r]=null);else{var i=s(e[r],n.kind,!0);if(i){var o=i.apply(e[r],arguments);if(o===c)t[r]=c;else if(void 0!==o&&!1!==o)return o}}}}}function a(e,t){return{enter:function(n){e.enter(n);var r=s(t,n.kind,!1);if(r){var o=r.apply(t,arguments);return void 0!==o&&(e.leave(n),i(o)&&e.enter(o)),o}},leave:function(n){var r=s(t,n.kind,!0),i=void 0;return r&&(i=r.apply(t,arguments)),e.leave(n),i}}}function s(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}Object.defineProperty(t,"__esModule",{value:!0}),t.visit=r,t.visitInParallel=o,t.visitWithTypeInfo=a,t.getVisitFn=s;var u=t.QueryDocumentKeys={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"]},c=t.BREAK={}},function(e,t,n){"use strict";function r(e,t){var n="string"==typeof e?new _e.Source(e):e;if(!(n instanceof _e.Source))throw new TypeError("Must provide Source. Received: "+String(n));return s((0,Ee.createLexer)(n,t||{}))}function i(e,t){var n="string"==typeof e?new _e.Source(e):e,r=(0,Ee.createLexer)(n,t||{});me(r,Ee.TokenKind.SOF);var i=w(r,!1);return me(r,Ee.TokenKind.EOF),i}function o(e,t){var n="string"==typeof e?new _e.Source(e):e,r=(0,Ee.createLexer)(n,t||{});me(r,Ee.TokenKind.SOF);var i=x(r);return me(r,Ee.TokenKind.EOF),i}function a(e){var t=me(e,Ee.TokenKind.NAME);return{kind:Ie.Kind.NAME,value:t.value,loc:pe(e,t)}}function s(e){var t=e.token;me(e,Ee.TokenKind.SOF);var n=[];do{n.push(u(e))}while(!he(e,Ee.TokenKind.EOF));return{kind:Ie.Kind.DOCUMENT,definitions:n,loc:pe(e,t)}}function u(e){if(de(e,Ee.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return c(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"extend":case"directive":return j(e)}else{if(de(e,Ee.TokenKind.BRACE_L))return c(e);if(M(e))return j(e)}throw ge(e)}function c(e){if(de(e,Ee.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return l(e);case"fragment":return E(e)}else if(de(e,Ee.TokenKind.BRACE_L))return l(e);throw ge(e)}function l(e){var t=e.token;if(de(e,Ee.TokenKind.BRACE_L))return{kind:Ie.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:m(e),loc:pe(e,t)};var n=p(e),r=void 0;return de(e,Ee.TokenKind.NAME)&&(r=a(e)),{kind:Ie.Kind.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:f(e),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function p(e){var t=me(e,Ee.TokenKind.NAME);switch(t.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw ge(e,t)}function f(e){return de(e,Ee.TokenKind.PAREN_L)?be(e,Ee.TokenKind.PAREN_L,d,Ee.TokenKind.PAREN_R):[]}function d(e){var t=e.token;return{kind:Ie.Kind.VARIABLE_DEFINITION,variable:h(e),type:(me(e,Ee.TokenKind.COLON),x(e)),defaultValue:he(e,Ee.TokenKind.EQUALS)?w(e,!0):void 0,loc:pe(e,t)}}function h(e){var t=e.token;return me(e,Ee.TokenKind.DOLLAR),{kind:Ie.Kind.VARIABLE,name:a(e),loc:pe(e,t)}}function m(e){var t=e.token;return{kind:Ie.Kind.SELECTION_SET,selections:be(e,Ee.TokenKind.BRACE_L,y,Ee.TokenKind.BRACE_R),loc:pe(e,t)}}function y(e){return de(e,Ee.TokenKind.SPREAD)?S(e):g(e)}function g(e){var t=e.token,n=a(e),r=void 0,i=void 0;return he(e,Ee.TokenKind.COLON)?(r=n,i=a(e)):i=n,{kind:Ie.Kind.FIELD,alias:r,name:i,arguments:v(e,!1),directives:P(e,!1),selectionSet:de(e,Ee.TokenKind.BRACE_L)?m(e):void 0,loc:pe(e,t)}}function v(e,t){var n=t?_:b;return de(e,Ee.TokenKind.PAREN_L)?be(e,Ee.TokenKind.PAREN_L,n,Ee.TokenKind.PAREN_R):[]}function b(e){var t=e.token;return{kind:Ie.Kind.ARGUMENT,name:a(e),value:(me(e,Ee.TokenKind.COLON),w(e,!1)),loc:pe(e,t)}}function _(e){var t=e.token;return{kind:Ie.Kind.ARGUMENT,name:a(e),value:(me(e,Ee.TokenKind.COLON),T(e)),loc:pe(e,t)}}function S(e){var t=e.token;if(me(e,Ee.TokenKind.SPREAD),de(e,Ee.TokenKind.NAME)&&"on"!==e.token.value)return{kind:Ie.Kind.FRAGMENT_SPREAD,name:I(e),directives:P(e,!1),loc:pe(e,t)};var n=void 0;return"on"===e.token.value&&(e.advance(),n=D(e)),{kind:Ie.Kind.INLINE_FRAGMENT,typeCondition:n,directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function E(e){var t=e.token;return ye(e,"fragment"),e.options.experimentalFragmentVariables?{kind:Ie.Kind.FRAGMENT_DEFINITION,name:I(e),variableDefinitions:f(e),typeCondition:(ye(e,"on"),D(e)),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}:{kind:Ie.Kind.FRAGMENT_DEFINITION,name:I(e),typeCondition:(ye(e,"on"),D(e)),directives:P(e,!1),selectionSet:m(e),loc:pe(e,t)}}function I(e){if("on"===e.token.value)throw ge(e);return a(e)}function w(e,t){var n=e.token;switch(n.kind){case Ee.TokenKind.BRACKET_L:return A(e,t);case Ee.TokenKind.BRACE_L:return k(e,t);case Ee.TokenKind.INT:return e.advance(),{kind:Ie.Kind.INT,value:n.value,loc:pe(e,n)};case Ee.TokenKind.FLOAT:return e.advance(),{kind:Ie.Kind.FLOAT,value:n.value,loc:pe(e,n)};case Ee.TokenKind.STRING:case Ee.TokenKind.BLOCK_STRING:return C(e);case Ee.TokenKind.NAME:return"true"===n.value||"false"===n.value?(e.advance(),{kind:Ie.Kind.BOOLEAN,value:"true"===n.value,loc:pe(e,n)}):"null"===n.value?(e.advance(),{kind:Ie.Kind.NULL,loc:pe(e,n)}):(e.advance(),{kind:Ie.Kind.ENUM,value:n.value,loc:pe(e,n)});case Ee.TokenKind.DOLLAR:if(!t)return h(e)}throw ge(e)}function C(e){var t=e.token;return e.advance(),{kind:Ie.Kind.STRING,value:t.value,block:t.kind===Ee.TokenKind.BLOCK_STRING,loc:pe(e,t)}}function T(e){return w(e,!0)}function N(e){return w(e,!1)}function A(e,t){var n=e.token,r=t?T:N;return{kind:Ie.Kind.LIST,values:ve(e,Ee.TokenKind.BRACKET_L,r,Ee.TokenKind.BRACKET_R),loc:pe(e,n)}}function k(e,t){var n=e.token;me(e,Ee.TokenKind.BRACE_L);for(var r=[];!he(e,Ee.TokenKind.BRACE_R);)r.push(O(e,t));return{kind:Ie.Kind.OBJECT,fields:r,loc:pe(e,n)}}function O(e,t){var n=e.token;return{kind:Ie.Kind.OBJECT_FIELD,name:a(e),value:(me(e,Ee.TokenKind.COLON),w(e,t)),loc:pe(e,n)}}function P(e,t){for(var n=[];de(e,Ee.TokenKind.AT);)n.push(R(e,t));return n}function R(e,t){var n=e.token;return me(e,Ee.TokenKind.AT),{kind:Ie.Kind.DIRECTIVE,name:a(e),arguments:v(e,t),loc:pe(e,n)}}function x(e){var t=e.token,n=void 0;return he(e,Ee.TokenKind.BRACKET_L)?(n=x(e),me(e,Ee.TokenKind.BRACKET_R),n={kind:Ie.Kind.LIST_TYPE,type:n,loc:pe(e,t)}):n=D(e),he(e,Ee.TokenKind.BANG)?{kind:Ie.Kind.NON_NULL_TYPE,type:n,loc:pe(e,t)}:n}function D(e){var t=e.token;return{kind:Ie.Kind.NAMED_TYPE,name:a(e),loc:pe(e,t)}}function j(e){var t=M(e)?e.lookahead():e.token;if(t.kind===Ee.TokenKind.NAME)switch(t.value){case"schema":return L(e);case"scalar":return B(e);case"type":return F(e);case"interface":return W(e);case"union":return J(e);case"enum":return X(e);case"input":return Z(e);case"extend":return te(e);case"directive":return ue(e)}throw ge(e,t)}function M(e){return de(e,Ee.TokenKind.STRING)||de(e,Ee.TokenKind.BLOCK_STRING)}function U(e){if(M(e))return C(e)}function L(e){var t=e.token;ye(e,"schema");var n=P(e,!0),r=be(e,Ee.TokenKind.BRACE_L,q,Ee.TokenKind.BRACE_R);return{kind:Ie.Kind.SCHEMA_DEFINITION,directives:n,operationTypes:r,loc:pe(e,t)}}function q(e){var t=e.token,n=p(e);me(e,Ee.TokenKind.COLON);var r=D(e);return{kind:Ie.Kind.OPERATION_TYPE_DEFINITION,operation:n,type:r,loc:pe(e,t)}}function B(e){var t=e.token,n=U(e);ye(e,"scalar");var r=a(e),i=P(e,!0);return{kind:Ie.Kind.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i,loc:pe(e,t)}}function F(e){var t=e.token,n=U(e);ye(e,"type");var r=a(e),i=V(e),o=P(e,!0),s=z(e);return{kind:Ie.Kind.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:s,loc:pe(e,t)}}function V(e){var t=[];if("implements"===e.token.value){e.advance(),he(e,Ee.TokenKind.AMP);do{t.push(D(e))}while(he(e,Ee.TokenKind.AMP)||e.options.allowLegacySDLImplementsInterfaces&&de(e,Ee.TokenKind.NAME))}return t}function z(e){return e.options.allowLegacySDLEmptyFields&&de(e,Ee.TokenKind.BRACE_L)&&e.lookahead().kind===Ee.TokenKind.BRACE_R?(e.advance(),e.advance(),[]):de(e,Ee.TokenKind.BRACE_L)?be(e,Ee.TokenKind.BRACE_L,K,Ee.TokenKind.BRACE_R):[]}function K(e){var t=e.token,n=U(e),r=a(e),i=G(e);me(e,Ee.TokenKind.COLON);var o=x(e),s=P(e,!0);return{kind:Ie.Kind.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:s,loc:pe(e,t)}}function G(e){return de(e,Ee.TokenKind.PAREN_L)?be(e,Ee.TokenKind.PAREN_L,H,Ee.TokenKind.PAREN_R):[]}function H(e){var t=e.token,n=U(e),r=a(e);me(e,Ee.TokenKind.COLON);var i=x(e),o=void 0;he(e,Ee.TokenKind.EQUALS)&&(o=T(e));var s=P(e,!0);return{kind:Ie.Kind.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:s,loc:pe(e,t)}}function W(e){var t=e.token,n=U(e);ye(e,"interface");var r=a(e),i=P(e,!0),o=z(e);return{kind:Ie.Kind.INTERFACE_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:pe(e,t)}}function J(e){var t=e.token,n=U(e);ye(e,"union");var r=a(e),i=P(e,!0),o=Y(e);return{kind:Ie.Kind.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o,loc:pe(e,t)}}function Y(e){var t=[];if(he(e,Ee.TokenKind.EQUALS)){he(e,Ee.TokenKind.PIPE);do{t.push(D(e))}while(he(e,Ee.TokenKind.PIPE))}return t}function X(e){var t=e.token,n=U(e);ye(e,"enum");var r=a(e),i=P(e,!0),o=Q(e);return{kind:Ie.Kind.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o,loc:pe(e,t)}}function Q(e){return de(e,Ee.TokenKind.BRACE_L)?be(e,Ee.TokenKind.BRACE_L,$,Ee.TokenKind.BRACE_R):[]}function $(e){var t=e.token,n=U(e),r=a(e),i=P(e,!0);return{kind:Ie.Kind.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i,loc:pe(e,t)}}function Z(e){var t=e.token,n=U(e);ye(e,"input");var r=a(e),i=P(e,!0),o=ee(e);return{kind:Ie.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o,loc:pe(e,t)}}function ee(e){return de(e,Ee.TokenKind.BRACE_L)?be(e,Ee.TokenKind.BRACE_L,H,Ee.TokenKind.BRACE_R):[]}function te(e){var t=e.lookahead();if(t.kind===Ee.TokenKind.NAME)switch(t.value){case"scalar":return ne(e);case"type":return re(e);case"interface":return ie(e);case"union":return oe(e);case"enum":return ae(e);case"input":return se(e)}throw ge(e,t)}function ne(e){var t=e.token;ye(e,"extend"),ye(e,"scalar");var n=a(e),r=P(e,!0);if(0===r.length)throw ge(e);return{kind:Ie.Kind.SCALAR_TYPE_EXTENSION,name:n,directives:r,loc:pe(e,t)}}function re(e){var t=e.token;ye(e,"extend"),ye(e,"type");var n=a(e),r=V(e),i=P(e,!0),o=z(e);if(0===r.length&&0===i.length&&0===o.length)throw ge(e);return{kind:Ie.Kind.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o,loc:pe(e,t)}}function ie(e){var t=e.token;ye(e,"extend"),ye(e,"interface");var n=a(e),r=P(e,!0),i=z(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.Kind.INTERFACE_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:pe(e,t)}}function oe(e){var t=e.token;ye(e,"extend"),ye(e,"union");var n=a(e),r=P(e,!0),i=Y(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.Kind.UNION_TYPE_EXTENSION,name:n,directives:r,types:i,loc:pe(e,t)}}function ae(e){var t=e.token;ye(e,"extend"),ye(e,"enum");var n=a(e),r=P(e,!0),i=Q(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.Kind.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i,loc:pe(e,t)}}function se(e){var t=e.token;ye(e,"extend"),ye(e,"input");var n=a(e),r=P(e,!0),i=ee(e);if(0===r.length&&0===i.length)throw ge(e);return{kind:Ie.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i,loc:pe(e,t)}}function ue(e){var t=e.token,n=U(e);ye(e,"directive"),me(e,Ee.TokenKind.AT);var r=a(e),i=G(e);ye(e,"on");var o=ce(e);return{kind:Ie.Kind.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,locations:o,loc:pe(e,t)}}function ce(e){he(e,Ee.TokenKind.PIPE);var t=[];do{t.push(le(e))}while(he(e,Ee.TokenKind.PIPE));return t}function le(e){var t=e.token,n=a(e);if(we.DirectiveLocation.hasOwnProperty(n.value))return n;throw ge(e,t)}function pe(e,t){if(!e.options.noLocation)return new fe(t,e.lastToken,e.source)}function fe(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}function de(e,t){return e.token.kind===t}function he(e,t){var n=e.token.kind===t;return n&&e.advance(),n}function me(e,t){var n=e.token;if(n.kind===t)return e.advance(),n;throw(0,Se.syntaxError)(e.source,n.start,"Expected "+t+", found "+(0,Ee.getTokenDesc)(n))}function ye(e,t){var n=e.token;if(n.kind===Ee.TokenKind.NAME&&n.value===t)return e.advance(),n;throw(0,Se.syntaxError)(e.source,n.start,'Expected "'+t+'", found '+(0,Ee.getTokenDesc)(n))}function ge(e,t){var n=t||e.token;return(0,Se.syntaxError)(e.source,n.start,"Unexpected "+(0,Ee.getTokenDesc)(n))}function ve(e,t,n,r){me(e,t);for(var i=[];!he(e,r);)i.push(n(e));return i}function be(e,t,n,r){me(e,t);for(var i=[n(e)];!he(e,r);)i.push(n(e));return i}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=r,t.parseValue=i,t.parseType=o,t.parseConstValue=T,t.parseTypeReference=x,t.parseNamedType=D;var _e=n(343),Se=n(151),Ee=n(347),Ie=n(349),we=n(350);fe.prototype.toJSON=fe.prototype.inspect=function(){return{start:this.start,end:this.end}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0;var i=n(150),o=function(e){return e&&e.__esModule?e:{default:e}}(i);t.Source=function e(t,n,i){r(this,e),this.body=t,this.name=n||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,o.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,o.default)(0,"column in locationOffset is 1-indexed and must be positive")}},function(e,t,n){"use strict";function r(e,t,n){return new i.GraphQLError("Syntax Error: "+n,void 0,e,[t])}Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=r;var i=n(70)},function(e,t,n){"use strict";function r(e,t,n){return e&&Array.isArray(e.path)?e:new i.GraphQLError(e&&e.message,e&&e.nodes||t,e&&e.source,e&&e.positions,n,e)}Object.defineProperty(t,"__esModule",{value:!0}),t.locatedError=r;var i=n(70)},function(e,t,n){"use strict";function r(e){return e||(0,a.default)(0,"Received null or undefined error."),i({},e.extensions,{message:e.message||"An unknown error occurred.",locations:e.locations,path:e.path})}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.formatError=r;var o=n(150),a=function(e){return e&&e.__esModule?e:{default:e}}(o)},function(e,t,n){"use strict";function r(e,t){var n=new s(I.SOF,0,0,0,0,null);return{source:e,options:t,lastToken:n,token:n,line:1,lineStart:0,advance:i,lookahead:o}}function i(){return this.lastToken=this.token,this.token=this.lookahead()}function o(){var e=this.token;if(e.kind!==I.EOF)do{e=e.next||(e.next=c(this,e))}while(e.kind===I.COMMENT);return e}function a(e){var t=e.value;return t?e.kind+' "'+t+'"':e.kind}function s(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function u(e){return isNaN(e)?I.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function c(e,t){var n=e.source,r=n.body,i=r.length,o=p(r,t.end,e),a=e.line,c=1+o-e.lineStart;if(o>=i)return new s(I.EOF,i,i,a,c,t);var h=w.call(r,o);if(h<32&&9!==h&&10!==h&&13!==h)throw(0,_.syntaxError)(n,o,"Cannot contain the invalid character "+u(h)+".");switch(h){case 33:return new s(I.BANG,o,o+1,a,c,t);case 35:return f(n,o,a,c,t);case 36:return new s(I.DOLLAR,o,o+1,a,c,t);case 38:return new s(I.AMP,o,o+1,a,c,t);case 40:return new s(I.PAREN_L,o,o+1,a,c,t);case 41:return new s(I.PAREN_R,o,o+1,a,c,t);case 46:if(46===w.call(r,o+1)&&46===w.call(r,o+2))return new s(I.SPREAD,o,o+3,a,c,t);break;case 58:return new s(I.COLON,o,o+1,a,c,t);case 61:return new s(I.EQUALS,o,o+1,a,c,t);case 64:return new s(I.AT,o,o+1,a,c,t);case 91:return new s(I.BRACKET_L,o,o+1,a,c,t);case 93:return new s(I.BRACKET_R,o,o+1,a,c,t);case 123:return new s(I.BRACE_L,o,o+1,a,c,t);case 124:return new s(I.PIPE,o,o+1,a,c,t);case 125:return new s(I.BRACE_R,o,o+1,a,c,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return b(n,o,a,c,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return d(n,o,h,a,c,t);case 34:return 34===w.call(r,o+1)&&34===w.call(r,o+2)?y(n,o,a,c,t):m(n,o,a,c,t)}throw(0,_.syntaxError)(n,o,l(h))}function l(e){return 39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character "+u(e)+"."}function p(e,t,n){for(var r=e.length,i=t;i<r;){var o=w.call(e,i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++n.line,n.lineStart=i;else{if(13!==o)break;10===w.call(e,i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}function f(e,t,n,r,i){var o=e.body,a=void 0,u=t;do{a=w.call(o,++u)}while(null!==a&&(a>31||9===a));return new s(I.COMMENT,t,u,n,r,i,C.call(o,t+1,u))}function d(e,t,n,r,i,o){var a=e.body,c=n,l=t,p=!1;if(45===c&&(c=w.call(a,++l)),48===c){if((c=w.call(a,++l))>=48&&c<=57)throw(0,_.syntaxError)(e,l,"Invalid number, unexpected digit after 0: "+u(c)+".")}else l=h(e,l,c),c=w.call(a,l);return 46===c&&(p=!0,c=w.call(a,++l),l=h(e,l,c),c=w.call(a,l)),69!==c&&101!==c||(p=!0,c=w.call(a,++l),43!==c&&45!==c||(c=w.call(a,++l)),l=h(e,l,c)),new s(p?I.FLOAT:I.INT,t,l,r,i,o,C.call(a,t,l))}function h(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=w.call(r,++i)}while(o>=48&&o<=57);return i}throw(0,_.syntaxError)(e,i,"Invalid number, expected digit but got: "+u(o)+".")}function m(e,t,n,r,i){for(var o=e.body,a=t+1,c=a,l=0,p="";a<o.length&&null!==(l=w.call(o,a))&&10!==l&&13!==l;){if(34===l)return p+=C.call(o,c,a),new s(I.STRING,t,a+1,n,r,i,p);if(l<32&&9!==l)throw(0,_.syntaxError)(e,a,"Invalid character within String: "+u(l)+".");if(++a,92===l){switch(p+=C.call(o,c,a-1),l=w.call(o,a)){case 34:p+='"';break;case 47:p+="/";break;case 92:p+="\\";break;case 98:p+="\b";break;case 102:p+="\f";break;case 110:p+="\n";break;case 114:p+="\r";break;case 116:p+="\t";break;case 117:var f=g(w.call(o,a+1),w.call(o,a+2),w.call(o,a+3),w.call(o,a+4));if(f<0)throw(0,_.syntaxError)(e,a,"Invalid character escape sequence: \\u"+o.slice(a+1,a+5)+".");p+=String.fromCharCode(f),a+=4;break;default:throw(0,_.syntaxError)(e,a,"Invalid character escape sequence: \\"+String.fromCharCode(l)+".")}++a,c=a}}throw(0,_.syntaxError)(e,a,"Unterminated string.")}function y(e,t,n,r,i){for(var o=e.body,a=t+3,c=a,l=0,p="";a<o.length&&null!==(l=w.call(o,a));){if(34===l&&34===w.call(o,a+1)&&34===w.call(o,a+2))return p+=C.call(o,c,a),new s(I.BLOCK_STRING,t,a+3,n,r,i,(0,E.default)(p));if(l<32&&9!==l&&10!==l&&13!==l)throw(0,_.syntaxError)(e,a,"Invalid character within String: "+u(l)+".");92===l&&34===w.call(o,a+1)&&34===w.call(o,a+2)&&34===w.call(o,a+3)?(p+=C.call(o,c,a)+'"""',a+=4,c=a):++a}throw(0,_.syntaxError)(e,a,"Unterminated string.")}function g(e,t,n,r){return v(e)<<12|v(t)<<8|v(n)<<4|v(r)}function v(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function b(e,t,n,r,i){for(var o=e.body,a=o.length,u=t+1,c=0;u!==a&&null!==(c=w.call(o,u))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++u;return new s(I.NAME,t,u,n,r,i,C.call(o,t,u))}Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0,t.createLexer=r,t.getTokenDesc=a;var _=n(151),S=n(348),E=function(e){return e&&e.__esModule?e:{default:e}}(S),I=t.TokenKind=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),w=String.prototype.charCodeAt,C=String.prototype.slice;s.prototype.toJSON=s.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},function(e,t,n){"use strict";function r(e){for(var t=e.split(/\r\n|[\n\r]/g),n=null,r=1;r<t.length;r++){var a=t[r],s=i(a);if(s<a.length&&(null===n||s<n)&&0===(n=s))break}if(n)for(var u=1;u<t.length;u++)t[u]=t[u].slice(n);for(;t.length>0&&o(t[0]);)t.shift();for(;t.length>0&&o(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=0;t<e.length&&(" "===e[t]||"\t"===e[t]);)t++;return t}function o(e){return i(e)===e.length}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",VARIABLE:"Variable",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension",DIRECTIVE_DEFINITION:"DirectiveDefinition"})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function o(e){var t=e.constructor;return void 0!==t&&null===(t=t[_])&&(t=void 0),void 0!==t?t:I}function a(e){return e instanceof I}function s(e){s.log?s.log(e):setTimeout(function(){throw e})}function u(e){Promise.resolve().then(function(){try{e()}catch(e){s(e)}})}function c(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=i(t,"unsubscribe");n&&n.call(t)}}catch(e){s(e)}}function l(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function p(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(f(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}function f(e,t,n){e._state="running";var r=e._observer;try{var o=i(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(l(e),!o)throw n;o.call(r,n);break;case"complete":l(e),o&&o.call(r)}}catch(e){s(e)}"closed"===e._state?c(e):"running"===e._state&&(e._state="ready")}function d(e,t,n){if("closed"!==e._state)return"buffering"===e._state?void e._queue.push({type:t,value:n}):"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void u(function(){return p(e)})):void f(e,t,n)}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),m=function(){return"function"==typeof Symbol},y=function(e){return m()&&Boolean(Symbol[e])},g=function(e){return y(e)?Symbol[e]:"@@"+e};m()&&!y("observable")&&(Symbol.observable=Symbol("observable"));var v=g("iterator"),b=g("observable"),_=g("species"),S=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new E(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return h(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(l(this),c(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),E=function(){function e(t){r(this,e),this._subscription=t}return h(e,[{key:"next",value:function(e){d(this._subscription,"next",e)}},{key:"error",value:function(e){d(this._subscription,"error",e)}},{key:"complete",value:function(){d(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),I=t.Observable=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return h(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new S(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise(function(n,r){function i(){o.unsubscribe(),n()}if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n})})}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(o(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(o(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=o(this),r=arguments.length>1,i=!1,a=arguments[1],s=a;return new n(function(n){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||r)try{s=e(s,t)}catch(e){return n.error(e)}else s=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(s),n.complete()}})})}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=o(this);return new i(function(t){function r(e){o=e.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){a===n.length?(o=void 0,t.complete()):r(i.from(n[a++]))}})}var o=void 0,a=0;return r(e),function(){o&&(o.unsubscribe(),o=void 0)}})}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=o(this);return new n(function(r){function i(){a.closed&&0===o.length&&r.complete()}var o=[],a=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var a=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(a);e>=0&&o.splice(e,1),i()}});o.push(a)},error:function(e){r.error(e)},complete:function(){i()}});return function(){o.forEach(function(e){return e.unsubscribe()}),a.unsubscribe()}})}},{key:b,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=i(t,b);if(r){var o=r.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return a(o)&&o.constructor===n?o:new n(function(e){return o.subscribe(e)})}if(y("iterator")&&(r=i(t,v)))return new n(function(e){u(function(){if(!e.closed){var n=!0,i=!1,o=void 0;try{for(var a,s=r.call(t)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}e.complete()}})});if(Array.isArray(t))return new n(function(e){u(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){u(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})}},{key:_,get:function(){return this}}]),e}();m()&&Object.defineProperty(I,Symbol("extensions"),{value:{symbol:b,hostReportError:s},configurable:!0})},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),u=n(353),c=new s.ConsoleLogger("RestClient"),l=n(31),p=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,e.endpoints,this._options=e,c.debug("API Options",this._options)}return e.prototype.ajax=function(e,t,n){return i(this,void 0,void 0,function(){var i,u,p,f,d,h,m,y,g,v,b,_=this;return o(this,function(o){switch(o.label){case 0:return c.debug(t+" "+e),i=this._parseUrl(e),u={method:t,url:e,host:i.host,path:i.path,headers:{},data:null,responseType:"json"},p={},s.Platform.isReactNative&&(f=s.Platform.userAgent||"aws-amplify/0.1.x",p={"User-Agent":f}),d=Object.assign({},n),h=d.response,d.body&&(p["Content-Type"]="application/json; charset=UTF-8",u.data=JSON.stringify(d.body)),d.responseType&&(u.responseType=d.responseType),u.signerServiceInfo=d.signerServiceInfo,this._custom_header?[4,this._custom_header()]:[3,2];case 1:return y=o.sent(),[3,3];case 2:y=void 0,o.label=3;case 3:return m=y,u.headers=r({},p,m,d.headers),g=l.parse(e,!0,!0),v=g.search,b=a(g,["search"]),u.url=l.format(r({},b,{query:r({},b.query,d.queryStringParameters||{})})),void 0!==u.headers.Authorization?(u.headers=Object.keys(u.headers).reduce(function(e,t){return u.headers[t]&&(e[t]=u.headers[t]),e},{}),[2,this._request(u,h)]):[2,s.Credentials.get().then(function(e){return _._signed(r({},u),e,h)},function(e){return c.debug("No credentials available, the request will be unsigned"),_._request(u,h)})]}})})},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach(function(n){n.name===e&&(r=n.endpoint,"string"==typeof n.region?t._region=n.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"==typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)}),r):r},e.prototype._signed=function(e,t,n){var r=e.signerServiceInfo,i=a(e,["signerServiceInfo"]),o=this._region||this._options.region,l=this._service||this._options.service,p={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},f={region:o,service:l},d=Object.assign(f,r),h=s.Signer.sign(i,p,d);return h.data&&(h.body=h.data),c.debug("Signed Request: ",h),delete h.headers.host,u.default(h).then(function(e){return n?e:e.data}).catch(function(e){throw c.debug(e),e})},e.prototype._request=function(e,t){return void 0===t&&(t=!1),u.default(e).then(function(e){return t?e:e.data}).catch(function(e){throw c.debug(e),e})},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}();t.RestClient=p},function(e,t,n){e.exports=n(354)},function(e,t,n){"use strict";function r(e){var t=new a(e),n=o(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n}var i=n(8),o=n(154),a=n(356),s=n(160),u=n(157),c=r(u);c.Axios=a,c.create=function(e){return r(s(c.defaults,e))},c.Cancel=n(161),c.CancelToken=n(368),c.isCancel=n(156),c.all=function(e){return Promise.all(e)},c.spread=n(369),e.exports=c,e.exports.default=c},function(e,t){/*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new a,response:new a}}var i=n(8),o=n(155),a=n(357),s=n(358),u=n(160);r.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=u(this.defaults,e),e.method=e.method?e.method.toLowerCase():"get";var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},r.prototype.getUri=function(e){return e=u(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(){this.handlers=[]}var i=n(8);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var i=n(8),o=n(359),a=n(156),s=n(157),u=n(366),c=n(367);e.exports=function(e){return r(e),e.baseURL&&!u(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(159);e.exports=function(e,t,n){var i=n.config.validateStatus;!i||i(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(8),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(8);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return t=e(window.location.href),function(n){var i=r.isString(n)?e(n):n;return i.protocol===t.protocol&&i.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(8);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new i(e),t(n.reason))})}var i=n(161);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(371);t.PubSubClass=r.default;var i=n(1),o=new i.ConsoleLogger("PubSub"),a=null;a||(o.debug("Create PubSub Instance"),a=new r.default(null));var s=a;i.default.register(s),t.default=s,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(164))},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(49),a=n(1),s=n(162),u=n(372),c=new a.ConsoleLogger("PubSub"),l=function(){function e(e){this._options=e,c.debug("PubSub Options",this._options),this._pluggables=[],this.subscribe=this.subscribe.bind(this)}return Object.defineProperty(e.prototype,"awsAppSyncProvider",{get:function(){return this._awsAppSyncProvider||(this._awsAppSyncProvider=new u.AWSAppSyncProvider),this._awsAppSyncProvider},enumerable:!0,configurable:!0}),e.prototype.getModuleName=function(){return"PubSub"},e.prototype.configure=function(e){var t=this,n=e?e.PubSub||e:{};return c.debug("configure PubSub",{opt:n}),this._options=Object.assign({},this._options,n),this._pluggables.map(function(e){return e.configure(t._options)}),this._options},e.prototype.addPluggable=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){return e&&"PubSub"===e.getCategory()?(this._pluggables.push(e),t=e.configure(this._options),[2,t]):[2]})})},e.prototype.getProviderByName=function(e){return e===s.INTERNAL_AWS_APPSYNC_PUBSUB_PROVIDER?this.awsAppSyncProvider:this._pluggables.find(function(t){return t.getProviderName()===e})},e.prototype.getProviders=function(e){void 0===e&&(e={});var t=e.provider;if(!t)return this._pluggables;var n=this.getProviderByName(t);if(!n)throw new Error("Could not find provider named "+t);return[n]},e.prototype.publish=function(e,t,n){return r(this,void 0,void 0,function(){return i(this,function(r){return[2,Promise.all(this.getProviders(n).map(function(r){return r.publish(e,t,n)}))]})})},e.prototype.subscribe=function(e,t){c.debug("subscribe options",t);var n=this.getProviders(t);return new o(function(r){var i=n.map(function(n){return{provider:n,observable:n.subscribe(e,t)}}),o=i.map(function(e){var t=e.provider;return e.observable.subscribe({start:console.error,next:function(e){return r.next({provider:t,value:e})},error:function(e){return r.error({provider:t,error:e})}})});return function(){return o.forEach(function(e){return e.unsubscribe()})}})},e}();t.default=l},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(163)),r(n(373)),r(n(164)),r(n(71))},function(e,t,n){"use strict";var r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(49),u=n(1),c=n(71),l=new u.ConsoleLogger("AWSAppSyncProvider"),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._topicClient=new Map,t._topicAlias=new Map,t}return r(t,e),Object.defineProperty(t.prototype,"endpoint",{get:function(){throw new Error("Not supported")},enumerable:!0,configurable:!0}),t.prototype.getProviderName=function(){return"AWSAppSyncProvider"},t.prototype.publish=function(e,t,n){return i(this,void 0,void 0,function(){return o(this,function(e){throw new Error("Operation not supported")})})},t.prototype._cleanUp=function(e){var t=this;Array.from(this._topicClient.entries()).filter(function(t){return t[1].clientId===e}).map(function(e){return e[0]}).forEach(function(e){return t._cleanUpForTopic(e)})},t.prototype._cleanUpForTopic=function(e){this._topicClient.delete(e),this._topicAlias.delete(e)},t.prototype.onDisconnect=function(e){var t=this,n=e.clientId,r=e.errorCode,i=a(e,["clientId","errorCode"]);0!==r&&(Array.from(this._topicClient.entries()).filter(function(e){return e[1].clientId===n}).map(function(e){return e[0]}).forEach(function(e){t._topicObservers.has(e)&&(t._topicObservers.get(e).forEach(function(e){e.closed||e.error(i)}),t._topicObservers.delete(e))}),this._cleanUp(n))},t.prototype.disconnect=function(t){return i(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:return[4,this.clientsQueue.get(t,function(){return null})];case 1:return n=r.sent(),[4,e.prototype.disconnect.call(this,t)];case 2:return r.sent(),this._cleanUp(t),[2]}})})},t.prototype.subscribe=function(e,t){var n=this;void 0===t&&(t={});var r=new s(function(r){var a=[].concat(e);return l.debug("Subscribing to topic(s)",a.join(",")),function(){i(n,void 0,void 0,function(){var e,n,s,u,c,l=this;return o(this,function(p){switch(p.label){case 0:return a.forEach(function(e){l._topicObservers.has(e)||l._topicObservers.set(e,new Set),l._topicObservers.get(e).add(r)}),e=t.mqttConnections,n=void 0===e?[]:e,s=t.newSubscriptions,u=Object.entries(s).map(function(e){var t=e[0];return[e[1].topic,t]}),this._topicAlias=new Map(Array.from(this._topicAlias.entries()).concat(u)),c=Object.entries(a.reduce(function(e,t){var r=n.find(function(e){return e.topics.indexOf(t)>-1});if(r){var i=r.client,o=r.url;e[i]||(e[i]={url:o,topics:new Set}),e[i].topics.add(t)}return e},{})),[4,Promise.all(c.map(function(e){var t=e[0],n=e[1],r=n.url,a=n.topics;return i(l,void 0,void 0,function(){var e,n=this;return o(this,function(i){switch(i.label){case 0:return[4,this.connect(t,{clientId:t,url:r})];case 1:return e=i.sent(),a.forEach(function(t){e.isConnected()&&(e.subscribe(t),n._topicClient.set(t,e))}),[2,e]}})})}))];case 1:return p.sent(),[2]}})})}(),function(){l.debug("Unsubscribing from topic(s)",a.join(",")),a.forEach(function(e){var t=n._topicClient.get(e);t&&t.isConnected()&&(t.unsubscribe(e),n._topicClient.delete(e),Array.from(n._topicClient.values()).some(function(e){return e===t})||n.disconnect(t.clientId)),n._topicObservers.delete(e)})}});return s.from(r).map(function(e){var t=n.getTopicForValue(e),r=n._topicAlias.get(t);return e.data=Object.entries(e.data).reduce(function(e,t){var n=t[0],i=t[1];return e[r||n]=i,e},{}),e})},t}(c.MqttOverWSProvider);t.AWSAppSyncProvider=p},function(e,t,n){"use strict";(function(e,r){var i,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,s){"object"===a(t)&&"object"===a(r)?r.exports=s():(i=s,void 0!==(o="function"==typeof i?i.call(t,n,t,r):i)&&(r.exports=o))}(0,function(){var t=function(e){function n(e,n){var r=n,i=e[n],a=i>>4,s=i&=15;n+=1;var u,c=0,p=1;do{if(n==e.length)return[null,r];u=e[n++],c+=(127&u)*p,p*=128}while(0!=(128&u));var d=n+c;if(d>e.length)return[null,r];var h=new _(a);switch(a){case f.CONNACK:1&e[n++]&&(h.sessionPresent=!0),h.returnCode=e[n++];break;case f.PUBLISH:var m=s>>1&3,y=o(e,n);n+=2;var g=l(e,n,y);n+=y,m>0&&(h.messageIdentifier=o(e,n),n+=2);var v=new t.Message(e.subarray(n,d));1==(1&s)&&(v.retained=!0),8==(8&s)&&(v.duplicate=!0),v.qos=m,v.destinationName=g,h.payloadMessage=v;break;case f.PUBACK:case f.PUBREC:case f.PUBREL:case f.PUBCOMP:case f.UNSUBACK:h.messageIdentifier=o(e,n);break;case f.SUBACK:h.messageIdentifier=o(e,n),n+=2,h.returnCode=e.subarray(n,d)}return[h,d]}function r(e,t,n){return t[n++]=e>>8,t[n++]=e%256,n}function i(e,t,n,i){return i=r(t,n,i),c(e,n,i),i+t}function o(e,t){return 256*e[t]+e[t+1]}function s(e){var t=new Array(1),n=0;do{var r=e%128;e>>=7,e>0&&(r|=128),t[n++]=r}while(e>0&&n<4);return t}function u(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);r>2047?(55296<=r&&r<=56319&&(n++,t++),t+=3):r>127?t+=2:t++}return t}function c(e,t,n){for(var r=n,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(55296<=o&&o<=56319){var a=e.charCodeAt(++i);if(isNaN(a))throw new Error(g(m.MALFORMED_UNICODE,[o,a]));o=a-56320+(o-55296<<10)+65536}o<=127?t[r++]=o:o<=2047?(t[r++]=o>>6&31|192,t[r++]=63&o|128):o<=65535?(t[r++]=o>>12&15|224,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>18&7|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return t}function l(e,t,n){for(var r,i="",o=t;o<t+n;){var a=e[o++];if(a<128)r=a;else{var s=e[o++]-128;if(s<0)throw new Error(g(m.MALFORMED_UTF,[a.toString(16),s.toString(16),""]));if(a<224)r=64*(a-192)+s;else{var u=e[o++]-128;if(u<0)throw new Error(g(m.MALFORMED_UTF,[a.toString(16),s.toString(16),u.toString(16)]));if(a<240)r=4096*(a-224)+64*s+u;else{var c=e[o++]-128;if(c<0)throw new Error(g(m.MALFORMED_UTF,[a.toString(16),s.toString(16),u.toString(16),c.toString(16)]));if(!(a<248))throw new Error(g(m.MALFORMED_UTF,[a.toString(16),s.toString(16),u.toString(16),c.toString(16)]));r=262144*(a-240)+4096*s+64*u+c}}}r>65535&&(r-=65536,i+=String.fromCharCode(55296+(r>>10)),r=56320+(1023&r)),i+=String.fromCharCode(r)}return i}var p=e.localStorage||function(){var e={};return{setItem:function(t,n){e[t]=n},getItem:function(t){return e[t]},removeItem:function(t){delete e[t]}}}(),f={CONNECT:1,CONNACK:2,PUBLISH:3,PUBACK:4,PUBREC:5,PUBREL:6,PUBCOMP:7,SUBSCRIBE:8,SUBACK:9,UNSUBSCRIBE:10,UNSUBACK:11,PINGREQ:12,PINGRESP:13,DISCONNECT:14},d=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if(!t.hasOwnProperty(n)){var r="Unknown property, "+n+". Valid properties are:";for(var i in t)t.hasOwnProperty(i)&&(r=r+" "+i);throw new Error(r)}if(a(e[n])!==t[n])throw new Error(g(m.INVALID_TYPE,[a(e[n]),n]))}},h=function(e,t){return function(){return e.apply(t,arguments)}},m={OK:{code:0,text:"AMQJSC0000I OK."},CONNECT_TIMEOUT:{code:1,text:"AMQJSC0001E Connect timed out."},SUBSCRIBE_TIMEOUT:{code:2,text:"AMQJS0002E Subscribe timed out."},UNSUBSCRIBE_TIMEOUT:{code:3,text:"AMQJS0003E Unsubscribe timed out."},PING_TIMEOUT:{code:4,text:"AMQJS0004E Ping timed out."},INTERNAL_ERROR:{code:5,text:"AMQJS0005E Internal error. Error Message: {0}, Stack trace: {1}"},CONNACK_RETURNCODE:{code:6,text:"AMQJS0006E Bad Connack return code:{0} {1}."},SOCKET_ERROR:{code:7,text:"AMQJS0007E Socket error:{0}."},SOCKET_CLOSE:{code:8,text:"AMQJS0008I Socket closed."},MALFORMED_UTF:{code:9,text:"AMQJS0009E Malformed UTF data:{0} {1} {2}."},UNSUPPORTED:{code:10,text:"AMQJS0010E {0} is not supported by this browser."},INVALID_STATE:{code:11,text:"AMQJS0011E Invalid state {0}."},INVALID_TYPE:{code:12,text:"AMQJS0012E Invalid type {0} for {1}."},INVALID_ARGUMENT:{code:13,text:"AMQJS0013E Invalid argument {0} for {1}."},UNSUPPORTED_OPERATION:{code:14,text:"AMQJS0014E Unsupported operation."},INVALID_STORED_DATA:{code:15,text:"AMQJS0015E Invalid data in local storage key={0} value={1}."},INVALID_MQTT_MESSAGE_TYPE:{code:16,text:"AMQJS0016E Invalid MQTT message type {0}."},MALFORMED_UNICODE:{code:17,text:"AMQJS0017E Malformed Unicode string:{0} {1}."},BUFFER_FULL:{code:18,text:"AMQJS0018E Message buffer is full, maximum buffer size: {0}."}},y={0:"Connection Accepted",1:"Connection Refused: unacceptable protocol version",2:"Connection Refused: identifier rejected",3:"Connection Refused: server unavailable",4:"Connection Refused: bad user name or password",5:"Connection Refused: not authorized"},g=function(e,t){var n=e.text;if(t)for(var r,i,o=0;o<t.length;o++)if(r="{"+o+"}",(i=n.indexOf(r))>0){var a=n.substring(0,i),s=n.substring(i+r.length);n=a+t[o]+s}return n},v=[0,6,77,81,73,115,100,112,3],b=[0,4,77,81,84,84,4],_=function(e,t){this.type=e;for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n])};_.prototype.encode=function(){var e,t=(15&this.type)<<4,n=0,o=[],a=0;switch(void 0!==this.messageIdentifier&&(n+=2),this.type){case f.CONNECT:switch(this.mqttVersion){case 3:n+=v.length+3;break;case 4:n+=b.length+3}n+=u(this.clientId)+2,void 0!==this.willMessage&&(n+=u(this.willMessage.destinationName)+2,e=this.willMessage.payloadBytes,e instanceof Uint8Array||(e=new Uint8Array(l)),n+=e.byteLength+2),void 0!==this.userName&&(n+=u(this.userName)+2),void 0!==this.password&&(n+=u(this.password)+2);break;case f.SUBSCRIBE:t|=2;for(var c=0;c<this.topics.length;c++)o[c]=u(this.topics[c]),n+=o[c]+2;n+=this.requestedQos.length;break;case f.UNSUBSCRIBE:t|=2;for(var c=0;c<this.topics.length;c++)o[c]=u(this.topics[c]),n+=o[c]+2;break;case f.PUBREL:t|=2;break;case f.PUBLISH:this.payloadMessage.duplicate&&(t|=8),t=t|=this.payloadMessage.qos<<1,this.payloadMessage.retained&&(t|=1),a=u(this.payloadMessage.destinationName),n+=a+2;var l=this.payloadMessage.payloadBytes;n+=l.byteLength,l instanceof ArrayBuffer?l=new Uint8Array(l):l instanceof Uint8Array||(l=new Uint8Array(l.buffer));break;case f.DISCONNECT:}var p=s(n),d=p.length+1,h=new ArrayBuffer(n+d),m=new Uint8Array(h);if(m[0]=t,m.set(p,1),this.type==f.PUBLISH)d=i(this.payloadMessage.destinationName,a,m,d);else if(this.type==f.CONNECT){switch(this.mqttVersion){case 3:m.set(v,d),d+=v.length;break;case 4:m.set(b,d),d+=b.length}var y=0;this.cleanSession&&(y=2),void 0!==this.willMessage&&(y|=4,y|=this.willMessage.qos<<3,this.willMessage.retained&&(y|=32)),void 0!==this.userName&&(y|=128),void 0!==this.password&&(y|=64),m[d++]=y,d=r(this.keepAliveInterval,m,d)}switch(void 0!==this.messageIdentifier&&(d=r(this.messageIdentifier,m,d)),this.type){case f.CONNECT:d=i(this.clientId,u(this.clientId),m,d),void 0!==this.willMessage&&(d=i(this.willMessage.destinationName,u(this.willMessage.destinationName),m,d),d=r(e.byteLength,m,d),m.set(e,d),d+=e.byteLength),void 0!==this.userName&&(d=i(this.userName,u(this.userName),m,d)),void 0!==this.password&&(d=i(this.password,u(this.password),m,d));break;case f.PUBLISH:m.set(l,d);break;case f.SUBSCRIBE:for(var c=0;c<this.topics.length;c++)d=i(this.topics[c],o[c],m,d),m[d++]=this.requestedQos[c];break;case f.UNSUBSCRIBE:for(var c=0;c<this.topics.length;c++)d=i(this.topics[c],o[c],m,d)}return h};var S=function(e,t){this._client=e,this._keepAliveInterval=1e3*t,this.isReset=!1;var n=new _(f.PINGREQ).encode(),r=function(e){return function(){return i.apply(e)}},i=function(){this.isReset?(this.isReset=!1,this._client._trace("Pinger.doPing","send PINGREQ"),this._client.socket.send(n),this.timeout=setTimeout(r(this),this._keepAliveInterval)):(this._client._trace("Pinger.doPing","Timed out"),this._client._disconnected(m.PING_TIMEOUT.code,g(m.PING_TIMEOUT)))};this.reset=function(){this.isReset=!0,clearTimeout(this.timeout),this._keepAliveInterval>0&&(this.timeout=setTimeout(r(this),this._keepAliveInterval))},this.cancel=function(){clearTimeout(this.timeout)}},E=function(e,t,n,r){t||(t=30),this.timeout=setTimeout(function(e,t,n){return function(){return e.apply(t,n)}}(n,e,r),1e3*t),this.cancel=function(){clearTimeout(this.timeout)}},I=function(t,n,r,i,o){if(!("WebSocket"in e&&null!==e.WebSocket))throw new Error(g(m.UNSUPPORTED,["WebSocket"]));if(!("ArrayBuffer"in e&&null!==e.ArrayBuffer))throw new Error(g(m.UNSUPPORTED,["ArrayBuffer"]));this._trace("Paho.Client",t,n,r,i,o),this.host=n,this.port=r,this.path=i,this.uri=t,this.clientId=o,this._wsuri=null,this._localKey=n+":"+r+("/mqtt"!=i?":"+i:"")+":"+o+":",this._msg_queue=[],this._buffered_msg_queue=[],this._sentMessages={},this._receivedMessages={},this._notify_msg_sent={},this._message_identifier=1,this._sequence=0;for(var a in p)0!==a.indexOf("Sent:"+this._localKey)&&0!==a.indexOf("Received:"+this._localKey)||this.restore(a)};I.prototype.host=null,I.prototype.port=null,I.prototype.path=null,I.prototype.uri=null,I.prototype.clientId=null,I.prototype.socket=null,I.prototype.connected=!1,I.prototype.maxMessageIdentifier=65536,I.prototype.connectOptions=null,I.prototype.hostIndex=null,I.prototype.onConnected=null,I.prototype.onConnectionLost=null,I.prototype.onMessageDelivered=null,I.prototype.onMessageArrived=null,I.prototype.traceFunction=null,I.prototype._msg_queue=null,I.prototype._buffered_msg_queue=null,I.prototype._connectTimeout=null,I.prototype.sendPinger=null,I.prototype.receivePinger=null,I.prototype._reconnectInterval=1,I.prototype._reconnecting=!1,I.prototype._reconnectTimeout=null,I.prototype.disconnectedPublishing=!1,I.prototype.disconnectedBufferSize=5e3,I.prototype.receiveBuffer=null,I.prototype._traceBuffer=null,I.prototype._MAX_TRACE_ENTRIES=100,I.prototype.connect=function(e){var t=this._traceMask(e,"password");if(this._trace("Client.connect",t,this.socket,this.connected),this.connected)throw new Error(g(m.INVALID_STATE,["already connected"]));if(this.socket)throw new Error(g(m.INVALID_STATE,["already connected"]));this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),this.connectOptions=e,this._reconnectInterval=1,this._reconnecting=!1,e.uris?(this.hostIndex=0,this._doConnect(e.uris[0])):this._doConnect(this.uri)},I.prototype.subscribe=function(e,t){if(this._trace("Client.subscribe",e,t),!this.connected)throw new Error(g(m.INVALID_STATE,["not connected"]));var n=new _(f.SUBSCRIBE);n.topics=[e],void 0!==t.qos?n.requestedQos=[t.qos]:n.requestedQos=[0],t.onSuccess&&(n.onSuccess=function(e){t.onSuccess({invocationContext:t.invocationContext,grantedQos:e})}),t.onFailure&&(n.onFailure=function(e){t.onFailure({invocationContext:t.invocationContext,errorCode:e,errorMessage:g(e)})}),t.timeout&&(n.timeOut=new E(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:m.SUBSCRIBE_TIMEOUT.code,errorMessage:g(m.SUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},I.prototype.unsubscribe=function(e,t){if(this._trace("Client.unsubscribe",e,t),!this.connected)throw new Error(g(m.INVALID_STATE,["not connected"]));var n=new _(f.UNSUBSCRIBE);n.topics=[e],t.onSuccess&&(n.callback=function(){t.onSuccess({invocationContext:t.invocationContext})}),t.timeout&&(n.timeOut=new E(this,t.timeout,t.onFailure,[{invocationContext:t.invocationContext,errorCode:m.UNSUBSCRIBE_TIMEOUT.code,errorMessage:g(m.UNSUBSCRIBE_TIMEOUT)}])),this._requires_ack(n),this._schedule_message(n)},I.prototype.send=function(e){this._trace("Client.send",e);var t=new _(f.PUBLISH);if(t.payloadMessage=e,this.connected)e.qos>0?this._requires_ack(t):this.onMessageDelivered&&(this._notify_msg_sent[t]=this.onMessageDelivered(t.payloadMessage)),this._schedule_message(t);else{if(!this._reconnecting||!this.disconnectedPublishing)throw new Error(g(m.INVALID_STATE,["not connected"]));if(Object.keys(this._sentMessages).length+this._buffered_msg_queue.length>this.disconnectedBufferSize)throw new Error(g(m.BUFFER_FULL,[this.disconnectedBufferSize]));e.qos>0?this._requires_ack(t):(t.sequence=++this._sequence,this._buffered_msg_queue.unshift(t))}},I.prototype.disconnect=function(){if(this._trace("Client.disconnect"),this._reconnecting&&(this._reconnectTimeout.cancel(),this._reconnectTimeout=null,this._reconnecting=!1),!this.socket)throw new Error(g(m.INVALID_STATE,["not connecting or connected"]));var e=new _(f.DISCONNECT);this._notify_msg_sent[e]=h(this._disconnected,this),this._schedule_message(e)},I.prototype.getTraceLog=function(){if(null!==this._traceBuffer){this._trace("Client.getTraceLog",new Date),this._trace("Client.getTraceLog in flight messages",this._sentMessages.length);for(var e in this._sentMessages)this._trace("_sentMessages ",e,this._sentMessages[e]);for(var e in this._receivedMessages)this._trace("_receivedMessages ",e,this._receivedMessages[e]);return this._traceBuffer}},I.prototype.startTrace=function(){null===this._traceBuffer&&(this._traceBuffer=[]),this._trace("Client.startTrace",new Date,"@VERSION@-@BUILDLEVEL@")},I.prototype.stopTrace=function(){delete this._traceBuffer},I.prototype._doConnect=function(e){if(this.connectOptions.useSSL){var t=e.split(":");t[0]="wss",e=t.join(":")}this._wsuri=e,this.connected=!1,this.connectOptions.mqttVersion<4?this.socket=new WebSocket(e,["mqttv3.1"]):this.socket=new WebSocket(e,["mqtt"]),this.socket.binaryType="arraybuffer",this.socket.onopen=h(this._on_socket_open,this),this.socket.onmessage=h(this._on_socket_message,this),this.socket.onerror=h(this._on_socket_error,this),this.socket.onclose=h(this._on_socket_close,this),this.sendPinger=new S(this,this.connectOptions.keepAliveInterval),this.receivePinger=new S(this,this.connectOptions.keepAliveInterval),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._connectTimeout=new E(this,this.connectOptions.timeout,this._disconnected,[m.CONNECT_TIMEOUT.code,g(m.CONNECT_TIMEOUT)])},I.prototype._schedule_message=function(e){this._msg_queue.unshift(e),this.connected&&this._process_queue()},I.prototype.store=function(e,t){var n={type:t.type,messageIdentifier:t.messageIdentifier,version:1};switch(t.type){case f.PUBLISH:t.pubRecReceived&&(n.pubRecReceived=!0),n.payloadMessage={};for(var r="",i=t.payloadMessage.payloadBytes,o=0;o<i.length;o++)i[o]<=15?r=r+"0"+i[o].toString(16):r+=i[o].toString(16);n.payloadMessage.payloadHex=r,n.payloadMessage.qos=t.payloadMessage.qos,n.payloadMessage.destinationName=t.payloadMessage.destinationName,t.payloadMessage.duplicate&&(n.payloadMessage.duplicate=!0),t.payloadMessage.retained&&(n.payloadMessage.retained=!0),0===e.indexOf("Sent:")&&(void 0===t.sequence&&(t.sequence=++this._sequence),n.sequence=t.sequence);break;default:throw Error(g(m.INVALID_STORED_DATA,[e+this._localKey+t.messageIdentifier,n]))}p.setItem(e+this._localKey+t.messageIdentifier,JSON.stringify(n))},I.prototype.restore=function(e){var n=p.getItem(e),r=JSON.parse(n),i=new _(r.type,r);switch(r.type){case f.PUBLISH:for(var o=r.payloadMessage.payloadHex,a=new ArrayBuffer(o.length/2),s=new Uint8Array(a),u=0;o.length>=2;){var c=parseInt(o.substring(0,2),16);o=o.substring(2,o.length),s[u++]=c}var l=new t.Message(s);l.qos=r.payloadMessage.qos,l.destinationName=r.payloadMessage.destinationName,r.payloadMessage.duplicate&&(l.duplicate=!0),r.payloadMessage.retained&&(l.retained=!0),i.payloadMessage=l;break;default:throw Error(g(m.INVALID_STORED_DATA,[e,n]))}0===e.indexOf("Sent:"+this._localKey)?(i.payloadMessage.duplicate=!0,this._sentMessages[i.messageIdentifier]=i):0===e.indexOf("Received:"+this._localKey)&&(this._receivedMessages[i.messageIdentifier]=i)},I.prototype._process_queue=function(){for(var e=null;e=this._msg_queue.pop();)this._socket_send(e),this._notify_msg_sent[e]&&(this._notify_msg_sent[e](),delete this._notify_msg_sent[e])},I.prototype._requires_ack=function(e){var t=Object.keys(this._sentMessages).length;if(t>this.maxMessageIdentifier)throw Error("Too many messages:"+t);for(;void 0!==this._sentMessages[this._message_identifier];)this._message_identifier++;e.messageIdentifier=this._message_identifier,this._sentMessages[e.messageIdentifier]=e,e.type===f.PUBLISH&&this.store("Sent:",e),this._message_identifier===this.maxMessageIdentifier&&(this._message_identifier=1)},I.prototype._on_socket_open=function(){var e=new _(f.CONNECT,this.connectOptions);e.clientId=this.clientId,this._socket_send(e)},I.prototype._on_socket_message=function(e){this._trace("Client._on_socket_message",e.data);for(var t=this._deframeMessages(e.data),n=0;n<t.length;n+=1)this._handleMessage(t[n])},I.prototype._deframeMessages=function(e){var t=new Uint8Array(e),r=[];if(this.receiveBuffer){var i=new Uint8Array(this.receiveBuffer.length+t.length);i.set(this.receiveBuffer),i.set(t,this.receiveBuffer.length),t=i,delete this.receiveBuffer}try{for(var o=0;o<t.length;){var a=n(t,o),s=a[0];if(o=a[1],null===s)break;r.push(s)}o<t.length&&(this.receiveBuffer=t.subarray(o))}catch(e){var u="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(m.INTERNAL_ERROR.code,g(m.INTERNAL_ERROR,[e.message,u]))}return r},I.prototype._handleMessage=function(e){this._trace("Client._handleMessage",e);try{switch(e.type){case f.CONNACK:if(this._connectTimeout.cancel(),this._reconnectTimeout&&this._reconnectTimeout.cancel(),this.connectOptions.cleanSession){for(var t in this._sentMessages){var n=this._sentMessages[t];p.removeItem("Sent:"+this._localKey+n.messageIdentifier)}this._sentMessages={};for(var t in this._receivedMessages){var r=this._receivedMessages[t];p.removeItem("Received:"+this._localKey+r.messageIdentifier)}this._receivedMessages={}}if(0!==e.returnCode){this._disconnected(m.CONNACK_RETURNCODE.code,g(m.CONNACK_RETURNCODE,[e.returnCode,y[e.returnCode]]));break}this.connected=!0,this.connectOptions.uris&&(this.hostIndex=this.connectOptions.uris.length);var i=[];for(var o in this._sentMessages)this._sentMessages.hasOwnProperty(o)&&i.push(this._sentMessages[o]);if(this._buffered_msg_queue.length>0)for(var a=null;a=this._buffered_msg_queue.pop();)i.push(a),this.onMessageDelivered&&(this._notify_msg_sent[a]=this.onMessageDelivered(a.payloadMessage));for(var i=i.sort(function(e,t){return e.sequence-t.sequence}),s=0,u=i.length;s<u;s++){var n=i[s];if(n.type==f.PUBLISH&&n.pubRecReceived){var c=new _(f.PUBREL,{messageIdentifier:n.messageIdentifier});this._schedule_message(c)}else this._schedule_message(n)}this.connectOptions.onSuccess&&this.connectOptions.onSuccess({invocationContext:this.connectOptions.invocationContext});var l=!1;this._reconnecting&&(l=!0,this._reconnectInterval=1,this._reconnecting=!1),this._connected(l,this._wsuri),this._process_queue();break;case f.PUBLISH:this._receivePublish(e);break;case f.PUBACK:var n=this._sentMessages[e.messageIdentifier];n&&(delete this._sentMessages[e.messageIdentifier],p.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(n.payloadMessage));break;case f.PUBREC:var n=this._sentMessages[e.messageIdentifier];if(n){n.pubRecReceived=!0;var c=new _(f.PUBREL,{messageIdentifier:e.messageIdentifier});this.store("Sent:",n),this._schedule_message(c)}break;case f.PUBREL:var r=this._receivedMessages[e.messageIdentifier];p.removeItem("Received:"+this._localKey+e.messageIdentifier),r&&(this._receiveMessage(r),delete this._receivedMessages[e.messageIdentifier]);var d=new _(f.PUBCOMP,{messageIdentifier:e.messageIdentifier});this._schedule_message(d);break;case f.PUBCOMP:var n=this._sentMessages[e.messageIdentifier];delete this._sentMessages[e.messageIdentifier],p.removeItem("Sent:"+this._localKey+e.messageIdentifier),this.onMessageDelivered&&this.onMessageDelivered(n.payloadMessage);break;case f.SUBACK:var n=this._sentMessages[e.messageIdentifier];n&&(n.timeOut&&n.timeOut.cancel(),128===e.returnCode[0]?n.onFailure&&n.onFailure(e.returnCode):n.onSuccess&&n.onSuccess(e.returnCode),delete this._sentMessages[e.messageIdentifier]);break;case f.UNSUBACK:var n=this._sentMessages[e.messageIdentifier];n&&(n.timeOut&&n.timeOut.cancel(),n.callback&&n.callback(),delete this._sentMessages[e.messageIdentifier]);break;case f.PINGRESP:this.sendPinger.reset();break;case f.DISCONNECT:this._disconnected(m.INVALID_MQTT_MESSAGE_TYPE.code,g(m.INVALID_MQTT_MESSAGE_TYPE,[e.type]));break;default:this._disconnected(m.INVALID_MQTT_MESSAGE_TYPE.code,g(m.INVALID_MQTT_MESSAGE_TYPE,[e.type]))}}catch(e){var h="undefined"==e.hasOwnProperty("stack")?e.stack.toString():"No Error Stack Available";return void this._disconnected(m.INTERNAL_ERROR.code,g(m.INTERNAL_ERROR,[e.message,h]))}},I.prototype._on_socket_error=function(e){this._reconnecting||this._disconnected(m.SOCKET_ERROR.code,g(m.SOCKET_ERROR,[e.data]))},I.prototype._on_socket_close=function(){this._reconnecting||this._disconnected(m.SOCKET_CLOSE.code,g(m.SOCKET_CLOSE))},I.prototype._socket_send=function(e){if(1==e.type){var t=this._traceMask(e,"password");this._trace("Client._socket_send",t)}else this._trace("Client._socket_send",e);this.socket.send(e.encode()),this.sendPinger.reset()},I.prototype._receivePublish=function(e){switch(e.payloadMessage.qos){case"undefined":case 0:this._receiveMessage(e);break;case 1:var t=new _(f.PUBACK,{messageIdentifier:e.messageIdentifier});this._schedule_message(t),this._receiveMessage(e);break;case 2:this._receivedMessages[e.messageIdentifier]=e,this.store("Received:",e);var n=new _(f.PUBREC,{messageIdentifier:e.messageIdentifier});this._schedule_message(n);break;default:throw Error("Invaild qos="+e.payloadMessage.qos)}},I.prototype._receiveMessage=function(e){this.onMessageArrived&&this.onMessageArrived(e.payloadMessage)},I.prototype._connected=function(e,t){this.onConnected&&this.onConnected(e,t)},I.prototype._reconnect=function(){this._trace("Client._reconnect"),this.connected||(this._reconnecting=!0,this.sendPinger.cancel(),this.receivePinger.cancel(),this._reconnectInterval<128&&(this._reconnectInterval=2*this._reconnectInterval),this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri))},I.prototype._disconnected=function(e,t){if(this._trace("Client._disconnected",e,t),void 0!==e&&this._reconnecting)return void(this._reconnectTimeout=new E(this,this._reconnectInterval,this._reconnect));if(this.sendPinger.cancel(),this.receivePinger.cancel(),this._connectTimeout&&(this._connectTimeout.cancel(),this._connectTimeout=null),this._msg_queue=[],this._buffered_msg_queue=[],this._notify_msg_sent={},this.socket&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,1===this.socket.readyState&&this.socket.close(),delete this.socket),this.connectOptions.uris&&this.hostIndex<this.connectOptions.uris.length-1)this.hostIndex++,this._doConnect(this.connectOptions.uris[this.hostIndex]);else if(void 0===e&&(e=m.OK.code,t=g(m.OK)),this.connected){if(this.connected=!1,this.onConnectionLost&&this.onConnectionLost({errorCode:e,errorMessage:t,reconnect:this.connectOptions.reconnect,uri:this._wsuri}),e!==m.OK.code&&this.connectOptions.reconnect)return this._reconnectInterval=1,void this._reconnect()}else 4===this.connectOptions.mqttVersion&&!1===this.connectOptions.mqttVersionExplicit?(this._trace("Failed to connect V4, dropping back to V3"),this.connectOptions.mqttVersion=3,this.connectOptions.uris?(this.hostIndex=0,this._doConnect(this.connectOptions.uris[0])):this._doConnect(this.uri)):this.connectOptions.onFailure&&this.connectOptions.onFailure({invocationContext:this.connectOptions.invocationContext,errorCode:e,errorMessage:t})},I.prototype._trace=function(){if(this.traceFunction){var e=Array.prototype.slice.call(arguments);for(var t in e)void 0!==e[t]&&e.splice(t,1,JSON.stringify(e[t]));var n=e.join("");this.traceFunction({severity:"Debug",message:n})}if(null!==this._traceBuffer)for(var t=0,r=arguments.length;t<r;t++)this._traceBuffer.length==this._MAX_TRACE_ENTRIES&&this._traceBuffer.shift(),0===t?this._traceBuffer.push(arguments[t]):void 0===arguments[t]?this._traceBuffer.push(arguments[t]):this._traceBuffer.push("  "+JSON.stringify(arguments[t]))},I.prototype._traceMask=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=r==t?"******":e[r]);return n};var w=function(e,t,n,r){var i;if("string"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"host"]));if(2==arguments.length){r=t,i=e;var o=i.match(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/);if(!o)throw new Error(g(m.INVALID_ARGUMENT,[e,"host"]));e=o[4]||o[2],t=parseInt(o[7]),n=o[8]}else{if(3==arguments.length&&(r=n,n="/mqtt"),"number"!=typeof t||t<0)throw new Error(g(m.INVALID_TYPE,[void 0===t?"undefined":a(t),"port"]));if("string"!=typeof n)throw new Error(g(m.INVALID_TYPE,[void 0===n?"undefined":a(n),"path"]));var s=-1!==e.indexOf(":")&&"["!==e.slice(0,1)&&"]"!==e.slice(-1);i="ws://"+(s?"["+e+"]":e)+":"+t+n}for(var u=0,c=0;c<r.length;c++){var l=r.charCodeAt(c);55296<=l&&l<=56319&&c++,u++}if("string"!=typeof r||u>65535)throw new Error(g(m.INVALID_ARGUMENT,[r,"clientId"]));var p=new I(i,e,t,n,r);Object.defineProperties(this,{host:{get:function(){return e},set:function(){throw new Error(g(m.UNSUPPORTED_OPERATION))}},port:{get:function(){return t},set:function(){throw new Error(g(m.UNSUPPORTED_OPERATION))}},path:{get:function(){return n},set:function(){throw new Error(g(m.UNSUPPORTED_OPERATION))}},uri:{get:function(){return i},set:function(){throw new Error(g(m.UNSUPPORTED_OPERATION))}},clientId:{get:function(){return p.clientId},set:function(){throw new Error(g(m.UNSUPPORTED_OPERATION))}},onConnected:{get:function(){return p.onConnected},set:function(e){if("function"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"onConnected"]));p.onConnected=e}},disconnectedPublishing:{get:function(){return p.disconnectedPublishing},set:function(e){p.disconnectedPublishing=e}},disconnectedBufferSize:{get:function(){return p.disconnectedBufferSize},set:function(e){p.disconnectedBufferSize=e}},onConnectionLost:{get:function(){return p.onConnectionLost},set:function(e){if("function"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"onConnectionLost"]));p.onConnectionLost=e}},onMessageDelivered:{get:function(){return p.onMessageDelivered},set:function(e){if("function"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"onMessageDelivered"]));p.onMessageDelivered=e}},onMessageArrived:{get:function(){return p.onMessageArrived},set:function(e){if("function"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"onMessageArrived"]));p.onMessageArrived=e}},trace:{get:function(){return p.traceFunction},set:function(e){if("function"!=typeof e)throw new Error(g(m.INVALID_TYPE,[void 0===e?"undefined":a(e),"onTrace"]));p.traceFunction=e}}}),this.connect=function(e){if(e=e||{},d(e,{timeout:"number",userName:"string",password:"string",willMessage:"object",keepAliveInterval:"number",cleanSession:"boolean",useSSL:"boolean",invocationContext:"object",onSuccess:"function",onFailure:"function",hosts:"object",ports:"object",reconnect:"boolean",mqttVersion:"number",mqttVersionExplicit:"boolean",uris:"object"}),void 0===e.keepAliveInterval&&(e.keepAliveInterval=60),e.mqttVersion>4||e.mqttVersion<3)throw new Error(g(m.INVALID_ARGUMENT,[e.mqttVersion,"connectOptions.mqttVersion"]));if(void 0===e.mqttVersion?(e.mqttVersionExplicit=!1,e.mqttVersion=4):e.mqttVersionExplicit=!0,void 0!==e.password&&void 0===e.userName)throw new Error(g(m.INVALID_ARGUMENT,[e.password,"connectOptions.password"]));if(e.willMessage){if(!(e.willMessage instanceof C))throw new Error(g(m.INVALID_TYPE,[e.willMessage,"connectOptions.willMessage"]));if(e.willMessage.stringPayload=null,void 0===e.willMessage.destinationName)throw new Error(g(m.INVALID_TYPE,[a(e.willMessage.destinationName),"connectOptions.willMessage.destinationName"]))}if(void 0===e.cleanSession&&(e.cleanSession=!0),e.hosts){if(!(e.hosts instanceof Array))throw new Error(g(m.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));if(e.hosts.length<1)throw new Error(g(m.INVALID_ARGUMENT,[e.hosts,"connectOptions.hosts"]));for(var t=!1,r=0;r<e.hosts.length;r++){if("string"!=typeof e.hosts[r])throw new Error(g(m.INVALID_TYPE,[a(e.hosts[r]),"connectOptions.hosts["+r+"]"]));if(/^(wss?):\/\/((\[(.+)\])|([^\/]+?))(:(\d+))?(\/.*)$/.test(e.hosts[r])){if(0===r)t=!0;else if(!t)throw new Error(g(m.INVALID_ARGUMENT,[e.hosts[r],"connectOptions.hosts["+r+"]"]))}else if(t)throw new Error(g(m.INVALID_ARGUMENT,[e.hosts[r],"connectOptions.hosts["+r+"]"]))}if(t)e.uris=e.hosts;else{if(!e.ports)throw new Error(g(m.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(!(e.ports instanceof Array))throw new Error(g(m.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));if(e.hosts.length!==e.ports.length)throw new Error(g(m.INVALID_ARGUMENT,[e.ports,"connectOptions.ports"]));e.uris=[];for(var r=0;r<e.hosts.length;r++){if("number"!=typeof e.ports[r]||e.ports[r]<0)throw new Error(g(m.INVALID_TYPE,[a(e.ports[r]),"connectOptions.ports["+r+"]"]));var o=e.hosts[r],s=e.ports[r],u=-1!==o.indexOf(":");i="ws://"+(u?"["+o+"]":o)+":"+s+n,e.uris.push(i)}}}p.connect(e)},this.subscribe=function(e,t){if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(t=t||{},d(t,{qos:"number",invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("subscribeOptions.timeout specified with no onFailure callback.");if(void 0!==t.qos&&0!==t.qos&&1!==t.qos&&2!==t.qos)throw new Error(g(m.INVALID_ARGUMENT,[t.qos,"subscribeOptions.qos"]));p.subscribe(e,t)},this.unsubscribe=function(e,t){if("string"!=typeof e)throw new Error("Invalid argument:"+e);if(t=t||{},d(t,{invocationContext:"object",onSuccess:"function",onFailure:"function",timeout:"number"}),t.timeout&&!t.onFailure)throw new Error("unsubscribeOptions.timeout specified with no onFailure callback.");p.unsubscribe(e,t)},this.send=function(e,t,n,r){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof C)&&"string"!=typeof e)throw new Error("Invalid argument:"+(void 0===e?"undefined":a(e)));if(i=e,void 0===i.destinationName)throw new Error(g(m.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));p.send(i)}else i=new C(t),i.destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=r),p.send(i)},this.publish=function(e,t,n,r){var i;if(0===arguments.length)throw new Error("Invalid argument.length");if(1==arguments.length){if(!(e instanceof C)&&"string"!=typeof e)throw new Error("Invalid argument:"+(void 0===e?"undefined":a(e)));if(i=e,void 0===i.destinationName)throw new Error(g(m.INVALID_ARGUMENT,[i.destinationName,"Message.destinationName"]));p.send(i)}else i=new C(t),i.destinationName=e,arguments.length>=3&&(i.qos=n),arguments.length>=4&&(i.retained=r),p.send(i)},this.disconnect=function(){p.disconnect()},this.getTraceLog=function(){return p.getTraceLog()},this.startTrace=function(){p.startTrace()},this.stopTrace=function(){p.stopTrace()},this.isConnected=function(){return p.connected}},C=function(e){var t;if(!("string"==typeof e||e instanceof ArrayBuffer||ArrayBuffer.isView(e)&&!(e instanceof DataView)))throw g(m.INVALID_ARGUMENT,[e,"newPayload"]);t=e;var n,r=0,i=!1,o=!1;Object.defineProperties(this,{payloadString:{enumerable:!0,get:function(){return"string"==typeof t?t:l(t,0,t.length)}},payloadBytes:{enumerable:!0,get:function(){if("string"==typeof t){var e=new ArrayBuffer(u(t)),n=new Uint8Array(e);return c(t,n,0),n}return t}},destinationName:{enumerable:!0,get:function(){return n},set:function(e){if("string"!=typeof e)throw new Error(g(m.INVALID_ARGUMENT,[e,"newDestinationName"]));n=e}},qos:{enumerable:!0,get:function(){return r},set:function(e){if(0!==e&&1!==e&&2!==e)throw new Error("Invalid argument:"+e);r=e}},retained:{enumerable:!0,get:function(){return i},set:function(e){if("boolean"!=typeof e)throw new Error(g(m.INVALID_ARGUMENT,[e,"newRetained"]));i=e}},topic:{enumerable:!0,get:function(){return n},set:function(e){n=e}},duplicate:{enumerable:!0,get:function(){return o},set:function(e){o=e}}})};return{Client:w,Message:C}}(void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});return t})}).call(t,n(22),n(39)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(376);t.InteractionsClass=r.default;var i=n(1),o=new i.ConsoleLogger("Interactions"),a=null;a||(o.debug("Create Interactions Instance"),a=new r.default(null));var s=a;i.default.register(s),t.default=s,function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(165))},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(377),u=new a.ConsoleLogger("Interactions"),c=function(){function e(e){this._options=e,u.debug("Interactions Options",this._options),this._pluggables={}}return e.prototype.getModuleName=function(){return"Interactions"},e.prototype.configure=function(e){var t=this,n=e?e.Interactions||e:{};u.debug("configure Interactions",{opt:n}),this._options=r({bots:{}},n,n.Interactions);var i=this._options.aws_bots_config,o=this._options.bots;return!Object.keys(o).length&&i&&Array.isArray(i)&&i.forEach(function(e){t._options.bots[e.name]=e}),!this._pluggables.AWSLexProvider&&o&&Object.keys(o).map(function(e){return o[e]}).find(function(e){return!e.providerName||"AWSLexProvider"===e.providerName})&&(this._pluggables.AWSLexProvider=new s.AWSLexProvider),Object.keys(this._pluggables).map(function(e){t._pluggables[e].configure(t._options.bots)}),this._options},e.prototype.addPluggable=function(e){if(e&&"Interactions"===e.getCategory()){if(this._pluggables[e.getProviderName()])throw new Error("Bot "+e.getProviderName()+" already plugged");return e.configure(this._options.bots),void(this._pluggables[e.getProviderName()]=e)}},e.prototype.send=function(e,t){return i(this,void 0,void 0,function(){var n;return o(this,function(r){switch(r.label){case 0:if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");if(n=this._options.bots[e].providerName||"AWSLexProvider",!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");return[4,this._pluggables[n].sendMessage(e,t)];case 1:return[2,r.sent()]}})})},e.prototype.onComplete=function(e,t){if(!this._options.bots||!this._options.bots[e])throw new Error("Bot "+e+" does not exist");var n=this._options.bots[e].providerName||"AWSLexProvider";if(!this._pluggables[n])throw new Error("Bot "+n+" does not have valid pluggin did you try addPluggable first?");this._pluggables[n].onComplete(e,t)},e}();t.default=c},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(165)),r(n(166))},function(e,t,n){n(14);var r=n(0),i=r.Service,o=r.apiLoader;o.services.lexruntime={},r.LexRuntime=i.defineService("lexruntime",["2016-11-28"]),Object.defineProperty(o.services.lexruntime,"2016-11-28",{get:function(){var e=n(379);return e.paginators=n(380).pagination,e},enumerable:!0,configurable:!0}),e.exports=r.LexRuntime},function(e,t){e.exports={version:"2.0",metadata:{apiVersion:"2016-11-28",endpointPrefix:"runtime.lex",jsonVersion:"1.1",protocol:"rest-json",serviceFullName:"Amazon Lex Runtime Service",serviceId:"Lex Runtime Service",signatureVersion:"v4",signingName:"lex",uid:"runtime.lex-2016-11-28"},operations:{PostContent:{http:{requestUri:"/bot/{botName}/alias/{botAlias}/user/{userId}/content"},input:{type:"structure",required:["botName","botAlias","userId","contentType","inputStream"],members:{botName:{location:"uri",locationName:"botName"},botAlias:{location:"uri",locationName:"botAlias"},userId:{location:"uri",locationName:"userId"},sessionAttributes:{shape:"S5",jsonvalue:!0,location:"header",locationName:"x-amz-lex-session-attributes"},requestAttributes:{shape:"S5",jsonvalue:!0,location:"header",locationName:"x-amz-lex-request-attributes"},contentType:{location:"header",locationName:"Content-Type"},accept:{location:"header",locationName:"Accept"},inputStream:{shape:"S8"}},payload:"inputStream"},output:{type:"structure",members:{contentType:{location:"header",locationName:"Content-Type"},intentName:{location:"header",locationName:"x-amz-lex-intent-name"},slots:{jsonvalue:!0,location:"header",locationName:"x-amz-lex-slots"},sessionAttributes:{jsonvalue:!0,location:"header",locationName:"x-amz-lex-session-attributes"},message:{shape:"Sc",location:"header",locationName:"x-amz-lex-message"},messageFormat:{location:"header",locationName:"x-amz-lex-message-format"},dialogState:{location:"header",locationName:"x-amz-lex-dialog-state"},slotToElicit:{location:"header",locationName:"x-amz-lex-slot-to-elicit"},inputTranscript:{location:"header",locationName:"x-amz-lex-input-transcript"},audioStream:{shape:"S8"}},payload:"audioStream"},authtype:"v4-unsigned-body"},PostText:{http:{requestUri:"/bot/{botName}/alias/{botAlias}/user/{userId}/text"},input:{type:"structure",required:["botName","botAlias","userId","inputText"],members:{botName:{location:"uri",locationName:"botName"},botAlias:{location:"uri",locationName:"botAlias"},userId:{location:"uri",locationName:"userId"},sessionAttributes:{shape:"Sg"},requestAttributes:{shape:"Sg"},inputText:{shape:"Sc"}}},output:{type:"structure",members:{intentName:{},slots:{shape:"Sg"},sessionAttributes:{shape:"Sg"},message:{shape:"Sc"},messageFormat:{},dialogState:{},slotToElicit:{},responseCard:{type:"structure",members:{version:{},contentType:{},genericAttachments:{type:"list",member:{type:"structure",members:{title:{},subTitle:{},attachmentLinkUrl:{},imageUrl:{},buttons:{type:"list",member:{type:"structure",required:["text","value"],members:{text:{},value:{}}}}}}}}}}}}},shapes:{S5:{type:"string",sensitive:!0},S8:{type:"blob",streaming:!0},Sc:{type:"string",sensitive:!0},Sg:{type:"map",key:{},value:{},sensitive:!0}}}},function(e,t){e.exports={pagination:{}}},function(e,t,n){"use strict";(function(e){var n,r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"==o(t)&&"object"==o(e)?e.exports=s():(r=[],n=s,void 0!==(i="function"==typeof n?n.apply(t,r):n)&&(e.exports=i))}(window,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==(void 0===e?"undefined":o(e))&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(1)),r(n(2)),r(n(3)),r(n(4)),r(n(5)),r(n(6)),r(n(7)),r(n(8)),r(n(9)),r(n(10)),r(n(11)),r(n(12)),r(n(13))},function(e,t,n){e.exports={a:"Anchor__a___1_Iz8"}},function(e,t,n){e.exports={button:"Button__button___vS7Mv",signInButton:"Button__signInButton___3bUH-",googleSignInButton:"Button__googleSignInButton___1YiCu",signInButtonIcon:"Button__signInButtonIcon___ihN75",auth0SignInButton:"Button__auth0SignInButton___znnCj",facebookSignInButton:"Button__facebookSignInButton___34Txh",amazonSignInButton:"Button__amazonSignInButton___2EMtl",oAuthSignInButton:"Button__oAuthSignInButton___3UGOl",signInButtonContent:"Button__signInButtonContent___xqTXJ"}},function(e,t,n){e.exports={formContainer:"Form__formContainer___1GA3x",formSection:"Form__formSection___1PPvW",formField:"Form__formField___38Ikl",formRow:"Form__formRow___2mwRs"}},function(e,t,n){e.exports={hint:"Hint__hint___2XngB"}},function(e,t,n){e.exports={input:"Input__input___3e_bf",inputLabel:"Input__inputLabel___3VF0S",label:"Input__label___23sO8",radio:"Input__radio___2hllK"}},function(e,t,n){e.exports={navBar:"Nav__navBar___xtCFA",navRight:"Nav__navRight___1QG2J",nav:"Nav__nav___2Dx2Y",navItem:"Nav__navItem___1LtFQ"}},function(e,t,n){e.exports={photoPickerButton:"PhotoPicker__photoPickerButton___2XdVn",photoPlaceholder:"PhotoPicker__photoPlaceholder___2JXO4",photoPlaceholderIcon:"PhotoPicker__photoPlaceholderIcon___3Et71"}},function(e,t,n){e.exports={container:"Section__container___3YYTG",actionRow:"Section__actionRow___2LWSU",sectionHeader:"Section__sectionHeader___2djyg",sectionHeaderHint:"Section__sectionHeaderHint___3Wxdc",sectionBody:"Section__sectionBody___ihqqd",sectionFooter:"Section__sectionFooter___1T54C",sectionFooterPrimaryContent:"Section__sectionFooterPrimaryContent___2r9ZX",sectionFooterSecondaryContent:"Section__sectionFooterSecondaryContent___Nj41Q"}},function(e,t,n){e.exports={selectInput:"SelectInput__selectInput___3efO4"}},function(e,t,n){e.exports={strike:"Strike__strike___1XV1b",strikeContent:"Strike__strikeContent___10gLb"}},function(e,t,n){e.exports={toast:"Toast__toast___XXr3v",toastClose:"Toast__toastClose___18lU4"}},function(e,t,n){e.exports={totpQrcode:"Totp__totpQrcode___1crLx"}},function(e,t,n){e.exports={sumerianSceneContainer:"XR__sumerianSceneContainer___3nVMt",sumerianScene:"XR__sumerianScene___2Tt7-",loadingOverlay:"XR__loadingOverlay___IbqcI",loadingContainer:"XR__loadingContainer___2Itxb",loadingLogo:"XR__loadingLogo___Ub7xQ",loadingSceneName:"XR__loadingSceneName___3__ne",loadingBar:"XR__loadingBar___2vcke",loadingBarFill:"XR__loadingBarFill___3M-D9",sceneErrorText:"XR__sceneErrorText___2y0tp",sceneBar:"XR__sceneBar___2ShrP",sceneName:"XR__sceneName___1ApHr",sceneActions:"XR__sceneActions___7plGs",actionButton:"XR__actionButton___2poIM",tooltip:"XR__tooltip___UYyhn",actionIcon:"XR__actionIcon___2qnd2",autoShowTooltip:"XR__autoShowTooltip___V1QH7"}}])})}).call(t,n(39)(e))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var i=n(383);t.XRClass=i.default;var o=n(1),a=new o.ConsoleLogger("XR"),s=null;s||(a.debug("Create XR Instance"),s=new i.default(null));var u=s;o.default.register(u),t.default=u,r(n(167)),r(n(72))},function(e,t,n){"use strict";var r=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}u((r=r.apply(e,t||[])).next())})},i=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,o=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(167),s=n(72),u=new o.ConsoleLogger("XR"),c="SumerianProvider",l=function(){function e(e){this._options=e,u.debug("XR Options",this._options),this._defaultProvider=c,this._pluggables={},this.addPluggable(new a.SumerianProvider)}return e.prototype.configure=function(e){var t=this,n=e?e.XR||e:{};return u.debug("configure XR",{opt:n}),this._options=Object.assign({},this._options,n),Object.entries(this._pluggables).map(function(e){var r=e[0],i=e[1];r!==t._defaultProvider||n[t._defaultProvider]?i.configure(t._options[r]):i.configure(t._options)}),this._options},e.prototype.addPluggable=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){return e&&"XR"===e.getCategory()?(this._pluggables[e.getProviderName()]=e,t=e.configure(this._options),[2,t]):[2]})})},e.prototype.loadScene=function(e,t,n,o){return void 0===n&&(n={}),void 0===o&&(o=this._defaultProvider),r(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:if(!this._pluggables[o])throw new s.XRProviderNotConfigured("Provider '"+o+"' not configured");return[4,this._pluggables[o].loadScene(e,t,n)];case 1:return[2,r.sent()]}})})},e.prototype.isSceneLoaded=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].isSceneLoaded(e)},e.prototype.getSceneController=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].getSceneController(e)},e.prototype.isVRCapable=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].isVRCapable(e)},e.prototype.isVRPresentationActive=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].isVRPresentationActive(e)},e.prototype.start=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].start(e)},e.prototype.enterVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].enterVR(e)},e.prototype.exitVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].exitVR(e)},e.prototype.isMuted=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].isMuted(e)},e.prototype.setMuted=function(e,t,n){if(void 0===n&&(n=this._defaultProvider),!this._pluggables[n])throw new s.XRProviderNotConfigured("Provider '"+n+"' not configured");return this._pluggables[n].setMuted(e,t)},e.prototype.onSceneEvent=function(e,t,n,r){if(void 0===r&&(r=this._defaultProvider),!this._pluggables[r])throw new s.XRProviderNotConfigured("Provider '"+r+"' not configured");return this._pluggables[r].onSceneEvent(e,t,n)},e.prototype.enableAudio=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new s.XRProviderNotConfigured("Provider '"+t+"' not configured");return this._pluggables[t].enableAudio(e)},e}();t.default=l},function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=new i.ConsoleLogger("AbstractXRProvider"),a=function(){function e(e){void 0===e&&(e={}),this._config=e}return e.prototype.configure=function(e){return void 0===e&&(e={}),this._config=r({},e,this._config),o.debug("configure "+this.getProviderName(),this._config),this.options},e.prototype.getCategory=function(){return"XR"},Object.defineProperty(e.prototype,"options",{get:function(){return r({},this._config)},enumerable:!0,configurable:!0}),e}();t.AbstractXRProvider=a}])});
  //# sourceMappingURL=aws-amplify.min.js.map