@aws-amplify/datastore 3.12.2-unstable.6 → 3.12.3-unstable.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.12.2](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.12.1...@aws-amplify/datastore@3.12.2) (2022-07-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* decrease error handler verbosity on self recovering errors ([#10030](https://github.com/aws-amplify/amplify-js/issues/10030)) ([fb1f02c](https://github.com/aws-amplify/amplify-js/commit/fb1f02cfa914b81fe0411e8f4d654c69aed22385))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.12.1](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.12.0...@aws-amplify/datastore@3.12.1) (2022-06-18)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -71245,7 +71245,7 @@ var getAmplifyUserAgent = function getAmplifyUserAgent() {
|
|
|
71245
71245
|
__webpack_require__.r(__webpack_exports__);
|
|
71246
71246
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
|
|
71247
71247
|
// generated by genversion
|
|
71248
|
-
var version = '4.5.
|
|
71248
|
+
var version = '4.5.9';
|
|
71249
71249
|
|
|
71250
71250
|
/***/ }),
|
|
71251
71251
|
|
|
@@ -47,7 +47,7 @@ function I(e){return i.Buffer.from((new h).random(e).toString(),"hex")}O.prototy
|
|
|
47
47
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
48
48
|
* SPDX-License-Identifier: Apache-2.0
|
|
49
49
|
*/
|
|
50
|
-
var oe=function(){function e(e,t){var n=e||{},r=n.UserPoolId,i=n.ClientId,o=n.endpoint,s=n.fetchOptions,a=n.AdvancedSecurityDataCollectionFlag;if(!r||!i)throw new Error("Both UserPoolId and ClientId are required.");if(r.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(r))throw new Error("Invalid UserPoolId format.");var u=r.split("_")[0];this.userPoolId=r,this.clientId=i,this.client=new re(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new H).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,n,r,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,(function(t,n){if(t)return i(t,null);var r={Username:e,Pool:s,Storage:s.storage},o={user:new G(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new G(n)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}(),se=n(29),ae=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var n={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(n.sameSite=this.sameSite),se.set(e,t,n),se.get(e)},t.getItem=function(e){return se.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),se.remove(e,t)},t.clear=function(){for(var e=se.get(),t=Object.keys(e).length,n=0;n<t;++n)this.removeItem(Object.keys(e)[n]);return{}},e}()},function(e,t,n){"use strict";var r=n(83),i=n.n(r).a;t.a=i},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool"}(r||(r={}))},function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(98)}catch(e){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},u=a.lib={},c=u.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.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)}},l=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),f=a.enc={},d=f.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},h=f.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},p=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},v=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*u,o);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(i,f);n=i.splice(0,u),r.sigBytes-=c}return new l.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),y=(u.Hasher=v.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){v.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 y.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),r)}).call(this,n(31))},function(e,t,n){"use strict";var r=n(64),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function s(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:a,isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&a(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)f(arguments[r],n);return t},extend:function(e,t,n){return f(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return y}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],i=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var i=e[t],o=n[t];return void 0===o?void 0===i?0:1*r:void 0===i||i<o?-1*r:i>o?1*r:0})),!0},s=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},a=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),i=r.filter((function(e){return n.endsWith("."+e.ext)}));return i.length>0?i[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},l=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},f=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},h=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var i={};for(var o in t){if(t.hasOwnProperty(o))i[n.includes(o)?o:o[0].toLowerCase()+o.slice(1)]=r.includes(o)?t[o]:e(t[o],n,r)}return i},p=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var i={};for(var o in t){if(t.hasOwnProperty(o))i[n.includes(o)?o:o[0].toUpperCase()+o.slice(1)]=r.includes(o)?t[o]:e(t[o],n,r)}return i},v=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},y=function(){function e(){}return e.isEmpty=i,e.sortByField=o,e.objectLessAttributes=s,e.filenameToContentType=a,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=l,e.isWebWorker=f,e.browserOrNode=d,e.transferKeyToLowerCase=h,e.transferKeyToUpperCase=p,e.isStrictObject=v,e}()}).call(this,n(52))},function(e,t,n){"use strict";var r=n(44);n(9);t.a=r.a},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[W]}function o(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Y}(e)||Array.isArray(e)||!!e[G]||!!e.constructor[G]||d(e)||h(e))}function s(e,t,n){void 0===n&&(n=!1),0===a(e)?(n?Object.keys:J)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function a(e){var t=e[W];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:h(e)?3:0}function u(e,t){return 2===a(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===a(e)?e.get(t):e[t]}function l(e,t,n){var r=a(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return z&&e instanceof Map}function h(e){return K&&e instanceof Set}function p(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$(e);delete t[W];for(var n=J(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),m(e)||i(e)||!o(e)||(a(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&s(e,(function(e,t){return y(t,!0)}),!0)),e}function g(){r(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Z[e];return t||r(18,e),t}function w(e,t){Z[e]||(Z[e]=t)}function S(){return B}function _(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function E(e){A(e),e.p.forEach(I),e.p=null}function A(e){e===B&&(B=e.l)}function O(e){return B={p:[],l:B,h:e,m:!0,_:0}}function I(e){var t=e[W];0===t.i||1===t.i?t.j():t.O=!0}function T(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,i),i?(n[W].P&&(E(t),r(4)),o(e)&&(e=C(t,e),t.l||P(t,e)),t.u&&b("Patches").M(n[W],e,t.u,t.s)):e=C(t,n,[]),E(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function C(e,t,n){if(m(t))return t;var r=t[W];if(!r)return s(t,(function(i,o){return x(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return P(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=v(r.k):r.o;s(3===r.i?new Set(i):i,(function(t,o){return x(e,r,i,t,o,n)})),P(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function x(e,t,n,r,s,a){if(i(s)){var c=C(e,s,a&&t&&3!==t.i&&!u(t.D,r)?a.concat(r):void 0);if(l(n,r,c),!i(c))return;e.m=!1}if(o(s)&&!m(s)){if(!e.h.F&&e._<1)return;C(e,s),t&&t.A.l||P(e,s)}}function P(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&y(t,n)}function k(e,t){var n=e[W];return(n?p(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function j(e){e.o||(e.o=v(e.t))}function R(e,t,n){var r=d(t)?b("MapSet").N(t,n):h(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=Q;n&&(i=[r],o=X);var s=Proxy.revocable(i,o),a=s.revoke,u=s.proxy;return r.k=u,r.j=a,u}(t,n):b("ES5").J(t,n);return(n?n.A:S()).p.push(r),r}function D(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[W],i=a(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=U(t,i),r.I=!1}else n=U(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||l(n,t,e(i))})),3===i?new Set(n):n}(e)}function U(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}function F(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(d(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(h(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return u(t,G)&&(n[G]=t[G]),n}function t(t){return i(t)?e(t):t}var n="add";w("Patches",{$:function(t,i){return i.forEach((function(i){for(var o=i.path,s=i.op,u=t,l=0;l<o.length-1;l++){var f=a(u),d=""+o[l];0!==f&&1!==f||"__proto__"!==d&&"constructor"!==d||r(24),"function"==typeof u&&"prototype"===d&&r(24),"object"!=typeof(u=c(u,d))&&r(15,o.join("/"))}var h=a(u),p=e(i.value),v=o[o.length-1];switch(s){case"replace":switch(h){case 2:return u.set(v,p);case 3:r(16);default:return u[v]=p}case n:switch(h){case 1:return u.splice(v,0,p);case 2:return u.set(v,p);case 3:return u.add(p);default:return u[v]=p}case"remove":switch(h){case 1:return u.splice(v,1);case 2:return u.delete(v);case 3:return u.delete(i.value);default:return delete u[v]}default:r(17,s)}})),t},R:function(e,r,i,o){switch(e.i){case 0:case 4:case 2:return function(e,r,i,o){var a=e.t,l=e.o;s(e.D,(function(e,s){var f=c(a,e),d=c(l,e),h=s?u(a,e)?"replace":n:"remove";if(f!==d||"replace"!==h){var p=r.concat(e);i.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:d}),o.push(h===n?{op:"remove",path:p}:"remove"===h?{op:n,path:p,value:t(f)}:{op:"replace",path:p,value:t(f)})}}))}(e,r,i,o);case 5:case 1:return function(e,r,i,o){var s=e.t,a=e.D,u=e.o;if(u.length<s.length){var c=[u,s];s=c[0],u=c[1];var l=[o,i];i=l[0],o=l[1]}for(var f=0;f<s.length;f++)if(a[f]&&u[f]!==s[f]){var d=r.concat([f]);i.push({op:"replace",path:d,value:t(u[f])}),o.push({op:"replace",path:d,value:t(s[f])})}for(var h=s.length;h<u.length;h++){var p=r.concat([h]);i.push({op:n,path:p,value:t(u[h])})}s.length<u.length&&o.push({op:"replace",path:r.concat(["length"]),value:s.length})}(e,r,i,o);case 3:return function(e,t,r,i){var o=e.t,s=e.o,a=0;o.forEach((function(e){if(!s.has(e)){var o=t.concat([a]);r.push({op:"remove",path:o,value:e}),i.unshift({op:n,path:o,value:e})}a++})),a=0,s.forEach((function(e){if(!o.has(e)){var s=t.concat([a]);r.push({op:n,path:s,value:e}),i.unshift({op:"remove",path:s,value:e})}a++}))}(e,r,i,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===V?void 0:t}),r.push({op:"replace",path:[],value:e.t})}})}n.d(t,"a",(function(){return re})),n.d(t,"b",(function(){return F})),n.d(t,"c",(function(){return G})),n.d(t,"d",(function(){return te})),n.d(t,"e",(function(){return ne}));var L,B,q="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,K="undefined"!=typeof Set,H="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=q?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),G=q?Symbol.for("immer-draftable"):"__$immer_draftable",W=q?Symbol.for("immer-state"):"__$immer_state",Y=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),J="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$=Object.getOwnPropertyDescriptors||function(e){var t={};return J(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},Q={get:function(e,t){if(t===W)return e;var n=p(e);if(!u(n,t))return function(e,t,n){var r,i=N(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===k(e.t,t)?(j(e),e.o[t]=R(e.A.h,r,e)):r},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,n){var r=N(p(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=k(p(e),t),o=null==i?void 0:i[W];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,i)&&(void 0!==n||u(e.t,t)))return!0;j(e),M(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==k(e.t,t)||t in e.t?(e.D[t]=!1,j(e),M(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=p(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},X={};s(Q,(function(e,t){X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),X.deleteProperty=function(e,t){return Q.deleteProperty.call(this,e[0],t)},X.set=function(e,t,n){return Q.set.call(this,e[0],t,n,e[0])};var ee=new(function(){function e(e){var t=this;this.g=H,this.F=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var u;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var c=O(t),l=R(t,e,void 0),f=!0;try{u=n(l),f=!1}finally{f?E(c):A(c)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return _(c,i),T(e,c)}),(function(e){throw E(c),e})):(_(c,i),T(u,c))}if(!e||"object"!=typeof e){if((u=n(e))===V)return;return void 0===u&&(u=e),t.F&&y(u,!0),u}r(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))}:[t.produce(e,n,(function(e,t){r=e,i=t})),r,i];var r,i},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=D(e));var t=O(this),n=R(this,e,void 0);return n[W].C=!0,A(t),n},t.finishDraft=function(e,t){var n=(e&&e[W]).A;return _(n,t),T(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!H&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}()),te=ee.produce,ne=(ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee)),re=(ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee));ee.createDraft.bind(ee),ee.finishDraft.bind(ee)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(23),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=new r.a("Amplify"),s=new(function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=r.a,this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=i(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}())},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r={userAgent:"aws-amplify/4.5.8 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(r.product=navigator.product||"",r.navigator=navigator||null,navigator.product){case"ReactNative":r.userAgent="aws-amplify/4.5.8 react-native",r.isReactNative=!0;break;default:r.userAgent="aws-amplify/4.5.8 js",r.isReactNative=!1}var i=function(){return r.userAgent}},function(e,t,n){"use strict";var r=n(44),i=n(24),o=n(23),s=n(42),a=n(20),u=n(159),c=n(74),l=n(33),f=n.n(l),d=n(8),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},g=new o.a("RestClient"),m=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=s.a,this._options=e,g.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return e.prototype.ajax=function(e,t,n){return p(this,void 0,void 0,(function(){var r,i,o,s,c,l,f,p,m,b,w,S,_,E,A=this;return v(this,(function(v){switch(v.label){case 0:return g.debug(t,e),o="us-east-1",s="execute-api",c=void 0,"string"==typeof e?(r=this._parseUrl(e),i=e):(i=e.endpoint,c=e.custom_header,o=e.region,s=e.service,r=this._parseUrl(e.endpoint)),l={method:t,url:i,host:r.host,path:r.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},f={},a.a.isReactNative&&(p=a.a.userAgent||"aws-amplify/0.1.x",f={"User-Agent":p}),m=Object.assign({},n),b=m.response,m.body&&("function"==typeof FormData&&m.body instanceof FormData?(f["Content-Type"]="multipart/form-data",l.data=m.body):(f["Content-Type"]="application/json; charset=UTF-8",l.data=JSON.stringify(m.body))),m.responseType&&(l.responseType=m.responseType),m.withCredentials&&(l.withCredentials=m.withCredentials),m.timeout&&(l.timeout=m.timeout),m.cancellableToken&&(l.cancelToken=m.cancellableToken.token),l.signerServiceInfo=m.signerServiceInfo,"function"!=typeof c?[3,2]:[4,c()];case 1:return S=v.sent(),[3,3];case 2:S=void 0,v.label=3;case 3:return w=S,l.headers=h(h(h({},f),w),m.headers),_=Object(d.parse)(i,!0,!0),_.search,E=y(_,["search"]),l.url=Object(d.format)(h(h({},E),{query:h(h({},E.query),m.queryStringParameters||{})})),void 0!==l.headers.Authorization?(l.headers=Object.keys(l.headers).reduce((function(e,t){return l.headers[t]&&(e[t]=l.headers[t]),e}),{}),[2,this._request(l,b)]):[2,this.Credentials.get().then((function(r){return A._signed(h({},l),r,b,{region:o,service:s}).catch((function(r){if(u.a.isClockSkewError(r)){var i=r.response.headers,o=i&&(i.date||i.Date),s=new Date(o),a=u.a.getDateFromHeaderString(l.headers["x-amz-date"]);if(u.a.isClockSkewed(s))return u.a.setClockOffset(s.getTime()-a.getTime()),A.ajax(e,t,n)}throw r}))}),(function(e){return g.debug("No credentials available, the request will be unsigned"),A._request(l,b)}))]}}))}))},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.cancel=function(e,t){var n=this._cancelTokenMap.get(e);return!!n&&(n.cancel(t),!0)},e.prototype.hasCancelToken=function(e){return this._cancelTokenMap.has(e)},e.prototype.isCancel=function(e){return f.a.isCancel(e)},e.prototype.getCancellableToken=function(){return f.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach((function(n){n.name===e&&(r=n.endpoint,"string"==typeof n.region?t._region=n.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"==typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)})),r):r},e.prototype._signed=function(e,t,n,r){var i=r.service,o=r.region,s=e.signerServiceInfo,a=y(e,["signerServiceInfo"]),u=o||this._region||this._options.region,l=i||this._service||this._options.service,d={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},h={region:u,service:l},p=Object.assign(h,s),v=c.a.sign(a,d,p);return v.data&&(v.body=v.data),g.debug("Signed Request: ",v),delete v.headers.host,f()(v).then((function(e){return n?e:e.data})).catch((function(e){throw g.debug(e),e}))},e.prototype._request=function(e,t){return void 0===t&&(t=!1),f()(e).then((function(e){return t?e:e.data})).catch((function(e){throw g.debug(e),e}))},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}(),b=n(18),w=function(){return(w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},_=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},A=new o.a("RestAPI"),O=function(){function e(e){this._api=null,this.Credentials=s.a,this._options=e,A.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=E(t,["API"]),o=w(w({},i),r);if(A.debug("configure Rest API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var s=o.aws_cloud_logic_custom;o.endpoints="string"==typeof s?JSON.parse(s):s}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)?o.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(A.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?o.endpoints=this._options.endpoints:o.endpoints=[],this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return A.debug("create Rest API instance"),this._api=new m(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.get(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.post(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.put(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.patch(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.del(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.head(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype.endpoint=function(e){return S(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._api.endpoint(e)]}))}))},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find((function(t){return t.name===e}));if(!r)throw new Error("API "+e+" does not exist");var i={endpoint:r.endpoint+t};return"string"==typeof r.region?i.region=r.region:"string"==typeof this._options.region&&(i.region=this._options.region),"string"==typeof r.service?i.service=r.service||"execute-api":i.service="execute-api","function"==typeof r.custom_header?i.custom_header=r.custom_header:i.custom_header=void 0,i},e}(),I=new O(null);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}b.a.register(I);"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var C="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function x(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function P(e){return k(e.source,x(e.source,e.start))}function k(e,t){var n=e.locationOffset.column-1,r=M(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,u=t.column+a,c="".concat(e.name,":").concat(s,":").concat(u,"\n"),l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){for(var d=Math.floor(u/80),h=u%80,p=[],v=0;v<f.length;v+=80)p.push(f.slice(v,v+80));return c+N([["".concat(s),p[0]]].concat(p.slice(1,d+1).map((function(e){return["",e]})),[[" ",M(h-1)+"^"],["",p[d+1]]]))}return c+N([["".concat(s-1),l[i-1]],["".concat(s),f],["",M(u-1)+"^"],["".concat(s+1),l[i+1]]])}function N(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],i=e[1];return M(n-(t=r).length)+t+(i?" | "+i:" |")})).join("\n")}function M(e){return Array(e+1).join(" ")}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?L(e):t}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){var t="function"==typeof Map?new Map:void 0;return(B=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return q(e,arguments,H(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),K(r,e)})(e)}function q(e,t,n){return(q=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&K(i,n.prototype),i}).apply(null,arguments)}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(a,e);var t,n,r,i,o,s=(t=a,n=z(),function(){var e,r=H(t);if(n){var i=H(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return F(this,e)});function a(e,t,n,r,i,o,u){var c,l,f,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(d=s.call(this,e)).name="GraphQLError",d.originalError=null!=o?o:void 0,d.nodes=G(Array.isArray(t)?t:t?[t]:void 0);for(var h=[],p=0,v=null!==(y=d.nodes)&&void 0!==y?y:[];p<v.length;p++){var y,g=v[p].loc;null!=g&&h.push(g)}h=G(h),d.source=null!=n?n:null===(c=h)||void 0===c?void 0:c[0].source,d.positions=null!=r?r:null===(l=h)||void 0===l?void 0:l.map((function(e){return e.start})),d.locations=r&&n?r.map((function(e){return x(n,e)})):null===(f=h)||void 0===f?void 0:f.map((function(e){return x(e.source,e.start)})),d.path=null!=i?i:void 0;var m,b=null==o?void 0:o.extensions;return null==u&&("object"==T(m=b)&&null!==m)?d.extensions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b):d.extensions=null!=u?u:{},Object.defineProperties(L(d),{message:{enumerable:!0},locations:{enumerable:null!=d.locations},path:{enumerable:null!=d.path},extensions:{enumerable:null!=d.extensions&&Object.keys(d.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(L(d),"stack",{value:o.stack,writable:!0,configurable:!0}),F(d)):(Error.captureStackTrace?Error.captureStackTrace(L(d),a):Object.defineProperty(L(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return r=a,(i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+P(i.loc))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++){var a=s[o];t+="\n\n"+k(e.source,a)}return t}(this)}},{key:C,get:function(){return"Object"}}])&&U(r.prototype,i),o&&U(r,o),a}(B(Error));function G(e){return void 0===e||0===e.length?void 0:e}function W(e,t,n){return new V("Syntax Error: ".concat(n),void 0,e,[t])}var Y=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});var J="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function $(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,J&&(e.prototype[J]=t)}var Z=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();$(Z);var Q=function(){function e(e,t,n,r,i,o,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function X(e){return null!=e&&"string"==typeof e.kind}$(Q);var ee=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"});function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ne(e){return re(e,[])}function re(e,t){switch(te(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(J)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:re(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(re(e[o],t));1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+re(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function ie(e,t){if(!Boolean(e))throw new Error(t)}var oe=function(e,t){return e instanceof t};function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ae=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||ie(0,"Body must be a string. Received: ".concat(ne(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||ie(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ie(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:C,get:function(){return"Source"}}])&&se(t.prototype,n),r&&se(t,r),e}();var ue=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function ce(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&le(t[i]);)++i;for(var o=t.length;o>i&&le(t[o-1]);)--o;return t.slice(i,o).join("\n")}function le(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var fe=function(){function e(e){var t=new Q(ee.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==ee.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=he(this,e)}while(e.kind===ee.COMMENT);return e},e}();function de(e){return isNaN(e)?ee.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function he(e,t){for(var n=e.source,r=n.body,i=r.length,o=t.end;o<i;){var s=r.charCodeAt(o),a=e.line,u=1+o-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new Q(ee.BANG,o,o+1,a,u,t);case 35:return ve(n,o,a,u,t);case 36:return new Q(ee.DOLLAR,o,o+1,a,u,t);case 38:return new Q(ee.AMP,o,o+1,a,u,t);case 40:return new Q(ee.PAREN_L,o,o+1,a,u,t);case 41:return new Q(ee.PAREN_R,o,o+1,a,u,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new Q(ee.SPREAD,o,o+3,a,u,t);break;case 58:return new Q(ee.COLON,o,o+1,a,u,t);case 61:return new Q(ee.EQUALS,o,o+1,a,u,t);case 64:return new Q(ee.AT,o,o+1,a,u,t);case 91:return new Q(ee.BRACKET_L,o,o+1,a,u,t);case 93:return new Q(ee.BRACKET_R,o,o+1,a,u,t);case 123:return new Q(ee.BRACE_L,o,o+1,a,u,t);case 124:return new Q(ee.PIPE,o,o+1,a,u,t);case 125:return new Q(ee.BRACE_R,o,o+1,a,u,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?be(n,o,a,u,t,e):me(n,o,a,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ye(n,o,s,a,u,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 Se(n,o,a,u,t)}throw W(n,o,pe(s))}var c=e.line,l=1+o-e.lineStart;return new Q(ee.EOF,i,i,c,l,t)}function pe(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(de(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(de(e),".")}function ve(e,t,n,r,i){var o,s=e.body,a=t;do{o=s.charCodeAt(++a)}while(!isNaN(o)&&(o>31||9===o));return new Q(ee.COMMENT,t,a,n,r,i,s.slice(t+1,a))}function ye(e,t,n,r,i,o){var s=e.body,a=n,u=t,c=!1;if(45===a&&(a=s.charCodeAt(++u)),48===a){if((a=s.charCodeAt(++u))>=48&&a<=57)throw W(e,u,"Invalid number, unexpected digit after 0: ".concat(de(a),"."))}else u=ge(e,u,a),a=s.charCodeAt(u);if(46===a&&(c=!0,a=s.charCodeAt(++u),u=ge(e,u,a),a=s.charCodeAt(u)),69!==a&&101!==a||(c=!0,43!==(a=s.charCodeAt(++u))&&45!==a||(a=s.charCodeAt(++u)),u=ge(e,u,a),a=s.charCodeAt(u)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw W(e,u,"Invalid number, expected digit but got: ".concat(de(a),"."));return new Q(c?ee.FLOAT:ee.INT,t,u,r,i,o,s.slice(t,u))}function ge(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw W(e,i,"Invalid number, expected digit but got: ".concat(de(o),"."))}function me(e,t,n,r,i){for(var o,s,a,u,c=e.body,l=t+1,f=l,d=0,h="";l<c.length&&!isNaN(d=c.charCodeAt(l))&&10!==d&&13!==d;){if(34===d)return h+=c.slice(f,l),new Q(ee.STRING,t,l+1,n,r,i,h);if(d<32&&9!==d)throw W(e,l,"Invalid character within String: ".concat(de(d),"."));if(++l,92===d){switch(h+=c.slice(f,l-1),d=c.charCodeAt(l)){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var p=(o=c.charCodeAt(l+1),s=c.charCodeAt(l+2),a=c.charCodeAt(l+3),u=c.charCodeAt(l+4),we(o)<<12|we(s)<<8|we(a)<<4|we(u));if(p<0){var v=c.slice(l+1,l+5);throw W(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}h+=String.fromCharCode(p),l+=4;break;default:throw W(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(d),"."))}f=++l}}throw W(e,l,"Unterminated string.")}function be(e,t,n,r,i,o){for(var s=e.body,a=t+3,u=a,c=0,l="";a<s.length&&!isNaN(c=s.charCodeAt(a));){if(34===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(u,a),new Q(ee.BLOCK_STRING,t,a+3,n,r,i,ce(l));if(c<32&&9!==c&&10!==c&&13!==c)throw W(e,a,"Invalid character within String: ".concat(de(c),"."));10===c?(++a,++o.line,o.lineStart=a):13===c?(10===s.charCodeAt(a+1)?a+=2:++a,++o.line,o.lineStart=a):92===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(u,a)+'"""',u=a+=4):++a}throw W(e,a,"Unterminated string.")}function we(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Se(e,t,n,r,i){for(var o=e.body,s=o.length,a=t+1,u=0;a!==s&&!isNaN(u=o.charCodeAt(a))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++a;return new Q(ee.NAME,t,a,n,r,i,o.slice(t,a))}function _e(e,t){return new Ee(e,t).parseDocument()}var Ee=function(){function e(e,t){var n=function(e){return oe(e,ae)}(e)?e:new ae(e);this._lexer=new fe(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(ee.NAME);return{kind:Y.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:Y.DOCUMENT,definitions:this.many(ee.SOF,this.parseDefinition,ee.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(ee.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(ee.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(ee.BRACE_L))return{kind:Y.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(ee.NAME)&&(t=this.parseName()),{kind:Y.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(ee.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(ee.PAREN_L,this.parseVariableDefinition,ee.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:Y.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ee.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ee.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(ee.DOLLAR),{kind:Y.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:Y.SELECTION_SET,selections:this.many(ee.BRACE_L,this.parseSelection,ee.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(ee.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(ee.COLON)?(e=r,t=this.parseName()):t=r,{kind:Y.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ee.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ee.PAREN_L,t,ee.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(ee.COLON),{kind:Y.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:Y.ARGUMENT,name:this.parseName(),value:(this.expectToken(ee.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(ee.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(ee.NAME)?{kind:Y.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:Y.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:Y.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Y.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case ee.BRACKET_L:return this.parseList(e);case ee.BRACE_L:return this.parseObject(e);case ee.INT:return this._lexer.advance(),{kind:Y.INT,value:t.value,loc:this.loc(t)};case ee.FLOAT:return this._lexer.advance(),{kind:Y.FLOAT,value:t.value,loc:this.loc(t)};case ee.STRING:case ee.BLOCK_STRING:return this.parseStringLiteral();case ee.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Y.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Y.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Y.NULL,loc:this.loc(t)};default:return{kind:Y.ENUM,value:t.value,loc:this.loc(t)}}case ee.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:Y.STRING,value:e.value,block:e.kind===ee.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:Y.LIST,values:this.any(ee.BRACKET_L,(function(){return t.parseValueLiteral(e)}),ee.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:Y.OBJECT,fields:this.any(ee.BRACE_L,(function(){return t.parseObjectField(e)}),ee.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(ee.COLON),{kind:Y.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(ee.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(ee.AT),{kind:Y.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(ee.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(ee.BRACKET_R),e={kind:Y.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(ee.BANG)?{kind:Y.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:Y.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===ee.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(ee.STRING)||this.peek(ee.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);return{kind:Y.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(ee.COLON);var n=this.parseNamedType();return{kind:Y.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:Y.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Y.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(ee.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.AMP)||this.peek(ee.NAME));return t}return this.delimitedMany(ee.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(ee.BRACE_L)&&this._lexer.lookahead().kind===ee.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(ee.BRACE_L,this.parseFieldDefinition,ee.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ee.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Y.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(ee.PAREN_L,this.parseInputValueDef,ee.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(ee.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(ee.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Y.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Y.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Y.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(ee.EQUALS)?this.delimitedMany(ee.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Y.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(ee.BRACE_L,this.parseEnumValueDefinition,ee.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:Y.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Y.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(ee.BRACE_L,this.parseInputValueDef,ee.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===ee.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:Y.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:Y.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Y.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Y.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ee.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Y.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(ee.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==ue[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new Z(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw W(this._lexer.source,t.start,"Expected ".concat(Oe(e),", found ").concat(Ae(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==ee.NAME||t.value!==e)throw W(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(Ae(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===ee.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return W(this._lexer.source,t.start,"Unexpected ".concat(Ae(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function Ae(e){var t=e.value;return Oe(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Oe(e){return function(e){return e===ee.BANG||e===ee.DOLLAR||e===ee.AMP||e===ee.PAREN_L||e===ee.PAREN_R||e===ee.SPREAD||e===ee.COLON||e===ee.EQUALS||e===ee.AT||e===ee.BRACKET_L||e===ee.BRACKET_R||e===ee.BRACE_L||e===ee.PIPE||e===ee.BRACE_R}(e)?'"'.concat(e,'"'):e}var Ie={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","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","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Te=Object.freeze({});function Ce(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}function xe(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ie,r=void 0,i=Array.isArray(e),o=[e],s=-1,a=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p=++s===o.length,v=p&&0!==a.length;if(p){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),v){if(i)u=u.slice();else{for(var y={},g=0,m=Object.keys(u);g<m.length;g++){var b=m[g];y[b]=u[b]}u=y}for(var w=0,S=0;S<a.length;S++){var _=a[S][0],E=a[S][1];i&&(_-=w),i&&null===E?(u.splice(_,1),w++):u[_]=E}}s=r.index,o=r.keys,a=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?s:o[s]:void 0,null==(u=l?l[c]:h))continue;l&&f.push(c)}var A,O=void 0;if(!Array.isArray(u)){if(!X(u))throw new Error("Invalid AST Node: ".concat(ne(u),"."));var I=Ce(t,u.kind,p);if(I){if((O=I.call(t,u,c,l,f,d))===Te)break;if(!1===O){if(!p){f.pop();continue}}else if(void 0!==O&&(a.push([c,O]),!p)){if(!X(O)){f.pop();continue}u=O}}}if(void 0===O&&v&&a.push([c,u]),p)f.pop();else r={inArray:i,index:s,keys:o,edits:a,prev:r},o=(i=Array.isArray(u))?u:null!==(A=n[u.kind])&&void 0!==A?A:[],s=-1,a=[],l&&d.push(l),l=u}while(void 0!==r);return 0!==a.length&&(h=a[a.length-1][1]),h}(e,{leave:Pe})}var Pe={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Ne(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=je("(",Ne(e.variableDefinitions,", "),")"),i=Ne(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?Ne([t,Ne([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+je(" = ",r)+je(" ",Ne(i," "))},SelectionSet:function(e){return Me(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet,s=je("",t,": ")+n,a=s+je("(",Ne(r,", "),")");return a.length>80&&(a=s+je("(\n",Re(Ne(r,"\n")),"\n)")),Ne([a,Ne(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+je(" ",Ne(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Ne(["...",je("on ",t),Ne(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(je("(",Ne(r,", "),")")," ")+"on ".concat(n," ").concat(je("",Ne(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],s="\\"===e[e.length-1],a=!r||o||s||n,u="";return!a||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,a&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}(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"["+Ne(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Ne(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+je("(",Ne(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:ke((function(e){var t=e.directives,n=e.operationTypes;return Ne(["schema",Ne(t," "),Me(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:ke((function(e){return Ne(["scalar",e.name,Ne(e.directives," ")]," ")})),ObjectTypeDefinition:ke((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["type",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")})),FieldDefinition:ke((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(Ue(n)?je("(\n",Re(Ne(n,"\n")),"\n)"):je("(",Ne(n,", "),")"))+": "+r+je(" ",Ne(i," "))})),InputValueDefinition:ke((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Ne([t+": "+n,je("= ",r),Ne(i," ")]," ")})),InterfaceTypeDefinition:ke((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["interface",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")})),UnionTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.types;return Ne(["union",t,Ne(n," "),r&&0!==r.length?"= "+Ne(r," | "):""]," ")})),EnumTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.values;return Ne(["enum",t,Ne(n," "),Me(r)]," ")})),EnumValueDefinition:ke((function(e){return Ne([e.name,Ne(e.directives," ")]," ")})),InputObjectTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.fields;return Ne(["input",t,Ne(n," "),Me(r)]," ")})),DirectiveDefinition:ke((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(Ue(n)?je("(\n",Re(Ne(n,"\n")),"\n)"):je("(",Ne(n,", "),")"))+(r?" repeatable":"")+" on "+Ne(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Ne(["extend schema",Ne(t," "),Me(n)]," ")},ScalarTypeExtension:function(e){return Ne(["extend scalar",e.name,Ne(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["extend type",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["extend interface",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Ne(["extend union",t,Ne(n," "),r&&0!==r.length?"= "+Ne(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Ne(["extend enum",t,Ne(n," "),Me(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Ne(["extend input",t,Ne(n," "),Me(r)]," ")}};function ke(e){return function(t){return Ne([t.description,e(t)],"\n")}}function Ne(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Me(e){return je("{\n",Re(Ne(e,"\n")),"\n}")}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function Re(e){return je(" ",e.replace(/\n/g,"\n "))}function De(e){return-1!==e.indexOf("\n")}function Ue(e){return null!=e&&e.some(De)}var Fe=n(7),Le=n(36),Be=n(16),qe=n.n(Be),ze=n(15),Ke=n(22),He=function(){return(He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ve=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Ge=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},We=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ye=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},Je=new o.a("GraphQLAPI"),$e=function(){function e(e){this._api=null,this.Auth=ze.a,this.Cache=i.a,this.Credentials=s.a,this._options=e,Je.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"GraphQLAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=We(t,["API"]),o=He(He({},i),r);return Je.debug("configure GraphQL API",{opt:o}),o.aws_project_region&&(o=Object.assign({},o,{region:o.aws_project_region,header:{}})),void 0!==o.graphql_headers&&"function"!=typeof o.graphql_headers&&(Je.warn("graphql_headers should be a function"),o.graphql_headers=void 0),this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return Je.debug("create Rest instance"),this._options?(this._api=new m(this._options),this._api.Credentials=this.Credentials,!0):Promise.reject("API not configured")},e.prototype._headerBasedAuth=function(e,t){return void 0===t&&(t={}),Ve(this,void 0,void 0,(function(){var n,r,o,s,a,u,c,l;return Ge(this,(function(f){switch(f.label){case 0:switch(n=this._options,r=n.aws_appsync_authenticationType,o=n.aws_appsync_apiKey,s={},e||r||"AWS_IAM"){case"API_KEY":return[3,1];case"AWS_IAM":return[3,2];case"OPENID_CONNECT":return[3,4];case"AMAZON_COGNITO_USER_POOLS":return[3,11];case"AWS_LAMBDA":return[3,15]}return[3,16];case 1:if(!o)throw new Error(Ke.a.NO_API_KEY);return s={Authorization:null,"X-Api-Key":o},[3,17];case 2:return[4,this._ensureCredentials()];case 3:if(!f.sent())throw new Error(Ke.a.NO_CREDENTIALS);return[3,17];case 4:return f.trys.push([4,9,,10]),a=void 0,[4,i.a.getItem("federatedInfo")];case 5:return(u=f.sent())?(a=u.token,[3,8]):[3,6];case 6:return[4,ze.a.currentAuthenticatedUser()];case 7:(c=f.sent())&&(a=c.token),f.label=8;case 8:if(!a)throw new Error(Ke.a.NO_FEDERATED_JWT);return s={Authorization:a},[3,10];case 9:throw f.sent(),new Error(Ke.a.NO_CURRENT_USER);case 10:return[3,17];case 11:return f.trys.push([11,13,,14]),[4,this.Auth.currentSession()];case 12:return l=f.sent(),s={Authorization:l.getAccessToken().getJwtToken()},[3,14];case 13:throw f.sent(),new Error(Ke.a.NO_CURRENT_USER);case 14:return[3,17];case 15:if(!t.Authorization)throw new Error(Ke.a.NO_AUTH_TOKEN);return s={Authorization:t.Authorization},[3,17];case 16:return s={Authorization:null},[3,17];case 17:return[2,s]}}))}))},e.prototype.getGraphqlOperationType=function(e){var t=_e(e).definitions;return Ye(t,1)[0].operation},e.prototype.graphql=function(e,t){var n=e.query,r=e.variables,i=void 0===r?{}:r,o=e.authMode,s=e.authToken,a=_e("string"==typeof n?n:xe(n)),u=Ye(a.definitions.filter((function(e){return"OperationDefinition"===e.kind})),1)[0],c=(void 0===u?{}:u).operation,l=t||{};switch(s&&(l.Authorization=s),c){case"query":case"mutation":var f=this._api.getCancellableToken(),d={cancellableToken:f},h=this._graphql({query:a,variables:i,authMode:o},l,d);return this._api.updateRequestToBeCancellable(h,f),h;case"subscription":return this._graphqlSubscribe({query:a,variables:i,authMode:o},l);default:throw new Error("invalid operation type: "+c)}},e.prototype._graphql=function(e,t,n){var r=e.query,i=e.variables,o=e.authMode;return void 0===t&&(t={}),void 0===n&&(n={}),Ve(this,void 0,void 0,(function(){var e,s,a,u,c,l,f,d,h,p,v,y,g,m,b,w,S,_,E,A,O;return Ge(this,(function(I){switch(I.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:I.sent(),I.label=2;case 2:return e=this._options,s=e.aws_appsync_region,a=e.aws_appsync_graphqlEndpoint,u=e.graphql_headers,c=void 0===u?function(){return{}}:u,l=e.graphql_endpoint,f=e.graphql_endpoint_iam_region,h=[{}],(p=!l)?[4,this._headerBasedAuth(o,t)]:[3,4];case 3:p=I.sent(),I.label=4;case 4:return v=[He.apply(void 0,h.concat([p]))],(y=l)?f?[4,this._headerBasedAuth(o,t)]:[3,6]:[3,8];case 5:return g=I.sent(),[3,7];case 6:g={Authorization:null},I.label=7;case 7:y=g,I.label=8;case 8:return m=[He.apply(void 0,v.concat([y]))],[4,c({query:r,variables:i})];case 9:if(d=He.apply(void 0,[He.apply(void 0,[He.apply(void 0,m.concat([I.sent()])),t]),!l&&(O={},O["x-amz-user-agent"]=Fe.a.userAgent,O)]),b={query:xe(r),variables:i},w=Object.assign({headers:d,body:b,signerServiceInfo:{service:l?"execute-api":"appsync",region:l?f:s}},n),!(S=l||a))throw{data:{},errors:[new V("No graphql endpoint provided.")]};I.label=10;case 10:return I.trys.push([10,12,,13]),[4,this._api.post(S,w)];case 11:return _=I.sent(),[3,13];case 12:if(E=I.sent(),this._api.isCancel(E))throw E;return _={data:{},errors:[new V(E.message,null,null,null,null,E)]},[3,13];case 13:if((A=_.errors)&&A.length)throw _;return[2,_]}}))}))},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype._graphqlSubscribe=function(e,t){var n=e.query,r=e.variables,i=e.authMode,o=e.authToken;void 0===t&&(t={});var s=this._options,a=s.aws_appsync_region,u=s.aws_appsync_graphqlEndpoint,c=s.aws_appsync_authenticationType,l=s.aws_appsync_apiKey,f=s.graphql_headers,d=void 0===f?function(){return{}}:f,h=i||c||"AWS_IAM";if(qe.a&&"function"==typeof qe.a.subscribe)return qe.a.subscribe("",{provider:Le.a,appSyncGraphqlEndpoint:u,authenticationType:h,apiKey:l,query:xe(n),region:a,variables:r,graphql_headers:d,additionalHeaders:t,authToken:o});throw Je.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},e.prototype._ensureCredentials=function(){var e=this;return this.Credentials.get().then((function(t){if(!t)return!1;var n=e.Credentials.shear(t);return Je.debug("set credentials for api",n),!0})).catch((function(e){return Je.warn("ensure credentials error",e),!1}))},e}(),Ze=new $e(null);b.a.register(Ze);var Qe=function(){return(Qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Xe=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},et=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},tt=new o.a("API"),nt=new(function(){function e(e){this.Auth=r.a,this.Cache=i.a,this.Credentials=s.a,this._options=e,this._restApi=new O(e),this._graphqlApi=new $e(e),tt.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){this._options=Object.assign({},this._options,e),this._restApi.Credentials=this.Credentials,this._graphqlApi.Auth=this.Auth,this._graphqlApi.Cache=this.Cache,this._graphqlApi.Credentials=this.Credentials;var t=this._restApi.configure(this._options),n=this._graphqlApi.configure(this._options);return Qe(Qe({},t),n)},e.prototype.get=function(e,t,n){return this._restApi.get(e,t,n)},e.prototype.post=function(e,t,n){return this._restApi.post(e,t,n)},e.prototype.put=function(e,t,n){return this._restApi.put(e,t,n)},e.prototype.patch=function(e,t,n){return this._restApi.patch(e,t,n)},e.prototype.del=function(e,t,n){return this._restApi.del(e,t,n)},e.prototype.head=function(e,t,n){return this._restApi.head(e,t,n)},e.prototype.isCancel=function(e){return this._restApi.isCancel(e)},e.prototype.cancel=function(e,t){return this._restApi.hasCancelToken(e)?this._restApi.cancel(e,t):!!this._graphqlApi.hasCancelToken(e)&&this._graphqlApi.cancel(e,t)},e.prototype.endpoint=function(e){return Xe(this,void 0,void 0,(function(){return et(this,(function(t){return[2,this._restApi.endpoint(e)]}))}))},e.prototype.getGraphqlOperationType=function(e){return this._graphqlApi.getGraphqlOperationType(e)},e.prototype.graphql=function(e,t){return this._graphqlApi.graphql(e,t)},e}())(null);b.a.register(nt);t.a=nt},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.NO_API_KEY="No api-key configured",e.NO_CURRENT_USER="No current user",e.NO_CREDENTIALS="No credentials",e.NO_FEDERATED_JWT="No federated jwt",e.NO_AUTH_TOKEN="No auth token specified"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(r||(r={}));var u=function(){function e(e,t){void 0===t&&(t=r.WARN),this.name=e,this.level=t,this._pluggables=[]}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.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var n,o,s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];var c=this.level;e.LOG_LEVEL&&(c=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(c=window.LOG_LEVEL);var l=a[c],f=a[t];if(f>=l){var d=console.log.bind(console);t===r.ERROR&&console.error&&(d=console.error.bind(console)),t===r.WARN&&console.warn&&(d=console.warn.bind(console));var h="["+t+"] "+this._ts()+" "+this.name,p="";if(1===s.length&&"string"==typeof s[0])d(p=h+" - "+s[0]);else if(1===s.length)p=h+" "+s[0],d(h,s[0]);else if("string"==typeof s[0]){var v=s.slice(1);1===v.length&&(v=v[0]),p=h+" - "+s[0]+" "+v,d(h+" - "+s[0],v)}else p=h+" "+s,d(h,s);try{for(var y=i(this._pluggables),g=y.next();!g.done;g=y.next()){var m=g.value,b={message:p,timestamp:Date.now()};m.pushLogs([b])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(n)throw n.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&"Logging"===e.getCategoryName()&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}()},function(e,t,n){"use strict";var r=n(18),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(n(32).a)).getStorage()};function o(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 s(){return(new Date).getTime()}function a(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var u={},c=(function(){function e(){}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]}}(),n(23));function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f,d=new c.a("StorageCache"),h=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(){a(this.config.capacityInBytes)||(d.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),a(this.config.itemMaxSize)||(d.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),a(this.config.defaultTTL)||(d.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),a(this.config.defaultPriority)||(d.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(d.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(d.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(d.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(d.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:s(),visitedTime:s(),priority:n.priority,expires:n.expires,type:l(t),byteSize:0};return r.byteSize=o(JSON.stringify(r)),r.byteSize=o(JSON.stringify(r)),r},e.prototype.configure=function(e){return e?(e.keyPrefix&&d.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),p=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=new c.a("Cache"),y=new(function(e){function t(t){var n=this,r=t?Object.assign({},i,t):i;return(n=e.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return p(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=s(),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 s()>=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),v.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var s=JSON.parse(o);n.push(s)}}n.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){v.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+s()};if(i.priority<1||i.priority>5)v.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,t,i);if(o.byteSize>this.config.itemMaxSize)v.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var a=this.config.storage.getItem(r);if(a&&this._removeItem(r,JSON.parse(a).byteSize),this._isCacheFull(o.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(u,c)}}this._setItem(r,o)}catch(e){v.warn("setItem failed! "+e)}}}else v.warn("The value of item should not be undefined!");else v.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){v.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return v.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return v.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){v.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(e){v.warn("removeItem failed! "+e)}},t.prototype.clear=function(){v.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){v.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.keyPrefix||(v.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=s.toString()),new t(e)},t}(h));t.a=y;r.a.register(y)},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return g}));var r=n(23),i=n(14),o=n(158),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=new r.a("CognitoCredentials"),c=new Promise((function(e,t){return Object(i.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(u.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(u.debug("not in the browser, directly resolved"),e())})),l=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(u.debug("need to wait for the Google SDK loaded"),[4,c]);case 1:e.sent(),this.initialized=!0,u.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(i.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(u.debug("google Auth undefined"),n(new o.a("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(u.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new o.a("Failed to reload google auth response"))}))):n(new o.a("User is not signed in with Google"))})).catch((function(e){u.debug("Failed to refresh google token",e),n(new o.a("Failed to refresh google token"))}))})):(u.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},h=new r.a("CognitoCredentials"),p=new Promise((function(e,t){return Object(i.b)().isBrowser?window.FB?(h.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(h.debug("not in the browser, directly resolved"),e())})),v=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(h.debug("need to wait for the Facebook SDK loaded"),[4,p]);case 1:e.sent(),this.initialized=!0,h.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(i.b)().isBrowser&&(e=window.FB),!e){return h.debug("no fb sdk available"),Promise.reject(new o.a("no fb sdk available"))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,s=1e3*r.expiresIn+(new Date).getTime();if(!i){a="the jwtToken is undefined";h.debug(a),n(new o.a(a))}t({token:i,expires_at:s})}else{var a="no response from facebook when refreshing the jwt token";h.debug(a),n(new o.a(a))}}),{scope:"public_profile,email"})}))},e}(),y=new l,g=new v},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return p}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e){return/^Connection failed: Connection Timeout/.test(e.message)},a=function(e){return/^Error: Request failed with status code 5\d\d/.test(e.message)},u={BadModel:function(){return!1},BadRecord:function(e){var t=e.message;return/^Cannot return \w+ for [\w-_]+ type/.test(t)||/^Variable '.+' has coerced Null value for NonNull type/.test(t)},ConfigError:function(){return!1},Transient:function(e){return s(e)||a(e)},Unauthorized:function(e){return/^Request failed with status code 401/.test(e.message)}},c={BadModel:function(){return!1},BadRecord:function(){return!1},ConfigError:function(){return!1},Transient:function(e){var t=f(e);return s(t)||a(t)},Unauthorized:function(e){var t=f(e);return/Connection failed.+Unauthorized/.test(t.message)}},l={BadModel:function(){return!1},BadRecord:function(e){return/^Cannot return \w+ for [\w-_]+ type/.test(e.message)},ConfigError:function(){return!1},Transient:function(e){return s(e)||a(e)},Unauthorized:function(){return!1}};function f(e){var t=e.error;return r((void 0===t?{errors:[]}:t).errors,1)[0]}function d(e){return v(u,e)}function h(e){return v(c,e)}function p(e){return v(l,e)}function v(e,t){var n,r,s=i(Object.keys(e));try{for(var a=o(s),u=a.next();!u.done;u=a.next()){var c=u.value;if((0,e[c])(t))return c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return"Unknown"}},function(e,t,n){var r;e.exports=(r=n(12),n(43),n(99),r.HmacSHA256)},function(e,t,n){"use strict";
|
|
50
|
+
var oe=function(){function e(e,t){var n=e||{},r=n.UserPoolId,i=n.ClientId,o=n.endpoint,s=n.fetchOptions,a=n.AdvancedSecurityDataCollectionFlag;if(!r||!i)throw new Error("Both UserPoolId and ClientId are required.");if(r.length>55||!/^[\w-]+_[0-9a-zA-Z]+$/.test(r))throw new Error("Invalid UserPoolId format.");var u=r.split("_")[0];this.userPoolId=r,this.clientId=i,this.client=new re(u,o,s),this.advancedSecurityDataCollectionFlag=!1!==a,this.storage=e.Storage||(new H).getStorage(),t&&(this.wrapRefreshSessionCallback=t)}var t=e.prototype;return t.getUserPoolId=function(){return this.userPoolId},t.getClientId=function(){return this.clientId},t.signUp=function(e,t,n,r,i,o){var s=this,a={ClientId:this.clientId,Username:e,Password:t,UserAttributes:n,ValidationData:r,ClientMetadata:o};this.getUserContextData(e)&&(a.UserContextData=this.getUserContextData(e)),this.client.request("SignUp",a,(function(t,n){if(t)return i(t,null);var r={Username:e,Pool:s,Storage:s.storage},o={user:new G(r),userConfirmed:n.UserConfirmed,userSub:n.UserSub,codeDeliveryDetails:n.CodeDeliveryDetails};return i(null,o)}))},t.getCurrentUser=function(){var e="CognitoIdentityServiceProvider."+this.clientId+".LastAuthUser",t=this.storage.getItem(e);if(t){var n={Username:t,Pool:this,Storage:this.storage};return new G(n)}return null},t.getUserContextData=function(e){if("undefined"!=typeof AmazonCognitoAdvancedSecurityData){var t=AmazonCognitoAdvancedSecurityData;if(this.advancedSecurityDataCollectionFlag){var n=t.getData(e,this.userPoolId,this.clientId);if(n)return{EncodedData:n}}return{}}},e}(),se=n(29),ae=function(){function e(e){if(!e.domain)throw new Error("The domain of cookieStorage can not be undefined.");if(this.domain=e.domain,e.path?this.path=e.path:this.path="/",Object.prototype.hasOwnProperty.call(e,"expires")?this.expires=e.expires:this.expires=365,Object.prototype.hasOwnProperty.call(e,"secure")?this.secure=e.secure:this.secure=!0,Object.prototype.hasOwnProperty.call(e,"sameSite")){if(!["strict","lax","none"].includes(e.sameSite))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if("none"===e.sameSite&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=e.sameSite}else this.sameSite=null}var t=e.prototype;return t.setItem=function(e,t){var n={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(n.sameSite=this.sameSite),se.set(e,t,n),se.get(e)},t.getItem=function(e){return se.get(e)},t.removeItem=function(e){var t={path:this.path,expires:this.expires,domain:this.domain,secure:this.secure};return this.sameSite&&(t.sameSite=this.sameSite),se.remove(e,t)},t.clear=function(){for(var e=se.get(),t=Object.keys(e).length,n=0;n<t;++n)this.removeItem(Object.keys(e)[n]);return{}},e}()},function(e,t,n){"use strict";var r=n(83),i=n.n(r).a;t.a=i},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool"}(r||(r={}))},function(e,t,n){(function(t){var r;e.exports=(r=r||function(e,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==t&&t.crypto&&(i=t.crypto),!i)try{i=n(98)}catch(e){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},u=a.lib={},c=u.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.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)}},l=u.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),f=a.enc={},d=f.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},h=f.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new l.init(n,t)}},p=f.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},v=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*u,o);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(i,f);n=i.splice(0,u),r.sigBytes-=c}return new l.init(n,c)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),y=(u.Hasher=v.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){v.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 y.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math),r)}).call(this,n(31))},function(e,t,n){"use strict";var r=n(64),i=Object.prototype.toString;function o(e){return Array.isArray(e)}function s(e){return void 0===e}function a(e){return"[object ArrayBuffer]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:a,isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&a(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function n(n,r){c(t[r])&&c(n)?t[r]=e(t[r],n):c(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)f(arguments[r],n);return t},extend:function(e,t,n){return f(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";(function(e){n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return y}));var r=[{type:"text/plain",ext:"txt"},{type:"text/html",ext:"html"},{type:"text/javascript",ext:"js"},{type:"text/css",ext:"css"},{type:"text/csv",ext:"csv"},{type:"text/yaml",ext:"yml"},{type:"text/yaml",ext:"yaml"},{type:"text/calendar",ext:"ics"},{type:"text/calendar",ext:"ical"},{type:"image/apng",ext:"apng"},{type:"image/bmp",ext:"bmp"},{type:"image/gif",ext:"gif"},{type:"image/x-icon",ext:"ico"},{type:"image/x-icon",ext:"cur"},{type:"image/jpeg",ext:"jpg"},{type:"image/jpeg",ext:"jpeg"},{type:"image/jpeg",ext:"jfif"},{type:"image/jpeg",ext:"pjp"},{type:"image/jpeg",ext:"pjpeg"},{type:"image/png",ext:"png"},{type:"image/svg+xml",ext:"svg"},{type:"image/tiff",ext:"tif"},{type:"image/tiff",ext:"tiff"},{type:"image/webp",ext:"webp"},{type:"application/json",ext:"json"},{type:"application/xml",ext:"xml"},{type:"application/x-sh",ext:"sh"},{type:"application/zip",ext:"zip"},{type:"application/x-rar-compressed",ext:"rar"},{type:"application/x-tar",ext:"tar"},{type:"application/x-bzip",ext:"bz"},{type:"application/x-bzip2",ext:"bz2"},{type:"application/pdf",ext:"pdf"},{type:"application/java-archive",ext:"jar"},{type:"application/msword",ext:"doc"},{type:"application/vnd.ms-excel",ext:"xls"},{type:"application/vnd.ms-excel",ext:"xlsx"},{type:"message/rfc822",ext:"eml"}],i=function(e){return void 0===e&&(e={}),0===Object.keys(e).length},o=function(e,t,n){if(!e||!e.sort)return!1;var r=n&&"desc"===n?-1:1;return e.sort((function(e,n){var i=e[t],o=n[t];return void 0===o?void 0===i?0:1*r:void 0===i||i<o?-1*r:i>o?1*r:0})),!0},s=function(e,t){var n=Object.assign({},e);return t&&("string"==typeof t?delete n[t]:t.forEach((function(e){delete n[e]}))),n},a=function(e,t){void 0===t&&(t="application/octet-stream");var n=e.toLowerCase(),i=r.filter((function(e){return n.endsWith("."+e.ext)}));return i.length>0?i[0].type:t},u=function(e){var t=e.toLowerCase();return!!t.startsWith("text/")||("application/json"===t||"application/xml"===t||"application/sh"===t)},c=function(){for(var e="",t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)e+=t[Math.floor(Math.random()*t.length)];return e},l=function(e){if(e.isResolved)return e;var t=!0,n=!1,r=!1,i=e.then((function(e){return r=!0,t=!1,e}),(function(e){throw n=!0,t=!1,e}));return i.isFullfilled=function(){return r},i.isPending=function(){return t},i.isRejected=function(){return n},i},f=function(){if("undefined"==typeof self)return!1;var e=self;return void 0!==e.WorkerGlobalScope&&self instanceof e.WorkerGlobalScope},d=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==e&&null!=e.versions&&null!=e.versions.node}},h=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var i={};for(var o in t){if(t.hasOwnProperty(o))i[n.includes(o)?o:o[0].toLowerCase()+o.slice(1)]=r.includes(o)?t[o]:e(t[o],n,r)}return i},p=function e(t,n,r){if(void 0===n&&(n=[]),void 0===r&&(r=[]),!v(t))return t;var i={};for(var o in t){if(t.hasOwnProperty(o))i[n.includes(o)?o:o[0].toUpperCase()+o.slice(1)]=r.includes(o)?t[o]:e(t[o],n,r)}return i},v=function(e){return!(!(e instanceof Object)||e instanceof Array||e instanceof Function||e instanceof Number||e instanceof String||e instanceof Boolean)},y=function(){function e(){}return e.isEmpty=i,e.sortByField=o,e.objectLessAttributes=s,e.filenameToContentType=a,e.isTextFile=u,e.generateRandomString=c,e.makeQuerablePromise=l,e.isWebWorker=f,e.browserOrNode=d,e.transferKeyToLowerCase=h,e.transferKeyToUpperCase=p,e.isStrictObject=v,e}()}).call(this,n(52))},function(e,t,n){"use strict";var r=n(44);n(9);t.a=r.a},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function i(e){return!!e&&!!e[W]}function o(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Y}(e)||Array.isArray(e)||!!e[G]||!!e.constructor[G]||d(e)||h(e))}function s(e,t,n){void 0===n&&(n=!1),0===a(e)?(n?Object.keys:J)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function a(e){var t=e[W];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:h(e)?3:0}function u(e,t){return 2===a(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===a(e)?e.get(t):e[t]}function l(e,t,n){var r=a(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return z&&e instanceof Map}function h(e){return K&&e instanceof Set}function p(e){return e.o||e.t}function v(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$(e);delete t[W];for(var n=J(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function y(e,t){return void 0===t&&(t=!1),m(e)||i(e)||!o(e)||(a(e)>1&&(e.set=e.add=e.clear=e.delete=g),Object.freeze(e),t&&s(e,(function(e,t){return y(t,!0)}),!0)),e}function g(){r(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Z[e];return t||r(18,e),t}function w(e,t){Z[e]||(Z[e]=t)}function S(){return B}function _(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function E(e){A(e),e.p.forEach(I),e.p=null}function A(e){e===B&&(B=e.l)}function O(e){return B={p:[],l:B,h:e,m:!0,_:0}}function I(e){var t=e[W];0===t.i||1===t.i?t.j():t.O=!0}function T(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,i),i?(n[W].P&&(E(t),r(4)),o(e)&&(e=C(t,e),t.l||P(t,e)),t.u&&b("Patches").M(n[W],e,t.u,t.s)):e=C(t,n,[]),E(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function C(e,t,n){if(m(t))return t;var r=t[W];if(!r)return s(t,(function(i,o){return x(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return P(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=v(r.k):r.o;s(3===r.i?new Set(i):i,(function(t,o){return x(e,r,i,t,o,n)})),P(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function x(e,t,n,r,s,a){if(i(s)){var c=C(e,s,a&&t&&3!==t.i&&!u(t.D,r)?a.concat(r):void 0);if(l(n,r,c),!i(c))return;e.m=!1}if(o(s)&&!m(s)){if(!e.h.F&&e._<1)return;C(e,s),t&&t.A.l||P(e,s)}}function P(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&y(t,n)}function k(e,t){var n=e[W];return(n?p(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function M(e){e.P||(e.P=!0,e.l&&M(e.l))}function j(e){e.o||(e.o=v(e.t))}function R(e,t,n){var r=d(t)?b("MapSet").N(t,n):h(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=Q;n&&(i=[r],o=X);var s=Proxy.revocable(i,o),a=s.revoke,u=s.proxy;return r.k=u,r.j=a,u}(t,n):b("ES5").J(t,n);return(n?n.A:S()).p.push(r),r}function D(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[W],i=a(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=U(t,i),r.I=!1}else n=U(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||l(n,t,e(i))})),3===i?new Set(n):n}(e)}function U(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return v(e)}function F(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(d(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(h(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return u(t,G)&&(n[G]=t[G]),n}function t(t){return i(t)?e(t):t}var n="add";w("Patches",{$:function(t,i){return i.forEach((function(i){for(var o=i.path,s=i.op,u=t,l=0;l<o.length-1;l++){var f=a(u),d=""+o[l];0!==f&&1!==f||"__proto__"!==d&&"constructor"!==d||r(24),"function"==typeof u&&"prototype"===d&&r(24),"object"!=typeof(u=c(u,d))&&r(15,o.join("/"))}var h=a(u),p=e(i.value),v=o[o.length-1];switch(s){case"replace":switch(h){case 2:return u.set(v,p);case 3:r(16);default:return u[v]=p}case n:switch(h){case 1:return u.splice(v,0,p);case 2:return u.set(v,p);case 3:return u.add(p);default:return u[v]=p}case"remove":switch(h){case 1:return u.splice(v,1);case 2:return u.delete(v);case 3:return u.delete(i.value);default:return delete u[v]}default:r(17,s)}})),t},R:function(e,r,i,o){switch(e.i){case 0:case 4:case 2:return function(e,r,i,o){var a=e.t,l=e.o;s(e.D,(function(e,s){var f=c(a,e),d=c(l,e),h=s?u(a,e)?"replace":n:"remove";if(f!==d||"replace"!==h){var p=r.concat(e);i.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:d}),o.push(h===n?{op:"remove",path:p}:"remove"===h?{op:n,path:p,value:t(f)}:{op:"replace",path:p,value:t(f)})}}))}(e,r,i,o);case 5:case 1:return function(e,r,i,o){var s=e.t,a=e.D,u=e.o;if(u.length<s.length){var c=[u,s];s=c[0],u=c[1];var l=[o,i];i=l[0],o=l[1]}for(var f=0;f<s.length;f++)if(a[f]&&u[f]!==s[f]){var d=r.concat([f]);i.push({op:"replace",path:d,value:t(u[f])}),o.push({op:"replace",path:d,value:t(s[f])})}for(var h=s.length;h<u.length;h++){var p=r.concat([h]);i.push({op:n,path:p,value:t(u[h])})}s.length<u.length&&o.push({op:"replace",path:r.concat(["length"]),value:s.length})}(e,r,i,o);case 3:return function(e,t,r,i){var o=e.t,s=e.o,a=0;o.forEach((function(e){if(!s.has(e)){var o=t.concat([a]);r.push({op:"remove",path:o,value:e}),i.unshift({op:n,path:o,value:e})}a++})),a=0,s.forEach((function(e){if(!o.has(e)){var s=t.concat([a]);r.push({op:n,path:s,value:e}),i.unshift({op:"remove",path:s,value:e})}a++}))}(e,r,i,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===V?void 0:t}),r.push({op:"replace",path:[],value:e.t})}})}n.d(t,"a",(function(){return re})),n.d(t,"b",(function(){return F})),n.d(t,"c",(function(){return G})),n.d(t,"d",(function(){return te})),n.d(t,"e",(function(){return ne}));var L,B,q="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,K="undefined"!=typeof Set,H="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=q?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),G=q?Symbol.for("immer-draftable"):"__$immer_draftable",W=q?Symbol.for("immer-state"):"__$immer_state",Y=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),J="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$=Object.getOwnPropertyDescriptors||function(e){var t={};return J(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},Q={get:function(e,t){if(t===W)return e;var n=p(e);if(!u(n,t))return function(e,t,n){var r,i=N(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===k(e.t,t)?(j(e),e.o[t]=R(e.A.h,r,e)):r},has:function(e,t){return t in p(e)},ownKeys:function(e){return Reflect.ownKeys(p(e))},set:function(e,t,n){var r=N(p(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=k(p(e),t),o=null==i?void 0:i[W];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,i)&&(void 0!==n||u(e.t,t)))return!0;j(e),M(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==k(e.t,t)||t in e.t?(e.D[t]=!1,j(e),M(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=p(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},X={};s(Q,(function(e,t){X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),X.deleteProperty=function(e,t){return Q.deleteProperty.call(this,e[0],t)},X.set=function(e,t,n){return Q.set.call(this,e[0],t,n,e[0])};var ee=new(function(){function e(e){var t=this;this.g=H,this.F=!0,this.produce=function(e,n,i){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(i))}))}}var u;if("function"!=typeof n&&r(6),void 0!==i&&"function"!=typeof i&&r(7),o(e)){var c=O(t),l=R(t,e,void 0),f=!0;try{u=n(l),f=!1}finally{f?E(c):A(c)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return _(c,i),T(e,c)}),(function(e){throw E(c),e})):(_(c,i),T(u,c))}if(!e||"object"!=typeof e){if((u=n(e))===V)return;return void 0===u&&(u=e),t.F&&y(u,!0),u}r(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(i))}))}:[t.produce(e,n,(function(e,t){r=e,i=t})),r,i];var r,i},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),i(e)&&(e=D(e));var t=O(this),n=R(this,e,void 0);return n[W].C=!0,A(t),n},t.finishDraft=function(e,t){var n=(e&&e[W]).A;return _(n,t),T(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!H&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}()),te=ee.produce,ne=(ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee)),re=(ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee));ee.createDraft.bind(ee),ee.finishDraft.bind(ee)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(23),i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},o=new r.a("Amplify"),s=new(function(){function e(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Geo=null,this.Logger=r.a,this.ServiceWorker=null}return e.prototype.register=function(e){o.debug("component registered in amplify",e),this._components.push(e),"function"==typeof e.getModuleName?(this._modules[e.getModuleName()]=e,this[e.getModuleName()]=e):o.debug("no getModuleName method for component",e),e.configure(this._config)},e.prototype.configure=function(e){var t=this;return e?(this._config=Object.assign(this._config,e),o.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(e){var n=i(e,2),r=(n[0],n[1]);Object.keys(r).forEach((function(e){t._modules[e]&&(r[e]=t._modules[e])}))})),this._components.map((function(e){e.configure(t._config)})),this._config):this._config},e.prototype.addPluggable=function(e){e&&e.getCategory&&"function"==typeof e.getCategory&&this._components.map((function(t){t.addPluggable&&"function"==typeof t.addPluggable&&t.addPluggable(e)}))},e}())},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r={userAgent:"aws-amplify/4.5.9 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(r.product=navigator.product||"",r.navigator=navigator||null,navigator.product){case"ReactNative":r.userAgent="aws-amplify/4.5.9 react-native",r.isReactNative=!0;break;default:r.userAgent="aws-amplify/4.5.9 js",r.isReactNative=!1}var i=function(){return r.userAgent}},function(e,t,n){"use strict";var r=n(44),i=n(24),o=n(23),s=n(42),a=n(20),u=n(159),c=n(74),l=n(33),f=n.n(l),d=n(8),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},v=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},g=new o.a("RestClient"),m=function(){function e(e){this._region="us-east-1",this._service="execute-api",this._custom_header=void 0,this._cancelTokenMap=null,this.Credentials=s.a,this._options=e,g.debug("API Options",this._options),null==this._cancelTokenMap&&(this._cancelTokenMap=new WeakMap)}return e.prototype.ajax=function(e,t,n){return p(this,void 0,void 0,(function(){var r,i,o,s,c,l,f,p,m,b,w,S,_,E,A=this;return v(this,(function(v){switch(v.label){case 0:return g.debug(t,e),o="us-east-1",s="execute-api",c=void 0,"string"==typeof e?(r=this._parseUrl(e),i=e):(i=e.endpoint,c=e.custom_header,o=e.region,s=e.service,r=this._parseUrl(e.endpoint)),l={method:t,url:i,host:r.host,path:r.path,headers:{},data:null,responseType:"json",timeout:0,cancelToken:null},f={},a.a.isReactNative&&(p=a.a.userAgent||"aws-amplify/0.1.x",f={"User-Agent":p}),m=Object.assign({},n),b=m.response,m.body&&("function"==typeof FormData&&m.body instanceof FormData?(f["Content-Type"]="multipart/form-data",l.data=m.body):(f["Content-Type"]="application/json; charset=UTF-8",l.data=JSON.stringify(m.body))),m.responseType&&(l.responseType=m.responseType),m.withCredentials&&(l.withCredentials=m.withCredentials),m.timeout&&(l.timeout=m.timeout),m.cancellableToken&&(l.cancelToken=m.cancellableToken.token),l.signerServiceInfo=m.signerServiceInfo,"function"!=typeof c?[3,2]:[4,c()];case 1:return S=v.sent(),[3,3];case 2:S=void 0,v.label=3;case 3:return w=S,l.headers=h(h(h({},f),w),m.headers),_=Object(d.parse)(i,!0,!0),_.search,E=y(_,["search"]),l.url=Object(d.format)(h(h({},E),{query:h(h({},E.query),m.queryStringParameters||{})})),void 0!==l.headers.Authorization?(l.headers=Object.keys(l.headers).reduce((function(e,t){return l.headers[t]&&(e[t]=l.headers[t]),e}),{}),[2,this._request(l,b)]):[2,this.Credentials.get().then((function(r){return A._signed(h({},l),r,b,{region:o,service:s}).catch((function(r){if(u.a.isClockSkewError(r)){var i=r.response.headers,o=i&&(i.date||i.Date),s=new Date(o),a=u.a.getDateFromHeaderString(l.headers["x-amz-date"]);if(u.a.isClockSkewed(s))return u.a.setClockOffset(s.getTime()-a.getTime()),A.ajax(e,t,n)}throw r}))}),(function(e){return g.debug("No credentials available, the request will be unsigned"),A._request(l,b)}))]}}))}))},e.prototype.get=function(e,t){return this.ajax(e,"GET",t)},e.prototype.put=function(e,t){return this.ajax(e,"PUT",t)},e.prototype.patch=function(e,t){return this.ajax(e,"PATCH",t)},e.prototype.post=function(e,t){return this.ajax(e,"POST",t)},e.prototype.del=function(e,t){return this.ajax(e,"DELETE",t)},e.prototype.head=function(e,t){return this.ajax(e,"HEAD",t)},e.prototype.cancel=function(e,t){var n=this._cancelTokenMap.get(e);return!!n&&(n.cancel(t),!0)},e.prototype.hasCancelToken=function(e){return this._cancelTokenMap.has(e)},e.prototype.isCancel=function(e){return f.a.isCancel(e)},e.prototype.getCancellableToken=function(){return f.a.CancelToken.source()},e.prototype.updateRequestToBeCancellable=function(e,t){this._cancelTokenMap.set(e,t)},e.prototype.endpoint=function(e){var t=this,n=this._options.endpoints,r="";return Array.isArray(n)?(n.forEach((function(n){n.name===e&&(r=n.endpoint,"string"==typeof n.region?t._region=n.region:"string"==typeof t._options.region&&(t._region=t._options.region),"string"==typeof n.service?t._service=n.service||"execute-api":t._service="execute-api","function"==typeof n.custom_header?t._custom_header=n.custom_header:t._custom_header=void 0)})),r):r},e.prototype._signed=function(e,t,n,r){var i=r.service,o=r.region,s=e.signerServiceInfo,a=y(e,["signerServiceInfo"]),u=o||this._region||this._options.region,l=i||this._service||this._options.service,d={secret_key:t.secretAccessKey,access_key:t.accessKeyId,session_token:t.sessionToken},h={region:u,service:l},p=Object.assign(h,s),v=c.a.sign(a,d,p);return v.data&&(v.body=v.data),g.debug("Signed Request: ",v),delete v.headers.host,f()(v).then((function(e){return n?e:e.data})).catch((function(e){throw g.debug(e),e}))},e.prototype._request=function(e,t){return void 0===t&&(t=!1),f()(e).then((function(e){return t?e:e.data})).catch((function(e){throw g.debug(e),e}))},e.prototype._parseUrl=function(e){var t=e.split("/");return{host:t[2],path:"/"+t.slice(3).join("/")}},e}(),b=n(18),w=function(){return(w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},S=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},_=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},A=new o.a("RestAPI"),O=function(){function e(e){this._api=null,this.Credentials=s.a,this._options=e,A.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"RestAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=E(t,["API"]),o=w(w({},i),r);if(A.debug("configure Rest API",{opt:o}),o.aws_project_region){if(o.aws_cloud_logic_custom){var s=o.aws_cloud_logic_custom;o.endpoints="string"==typeof s?JSON.parse(s):s}o=Object.assign({},o,{region:o.aws_project_region,header:{}})}return Array.isArray(o.endpoints)?o.endpoints.forEach((function(e){void 0!==e.custom_header&&"function"!=typeof e.custom_header&&(A.warn("Rest API "+e.name+", custom_header should be a function"),e.custom_header=void 0)})):this._options&&Array.isArray(this._options.endpoints)?o.endpoints=this._options.endpoints:o.endpoints=[],this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return A.debug("create Rest API instance"),this._api=new m(this._options),this._api.Credentials=this.Credentials,!0},e.prototype.get=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.get(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.post=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.post(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.put=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.put(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.patch=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.patch(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.del=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.del(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.head=function(e,t,n){try{var r=this.getEndpointInfo(e,t),i=this._api.getCancellableToken(),o=Object.assign({},n);o.cancellableToken=i;var s=this._api.head(r,o);return this._api.updateRequestToBeCancellable(s,i),s}catch(e){return Promise.reject(e.message)}},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype.endpoint=function(e){return S(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this._api.endpoint(e)]}))}))},e.prototype.getEndpointInfo=function(e,t){var n=this._options.endpoints;if(!Array.isArray(n))throw new Error("API category not configured");var r=n.find((function(t){return t.name===e}));if(!r)throw new Error("API "+e+" does not exist");var i={endpoint:r.endpoint+t};return"string"==typeof r.region?i.region=r.region:"string"==typeof this._options.region&&(i.region=this._options.region),"string"==typeof r.service?i.service=r.service||"execute-api":i.service="execute-api","function"==typeof r.custom_header?i.custom_header=r.custom_header:i.custom_header=void 0,i},e}(),I=new O(null);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}b.a.register(I);"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var C="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function x(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function P(e){return k(e.source,x(e.source,e.start))}function k(e,t){var n=e.locationOffset.column-1,r=M(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?n:0,u=t.column+a,c="".concat(e.name,":").concat(s,":").concat(u,"\n"),l=r.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){for(var d=Math.floor(u/80),h=u%80,p=[],v=0;v<f.length;v+=80)p.push(f.slice(v,v+80));return c+N([["".concat(s),p[0]]].concat(p.slice(1,d+1).map((function(e){return["",e]})),[[" ",M(h-1)+"^"],["",p[d+1]]]))}return c+N([["".concat(s-1),l[i-1]],["".concat(s),f],["",M(u-1)+"^"],["".concat(s+1),l[i+1]]])}function N(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],i=e[1];return M(n-(t=r).length)+t+(i?" | "+i:" |")})).join("\n")}function M(e){return Array(e+1).join(" ")}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return!t||"object"!==j(t)&&"function"!=typeof t?L(e):t}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){var t="function"==typeof Map?new Map:void 0;return(B=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return q(e,arguments,H(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),K(r,e)})(e)}function q(e,t,n){return(q=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&K(i,n.prototype),i}).apply(null,arguments)}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(a,e);var t,n,r,i,o,s=(t=a,n=z(),function(){var e,r=H(t);if(n){var i=H(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return F(this,e)});function a(e,t,n,r,i,o,u){var c,l,f,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(d=s.call(this,e)).name="GraphQLError",d.originalError=null!=o?o:void 0,d.nodes=G(Array.isArray(t)?t:t?[t]:void 0);for(var h=[],p=0,v=null!==(y=d.nodes)&&void 0!==y?y:[];p<v.length;p++){var y,g=v[p].loc;null!=g&&h.push(g)}h=G(h),d.source=null!=n?n:null===(c=h)||void 0===c?void 0:c[0].source,d.positions=null!=r?r:null===(l=h)||void 0===l?void 0:l.map((function(e){return e.start})),d.locations=r&&n?r.map((function(e){return x(n,e)})):null===(f=h)||void 0===f?void 0:f.map((function(e){return x(e.source,e.start)})),d.path=null!=i?i:void 0;var m,b=null==o?void 0:o.extensions;return null==u&&("object"==T(m=b)&&null!==m)?d.extensions=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},b):d.extensions=null!=u?u:{},Object.defineProperties(L(d),{message:{enumerable:!0},locations:{enumerable:null!=d.locations},path:{enumerable:null!=d.path},extensions:{enumerable:null!=d.extensions&&Object.keys(d.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(L(d),"stack",{value:o.stack,writable:!0,configurable:!0}),F(d)):(Error.captureStackTrace?Error.captureStackTrace(L(d),a):Object.defineProperty(L(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return r=a,(i=[{key:"toString",value:function(){return function(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n<r.length;n++){var i=r[n];i.loc&&(t+="\n\n"+P(i.loc))}else if(e.source&&e.locations)for(var o=0,s=e.locations;o<s.length;o++){var a=s[o];t+="\n\n"+k(e.source,a)}return t}(this)}},{key:C,get:function(){return"Object"}}])&&U(r.prototype,i),o&&U(r,o),a}(B(Error));function G(e){return void 0===e||0===e.length?void 0:e}function W(e,t,n){return new V("Syntax Error: ".concat(n),void 0,e,[t])}var Y=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});var J="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function $(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}(0),e.prototype.inspect=t,J&&(e.prototype[J]=t)}var Z=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();$(Z);var Q=function(){function e(e,t,n,r,i,o,s){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=s,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function X(e){return null!=e&&"string"==typeof e.kind}$(Q);var ee=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"});function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ne(e){return re(e,[])}function re(e,t){switch(te(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(J)];if("function"==typeof t)return t;if("function"==typeof e.inspect)return e.inspect}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:re(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(re(e[o],t));1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+re(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}function ie(e,t){if(!Boolean(e))throw new Error(t)}var oe=function(e,t){return e instanceof t};function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ae=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||ie(0,"Body must be a string. Received: ".concat(ne(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||ie(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ie(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:C,get:function(){return"Source"}}])&&se(t.prototype,n),r&&se(t,r),e}();var ue=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function ce(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,s=0;s<e.length;++s)switch(e.charCodeAt(s)){case 13:10===e.charCodeAt(s+1)&&++s;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var i=0;i<t.length&&le(t[i]);)++i;for(var o=t.length;o>i&&le(t[o-1]);)--o;return t.slice(i,o).join("\n")}function le(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}var fe=function(){function e(e){var t=new Q(ee.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==ee.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=he(this,e)}while(e.kind===ee.COMMENT);return e},e}();function de(e){return isNaN(e)?ee.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function he(e,t){for(var n=e.source,r=n.body,i=r.length,o=t.end;o<i;){var s=r.charCodeAt(o),a=e.line,u=1+o-e.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 33:return new Q(ee.BANG,o,o+1,a,u,t);case 35:return ve(n,o,a,u,t);case 36:return new Q(ee.DOLLAR,o,o+1,a,u,t);case 38:return new Q(ee.AMP,o,o+1,a,u,t);case 40:return new Q(ee.PAREN_L,o,o+1,a,u,t);case 41:return new Q(ee.PAREN_R,o,o+1,a,u,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new Q(ee.SPREAD,o,o+3,a,u,t);break;case 58:return new Q(ee.COLON,o,o+1,a,u,t);case 61:return new Q(ee.EQUALS,o,o+1,a,u,t);case 64:return new Q(ee.AT,o,o+1,a,u,t);case 91:return new Q(ee.BRACKET_L,o,o+1,a,u,t);case 93:return new Q(ee.BRACKET_R,o,o+1,a,u,t);case 123:return new Q(ee.BRACE_L,o,o+1,a,u,t);case 124:return new Q(ee.PIPE,o,o+1,a,u,t);case 125:return new Q(ee.BRACE_R,o,o+1,a,u,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?be(n,o,a,u,t,e):me(n,o,a,u,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ye(n,o,s,a,u,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 Se(n,o,a,u,t)}throw W(n,o,pe(s))}var c=e.line,l=1+o-e.lineStart;return new Q(ee.EOF,i,i,c,l,t)}function pe(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(de(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(de(e),".")}function ve(e,t,n,r,i){var o,s=e.body,a=t;do{o=s.charCodeAt(++a)}while(!isNaN(o)&&(o>31||9===o));return new Q(ee.COMMENT,t,a,n,r,i,s.slice(t+1,a))}function ye(e,t,n,r,i,o){var s=e.body,a=n,u=t,c=!1;if(45===a&&(a=s.charCodeAt(++u)),48===a){if((a=s.charCodeAt(++u))>=48&&a<=57)throw W(e,u,"Invalid number, unexpected digit after 0: ".concat(de(a),"."))}else u=ge(e,u,a),a=s.charCodeAt(u);if(46===a&&(c=!0,a=s.charCodeAt(++u),u=ge(e,u,a),a=s.charCodeAt(u)),69!==a&&101!==a||(c=!0,43!==(a=s.charCodeAt(++u))&&45!==a||(a=s.charCodeAt(++u)),u=ge(e,u,a),a=s.charCodeAt(u)),46===a||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(a))throw W(e,u,"Invalid number, expected digit but got: ".concat(de(a),"."));return new Q(c?ee.FLOAT:ee.INT,t,u,r,i,o,s.slice(t,u))}function ge(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw W(e,i,"Invalid number, expected digit but got: ".concat(de(o),"."))}function me(e,t,n,r,i){for(var o,s,a,u,c=e.body,l=t+1,f=l,d=0,h="";l<c.length&&!isNaN(d=c.charCodeAt(l))&&10!==d&&13!==d;){if(34===d)return h+=c.slice(f,l),new Q(ee.STRING,t,l+1,n,r,i,h);if(d<32&&9!==d)throw W(e,l,"Invalid character within String: ".concat(de(d),"."));if(++l,92===d){switch(h+=c.slice(f,l-1),d=c.charCodeAt(l)){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var p=(o=c.charCodeAt(l+1),s=c.charCodeAt(l+2),a=c.charCodeAt(l+3),u=c.charCodeAt(l+4),we(o)<<12|we(s)<<8|we(a)<<4|we(u));if(p<0){var v=c.slice(l+1,l+5);throw W(e,l,"Invalid character escape sequence: \\u".concat(v,"."))}h+=String.fromCharCode(p),l+=4;break;default:throw W(e,l,"Invalid character escape sequence: \\".concat(String.fromCharCode(d),"."))}f=++l}}throw W(e,l,"Unterminated string.")}function be(e,t,n,r,i,o){for(var s=e.body,a=t+3,u=a,c=0,l="";a<s.length&&!isNaN(c=s.charCodeAt(a));){if(34===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2))return l+=s.slice(u,a),new Q(ee.BLOCK_STRING,t,a+3,n,r,i,ce(l));if(c<32&&9!==c&&10!==c&&13!==c)throw W(e,a,"Invalid character within String: ".concat(de(c),"."));10===c?(++a,++o.line,o.lineStart=a):13===c?(10===s.charCodeAt(a+1)?a+=2:++a,++o.line,o.lineStart=a):92===c&&34===s.charCodeAt(a+1)&&34===s.charCodeAt(a+2)&&34===s.charCodeAt(a+3)?(l+=s.slice(u,a)+'"""',u=a+=4):++a}throw W(e,a,"Unterminated string.")}function we(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Se(e,t,n,r,i){for(var o=e.body,s=o.length,a=t+1,u=0;a!==s&&!isNaN(u=o.charCodeAt(a))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++a;return new Q(ee.NAME,t,a,n,r,i,o.slice(t,a))}function _e(e,t){return new Ee(e,t).parseDocument()}var Ee=function(){function e(e,t){var n=function(e){return oe(e,ae)}(e)?e:new ae(e);this._lexer=new fe(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(ee.NAME);return{kind:Y.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:Y.DOCUMENT,definitions:this.many(ee.SOF,this.parseDefinition,ee.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(ee.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(ee.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(ee.BRACE_L))return{kind:Y.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(ee.NAME)&&(t=this.parseName()),{kind:Y.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(ee.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(ee.PAREN_L,this.parseVariableDefinition,ee.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:Y.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(ee.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(ee.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(ee.DOLLAR),{kind:Y.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:Y.SELECTION_SET,selections:this.many(ee.BRACE_L,this.parseSelection,ee.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(ee.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(ee.COLON)?(e=r,t=this.parseName()):t=r,{kind:Y.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(ee.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(ee.PAREN_L,t,ee.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(ee.COLON),{kind:Y.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:Y.ARGUMENT,name:this.parseName(),value:(this.expectToken(ee.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(ee.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(ee.NAME)?{kind:Y.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:Y.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:Y.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Y.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case ee.BRACKET_L:return this.parseList(e);case ee.BRACE_L:return this.parseObject(e);case ee.INT:return this._lexer.advance(),{kind:Y.INT,value:t.value,loc:this.loc(t)};case ee.FLOAT:return this._lexer.advance(),{kind:Y.FLOAT,value:t.value,loc:this.loc(t)};case ee.STRING:case ee.BLOCK_STRING:return this.parseStringLiteral();case ee.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Y.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Y.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Y.NULL,loc:this.loc(t)};default:return{kind:Y.ENUM,value:t.value,loc:this.loc(t)}}case ee.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:Y.STRING,value:e.value,block:e.kind===ee.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:Y.LIST,values:this.any(ee.BRACKET_L,(function(){return t.parseValueLiteral(e)}),ee.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:Y.OBJECT,fields:this.any(ee.BRACE_L,(function(){return t.parseObjectField(e)}),ee.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(ee.COLON),{kind:Y.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(ee.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(ee.AT),{kind:Y.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(ee.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(ee.BRACKET_R),e={kind:Y.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(ee.BANG)?{kind:Y.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:Y.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===ee.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(ee.STRING)||this.peek(ee.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);return{kind:Y.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(ee.COLON);var n=this.parseNamedType();return{kind:Y.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:Y.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Y.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(ee.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(ee.AMP)||this.peek(ee.NAME));return t}return this.delimitedMany(ee.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(ee.BRACE_L)&&this._lexer.lookahead().kind===ee.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(ee.BRACE_L,this.parseFieldDefinition,ee.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(ee.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Y.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(ee.PAREN_L,this.parseInputValueDef,ee.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(ee.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(ee.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Y.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Y.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:Y.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(ee.EQUALS)?this.delimitedMany(ee.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:Y.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(ee.BRACE_L,this.parseEnumValueDefinition,ee.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:Y.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:Y.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(ee.BRACE_L,this.parseInputValueDef,ee.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===ee.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(ee.BRACE_L,this.parseOperationTypeDefinition,ee.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:Y.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:Y.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Y.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:Y.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:Y.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(ee.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Y.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(ee.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==ue[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new Z(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw W(this._lexer.source,t.start,"Expected ".concat(Oe(e),", found ").concat(Ae(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==ee.NAME||t.value!==e)throw W(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(Ae(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===ee.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return W(this._lexer.source,t.start,"Unexpected ".concat(Ae(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function Ae(e){var t=e.value;return Oe(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function Oe(e){return function(e){return e===ee.BANG||e===ee.DOLLAR||e===ee.AMP||e===ee.PAREN_L||e===ee.PAREN_R||e===ee.SPREAD||e===ee.COLON||e===ee.EQUALS||e===ee.AT||e===ee.BRACKET_L||e===ee.BRACKET_R||e===ee.BRACE_L||e===ee.PIPE||e===ee.BRACE_R}(e)?'"'.concat(e,'"'):e}var Ie={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","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","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Te=Object.freeze({});function Ce(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var o=n?e.leave:e.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}function xe(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ie,r=void 0,i=Array.isArray(e),o=[e],s=-1,a=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p=++s===o.length,v=p&&0!==a.length;if(p){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),v){if(i)u=u.slice();else{for(var y={},g=0,m=Object.keys(u);g<m.length;g++){var b=m[g];y[b]=u[b]}u=y}for(var w=0,S=0;S<a.length;S++){var _=a[S][0],E=a[S][1];i&&(_-=w),i&&null===E?(u.splice(_,1),w++):u[_]=E}}s=r.index,o=r.keys,a=r.edits,i=r.inArray,r=r.prev}else{if(c=l?i?s:o[s]:void 0,null==(u=l?l[c]:h))continue;l&&f.push(c)}var A,O=void 0;if(!Array.isArray(u)){if(!X(u))throw new Error("Invalid AST Node: ".concat(ne(u),"."));var I=Ce(t,u.kind,p);if(I){if((O=I.call(t,u,c,l,f,d))===Te)break;if(!1===O){if(!p){f.pop();continue}}else if(void 0!==O&&(a.push([c,O]),!p)){if(!X(O)){f.pop();continue}u=O}}}if(void 0===O&&v&&a.push([c,u]),p)f.pop();else r={inArray:i,index:s,keys:o,edits:a,prev:r},o=(i=Array.isArray(u))?u:null!==(A=n[u.kind])&&void 0!==A?A:[],s=-1,a=[],l&&d.push(l),l=u}while(void 0!==r);return 0!==a.length&&(h=a[a.length-1][1]),h}(e,{leave:Pe})}var Pe={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return Ne(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=je("(",Ne(e.variableDefinitions,", "),")"),i=Ne(e.directives," "),o=e.selectionSet;return n||i||r||"query"!==t?Ne([t,Ne([n,r]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+je(" = ",r)+je(" ",Ne(i," "))},SelectionSet:function(e){return Me(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,o=e.selectionSet,s=je("",t,": ")+n,a=s+je("(",Ne(r,", "),")");return a.length>80&&(a=s+je("(\n",Re(Ne(r,"\n")),"\n)")),Ne([a,Ne(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+je(" ",Ne(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return Ne(["...",je("on ",t),Ne(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(je("(",Ne(r,", "),")")," ")+"on ".concat(n," ").concat(je("",Ne(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],s="\\"===e[e.length-1],a=!r||o||s||n,u="";return!a||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,a&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}(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"["+Ne(e.values,", ")+"]"},ObjectValue:function(e){return"{"+Ne(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+je("(",Ne(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:ke((function(e){var t=e.directives,n=e.operationTypes;return Ne(["schema",Ne(t," "),Me(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:ke((function(e){return Ne(["scalar",e.name,Ne(e.directives," ")]," ")})),ObjectTypeDefinition:ke((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["type",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")})),FieldDefinition:ke((function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(Ue(n)?je("(\n",Re(Ne(n,"\n")),"\n)"):je("(",Ne(n,", "),")"))+": "+r+je(" ",Ne(i," "))})),InputValueDefinition:ke((function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return Ne([t+": "+n,je("= ",r),Ne(i," ")]," ")})),InterfaceTypeDefinition:ke((function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["interface",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")})),UnionTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.types;return Ne(["union",t,Ne(n," "),r&&0!==r.length?"= "+Ne(r," | "):""]," ")})),EnumTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.values;return Ne(["enum",t,Ne(n," "),Me(r)]," ")})),EnumValueDefinition:ke((function(e){return Ne([e.name,Ne(e.directives," ")]," ")})),InputObjectTypeDefinition:ke((function(e){var t=e.name,n=e.directives,r=e.fields;return Ne(["input",t,Ne(n," "),Me(r)]," ")})),DirectiveDefinition:ke((function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(Ue(n)?je("(\n",Re(Ne(n,"\n")),"\n)"):je("(",Ne(n,", "),")"))+(r?" repeatable":"")+" on "+Ne(i," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return Ne(["extend schema",Ne(t," "),Me(n)]," ")},ScalarTypeExtension:function(e){return Ne(["extend scalar",e.name,Ne(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["extend type",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return Ne(["extend interface",t,je("implements ",Ne(n," & ")),Ne(r," "),Me(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return Ne(["extend union",t,Ne(n," "),r&&0!==r.length?"= "+Ne(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return Ne(["extend enum",t,Ne(n," "),Me(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return Ne(["extend input",t,Ne(n," "),Me(r)]," ")}};function ke(e){return function(t){return Ne([t.description,e(t)],"\n")}}function Ne(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function Me(e){return je("{\n",Re(Ne(e,"\n")),"\n}")}function je(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function Re(e){return je(" ",e.replace(/\n/g,"\n "))}function De(e){return-1!==e.indexOf("\n")}function Ue(e){return null!=e&&e.some(De)}var Fe=n(7),Le=n(36),Be=n(16),qe=n.n(Be),ze=n(15),Ke=n(22),He=function(){return(He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ve=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},Ge=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},We=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ye=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},Je=new o.a("GraphQLAPI"),$e=function(){function e(e){this._api=null,this.Auth=ze.a,this.Cache=i.a,this.Credentials=s.a,this._options=e,Je.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"GraphQLAPI"},e.prototype.configure=function(e){var t=e||{},n=t.API,r=void 0===n?{}:n,i=We(t,["API"]),o=He(He({},i),r);return Je.debug("configure GraphQL API",{opt:o}),o.aws_project_region&&(o=Object.assign({},o,{region:o.aws_project_region,header:{}})),void 0!==o.graphql_headers&&"function"!=typeof o.graphql_headers&&(Je.warn("graphql_headers should be a function"),o.graphql_headers=void 0),this._options=Object.assign({},this._options,o),this.createInstance(),this._options},e.prototype.createInstance=function(){return Je.debug("create Rest instance"),this._options?(this._api=new m(this._options),this._api.Credentials=this.Credentials,!0):Promise.reject("API not configured")},e.prototype._headerBasedAuth=function(e,t){return void 0===t&&(t={}),Ve(this,void 0,void 0,(function(){var n,r,o,s,a,u,c,l;return Ge(this,(function(f){switch(f.label){case 0:switch(n=this._options,r=n.aws_appsync_authenticationType,o=n.aws_appsync_apiKey,s={},e||r||"AWS_IAM"){case"API_KEY":return[3,1];case"AWS_IAM":return[3,2];case"OPENID_CONNECT":return[3,4];case"AMAZON_COGNITO_USER_POOLS":return[3,11];case"AWS_LAMBDA":return[3,15]}return[3,16];case 1:if(!o)throw new Error(Ke.a.NO_API_KEY);return s={Authorization:null,"X-Api-Key":o},[3,17];case 2:return[4,this._ensureCredentials()];case 3:if(!f.sent())throw new Error(Ke.a.NO_CREDENTIALS);return[3,17];case 4:return f.trys.push([4,9,,10]),a=void 0,[4,i.a.getItem("federatedInfo")];case 5:return(u=f.sent())?(a=u.token,[3,8]):[3,6];case 6:return[4,ze.a.currentAuthenticatedUser()];case 7:(c=f.sent())&&(a=c.token),f.label=8;case 8:if(!a)throw new Error(Ke.a.NO_FEDERATED_JWT);return s={Authorization:a},[3,10];case 9:throw f.sent(),new Error(Ke.a.NO_CURRENT_USER);case 10:return[3,17];case 11:return f.trys.push([11,13,,14]),[4,this.Auth.currentSession()];case 12:return l=f.sent(),s={Authorization:l.getAccessToken().getJwtToken()},[3,14];case 13:throw f.sent(),new Error(Ke.a.NO_CURRENT_USER);case 14:return[3,17];case 15:if(!t.Authorization)throw new Error(Ke.a.NO_AUTH_TOKEN);return s={Authorization:t.Authorization},[3,17];case 16:return s={Authorization:null},[3,17];case 17:return[2,s]}}))}))},e.prototype.getGraphqlOperationType=function(e){var t=_e(e).definitions;return Ye(t,1)[0].operation},e.prototype.graphql=function(e,t){var n=e.query,r=e.variables,i=void 0===r?{}:r,o=e.authMode,s=e.authToken,a=_e("string"==typeof n?n:xe(n)),u=Ye(a.definitions.filter((function(e){return"OperationDefinition"===e.kind})),1)[0],c=(void 0===u?{}:u).operation,l=t||{};switch(s&&(l.Authorization=s),c){case"query":case"mutation":var f=this._api.getCancellableToken(),d={cancellableToken:f},h=this._graphql({query:a,variables:i,authMode:o},l,d);return this._api.updateRequestToBeCancellable(h,f),h;case"subscription":return this._graphqlSubscribe({query:a,variables:i,authMode:o},l);default:throw new Error("invalid operation type: "+c)}},e.prototype._graphql=function(e,t,n){var r=e.query,i=e.variables,o=e.authMode;return void 0===t&&(t={}),void 0===n&&(n={}),Ve(this,void 0,void 0,(function(){var e,s,a,u,c,l,f,d,h,p,v,y,g,m,b,w,S,_,E,A,O;return Ge(this,(function(I){switch(I.label){case 0:return this._api?[3,2]:[4,this.createInstance()];case 1:I.sent(),I.label=2;case 2:return e=this._options,s=e.aws_appsync_region,a=e.aws_appsync_graphqlEndpoint,u=e.graphql_headers,c=void 0===u?function(){return{}}:u,l=e.graphql_endpoint,f=e.graphql_endpoint_iam_region,h=[{}],(p=!l)?[4,this._headerBasedAuth(o,t)]:[3,4];case 3:p=I.sent(),I.label=4;case 4:return v=[He.apply(void 0,h.concat([p]))],(y=l)?f?[4,this._headerBasedAuth(o,t)]:[3,6]:[3,8];case 5:return g=I.sent(),[3,7];case 6:g={Authorization:null},I.label=7;case 7:y=g,I.label=8;case 8:return m=[He.apply(void 0,v.concat([y]))],[4,c({query:r,variables:i})];case 9:if(d=He.apply(void 0,[He.apply(void 0,[He.apply(void 0,m.concat([I.sent()])),t]),!l&&(O={},O["x-amz-user-agent"]=Fe.a.userAgent,O)]),b={query:xe(r),variables:i},w=Object.assign({headers:d,body:b,signerServiceInfo:{service:l?"execute-api":"appsync",region:l?f:s}},n),!(S=l||a))throw{data:{},errors:[new V("No graphql endpoint provided.")]};I.label=10;case 10:return I.trys.push([10,12,,13]),[4,this._api.post(S,w)];case 11:return _=I.sent(),[3,13];case 12:if(E=I.sent(),this._api.isCancel(E))throw E;return _={data:{},errors:[new V(E.message,null,null,null,null,E)]},[3,13];case 13:if((A=_.errors)&&A.length)throw _;return[2,_]}}))}))},e.prototype.isCancel=function(e){return this._api.isCancel(e)},e.prototype.cancel=function(e,t){return this._api.cancel(e,t)},e.prototype.hasCancelToken=function(e){return this._api.hasCancelToken(e)},e.prototype._graphqlSubscribe=function(e,t){var n=e.query,r=e.variables,i=e.authMode,o=e.authToken;void 0===t&&(t={});var s=this._options,a=s.aws_appsync_region,u=s.aws_appsync_graphqlEndpoint,c=s.aws_appsync_authenticationType,l=s.aws_appsync_apiKey,f=s.graphql_headers,d=void 0===f?function(){return{}}:f,h=i||c||"AWS_IAM";if(qe.a&&"function"==typeof qe.a.subscribe)return qe.a.subscribe("",{provider:Le.a,appSyncGraphqlEndpoint:u,authenticationType:h,apiKey:l,query:xe(n),region:a,variables:r,graphql_headers:d,additionalHeaders:t,authToken:o});throw Je.debug("No pubsub module applied for subscription"),new Error("No pubsub module applied for subscription")},e.prototype._ensureCredentials=function(){var e=this;return this.Credentials.get().then((function(t){if(!t)return!1;var n=e.Credentials.shear(t);return Je.debug("set credentials for api",n),!0})).catch((function(e){return Je.warn("ensure credentials error",e),!1}))},e}(),Ze=new $e(null);b.a.register(Ze);var Qe=function(){return(Qe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Xe=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},et=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},tt=new o.a("API"),nt=new(function(){function e(e){this.Auth=r.a,this.Cache=i.a,this.Credentials=s.a,this._options=e,this._restApi=new O(e),this._graphqlApi=new $e(e),tt.debug("API Options",this._options)}return e.prototype.getModuleName=function(){return"API"},e.prototype.configure=function(e){this._options=Object.assign({},this._options,e),this._restApi.Credentials=this.Credentials,this._graphqlApi.Auth=this.Auth,this._graphqlApi.Cache=this.Cache,this._graphqlApi.Credentials=this.Credentials;var t=this._restApi.configure(this._options),n=this._graphqlApi.configure(this._options);return Qe(Qe({},t),n)},e.prototype.get=function(e,t,n){return this._restApi.get(e,t,n)},e.prototype.post=function(e,t,n){return this._restApi.post(e,t,n)},e.prototype.put=function(e,t,n){return this._restApi.put(e,t,n)},e.prototype.patch=function(e,t,n){return this._restApi.patch(e,t,n)},e.prototype.del=function(e,t,n){return this._restApi.del(e,t,n)},e.prototype.head=function(e,t,n){return this._restApi.head(e,t,n)},e.prototype.isCancel=function(e){return this._restApi.isCancel(e)},e.prototype.cancel=function(e,t){return this._restApi.hasCancelToken(e)?this._restApi.cancel(e,t):!!this._graphqlApi.hasCancelToken(e)&&this._graphqlApi.cancel(e,t)},e.prototype.endpoint=function(e){return Xe(this,void 0,void 0,(function(){return et(this,(function(t){return[2,this._restApi.endpoint(e)]}))}))},e.prototype.getGraphqlOperationType=function(e){return this._graphqlApi.getGraphqlOperationType(e)},e.prototype.graphql=function(e,t){return this._graphqlApi.graphql(e,t)},e}())(null);b.a.register(nt);t.a=nt},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.NO_API_KEY="No api-key configured",e.NO_CURRENT_USER="No current user",e.NO_CREDENTIALS="No credentials",e.NO_FEDERATED_JWT="No federated jwt",e.NO_AUTH_TOKEN="No auth token specified"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},s=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5};!function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE"}(r||(r={}));var u=function(){function e(e,t){void 0===t&&(t=r.WARN),this.name=e,this.level=t,this._pluggables=[]}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.configure=function(e){return e?(this._config=e,this._config):this._config},e.prototype._log=function(t){for(var n,o,s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];var c=this.level;e.LOG_LEVEL&&(c=e.LOG_LEVEL),"undefined"!=typeof window&&window.LOG_LEVEL&&(c=window.LOG_LEVEL);var l=a[c],f=a[t];if(f>=l){var d=console.log.bind(console);t===r.ERROR&&console.error&&(d=console.error.bind(console)),t===r.WARN&&console.warn&&(d=console.warn.bind(console));var h="["+t+"] "+this._ts()+" "+this.name,p="";if(1===s.length&&"string"==typeof s[0])d(p=h+" - "+s[0]);else if(1===s.length)p=h+" "+s[0],d(h,s[0]);else if("string"==typeof s[0]){var v=s.slice(1);1===v.length&&(v=v[0]),p=h+" - "+s[0]+" "+v,d(h+" - "+s[0],v)}else p=h+" "+s,d(h,s);try{for(var y=i(this._pluggables),g=y.next();!g.done;g=y.next()){var m=g.value,b={message:p,timestamp:Date.now()};m.pushLogs([b])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(n)throw n.error}}}},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.ERROR],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.DEBUG],e))},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._log.apply(this,s([r.VERBOSE],e))},e.prototype.addPluggable=function(e){e&&"Logging"===e.getCategoryName()&&(this._pluggables.push(e),e.configure(this._config))},e.prototype.listPluggables=function(){return this._pluggables},e.LOG_LEVEL=null,e}()},function(e,t,n){"use strict";var r=n(18),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(n(32).a)).getStorage()};function o(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 s(){return(new Date).getTime()}function a(e){return Number.isInteger?Number.isInteger(e):function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(e)}var u={},c=(function(){function e(){}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]}}(),n(23));function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f,d=new c.a("StorageCache"),h=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(){a(this.config.capacityInBytes)||(d.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),a(this.config.itemMaxSize)||(d.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),a(this.config.defaultTTL)||(d.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),a(this.config.defaultPriority)||(d.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(d.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(d.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(d.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(d.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},e.prototype.fillCacheItem=function(e,t,n){var r={key:e,data:t,timestamp:s(),visitedTime:s(),priority:n.priority,expires:n.expires,type:l(t),byteSize:0};return r.byteSize=o(JSON.stringify(r)),r.byteSize=o(JSON.stringify(r)),r},e.prototype.configure=function(e){return e?(e.keyPrefix&&d.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,e,e.Cache),this.checkConfig(),this.config):this.config},e}(),p=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=new c.a("Cache"),y=new(function(e){function t(t){var n=this,r=t?Object.assign({},i,t):i;return(n=e.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return p(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=s(),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 s()>=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),v.error("Failed to set item "+e)}},t.prototype._sizeToPop=function(e){var t=this.getCacheCurSize()+e-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return t>n?t:n},t.prototype._isCacheFull=function(e){return e+this.getCacheCurSize()>this.config.capacityInBytes},t.prototype._findValidKeys=function(){for(var e=[],t=[],n=0;n<this.config.storage.length;n+=1)t.push(this.config.storage.key(n));for(n=0;n<t.length;n+=1){var r=t[n];0===r.indexOf(this.config.keyPrefix)&&r!==this.cacheCurSizeKey&&(this._isExpired(r)?this._removeItem(r):e.push(r))}return e},t.prototype._popOutItems=function(e,t){for(var n=[],r=t,i=0;i<e.length;i+=1){var o=this.config.storage.getItem(e[i]);if(null!=o){var s=JSON.parse(o);n.push(s)}}n.sort((function(e,t){return e.priority>t.priority?-1:e.priority<t.priority?1:e.visitedTime<t.visitedTime?-1:1}));for(i=0;i<n.length;i+=1)if(this._removeItem(n[i].key,n[i].byteSize),(r-=n[i].byteSize)<=0)return},t.prototype.setItem=function(e,t,n){v.log("Set item: key is "+e+", value is "+t+" with options: "+n);var r=this.config.keyPrefix+e;if(r!==this.config.keyPrefix&&r!==this.cacheCurSizeKey)if(void 0!==t){var i={priority:n&&void 0!==n.priority?n.priority:this.config.defaultPriority,expires:n&&void 0!==n.expires?n.expires:this.config.defaultTTL+s()};if(i.priority<1||i.priority>5)v.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,t,i);if(o.byteSize>this.config.itemMaxSize)v.warn("Item with key: "+e+" you are trying to put into is too big!");else try{var a=this.config.storage.getItem(r);if(a&&this._removeItem(r,JSON.parse(a).byteSize),this._isCacheFull(o.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(u,c)}}this._setItem(r,o)}catch(e){v.warn("setItem failed! "+e)}}}else v.warn("The value of item should not be undefined!");else v.warn("Invalid key: should not be empty or 'CurSize'")},t.prototype.getItem=function(e,t){v.log("Get item: key is "+e+" with options "+t);var n=null,r=this.config.keyPrefix+e;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return v.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(t&&void 0!==t.callback){var o=t.callback();return null!==o&&this.setItem(e,o,t),o}return null}catch(e){return v.warn("getItem failed! "+e),null}},t.prototype.removeItem=function(e){v.log("Remove item: key is "+e);var t=this.config.keyPrefix+e;if(t!==this.config.keyPrefix&&t!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(t);n&&this._removeItem(t,JSON.parse(n).byteSize)}catch(e){v.warn("removeItem failed! "+e)}},t.prototype.clear=function(){v.log("Clear Cache");for(var e=[],t=0;t<this.config.storage.length;t+=1){var n=this.config.storage.key(t);0===n.indexOf(this.config.keyPrefix)&&e.push(n)}try{for(t=0;t<e.length;t+=1)this.config.storage.removeItem(e[t])}catch(e){v.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.keyPrefix||(v.error("invalid keyPrefix, setting keyPrefix with timeStamp"),e.keyPrefix=s.toString()),new t(e)},t}(h));t.a=y;r.a.register(y)},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return g}));var r=n(23),i=n(14),o=n(158),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=new r.a("CognitoCredentials"),c=new Promise((function(e,t){return Object(i.b)().isBrowser?(window.gapi&&window.gapi.auth2?window.gapi.auth2:null)?(u.debug("google api already loaded"),e()):void setTimeout((function(){return e()}),2e3):(u.debug("not in the browser, directly resolved"),e())})),l=function(){function e(){this.initialized=!1,this.refreshGoogleToken=this.refreshGoogleToken.bind(this),this._refreshGoogleTokenImpl=this._refreshGoogleTokenImpl.bind(this)}return e.prototype.refreshGoogleToken=function(){return s(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(u.debug("need to wait for the Google SDK loaded"),[4,c]);case 1:e.sent(),this.initialized=!0,u.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshGoogleTokenImpl()]}}))}))},e.prototype._refreshGoogleTokenImpl=function(){var e=null;return Object(i.b)().isBrowser&&(e=window.gapi&&window.gapi.auth2?window.gapi.auth2:null),e?new Promise((function(t,n){e.getAuthInstance().then((function(e){e||(u.debug("google Auth undefined"),n(new o.a("google Auth undefined")));var r=e.currentUser.get();r.isSignedIn()?(u.debug("refreshing the google access token"),r.reloadAuthResponse().then((function(e){var n=e.id_token,r=e.expires_at;t({token:n,expires_at:r})})).catch((function(e){e&&"network_error"===e.error?n("Network error reloading google auth response"):n(new o.a("Failed to reload google auth response"))}))):n(new o.a("User is not signed in with Google"))})).catch((function(e){u.debug("Failed to refresh google token",e),n(new o.a("Failed to refresh google token"))}))})):(u.debug("no gapi auth2 available"),Promise.reject("no gapi auth2 available"))},e}(),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},h=new r.a("CognitoCredentials"),p=new Promise((function(e,t){return Object(i.b)().isBrowser?window.FB?(h.debug("FB SDK already loaded"),e()):void setTimeout((function(){return e()}),2e3):(h.debug("not in the browser, directly resolved"),e())})),v=function(){function e(){this.initialized=!1,this.refreshFacebookToken=this.refreshFacebookToken.bind(this),this._refreshFacebookTokenImpl=this._refreshFacebookTokenImpl.bind(this)}return e.prototype.refreshFacebookToken=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){switch(e.label){case 0:return this.initialized?[3,2]:(h.debug("need to wait for the Facebook SDK loaded"),[4,p]);case 1:e.sent(),this.initialized=!0,h.debug("finish waiting"),e.label=2;case 2:return[2,this._refreshFacebookTokenImpl()]}}))}))},e.prototype._refreshFacebookTokenImpl=function(){var e=null;if(Object(i.b)().isBrowser&&(e=window.FB),!e){return h.debug("no fb sdk available"),Promise.reject(new o.a("no fb sdk available"))}return new Promise((function(t,n){e.getLoginStatus((function(e){if(e&&e.authResponse){var r=e.authResponse,i=r.accessToken,s=1e3*r.expiresIn+(new Date).getTime();if(!i){a="the jwtToken is undefined";h.debug(a),n(new o.a(a))}t({token:i,expires_at:s})}else{var a="no response from facebook when refreshing the jwt token";h.debug(a),n(new o.a(a))}}),{scope:"public_profile,email"})}))},e}(),y=new l,g=new v},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return p}));var r=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},i=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e},o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=function(e){return/^Connection failed: Connection Timeout/.test(e.message)},a=function(e){return/^Error: Request failed with status code 5\d\d/.test(e.message)},u={BadModel:function(){return!1},BadRecord:function(e){var t=e.message;return/^Cannot return \w+ for [\w-_]+ type/.test(t)||/^Variable '.+' has coerced Null value for NonNull type/.test(t)},ConfigError:function(){return!1},Transient:function(e){return s(e)||a(e)},Unauthorized:function(e){return/^Request failed with status code 401/.test(e.message)}},c={BadModel:function(){return!1},BadRecord:function(){return!1},ConfigError:function(){return!1},Transient:function(e){var t=f(e);return s(t)||a(t)},Unauthorized:function(e){var t=f(e);return/Connection failed.+Unauthorized/.test(t.message)}},l={BadModel:function(){return!1},BadRecord:function(e){return/^Cannot return \w+ for [\w-_]+ type/.test(e.message)},ConfigError:function(){return!1},Transient:function(e){return s(e)||a(e)},Unauthorized:function(){return!1}};function f(e){var t=e.error;return r((void 0===t?{errors:[]}:t).errors,1)[0]}function d(e){return v(u,e)}function h(e){return v(c,e)}function p(e){return v(l,e)}function v(e,t){var n,r,s=i(Object.keys(e));try{for(var a=o(s),u=a.next();!u.done;u=a.next()){var c=u.value;if((0,e[c])(t))return c}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return"Unknown"}},function(e,t,n){var r;e.exports=(r=n(12),n(43),n(99),r.HmacSHA256)},function(e,t,n){"use strict";
|
|
51
51
|
/*!
|
|
52
52
|
* cookie
|
|
53
53
|
* Copyright(c) 2012-2014 Roman Shtylman
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/datastore",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.3-unstable.2+8e49b0d53",
|
|
4
4
|
"description": "AppSyncLocal support for aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"fake-indexeddb": "3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-amplify/api": "4.0.
|
|
52
|
-
"@aws-amplify/auth": "4.5.
|
|
53
|
-
"@aws-amplify/core": "4.5.
|
|
54
|
-
"@aws-amplify/pubsub": "4.4.
|
|
55
|
-
"amazon-cognito-identity-js": "5.2.
|
|
51
|
+
"@aws-amplify/api": "4.0.46-unstable.2+8e49b0d53",
|
|
52
|
+
"@aws-amplify/auth": "4.5.10-unstable.2+8e49b0d53",
|
|
53
|
+
"@aws-amplify/core": "4.5.10-unstable.2+8e49b0d53",
|
|
54
|
+
"@aws-amplify/pubsub": "4.4.7-unstable.2+8e49b0d53",
|
|
55
|
+
"amazon-cognito-identity-js": "5.2.11-unstable.2+8e49b0d53",
|
|
56
56
|
"idb": "5.0.6",
|
|
57
57
|
"immer": "9.0.6",
|
|
58
58
|
"ulid": "2.3.0",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"lib-esm"
|
|
113
113
|
]
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "8e49b0d53bc7a8c373289cf5aa2172284c76ecd6"
|
|
116
116
|
}
|