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OAAOD,EAAWP,WAC9CM,EAASN,UAAUS,YAAcH,GACjC,OAAeA,EAAUC,wCCJZ,SAASmpE,EAAiBC,GACvC,GAAsB,oBAAXvwD,QAAmD,MAAzBuwD,EAAKvwD,OAAOC,WAA2C,MAAtBswD,EAAK,cAAuB,OAAO9+D,MAAMC,KAAK6+D,uECDvG,SAAS5oE,EAAgBC,EAAGC,GAMzC,OALAF,EAAkBvB,OAAOa,gBAAkB,SAAyBW,EAAGC,GAErE,OADAD,EAAEE,UAAYD,EACPD,GAGFD,EAAgBC,EAAGC,gJCFb,SAAS27B,EAAmBC,GACzC,OCJa,SAA4BA,GACzC,GAAIhyB,MAAMuF,QAAQysB,GAAM,OAAO,EAAA+sC,EAAA,GAAiB/sC,GDGzC,CAAkBA,KAAQ,EAAAgtC,EAAA,GAAgBhtC,KAAQ,EAAAitC,EAAA,GAA2BjtC,IELvE,WACb,MAAM,IAAI3uB,UAAU,wIFIwE,uFGJ/E,SAAS67D,EAA4B/oE,EAAGgpE,GACrD,GAAKhpE,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAO,OAAiBA,EAAGgpE,GACtD,IAAI7yD,EAAI3X,OAAOQ,UAAU4O,SAAS1O,KAAKc,GAAGmZ,MAAM,GAAI,GAEpD,MADU,WAANhD,GAAkBnW,EAAEP,cAAa0W,EAAInW,EAAEP,YAAYyB,MAC7C,QAANiV,GAAqB,QAANA,EAAoBtM,MAAMC,KAAK9J,GACxC,cAANmW,GAAqB,2CAA2CpD,KAAKoD,IAAW,OAAiBnW,EAAGgpE,QAAxG","sources":["webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/extends.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/inheritsLoose.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://gatsby-starter-default/./node_modules/@firebase/app/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/@firebase/component/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/@firebase/logger/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/@firebase/util/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/@firebase/webchannel-wrapper/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/@gatsbyjs/reach-router/lib/history.js","webpack://gatsby-starter-default/./node_modules/@gatsbyjs/reach-router/lib/utils.js","webpack://gatsby-starter-default/./node_modules/camelcase/index.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/TemplateTag/TemplateTag.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/commaLists/commaLists.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/commaListsAnd/commaListsAnd.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/commaListsOr/commaListsOr.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/html/html.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/safeHtml/safeHtml.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLine/oneLine.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLineTrim/oneLineTrim.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/inlineLists/inlineLists.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/stripIndent/stripIndent.js","webpack://gatsby-starter-default/./node_modules/common-tags/es/stripIndents/stripIndents.js","webpack://gatsby-starter-default/./node_modules/gatsby/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js","webpack://gatsby-starter-default/./node_modules/tslib/tslib.es6.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/a-callable.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/an-object.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/array-includes.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/classof-raw.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/create-property-descriptor.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/descriptors.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/document-create-element.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/engine-user-agent.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/engine-v8-version.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/enum-bug-keys.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/export.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/fails.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/function-name.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/get-built-in.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/get-method.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/global.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/has.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/hidden-keys.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/ie8-dom-define.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/indexed-object.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/inspect-source.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/internal-state.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/is-callable.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/is-forced.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/is-object.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/is-pure.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/is-symbol.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/native-symbol.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/native-weak-map.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-define-property.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-keys-internal.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/ordinary-to-primitive.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/own-keys.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/redefine.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/require-object-coercible.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/set-global.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/shared-key.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/shared-store.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/shared.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-absolute-index.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-indexed-object.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-integer.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-length.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-object.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-primitive.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/to-property-key.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/try-to-string.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/uid.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://gatsby-starter-default/./node_modules/core-js/internals/well-known-symbol.js","webpack://gatsby-starter-default/./node_modules/core-js/modules/es.global-this.js","webpack://gatsby-starter-default/./node_modules/core-js/modules/esnext.global-this.js","webpack://gatsby-starter-default/./node_modules/gatsby-link/index.js","webpack://gatsby-starter-default/./node_modules/gatsby-link/parse-path.js","webpack://gatsby-starter-default/./node_modules/gatsby-react-router-scroll/index.js","webpack://gatsby-starter-default/./node_modules/gatsby-react-router-scroll/scroll-handler.js","webpack://gatsby-starter-default/./node_modules/gatsby-react-router-scroll/session-storage.js","webpack://gatsby-starter-default/./node_modules/gatsby-react-router-scroll/use-scroll-restoration.js","webpack://gatsby-starter-default/./.cache/_this_is_virtual_fs_path_/$virtual/async-requires.js","webpack://gatsby-starter-default/./.cache/api-runner-browser-plugins.js","webpack://gatsby-starter-default/./.cache/api-runner-browser.js","webpack://gatsby-starter-default/./node_modules/mitt/dist/mitt.es.js","webpack://gatsby-starter-default/./.cache/emitter.js","webpack://gatsby-starter-default/./.cache/normalize-page-path.js","webpack://gatsby-starter-default/./.cache/find-path.js","webpack://gatsby-starter-default/./.cache/gatsby-browser-entry.js","webpack://gatsby-starter-default/./.cache/prefetch.js","webpack://gatsby-starter-default/./.cache/loader.js","webpack://gatsby-starter-default/./.cache/page-renderer.js","webpack://gatsby-starter-default/./.cache/route-announcer-props.js","webpack://gatsby-starter-default/./.cache/navigation.js","webpack://gatsby-starter-default/./node_modules/shallow-compare/es/index.js","webpack://gatsby-starter-default/./.cache/ensure-resources.js","webpack://gatsby-starter-default/./.cache/production-app.js","webpack://gatsby-starter-default/./.cache/public-page-renderer-prod.js","webpack://gatsby-starter-default/./.cache/public-page-renderer.js","webpack://gatsby-starter-default/./.cache/react-lifecycles-compat.js","webpack://gatsby-starter-default/./.cache/redirect-utils.js","webpack://gatsby-starter-default/./.cache/register-service-worker.js","webpack://gatsby-starter-default/./.cache/strip-prefix.js","webpack://gatsby-starter-default/./node_modules/@firebase/firestore/dist/esm5/index.js","webpack://gatsby-starter-default/./node_modules/@firebase/storage/dist/index.browser.esm.js","webpack://gatsby-starter-default/./node_modules/@firebase/functions/dist/index.esm.js","webpack://gatsby-starter-default/./gatsby-browser.js","webpack://gatsby-starter-default/./node_modules/firebase/app/dist/index.esm.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-firebase/src/firebase.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-firebase/index.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-gatsby-cloud/gatsby-browser.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-google-gtag/gatsby-browser.js","webpack://gatsby-starter-default/../src/image-utils.ts","webpack://gatsby-starter-default/../src/components/hooks.ts","webpack://gatsby-starter-default/../src/components/layout-wrapper.tsx","webpack://gatsby-starter-default/../src/components/picture.tsx","webpack://gatsby-starter-default/../src/components/placeholder.tsx","webpack://gatsby-starter-default/../src/components/main-image.tsx","webpack://gatsby-starter-default/../src/components/gatsby-image.server.tsx","webpack://gatsby-starter-default/../src/components/gatsby-image.browser.tsx","webpack://gatsby-starter-default/../src/components/static-image.server.tsx","webpack://gatsby-starter-default/../src/components/static-image.tsx","webpack://gatsby-starter-default/../src/components/later-hydrator.tsx","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-image/gatsby-browser.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-manifest/gatsby-browser.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-manifest/get-manifest-pathname.js","webpack://gatsby-starter-default/./node_modules/gatsby-plugin-offline/gatsby-browser.js","webpack://gatsby-starter-default/./src/context/auth.js","webpack://gatsby-starter-default/./node_modules/@gatsbyjs/reach-router/es/lib/utils.js","webpack://gatsby-starter-default/./node_modules/@gatsbyjs/reach-router/es/lib/history.js","webpack://gatsby-starter-default/./node_modules/@gatsbyjs/reach-router/es/index.js","webpack://gatsby-starter-default/./node_modules/invariant/browser.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://gatsby-starter-default/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"],"sourcesContent":["function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inheritsLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import { __assign } from 'tslib';\nimport { ErrorFactory, deepCopy, contains, deepExtend, createSubscribe, isBrowser, isNode } from '@firebase/util';\nimport { ComponentContainer, Component } from '@firebase/component';\nimport { Logger, setLogLevel, setUserLogHandler } from '@firebase/logger';\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar _a$1;\n\nvar ERRORS = (_a$1 = {}, _a$1[\"no-app\"\n/* NO_APP */\n] = \"No Firebase App '{$appName}' has been created - \" + 'call Firebase App.initializeApp()', _a$1[\"bad-app-name\"\n/* BAD_APP_NAME */\n] = \"Illegal App name: '{$appName}\", _a$1[\"duplicate-app\"\n/* DUPLICATE_APP */\n] = \"Firebase App named '{$appName}' already exists\", _a$1[\"app-deleted\"\n/* APP_DELETED */\n] = \"Firebase App named '{$appName}' already deleted\", _a$1[\"invalid-app-argument\"\n/* INVALID_APP_ARGUMENT */\n] = 'firebase.{$appName}() takes either no argument or a ' + 'Firebase App instance.', _a$1[\"invalid-log-argument\"\n/* INVALID_LOG_ARGUMENT */\n] = 'First argument to `onLog` must be null or a function.', _a$1);\nvar ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\nvar name$c = \"@firebase/app\";\nvar version$1 = \"0.6.30\";\nvar name$b = \"@firebase/analytics\";\nvar name$a = \"@firebase/app-check\";\nvar name$9 = \"@firebase/auth\";\nvar name$8 = \"@firebase/database\";\nvar name$7 = \"@firebase/functions\";\nvar name$6 = \"@firebase/installations\";\nvar name$5 = \"@firebase/messaging\";\nvar name$4 = \"@firebase/performance\";\nvar name$3 = \"@firebase/remote-config\";\nvar name$2 = \"@firebase/storage\";\nvar name$1 = \"@firebase/firestore\";\nvar name = \"firebase-wrapper\";\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar _a;\n\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\nvar PLATFORM_LOG_STRING = (_a = {}, _a[name$c] = 'fire-core', _a[name$b] = 'fire-analytics', _a[name$a] = 'fire-app-check', _a[name$9] = 'fire-auth', _a[name$8] = 'fire-rtdb', _a[name$7] = 'fire-fn', _a[name$6] = 'fire-iid', _a[name$5] = 'fire-fcm', _a[name$4] = 'fire-perf', _a[name$3] = 'fire-rc', _a[name$2] = 'fire-gcs', _a[name$1] = 'fire-fst', _a['fire-js'] = 'fire-js', _a[name] = 'fire-js-all', _a);\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar logger = new Logger('@firebase/app');\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Global context object for a collection of services using\r\n * a shared authentication state.\r\n */\n\nvar FirebaseAppImpl = function () {\n function FirebaseAppImpl(options, config, firebase_) {\n var _this = this;\n\n this.firebase_ = firebase_;\n this.isDeleted_ = false;\n this.name_ = config.name;\n this.automaticDataCollectionEnabled_ = config.automaticDataCollectionEnabled || false;\n this.options_ = deepCopy(options);\n this.container = new ComponentContainer(config.name); // add itself to container\n\n this._addComponent(new Component('app', function () {\n return _this;\n }, \"PUBLIC\"\n /* PUBLIC */\n )); // populate ComponentContainer with existing components\n\n\n this.firebase_.INTERNAL.components.forEach(function (component) {\n return _this._addComponent(component);\n });\n }\n\n Object.defineProperty(FirebaseAppImpl.prototype, \"automaticDataCollectionEnabled\", {\n get: function get() {\n this.checkDestroyed_();\n return this.automaticDataCollectionEnabled_;\n },\n set: function set(val) {\n this.checkDestroyed_();\n this.automaticDataCollectionEnabled_ = val;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"name\", {\n get: function get() {\n this.checkDestroyed_();\n return this.name_;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseAppImpl.prototype, \"options\", {\n get: function get() {\n this.checkDestroyed_();\n return this.options_;\n },\n enumerable: false,\n configurable: true\n });\n\n FirebaseAppImpl.prototype.delete = function () {\n var _this = this;\n\n return new Promise(function (resolve) {\n _this.checkDestroyed_();\n\n resolve();\n }).then(function () {\n _this.firebase_.INTERNAL.removeApp(_this.name_);\n\n return Promise.all(_this.container.getProviders().map(function (provider) {\n return provider.delete();\n }));\n }).then(function () {\n _this.isDeleted_ = true;\n });\n };\n /**\r\n * Return a service instance associated with this app (creating it\r\n * on demand), identified by the passed instanceIdentifier.\r\n *\r\n * NOTE: Currently storage and functions are the only ones that are leveraging this\r\n * functionality. They invoke it by calling:\r\n *\r\n * ```javascript\r\n * firebase.app().storage('STORAGE BUCKET ID')\r\n * ```\r\n *\r\n * The service name is passed to this already\r\n * @internal\r\n */\n\n\n FirebaseAppImpl.prototype._getService = function (name, instanceIdentifier) {\n var _a;\n\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n }\n\n this.checkDestroyed_(); // Initialize instance if InstatiationMode is `EXPLICIT`.\n\n var provider = this.container.getProvider(name);\n\n if (!provider.isInitialized() && ((_a = provider.getComponent()) === null || _a === void 0 ? void 0 : _a.instantiationMode) === \"EXPLICIT\"\n /* EXPLICIT */\n ) {\n provider.initialize();\n } // getImmediate will always succeed because _getService is only called for registered components.\n\n\n return provider.getImmediate({\n identifier: instanceIdentifier\n });\n };\n /**\r\n * Remove a service instance from the cache, so we will create a new instance for this service\r\n * when people try to get this service again.\r\n *\r\n * NOTE: currently only firestore is using this functionality to support firestore shutdown.\r\n *\r\n * @param name The service name\r\n * @param instanceIdentifier instance identifier in case multiple instances are allowed\r\n * @internal\r\n */\n\n\n FirebaseAppImpl.prototype._removeServiceInstance = function (name, instanceIdentifier) {\n if (instanceIdentifier === void 0) {\n instanceIdentifier = DEFAULT_ENTRY_NAME;\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n this.container.getProvider(name).clearInstance(instanceIdentifier);\n };\n /**\r\n * @param component the component being added to this app's container\r\n */\n\n\n FirebaseAppImpl.prototype._addComponent = function (component) {\n try {\n this.container.addComponent(component);\n } catch (e) {\n logger.debug(\"Component \" + component.name + \" failed to register with FirebaseApp \" + this.name, e);\n }\n };\n\n FirebaseAppImpl.prototype._addOrOverwriteComponent = function (component) {\n this.container.addOrOverwriteComponent(component);\n };\n\n FirebaseAppImpl.prototype.toJSON = function () {\n return {\n name: this.name,\n automaticDataCollectionEnabled: this.automaticDataCollectionEnabled,\n options: this.options\n };\n };\n /**\r\n * This function will throw an Error if the App has already been deleted -\r\n * use before performing API actions on the App.\r\n */\n\n\n FirebaseAppImpl.prototype.checkDestroyed_ = function () {\n if (this.isDeleted_) {\n throw ERROR_FACTORY.create(\"app-deleted\"\n /* APP_DELETED */\n , {\n appName: this.name_\n });\n }\n };\n\n return FirebaseAppImpl;\n}(); // Prevent dead-code elimination of these methods w/o invalid property\n// copying.\n\n\nFirebaseAppImpl.prototype.name && FirebaseAppImpl.prototype.options || FirebaseAppImpl.prototype.delete || console.log('dc');\nvar version = \"8.10.0\";\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Because auth can't share code with other components, we attach the utility functions\r\n * in an internal namespace to share code.\r\n * This function return a firebase namespace object without\r\n * any utility functions, so it can be shared between the regular firebaseNamespace and\r\n * the lite version.\r\n */\n\nfunction createFirebaseNamespaceCore(firebaseAppImpl) {\n var apps = {}; // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var components = new Map(); // A namespace is a plain JavaScript Object.\n\n var namespace = {\n // Hack to prevent Babel from modifying the object returned\n // as the firebase namespace.\n // @ts-ignore\n __esModule: true,\n initializeApp: initializeApp,\n // @ts-ignore\n app: app,\n registerVersion: registerVersion,\n setLogLevel: setLogLevel,\n onLog: onLog,\n // @ts-ignore\n apps: null,\n SDK_VERSION: version,\n INTERNAL: {\n registerComponent: registerComponent,\n removeApp: removeApp,\n components: components,\n useAsService: useAsService\n }\n }; // Inject a circular default export to allow Babel users who were previously\n // using:\n //\n // import firebase from 'firebase';\n // which becomes: var firebase = require('firebase').default;\n //\n // instead of\n //\n // import * as firebase from 'firebase';\n // which becomes: var firebase = require('firebase');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n namespace['default'] = namespace; // firebase.apps is a read-only getter.\n\n Object.defineProperty(namespace, 'apps', {\n get: getApps\n });\n /**\r\n * Called by App.delete() - but before any services associated with the App\r\n * are deleted.\r\n */\n\n function removeApp(name) {\n delete apps[name];\n }\n /**\r\n * Get the App object for a given name (or DEFAULT).\r\n */\n\n\n function app(name) {\n name = name || DEFAULT_ENTRY_NAME;\n\n if (!contains(apps, name)) {\n throw ERROR_FACTORY.create(\"no-app\"\n /* NO_APP */\n , {\n appName: name\n });\n }\n\n return apps[name];\n } // @ts-ignore\n\n\n app['App'] = firebaseAppImpl;\n\n function initializeApp(options, rawConfig) {\n if (rawConfig === void 0) {\n rawConfig = {};\n }\n\n if (typeof rawConfig !== 'object' || rawConfig === null) {\n var name_1 = rawConfig;\n rawConfig = {\n name: name_1\n };\n }\n\n var config = rawConfig;\n\n if (config.name === undefined) {\n config.name = DEFAULT_ENTRY_NAME;\n }\n\n var name = config.name;\n\n if (typeof name !== 'string' || !name) {\n throw ERROR_FACTORY.create(\"bad-app-name\"\n /* BAD_APP_NAME */\n , {\n appName: String(name)\n });\n }\n\n if (contains(apps, name)) {\n throw ERROR_FACTORY.create(\"duplicate-app\"\n /* DUPLICATE_APP */\n , {\n appName: name\n });\n }\n\n var app = new firebaseAppImpl(options, config, namespace);\n apps[name] = app;\n return app;\n }\n /*\r\n * Return an array of all the non-deleted FirebaseApps.\r\n */\n\n\n function getApps() {\n // Make a copy so caller cannot mutate the apps list.\n return Object.keys(apps).map(function (name) {\n return apps[name];\n });\n }\n\n function registerComponent(component) {\n var componentName = component.name;\n\n if (components.has(componentName)) {\n logger.debug(\"There were multiple attempts to register component \" + componentName + \".\");\n return component.type === \"PUBLIC\"\n /* PUBLIC */\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n namespace[componentName] : null;\n }\n\n components.set(componentName, component); // create service namespace for public components\n\n if (component.type === \"PUBLIC\"\n /* PUBLIC */\n ) {\n // The Service namespace is an accessor function ...\n var serviceNamespace = function serviceNamespace(appArg) {\n if (appArg === void 0) {\n appArg = app();\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n if (typeof appArg[componentName] !== 'function') {\n // Invalid argument.\n // This happens in the following case: firebase.storage('gs:/')\n throw ERROR_FACTORY.create(\"invalid-app-argument\"\n /* INVALID_APP_ARGUMENT */\n , {\n appName: componentName\n });\n } // Forward service instance lookup to the FirebaseApp.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n return appArg[componentName]();\n }; // ... and a container for service-level properties.\n\n\n if (component.serviceProps !== undefined) {\n deepExtend(serviceNamespace, component.serviceProps);\n } // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\n namespace[componentName] = serviceNamespace; // Patch the FirebaseAppImpl prototype\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n firebaseAppImpl.prototype[componentName] = // TODO: The eslint disable can be removed and the 'ignoreRestArgs'\n // option added to the no-explicit-any rule when ESlint releases it.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var serviceFxn = this._getService.bind(this, componentName);\n\n return serviceFxn.apply(this, component.multipleInstances ? args : []);\n };\n } // add the component to existing app instances\n\n\n for (var _i = 0, _a = Object.keys(apps); _i < _a.length; _i++) {\n var appName = _a[_i];\n\n apps[appName]._addComponent(component);\n }\n\n return component.type === \"PUBLIC\"\n /* PUBLIC */\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n namespace[componentName] : null;\n }\n\n function registerVersion(libraryKeyOrName, version, variant) {\n var _a; // TODO: We can use this check to whitelist strings when/if we set up\n // a good whitelist system.\n\n\n var library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\n\n if (variant) {\n library += \"-\" + variant;\n }\n\n var libraryMismatch = library.match(/\\s|\\//);\n var versionMismatch = version.match(/\\s|\\//);\n\n if (libraryMismatch || versionMismatch) {\n var warning = [\"Unable to register library \\\"\" + library + \"\\\" with version \\\"\" + version + \"\\\":\"];\n\n if (libraryMismatch) {\n warning.push(\"library name \\\"\" + library + \"\\\" contains illegal characters (whitespace or \\\"/\\\")\");\n }\n\n if (libraryMismatch && versionMismatch) {\n warning.push('and');\n }\n\n if (versionMismatch) {\n warning.push(\"version name \\\"\" + version + \"\\\" contains illegal characters (whitespace or \\\"/\\\")\");\n }\n\n logger.warn(warning.join(' '));\n return;\n }\n\n registerComponent(new Component(library + \"-version\", function () {\n return {\n library: library,\n version: version\n };\n }, \"VERSION\"\n /* VERSION */\n ));\n }\n\n function onLog(logCallback, options) {\n if (logCallback !== null && typeof logCallback !== 'function') {\n throw ERROR_FACTORY.create(\"invalid-log-argument\"\n /* INVALID_LOG_ARGUMENT */\n );\n }\n\n setUserLogHandler(logCallback, options);\n } // Map the requested service to a registered service name\n // (used to map auth to serverAuth service when needed).\n\n\n function useAsService(app, name) {\n if (name === 'serverAuth') {\n return null;\n }\n\n var useService = name;\n return useService;\n }\n\n return namespace;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Return a firebase namespace object.\r\n *\r\n * In production, this will be called exactly once and the result\r\n * assigned to the 'firebase' global. It may be called multiple times\r\n * in unit tests.\r\n */\n\n\nfunction createFirebaseNamespace() {\n var namespace = createFirebaseNamespaceCore(FirebaseAppImpl);\n namespace.INTERNAL = __assign(__assign({}, namespace.INTERNAL), {\n createFirebaseNamespace: createFirebaseNamespace,\n extendNamespace: extendNamespace,\n createSubscribe: createSubscribe,\n ErrorFactory: ErrorFactory,\n deepExtend: deepExtend\n });\n /**\r\n * Patch the top-level firebase namespace with additional properties.\r\n *\r\n * firebase.INTERNAL.extendNamespace()\r\n */\n\n function extendNamespace(props) {\n deepExtend(namespace, props);\n }\n\n return namespace;\n}\n\nvar firebase$1 = createFirebaseNamespace();\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nvar PlatformLoggerService = function () {\n function PlatformLoggerService(container) {\n this.container = container;\n } // In initial implementation, this will be called by installations on\n // auth token refresh, and installations will send this string.\n\n\n PlatformLoggerService.prototype.getPlatformInfoString = function () {\n var providers = this.container.getProviders(); // Loop through providers and get library/version pairs from any that are\n // version components.\n\n return providers.map(function (provider) {\n if (isVersionServiceProvider(provider)) {\n var service = provider.getImmediate();\n return service.library + \"/\" + service.version;\n } else {\n return null;\n }\n }).filter(function (logString) {\n return logString;\n }).join(' ');\n };\n\n return PlatformLoggerService;\n}();\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\n\n\nfunction isVersionServiceProvider(provider) {\n var component = provider.getComponent();\n return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\"\n /* VERSION */\n ;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction registerCoreComponents(firebase, variant) {\n firebase.INTERNAL.registerComponent(new Component('platform-logger', function (container) {\n return new PlatformLoggerService(container);\n }, \"PRIVATE\"\n /* PRIVATE */\n )); // Register `app` package.\n\n firebase.registerVersion(name$c, version$1, variant); // Register platform SDK identifier (no version).\n\n firebase.registerVersion('fire-js', '');\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Firebase Lite detection test\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n\nif (isBrowser() && self.firebase !== undefined) {\n logger.warn(\"\\n Warning: Firebase is already defined in the global scope. Please make sure\\n Firebase library is only loaded once.\\n \"); // eslint-disable-next-line\n\n var sdkVersion = self.firebase.SDK_VERSION;\n\n if (sdkVersion && sdkVersion.indexOf('LITE') >= 0) {\n logger.warn(\"\\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\\n \");\n }\n}\n\nvar initializeApp = firebase$1.initializeApp; // TODO: This disable can be removed and the 'ignoreRestArgs' option added to\n// the no-explicit-any rule when ESlint releases it.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\nfirebase$1.initializeApp = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // Environment check before initializing app\n // Do the check in initializeApp, so people have a chance to disable it by setting logLevel\n // in @firebase/logger\n\n\n if (isNode()) {\n logger.warn(\"\\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\\n run in a Node environment. If running in a Node environment, make sure you\\n are using the bundle specified by the \\\"main\\\" field in package.json.\\n \\n If you are using Webpack, you can specify \\\"main\\\" as the first item in\\n \\\"resolve.mainFields\\\":\\n https://webpack.js.org/configuration/resolve/#resolvemainfields\\n \\n If using Rollup, use the @rollup/plugin-node-resolve plugin and specify \\\"main\\\"\\n as the first item in \\\"mainFields\\\", e.g. ['main', 'module'].\\n https://github.com/rollup/@rollup/plugin-node-resolve\\n \");\n }\n\n return initializeApp.apply(undefined, args);\n};\n\nvar firebase = firebase$1;\nregisterCoreComponents(firebase);\nexport default firebase;\nexport { firebase };","import { __values, __read, __awaiter, __generator, __spreadArray } from 'tslib';\nimport { Deferred } from '@firebase/util';\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\n\nvar Component = function () {\n /**\r\n *\r\n * @param name The public service name, e.g. app, auth, firestore, database\r\n * @param instanceFactory Service factory responsible for creating the public interface\r\n * @param type whether the service provided by the component is public or private\r\n */\n function Component(name, instanceFactory, type) {\n this.name = name;\n this.instanceFactory = instanceFactory;\n this.type = type;\n this.multipleInstances = false;\n /**\r\n * Properties to be added to the service namespace\r\n */\n\n this.serviceProps = {};\n this.instantiationMode = \"LAZY\"\n /* LAZY */\n ;\n this.onInstanceCreated = null;\n }\n\n Component.prototype.setInstantiationMode = function (mode) {\n this.instantiationMode = mode;\n return this;\n };\n\n Component.prototype.setMultipleInstances = function (multipleInstances) {\n this.multipleInstances = multipleInstances;\n return this;\n };\n\n Component.prototype.setServiceProps = function (props) {\n this.serviceProps = props;\n return this;\n };\n\n Component.prototype.setInstanceCreatedCallback = function (callback) {\n this.onInstanceCreated = callback;\n return this;\n };\n\n return Component;\n}();\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar DEFAULT_ENTRY_NAME = '[DEFAULT]';\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\n\nvar Provider = function () {\n function Provider(name, container) {\n this.name = name;\n this.container = container;\n this.component = null;\n this.instances = new Map();\n this.instancesDeferred = new Map();\n this.instancesOptions = new Map();\n this.onInitCallbacks = new Map();\n }\n /**\r\n * @param identifier A provider can provide mulitple instances of a service\r\n * if this.component.multipleInstances is true.\r\n */\n\n\n Provider.prototype.get = function (identifier) {\n // if multipleInstances is not supported, use the default name\n var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\n var deferred = new Deferred();\n this.instancesDeferred.set(normalizedIdentifier, deferred);\n\n if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {\n // initialize the service if it can be auto-initialized\n try {\n var instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n\n if (instance) {\n deferred.resolve(instance);\n }\n } catch (e) {// when the instance factory throws an exception during get(), it should not cause\n // a fatal error. We just return the unresolved promise in this case.\n }\n }\n }\n\n return this.instancesDeferred.get(normalizedIdentifier).promise;\n };\n\n Provider.prototype.getImmediate = function (options) {\n var _a; // if multipleInstances is not supported, use the default name\n\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\n var optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\n\n if (this.isInitialized(normalizedIdentifier) || this.shouldAutoInitialize()) {\n try {\n return this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n } catch (e) {\n if (optional) {\n return null;\n } else {\n throw e;\n }\n }\n } else {\n // In case a component is not initialized and should/can not be auto-initialized at the moment, return null if the optional flag is set, or throw\n if (optional) {\n return null;\n } else {\n throw Error(\"Service \" + this.name + \" is not available\");\n }\n }\n };\n\n Provider.prototype.getComponent = function () {\n return this.component;\n };\n\n Provider.prototype.setComponent = function (component) {\n var e_1, _a;\n\n if (component.name !== this.name) {\n throw Error(\"Mismatching Component \" + component.name + \" for Provider \" + this.name + \".\");\n }\n\n if (this.component) {\n throw Error(\"Component for \" + this.name + \" has already been provided\");\n }\n\n this.component = component; // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\n\n if (!this.shouldAutoInitialize()) {\n return;\n } // if the service is eager, initialize the default instance\n\n\n if (isComponentEager(component)) {\n try {\n this.getOrInitializeService({\n instanceIdentifier: DEFAULT_ENTRY_NAME\n });\n } catch (e) {// when the instance factory for an eager Component throws an exception during the eager\n // initialization, it should not cause a fatal error.\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\n // a fatal error in this case?\n }\n }\n\n try {\n // Create service instances for the pending promises and resolve them\n // NOTE: if this.multipleInstances is false, only the default instance will be created\n // and all promises with resolve with it regardless of the identifier.\n for (var _b = __values(this.instancesDeferred.entries()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2),\n instanceIdentifier = _d[0],\n instanceDeferred = _d[1];\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n\n try {\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\n var instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier\n });\n instanceDeferred.resolve(instance);\n } catch (e) {// when the instance factory throws an exception, it should not cause\n // a fatal error. We just leave the promise unresolved.\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n };\n\n Provider.prototype.clearInstance = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n }\n\n this.instancesDeferred.delete(identifier);\n this.instancesOptions.delete(identifier);\n this.instances.delete(identifier);\n }; // app.delete() will call this method on every provider to delete the services\n // TODO: should we mark the provider as deleted?\n\n\n Provider.prototype.delete = function () {\n return __awaiter(this, void 0, void 0, function () {\n var services;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n services = Array.from(this.instances.values());\n return [4\n /*yield*/\n , Promise.all(__spreadArray(__spreadArray([], __read(services.filter(function (service) {\n return 'INTERNAL' in service;\n }) // legacy services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(function (service) {\n return service.INTERNAL.delete();\n }))), __read(services.filter(function (service) {\n return '_delete' in service;\n }) // modularized services\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map(function (service) {\n return service._delete();\n }))))];\n\n case 1:\n _a.sent();\n\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n\n Provider.prototype.isComponentSet = function () {\n return this.component != null;\n };\n\n Provider.prototype.isInitialized = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n }\n\n return this.instances.has(identifier);\n };\n\n Provider.prototype.getOptions = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n }\n\n return this.instancesOptions.get(identifier) || {};\n };\n\n Provider.prototype.initialize = function (opts) {\n var e_2, _a;\n\n if (opts === void 0) {\n opts = {};\n }\n\n var _b = opts.options,\n options = _b === void 0 ? {} : _b;\n var normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\n\n if (this.isInitialized(normalizedIdentifier)) {\n throw Error(this.name + \"(\" + normalizedIdentifier + \") has already been initialized\");\n }\n\n if (!this.isComponentSet()) {\n throw Error(\"Component \" + this.name + \" has not been registered yet\");\n }\n\n var instance = this.getOrInitializeService({\n instanceIdentifier: normalizedIdentifier,\n options: options\n });\n\n try {\n // resolve any pending promise waiting for the service instance\n for (var _c = __values(this.instancesDeferred.entries()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var _e = __read(_d.value, 2),\n instanceIdentifier = _e[0],\n instanceDeferred = _e[1];\n\n var normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\n\n if (normalizedIdentifier === normalizedDeferredIdentifier) {\n instanceDeferred.resolve(instance);\n }\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n\n return instance;\n };\n /**\r\n *\r\n * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().\r\n * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\r\n *\r\n * @param identifier An optional instance identifier\r\n * @returns a function to unregister the callback\r\n */\n\n\n Provider.prototype.onInit = function (callback, identifier) {\n var _a;\n\n var normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\n var existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\n existingCallbacks.add(callback);\n this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\n var existingInstance = this.instances.get(normalizedIdentifier);\n\n if (existingInstance) {\n callback(existingInstance, normalizedIdentifier);\n }\n\n return function () {\n existingCallbacks.delete(callback);\n };\n };\n /**\r\n * Invoke onInit callbacks synchronously\r\n * @param instance the service instance`\r\n */\n\n\n Provider.prototype.invokeOnInitCallbacks = function (instance, identifier) {\n var e_3, _a;\n\n var callbacks = this.onInitCallbacks.get(identifier);\n\n if (!callbacks) {\n return;\n }\n\n try {\n for (var callbacks_1 = __values(callbacks), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) {\n var callback = callbacks_1_1.value;\n\n try {\n callback(instance, identifier);\n } catch (_b) {// ignore errors in the onInit callback\n }\n }\n } catch (e_3_1) {\n e_3 = {\n error: e_3_1\n };\n } finally {\n try {\n if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1);\n } finally {\n if (e_3) throw e_3.error;\n }\n }\n };\n\n Provider.prototype.getOrInitializeService = function (_a) {\n var instanceIdentifier = _a.instanceIdentifier,\n _b = _a.options,\n options = _b === void 0 ? {} : _b;\n var instance = this.instances.get(instanceIdentifier);\n\n if (!instance && this.component) {\n instance = this.component.instanceFactory(this.container, {\n instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\n options: options\n });\n this.instances.set(instanceIdentifier, instance);\n this.instancesOptions.set(instanceIdentifier, options);\n /**\r\n * Invoke onInit listeners.\r\n * Note this.component.onInstanceCreated is different, which is used by the component creator,\r\n * while onInit listeners are registered by consumers of the provider.\r\n */\n\n this.invokeOnInitCallbacks(instance, instanceIdentifier);\n /**\r\n * Order is important\r\n * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\r\n * makes `isInitialized()` return true.\r\n */\n\n if (this.component.onInstanceCreated) {\n try {\n this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\n } catch (_c) {// ignore errors in the onInstanceCreatedCallback\n }\n }\n }\n\n return instance || null;\n };\n\n Provider.prototype.normalizeInstanceIdentifier = function (identifier) {\n if (identifier === void 0) {\n identifier = DEFAULT_ENTRY_NAME;\n }\n\n if (this.component) {\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\n } else {\n return identifier; // assume multiple instances are supported before the component is provided.\n }\n };\n\n Provider.prototype.shouldAutoInitialize = function () {\n return !!this.component && this.component.instantiationMode !== \"EXPLICIT\"\n /* EXPLICIT */\n ;\n };\n\n return Provider;\n}(); // undefined should be passed to the service factory for the default instance\n\n\nfunction normalizeIdentifierForFactory(identifier) {\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\n}\n\nfunction isComponentEager(component) {\n return component.instantiationMode === \"EAGER\"\n /* EAGER */\n ;\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\n\n\nvar ComponentContainer = function () {\n function ComponentContainer(name) {\n this.name = name;\n this.providers = new Map();\n }\n /**\r\n *\r\n * @param component Component being added\r\n * @param overwrite When a component with the same name has already been registered,\r\n * if overwrite is true: overwrite the existing component with the new component and create a new\r\n * provider with the new component. It can be useful in tests where you want to use different mocks\r\n * for different tests.\r\n * if overwrite is false: throw an exception\r\n */\n\n\n ComponentContainer.prototype.addComponent = function (component) {\n var provider = this.getProvider(component.name);\n\n if (provider.isComponentSet()) {\n throw new Error(\"Component \" + component.name + \" has already been registered with \" + this.name);\n }\n\n provider.setComponent(component);\n };\n\n ComponentContainer.prototype.addOrOverwriteComponent = function (component) {\n var provider = this.getProvider(component.name);\n\n if (provider.isComponentSet()) {\n // delete the existing provider from the container, so we can register the new component\n this.providers.delete(component.name);\n }\n\n this.addComponent(component);\n };\n /**\r\n * getProvider provides a type safe interface where it can only be called with a field name\r\n * present in NameServiceMapping interface.\r\n *\r\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n * themselves.\r\n */\n\n\n ComponentContainer.prototype.getProvider = function (name) {\n if (this.providers.has(name)) {\n return this.providers.get(name);\n } // create a Provider for a service that hasn't registered with Firebase\n\n\n var provider = new Provider(name, this);\n this.providers.set(name, provider);\n return provider;\n };\n\n ComponentContainer.prototype.getProviders = function () {\n return Array.from(this.providers.values());\n };\n\n return ComponentContainer;\n}();\n\nexport { Component, ComponentContainer, Provider };","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\nfunction __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar _a;\n/**\r\n * A container for all of the Logger instances\r\n */\n\n\nvar instances = [];\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\n\nvar LogLevel;\n\n(function (LogLevel) {\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\n LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\n LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\n LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\n LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\n LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\n})(LogLevel || (LogLevel = {}));\n\nvar levelStringToEnum = {\n 'debug': LogLevel.DEBUG,\n 'verbose': LogLevel.VERBOSE,\n 'info': LogLevel.INFO,\n 'warn': LogLevel.WARN,\n 'error': LogLevel.ERROR,\n 'silent': LogLevel.SILENT\n};\n/**\r\n * The default log level\r\n */\n\nvar defaultLogLevel = LogLevel.INFO;\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\n\nvar ConsoleMethod = (_a = {}, _a[LogLevel.DEBUG] = 'log', _a[LogLevel.VERBOSE] = 'log', _a[LogLevel.INFO] = 'info', _a[LogLevel.WARN] = 'warn', _a[LogLevel.ERROR] = 'error', _a);\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\n\nvar defaultLogHandler = function defaultLogHandler(instance, logType) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n if (logType < instance.logLevel) {\n return;\n }\n\n var now = new Date().toISOString();\n var method = ConsoleMethod[logType];\n\n if (method) {\n console[method].apply(console, __spreadArrays([\"[\" + now + \"] \" + instance.name + \":\"], args));\n } else {\n throw new Error(\"Attempted to log a message with an invalid logType (value: \" + logType + \")\");\n }\n};\n\nvar Logger = function () {\n /**\r\n * Gives you an instance of a Logger to capture messages according to\r\n * Firebase's logging scheme.\r\n *\r\n * @param name The name that the logs will be associated with\r\n */\n function Logger(name) {\n this.name = name;\n /**\r\n * The log level of the given Logger instance.\r\n */\n\n this._logLevel = defaultLogLevel;\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\n\n this._logHandler = defaultLogHandler;\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\n\n this._userLogHandler = null;\n /**\r\n * Capture the current instance for later use\r\n */\n\n instances.push(this);\n }\n\n Object.defineProperty(Logger.prototype, \"logLevel\", {\n get: function get() {\n return this._logLevel;\n },\n set: function set(val) {\n if (!(val in LogLevel)) {\n throw new TypeError(\"Invalid value \\\"\" + val + \"\\\" assigned to `logLevel`\");\n }\n\n this._logLevel = val;\n },\n enumerable: false,\n configurable: true\n }); // Workaround for setter/getter having to be the same type.\n\n Logger.prototype.setLogLevel = function (val) {\n this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\n };\n\n Object.defineProperty(Logger.prototype, \"logHandler\", {\n get: function get() {\n return this._logHandler;\n },\n set: function set(val) {\n if (typeof val !== 'function') {\n throw new TypeError('Value assigned to `logHandler` must be a function');\n }\n\n this._logHandler = val;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Logger.prototype, \"userLogHandler\", {\n get: function get() {\n return this._userLogHandler;\n },\n set: function set(val) {\n this._userLogHandler = val;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * The functions below are all based on the `console` interface\r\n */\n\n Logger.prototype.debug = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.DEBUG], args));\n };\n\n Logger.prototype.log = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.VERBOSE], args));\n };\n\n Logger.prototype.info = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.INFO], args));\n };\n\n Logger.prototype.warn = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.WARN], args));\n };\n\n Logger.prototype.error = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n this._userLogHandler && this._userLogHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));\n\n this._logHandler.apply(this, __spreadArrays([this, LogLevel.ERROR], args));\n };\n\n return Logger;\n}();\n\nfunction setLogLevel(level) {\n instances.forEach(function (inst) {\n inst.setLogLevel(level);\n });\n}\n\nfunction setUserLogHandler(logCallback, options) {\n var _loop_1 = function _loop_1(instance) {\n var customLogLevel = null;\n\n if (options && options.level) {\n customLogLevel = levelStringToEnum[options.level];\n }\n\n if (logCallback === null) {\n instance.userLogHandler = null;\n } else {\n instance.userLogHandler = function (instance, level) {\n var args = [];\n\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n\n var message = args.map(function (arg) {\n if (arg == null) {\n return null;\n } else if (typeof arg === 'string') {\n return arg;\n } else if (typeof arg === 'number' || typeof arg === 'boolean') {\n return arg.toString();\n } else if (arg instanceof Error) {\n return arg.message;\n } else {\n try {\n return JSON.stringify(arg);\n } catch (ignored) {\n return null;\n }\n }\n }).filter(function (arg) {\n return arg;\n }).join(' ');\n\n if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\n logCallback({\n level: LogLevel[level].toLowerCase(),\n message: message,\n args: args,\n type: instance.name\n });\n }\n };\n }\n };\n\n for (var _i = 0, instances_1 = instances; _i < instances_1.length; _i++) {\n var instance = instances_1[_i];\n\n _loop_1(instance);\n }\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };","import { __assign, __extends } from 'tslib';\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\r\n */\n\nvar CONSTANTS = {\n /**\r\n * @define {boolean} Whether this is the client Node.js SDK.\r\n */\n NODE_CLIENT: false,\n\n /**\r\n * @define {boolean} Whether this is the Admin Node.js SDK.\r\n */\n NODE_ADMIN: false,\n\n /**\r\n * Firebase SDK Version\r\n */\n SDK_VERSION: '${JSCORE_VERSION}'\n};\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Throws an error if the provided assertion is falsy\r\n */\n\nvar assert = function assert(assertion, message) {\n if (!assertion) {\n throw assertionError(message);\n }\n};\n/**\r\n * Returns an Error object suitable for throwing.\r\n */\n\n\nvar assertionError = function assertionError(message) {\n return new Error('Firebase Database (' + CONSTANTS.SDK_VERSION + ') INTERNAL ASSERT FAILED: ' + message);\n};\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar stringToByteArray$1 = function stringToByteArray$1(str) {\n // TODO(user): Use native implementations if/when available\n var out = [];\n var p = 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n\n if (c < 128) {\n out[p++] = c;\n } else if (c < 2048) {\n out[p++] = c >> 6 | 192;\n out[p++] = c & 63 | 128;\n } else if ((c & 0xfc00) === 0xd800 && i + 1 < str.length && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n // Surrogate Pair\n c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\n out[p++] = c >> 18 | 240;\n out[p++] = c >> 12 & 63 | 128;\n out[p++] = c >> 6 & 63 | 128;\n out[p++] = c & 63 | 128;\n } else {\n out[p++] = c >> 12 | 224;\n out[p++] = c >> 6 & 63 | 128;\n out[p++] = c & 63 | 128;\n }\n }\n\n return out;\n};\n/**\r\n * Turns an array of numbers into the string given by the concatenation of the\r\n * characters to which the numbers correspond.\r\n * @param bytes Array of numbers representing characters.\r\n * @return Stringification of the array.\r\n */\n\n\nvar byteArrayToString = function byteArrayToString(bytes) {\n // TODO(user): Use native implementations if/when available\n var out = [];\n var pos = 0,\n c = 0;\n\n while (pos < bytes.length) {\n var c1 = bytes[pos++];\n\n if (c1 < 128) {\n out[c++] = String.fromCharCode(c1);\n } else if (c1 > 191 && c1 < 224) {\n var c2 = bytes[pos++];\n out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63);\n } else if (c1 > 239 && c1 < 365) {\n // Surrogate Pair\n var c2 = bytes[pos++];\n var c3 = bytes[pos++];\n var c4 = bytes[pos++];\n var u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 0x10000;\n out[c++] = String.fromCharCode(0xd800 + (u >> 10));\n out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\n } else {\n var c2 = bytes[pos++];\n var c3 = bytes[pos++];\n out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n }\n }\n\n return out.join('');\n}; // We define it as an object literal instead of a class because a class compiled down to es5 can't\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\n// Static lookup maps, lazily populated by init_()\n\n\nvar base64 = {\n /**\r\n * Maps bytes to characters.\r\n */\n byteToCharMap_: null,\n\n /**\r\n * Maps characters to bytes.\r\n */\n charToByteMap_: null,\n\n /**\r\n * Maps bytes to websafe characters.\r\n * @private\r\n */\n byteToCharMapWebSafe_: null,\n\n /**\r\n * Maps websafe characters to bytes.\r\n * @private\r\n */\n charToByteMapWebSafe_: null,\n\n /**\r\n * Our default alphabet, shared between\r\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n */\n ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\n\n /**\r\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n */\n get ENCODED_VALS() {\n return this.ENCODED_VALS_BASE + '+/=';\n },\n\n /**\r\n * Our websafe alphabet.\r\n */\n get ENCODED_VALS_WEBSAFE() {\n return this.ENCODED_VALS_BASE + '-_.';\n },\n\n /**\r\n * Whether this browser supports the atob and btoa functions. This extension\r\n * started at Mozilla but is now implemented by many browsers. We use the\r\n * ASSUME_* variables to avoid pulling in the full useragent detection library\r\n * but still allowing the standard per-browser compilations.\r\n *\r\n */\n HAS_NATIVE_SUPPORT: typeof atob === 'function',\n\n /**\r\n * Base64-encode an array of bytes.\r\n *\r\n * @param input An array of bytes (numbers with\r\n * value in [0, 255]) to encode.\r\n * @param webSafe Boolean indicating we should use the\r\n * alternative alphabet.\r\n * @return The base64 encoded string.\r\n */\n encodeByteArray: function encodeByteArray(input, webSafe) {\n if (!Array.isArray(input)) {\n throw Error('encodeByteArray takes an array as a parameter');\n }\n\n this.init_();\n var byteToCharMap = webSafe ? this.byteToCharMapWebSafe_ : this.byteToCharMap_;\n var output = [];\n\n for (var i = 0; i < input.length; i += 3) {\n var byte1 = input[i];\n var haveByte2 = i + 1 < input.length;\n var byte2 = haveByte2 ? input[i + 1] : 0;\n var haveByte3 = i + 2 < input.length;\n var byte3 = haveByte3 ? input[i + 2] : 0;\n var outByte1 = byte1 >> 2;\n var outByte2 = (byte1 & 0x03) << 4 | byte2 >> 4;\n var outByte3 = (byte2 & 0x0f) << 2 | byte3 >> 6;\n var outByte4 = byte3 & 0x3f;\n\n if (!haveByte3) {\n outByte4 = 64;\n\n if (!haveByte2) {\n outByte3 = 64;\n }\n }\n\n output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\n }\n\n return output.join('');\n },\n\n /**\r\n * Base64-encode a string.\r\n *\r\n * @param input A string to encode.\r\n * @param webSafe If true, we should use the\r\n * alternative alphabet.\r\n * @return The base64 encoded string.\r\n */\n encodeString: function encodeString(input, webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n return btoa(input);\n }\n\n return this.encodeByteArray(stringToByteArray$1(input), webSafe);\n },\n\n /**\r\n * Base64-decode a string.\r\n *\r\n * @param input to decode.\r\n * @param webSafe True if we should use the\r\n * alternative alphabet.\r\n * @return string representing the decoded value.\r\n */\n decodeString: function decodeString(input, webSafe) {\n // Shortcut for Mozilla browsers that implement\n // a native base64 encoder in the form of \"btoa/atob\"\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\n return atob(input);\n }\n\n return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\n },\n\n /**\r\n * Base64-decode a string.\r\n *\r\n * In base-64 decoding, groups of four characters are converted into three\r\n * bytes. If the encoder did not apply padding, the input length may not\r\n * be a multiple of 4.\r\n *\r\n * In this case, the last group will have fewer than 4 characters, and\r\n * padding will be inferred. If the group has one or two characters, it decodes\r\n * to one byte. If the group has three characters, it decodes to two bytes.\r\n *\r\n * @param input Input to decode.\r\n * @param webSafe True if we should use the web-safe alphabet.\r\n * @return bytes representing the decoded value.\r\n */\n decodeStringToByteArray: function decodeStringToByteArray(input, webSafe) {\n this.init_();\n var charToByteMap = webSafe ? this.charToByteMapWebSafe_ : this.charToByteMap_;\n var output = [];\n\n for (var i = 0; i < input.length;) {\n var byte1 = charToByteMap[input.charAt(i++)];\n var haveByte2 = i < input.length;\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\n ++i;\n var haveByte3 = i < input.length;\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n var haveByte4 = i < input.length;\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\n ++i;\n\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\n throw Error();\n }\n\n var outByte1 = byte1 << 2 | byte2 >> 4;\n output.push(outByte1);\n\n if (byte3 !== 64) {\n var outByte2 = byte2 << 4 & 0xf0 | byte3 >> 2;\n output.push(outByte2);\n\n if (byte4 !== 64) {\n var outByte3 = byte3 << 6 & 0xc0 | byte4;\n output.push(outByte3);\n }\n }\n }\n\n return output;\n },\n\n /**\r\n * Lazy static initialization function. Called before\r\n * accessing any of the static map variables.\r\n * @private\r\n */\n init_: function init_() {\n if (!this.byteToCharMap_) {\n this.byteToCharMap_ = {};\n this.charToByteMap_ = {};\n this.byteToCharMapWebSafe_ = {};\n this.charToByteMapWebSafe_ = {}; // We want quick mappings back and forth, so we precompute two maps.\n\n for (var i = 0; i < this.ENCODED_VALS.length; i++) {\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i; // Be forgiving when decoding and correctly decode both encodings.\n\n if (i >= this.ENCODED_VALS_BASE.length) {\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\n }\n }\n }\n }\n};\n/**\r\n * URL-safe base64 encoding\r\n */\n\nvar base64Encode = function base64Encode(str) {\n var utf8Bytes = stringToByteArray$1(str);\n return base64.encodeByteArray(utf8Bytes, true);\n};\n/**\r\n * URL-safe base64 encoding (without \".\" padding in the end).\r\n * e.g. Used in JSON Web Token (JWT) parts.\r\n */\n\n\nvar base64urlEncodeWithoutPadding = function base64urlEncodeWithoutPadding(str) {\n // Use base64url encoding and remove padding in the end (dot characters).\n return base64Encode(str).replace(/\\./g, '');\n};\n/**\r\n * URL-safe base64 decoding\r\n *\r\n * NOTE: DO NOT use the global atob() function - it does NOT support the\r\n * base64Url variant encoding.\r\n *\r\n * @param str To be decoded\r\n * @return Decoded result, if possible\r\n */\n\n\nvar base64Decode = function base64Decode(str) {\n try {\n return base64.decodeString(str, true);\n } catch (e) {\n console.error('base64Decode failed: ', e);\n }\n\n return null;\n};\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\n\n\nfunction deepCopy(value) {\n return deepExtend(undefined, value);\n}\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays). Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n *\r\n * Note: we don't merge __proto__ to prevent prototype pollution\r\n */\n\n\nfunction deepExtend(target, source) {\n if (!(source instanceof Object)) {\n return source;\n }\n\n switch (source.constructor) {\n case Date:\n // Treat Dates like scalars; if the target date object had any child\n // properties - they will be lost!\n var dateValue = source;\n return new Date(dateValue.getTime());\n\n case Object:\n if (target === undefined) {\n target = {};\n }\n\n break;\n\n case Array:\n // Always copy the array source and overwrite the target.\n target = [];\n break;\n\n default:\n // Not a plain Object - treat it as a scalar.\n return source;\n }\n\n for (var prop in source) {\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\n continue;\n }\n\n target[prop] = deepExtend(target[prop], source[prop]);\n }\n\n return target;\n}\n\nfunction isValidKey(key) {\n return key !== '__proto__';\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar Deferred = function () {\n function Deferred() {\n var _this = this;\n\n this.reject = function () {};\n\n this.resolve = function () {};\n\n this.promise = new Promise(function (resolve, reject) {\n _this.resolve = resolve;\n _this.reject = reject;\n });\n }\n /**\r\n * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n */\n\n\n Deferred.prototype.wrapCallback = function (callback) {\n var _this = this;\n\n return function (error, value) {\n if (error) {\n _this.reject(error);\n } else {\n _this.resolve(value);\n }\n\n if (typeof callback === 'function') {\n // Attaching noop handler just in case developer wasn't expecting\n // promises\n _this.promise.catch(function () {}); // Some of our callbacks don't expect a value and our own tests\n // assert that the parameter length is 1\n\n\n if (callback.length === 1) {\n callback(error);\n } else {\n callback(error, value);\n }\n }\n };\n };\n\n return Deferred;\n}();\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction createMockUserToken(token, projectId) {\n if (token.uid) {\n throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\n } // Unsecured JWTs use \"none\" as the algorithm.\n\n\n var header = {\n alg: 'none',\n type: 'JWT'\n };\n var project = projectId || 'demo-project';\n var iat = token.iat || 0;\n var sub = token.sub || token.user_id;\n\n if (!sub) {\n throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\n }\n\n var payload = __assign({\n // Set all required fields to decent defaults\n iss: \"https://securetoken.google.com/\" + project,\n aud: project,\n iat: iat,\n exp: iat + 3600,\n auth_time: iat,\n sub: sub,\n user_id: sub,\n firebase: {\n sign_in_provider: 'custom',\n identities: {}\n }\n }, token); // Unsecured JWTs use the empty string as a signature.\n\n\n var signature = '';\n return [base64urlEncodeWithoutPadding(JSON.stringify(header)), base64urlEncodeWithoutPadding(JSON.stringify(payload)), signature].join('.');\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Returns navigator.userAgent string or '' if it's not defined.\r\n * @return user agent string\r\n */\n\n\nfunction getUA() {\n if (typeof navigator !== 'undefined' && typeof navigator['userAgent'] === 'string') {\n return navigator['userAgent'];\n } else {\n return '';\n }\n}\n/**\r\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\r\n *\r\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\r\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\r\n * wait for a callback.\r\n */\n\n\nfunction isMobileCordova() {\n return typeof window !== 'undefined' && // @ts-ignore Setting up an broadly applicable index signature for Window\n // just to deal with this case would probably be a bad idea.\n !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA());\n}\n/**\r\n * Detect Node.js.\r\n *\r\n * @return true if Node.js environment is detected.\r\n */\n// Node detection logic from: https://github.com/iliakan/detect-node/\n\n\nfunction isNode() {\n try {\n return Object.prototype.toString.call(global.process) === '[object process]';\n } catch (e) {\n return false;\n }\n}\n/**\r\n * Detect Browser Environment\r\n */\n\n\nfunction isBrowser() {\n return typeof self === 'object' && self.self === self;\n}\n\nfunction isBrowserExtension() {\n var runtime = typeof chrome === 'object' ? chrome.runtime : typeof browser === 'object' ? browser.runtime : undefined;\n return typeof runtime === 'object' && runtime.id !== undefined;\n}\n/**\r\n * Detect React Native.\r\n *\r\n * @return true if ReactNative environment is detected.\r\n */\n\n\nfunction isReactNative() {\n return typeof navigator === 'object' && navigator['product'] === 'ReactNative';\n}\n/** Detects Electron apps. */\n\n\nfunction isElectron() {\n return getUA().indexOf('Electron/') >= 0;\n}\n/** Detects Internet Explorer. */\n\n\nfunction isIE() {\n var ua = getUA();\n return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\n}\n/** Detects Universal Windows Platform apps. */\n\n\nfunction isUWP() {\n return getUA().indexOf('MSAppHost/') >= 0;\n}\n/**\r\n * Detect whether the current SDK build is the Node version.\r\n *\r\n * @return true if it's the Node SDK build.\r\n */\n\n\nfunction isNodeSdk() {\n return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\n}\n/** Returns true if we are running in Safari. */\n\n\nfunction isSafari() {\n return !isNode() && navigator.userAgent.includes('Safari') && !navigator.userAgent.includes('Chrome');\n}\n/**\r\n * This method checks if indexedDB is supported by current browser/service worker context\r\n * @return true if indexedDB is supported by current browser/service worker context\r\n */\n\n\nfunction isIndexedDBAvailable() {\n return 'indexedDB' in self && indexedDB != null;\n}\n/**\r\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\r\n * if errors occur during the database open operation.\r\n *\r\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\r\n * private browsing)\r\n */\n\n\nfunction validateIndexedDBOpenable() {\n return new Promise(function (resolve, reject) {\n try {\n var preExist_1 = true;\n var DB_CHECK_NAME_1 = 'validate-browser-context-for-indexeddb-analytics-module';\n var request_1 = self.indexedDB.open(DB_CHECK_NAME_1);\n\n request_1.onsuccess = function () {\n request_1.result.close(); // delete database only when it doesn't pre-exist\n\n if (!preExist_1) {\n self.indexedDB.deleteDatabase(DB_CHECK_NAME_1);\n }\n\n resolve(true);\n };\n\n request_1.onupgradeneeded = function () {\n preExist_1 = false;\n };\n\n request_1.onerror = function () {\n var _a;\n\n reject(((_a = request_1.error) === null || _a === void 0 ? void 0 : _a.message) || '');\n };\n } catch (error) {\n reject(error);\n }\n });\n}\n/**\r\n *\r\n * This method checks whether cookie is enabled within current browser\r\n * @return true if cookie is enabled within current browser\r\n */\n\n\nfunction areCookiesEnabled() {\n if (!navigator || !navigator.cookieEnabled) {\n return false;\n }\n\n return true;\n}\n/**\r\n * Polyfill for `globalThis` object.\r\n * @returns the `globalThis` object for the given environment.\r\n */\n\n\nfunction getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n\n if (typeof window !== 'undefined') {\n return window;\n }\n\n if (typeof global !== 'undefined') {\n return global;\n }\n\n throw new Error('Unable to locate global object.');\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar ERROR_NAME = 'FirebaseError'; // Based on code from:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\n\nvar FirebaseError = function (_super) {\n __extends(FirebaseError, _super);\n\n function FirebaseError(code, message, customData) {\n var _this = _super.call(this, message) || this;\n\n _this.code = code;\n _this.customData = customData;\n _this.name = ERROR_NAME; // Fix For ES5\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n\n Object.setPrototypeOf(_this, FirebaseError.prototype); // Maintains proper stack trace for where our error was thrown.\n // Only available on V8.\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(_this, ErrorFactory.prototype.create);\n }\n\n return _this;\n }\n\n return FirebaseError;\n}(Error);\n\nvar ErrorFactory = function () {\n function ErrorFactory(service, serviceName, errors) {\n this.service = service;\n this.serviceName = serviceName;\n this.errors = errors;\n }\n\n ErrorFactory.prototype.create = function (code) {\n var data = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n data[_i - 1] = arguments[_i];\n }\n\n var customData = data[0] || {};\n var fullCode = this.service + \"/\" + code;\n var template = this.errors[code];\n var message = template ? replaceTemplate(template, customData) : 'Error'; // Service Name: Error message (service/code).\n\n var fullMessage = this.serviceName + \": \" + message + \" (\" + fullCode + \").\";\n var error = new FirebaseError(fullCode, fullMessage, customData);\n return error;\n };\n\n return ErrorFactory;\n}();\n\nfunction replaceTemplate(template, data) {\n return template.replace(PATTERN, function (_, key) {\n var value = data[key];\n return value != null ? String(value) : \"<\" + key + \"?>\";\n });\n}\n\nvar PATTERN = /\\{\\$([^}]+)}/g;\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Evaluates a JSON string into a javascript object.\r\n *\r\n * @param {string} str A string containing JSON.\r\n * @return {*} The javascript object representing the specified JSON.\r\n */\n\nfunction jsonEval(str) {\n return JSON.parse(str);\n}\n/**\r\n * Returns JSON representing a javascript object.\r\n * @param {*} data Javascript object to be stringified.\r\n * @return {string} The JSON contents of the object.\r\n */\n\n\nfunction stringify(data) {\n return JSON.stringify(data);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Decodes a Firebase auth. token into constituent parts.\r\n *\r\n * Notes:\r\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\n\n\nvar decode = function decode(token) {\n var header = {},\n claims = {},\n data = {},\n signature = '';\n\n try {\n var parts = token.split('.');\n header = jsonEval(base64Decode(parts[0]) || '');\n claims = jsonEval(base64Decode(parts[1]) || '');\n signature = parts[2];\n data = claims['d'] || {};\n delete claims['d'];\n } catch (e) {}\n\n return {\n header: header,\n claims: claims,\n data: data,\n signature: signature\n };\n};\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\r\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\n\n\nvar isValidTimestamp = function isValidTimestamp(token) {\n var claims = decode(token).claims;\n var now = Math.floor(new Date().getTime() / 1000);\n var validSince = 0,\n validUntil = 0;\n\n if (typeof claims === 'object') {\n if (claims.hasOwnProperty('nbf')) {\n validSince = claims['nbf'];\n } else if (claims.hasOwnProperty('iat')) {\n validSince = claims['iat'];\n }\n\n if (claims.hasOwnProperty('exp')) {\n validUntil = claims['exp'];\n } else {\n // token will expire after 24h by default\n validUntil = validSince + 86400;\n }\n }\n\n return !!now && !!validSince && !!validUntil && now >= validSince && now <= validUntil;\n};\n/**\r\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\r\n *\r\n * Notes:\r\n * - May return null if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\n\n\nvar issuedAtTime = function issuedAtTime(token) {\n var claims = decode(token).claims;\n\n if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\n return claims['iat'];\n }\n\n return null;\n};\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\n\n\nvar isValidFormat = function isValidFormat(token) {\n var decoded = decode(token),\n claims = decoded.claims;\n return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\n};\n/**\r\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\n\n\nvar isAdmin = function isAdmin(token) {\n var claims = decode(token).claims;\n return typeof claims === 'object' && claims['admin'] === true;\n};\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction contains(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nfunction safeGet(obj, key) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return obj[key];\n } else {\n return undefined;\n }\n}\n\nfunction isEmpty(obj) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction map(obj, fn, contextObj) {\n var res = {};\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n res[key] = fn.call(contextObj, obj[key], key, obj);\n }\n }\n\n return res;\n}\n/**\r\n * Deep equal two objects. Support Arrays and Objects.\r\n */\n\n\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n var aKeys = Object.keys(a);\n var bKeys = Object.keys(b);\n\n for (var _i = 0, aKeys_1 = aKeys; _i < aKeys_1.length; _i++) {\n var k = aKeys_1[_i];\n\n if (!bKeys.includes(k)) {\n return false;\n }\n\n var aProp = a[k];\n var bProp = b[k];\n\n if (isObject(aProp) && isObject(bProp)) {\n if (!deepEqual(aProp, bProp)) {\n return false;\n }\n } else if (aProp !== bProp) {\n return false;\n }\n }\n\n for (var _a = 0, bKeys_1 = bKeys; _a < bKeys_1.length; _a++) {\n var k = bKeys_1[_a];\n\n if (!aKeys.includes(k)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isObject(thing) {\n return thing !== null && typeof thing === 'object';\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\r\n * params object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n */\n\n\nfunction querystring(querystringParams) {\n var params = [];\n\n var _loop_1 = function _loop_1(key, value) {\n if (Array.isArray(value)) {\n value.forEach(function (arrayVal) {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\n });\n } else {\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n }\n };\n\n for (var _i = 0, _a = Object.entries(querystringParams); _i < _a.length; _i++) {\n var _b = _a[_i],\n key = _b[0],\n value = _b[1];\n\n _loop_1(key, value);\n }\n\n return params.length ? '&' + params.join('&') : '';\n}\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\r\n * (e.g. {arg: 'val', arg2: 'val2'})\r\n */\n\n\nfunction querystringDecode(querystring) {\n var obj = {};\n var tokens = querystring.replace(/^\\?/, '').split('&');\n tokens.forEach(function (token) {\n if (token) {\n var _a = token.split('='),\n key = _a[0],\n value = _a[1];\n\n obj[decodeURIComponent(key)] = decodeURIComponent(value);\n }\n });\n return obj;\n}\n/**\r\n * Extract the query string part of a URL, including the leading question mark (if present).\r\n */\n\n\nfunction extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n\n if (!queryStart) {\n return '';\n }\n\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @fileoverview SHA-1 cryptographic hash.\r\n * Variable names follow the notation in FIPS PUB 180-3:\r\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\r\n *\r\n * Usage:\r\n * var sha1 = new sha1();\r\n * sha1.update(bytes);\r\n * var hash = sha1.digest();\r\n *\r\n * Performance:\r\n * Chrome 23: ~400 Mbit/s\r\n * Firefox 16: ~250 Mbit/s\r\n *\r\n */\n\n/**\r\n * SHA-1 cryptographic hash constructor.\r\n *\r\n * The properties declared here are discussed in the above algorithm document.\r\n * @constructor\r\n * @final\r\n * @struct\r\n */\n\n\nvar Sha1 = function () {\n function Sha1() {\n /**\r\n * Holds the previous values of accumulated variables a-e in the compress_\r\n * function.\r\n * @private\r\n */\n this.chain_ = [];\n /**\r\n * A buffer holding the partially computed hash result.\r\n * @private\r\n */\n\n this.buf_ = [];\n /**\r\n * An array of 80 bytes, each a part of the message to be hashed. Referred to\r\n * as the message schedule in the docs.\r\n * @private\r\n */\n\n this.W_ = [];\n /**\r\n * Contains data needed to pad messages less than 64 bytes.\r\n * @private\r\n */\n\n this.pad_ = [];\n /**\r\n * @private {number}\r\n */\n\n this.inbuf_ = 0;\n /**\r\n * @private {number}\r\n */\n\n this.total_ = 0;\n this.blockSize = 512 / 8;\n this.pad_[0] = 128;\n\n for (var i = 1; i < this.blockSize; ++i) {\n this.pad_[i] = 0;\n }\n\n this.reset();\n }\n\n Sha1.prototype.reset = function () {\n this.chain_[0] = 0x67452301;\n this.chain_[1] = 0xefcdab89;\n this.chain_[2] = 0x98badcfe;\n this.chain_[3] = 0x10325476;\n this.chain_[4] = 0xc3d2e1f0;\n this.inbuf_ = 0;\n this.total_ = 0;\n };\n /**\r\n * Internal compress helper function.\r\n * @param buf Block to compress.\r\n * @param offset Offset of the block in the buffer.\r\n * @private\r\n */\n\n\n Sha1.prototype.compress_ = function (buf, offset) {\n if (!offset) {\n offset = 0;\n }\n\n var W = this.W_; // get 16 big endian words\n\n if (typeof buf === 'string') {\n for (var i = 0; i < 16; i++) {\n // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\n // have a bug that turns the post-increment ++ operator into pre-increment\n // during JIT compilation. We have code that depends heavily on SHA-1 for\n // correctness and which is affected by this bug, so I've removed all uses\n // of post-increment ++ in which the result value is used. We can revert\n // this change once the Safari bug\n // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\n // most clients have been updated.\n W[i] = buf.charCodeAt(offset) << 24 | buf.charCodeAt(offset + 1) << 16 | buf.charCodeAt(offset + 2) << 8 | buf.charCodeAt(offset + 3);\n offset += 4;\n }\n } else {\n for (var i = 0; i < 16; i++) {\n W[i] = buf[offset] << 24 | buf[offset + 1] << 16 | buf[offset + 2] << 8 | buf[offset + 3];\n offset += 4;\n }\n } // expand to 80 words\n\n\n for (var i = 16; i < 80; i++) {\n var t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n W[i] = (t << 1 | t >>> 31) & 0xffffffff;\n }\n\n var a = this.chain_[0];\n var b = this.chain_[1];\n var c = this.chain_[2];\n var d = this.chain_[3];\n var e = this.chain_[4];\n var f, k; // TODO(user): Try to unroll this loop to speed up the computation.\n\n for (var i = 0; i < 80; i++) {\n if (i < 40) {\n if (i < 20) {\n f = d ^ b & (c ^ d);\n k = 0x5a827999;\n } else {\n f = b ^ c ^ d;\n k = 0x6ed9eba1;\n }\n } else {\n if (i < 60) {\n f = b & c | d & (b | c);\n k = 0x8f1bbcdc;\n } else {\n f = b ^ c ^ d;\n k = 0xca62c1d6;\n }\n }\n\n var t = (a << 5 | a >>> 27) + f + e + k + W[i] & 0xffffffff;\n e = d;\n d = c;\n c = (b << 30 | b >>> 2) & 0xffffffff;\n b = a;\n a = t;\n }\n\n this.chain_[0] = this.chain_[0] + a & 0xffffffff;\n this.chain_[1] = this.chain_[1] + b & 0xffffffff;\n this.chain_[2] = this.chain_[2] + c & 0xffffffff;\n this.chain_[3] = this.chain_[3] + d & 0xffffffff;\n this.chain_[4] = this.chain_[4] + e & 0xffffffff;\n };\n\n Sha1.prototype.update = function (bytes, length) {\n // TODO(johnlenz): tighten the function signature and remove this check\n if (bytes == null) {\n return;\n }\n\n if (length === undefined) {\n length = bytes.length;\n }\n\n var lengthMinusBlock = length - this.blockSize;\n var n = 0; // Using local instead of member variables gives ~5% speedup on Firefox 16.\n\n var buf = this.buf_;\n var inbuf = this.inbuf_; // The outer while loop should execute at most twice.\n\n while (n < length) {\n // When we have no data in the block to top up, we can directly process the\n // input buffer (assuming it contains sufficient data). This gives ~25%\n // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\n // the data is provided in large chunks (or in multiples of 64 bytes).\n if (inbuf === 0) {\n while (n <= lengthMinusBlock) {\n this.compress_(bytes, n);\n n += this.blockSize;\n }\n }\n\n if (typeof bytes === 'string') {\n while (n < length) {\n buf[inbuf] = bytes.charCodeAt(n);\n ++inbuf;\n ++n;\n\n if (inbuf === this.blockSize) {\n this.compress_(buf);\n inbuf = 0; // Jump to the outer loop so we use the full-block optimization.\n\n break;\n }\n }\n } else {\n while (n < length) {\n buf[inbuf] = bytes[n];\n ++inbuf;\n ++n;\n\n if (inbuf === this.blockSize) {\n this.compress_(buf);\n inbuf = 0; // Jump to the outer loop so we use the full-block optimization.\n\n break;\n }\n }\n }\n }\n\n this.inbuf_ = inbuf;\n this.total_ += length;\n };\n /** @override */\n\n\n Sha1.prototype.digest = function () {\n var digest = [];\n var totalBits = this.total_ * 8; // Add pad 0x80 0x00*.\n\n if (this.inbuf_ < 56) {\n this.update(this.pad_, 56 - this.inbuf_);\n } else {\n this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\n } // Add # bits.\n\n\n for (var i = this.blockSize - 1; i >= 56; i--) {\n this.buf_[i] = totalBits & 255;\n totalBits /= 256; // Don't use bit-shifting here!\n }\n\n this.compress_(this.buf_);\n var n = 0;\n\n for (var i = 0; i < 5; i++) {\n for (var j = 24; j >= 0; j -= 8) {\n digest[n] = this.chain_[i] >> j & 255;\n ++n;\n }\n }\n\n return digest;\n };\n\n return Sha1;\n}();\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\n\n\nfunction createSubscribe(executor, onNoObservers) {\n var proxy = new ObserverProxy(executor, onNoObservers);\n return proxy.subscribe.bind(proxy);\n}\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\n\n\nvar ObserverProxy = function () {\n /**\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\n function ObserverProxy(executor, onNoObservers) {\n var _this = this;\n\n this.observers = [];\n this.unsubscribes = [];\n this.observerCount = 0; // Micro-task scheduling by calling task.then().\n\n this.task = Promise.resolve();\n this.finalized = false;\n this.onNoObservers = onNoObservers; // Call the executor asynchronously so subscribers that are called\n // synchronously after the creation of the subscribe function\n // can still receive the very first value generated in the executor.\n\n this.task.then(function () {\n executor(_this);\n }).catch(function (e) {\n _this.error(e);\n });\n }\n\n ObserverProxy.prototype.next = function (value) {\n this.forEachObserver(function (observer) {\n observer.next(value);\n });\n };\n\n ObserverProxy.prototype.error = function (error) {\n this.forEachObserver(function (observer) {\n observer.error(error);\n });\n this.close(error);\n };\n\n ObserverProxy.prototype.complete = function () {\n this.forEachObserver(function (observer) {\n observer.complete();\n });\n this.close();\n };\n /**\r\n * Subscribe function that can be used to add an Observer to the fan-out list.\r\n *\r\n * - We require that no event is sent to a subscriber sychronously to their\r\n * call to subscribe().\r\n */\n\n\n ObserverProxy.prototype.subscribe = function (nextOrObserver, error, complete) {\n var _this = this;\n\n var observer;\n\n if (nextOrObserver === undefined && error === undefined && complete === undefined) {\n throw new Error('Missing Observer.');\n } // Assemble an Observer object when passed as callback functions.\n\n\n if (implementsAnyMethods(nextOrObserver, ['next', 'error', 'complete'])) {\n observer = nextOrObserver;\n } else {\n observer = {\n next: nextOrObserver,\n error: error,\n complete: complete\n };\n }\n\n if (observer.next === undefined) {\n observer.next = noop;\n }\n\n if (observer.error === undefined) {\n observer.error = noop;\n }\n\n if (observer.complete === undefined) {\n observer.complete = noop;\n }\n\n var unsub = this.unsubscribeOne.bind(this, this.observers.length); // Attempt to subscribe to a terminated Observable - we\n // just respond to the Observer with the final error or complete\n // event.\n\n if (this.finalized) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.task.then(function () {\n try {\n if (_this.finalError) {\n observer.error(_this.finalError);\n } else {\n observer.complete();\n }\n } catch (e) {// nothing\n }\n\n return;\n });\n }\n\n this.observers.push(observer);\n return unsub;\n }; // Unsubscribe is synchronous - we guarantee that no events are sent to\n // any unsubscribed Observer.\n\n\n ObserverProxy.prototype.unsubscribeOne = function (i) {\n if (this.observers === undefined || this.observers[i] === undefined) {\n return;\n }\n\n delete this.observers[i];\n this.observerCount -= 1;\n\n if (this.observerCount === 0 && this.onNoObservers !== undefined) {\n this.onNoObservers(this);\n }\n };\n\n ObserverProxy.prototype.forEachObserver = function (fn) {\n if (this.finalized) {\n // Already closed by previous event....just eat the additional values.\n return;\n } // Since sendOne calls asynchronously - there is no chance that\n // this.observers will become undefined.\n\n\n for (var i = 0; i < this.observers.length; i++) {\n this.sendOne(i, fn);\n }\n }; // Call the Observer via one of it's callback function. We are careful to\n // confirm that the observe has not been unsubscribed since this asynchronous\n // function had been queued.\n\n\n ObserverProxy.prototype.sendOne = function (i, fn) {\n var _this = this; // Execute the callback asynchronously\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n this.task.then(function () {\n if (_this.observers !== undefined && _this.observers[i] !== undefined) {\n try {\n fn(_this.observers[i]);\n } catch (e) {\n // Ignore exceptions raised in Observers or missing methods of an\n // Observer.\n // Log error to console. b/31404806\n if (typeof console !== 'undefined' && console.error) {\n console.error(e);\n }\n }\n }\n });\n };\n\n ObserverProxy.prototype.close = function (err) {\n var _this = this;\n\n if (this.finalized) {\n return;\n }\n\n this.finalized = true;\n\n if (err !== undefined) {\n this.finalError = err;\n } // Proxy is no longer needed - garbage collect references\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n this.task.then(function () {\n _this.observers = undefined;\n _this.onNoObservers = undefined;\n });\n };\n\n return ObserverProxy;\n}();\n/** Turn synchronous function into one called asynchronously. */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n\nfunction async(fn, onError) {\n return function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n Promise.resolve(true).then(function () {\n fn.apply(void 0, args);\n }).catch(function (error) {\n if (onError) {\n onError(error);\n }\n });\n };\n}\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\n\n\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n\n for (var _i = 0, methods_1 = methods; _i < methods_1.length; _i++) {\n var method = methods_1[_i];\n\n if (method in obj && typeof obj[method] === 'function') {\n return true;\n }\n }\n\n return false;\n}\n\nfunction noop() {// do nothing\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Check to make sure the appropriate number of arguments are provided for a public function.\r\n * Throws an error if it fails.\r\n *\r\n * @param fnName The function name\r\n * @param minCount The minimum number of arguments to allow for the function call\r\n * @param maxCount The maximum number of argument to allow for the function call\r\n * @param argCount The actual number of arguments provided.\r\n */\n\n\nvar validateArgCount = function validateArgCount(fnName, minCount, maxCount, argCount) {\n var argError;\n\n if (argCount < minCount) {\n argError = 'at least ' + minCount;\n } else if (argCount > maxCount) {\n argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\n }\n\n if (argError) {\n var error = fnName + ' failed: Was called with ' + argCount + (argCount === 1 ? ' argument.' : ' arguments.') + ' Expects ' + argError + '.';\n throw new Error(error);\n }\n};\n/**\r\n * Generates a string to prefix an error message about failed argument validation\r\n *\r\n * @param fnName The function name\r\n * @param argName The name of the argument\r\n * @return The prefix to add to the error thrown for validation.\r\n */\n\n\nfunction errorPrefix(fnName, argName) {\n return fnName + \" failed: \" + argName + \" argument \";\n}\n/**\r\n * @param fnName\r\n * @param argumentNumber\r\n * @param namespace\r\n * @param optional\r\n */\n\n\nfunction validateNamespace(fnName, namespace, optional) {\n if (optional && !namespace) {\n return;\n }\n\n if (typeof namespace !== 'string') {\n //TODO: I should do more validation here. We only allow certain chars in namespaces.\n throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\n }\n}\n\nfunction validateCallback(fnName, argumentName, // eslint-disable-next-line @typescript-eslint/ban-types\ncallback, optional) {\n if (optional && !callback) {\n return;\n }\n\n if (typeof callback !== 'function') {\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\n }\n}\n\nfunction validateContextObject(fnName, argumentName, context, optional) {\n if (optional && !context) {\n return;\n }\n\n if (typeof context !== 'object' || context === null) {\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\n }\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\n// so it's been modified.\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\n// use 2 characters in Javascript. All 4-byte UTF-8 characters begin with a first\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\n// pair).\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\n\n/**\r\n * @param {string} str\r\n * @return {Array}\r\n */\n\n\nvar stringToByteArray = function stringToByteArray(str) {\n var out = [];\n var p = 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i); // Is this the lead surrogate in a surrogate pair?\n\n if (c >= 0xd800 && c <= 0xdbff) {\n var high = c - 0xd800; // the high 10 bits.\n\n i++;\n assert(i < str.length, 'Surrogate pair missing trail surrogate.');\n var low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\n\n c = 0x10000 + (high << 10) + low;\n }\n\n if (c < 128) {\n out[p++] = c;\n } else if (c < 2048) {\n out[p++] = c >> 6 | 192;\n out[p++] = c & 63 | 128;\n } else if (c < 65536) {\n out[p++] = c >> 12 | 224;\n out[p++] = c >> 6 & 63 | 128;\n out[p++] = c & 63 | 128;\n } else {\n out[p++] = c >> 18 | 240;\n out[p++] = c >> 12 & 63 | 128;\n out[p++] = c >> 6 & 63 | 128;\n out[p++] = c & 63 | 128;\n }\n }\n\n return out;\n};\n/**\r\n * Calculate length without actually converting; useful for doing cheaper validation.\r\n * @param {string} str\r\n * @return {number}\r\n */\n\n\nvar stringLength = function stringLength(str) {\n var p = 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n\n if (c < 128) {\n p++;\n } else if (c < 2048) {\n p += 2;\n } else if (c >= 0xd800 && c <= 0xdbff) {\n // Lead surrogate of a surrogate pair. The pair together will take 4 bytes to represent.\n p += 4;\n i++; // skip trail surrogate.\n } else {\n p += 3;\n }\n }\n\n return p;\n};\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * The amount of milliseconds to exponentially increase.\r\n */\n\n\nvar DEFAULT_INTERVAL_MILLIS = 1000;\n/**\r\n * The factor to backoff by.\r\n * Should be a number greater than 1.\r\n */\n\nvar DEFAULT_BACKOFF_FACTOR = 2;\n/**\r\n * The maximum milliseconds to increase to.\r\n *\r\n *

Visible for testing\r\n */\n\nvar MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\n\n/**\r\n * The percentage of backoff time to randomize by.\r\n * See\r\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\r\n * for context.\r\n *\r\n *

Visible for testing\r\n */\n\nvar RANDOM_FACTOR = 0.5;\n/**\r\n * Based on the backoff method from\r\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\r\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\r\n */\n\nfunction calculateBackoffMillis(backoffCount, intervalMillis, backoffFactor) {\n if (intervalMillis === void 0) {\n intervalMillis = DEFAULT_INTERVAL_MILLIS;\n }\n\n if (backoffFactor === void 0) {\n backoffFactor = DEFAULT_BACKOFF_FACTOR;\n } // Calculates an exponentially increasing value.\n // Deviation: calculates value from count and a constant interval, so we only need to save value\n // and count to restore state.\n\n\n var currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount); // A random \"fuzz\" to avoid waves of retries.\n // Deviation: randomFactor is required.\n\n var randomWait = Math.round( // A fraction of the backoff value to add/subtract.\n // Deviation: changes multiplication order to improve readability.\n RANDOM_FACTOR * currBaseValue * (Math.random() - 0.5) * 2); // Limits backoff to max to avoid effectively permanent backoff.\n\n return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Provide English ordinal letters after a number\r\n */\n\n\nfunction ordinal(i) {\n if (!Number.isFinite(i)) {\n return \"\" + i;\n }\n\n return i + indicator(i);\n}\n\nfunction indicator(i) {\n i = Math.abs(i);\n var cent = i % 100;\n\n if (cent >= 10 && cent <= 20) {\n return 'th';\n }\n\n var dec = i % 10;\n\n if (dec === 1) {\n return 'st';\n }\n\n if (dec === 2) {\n return 'nd';\n }\n\n if (dec === 3) {\n return 'rd';\n }\n\n return 'th';\n}\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction getModularInstance(service) {\n if (service && service._delegate) {\n return service._delegate;\n } else {\n return service;\n }\n}\n\nexport { CONSTANTS, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };","import \"core-js/modules/esnext.global-this.js\";\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar k,\n goog = goog || {},\n l = commonjsGlobal || self;\n\nfunction aa() {}\n\nfunction ba(a) {\n var b = typeof a;\n b = \"object\" != b ? b : a ? Array.isArray(a) ? \"array\" : b : \"null\";\n return \"array\" == b || \"object\" == b && \"number\" == typeof a.length;\n}\n\nfunction p(a) {\n var b = typeof a;\n return \"object\" == b && null != a || \"function\" == b;\n}\n\nfunction da(a) {\n return Object.prototype.hasOwnProperty.call(a, ea) && a[ea] || (a[ea] = ++fa);\n}\n\nvar ea = \"closure_uid_\" + (1E9 * Math.random() >>> 0),\n fa = 0;\n\nfunction ha(a, b, c) {\n return a.call.apply(a.bind, arguments);\n}\n\nfunction ia(a, b, c) {\n if (!a) throw Error();\n\n if (2 < arguments.length) {\n var d = Array.prototype.slice.call(arguments, 2);\n return function () {\n var e = Array.prototype.slice.call(arguments);\n Array.prototype.unshift.apply(e, d);\n return a.apply(b, e);\n };\n }\n\n return function () {\n return a.apply(b, arguments);\n };\n}\n\nfunction q(a, b, c) {\n Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf(\"native code\") ? q = ha : q = ia;\n return q.apply(null, arguments);\n}\n\nfunction ja(a, b) {\n var c = Array.prototype.slice.call(arguments, 1);\n return function () {\n var d = c.slice();\n d.push.apply(d, arguments);\n return a.apply(this, d);\n };\n}\n\nfunction t(a, b) {\n function c() {}\n\n c.prototype = b.prototype;\n a.Z = b.prototype;\n a.prototype = new c();\n a.prototype.constructor = a;\n\n a.Vb = function (d, e, f) {\n for (var h = Array(arguments.length - 2), n = 2; n < arguments.length; n++) {\n h[n - 2] = arguments[n];\n }\n\n return b.prototype[e].apply(d, h);\n };\n}\n\nfunction v() {\n this.s = this.s;\n this.o = this.o;\n}\n\nvar ka = 0,\n la = {};\nv.prototype.s = !1;\n\nv.prototype.na = function () {\n if (!this.s && (this.s = !0, this.M(), 0 != ka)) {\n var a = da(this);\n delete la[a];\n }\n};\n\nv.prototype.M = function () {\n if (this.o) for (; this.o.length;) {\n this.o.shift()();\n }\n};\n\nvar ma = Array.prototype.indexOf ? function (a, b) {\n return Array.prototype.indexOf.call(a, b, void 0);\n} : function (a, b) {\n if (\"string\" === typeof a) return \"string\" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, 0);\n\n for (var c = 0; c < a.length; c++) {\n if (c in a && a[c] === b) return c;\n }\n\n return -1;\n},\n na = Array.prototype.forEach ? function (a, b, c) {\n Array.prototype.forEach.call(a, b, c);\n} : function (a, b, c) {\n var d = a.length,\n e = \"string\" === typeof a ? a.split(\"\") : a;\n\n for (var f = 0; f < d; f++) {\n f in e && b.call(c, e[f], f, a);\n }\n};\n\nfunction oa(a) {\n a: {\n var b = pa;\n var c = a.length,\n d = \"string\" === typeof a ? a.split(\"\") : a;\n\n for (var e = 0; e < c; e++) {\n if (e in d && b.call(void 0, d[e], e, a)) {\n b = e;\n break a;\n }\n }\n\n b = -1;\n }\n\n return 0 > b ? null : \"string\" === typeof a ? a.charAt(b) : a[b];\n}\n\nfunction qa(a) {\n return Array.prototype.concat.apply([], arguments);\n}\n\nfunction ra(a) {\n var b = a.length;\n\n if (0 < b) {\n var c = Array(b);\n\n for (var d = 0; d < b; d++) {\n c[d] = a[d];\n }\n\n return c;\n }\n\n return [];\n}\n\nfunction sa(a) {\n return /^[\\s\\xa0]*$/.test(a);\n}\n\nvar ta = String.prototype.trim ? function (a) {\n return a.trim();\n} : function (a) {\n return /^[\\s\\xa0]*([\\s\\S]*?)[\\s\\xa0]*$/.exec(a)[1];\n};\n\nfunction w(a, b) {\n return -1 != a.indexOf(b);\n}\n\nfunction ua(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nvar x;\n\na: {\n var va = l.navigator;\n\n if (va) {\n var wa = va.userAgent;\n\n if (wa) {\n x = wa;\n break a;\n }\n }\n\n x = \"\";\n}\n\nfunction xa(a, b, c) {\n for (var d in a) {\n b.call(c, a[d], d, a);\n }\n}\n\nfunction ya(a) {\n var b = {};\n\n for (var c in a) {\n b[c] = a[c];\n }\n\n return b;\n}\n\nvar za = \"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");\n\nfunction Aa(a, b) {\n var c, d;\n\n for (var e = 1; e < arguments.length; e++) {\n d = arguments[e];\n\n for (c in d) {\n a[c] = d[c];\n }\n\n for (var f = 0; f < za.length; f++) {\n c = za[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);\n }\n }\n}\n\nfunction Ca(a) {\n Ca[\" \"](a);\n return a;\n}\n\nCa[\" \"] = aa;\n\nfunction Fa(a) {\n var b = Ga;\n return Object.prototype.hasOwnProperty.call(b, 9) ? b[9] : b[9] = a(9);\n}\n\nvar Ha = w(x, \"Opera\"),\n y = w(x, \"Trident\") || w(x, \"MSIE\"),\n Ia = w(x, \"Edge\"),\n Ja = Ia || y,\n Ka = w(x, \"Gecko\") && !(w(x.toLowerCase(), \"webkit\") && !w(x, \"Edge\")) && !(w(x, \"Trident\") || w(x, \"MSIE\")) && !w(x, \"Edge\"),\n La = w(x.toLowerCase(), \"webkit\") && !w(x, \"Edge\");\n\nfunction Ma() {\n var a = l.document;\n return a ? a.documentMode : void 0;\n}\n\nvar Na;\n\na: {\n var Oa = \"\",\n Pa = function () {\n var a = x;\n if (Ka) return /rv:([^\\);]+)(\\)|;)/.exec(a);\n if (Ia) return /Edge\\/([\\d\\.]+)/.exec(a);\n if (y) return /\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(a);\n if (La) return /WebKit\\/(\\S+)/.exec(a);\n if (Ha) return /(?:Version)[ \\/]?(\\S+)/.exec(a);\n }();\n\n Pa && (Oa = Pa ? Pa[1] : \"\");\n\n if (y) {\n var Qa = Ma();\n\n if (null != Qa && Qa > parseFloat(Oa)) {\n Na = String(Qa);\n break a;\n }\n }\n\n Na = Oa;\n}\n\nvar Ga = {};\n\nfunction Ra() {\n return Fa(function () {\n var a = 0;\n var b = ta(String(Na)).split(\".\"),\n c = ta(\"9\").split(\".\"),\n d = Math.max(b.length, c.length);\n\n for (var h = 0; 0 == a && h < d; h++) {\n var e = b[h] || \"\",\n f = c[h] || \"\";\n\n do {\n e = /(\\d*)(\\D*)(.*)/.exec(e) || [\"\", \"\", \"\", \"\"];\n f = /(\\d*)(\\D*)(.*)/.exec(f) || [\"\", \"\", \"\", \"\"];\n if (0 == e[0].length && 0 == f[0].length) break;\n a = ua(0 == e[1].length ? 0 : parseInt(e[1], 10), 0 == f[1].length ? 0 : parseInt(f[1], 10)) || ua(0 == e[2].length, 0 == f[2].length) || ua(e[2], f[2]);\n e = e[3];\n f = f[3];\n } while (0 == a);\n }\n\n return 0 <= a;\n });\n}\n\nvar Sa;\n\nif (l.document && y) {\n var Ta = Ma();\n Sa = Ta ? Ta : parseInt(Na, 10) || void 0;\n} else Sa = void 0;\n\nvar Ua = Sa;\n\nvar Va = function () {\n if (!l.addEventListener || !Object.defineProperty) return !1;\n var a = !1,\n b = Object.defineProperty({}, \"passive\", {\n get: function get() {\n a = !0;\n }\n });\n\n try {\n l.addEventListener(\"test\", aa, b), l.removeEventListener(\"test\", aa, b);\n } catch (c) {}\n\n return a;\n}();\n\nfunction z(a, b) {\n this.type = a;\n this.g = this.target = b;\n this.defaultPrevented = !1;\n}\n\nz.prototype.h = function () {\n this.defaultPrevented = !0;\n};\n\nfunction A(a, b) {\n z.call(this, a ? a.type : \"\");\n this.relatedTarget = this.g = this.target = null;\n this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0;\n this.key = \"\";\n this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;\n this.state = null;\n this.pointerId = 0;\n this.pointerType = \"\";\n this.i = null;\n\n if (a) {\n var c = this.type = a.type,\n d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;\n this.target = a.target || a.srcElement;\n this.g = b;\n\n if (b = a.relatedTarget) {\n if (Ka) {\n a: {\n try {\n Ca(b.nodeName);\n var e = !0;\n break a;\n } catch (f) {}\n\n e = !1;\n }\n\n e || (b = null);\n }\n } else \"mouseover\" == c ? b = a.fromElement : \"mouseout\" == c && (b = a.toElement);\n\n this.relatedTarget = b;\n d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0) : (this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY, this.screenX = a.screenX || 0, this.screenY = a.screenY || 0);\n this.button = a.button;\n this.key = a.key || \"\";\n this.ctrlKey = a.ctrlKey;\n this.altKey = a.altKey;\n this.shiftKey = a.shiftKey;\n this.metaKey = a.metaKey;\n this.pointerId = a.pointerId || 0;\n this.pointerType = \"string\" === typeof a.pointerType ? a.pointerType : Wa[a.pointerType] || \"\";\n this.state = a.state;\n this.i = a;\n a.defaultPrevented && A.Z.h.call(this);\n }\n}\n\nt(A, z);\nvar Wa = {\n 2: \"touch\",\n 3: \"pen\",\n 4: \"mouse\"\n};\n\nA.prototype.h = function () {\n A.Z.h.call(this);\n var a = this.i;\n a.preventDefault ? a.preventDefault() : a.returnValue = !1;\n};\n\nvar B = \"closure_listenable_\" + (1E6 * Math.random() | 0);\nvar Xa = 0;\n\nfunction Ya(a, b, c, d, e) {\n this.listener = a;\n this.proxy = null;\n this.src = b;\n this.type = c;\n this.capture = !!d;\n this.ia = e;\n this.key = ++Xa;\n this.ca = this.fa = !1;\n}\n\nfunction Za(a) {\n a.ca = !0;\n a.listener = null;\n a.proxy = null;\n a.src = null;\n a.ia = null;\n}\n\nfunction $a(a) {\n this.src = a;\n this.g = {};\n this.h = 0;\n}\n\n$a.prototype.add = function (a, b, c, d, e) {\n var f = a.toString();\n a = this.g[f];\n a || (a = this.g[f] = [], this.h++);\n var h = ab(a, b, d, e);\n -1 < h ? (b = a[h], c || (b.fa = !1)) : (b = new Ya(b, this.src, f, !!d, e), b.fa = c, a.push(b));\n return b;\n};\n\nfunction bb(a, b) {\n var c = b.type;\n\n if (c in a.g) {\n var d = a.g[c],\n e = ma(d, b),\n f;\n (f = 0 <= e) && Array.prototype.splice.call(d, e, 1);\n f && (Za(b), 0 == a.g[c].length && (delete a.g[c], a.h--));\n }\n}\n\nfunction ab(a, b, c, d) {\n for (var e = 0; e < a.length; ++e) {\n var f = a[e];\n if (!f.ca && f.listener == b && f.capture == !!c && f.ia == d) return e;\n }\n\n return -1;\n}\n\nvar cb = \"closure_lm_\" + (1E6 * Math.random() | 0),\n db = {};\n\nfunction fb(a, b, c, d, e) {\n if (d && d.once) return gb(a, b, c, d, e);\n\n if (Array.isArray(b)) {\n for (var f = 0; f < b.length; f++) {\n fb(a, b[f], c, d, e);\n }\n\n return null;\n }\n\n c = hb(c);\n return a && a[B] ? a.N(b, c, p(d) ? !!d.capture : !!d, e) : ib(a, b, c, !1, d, e);\n}\n\nfunction ib(a, b, c, d, e, f) {\n if (!b) throw Error(\"Invalid event type\");\n var h = p(e) ? !!e.capture : !!e,\n n = jb(a);\n n || (a[cb] = n = new $a(a));\n c = n.add(b, c, d, h, f);\n if (c.proxy) return c;\n d = kb();\n c.proxy = d;\n d.src = a;\n d.listener = c;\n if (a.addEventListener) Va || (e = h), void 0 === e && (e = !1), a.addEventListener(b.toString(), d, e);else if (a.attachEvent) a.attachEvent(lb(b.toString()), d);else if (a.addListener && a.removeListener) a.addListener(d);else throw Error(\"addEventListener and attachEvent are unavailable.\");\n return c;\n}\n\nfunction kb() {\n function a(c) {\n return b.call(a.src, a.listener, c);\n }\n\n var b = mb;\n return a;\n}\n\nfunction gb(a, b, c, d, e) {\n if (Array.isArray(b)) {\n for (var f = 0; f < b.length; f++) {\n gb(a, b[f], c, d, e);\n }\n\n return null;\n }\n\n c = hb(c);\n return a && a[B] ? a.O(b, c, p(d) ? !!d.capture : !!d, e) : ib(a, b, c, !0, d, e);\n}\n\nfunction nb(a, b, c, d, e) {\n if (Array.isArray(b)) for (var f = 0; f < b.length; f++) {\n nb(a, b[f], c, d, e);\n } else (d = p(d) ? !!d.capture : !!d, c = hb(c), a && a[B]) ? (a = a.i, b = String(b).toString(), b in a.g && (f = a.g[b], c = ab(f, c, d, e), -1 < c && (Za(f[c]), Array.prototype.splice.call(f, c, 1), 0 == f.length && (delete a.g[b], a.h--)))) : a && (a = jb(a)) && (b = a.g[b.toString()], a = -1, b && (a = ab(b, c, d, e)), (c = -1 < a ? b[a] : null) && ob(c));\n}\n\nfunction ob(a) {\n if (\"number\" !== typeof a && a && !a.ca) {\n var b = a.src;\n if (b && b[B]) bb(b.i, a);else {\n var c = a.type,\n d = a.proxy;\n b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent ? b.detachEvent(lb(c), d) : b.addListener && b.removeListener && b.removeListener(d);\n (c = jb(b)) ? (bb(c, a), 0 == c.h && (c.src = null, b[cb] = null)) : Za(a);\n }\n }\n}\n\nfunction lb(a) {\n return a in db ? db[a] : db[a] = \"on\" + a;\n}\n\nfunction mb(a, b) {\n if (a.ca) a = !0;else {\n b = new A(b, this);\n var c = a.listener,\n d = a.ia || a.src;\n a.fa && ob(a);\n a = c.call(d, b);\n }\n return a;\n}\n\nfunction jb(a) {\n a = a[cb];\n return a instanceof $a ? a : null;\n}\n\nvar pb = \"__closure_events_fn_\" + (1E9 * Math.random() >>> 0);\n\nfunction hb(a) {\n if (\"function\" === typeof a) return a;\n a[pb] || (a[pb] = function (b) {\n return a.handleEvent(b);\n });\n return a[pb];\n}\n\nfunction C() {\n v.call(this);\n this.i = new $a(this);\n this.P = this;\n this.I = null;\n}\n\nt(C, v);\nC.prototype[B] = !0;\n\nC.prototype.removeEventListener = function (a, b, c, d) {\n nb(this, a, b, c, d);\n};\n\nfunction D(a, b) {\n var c,\n d = a.I;\n if (d) for (c = []; d; d = d.I) {\n c.push(d);\n }\n a = a.P;\n d = b.type || b;\n if (\"string\" === typeof b) b = new z(b, a);else if (b instanceof z) b.target = b.target || a;else {\n var e = b;\n b = new z(d, a);\n Aa(b, e);\n }\n e = !0;\n if (c) for (var f = c.length - 1; 0 <= f; f--) {\n var h = b.g = c[f];\n e = qb(h, d, !0, b) && e;\n }\n h = b.g = a;\n e = qb(h, d, !0, b) && e;\n e = qb(h, d, !1, b) && e;\n if (c) for (f = 0; f < c.length; f++) {\n h = b.g = c[f], e = qb(h, d, !1, b) && e;\n }\n}\n\nC.prototype.M = function () {\n C.Z.M.call(this);\n\n if (this.i) {\n var a = this.i,\n c;\n\n for (c in a.g) {\n for (var d = a.g[c], e = 0; e < d.length; e++) {\n Za(d[e]);\n }\n\n delete a.g[c];\n a.h--;\n }\n }\n\n this.I = null;\n};\n\nC.prototype.N = function (a, b, c, d) {\n return this.i.add(String(a), b, !1, c, d);\n};\n\nC.prototype.O = function (a, b, c, d) {\n return this.i.add(String(a), b, !0, c, d);\n};\n\nfunction qb(a, b, c, d) {\n b = a.i.g[String(b)];\n if (!b) return !0;\n b = b.concat();\n\n for (var e = !0, f = 0; f < b.length; ++f) {\n var h = b[f];\n\n if (h && !h.ca && h.capture == c) {\n var n = h.listener,\n u = h.ia || h.src;\n h.fa && bb(a.i, h);\n e = !1 !== n.call(u, d) && e;\n }\n }\n\n return e && !d.defaultPrevented;\n}\n\nvar rb = l.JSON.stringify;\n\nfunction sb() {\n var a = tb;\n var b = null;\n a.g && (b = a.g, a.g = a.g.next, a.g || (a.h = null), b.next = null);\n return b;\n}\n\nvar ub = function () {\n function ub() {\n this.h = this.g = null;\n }\n\n ub.prototype.add = function (a, b) {\n var c = vb.get();\n c.set(a, b);\n this.h ? this.h.next = c : this.g = c;\n this.h = c;\n };\n\n return ub;\n}();\n\nvar vb = new (function () {\n function class_2(a, b) {\n this.i = a;\n this.j = b;\n this.h = 0;\n this.g = null;\n }\n\n class_2.prototype.get = function () {\n var a;\n 0 < this.h ? (this.h--, a = this.g, this.g = a.next, a.next = null) : a = this.i();\n return a;\n };\n\n return class_2;\n}())(function () {\n return new wb();\n}, function (a) {\n return a.reset();\n});\n\nvar wb = function () {\n function wb() {\n this.next = this.g = this.h = null;\n }\n\n wb.prototype.set = function (a, b) {\n this.h = a;\n this.g = b;\n this.next = null;\n };\n\n wb.prototype.reset = function () {\n this.next = this.g = this.h = null;\n };\n\n return wb;\n}();\n\nfunction yb(a) {\n l.setTimeout(function () {\n throw a;\n }, 0);\n}\n\nfunction zb(a, b) {\n Ab || Bb();\n Cb || (Ab(), Cb = !0);\n tb.add(a, b);\n}\n\nvar Ab;\n\nfunction Bb() {\n var a = l.Promise.resolve(void 0);\n\n Ab = function Ab() {\n a.then(Db);\n };\n}\n\nvar Cb = !1,\n tb = new ub();\n\nfunction Db() {\n for (var a; a = sb();) {\n try {\n a.h.call(a.g);\n } catch (c) {\n yb(c);\n }\n\n var b = vb;\n b.j(a);\n 100 > b.h && (b.h++, a.next = b.g, b.g = a);\n }\n\n Cb = !1;\n}\n\nfunction Eb(a, b) {\n C.call(this);\n this.h = a || 1;\n this.g = b || l;\n this.j = q(this.kb, this);\n this.l = Date.now();\n}\n\nt(Eb, C);\nk = Eb.prototype;\nk.da = !1;\nk.S = null;\n\nk.kb = function () {\n if (this.da) {\n var a = Date.now() - this.l;\n 0 < a && a < .8 * this.h ? this.S = this.g.setTimeout(this.j, this.h - a) : (this.S && (this.g.clearTimeout(this.S), this.S = null), D(this, \"tick\"), this.da && (Fb(this), this.start()));\n }\n};\n\nk.start = function () {\n this.da = !0;\n this.S || (this.S = this.g.setTimeout(this.j, this.h), this.l = Date.now());\n};\n\nfunction Fb(a) {\n a.da = !1;\n a.S && (a.g.clearTimeout(a.S), a.S = null);\n}\n\nk.M = function () {\n Eb.Z.M.call(this);\n Fb(this);\n delete this.g;\n};\n\nfunction Gb(a, b, c) {\n if (\"function\" === typeof a) c && (a = q(a, c));else if (a && \"function\" == typeof a.handleEvent) a = q(a.handleEvent, a);else throw Error(\"Invalid listener argument\");\n return 2147483647 < Number(b) ? -1 : l.setTimeout(a, b || 0);\n}\n\nfunction Hb(a) {\n a.g = Gb(function () {\n a.g = null;\n a.i && (a.i = !1, Hb(a));\n }, a.j);\n var b = a.h;\n a.h = null;\n a.m.apply(null, b);\n}\n\nvar Ib = function (_super) {\n __extends(Ib, _super);\n\n function Ib(a, b) {\n var _this = _super.call(this) || this;\n\n _this.m = a;\n _this.j = b;\n _this.h = null;\n _this.i = !1;\n _this.g = null;\n return _this;\n }\n\n Ib.prototype.l = function (a) {\n this.h = arguments;\n this.g ? this.i = !0 : Hb(this);\n };\n\n Ib.prototype.M = function () {\n _super.prototype.M.call(this);\n\n this.g && (l.clearTimeout(this.g), this.g = null, this.i = !1, this.h = null);\n };\n\n return Ib;\n}(v);\n\nfunction E(a) {\n v.call(this);\n this.h = a;\n this.g = {};\n}\n\nt(E, v);\nvar Jb = [];\n\nfunction Kb(a, b, c, d) {\n Array.isArray(c) || (c && (Jb[0] = c.toString()), c = Jb);\n\n for (var e = 0; e < c.length; e++) {\n var f = fb(b, c[e], d || a.handleEvent, !1, a.h || a);\n if (!f) break;\n a.g[f.key] = f;\n }\n}\n\nfunction Lb(a) {\n xa(a.g, function (b, c) {\n this.g.hasOwnProperty(c) && ob(b);\n }, a);\n a.g = {};\n}\n\nE.prototype.M = function () {\n E.Z.M.call(this);\n Lb(this);\n};\n\nE.prototype.handleEvent = function () {\n throw Error(\"EventHandler.handleEvent not implemented\");\n};\n\nfunction Mb() {\n this.g = !0;\n}\n\nMb.prototype.Aa = function () {\n this.g = !1;\n};\n\nfunction Nb(a, b, c, d, e, f) {\n a.info(function () {\n if (a.g) {\n if (f) {\n var h = \"\";\n\n for (var n = f.split(\"&\"), u = 0; u < n.length; u++) {\n var m = n[u].split(\"=\");\n\n if (1 < m.length) {\n var r = m[0];\n m = m[1];\n var G = r.split(\"_\");\n h = 2 <= G.length && \"type\" == G[1] ? h + (r + \"=\" + m + \"&\") : h + (r + \"=redacted&\");\n }\n }\n } else h = null;\n } else h = f;\n return \"XMLHTTP REQ (\" + d + \") [attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + h;\n });\n}\n\nfunction Ob(a, b, c, d, e, f, h) {\n a.info(function () {\n return \"XMLHTTP RESP (\" + d + \") [ attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + f + \" \" + h;\n });\n}\n\nfunction F(a, b, c, d) {\n a.info(function () {\n return \"XMLHTTP TEXT (\" + b + \"): \" + Pb(a, c) + (d ? \" \" + d : \"\");\n });\n}\n\nfunction Qb(a, b) {\n a.info(function () {\n return \"TIMEOUT: \" + b;\n });\n}\n\nMb.prototype.info = function () {};\n\nfunction Pb(a, b) {\n if (!a.g) return b;\n if (!b) return null;\n\n try {\n var c = JSON.parse(b);\n if (c) for (a = 0; a < c.length; a++) {\n if (Array.isArray(c[a])) {\n var d = c[a];\n\n if (!(2 > d.length)) {\n var e = d[1];\n\n if (Array.isArray(e) && !(1 > e.length)) {\n var f = e[0];\n if (\"noop\" != f && \"stop\" != f && \"close\" != f) for (var h = 1; h < e.length; h++) {\n e[h] = \"\";\n }\n }\n }\n }\n }\n return rb(c);\n } catch (n) {\n return b;\n }\n}\n\nvar H = {},\n Rb = null;\n\nfunction Sb() {\n return Rb = Rb || new C();\n}\n\nH.Ma = \"serverreachability\";\n\nfunction Tb(a) {\n z.call(this, H.Ma, a);\n}\n\nt(Tb, z);\n\nfunction I(a) {\n var b = Sb();\n D(b, new Tb(b, a));\n}\n\nH.STAT_EVENT = \"statevent\";\n\nfunction Ub(a, b) {\n z.call(this, H.STAT_EVENT, a);\n this.stat = b;\n}\n\nt(Ub, z);\n\nfunction J(a) {\n var b = Sb();\n D(b, new Ub(b, a));\n}\n\nH.Na = \"timingevent\";\n\nfunction Vb(a, b) {\n z.call(this, H.Na, a);\n this.size = b;\n}\n\nt(Vb, z);\n\nfunction K(a, b) {\n if (\"function\" !== typeof a) throw Error(\"Fn must not be null and must be a function\");\n return l.setTimeout(function () {\n a();\n }, b);\n}\n\nvar Wb = {\n NO_ERROR: 0,\n lb: 1,\n yb: 2,\n xb: 3,\n sb: 4,\n wb: 5,\n zb: 6,\n Ja: 7,\n TIMEOUT: 8,\n Cb: 9\n};\nvar Xb = {\n qb: \"complete\",\n Mb: \"success\",\n Ka: \"error\",\n Ja: \"abort\",\n Eb: \"ready\",\n Fb: \"readystatechange\",\n TIMEOUT: \"timeout\",\n Ab: \"incrementaldata\",\n Db: \"progress\",\n tb: \"downloadprogress\",\n Ub: \"uploadprogress\"\n};\n\nfunction Yb() {}\n\nYb.prototype.h = null;\n\nfunction Zb(a) {\n return a.h || (a.h = a.i());\n}\n\nfunction $b() {}\n\nvar L = {\n OPEN: \"a\",\n pb: \"b\",\n Ka: \"c\",\n Bb: \"d\"\n};\n\nfunction ac() {\n z.call(this, \"d\");\n}\n\nt(ac, z);\n\nfunction bc() {\n z.call(this, \"c\");\n}\n\nt(bc, z);\nvar cc;\n\nfunction dc() {}\n\nt(dc, Yb);\n\ndc.prototype.g = function () {\n return new XMLHttpRequest();\n};\n\ndc.prototype.i = function () {\n return {};\n};\n\ncc = new dc();\n\nfunction M(a, b, c, d) {\n this.l = a;\n this.j = b;\n this.m = c;\n this.X = d || 1;\n this.V = new E(this);\n this.P = ec;\n a = Ja ? 125 : void 0;\n this.W = new Eb(a);\n this.H = null;\n this.i = !1;\n this.s = this.A = this.v = this.K = this.F = this.Y = this.B = null;\n this.D = [];\n this.g = null;\n this.C = 0;\n this.o = this.u = null;\n this.N = -1;\n this.I = !1;\n this.O = 0;\n this.L = null;\n this.aa = this.J = this.$ = this.U = !1;\n this.h = new fc();\n}\n\nfunction fc() {\n this.i = null;\n this.g = \"\";\n this.h = !1;\n}\n\nvar ec = 45E3,\n gc = {},\n hc = {};\nk = M.prototype;\n\nk.setTimeout = function (a) {\n this.P = a;\n};\n\nfunction ic(a, b, c) {\n a.K = 1;\n a.v = jc(N(b));\n a.s = c;\n a.U = !0;\n kc(a, null);\n}\n\nfunction kc(a, b) {\n a.F = Date.now();\n lc(a);\n a.A = N(a.v);\n var c = a.A,\n d = a.X;\n Array.isArray(d) || (d = [String(d)]);\n mc(c.h, \"t\", d);\n a.C = 0;\n c = a.l.H;\n a.h = new fc();\n a.g = nc(a.l, c ? b : null, !a.s);\n 0 < a.O && (a.L = new Ib(q(a.Ia, a, a.g), a.O));\n Kb(a.V, a.g, \"readystatechange\", a.gb);\n b = a.H ? ya(a.H) : {};\n a.s ? (a.u || (a.u = \"POST\"), b[\"Content-Type\"] = \"application/x-www-form-urlencoded\", a.g.ea(a.A, a.u, a.s, b)) : (a.u = \"GET\", a.g.ea(a.A, a.u, null, b));\n I(1);\n Nb(a.j, a.u, a.A, a.m, a.X, a.s);\n}\n\nk.gb = function (a) {\n a = a.target;\n var b = this.L;\n b && 3 == O(a) ? b.l() : this.Ia(a);\n};\n\nk.Ia = function (a) {\n try {\n if (a == this.g) a: {\n var r = O(this.g);\n var b = this.g.Da();\n var G = this.g.ba();\n\n if (!(3 > r) && (3 != r || Ja || this.g && (this.h.h || this.g.ga() || oc(this.g)))) {\n this.I || 4 != r || 7 == b || (8 == b || 0 >= G ? I(3) : I(2));\n pc(this);\n var c = this.g.ba();\n this.N = c;\n\n b: if (qc(this)) {\n var d = oc(this.g);\n a = \"\";\n var e = d.length,\n f = 4 == O(this.g);\n\n if (!this.h.i) {\n if (\"undefined\" === typeof TextDecoder) {\n P(this);\n rc(this);\n var h = \"\";\n break b;\n }\n\n this.h.i = new l.TextDecoder();\n }\n\n for (b = 0; b < e; b++) {\n this.h.h = !0, a += this.h.i.decode(d[b], {\n stream: f && b == e - 1\n });\n }\n\n d.splice(0, e);\n this.h.g += a;\n this.C = 0;\n h = this.h.g;\n } else h = this.g.ga();\n\n this.i = 200 == c;\n Ob(this.j, this.u, this.A, this.m, this.X, r, c);\n\n if (this.i) {\n if (this.$ && !this.J) {\n b: {\n if (this.g) {\n var n,\n u = this.g;\n\n if ((n = u.g ? u.g.getResponseHeader(\"X-HTTP-Initial-Response\") : null) && !sa(n)) {\n var m = n;\n break b;\n }\n }\n\n m = null;\n }\n\n if (c = m) F(this.j, this.m, c, \"Initial handshake response via X-HTTP-Initial-Response\"), this.J = !0, sc(this, c);else {\n this.i = !1;\n this.o = 3;\n J(12);\n P(this);\n rc(this);\n break a;\n }\n }\n\n this.U ? (tc(this, r, h), Ja && this.i && 3 == r && (Kb(this.V, this.W, \"tick\", this.fb), this.W.start())) : (F(this.j, this.m, h, null), sc(this, h));\n 4 == r && P(this);\n this.i && !this.I && (4 == r ? uc(this.l, this) : (this.i = !1, lc(this)));\n } else 400 == c && 0 < h.indexOf(\"Unknown SID\") ? (this.o = 3, J(12)) : (this.o = 0, J(13)), P(this), rc(this);\n }\n }\n } catch (r) {} finally {}\n};\n\nfunction qc(a) {\n return a.g ? \"GET\" == a.u && 2 != a.K && a.l.Ba : !1;\n}\n\nfunction tc(a, b, c) {\n var d = !0,\n e;\n\n for (; !a.I && a.C < c.length;) {\n if (e = vc(a, c), e == hc) {\n 4 == b && (a.o = 4, J(14), d = !1);\n F(a.j, a.m, null, \"[Incomplete Response]\");\n break;\n } else if (e == gc) {\n a.o = 4;\n J(15);\n F(a.j, a.m, c, \"[Invalid Chunk]\");\n d = !1;\n break;\n } else F(a.j, a.m, e, null), sc(a, e);\n }\n\n qc(a) && e != hc && e != gc && (a.h.g = \"\", a.C = 0);\n 4 != b || 0 != c.length || a.h.h || (a.o = 1, J(16), d = !1);\n a.i = a.i && d;\n d ? 0 < c.length && !a.aa && (a.aa = !0, b = a.l, b.g == a && b.$ && !b.L && (b.h.info(\"Great, no buffering proxy detected. Bytes received: \" + c.length), wc(b), b.L = !0, J(11))) : (F(a.j, a.m, c, \"[Invalid Chunked Response]\"), P(a), rc(a));\n}\n\nk.fb = function () {\n if (this.g) {\n var a = O(this.g),\n b = this.g.ga();\n this.C < b.length && (pc(this), tc(this, a, b), this.i && 4 != a && lc(this));\n }\n};\n\nfunction vc(a, b) {\n var c = a.C,\n d = b.indexOf(\"\\n\", c);\n if (-1 == d) return hc;\n c = Number(b.substring(c, d));\n if (isNaN(c)) return gc;\n d += 1;\n if (d + c > b.length) return hc;\n b = b.substr(d, c);\n a.C = d + c;\n return b;\n}\n\nk.cancel = function () {\n this.I = !0;\n P(this);\n};\n\nfunction lc(a) {\n a.Y = Date.now() + a.P;\n xc(a, a.P);\n}\n\nfunction xc(a, b) {\n if (null != a.B) throw Error(\"WatchDog timer not null\");\n a.B = K(q(a.eb, a), b);\n}\n\nfunction pc(a) {\n a.B && (l.clearTimeout(a.B), a.B = null);\n}\n\nk.eb = function () {\n this.B = null;\n var a = Date.now();\n 0 <= a - this.Y ? (Qb(this.j, this.A), 2 != this.K && (I(3), J(17)), P(this), this.o = 2, rc(this)) : xc(this, this.Y - a);\n};\n\nfunction rc(a) {\n 0 == a.l.G || a.I || uc(a.l, a);\n}\n\nfunction P(a) {\n pc(a);\n var b = a.L;\n b && \"function\" == typeof b.na && b.na();\n a.L = null;\n Fb(a.W);\n Lb(a.V);\n a.g && (b = a.g, a.g = null, b.abort(), b.na());\n}\n\nfunction sc(a, b) {\n try {\n var c = a.l;\n if (0 != c.G && (c.g == a || yc(c.i, a))) if (c.I = a.N, !a.J && yc(c.i, a) && 3 == c.G) {\n try {\n var d = c.Ca.g.parse(b);\n } catch (m) {\n d = null;\n }\n\n if (Array.isArray(d) && 3 == d.length) {\n var e = d;\n if (0 == e[0]) a: {\n if (!c.u) {\n if (c.g) if (c.g.F + 3E3 < a.F) zc(c), Ac(c);else break a;\n Bc(c);\n J(18);\n }\n } else c.ta = e[1], 0 < c.ta - c.U && 37500 > e[2] && c.N && 0 == c.A && !c.v && (c.v = K(q(c.ab, c), 6E3));\n\n if (1 >= Cc(c.i) && c.ka) {\n try {\n c.ka();\n } catch (m) {}\n\n c.ka = void 0;\n }\n } else Q(c, 11);\n } else if ((a.J || c.g == a) && zc(c), !sa(b)) for (e = c.Ca.g.parse(b), b = 0; b < e.length; b++) {\n var m = e[b];\n c.U = m[0];\n m = m[1];\n if (2 == c.G) {\n if (\"c\" == m[0]) {\n c.J = m[1];\n c.la = m[2];\n var r = m[3];\n null != r && (c.ma = r, c.h.info(\"VER=\" + c.ma));\n var G = m[4];\n null != G && (c.za = G, c.h.info(\"SVER=\" + c.za));\n var Da = m[5];\n null != Da && \"number\" === typeof Da && 0 < Da && (d = 1.5 * Da, c.K = d, c.h.info(\"backChannelRequestTimeoutMs_=\" + d));\n d = c;\n var ca = a.g;\n\n if (ca) {\n var Ea = ca.g ? ca.g.getResponseHeader(\"X-Client-Wire-Protocol\") : null;\n\n if (Ea) {\n var f = d.i;\n !f.g && (w(Ea, \"spdy\") || w(Ea, \"quic\") || w(Ea, \"h2\")) && (f.j = f.l, f.g = new Set(), f.h && (Dc(f, f.h), f.h = null));\n }\n\n if (d.D) {\n var xb = ca.g ? ca.g.getResponseHeader(\"X-HTTP-Session-Id\") : null;\n xb && (d.sa = xb, R(d.F, d.D, xb));\n }\n }\n\n c.G = 3;\n c.j && c.j.xa();\n c.$ && (c.O = Date.now() - a.F, c.h.info(\"Handshake RTT: \" + c.O + \"ms\"));\n d = c;\n var h = a;\n d.oa = Ec(d, d.H ? d.la : null, d.W);\n\n if (h.J) {\n Fc(d.i, h);\n var n = h,\n u = d.K;\n u && n.setTimeout(u);\n n.B && (pc(n), lc(n));\n d.g = h;\n } else Gc(d);\n\n 0 < c.l.length && Hc(c);\n } else \"stop\" != m[0] && \"close\" != m[0] || Q(c, 7);\n } else 3 == c.G && (\"stop\" == m[0] || \"close\" == m[0] ? \"stop\" == m[0] ? Q(c, 7) : Ic(c) : \"noop\" != m[0] && c.j && c.j.wa(m), c.A = 0);\n }\n I(4);\n } catch (m) {}\n}\n\nfunction Jc(a) {\n if (a.R && \"function\" == typeof a.R) return a.R();\n if (\"string\" === typeof a) return a.split(\"\");\n\n if (ba(a)) {\n for (var b = [], c = a.length, d = 0; d < c; d++) {\n b.push(a[d]);\n }\n\n return b;\n }\n\n b = [];\n c = 0;\n\n for (d in a) {\n b[c++] = a[d];\n }\n\n return b;\n}\n\nfunction Kc(a, b) {\n if (a.forEach && \"function\" == typeof a.forEach) a.forEach(b, void 0);else if (ba(a) || \"string\" === typeof a) na(a, b, void 0);else {\n if (a.T && \"function\" == typeof a.T) var c = a.T();else if (a.R && \"function\" == typeof a.R) c = void 0;else if (ba(a) || \"string\" === typeof a) {\n c = [];\n\n for (var d = a.length, e = 0; e < d; e++) {\n c.push(e);\n }\n } else for (e in c = [], d = 0, a) {\n c[d++] = e;\n }\n d = Jc(a);\n e = d.length;\n\n for (var f = 0; f < e; f++) {\n b.call(void 0, d[f], c && c[f], a);\n }\n }\n}\n\nfunction S(a, b) {\n this.h = {};\n this.g = [];\n this.i = 0;\n var c = arguments.length;\n\n if (1 < c) {\n if (c % 2) throw Error(\"Uneven number of arguments\");\n\n for (var d = 0; d < c; d += 2) {\n this.set(arguments[d], arguments[d + 1]);\n }\n } else if (a) if (a instanceof S) for (c = a.T(), d = 0; d < c.length; d++) {\n this.set(c[d], a.get(c[d]));\n } else for (d in a) {\n this.set(d, a[d]);\n }\n}\n\nk = S.prototype;\n\nk.R = function () {\n Lc(this);\n\n for (var a = [], b = 0; b < this.g.length; b++) {\n a.push(this.h[this.g[b]]);\n }\n\n return a;\n};\n\nk.T = function () {\n Lc(this);\n return this.g.concat();\n};\n\nfunction Lc(a) {\n if (a.i != a.g.length) {\n for (var b = 0, c = 0; b < a.g.length;) {\n var d = a.g[b];\n T(a.h, d) && (a.g[c++] = d);\n b++;\n }\n\n a.g.length = c;\n }\n\n if (a.i != a.g.length) {\n var e = {};\n\n for (c = b = 0; b < a.g.length;) {\n d = a.g[b], T(e, d) || (a.g[c++] = d, e[d] = 1), b++;\n }\n\n a.g.length = c;\n }\n}\n\nk.get = function (a, b) {\n return T(this.h, a) ? this.h[a] : b;\n};\n\nk.set = function (a, b) {\n T(this.h, a) || (this.i++, this.g.push(a));\n this.h[a] = b;\n};\n\nk.forEach = function (a, b) {\n for (var c = this.T(), d = 0; d < c.length; d++) {\n var e = c[d],\n f = this.get(e);\n a.call(b, f, e, this);\n }\n};\n\nfunction T(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nvar Mc = /^(?:([^:/?#.]+):)?(?:\\/\\/(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$/;\n\nfunction Nc(a, b) {\n if (a) {\n a = a.split(\"&\");\n\n for (var c = 0; c < a.length; c++) {\n var d = a[c].indexOf(\"=\"),\n e = null;\n\n if (0 <= d) {\n var f = a[c].substring(0, d);\n e = a[c].substring(d + 1);\n } else f = a[c];\n\n b(f, e ? decodeURIComponent(e.replace(/\\+/g, \" \")) : \"\");\n }\n }\n}\n\nfunction U(a, b) {\n this.i = this.s = this.j = \"\";\n this.m = null;\n this.o = this.l = \"\";\n this.g = !1;\n\n if (a instanceof U) {\n this.g = void 0 !== b ? b : a.g;\n Oc(this, a.j);\n this.s = a.s;\n Pc(this, a.i);\n Qc(this, a.m);\n this.l = a.l;\n b = a.h;\n var c = new Rc();\n c.i = b.i;\n b.g && (c.g = new S(b.g), c.h = b.h);\n Sc(this, c);\n this.o = a.o;\n } else a && (c = String(a).match(Mc)) ? (this.g = !!b, Oc(this, c[1] || \"\", !0), this.s = Tc(c[2] || \"\"), Pc(this, c[3] || \"\", !0), Qc(this, c[4]), this.l = Tc(c[5] || \"\", !0), Sc(this, c[6] || \"\", !0), this.o = Tc(c[7] || \"\")) : (this.g = !!b, this.h = new Rc(null, this.g));\n}\n\nU.prototype.toString = function () {\n var a = [],\n b = this.j;\n b && a.push(Uc(b, Vc, !0), \":\");\n var c = this.i;\n if (c || \"file\" == b) a.push(\"//\"), (b = this.s) && a.push(Uc(b, Vc, !0), \"@\"), a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), c = this.m, null != c && a.push(\":\", String(c));\n if (c = this.l) this.i && \"/\" != c.charAt(0) && a.push(\"/\"), a.push(Uc(c, \"/\" == c.charAt(0) ? Wc : Xc, !0));\n (c = this.h.toString()) && a.push(\"?\", c);\n (c = this.o) && a.push(\"#\", Uc(c, Yc));\n return a.join(\"\");\n};\n\nfunction N(a) {\n return new U(a);\n}\n\nfunction Oc(a, b, c) {\n a.j = c ? Tc(b, !0) : b;\n a.j && (a.j = a.j.replace(/:$/, \"\"));\n}\n\nfunction Pc(a, b, c) {\n a.i = c ? Tc(b, !0) : b;\n}\n\nfunction Qc(a, b) {\n if (b) {\n b = Number(b);\n if (isNaN(b) || 0 > b) throw Error(\"Bad port number \" + b);\n a.m = b;\n } else a.m = null;\n}\n\nfunction Sc(a, b, c) {\n b instanceof Rc ? (a.h = b, Zc(a.h, a.g)) : (c || (b = Uc(b, $c)), a.h = new Rc(b, a.g));\n}\n\nfunction R(a, b, c) {\n a.h.set(b, c);\n}\n\nfunction jc(a) {\n R(a, \"zx\", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ Date.now()).toString(36));\n return a;\n}\n\nfunction ad(a) {\n return a instanceof U ? N(a) : new U(a, void 0);\n}\n\nfunction bd(a, b, c, d) {\n var e = new U(null, void 0);\n a && Oc(e, a);\n b && Pc(e, b);\n c && Qc(e, c);\n d && (e.l = d);\n return e;\n}\n\nfunction Tc(a, b) {\n return a ? b ? decodeURI(a.replace(/%25/g, \"%2525\")) : decodeURIComponent(a) : \"\";\n}\n\nfunction Uc(a, b, c) {\n return \"string\" === typeof a ? (a = encodeURI(a).replace(b, cd), c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), a) : null;\n}\n\nfunction cd(a) {\n a = a.charCodeAt(0);\n return \"%\" + (a >> 4 & 15).toString(16) + (a & 15).toString(16);\n}\n\nvar Vc = /[#\\/\\?@]/g,\n Xc = /[#\\?:]/g,\n Wc = /[#\\?]/g,\n $c = /[#\\?@]/g,\n Yc = /#/g;\n\nfunction Rc(a, b) {\n this.h = this.g = null;\n this.i = a || null;\n this.j = !!b;\n}\n\nfunction V(a) {\n a.g || (a.g = new S(), a.h = 0, a.i && Nc(a.i, function (b, c) {\n a.add(decodeURIComponent(b.replace(/\\+/g, \" \")), c);\n }));\n}\n\nk = Rc.prototype;\n\nk.add = function (a, b) {\n V(this);\n this.i = null;\n a = W(this, a);\n var c = this.g.get(a);\n c || this.g.set(a, c = []);\n c.push(b);\n this.h += 1;\n return this;\n};\n\nfunction dd(a, b) {\n V(a);\n b = W(a, b);\n T(a.g.h, b) && (a.i = null, a.h -= a.g.get(b).length, a = a.g, T(a.h, b) && (delete a.h[b], a.i--, a.g.length > 2 * a.i && Lc(a)));\n}\n\nfunction ed(a, b) {\n V(a);\n b = W(a, b);\n return T(a.g.h, b);\n}\n\nk.forEach = function (a, b) {\n V(this);\n this.g.forEach(function (c, d) {\n na(c, function (e) {\n a.call(b, e, d, this);\n }, this);\n }, this);\n};\n\nk.T = function () {\n V(this);\n\n for (var a = this.g.R(), b = this.g.T(), c = [], d = 0; d < b.length; d++) {\n for (var e = a[d], f = 0; f < e.length; f++) {\n c.push(b[d]);\n }\n }\n\n return c;\n};\n\nk.R = function (a) {\n V(this);\n var b = [];\n if (\"string\" === typeof a) ed(this, a) && (b = qa(b, this.g.get(W(this, a))));else {\n a = this.g.R();\n\n for (var c = 0; c < a.length; c++) {\n b = qa(b, a[c]);\n }\n }\n return b;\n};\n\nk.set = function (a, b) {\n V(this);\n this.i = null;\n a = W(this, a);\n ed(this, a) && (this.h -= this.g.get(a).length);\n this.g.set(a, [b]);\n this.h += 1;\n return this;\n};\n\nk.get = function (a, b) {\n if (!a) return b;\n a = this.R(a);\n return 0 < a.length ? String(a[0]) : b;\n};\n\nfunction mc(a, b, c) {\n dd(a, b);\n 0 < c.length && (a.i = null, a.g.set(W(a, b), ra(c)), a.h += c.length);\n}\n\nk.toString = function () {\n if (this.i) return this.i;\n if (!this.g) return \"\";\n\n for (var a = [], b = this.g.T(), c = 0; c < b.length; c++) {\n var d = b[c],\n e = encodeURIComponent(String(d));\n d = this.R(d);\n\n for (var f = 0; f < d.length; f++) {\n var h = e;\n \"\" !== d[f] && (h += \"=\" + encodeURIComponent(String(d[f])));\n a.push(h);\n }\n }\n\n return this.i = a.join(\"&\");\n};\n\nfunction W(a, b) {\n b = String(b);\n a.j && (b = b.toLowerCase());\n return b;\n}\n\nfunction Zc(a, b) {\n b && !a.j && (V(a), a.i = null, a.g.forEach(function (c, d) {\n var e = d.toLowerCase();\n d != e && (dd(this, d), mc(this, e, c));\n }, a));\n a.j = b;\n}\n\nvar fd = function () {\n function fd(a, b) {\n this.h = a;\n this.g = b;\n }\n\n return fd;\n}();\n\nfunction gd(a) {\n this.l = a || hd;\n l.PerformanceNavigationTiming ? (a = l.performance.getEntriesByType(\"navigation\"), a = 0 < a.length && (\"hq\" == a[0].nextHopProtocol || \"h2\" == a[0].nextHopProtocol)) : a = !!(l.g && l.g.Ea && l.g.Ea() && l.g.Ea().Zb);\n this.j = a ? this.l : 1;\n this.g = null;\n 1 < this.j && (this.g = new Set());\n this.h = null;\n this.i = [];\n}\n\nvar hd = 10;\n\nfunction id(a) {\n return a.h ? !0 : a.g ? a.g.size >= a.j : !1;\n}\n\nfunction Cc(a) {\n return a.h ? 1 : a.g ? a.g.size : 0;\n}\n\nfunction yc(a, b) {\n return a.h ? a.h == b : a.g ? a.g.has(b) : !1;\n}\n\nfunction Dc(a, b) {\n a.g ? a.g.add(b) : a.h = b;\n}\n\nfunction Fc(a, b) {\n a.h && a.h == b ? a.h = null : a.g && a.g.has(b) && a.g.delete(b);\n}\n\ngd.prototype.cancel = function () {\n var e_1, _a;\n\n this.i = jd(this);\n if (this.h) this.h.cancel(), this.h = null;else if (this.g && 0 !== this.g.size) {\n try {\n for (var _b = __values(this.g.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var a = _c.value;\n a.cancel();\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n\n this.g.clear();\n }\n};\n\nfunction jd(a) {\n var e_2, _a;\n\n if (null != a.h) return a.i.concat(a.h.D);\n\n if (null != a.g && 0 !== a.g.size) {\n var b = a.i;\n\n try {\n for (var _b = __values(a.g.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var c = _c.value;\n b = b.concat(c.D);\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n\n return b;\n }\n\n return ra(a.i);\n}\n\nfunction kd() {}\n\nkd.prototype.stringify = function (a) {\n return l.JSON.stringify(a, void 0);\n};\n\nkd.prototype.parse = function (a) {\n return l.JSON.parse(a, void 0);\n};\n\nfunction ld() {\n this.g = new kd();\n}\n\nfunction md(a, b, c) {\n var d = c || \"\";\n\n try {\n Kc(a, function (e, f) {\n var h = e;\n p(e) && (h = rb(e));\n b.push(d + f + \"=\" + encodeURIComponent(h));\n });\n } catch (e) {\n throw b.push(d + \"type=\" + encodeURIComponent(\"_badmap\")), e;\n }\n}\n\nfunction nd(a, b) {\n var c = new Mb();\n\n if (l.Image) {\n var d_1 = new Image();\n d_1.onload = ja(od, c, d_1, \"TestLoadImage: loaded\", !0, b);\n d_1.onerror = ja(od, c, d_1, \"TestLoadImage: error\", !1, b);\n d_1.onabort = ja(od, c, d_1, \"TestLoadImage: abort\", !1, b);\n d_1.ontimeout = ja(od, c, d_1, \"TestLoadImage: timeout\", !1, b);\n l.setTimeout(function () {\n if (d_1.ontimeout) d_1.ontimeout();\n }, 1E4);\n d_1.src = a;\n } else b(!1);\n}\n\nfunction od(a, b, c, d, e) {\n try {\n b.onload = null, b.onerror = null, b.onabort = null, b.ontimeout = null, e(d);\n } catch (f) {}\n}\n\nfunction pd(a) {\n this.l = a.$b || null;\n this.j = a.ib || !1;\n}\n\nt(pd, Yb);\n\npd.prototype.g = function () {\n return new qd(this.l, this.j);\n};\n\npd.prototype.i = function (a) {\n return function () {\n return a;\n };\n}({});\n\nfunction qd(a, b) {\n C.call(this);\n this.D = a;\n this.u = b;\n this.m = void 0;\n this.readyState = rd;\n this.status = 0;\n this.responseType = this.responseText = this.response = this.statusText = \"\";\n this.onreadystatechange = null;\n this.v = new Headers();\n this.h = null;\n this.C = \"GET\";\n this.B = \"\";\n this.g = !1;\n this.A = this.j = this.l = null;\n}\n\nt(qd, C);\nvar rd = 0;\nk = qd.prototype;\n\nk.open = function (a, b) {\n if (this.readyState != rd) throw this.abort(), Error(\"Error reopening a connection\");\n this.C = a;\n this.B = b;\n this.readyState = 1;\n sd(this);\n};\n\nk.send = function (a) {\n if (1 != this.readyState) throw this.abort(), Error(\"need to call open() first. \");\n this.g = !0;\n var b = {\n headers: this.v,\n method: this.C,\n credentials: this.m,\n cache: void 0\n };\n a && (b.body = a);\n (this.D || l).fetch(new Request(this.B, b)).then(this.Va.bind(this), this.ha.bind(this));\n};\n\nk.abort = function () {\n this.response = this.responseText = \"\";\n this.v = new Headers();\n this.status = 0;\n this.j && this.j.cancel(\"Request was aborted.\");\n 1 <= this.readyState && this.g && 4 != this.readyState && (this.g = !1, td(this));\n this.readyState = rd;\n};\n\nk.Va = function (a) {\n if (this.g && (this.l = a, this.h || (this.status = this.l.status, this.statusText = this.l.statusText, this.h = a.headers, this.readyState = 2, sd(this)), this.g && (this.readyState = 3, sd(this), this.g))) if (\"arraybuffer\" === this.responseType) a.arrayBuffer().then(this.Ta.bind(this), this.ha.bind(this));else if (\"undefined\" !== typeof l.ReadableStream && \"body\" in a) {\n this.j = a.body.getReader();\n\n if (this.u) {\n if (this.responseType) throw Error('responseType must be empty for \"streamBinaryChunks\" mode responses.');\n this.response = [];\n } else this.response = this.responseText = \"\", this.A = new TextDecoder();\n\n ud(this);\n } else a.text().then(this.Ua.bind(this), this.ha.bind(this));\n};\n\nfunction ud(a) {\n a.j.read().then(a.Sa.bind(a)).catch(a.ha.bind(a));\n}\n\nk.Sa = function (a) {\n if (this.g) {\n if (this.u && a.value) this.response.push(a.value);else if (!this.u) {\n var b = a.value ? a.value : new Uint8Array(0);\n if (b = this.A.decode(b, {\n stream: !a.done\n })) this.response = this.responseText += b;\n }\n a.done ? td(this) : sd(this);\n 3 == this.readyState && ud(this);\n }\n};\n\nk.Ua = function (a) {\n this.g && (this.response = this.responseText = a, td(this));\n};\n\nk.Ta = function (a) {\n this.g && (this.response = a, td(this));\n};\n\nk.ha = function () {\n this.g && td(this);\n};\n\nfunction td(a) {\n a.readyState = 4;\n a.l = null;\n a.j = null;\n a.A = null;\n sd(a);\n}\n\nk.setRequestHeader = function (a, b) {\n this.v.append(a, b);\n};\n\nk.getResponseHeader = function (a) {\n return this.h ? this.h.get(a.toLowerCase()) || \"\" : \"\";\n};\n\nk.getAllResponseHeaders = function () {\n if (!this.h) return \"\";\n var a = [],\n b = this.h.entries();\n\n for (var c = b.next(); !c.done;) {\n c = c.value, a.push(c[0] + \": \" + c[1]), c = b.next();\n }\n\n return a.join(\"\\r\\n\");\n};\n\nfunction sd(a) {\n a.onreadystatechange && a.onreadystatechange.call(a);\n}\n\nObject.defineProperty(qd.prototype, \"withCredentials\", {\n get: function get() {\n return \"include\" === this.m;\n },\n set: function set(a) {\n this.m = a ? \"include\" : \"same-origin\";\n }\n});\nvar vd = l.JSON.parse;\n\nfunction X(a) {\n C.call(this);\n this.headers = new S();\n this.u = a || null;\n this.h = !1;\n this.C = this.g = null;\n this.H = \"\";\n this.m = 0;\n this.j = \"\";\n this.l = this.F = this.v = this.D = !1;\n this.B = 0;\n this.A = null;\n this.J = wd;\n this.K = this.L = !1;\n}\n\nt(X, C);\nvar wd = \"\",\n xd = /^https?$/i,\n yd = [\"POST\", \"PUT\"];\nk = X.prototype;\n\nk.ea = function (a, b, c, d) {\n if (this.g) throw Error(\"[goog.net.XhrIo] Object is active with another request=\" + this.H + \"; newUri=\" + a);\n b = b ? b.toUpperCase() : \"GET\";\n this.H = a;\n this.j = \"\";\n this.m = 0;\n this.D = !1;\n this.h = !0;\n this.g = this.u ? this.u.g() : cc.g();\n this.C = this.u ? Zb(this.u) : Zb(cc);\n this.g.onreadystatechange = q(this.Fa, this);\n\n try {\n this.F = !0, this.g.open(b, String(a), !0), this.F = !1;\n } catch (f) {\n zd(this, f);\n return;\n }\n\n a = c || \"\";\n var e = new S(this.headers);\n d && Kc(d, function (f, h) {\n e.set(h, f);\n });\n d = oa(e.T());\n c = l.FormData && a instanceof l.FormData;\n !(0 <= ma(yd, b)) || d || c || e.set(\"Content-Type\", \"application/x-www-form-urlencoded;charset=utf-8\");\n e.forEach(function (f, h) {\n this.g.setRequestHeader(h, f);\n }, this);\n this.J && (this.g.responseType = this.J);\n \"withCredentials\" in this.g && this.g.withCredentials !== this.L && (this.g.withCredentials = this.L);\n\n try {\n Ad(this), 0 < this.B && ((this.K = Bd(this.g)) ? (this.g.timeout = this.B, this.g.ontimeout = q(this.pa, this)) : this.A = Gb(this.pa, this.B, this)), this.v = !0, this.g.send(a), this.v = !1;\n } catch (f) {\n zd(this, f);\n }\n};\n\nfunction Bd(a) {\n return y && Ra() && \"number\" === typeof a.timeout && void 0 !== a.ontimeout;\n}\n\nfunction pa(a) {\n return \"content-type\" == a.toLowerCase();\n}\n\nk.pa = function () {\n \"undefined\" != typeof goog && this.g && (this.j = \"Timed out after \" + this.B + \"ms, aborting\", this.m = 8, D(this, \"timeout\"), this.abort(8));\n};\n\nfunction zd(a, b) {\n a.h = !1;\n a.g && (a.l = !0, a.g.abort(), a.l = !1);\n a.j = b;\n a.m = 5;\n Cd(a);\n Dd(a);\n}\n\nfunction Cd(a) {\n a.D || (a.D = !0, D(a, \"complete\"), D(a, \"error\"));\n}\n\nk.abort = function (a) {\n this.g && this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1, this.m = a || 7, D(this, \"complete\"), D(this, \"abort\"), Dd(this));\n};\n\nk.M = function () {\n this.g && (this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1), Dd(this, !0));\n X.Z.M.call(this);\n};\n\nk.Fa = function () {\n this.s || (this.F || this.v || this.l ? Ed(this) : this.cb());\n};\n\nk.cb = function () {\n Ed(this);\n};\n\nfunction Ed(a) {\n if (a.h && \"undefined\" != typeof goog && (!a.C[1] || 4 != O(a) || 2 != a.ba())) if (a.v && 4 == O(a)) Gb(a.Fa, 0, a);else if (D(a, \"readystatechange\"), 4 == O(a)) {\n a.h = !1;\n\n try {\n var n = a.ba();\n\n a: switch (n) {\n case 200:\n case 201:\n case 202:\n case 204:\n case 206:\n case 304:\n case 1223:\n var b = !0;\n break a;\n\n default:\n b = !1;\n }\n\n var c;\n\n if (!(c = b)) {\n var d;\n\n if (d = 0 === n) {\n var e = String(a.H).match(Mc)[1] || null;\n\n if (!e && l.self && l.self.location) {\n var f = l.self.location.protocol;\n e = f.substr(0, f.length - 1);\n }\n\n d = !xd.test(e ? e.toLowerCase() : \"\");\n }\n\n c = d;\n }\n\n if (c) D(a, \"complete\"), D(a, \"success\");else {\n a.m = 6;\n\n try {\n var h = 2 < O(a) ? a.g.statusText : \"\";\n } catch (u) {\n h = \"\";\n }\n\n a.j = h + \" [\" + a.ba() + \"]\";\n Cd(a);\n }\n } finally {\n Dd(a);\n }\n }\n}\n\nfunction Dd(a, b) {\n if (a.g) {\n Ad(a);\n var c = a.g,\n d = a.C[0] ? aa : null;\n a.g = null;\n a.C = null;\n b || D(a, \"ready\");\n\n try {\n c.onreadystatechange = d;\n } catch (e) {}\n }\n}\n\nfunction Ad(a) {\n a.g && a.K && (a.g.ontimeout = null);\n a.A && (l.clearTimeout(a.A), a.A = null);\n}\n\nfunction O(a) {\n return a.g ? a.g.readyState : 0;\n}\n\nk.ba = function () {\n try {\n return 2 < O(this) ? this.g.status : -1;\n } catch (a) {\n return -1;\n }\n};\n\nk.ga = function () {\n try {\n return this.g ? this.g.responseText : \"\";\n } catch (a) {\n return \"\";\n }\n};\n\nk.Qa = function (a) {\n if (this.g) {\n var b = this.g.responseText;\n a && 0 == b.indexOf(a) && (b = b.substring(a.length));\n return vd(b);\n }\n};\n\nfunction oc(a) {\n try {\n if (!a.g) return null;\n if (\"response\" in a.g) return a.g.response;\n\n switch (a.J) {\n case wd:\n case \"text\":\n return a.g.responseText;\n\n case \"arraybuffer\":\n if (\"mozResponseArrayBuffer\" in a.g) return a.g.mozResponseArrayBuffer;\n }\n\n return null;\n } catch (b) {\n return null;\n }\n}\n\nk.Da = function () {\n return this.m;\n};\n\nk.La = function () {\n return \"string\" === typeof this.j ? this.j : String(this.j);\n};\n\nfunction Fd(a) {\n var b = \"\";\n xa(a, function (c, d) {\n b += d;\n b += \":\";\n b += c;\n b += \"\\r\\n\";\n });\n return b;\n}\n\nfunction Gd(a, b, c) {\n a: {\n for (d in c) {\n var d = !1;\n break a;\n }\n\n d = !0;\n }\n\n d || (c = Fd(c), \"string\" === typeof a ? null != c && encodeURIComponent(String(c)) : R(a, b, c));\n}\n\nfunction Hd(a, b, c) {\n return c && c.internalChannelParams ? c.internalChannelParams[a] || b : b;\n}\n\nfunction Id(a) {\n this.za = 0;\n this.l = [];\n this.h = new Mb();\n this.la = this.oa = this.F = this.W = this.g = this.sa = this.D = this.aa = this.o = this.P = this.s = null;\n this.Za = this.V = 0;\n this.Xa = Hd(\"failFast\", !1, a);\n this.N = this.v = this.u = this.m = this.j = null;\n this.X = !0;\n this.I = this.ta = this.U = -1;\n this.Y = this.A = this.C = 0;\n this.Pa = Hd(\"baseRetryDelayMs\", 5E3, a);\n this.$a = Hd(\"retryDelaySeedMs\", 1E4, a);\n this.Ya = Hd(\"forwardChannelMaxRetries\", 2, a);\n this.ra = Hd(\"forwardChannelRequestTimeoutMs\", 2E4, a);\n this.qa = a && a.xmlHttpFactory || void 0;\n this.Ba = a && a.Yb || !1;\n this.K = void 0;\n this.H = a && a.supportsCrossDomainXhr || !1;\n this.J = \"\";\n this.i = new gd(a && a.concurrentRequestLimit);\n this.Ca = new ld();\n this.ja = a && a.fastHandshake || !1;\n this.Ra = a && a.Wb || !1;\n a && a.Aa && this.h.Aa();\n a && a.forceLongPolling && (this.X = !1);\n this.$ = !this.ja && this.X && a && a.detectBufferingProxy || !1;\n this.ka = void 0;\n this.O = 0;\n this.L = !1;\n this.B = null;\n this.Wa = !a || !1 !== a.Xb;\n}\n\nk = Id.prototype;\nk.ma = 8;\nk.G = 1;\n\nfunction Ic(a) {\n Jd(a);\n\n if (3 == a.G) {\n var b = a.V++,\n c = N(a.F);\n R(c, \"SID\", a.J);\n R(c, \"RID\", b);\n R(c, \"TYPE\", \"terminate\");\n Kd(a, c);\n b = new M(a, a.h, b, void 0);\n b.K = 2;\n b.v = jc(N(c));\n c = !1;\n l.navigator && l.navigator.sendBeacon && (c = l.navigator.sendBeacon(b.v.toString(), \"\"));\n !c && l.Image && (new Image().src = b.v, c = !0);\n c || (b.g = nc(b.l, null), b.g.ea(b.v));\n b.F = Date.now();\n lc(b);\n }\n\n Ld(a);\n}\n\nk.hb = function (a) {\n try {\n this.h.info(\"Origin Trials invoked: \" + a);\n } catch (b) {}\n};\n\nfunction Ac(a) {\n a.g && (wc(a), a.g.cancel(), a.g = null);\n}\n\nfunction Jd(a) {\n Ac(a);\n a.u && (l.clearTimeout(a.u), a.u = null);\n zc(a);\n a.i.cancel();\n a.m && (\"number\" === typeof a.m && l.clearTimeout(a.m), a.m = null);\n}\n\nfunction Md(a, b) {\n a.l.push(new fd(a.Za++, b));\n 3 == a.G && Hc(a);\n}\n\nfunction Hc(a) {\n id(a.i) || a.m || (a.m = !0, zb(a.Ha, a), a.C = 0);\n}\n\nfunction Nd(a, b) {\n if (Cc(a.i) >= a.i.j - (a.m ? 1 : 0)) return !1;\n if (a.m) return a.l = b.D.concat(a.l), !0;\n if (1 == a.G || 2 == a.G || a.C >= (a.Xa ? 0 : a.Ya)) return !1;\n a.m = K(q(a.Ha, a, b), Od(a, a.C));\n a.C++;\n return !0;\n}\n\nk.Ha = function (a) {\n if (this.m) if (this.m = null, 1 == this.G) {\n if (!a) {\n this.V = Math.floor(1E5 * Math.random());\n a = this.V++;\n var e = new M(this, this.h, a, void 0);\n var f = this.s;\n this.P && (f ? (f = ya(f), Aa(f, this.P)) : f = this.P);\n null === this.o && (e.H = f);\n if (this.ja) a: {\n var b = 0;\n\n for (var c = 0; c < this.l.length; c++) {\n b: {\n var d = this.l[c];\n\n if (\"__data__\" in d.g && (d = d.g.__data__, \"string\" === typeof d)) {\n d = d.length;\n break b;\n }\n\n d = void 0;\n }\n\n if (void 0 === d) break;\n b += d;\n\n if (4096 < b) {\n b = c;\n break a;\n }\n\n if (4096 === b || c === this.l.length - 1) {\n b = c + 1;\n break a;\n }\n }\n\n b = 1E3;\n } else b = 1E3;\n b = Pd(this, e, b);\n c = N(this.F);\n R(c, \"RID\", a);\n R(c, \"CVER\", 22);\n this.D && R(c, \"X-HTTP-Session-Id\", this.D);\n Kd(this, c);\n this.o && f && Gd(c, this.o, f);\n Dc(this.i, e);\n this.Ra && R(c, \"TYPE\", \"init\");\n this.ja ? (R(c, \"$req\", b), R(c, \"SID\", \"null\"), e.$ = !0, ic(e, c, null)) : ic(e, c, b);\n this.G = 2;\n }\n } else 3 == this.G && (a ? Qd(this, a) : 0 == this.l.length || id(this.i) || Qd(this));\n};\n\nfunction Qd(a, b) {\n var c;\n b ? c = b.m : c = a.V++;\n var d = N(a.F);\n R(d, \"SID\", a.J);\n R(d, \"RID\", c);\n R(d, \"AID\", a.U);\n Kd(a, d);\n a.o && a.s && Gd(d, a.o, a.s);\n c = new M(a, a.h, c, a.C + 1);\n null === a.o && (c.H = a.s);\n b && (a.l = b.D.concat(a.l));\n b = Pd(a, c, 1E3);\n c.setTimeout(Math.round(.5 * a.ra) + Math.round(.5 * a.ra * Math.random()));\n Dc(a.i, c);\n ic(c, d, b);\n}\n\nfunction Kd(a, b) {\n a.j && Kc({}, function (c, d) {\n R(b, d, c);\n });\n}\n\nfunction Pd(a, b, c) {\n c = Math.min(a.l.length, c);\n var d = a.j ? q(a.j.Oa, a.j, a) : null;\n\n a: {\n var e = a.l;\n var f = -1;\n\n for (;;) {\n var h = [\"count=\" + c];\n -1 == f ? 0 < c ? (f = e[0].h, h.push(\"ofs=\" + f)) : f = 0 : h.push(\"ofs=\" + f);\n var n = !0;\n\n for (var u = 0; u < c; u++) {\n var m = e[u].h;\n var r = e[u].g;\n m -= f;\n if (0 > m) f = Math.max(0, e[u].h - 100), n = !1;else try {\n md(r, h, \"req\" + m + \"_\");\n } catch (G) {\n d && d(r);\n }\n }\n\n if (n) {\n d = h.join(\"&\");\n break a;\n }\n }\n }\n\n a = a.l.splice(0, c);\n b.D = a;\n return d;\n}\n\nfunction Gc(a) {\n a.g || a.u || (a.Y = 1, zb(a.Ga, a), a.A = 0);\n}\n\nfunction Bc(a) {\n if (a.g || a.u || 3 <= a.A) return !1;\n a.Y++;\n a.u = K(q(a.Ga, a), Od(a, a.A));\n a.A++;\n return !0;\n}\n\nk.Ga = function () {\n this.u = null;\n Rd(this);\n\n if (this.$ && !(this.L || null == this.g || 0 >= this.O)) {\n var a = 2 * this.O;\n this.h.info(\"BP detection timer enabled: \" + a);\n this.B = K(q(this.bb, this), a);\n }\n};\n\nk.bb = function () {\n this.B && (this.B = null, this.h.info(\"BP detection timeout reached.\"), this.h.info(\"Buffering proxy detected and switch to long-polling!\"), this.N = !1, this.L = !0, J(10), Ac(this), Rd(this));\n};\n\nfunction wc(a) {\n null != a.B && (l.clearTimeout(a.B), a.B = null);\n}\n\nfunction Rd(a) {\n a.g = new M(a, a.h, \"rpc\", a.Y);\n null === a.o && (a.g.H = a.s);\n a.g.O = 0;\n var b = N(a.oa);\n R(b, \"RID\", \"rpc\");\n R(b, \"SID\", a.J);\n R(b, \"CI\", a.N ? \"0\" : \"1\");\n R(b, \"AID\", a.U);\n Kd(a, b);\n R(b, \"TYPE\", \"xmlhttp\");\n a.o && a.s && Gd(b, a.o, a.s);\n a.K && a.g.setTimeout(a.K);\n var c = a.g;\n a = a.la;\n c.K = 1;\n c.v = jc(N(b));\n c.s = null;\n c.U = !0;\n kc(c, a);\n}\n\nk.ab = function () {\n null != this.v && (this.v = null, Ac(this), Bc(this), J(19));\n};\n\nfunction zc(a) {\n null != a.v && (l.clearTimeout(a.v), a.v = null);\n}\n\nfunction uc(a, b) {\n var c = null;\n\n if (a.g == b) {\n zc(a);\n wc(a);\n a.g = null;\n var d = 2;\n } else if (yc(a.i, b)) c = b.D, Fc(a.i, b), d = 1;else return;\n\n a.I = b.N;\n if (0 != a.G) if (b.i) {\n if (1 == d) {\n c = b.s ? b.s.length : 0;\n b = Date.now() - b.F;\n var e = a.C;\n d = Sb();\n D(d, new Vb(d, c, b, e));\n Hc(a);\n } else Gc(a);\n } else if (e = b.o, 3 == e || 0 == e && 0 < a.I || !(1 == d && Nd(a, b) || 2 == d && Bc(a))) switch (c && 0 < c.length && (b = a.i, b.i = b.i.concat(c)), e) {\n case 1:\n Q(a, 5);\n break;\n\n case 4:\n Q(a, 10);\n break;\n\n case 3:\n Q(a, 6);\n break;\n\n default:\n Q(a, 2);\n }\n}\n\nfunction Od(a, b) {\n var c = a.Pa + Math.floor(Math.random() * a.$a);\n a.j || (c *= 2);\n return c * b;\n}\n\nfunction Q(a, b) {\n a.h.info(\"Error code \" + b);\n\n if (2 == b) {\n var c = null;\n a.j && (c = null);\n var d = q(a.jb, a);\n c || (c = new U(\"//www.google.com/images/cleardot.gif\"), l.location && \"http\" == l.location.protocol || Oc(c, \"https\"), jc(c));\n nd(c.toString(), d);\n } else J(2);\n\n a.G = 0;\n a.j && a.j.va(b);\n Ld(a);\n Jd(a);\n}\n\nk.jb = function (a) {\n a ? (this.h.info(\"Successfully pinged google.com\"), J(2)) : (this.h.info(\"Failed to ping google.com\"), J(1));\n};\n\nfunction Ld(a) {\n a.G = 0;\n a.I = -1;\n\n if (a.j) {\n if (0 != jd(a.i).length || 0 != a.l.length) a.i.i.length = 0, ra(a.l), a.l.length = 0;\n a.j.ua();\n }\n}\n\nfunction Ec(a, b, c) {\n var d = ad(c);\n if (\"\" != d.i) b && Pc(d, b + \".\" + d.i), Qc(d, d.m);else {\n var e = l.location;\n d = bd(e.protocol, b ? b + \".\" + e.hostname : e.hostname, +e.port, c);\n }\n a.aa && xa(a.aa, function (e, f) {\n R(d, f, e);\n });\n b = a.D;\n c = a.sa;\n b && c && R(d, b, c);\n R(d, \"VER\", a.ma);\n Kd(a, d);\n return d;\n}\n\nfunction nc(a, b, c) {\n if (b && !a.H) throw Error(\"Can't create secondary domain capable XhrIo object.\");\n b = c && a.Ba && !a.qa ? new X(new pd({\n ib: !0\n })) : new X(a.qa);\n b.L = a.H;\n return b;\n}\n\nfunction Sd() {}\n\nk = Sd.prototype;\n\nk.xa = function () {};\n\nk.wa = function () {};\n\nk.va = function () {};\n\nk.ua = function () {};\n\nk.Oa = function () {};\n\nfunction Td() {\n if (y && !(10 <= Number(Ua))) throw Error(\"Environmental error: no available transport.\");\n}\n\nTd.prototype.g = function (a, b) {\n return new Y(a, b);\n};\n\nfunction Y(a, b) {\n C.call(this);\n this.g = new Id(b);\n this.l = a;\n this.h = b && b.messageUrlParams || null;\n a = b && b.messageHeaders || null;\n b && b.clientProtocolHeaderRequired && (a ? a[\"X-Client-Protocol\"] = \"webchannel\" : a = {\n \"X-Client-Protocol\": \"webchannel\"\n });\n this.g.s = a;\n a = b && b.initMessageHeaders || null;\n b && b.messageContentType && (a ? a[\"X-WebChannel-Content-Type\"] = b.messageContentType : a = {\n \"X-WebChannel-Content-Type\": b.messageContentType\n });\n b && b.ya && (a ? a[\"X-WebChannel-Client-Profile\"] = b.ya : a = {\n \"X-WebChannel-Client-Profile\": b.ya\n });\n this.g.P = a;\n (a = b && b.httpHeadersOverwriteParam) && !sa(a) && (this.g.o = a);\n this.A = b && b.supportsCrossDomainXhr || !1;\n this.v = b && b.sendRawJson || !1;\n (b = b && b.httpSessionIdParam) && !sa(b) && (this.g.D = b, a = this.h, null !== a && b in a && (a = this.h, b in a && delete a[b]));\n this.j = new Z(this);\n}\n\nt(Y, C);\n\nY.prototype.m = function () {\n this.g.j = this.j;\n this.A && (this.g.H = !0);\n var a = this.g,\n b = this.l,\n c = this.h || void 0;\n a.Wa && (a.h.info(\"Origin Trials enabled.\"), zb(q(a.hb, a, b)));\n J(0);\n a.W = b;\n a.aa = c || {};\n a.N = a.X;\n a.F = Ec(a, null, a.W);\n Hc(a);\n};\n\nY.prototype.close = function () {\n Ic(this.g);\n};\n\nY.prototype.u = function (a) {\n if (\"string\" === typeof a) {\n var b = {};\n b.__data__ = a;\n Md(this.g, b);\n } else this.v ? (b = {}, b.__data__ = rb(a), Md(this.g, b)) : Md(this.g, a);\n};\n\nY.prototype.M = function () {\n this.g.j = null;\n delete this.j;\n Ic(this.g);\n delete this.g;\n Y.Z.M.call(this);\n};\n\nfunction Ud(a) {\n ac.call(this);\n var b = a.__sm__;\n\n if (b) {\n a: {\n for (var c in b) {\n a = c;\n break a;\n }\n\n a = void 0;\n }\n\n if (this.i = a) a = this.i, b = null !== b && a in b ? b[a] : void 0;\n this.data = b;\n } else this.data = a;\n}\n\nt(Ud, ac);\n\nfunction Vd() {\n bc.call(this);\n this.status = 1;\n}\n\nt(Vd, bc);\n\nfunction Z(a) {\n this.g = a;\n}\n\nt(Z, Sd);\n\nZ.prototype.xa = function () {\n D(this.g, \"a\");\n};\n\nZ.prototype.wa = function (a) {\n D(this.g, new Ud(a));\n};\n\nZ.prototype.va = function (a) {\n D(this.g, new Vd(a));\n};\n\nZ.prototype.ua = function () {\n D(this.g, \"b\");\n};\n/*\r\nCopyright 2017 Google LLC\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\n\n\nTd.prototype.createWebChannel = Td.prototype.g;\nY.prototype.send = Y.prototype.u;\nY.prototype.open = Y.prototype.m;\nY.prototype.close = Y.prototype.close;\nWb.NO_ERROR = 0;\nWb.TIMEOUT = 8;\nWb.HTTP_ERROR = 6;\nXb.COMPLETE = \"complete\";\n$b.EventType = L;\nL.OPEN = \"a\";\nL.CLOSE = \"b\";\nL.ERROR = \"c\";\nL.MESSAGE = \"d\";\nC.prototype.listen = C.prototype.N;\nX.prototype.listenOnce = X.prototype.O;\nX.prototype.getLastError = X.prototype.La;\nX.prototype.getLastErrorCode = X.prototype.Da;\nX.prototype.getStatus = X.prototype.ba;\nX.prototype.getResponseJson = X.prototype.Qa;\nX.prototype.getResponseText = X.prototype.ga;\nX.prototype.send = X.prototype.ea;\n\nvar createWebChannelTransport = function createWebChannelTransport() {\n return new Td();\n};\n\nvar getStatEventTarget = function getStatEventTarget() {\n return Sb();\n};\n\nvar ErrorCode = Wb;\nvar EventType = Xb;\nvar Event = H;\nvar Stat = {\n rb: 0,\n ub: 1,\n vb: 2,\n Ob: 3,\n Tb: 4,\n Qb: 5,\n Rb: 6,\n Pb: 7,\n Nb: 8,\n Sb: 9,\n PROXY: 10,\n NOPROXY: 11,\n Lb: 12,\n Hb: 13,\n Ib: 14,\n Gb: 15,\n Jb: 16,\n Kb: 17,\n nb: 18,\n mb: 19,\n ob: 20\n};\nvar FetchXmlHttpFactory = pd;\nvar WebChannel = $b;\nvar XhrIo = X;\nvar esm = {\n createWebChannelTransport: createWebChannelTransport,\n getStatEventTarget: getStatEventTarget,\n ErrorCode: ErrorCode,\n EventType: EventType,\n Event: Event,\n Stat: Stat,\n FetchXmlHttpFactory: FetchXmlHttpFactory,\n WebChannel: WebChannel,\n XhrIo: XhrIo\n};\nexport default esm;\nexport { ErrorCode, Event, EventType, FetchXmlHttpFactory, Stat, WebChannel, XhrIo, createWebChannelTransport, getStatEventTarget };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({\n location: location,\n action: \"POP\"\n });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, {\n key: Date.now() + \"\"\n }); // try...catch iOS Safari limits to 100 pushState calls\n\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({\n location: location,\n action: \"PUSH\"\n });\n });\n return transition;\n }\n };\n}; ////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\n\n\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n return {\n get location() {\n return stack[index];\n },\n\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n\n get index() {\n return index;\n },\n\n get state() {\n return states[index];\n },\n\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({\n pathname: pathname,\n search: search.length ? \"?\" + search : search\n });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = {\n pathname: pathname,\n search: search\n };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n}; ////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\n\n\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate; ////////////////////////////////////////////////////////////////////////////////\n\nexports.globalHistory = globalHistory;\nexports.navigate = navigate;\nexports.createHistory = createHistory;\nexports.createMemorySource = createMemorySource;","\"use strict\";\n\nexports.__esModule = true;\nexports.shallowCompare = exports.validateRedirect = exports.insertParams = exports.resolve = exports.match = exports.pick = exports.startsWith = undefined;\n\nvar _invariant = require(\"invariant\");\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n} ////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\n\n\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n}; ////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\n\n\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? (0, _invariant2.default)(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : (0, _invariant2.default)(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n}; ////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\n\n\nvar match = function match(path, uri) {\n return pick([{\n path: path\n }], uri);\n}; ////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\n\n\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname); // ?a=b, /users?b=c => /users?a=b\n\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n } // profile, /users/789 => /users/789/profile\n\n\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n } // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n\n\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n}; ////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n}; ////////////////////////////////////////////////////////////////////////////////\n// Junk\n\n\nvar paramRe = /^:(.+)/;\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\n\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\n\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return {\n route: route,\n score: score,\n index: index\n };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\n\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n}; ////////////////////////////////////////////////////////////////////////////////\n\n\nexports.startsWith = startsWith;\nexports.pick = pick;\nexports.match = match;\nexports.resolve = resolve;\nexports.insertParams = insertParams;\nexports.validateRedirect = validateRedirect;\nexports.shallowCompare = shallowCompare;","'use strict';\n\nvar preserveCamelCase = function preserveCamelCase(string) {\n var isLastCharLower = false;\n var isLastCharUpper = false;\n var isLastLastCharUpper = false;\n\n for (var i = 0; i < string.length; i++) {\n var character = string[i];\n\n if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) {\n string = string.slice(0, i) + '-' + string.slice(i);\n isLastCharLower = false;\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = true;\n i++;\n } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) {\n string = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = false;\n isLastCharLower = true;\n } else {\n isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character;\n isLastLastCharUpper = isLastCharUpper;\n isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character;\n }\n }\n\n return string;\n};\n\nvar camelCase = function camelCase(input, options) {\n if (!(typeof input === 'string' || Array.isArray(input))) {\n throw new TypeError('Expected the input to be `string | string[]`');\n }\n\n options = Object.assign({\n pascalCase: false\n }, options);\n\n var postProcess = function postProcess(x) {\n return options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x;\n };\n\n if (Array.isArray(input)) {\n input = input.map(function (x) {\n return x.trim();\n }).filter(function (x) {\n return x.length;\n }).join('-');\n } else {\n input = input.trim();\n }\n\n if (input.length === 0) {\n return '';\n }\n\n if (input.length === 1) {\n return options.pascalCase ? input.toUpperCase() : input.toLowerCase();\n }\n\n var hasUpperCase = input !== input.toLowerCase();\n\n if (hasUpperCase) {\n input = preserveCamelCase(input);\n }\n\n input = input.replace(/^[_.\\- ]+/, '').toLowerCase().replace(/[_.\\- ]+(\\w|$)/g, function (_, p1) {\n return p1.toUpperCase();\n }).replace(/\\d+(\\w|$)/g, function (m) {\n return m.toUpperCase();\n });\n return postProcess(input);\n};\n\nmodule.exports = camelCase; // TODO: Remove this for the next major release\n\nmodule.exports.default = camelCase;","var _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _templateObject = _taggedTemplateLiteral(['', ''], ['', '']);\n\nfunction _taggedTemplateLiteral(strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n/**\n * @class TemplateTag\n * @classdesc Consumes a pipeline of composable transformer plugins and produces a template tag.\n */\n\n\nvar TemplateTag = function () {\n /**\n * constructs a template tag\n * @constructs TemplateTag\n * @param {...Object} [...transformers] - an array or arguments list of transformers\n * @return {Function} - a template tag\n */\n function TemplateTag() {\n var _this = this;\n\n for (var _len = arguments.length, transformers = Array(_len), _key = 0; _key < _len; _key++) {\n transformers[_key] = arguments[_key];\n }\n\n _classCallCheck(this, TemplateTag);\n\n this.tag = function (strings) {\n for (var _len2 = arguments.length, expressions = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n expressions[_key2 - 1] = arguments[_key2];\n }\n\n if (typeof strings === 'function') {\n // if the first argument passed is a function, assume it is a template tag and return\n // an intermediary tag that processes the template using the aforementioned tag, passing the\n // result to our tag\n return _this.interimTag.bind(_this, strings);\n }\n\n if (typeof strings === 'string') {\n // if the first argument passed is a string, just transform it\n return _this.transformEndResult(strings);\n } // else, return a transformed end result of processing the template with our tag\n\n\n strings = strings.map(_this.transformString.bind(_this));\n return _this.transformEndResult(strings.reduce(_this.processSubstitutions.bind(_this, expressions)));\n }; // if first argument is an array, extrude it as a list of transformers\n\n\n if (transformers.length > 0 && Array.isArray(transformers[0])) {\n transformers = transformers[0];\n } // if any transformers are functions, this means they are not initiated - automatically initiate them\n\n\n this.transformers = transformers.map(function (transformer) {\n return typeof transformer === 'function' ? transformer() : transformer;\n }); // return an ES2015 template tag\n\n return this.tag;\n }\n /**\n * Applies all transformers to a template literal tagged with this method.\n * If a function is passed as the first argument, assumes the function is a template tag\n * and applies it to the template, returning a template tag.\n * @param {(Function|String|Array)} strings - Either a template tag or an array containing template strings separated by identifier\n * @param {...*} ...expressions - Optional list of substitution values.\n * @return {(String|Function)} - Either an intermediary tag function or the results of processing the template.\n */\n\n\n _createClass(TemplateTag, [{\n key: 'interimTag',\n\n /**\n * An intermediary template tag that receives a template tag and passes the result of calling the template with the received\n * template tag to our own template tag.\n * @param {Function} nextTag - the received template tag\n * @param {Array} template - the template to process\n * @param {...*} ...substitutions - `substitutions` is an array of all substitutions in the template\n * @return {*} - the final processed value\n */\n value: function interimTag(previousTag, template) {\n for (var _len3 = arguments.length, substitutions = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n substitutions[_key3 - 2] = arguments[_key3];\n }\n\n return this.tag(_templateObject, previousTag.apply(undefined, [template].concat(substitutions)));\n }\n /**\n * Performs bulk processing on the tagged template, transforming each substitution and then\n * concatenating the resulting values into a string.\n * @param {Array<*>} substitutions - an array of all remaining substitutions present in this template\n * @param {String} resultSoFar - this iteration's result string so far\n * @param {String} remainingPart - the template chunk after the current substitution\n * @return {String} - the result of joining this iteration's processed substitution with the result\n */\n\n }, {\n key: 'processSubstitutions',\n value: function processSubstitutions(substitutions, resultSoFar, remainingPart) {\n var substitution = this.transformSubstitution(substitutions.shift(), resultSoFar);\n return ''.concat(resultSoFar, substitution, remainingPart);\n }\n /**\n * Iterate through each transformer, applying the transformer's `onString` method to the template\n * strings before all substitutions are processed.\n * @param {String} str - The input string\n * @return {String} - The final results of processing each transformer\n */\n\n }, {\n key: 'transformString',\n value: function transformString(str) {\n var cb = function cb(res, transform) {\n return transform.onString ? transform.onString(res) : res;\n };\n\n return this.transformers.reduce(cb, str);\n }\n /**\n * When a substitution is encountered, iterates through each transformer and applies the transformer's\n * `onSubstitution` method to the substitution.\n * @param {*} substitution - The current substitution\n * @param {String} resultSoFar - The result up to and excluding this substitution.\n * @return {*} - The final result of applying all substitution transformations.\n */\n\n }, {\n key: 'transformSubstitution',\n value: function transformSubstitution(substitution, resultSoFar) {\n var cb = function cb(res, transform) {\n return transform.onSubstitution ? transform.onSubstitution(res, resultSoFar) : res;\n };\n\n return this.transformers.reduce(cb, substitution);\n }\n /**\n * Iterates through each transformer, applying the transformer's `onEndResult` method to the\n * template literal after all substitutions have finished processing.\n * @param {String} endResult - The processed template, just before it is returned from the tag\n * @return {String} - The final results of processing each transformer\n */\n\n }, {\n key: 'transformEndResult',\n value: function transformEndResult(endResult) {\n var cb = function cb(res, transform) {\n return transform.onEndResult ? transform.onEndResult(res) : res;\n };\n\n return this.transformers.reduce(cb, endResult);\n }\n }]);\n\n return TemplateTag;\n}();\n\nexport default TemplateTag;","var defaults = {\n separator: '',\n conjunction: '',\n serial: false\n};\n/**\n * Converts an array substitution to a string containing a list\n * @param {String} [opts.separator = ''] - the character that separates each item\n * @param {String} [opts.conjunction = ''] - replace the last separator with this\n * @param {Boolean} [opts.serial = false] - include the separator before the conjunction? (Oxford comma use-case)\n *\n * @return {Object} - a TemplateTag transformer\n */\n\nvar inlineArrayTransformer = function inlineArrayTransformer() {\n var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaults;\n return {\n onSubstitution: function onSubstitution(substitution, resultSoFar) {\n // only operate on arrays\n if (Array.isArray(substitution)) {\n var arrayLength = substitution.length;\n var separator = opts.separator;\n var conjunction = opts.conjunction;\n var serial = opts.serial; // join each item in the array into a string where each item is separated by separator\n // be sure to maintain indentation\n\n var indent = resultSoFar.match(/(\\n?[^\\S\\n]+)$/);\n\n if (indent) {\n substitution = substitution.join(separator + indent[1]);\n } else {\n substitution = substitution.join(separator + ' ');\n } // if conjunction is set, replace the last separator with conjunction, but only if there is more than one substitution\n\n\n if (conjunction && arrayLength > 1) {\n var separatorIndex = substitution.lastIndexOf(separator);\n substitution = substitution.slice(0, separatorIndex) + (serial ? separator : '') + ' ' + conjunction + substitution.slice(separatorIndex + 1);\n }\n }\n\n return substitution;\n }\n };\n};\n\nexport default inlineArrayTransformer;","function _toConsumableArray(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n}\n/**\n * strips indentation from a template literal\n * @param {String} type = 'initial' - whether to remove all indentation or just leading indentation. can be 'all' or 'initial'\n * @return {Object} - a TemplateTag transformer\n */\n\n\nvar stripIndentTransformer = function stripIndentTransformer() {\n var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'initial';\n return {\n onEndResult: function onEndResult(endResult) {\n if (type === 'initial') {\n // remove the shortest leading indentation from each line\n var match = endResult.match(/^[^\\S\\n]*(?=\\S)/gm);\n var indent = match && Math.min.apply(Math, _toConsumableArray(match.map(function (el) {\n return el.length;\n })));\n\n if (indent) {\n var regexp = new RegExp('^.{' + indent + '}', 'gm');\n return endResult.replace(regexp, '');\n }\n\n return endResult;\n }\n\n if (type === 'all') {\n // remove all indentation from each line\n return endResult.replace(/^[^\\S\\n]+/gm, '');\n }\n\n throw new Error('Unknown type: ' + type);\n }\n };\n};\n\nexport default stripIndentTransformer;","/**\n * TemplateTag transformer that trims whitespace on the end result of a tagged template\n * @param {String} side = '' - The side of the string to trim. Can be 'start' or 'end' (alternatively 'left' or 'right')\n * @return {Object} - a TemplateTag transformer\n */\nvar trimResultTransformer = function trimResultTransformer() {\n var side = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return {\n onEndResult: function onEndResult(endResult) {\n if (side === '') {\n return endResult.trim();\n }\n\n side = side.toLowerCase();\n\n if (side === 'start' || side === 'left') {\n return endResult.replace(/^\\s*/, '');\n }\n\n if (side === 'end' || side === 'right') {\n return endResult.replace(/\\s*$/, '');\n }\n\n throw new Error('Side not supported: ' + side);\n }\n };\n};\n\nexport default trimResultTransformer;","var splitStringTransformer = function splitStringTransformer(splitBy) {\n return {\n onSubstitution: function onSubstitution(substitution, resultSoFar) {\n if (splitBy != null && typeof splitBy === 'string') {\n if (typeof substitution === 'string' && substitution.includes(splitBy)) {\n substitution = substitution.split(splitBy);\n }\n } else {\n throw new Error('You need to specify a string character to split by.');\n }\n\n return substitution;\n }\n };\n};\n\nexport default splitStringTransformer;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar commaLists = new TemplateTag(inlineArrayTransformer({\n separator: ','\n}), stripIndentTransformer, trimResultTransformer);\nexport default commaLists;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar commaListsAnd = new TemplateTag(inlineArrayTransformer({\n separator: ',',\n conjunction: 'and'\n}), stripIndentTransformer, trimResultTransformer);\nexport default commaListsAnd;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar commaListsOr = new TemplateTag(inlineArrayTransformer({\n separator: ',',\n conjunction: 'or'\n}), stripIndentTransformer, trimResultTransformer);\nexport default commaListsOr;","var isValidValue = function isValidValue(x) {\n return x != null && !Number.isNaN(x) && typeof x !== 'boolean';\n};\n\nvar removeNonPrintingValuesTransformer = function removeNonPrintingValuesTransformer() {\n return {\n onSubstitution: function onSubstitution(substitution) {\n if (Array.isArray(substitution)) {\n return substitution.filter(isValidValue);\n }\n\n if (isValidValue(substitution)) {\n return substitution;\n }\n\n return '';\n }\n };\n};\n\nexport default removeNonPrintingValuesTransformer;","var replaceSubstitutionTransformer = function replaceSubstitutionTransformer(replaceWhat, replaceWith) {\n return {\n onSubstitution: function onSubstitution(substitution, resultSoFar) {\n if (replaceWhat == null || replaceWith == null) {\n throw new Error('replaceSubstitutionTransformer requires at least 2 arguments.');\n } // Do not touch if null or undefined\n\n\n if (substitution == null) {\n return substitution;\n } else {\n return substitution.toString().replace(replaceWhat, replaceWith);\n }\n }\n };\n};\n\nexport default replaceSubstitutionTransformer;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport splitStringTransformer from '../splitStringTransformer';\nimport removeNonPrintingValuesTransformer from '../removeNonPrintingValuesTransformer';\nvar html = new TemplateTag(splitStringTransformer('\\n'), removeNonPrintingValuesTransformer, inlineArrayTransformer, stripIndentTransformer, trimResultTransformer);\nexport default html;","/**\n * Replaces tabs, newlines and spaces with the chosen value when they occur in sequences\n * @param {(String|RegExp)} replaceWhat - the value or pattern that should be replaced\n * @param {*} replaceWith - the replacement value\n * @return {Object} - a TemplateTag transformer\n */\nvar replaceResultTransformer = function replaceResultTransformer(replaceWhat, replaceWith) {\n return {\n onEndResult: function onEndResult(endResult) {\n if (replaceWhat == null || replaceWith == null) {\n throw new Error('replaceResultTransformer requires at least 2 arguments.');\n }\n\n return endResult.replace(replaceWhat, replaceWith);\n }\n };\n};\n\nexport default replaceResultTransformer;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport splitStringTransformer from '../splitStringTransformer';\nimport replaceSubstitutionTransformer from '../replaceSubstitutionTransformer';\nvar safeHtml = new TemplateTag(splitStringTransformer('\\n'), inlineArrayTransformer, stripIndentTransformer, trimResultTransformer, replaceSubstitutionTransformer(/&/g, '&'), replaceSubstitutionTransformer(//g, '>'), replaceSubstitutionTransformer(/\"/g, '"'), replaceSubstitutionTransformer(/'/g, '''), replaceSubstitutionTransformer(/`/g, '`'));\nexport default safeHtml;","import TemplateTag from '../TemplateTag';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLine = new TemplateTag(replaceResultTransformer(/(?:\\n(?:\\s*))+/g, ' '), trimResultTransformer);\nexport default oneLine;","import TemplateTag from '../TemplateTag';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLineTrim = new TemplateTag(replaceResultTransformer(/(?:\\n\\s*)/g, ''), trimResultTransformer);\nexport default oneLineTrim;","import TemplateTag from '../TemplateTag';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLineCommaLists = new TemplateTag(inlineArrayTransformer({\n separator: ','\n}), replaceResultTransformer(/(?:\\s+)/g, ' '), trimResultTransformer);\nexport default oneLineCommaLists;","import TemplateTag from '../TemplateTag';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLineCommaListsOr = new TemplateTag(inlineArrayTransformer({\n separator: ',',\n conjunction: 'or'\n}), replaceResultTransformer(/(?:\\s+)/g, ' '), trimResultTransformer);\nexport default oneLineCommaListsOr;","import TemplateTag from '../TemplateTag';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLineCommaListsAnd = new TemplateTag(inlineArrayTransformer({\n separator: ',',\n conjunction: 'and'\n}), replaceResultTransformer(/(?:\\s+)/g, ' '), trimResultTransformer);\nexport default oneLineCommaListsAnd;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar inlineLists = new TemplateTag(inlineArrayTransformer, stripIndentTransformer, trimResultTransformer);\nexport default inlineLists;","import TemplateTag from '../TemplateTag';\nimport inlineArrayTransformer from '../inlineArrayTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nimport replaceResultTransformer from '../replaceResultTransformer';\nvar oneLineInlineLists = new TemplateTag(inlineArrayTransformer, replaceResultTransformer(/(?:\\s+)/g, ' '), trimResultTransformer);\nexport default oneLineInlineLists;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar stripIndent = new TemplateTag(stripIndentTransformer, trimResultTransformer);\nexport default stripIndent;","import TemplateTag from '../TemplateTag';\nimport stripIndentTransformer from '../stripIndentTransformer';\nimport trimResultTransformer from '../trimResultTransformer';\nvar stripIndents = new TemplateTag(stripIndentTransformer('all'), trimResultTransformer);\nexport default stripIndents;","\"use strict\";\n\nmodule.exports = Object.assign;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n\n/* global Reflect, Promise */\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return _assign.apply(this, arguments);\n};\n\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {\n if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n }\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, {\n enumerable: true,\n get: function get() {\n return m[k];\n }\n });\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) {\n if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n }\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {\n ar.push(r.value);\n }\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) {\n ar = ar.concat(__read(arguments[i]));\n }\n\n return ar;\n}\n/** @deprecated */\n\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) {\n s += arguments[i].length;\n }\n\n for (var r = Array(s), k = 0, i = 0; i < il; i++) {\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {\n r[k] = a[j];\n }\n }\n\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n\n function fulfill(value) {\n resume(\"next\", value);\n }\n\n function reject(value) {\n resume(\"throw\", value);\n }\n\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n\n return cooked;\n}\n;\n\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) {\n if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n }\n\n __setModuleDefault(result, mod);\n\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw TypeError(tryToString(argument) + ' is not a function');\n};\n","var isObject = require('../internals/is-object');\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw TypeError(String(argument) + ' is not an object');\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar has = require('../internals/has');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = has(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","module.exports = {};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument === 'function';\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it === 'object' ? it !== null : isCallable(it);\n};\n","module.exports = false;\n","var isCallable = require('../internals/is-callable');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && Object(it) instanceof $Symbol;\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = fn.call(input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var name = options && options.name !== undefined ? options.name : key;\n var state;\n if (isCallable(value)) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (!has(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n createNonEnumerableProperty(value, 'name', name);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n});\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (key, value) {\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.18.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = exoticToPrim.call(input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : String(key);\n};\n","module.exports = function (argument) {\n try {\n return String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\n\n// `globalThis` object\n// https://tc39.es/ecma262/#sec-globalthis\n$({ global: true }, {\n globalThis: global\n});\n","// TODO: Remove from `core-js@4`\nrequire('../modules/es.global-this');\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.withPrefix = withPrefix;\nexports.withAssetPrefix = withAssetPrefix;\nexports.navigate = exports.default = void 0;\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutPropertiesLoose\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reachRouter = require(\"@gatsbyjs/reach-router\");\n\nvar _utils = require(\"@gatsbyjs/reach-router/lib/utils\");\n\nvar _parsePath = require(\"./parse-path\");\n\nexports.parsePath = _parsePath.parsePath;\nvar _excluded = [\"to\", \"getProps\", \"onClick\", \"onMouseEnter\", \"activeClassName\", \"activeStyle\", \"innerRef\", \"partiallyActive\", \"state\", \"replace\", \"_location\"];\n\nvar isAbsolutePath = function isAbsolutePath(path) {\n return path === null || path === void 0 ? void 0 : path.startsWith(\"/\");\n};\n\nfunction withPrefix(path, prefix) {\n var _ref, _prefix;\n\n if (prefix === void 0) {\n prefix = getGlobalBasePrefix();\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n if (path.startsWith(\"./\") || path.startsWith(\"../\")) {\n return path;\n }\n\n var base = (_ref = (_prefix = prefix) !== null && _prefix !== void 0 ? _prefix : getGlobalPathPrefix()) !== null && _ref !== void 0 ? _ref : \"/\";\n return \"\" + (base !== null && base !== void 0 && base.endsWith(\"/\") ? base.slice(0, -1) : base) + (path.startsWith(\"/\") ? path : \"/\" + path);\n} // These global values are wrapped in typeof clauses to ensure the values exist.\n// This is especially problematic in unit testing of this component.\n\n\nvar getGlobalPathPrefix = function getGlobalPathPrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __PATH_PREFIX__ !== \"undefined\" ? __PATH_PREFIX__ : undefined : __PATH_PREFIX__;\n};\n\nvar getGlobalBasePrefix = function getGlobalBasePrefix() {\n return process.env.NODE_ENV !== \"production\" ? typeof __BASE_PATH__ !== \"undefined\" ? __BASE_PATH__ : undefined : __BASE_PATH__;\n};\n\nvar isLocalLink = function isLocalLink(path) {\n return path && !path.startsWith(\"http://\") && !path.startsWith(\"https://\") && !path.startsWith(\"//\");\n};\n\nfunction withAssetPrefix(path) {\n return withPrefix(path, getGlobalPathPrefix());\n}\n\nfunction absolutify(path, current) {\n // If it's already absolute, return as-is\n if (isAbsolutePath(path)) {\n return path;\n }\n\n return (0, _utils.resolve)(path, current);\n}\n\nvar rewriteLinkPath = function rewriteLinkPath(path, relativeTo) {\n if (typeof path === \"number\") {\n return path;\n }\n\n if (!isLocalLink(path)) {\n return path;\n }\n\n return isAbsolutePath(path) ? withPrefix(path) : absolutify(path, relativeTo);\n};\n\nvar NavLinkPropTypes = {\n activeClassName: _propTypes.default.string,\n activeStyle: _propTypes.default.object,\n partiallyActive: _propTypes.default.bool\n}; // Set up IntersectionObserver\n\nvar createIntersectionObserver = function createIntersectionObserver(el, cb) {\n var io = new window.IntersectionObserver(function (entries) {\n entries.forEach(function (entry) {\n if (el === entry.target) {\n // Check if element is within viewport, remove listener, destroy observer, and run link callback.\n // MSEdge doesn't currently support isIntersecting, so also test for an intersectionRatio > 0\n if (entry.isIntersecting || entry.intersectionRatio > 0) {\n io.unobserve(el);\n io.disconnect();\n cb();\n }\n }\n });\n }); // Add element to the observer\n\n io.observe(el);\n return {\n instance: io,\n el: el\n };\n};\n\nfunction GatsbyLinkLocationWrapper(props) {\n return /*#__PURE__*/_react.default.createElement(_reachRouter.Location, null, function (_ref2) {\n var location = _ref2.location;\n return /*#__PURE__*/_react.default.createElement(GatsbyLink, (0, _extends2.default)({}, props, {\n _location: location\n }));\n });\n}\n\nvar GatsbyLink = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(GatsbyLink, _React$Component);\n\n function GatsbyLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this; // Default to no support for IntersectionObserver\n\n _this.defaultGetProps = function (_ref3) {\n var isPartiallyCurrent = _ref3.isPartiallyCurrent,\n isCurrent = _ref3.isCurrent;\n\n if (_this.props.partiallyActive ? isPartiallyCurrent : isCurrent) {\n return {\n className: [_this.props.className, _this.props.activeClassName].filter(Boolean).join(\" \"),\n style: (0, _extends2.default)({}, _this.props.style, _this.props.activeStyle)\n };\n }\n\n return null;\n };\n\n var IOSupported = false;\n\n if (typeof window !== \"undefined\" && window.IntersectionObserver) {\n IOSupported = true;\n }\n\n _this.state = {\n IOSupported: IOSupported\n };\n _this.handleRef = _this.handleRef.bind((0, _assertThisInitialized2.default)(_this));\n return _this;\n }\n\n var _proto = GatsbyLink.prototype;\n\n _proto._prefetch = function _prefetch() {\n var currentPath = window.location.pathname; // reach router should have the correct state\n\n if (this.props._location && this.props._location.pathname) {\n currentPath = this.props._location.pathname;\n }\n\n var rewrittenPath = rewriteLinkPath(this.props.to, currentPath);\n var newPathName = (0, _parsePath.parsePath)(rewrittenPath).pathname; // Prefech is used to speed up next navigations. When you use it on the current navigation,\n // there could be a race-condition where Chrome uses the stale data instead of waiting for the network to complete\n\n if (currentPath !== newPathName) {\n ___loader.enqueue(newPathName);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n // Preserve non IO functionality if no support\n if (this.props.to !== prevProps.to && !this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentDidMount = function componentDidMount() {\n // Preserve non IO functionality if no support\n if (!this.state.IOSupported) {\n this._prefetch();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!this.io) {\n return;\n }\n\n var _this$io = this.io,\n instance = _this$io.instance,\n el = _this$io.el;\n instance.unobserve(el);\n instance.disconnect();\n };\n\n _proto.handleRef = function handleRef(ref) {\n var _this2 = this;\n\n if (this.props.innerRef && this.props.innerRef.hasOwnProperty(\"current\")) {\n this.props.innerRef.current = ref;\n } else if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n if (this.state.IOSupported && ref) {\n // If IO supported and element reference found, setup Observer functionality\n this.io = createIntersectionObserver(ref, function () {\n _this2._prefetch();\n });\n }\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n var _this$props = this.props,\n to = _this$props.to,\n _this$props$getProps = _this$props.getProps,\n getProps = _this$props$getProps === void 0 ? this.defaultGetProps : _this$props$getProps,\n _onClick = _this$props.onClick,\n _onMouseEnter = _this$props.onMouseEnter,\n $activeClassName = _this$props.activeClassName,\n $activeStyle = _this$props.activeStyle,\n $innerRef = _this$props.innerRef,\n partiallyActive = _this$props.partiallyActive,\n state = _this$props.state,\n replace = _this$props.replace,\n _location = _this$props._location,\n rest = (0, _objectWithoutPropertiesLoose2.default)(_this$props, _excluded);\n\n if (process.env.NODE_ENV !== \"production\" && !isLocalLink(to)) {\n console.warn(\"External link \" + to + \" was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links\");\n }\n\n var prefixedTo = rewriteLinkPath(to, _location.pathname);\n\n if (!isLocalLink(prefixedTo)) {\n return /*#__PURE__*/_react.default.createElement(\"a\", (0, _extends2.default)({\n href: prefixedTo\n }, rest));\n }\n\n return /*#__PURE__*/_react.default.createElement(_reachRouter.Link, (0, _extends2.default)({\n to: prefixedTo,\n state: state,\n getProps: getProps,\n innerRef: this.handleRef,\n onMouseEnter: function onMouseEnter(e) {\n if (_onMouseEnter) {\n _onMouseEnter(e);\n }\n\n ___loader.hovering((0, _parsePath.parsePath)(prefixedTo).pathname);\n },\n onClick: function onClick(e) {\n if (_onClick) {\n _onClick(e);\n }\n\n if (e.button === 0 && // ignore right clicks\n !_this3.props.target && // let browser handle \"target=_blank\"\n !e.defaultPrevented && // onClick prevented default\n !e.metaKey && // ignore clicks with modifier keys...\n !e.altKey && !e.ctrlKey && !e.shiftKey) {\n e.preventDefault();\n var shouldReplace = replace;\n\n var isCurrent = encodeURI(prefixedTo) === _location.pathname;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n shouldReplace = true;\n } // Make sure the necessary scripts and data are\n // loaded before continuing.\n\n\n window.___navigate(prefixedTo, {\n state: state,\n replace: shouldReplace\n });\n }\n\n return true;\n }\n }, rest));\n };\n\n return GatsbyLink;\n}(_react.default.Component);\n\nGatsbyLink.propTypes = (0, _extends2.default)({}, NavLinkPropTypes, {\n onClick: _propTypes.default.func,\n to: _propTypes.default.string.isRequired,\n replace: _propTypes.default.bool,\n state: _propTypes.default.object\n});\n\nvar _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n return /*#__PURE__*/_react.default.createElement(GatsbyLinkLocationWrapper, (0, _extends2.default)({\n innerRef: ref\n }, props));\n});\n\nexports.default = _default;\n\nvar navigate = function navigate(to, options) {\n window.___navigate(rewriteLinkPath(to, window.location.pathname), options);\n};\n\nexports.navigate = navigate;","\"use strict\";\n\nexports.__esModule = true;\nexports.parsePath = parsePath;\n\nfunction parsePath(path) {\n var pathname = path || \"/\";\n var search = \"\";\n var hash = \"\";\n var hashIndex = pathname.indexOf(\"#\");\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf(\"?\");\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === \"?\" ? \"\" : search,\n hash: hash === \"#\" ? \"\" : hash\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = exports.ScrollContext = void 0;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nexports.ScrollContext = _scrollHandler.ScrollHandler;\n\nvar _useScrollRestoration = require(\"./use-scroll-restoration\");\n\nexports.useScrollRestoration = _useScrollRestoration.useScrollRestoration;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.ScrollHandler = exports.ScrollContext = void 0;\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _sessionStorage = require(\"./session-storage\");\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nvar ScrollContext = /*#__PURE__*/React.createContext(new _sessionStorage.SessionStorage());\nexports.ScrollContext = ScrollContext;\nScrollContext.displayName = \"GatsbyScrollContext\";\n\nvar ScrollHandler = /*#__PURE__*/function (_React$Component) {\n (0, _inheritsLoose2.default)(ScrollHandler, _React$Component);\n\n function ScrollHandler() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._stateStorage = new _sessionStorage.SessionStorage();\n _this._isTicking = false;\n _this._latestKnownScrollY = 0;\n\n _this.scrollListener = function () {\n _this._latestKnownScrollY = window.scrollY;\n\n if (!_this._isTicking) {\n _this._isTicking = true;\n requestAnimationFrame(_this._saveScroll.bind((0, _assertThisInitialized2.default)(_this)));\n }\n };\n\n _this.windowScroll = function (position, prevProps) {\n if (_this.shouldUpdateScroll(prevProps, _this.props)) {\n window.scrollTo(0, position);\n }\n };\n\n _this.scrollToHash = function (hash, prevProps) {\n var node = document.getElementById(hash.substring(1));\n\n if (node && _this.shouldUpdateScroll(prevProps, _this.props)) {\n node.scrollIntoView();\n }\n };\n\n _this.shouldUpdateScroll = function (prevRouterProps, routerProps) {\n var shouldUpdateScroll = _this.props.shouldUpdateScroll;\n\n if (!shouldUpdateScroll) {\n return true;\n } // Hack to allow accessing this._stateStorage.\n\n\n return shouldUpdateScroll.call((0, _assertThisInitialized2.default)(_this), prevRouterProps, routerProps);\n };\n\n return _this;\n }\n\n var _proto = ScrollHandler.prototype;\n\n _proto._saveScroll = function _saveScroll() {\n var key = this.props.location.key || null;\n\n if (key) {\n this._stateStorage.save(this.props.location, key, this._latestKnownScrollY);\n }\n\n this._isTicking = false;\n };\n\n _proto.componentDidMount = function componentDidMount() {\n window.addEventListener(\"scroll\", this.scrollListener);\n var scrollPosition;\n var _this$props$location = this.props.location,\n key = _this$props$location.key,\n hash = _this$props$location.hash;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n\n if (scrollPosition) {\n this.windowScroll(scrollPosition, undefined);\n } else if (hash) {\n this.scrollToHash(decodeURI(hash), undefined);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n window.removeEventListener(\"scroll\", this.scrollListener);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props$location2 = this.props.location,\n hash = _this$props$location2.hash,\n key = _this$props$location2.key;\n var scrollPosition;\n\n if (key) {\n scrollPosition = this._stateStorage.read(this.props.location, key);\n }\n /** There are two pieces of state: the browser url and\n * history state which keeps track of scroll position\n * Native behaviour prescribes that we ought to restore scroll position\n * when a user navigates back in their browser (this is the `POP` action)\n * Currently, reach router has a bug that prevents this at https://github.com/reach/router/issues/228\n * So we _always_ stick to the url as a source of truth — if the url\n * contains a hash, we scroll to it\n */\n\n\n if (hash) {\n this.scrollToHash(decodeURI(hash), prevProps);\n } else {\n this.windowScroll(scrollPosition, prevProps);\n }\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(ScrollContext.Provider, {\n value: this._stateStorage\n }, this.props.children);\n };\n\n return ScrollHandler;\n}(React.Component);\n\nexports.ScrollHandler = ScrollHandler;\nScrollHandler.propTypes = {\n shouldUpdateScroll: _propTypes.default.func,\n children: _propTypes.default.element.isRequired,\n location: _propTypes.default.object.isRequired\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.SessionStorage = void 0;\nvar STATE_KEY_PREFIX = \"@@scroll|\";\nvar GATSBY_ROUTER_SCROLL_STATE = \"___GATSBY_REACT_ROUTER_SCROLL\";\n\nvar SessionStorage = /*#__PURE__*/function () {\n function SessionStorage() {}\n\n var _proto = SessionStorage.prototype;\n\n _proto.read = function read(location, key) {\n var stateKey = this.getStateKey(location, key);\n\n try {\n var value = window.sessionStorage.getItem(stateKey);\n return value ? JSON.parse(value) : 0;\n } catch (e) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to access sessionStorage; sessionStorage is not available.\");\n }\n\n if (window && window[GATSBY_ROUTER_SCROLL_STATE] && window[GATSBY_ROUTER_SCROLL_STATE][stateKey]) {\n return window[GATSBY_ROUTER_SCROLL_STATE][stateKey];\n }\n\n return 0;\n }\n };\n\n _proto.save = function save(location, key, value) {\n var stateKey = this.getStateKey(location, key);\n var storedValue = JSON.stringify(value);\n\n try {\n window.sessionStorage.setItem(stateKey, storedValue);\n } catch (e) {\n if (window && window[GATSBY_ROUTER_SCROLL_STATE]) {\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n } else {\n window[GATSBY_ROUTER_SCROLL_STATE] = {};\n window[GATSBY_ROUTER_SCROLL_STATE][stateKey] = JSON.parse(storedValue);\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[gatsby-react-router-scroll] Unable to save state in sessionStorage; sessionStorage is not available.\");\n }\n }\n };\n\n _proto.getStateKey = function getStateKey(location, key) {\n var stateKeyBase = \"\" + STATE_KEY_PREFIX + location.pathname;\n return key === null || typeof key === \"undefined\" ? stateKeyBase : stateKeyBase + \"|\" + key;\n };\n\n return SessionStorage;\n}();\n\nexports.SessionStorage = SessionStorage;","\"use strict\";\n\nexports.__esModule = true;\nexports.useScrollRestoration = useScrollRestoration;\n\nvar _scrollHandler = require(\"./scroll-handler\");\n\nvar _react = require(\"react\");\n\nvar _reachRouter = require(\"@gatsbyjs/reach-router\");\n\nfunction useScrollRestoration(identifier) {\n var location = (0, _reachRouter.useLocation)();\n var state = (0, _react.useContext)(_scrollHandler.ScrollContext);\n var ref = (0, _react.useRef)(null);\n (0, _react.useLayoutEffect)(function () {\n if (ref.current) {\n var position = state.read(location, identifier);\n ref.current.scrollTo(0, position || 0);\n }\n }, [location.key]);\n return {\n ref: ref,\n onScroll: function onScroll() {\n if (ref.current) {\n state.save(location, identifier, ref.current.scrollTop);\n }\n }\n };\n}","// prefer default export if available\nconst preferDefault = m => (m && m.default) || m\n\nexports.components = {\n \"component---cache-caches-gatsby-plugin-offline-app-shell-js\": () => import(\"./../../caches/gatsby-plugin-offline/app-shell.js\" /* webpackChunkName: \"component---cache-caches-gatsby-plugin-offline-app-shell-js\" */),\n \"component---src-pages-404-js\": () => import(\"./../../../src/pages/404.js\" /* webpackChunkName: \"component---src-pages-404-js\" */),\n \"component---src-pages-app-account-js\": () => import(\"./../../../src/pages/app/account.js\" /* webpackChunkName: \"component---src-pages-app-account-js\" */),\n \"component---src-pages-app-cpaform-js\": () => import(\"./../../../src/pages/app/cpaform.js\" /* webpackChunkName: \"component---src-pages-app-cpaform-js\" */),\n \"component---src-pages-app-instrument-condition-report-[id]-js\": () => import(\"./../../../src/pages/app/instrument/conditionReport/[id].js\" /* webpackChunkName: \"component---src-pages-app-instrument-condition-report-[id]-js\" */),\n \"component---src-pages-app-instrument-edit-[id]-js\": () => import(\"./../../../src/pages/app/instrument/edit/[id].js\" /* webpackChunkName: \"component---src-pages-app-instrument-edit-[id]-js\" */),\n \"component---src-pages-app-instrument-index-js\": () => import(\"./../../../src/pages/app/instrument/index.js\" /* webpackChunkName: \"component---src-pages-app-instrument-index-js\" */),\n \"component---src-pages-app-instrument-media-[id]-js\": () => import(\"./../../../src/pages/app/instrument/media/[id].js\" /* webpackChunkName: \"component---src-pages-app-instrument-media-[id]-js\" */),\n \"component---src-pages-app-instrument-new-js\": () => import(\"./../../../src/pages/app/instrument/new.js\" /* webpackChunkName: \"component---src-pages-app-instrument-new-js\" */),\n \"component---src-pages-app-instrument-provenance-[id]-js\": () => import(\"./../../../src/pages/app/instrument/provenance/[id].js\" /* webpackChunkName: \"component---src-pages-app-instrument-provenance-[id]-js\" */),\n \"component---src-pages-app-instrument-redirectsubmit-js\": () => import(\"./../../../src/pages/app/instrument/redirectsubmit.js\" /* webpackChunkName: \"component---src-pages-app-instrument-redirectsubmit-js\" */),\n \"component---src-pages-app-js\": () => import(\"./../../../src/pages/app.js\" /* webpackChunkName: \"component---src-pages-app-js\" */),\n \"component---src-pages-cpr-js\": () => import(\"./../../../src/pages/cpr.js\" /* webpackChunkName: \"component---src-pages-cpr-js\" */),\n \"component---src-pages-filebrowser-js\": () => import(\"./../../../src/pages/filebrowser.js\" /* webpackChunkName: \"component---src-pages-filebrowser-js\" */),\n \"component---src-pages-index-js\": () => import(\"./../../../src/pages/index.js\" /* webpackChunkName: \"component---src-pages-index-js\" */),\n \"component---src-pages-login-js\": () => import(\"./../../../src/pages/login.js\" /* webpackChunkName: \"component---src-pages-login-js\" */),\n \"component---src-pages-redirect-register-js\": () => import(\"./../../../src/pages/redirect-register.js\" /* webpackChunkName: \"component---src-pages-redirect-register-js\" */),\n \"component---src-pages-register-js\": () => import(\"./../../../src/pages/register.js\" /* webpackChunkName: \"component---src-pages-register-js\" */),\n \"component---src-pages-reset-password-js\": () => import(\"./../../../src/pages/reset-password.js\" /* webpackChunkName: \"component---src-pages-reset-password-js\" */),\n \"component---src-pages-search-js\": () => import(\"./../../../src/pages/search.js\" /* webpackChunkName: \"component---src-pages-search-js\" */),\n \"component---src-pages-terms-page-js\": () => import(\"./../../../src/pages/termsPage.js\" /* webpackChunkName: \"component---src-pages-terms-page-js\" */),\n \"component---src-template-ins-detail-js\": () => import(\"./../../../src/template/ins-detail.js\" /* webpackChunkName: \"component---src-template-ins-detail-js\" */)\n}\n\n","module.exports = [{\n plugin: require('../node_modules/gatsby-plugin-google-gtag/gatsby-browser.js'),\n options: {\"plugins\":[],\"trackingIds\":[\"G-88DVCH4VMX\"],\"gtagConfig\":{\"optimize_id\":\"OPT-NRQBQX4\",\"anonymize_ip\":true,\"cookie_expires\":0},\"pluginConfig\":{\"head\":false,\"respectDNT\":true,\"exclude\":[\"/preview/**\",\"/do-not-track/me/too/\"]}},\n },{\n plugin: require('../node_modules/gatsby-plugin-image/gatsby-browser.js'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../node_modules/gatsby-plugin-manifest/gatsby-browser.js'),\n options: {\"plugins\":[],\"name\":\"FindMyInstrument™\",\"short_name\":\"FMI\",\"start_url\":\"/\",\"background_color\":\"#000000\",\"theme_color\":\"#000000\",\"display\":\"standalone\",\"icon\":\"src/images/favicon.png\",\"legacy\":true,\"theme_color_in_head\":true,\"cache_busting_mode\":\"query\",\"crossOrigin\":\"anonymous\",\"include_favicon\":true,\"cacheDigest\":\"8bb946a3bc885530627fabc02e412dca\"},\n },{\n plugin: require('../node_modules/gatsby-plugin-gatsby-cloud/gatsby-browser.js'),\n options: {\"plugins\":[]},\n },{\n plugin: require('../node_modules/gatsby-plugin-offline/gatsby-browser.js'),\n options: {\"plugins\":[],\"precachePages\":[\"/\",\"/instrument/*\"]},\n },{\n plugin: require('../gatsby-browser.js'),\n options: {\"plugins\":[]},\n }]\n","const plugins = require(`./api-runner-browser-plugins`)\nconst { getResourceURLsForPathname, loadPage, loadPageSync } =\n require(`./loader`).publicLoader\n\nexports.apiRunner = (api, args = {}, defaultReturn, argTransform) => {\n // Hooks for gatsby-cypress's API handler\n if (process.env.CYPRESS_SUPPORT) {\n if (window.___apiHandler) {\n window.___apiHandler(api)\n } else if (window.___resolvedAPIs) {\n window.___resolvedAPIs.push(api)\n } else {\n window.___resolvedAPIs = [api]\n }\n }\n\n let results = plugins.map(plugin => {\n if (!plugin.plugin[api]) {\n return undefined\n }\n\n args.getResourceURLsForPathname = getResourceURLsForPathname\n args.loadPage = loadPage\n args.loadPageSync = loadPageSync\n\n const result = plugin.plugin[api](args, plugin.options)\n if (result && argTransform) {\n args = argTransform({ args, result, plugin })\n }\n return result\n })\n\n // Filter out undefined results.\n results = results.filter(result => typeof result !== `undefined`)\n\n if (results.length > 0) {\n return results\n } else if (defaultReturn) {\n return [defaultReturn]\n } else {\n return []\n }\n}\n\nexports.apiRunnerAsync = (api, args, defaultReturn) =>\n plugins.reduce(\n (previous, next) =>\n next.plugin[api]\n ? previous.then(() => next.plugin[api](args, next.options))\n : previous,\n Promise.resolve()\n )\n","// \n// An event handler can take an optional event argument\n// and should not return a value\n \n \n\n// An array of all currently registered event handlers for a type\n \n \n// A map of event types and their corresponding event handlers.\n \n \n \n \n\n/** Mitt: Tiny (~200b) functional event emitter / pubsub.\n * @name mitt\n * @returns {Mitt}\n */\nfunction mitt(all ) {\n\tall = all || Object.create(null);\n\n\treturn {\n\t\t/**\n\t\t * Register an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to listen for, or `\"*\"` for all events\n\t\t * @param {Function} handler Function to call in response to given event\n\t\t * @memberOf mitt\n\t\t */\n\t\ton: function on(type , handler ) {\n\t\t\t(all[type] || (all[type] = [])).push(handler);\n\t\t},\n\n\t\t/**\n\t\t * Remove an event handler for the given type.\n\t\t *\n\t\t * @param {String} type\tType of event to unregister `handler` from, or `\"*\"`\n\t\t * @param {Function} handler Handler function to remove\n\t\t * @memberOf mitt\n\t\t */\n\t\toff: function off(type , handler ) {\n\t\t\tif (all[type]) {\n\t\t\t\tall[type].splice(all[type].indexOf(handler) >>> 0, 1);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Invoke all handlers for the given type.\n\t\t * If present, `\"*\"` handlers are invoked after type-matched handlers.\n\t\t *\n\t\t * @param {String} type The event type to invoke\n\t\t * @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler\n\t\t * @memberOf mitt\n\t\t */\n\t\temit: function emit(type , evt ) {\n\t\t\t(all[type] || []).slice().map(function (handler) { handler(evt); });\n\t\t\t(all['*'] || []).slice().map(function (handler) { handler(type, evt); });\n\t\t}\n\t};\n}\n\nexport default mitt;\n//# sourceMappingURL=mitt.es.js.map\n","import mitt from \"mitt\"\n\nconst emitter = mitt()\nexport default emitter\n","export default path => {\n if (path === undefined) {\n return path\n }\n if (path === `/`) {\n return `/`\n }\n if (path.charAt(path.length - 1) === `/`) {\n return path.slice(0, -1)\n }\n return path\n}\n","import { pick } from \"@gatsbyjs/reach-router/lib/utils\"\nimport stripPrefix from \"./strip-prefix\"\nimport normalizePagePath from \"./normalize-page-path\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\n\nconst pathCache = new Map()\nlet matchPaths = []\n\nconst trimPathname = rawPathname => {\n const pathname = decodeURIComponent(rawPathname)\n // Remove the pathPrefix from the pathname.\n const trimmedPathname = stripPrefix(\n pathname,\n decodeURIComponent(__BASE_PATH__)\n )\n // Remove any hashfragment\n .split(`#`)[0]\n // Remove search query\n .split(`?`)[0]\n\n return trimmedPathname\n}\n\nfunction absolutify(path) {\n // If it's already absolute, return as-is\n if (\n path.startsWith(`/`) ||\n path.startsWith(`https://`) ||\n path.startsWith(`http://`)\n ) {\n return path\n }\n // Calculate path relative to current location, adding a trailing slash to\n // match behavior of @reach/router\n return new URL(\n path,\n window.location.href + (window.location.href.endsWith(`/`) ? `` : `/`)\n ).pathname\n}\n\n/**\n * Set list of matchPaths\n *\n * @param {Array<{path: string, matchPath: string}>} value collection of matchPaths\n */\nexport const setMatchPaths = value => {\n matchPaths = value\n}\n\n/**\n * Return a matchpath url\n * if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n * `/foo?bar=far` => `/page1`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string|null}\n */\nexport const findMatchPath = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return normalizePagePath(path.route.originalPath)\n }\n\n return null\n}\n\n/**\n * Return a matchpath params from reach/router rules\n * if `match-paths.json` contains `{ \":bar/*foo\" }`, and the path is /baz/zaz/zoo\n * then it returns\n * { bar: baz, foo: zaz/zoo }\n *\n * @param {string} rawPathname A raw pathname\n * @return {object}\n */\nexport const grabMatchParams = rawPathname => {\n const trimmedPathname = cleanPath(rawPathname)\n\n const pickPaths = matchPaths.map(({ path, matchPath }) => {\n return {\n path: matchPath,\n originalPath: path,\n }\n })\n\n const path = pick(pickPaths, trimmedPathname)\n\n if (path) {\n return path.params\n }\n\n return {}\n}\n\n// Given a raw URL path, returns the cleaned version of it (trim off\n// `#` and query params), or if it matches an entry in\n// `match-paths.json`, its matched path is returned\n//\n// E.g. `/foo?bar=far` => `/foo`\n//\n// Or if `match-paths.json` contains `{ \"/foo*\": \"/page1\", ...}`, then\n// `/foo?bar=far` => `/page1`\nexport const findPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n if (pathCache.has(trimmedPathname)) {\n return pathCache.get(trimmedPathname)\n }\n\n const redirect = maybeGetBrowserRedirect(rawPathname)\n if (redirect) {\n return findPath(redirect.toPath)\n }\n\n let foundPath = findMatchPath(trimmedPathname)\n\n if (!foundPath) {\n foundPath = cleanPath(rawPathname)\n }\n\n pathCache.set(trimmedPathname, foundPath)\n\n return foundPath\n}\n\n/**\n * Clean a url and converts /index.html => /\n * E.g. `/foo?bar=far` => `/foo`\n *\n * @param {string} rawPathname A raw pathname\n * @return {string}\n */\nexport const cleanPath = rawPathname => {\n const trimmedPathname = trimPathname(absolutify(rawPathname))\n\n let foundPath = trimmedPathname\n if (foundPath === `/index.html`) {\n foundPath = `/`\n }\n\n foundPath = normalizePagePath(foundPath)\n\n return foundPath\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport Link, {\n withPrefix,\n withAssetPrefix,\n navigate,\n push,\n replace,\n navigateTo,\n parsePath,\n} from \"gatsby-link\"\nimport { useScrollRestoration } from \"gatsby-react-router-scroll\"\nimport PageRenderer from \"./public-page-renderer\"\nimport loader from \"./loader\"\n\nconst prefetchPathname = loader.enqueue\n\nconst StaticQueryContext = React.createContext({})\n\nfunction StaticQueryDataRenderer({ staticQueryData, data, query, render }) {\n const finalData = data\n ? data.data\n : staticQueryData[query] && staticQueryData[query].data\n\n return (\n \n {finalData && render(finalData)}\n {!finalData &&

Loading (StaticQuery)
}\n \n )\n}\n\nconst StaticQuery = props => {\n const { data, query, render, children } = props\n\n return (\n \n {staticQueryData => (\n \n )}\n \n )\n}\n\nconst useStaticQuery = query => {\n if (\n typeof React.useContext !== `function` &&\n process.env.NODE_ENV === `development`\n ) {\n throw new Error(\n `You're likely using a version of React that doesn't support Hooks\\n` +\n `Please update React and ReactDOM to 16.8.0 or later to use the useStaticQuery hook.`\n )\n }\n const context = React.useContext(StaticQueryContext)\n\n // query is a stringified number like `3303882` when wrapped with graphql, If a user forgets\n // to wrap the query in a grqphql, then casting it to a Number results in `NaN` allowing us to\n // catch the misuse of the API and give proper direction\n if (isNaN(Number(query))) {\n throw new Error(`useStaticQuery was called with a string but expects to be called using \\`graphql\\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\\`${query}\\`);\n`)\n }\n\n if (context[query]?.data) {\n return context[query].data\n } else {\n throw new Error(\n `The result of this StaticQuery could not be fetched.\\n\\n` +\n `This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +\n `please open an issue in https://github.com/gatsbyjs/gatsby/issues`\n )\n }\n}\n\nStaticQuery.propTypes = {\n data: PropTypes.object,\n query: PropTypes.string.isRequired,\n render: PropTypes.func,\n children: PropTypes.func,\n}\n\nfunction graphql() {\n throw new Error(\n `It appears like Gatsby is misconfigured. Gatsby related \\`graphql\\` calls ` +\n `are supposed to only be evaluated at compile time, and then compiled away. ` +\n `Unfortunately, something went wrong and the query was left in the compiled code.\\n\\n` +\n `Unless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.`\n )\n}\n\nexport {\n Link,\n withAssetPrefix,\n withPrefix,\n graphql,\n parsePath,\n navigate,\n useScrollRestoration,\n StaticQueryContext,\n StaticQuery,\n PageRenderer,\n useStaticQuery,\n prefetchPathname,\n}\n","const support = function (feature) {\n if (typeof document === `undefined`) {\n return false\n }\n const fakeLink = document.createElement(`link`)\n try {\n if (fakeLink.relList && typeof fakeLink.relList.supports === `function`) {\n return fakeLink.relList.supports(feature)\n }\n } catch (err) {\n return false\n }\n return false\n}\n\nconst linkPrefetchStrategy = function (url, options) {\n return new Promise((resolve, reject) => {\n if (typeof document === `undefined`) {\n reject()\n return\n }\n\n const link = document.createElement(`link`)\n link.setAttribute(`rel`, `prefetch`)\n link.setAttribute(`href`, url)\n\n Object.keys(options).forEach(key => {\n link.setAttribute(key, options[key])\n })\n\n link.onload = resolve\n link.onerror = reject\n\n const parentElement =\n document.getElementsByTagName(`head`)[0] ||\n document.getElementsByName(`script`)[0].parentNode\n parentElement.appendChild(link)\n })\n}\n\nconst xhrPrefetchStrategy = function (url) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(`GET`, url, true)\n\n req.onload = () => {\n if (req.status === 200) {\n resolve()\n } else {\n reject()\n }\n }\n\n req.send(null)\n })\n}\n\nconst supportedPrefetchStrategy = support(`prefetch`)\n ? linkPrefetchStrategy\n : xhrPrefetchStrategy\n\nconst preFetched = {}\n\nconst prefetch = function (url, options) {\n return new Promise(resolve => {\n if (preFetched[url]) {\n resolve()\n return\n }\n\n supportedPrefetchStrategy(url, options)\n .then(() => {\n resolve()\n preFetched[url] = true\n })\n .catch(() => {}) // 404s are logged to the console anyway\n })\n}\n\nexport default prefetch\n","import prefetchHelper from \"./prefetch\"\nimport emitter from \"./emitter\"\nimport { setMatchPaths, findPath, findMatchPath } from \"./find-path\"\n\n/**\n * Available resource loading statuses\n */\nexport const PageResourceStatus = {\n /**\n * At least one of critical resources failed to load\n */\n Error: `error`,\n /**\n * Resources loaded successfully\n */\n Success: `success`,\n}\n\nconst preferDefault = m => (m && m.default) || m\n\nconst stripSurroundingSlashes = s => {\n s = s[0] === `/` ? s.slice(1) : s\n s = s.endsWith(`/`) ? s.slice(0, -1) : s\n return s\n}\n\nconst createPageDataUrl = path => {\n const fixedPath = path === `/` ? `index` : stripSurroundingSlashes(path)\n return `${__PATH_PREFIX__}/page-data/${fixedPath}/page-data.json`\n}\n\nfunction doFetch(url, method = `GET`) {\n return new Promise((resolve, reject) => {\n const req = new XMLHttpRequest()\n req.open(method, url, true)\n req.onreadystatechange = () => {\n if (req.readyState == 4) {\n resolve(req)\n }\n }\n req.send(null)\n })\n}\n\nconst doesConnectionSupportPrefetch = () => {\n if (\n `connection` in navigator &&\n typeof navigator.connection !== `undefined`\n ) {\n if ((navigator.connection.effectiveType || ``).includes(`2g`)) {\n return false\n }\n if (navigator.connection.saveData) {\n return false\n }\n }\n return true\n}\n\nconst toPageResources = (pageData, component = null) => {\n const page = {\n componentChunkName: pageData.componentChunkName,\n path: pageData.path,\n webpackCompilationHash: pageData.webpackCompilationHash,\n matchPath: pageData.matchPath,\n staticQueryHashes: pageData.staticQueryHashes,\n }\n\n return {\n component,\n json: pageData.result,\n page,\n }\n}\n\nexport class BaseLoader {\n constructor(loadComponent, matchPaths) {\n // Map of pagePath -> Page. Where Page is an object with: {\n // status: PageResourceStatus.Success || PageResourceStatus.Error,\n // payload: PageResources, // undefined if PageResourceStatus.Error\n // }\n // PageResources is {\n // component,\n // json: pageData.result,\n // page: {\n // componentChunkName,\n // path,\n // webpackCompilationHash,\n // staticQueryHashes\n // },\n // staticQueryResults\n // }\n this.pageDb = new Map()\n this.inFlightDb = new Map()\n this.staticQueryDb = {}\n this.pageDataDb = new Map()\n this.prefetchTriggered = new Set()\n this.prefetchCompleted = new Set()\n this.loadComponent = loadComponent\n setMatchPaths(matchPaths)\n }\n\n inFlightNetworkRequests = new Map()\n\n memoizedGet(url) {\n let inFlightPromise = this.inFlightNetworkRequests.get(url)\n\n if (!inFlightPromise) {\n inFlightPromise = doFetch(url, `GET`)\n this.inFlightNetworkRequests.set(url, inFlightPromise)\n }\n\n // Prefer duplication with then + catch over .finally to prevent problems in ie11 + firefox\n return inFlightPromise\n .then(response => {\n this.inFlightNetworkRequests.delete(url)\n return response\n })\n .catch(err => {\n this.inFlightNetworkRequests.delete(url)\n throw err\n })\n }\n\n setApiRunner(apiRunner) {\n this.apiRunner = apiRunner\n this.prefetchDisabled = apiRunner(`disableCorePrefetching`).some(a => a)\n }\n\n fetchPageDataJson(loadObj) {\n const { pagePath, retries = 0 } = loadObj\n const url = createPageDataUrl(pagePath)\n return this.memoizedGet(url).then(req => {\n const { status, responseText } = req\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.path === undefined) {\n throw new Error(`not a valid pageData response`)\n }\n\n return Object.assign(loadObj, {\n status: PageResourceStatus.Success,\n payload: jsonPayload,\n })\n } catch (err) {\n // continue regardless of error\n }\n }\n\n // Handle 404\n if (status === 404 || status === 200) {\n // If the request was for a 404 page and it doesn't exist, we're done\n if (pagePath === `/404.html`) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Need some code here to cache the 404 request. In case\n // multiple loadPageDataJsons result in 404s\n return this.fetchPageDataJson(\n Object.assign(loadObj, { pagePath: `/404.html`, notFound: true })\n )\n }\n\n // handle 500 response (Unrecoverable)\n if (status === 500) {\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n }\n\n // Handle everything else, including status === 0, and 503s. Should retry\n if (retries < 3) {\n return this.fetchPageDataJson(\n Object.assign(loadObj, { retries: retries + 1 })\n )\n }\n\n // Retried 3 times already, result is an error.\n return Object.assign(loadObj, {\n status: PageResourceStatus.Error,\n })\n })\n }\n\n loadPageDataJson(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDataDb.has(pagePath)) {\n const pageData = this.pageDataDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !pageData.stale) {\n return Promise.resolve(pageData)\n }\n }\n\n return this.fetchPageDataJson({ pagePath }).then(pageData => {\n this.pageDataDb.set(pagePath, pageData)\n\n return pageData\n })\n }\n\n findMatchPath(rawPath) {\n return findMatchPath(rawPath)\n }\n\n // TODO check all uses of this and whether they use undefined for page resources not exist\n loadPage(rawPath) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const page = this.pageDb.get(pagePath)\n if (process.env.BUILD_STAGE !== `develop` || !page.payload.stale) {\n if (page.error) {\n return {\n error: page.error,\n status: page.status,\n }\n }\n\n return Promise.resolve(page.payload)\n }\n }\n\n if (this.inFlightDb.has(pagePath)) {\n return this.inFlightDb.get(pagePath)\n }\n\n const inFlightPromise = Promise.all([\n this.loadAppData(),\n this.loadPageDataJson(pagePath),\n ]).then(allData => {\n const result = allData[1]\n if (result.status === PageResourceStatus.Error) {\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n let pageData = result.payload\n const { componentChunkName, staticQueryHashes = [] } = pageData\n\n const finalResult = {}\n\n const componentChunkPromise = this.loadComponent(componentChunkName).then(\n component => {\n finalResult.createdAt = new Date()\n let pageResources\n if (!component || component instanceof Error) {\n finalResult.status = PageResourceStatus.Error\n finalResult.error = component\n } else {\n finalResult.status = PageResourceStatus.Success\n if (result.notFound === true) {\n finalResult.notFound = true\n }\n pageData = Object.assign(pageData, {\n webpackCompilationHash: allData[0]\n ? allData[0].webpackCompilationHash\n : ``,\n })\n pageResources = toPageResources(pageData, component)\n }\n // undefined if final result is an error\n return pageResources\n }\n )\n\n const staticQueryBatchPromise = Promise.all(\n staticQueryHashes.map(staticQueryHash => {\n // Check for cache in case this static query result has already been loaded\n if (this.staticQueryDb[staticQueryHash]) {\n const jsonPayload = this.staticQueryDb[staticQueryHash]\n return { staticQueryHash, jsonPayload }\n }\n\n return this.memoizedGet(\n `${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json`\n )\n .then(req => {\n const jsonPayload = JSON.parse(req.responseText)\n return { staticQueryHash, jsonPayload }\n })\n .catch(() => {\n throw new Error(\n `We couldn't load \"${__PATH_PREFIX__}/page-data/sq/d/${staticQueryHash}.json\"`\n )\n })\n })\n ).then(staticQueryResults => {\n const staticQueryResultsMap = {}\n\n staticQueryResults.forEach(({ staticQueryHash, jsonPayload }) => {\n staticQueryResultsMap[staticQueryHash] = jsonPayload\n this.staticQueryDb[staticQueryHash] = jsonPayload\n })\n\n return staticQueryResultsMap\n })\n\n return (\n Promise.all([componentChunkPromise, staticQueryBatchPromise])\n .then(([pageResources, staticQueryResults]) => {\n let payload\n if (pageResources) {\n payload = { ...pageResources, staticQueryResults }\n finalResult.payload = payload\n emitter.emit(`onPostLoadPageResources`, {\n page: payload,\n pageResources: payload,\n })\n }\n\n this.pageDb.set(pagePath, finalResult)\n\n if (finalResult.error) {\n return {\n error: finalResult.error,\n status: finalResult.status,\n }\n }\n\n return payload\n })\n // when static-query fail to load we throw a better error\n .catch(err => {\n return {\n error: err,\n status: PageResourceStatus.Error,\n }\n })\n )\n })\n\n inFlightPromise\n .then(() => {\n this.inFlightDb.delete(pagePath)\n })\n .catch(error => {\n this.inFlightDb.delete(pagePath)\n throw error\n })\n\n this.inFlightDb.set(pagePath, inFlightPromise)\n\n return inFlightPromise\n }\n\n // returns undefined if the page does not exists in cache\n loadPageSync(rawPath, options = {}) {\n const pagePath = findPath(rawPath)\n if (this.pageDb.has(pagePath)) {\n const pageData = this.pageDb.get(pagePath)\n\n if (pageData.payload) {\n return pageData.payload\n }\n\n if (options?.withErrorDetails) {\n return {\n error: pageData.error,\n status: pageData.status,\n }\n }\n }\n return undefined\n }\n\n shouldPrefetch(pagePath) {\n // Skip prefetching if we know user is on slow or constrained connection\n if (!doesConnectionSupportPrefetch()) {\n return false\n }\n\n // Check if the page exists.\n if (this.pageDb.has(pagePath)) {\n return false\n }\n\n return true\n }\n\n prefetch(pagePath) {\n if (!this.shouldPrefetch(pagePath)) {\n return false\n }\n\n // Tell plugins with custom prefetching logic that they should start\n // prefetching this path.\n if (!this.prefetchTriggered.has(pagePath)) {\n this.apiRunner(`onPrefetchPathname`, { pathname: pagePath })\n this.prefetchTriggered.add(pagePath)\n }\n\n // If a plugin has disabled core prefetching, stop now.\n if (this.prefetchDisabled) {\n return false\n }\n\n const realPath = findPath(pagePath)\n // Todo make doPrefetch logic cacheable\n // eslint-disable-next-line consistent-return\n this.doPrefetch(realPath).then(() => {\n if (!this.prefetchCompleted.has(pagePath)) {\n this.apiRunner(`onPostPrefetchPathname`, { pathname: pagePath })\n this.prefetchCompleted.add(pagePath)\n }\n })\n\n return true\n }\n\n doPrefetch(pagePath) {\n const pageDataUrl = createPageDataUrl(pagePath)\n return prefetchHelper(pageDataUrl, {\n crossOrigin: `anonymous`,\n as: `fetch`,\n }).then(() =>\n // This was just prefetched, so will return a response from\n // the cache instead of making another request to the server\n this.loadPageDataJson(pagePath)\n )\n }\n\n hovering(rawPath) {\n this.loadPage(rawPath)\n }\n\n getResourceURLsForPathname(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDataDb.get(pagePath)\n if (page) {\n const pageResources = toPageResources(page.payload)\n\n return [\n ...createComponentUrls(pageResources.page.componentChunkName),\n createPageDataUrl(pagePath),\n ]\n } else {\n return null\n }\n }\n\n isPageNotFound(rawPath) {\n const pagePath = findPath(rawPath)\n const page = this.pageDb.get(pagePath)\n return !page || page.notFound\n }\n\n loadAppData(retries = 0) {\n return this.memoizedGet(`${__PATH_PREFIX__}/page-data/app-data.json`).then(\n req => {\n const { status, responseText } = req\n\n let appData\n\n if (status !== 200 && retries < 3) {\n // Retry 3 times incase of non-200 responses\n return this.loadAppData(retries + 1)\n }\n\n // Handle 200\n if (status === 200) {\n try {\n const jsonPayload = JSON.parse(responseText)\n if (jsonPayload.webpackCompilationHash === undefined) {\n throw new Error(`not a valid app-data response`)\n }\n\n appData = jsonPayload\n } catch (err) {\n // continue regardless of error\n }\n }\n\n return appData\n }\n )\n }\n}\n\nconst createComponentUrls = componentChunkName =>\n (window.___chunkMapping[componentChunkName] || []).map(\n chunk => __PATH_PREFIX__ + chunk\n )\n\nexport class ProdLoader extends BaseLoader {\n constructor(asyncRequires, matchPaths, pageData) {\n const loadComponent = chunkName => {\n if (!asyncRequires.components[chunkName]) {\n throw new Error(\n `We couldn't find the correct component chunk with the name ${chunkName}`\n )\n }\n\n return (\n asyncRequires.components[chunkName]()\n .then(preferDefault)\n // loader will handle the case when component is error\n .catch(err => err)\n )\n }\n\n super(loadComponent, matchPaths)\n\n if (pageData) {\n this.pageDataDb.set(pageData.path, {\n pagePath: pageData.path,\n payload: pageData,\n status: `success`,\n })\n }\n }\n\n doPrefetch(pagePath) {\n return super.doPrefetch(pagePath).then(result => {\n if (result.status !== PageResourceStatus.Success) {\n return Promise.resolve()\n }\n const pageData = result.payload\n const chunkName = pageData.componentChunkName\n const componentUrls = createComponentUrls(chunkName)\n return Promise.all(componentUrls.map(prefetchHelper)).then(() => pageData)\n })\n }\n\n loadPageDataJson(rawPath) {\n return super.loadPageDataJson(rawPath).then(data => {\n if (data.notFound) {\n // check if html file exist using HEAD request:\n // if it does we should navigate to it instead of showing 404\n return doFetch(rawPath, `HEAD`).then(req => {\n if (req.status === 200) {\n // page (.html file) actually exist (or we asked for 404 )\n // returning page resources status as errored to trigger\n // regular browser navigation to given page\n return {\n status: PageResourceStatus.Error,\n }\n }\n\n // if HEAD request wasn't 200, return notFound result\n // and show 404 page\n return data\n })\n }\n return data\n })\n }\n}\n\nlet instance\n\nexport const setLoader = _loader => {\n instance = _loader\n}\n\nexport const publicLoader = {\n enqueue: rawPath => instance.prefetch(rawPath),\n\n // Real methods\n getResourceURLsForPathname: rawPath =>\n instance.getResourceURLsForPathname(rawPath),\n loadPage: rawPath => instance.loadPage(rawPath),\n // TODO add deprecation to v4 so people use withErrorDetails and then we can remove in v5 and change default behaviour\n loadPageSync: (rawPath, options = {}) =>\n instance.loadPageSync(rawPath, options),\n prefetch: rawPath => instance.prefetch(rawPath),\n isPageNotFound: rawPath => instance.isPageNotFound(rawPath),\n hovering: rawPath => instance.hovering(rawPath),\n loadAppData: () => instance.loadAppData(),\n}\n\nexport default publicLoader\n\nexport function getStaticQueryResults() {\n if (instance) {\n return instance.staticQueryDb\n } else {\n return {}\n }\n}\n","import React, { createElement } from \"react\"\nimport PropTypes from \"prop-types\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport { grabMatchParams } from \"./find-path\"\n\n// Renders page\nclass PageRenderer extends React.Component {\n render() {\n const props = {\n ...this.props,\n params: {\n ...grabMatchParams(this.props.location.pathname),\n ...this.props.pageResources.json.pageContext.__params,\n },\n }\n\n const pageElement = createElement(this.props.pageResources.component, {\n ...props,\n key: this.props.path || this.props.pageResources.page.path,\n })\n\n const wrappedPage = apiRunner(\n `wrapPageElement`,\n { element: pageElement, props },\n pageElement,\n ({ result }) => {\n return { element: result, props }\n }\n ).pop()\n\n return wrappedPage\n }\n}\n\nPageRenderer.propTypes = {\n location: PropTypes.object.isRequired,\n pageResources: PropTypes.object.isRequired,\n data: PropTypes.object,\n pageContext: PropTypes.object.isRequired,\n}\n\nexport default PageRenderer\n","// This is extracted to separate module because it's shared\n// between browser and SSR code\nexport const RouteAnnouncerProps = {\n id: `gatsby-announcer`,\n style: {\n position: `absolute`,\n top: 0,\n width: 1,\n height: 1,\n padding: 0,\n overflow: `hidden`,\n clip: `rect(0, 0, 0, 0)`,\n whiteSpace: `nowrap`,\n border: 0,\n },\n \"aria-live\": `assertive`,\n \"aria-atomic\": `true`,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport { maybeGetBrowserRedirect } from \"./redirect-utils.js\"\nimport { apiRunner } from \"./api-runner-browser\"\nimport emitter from \"./emitter\"\nimport { RouteAnnouncerProps } from \"./route-announcer-props\"\nimport { navigate as reachNavigate } from \"@gatsbyjs/reach-router\"\nimport { globalHistory } from \"@gatsbyjs/reach-router/lib/history\"\nimport { parsePath } from \"gatsby-link\"\n\nfunction maybeRedirect(pathname) {\n const redirect = maybeGetBrowserRedirect(pathname)\n const { hash, search } = window.location\n\n if (redirect != null) {\n window.___replace(redirect.toPath + search + hash)\n return true\n } else {\n return false\n }\n}\n\n// Catch unhandled chunk loading errors and force a restart of the app.\nlet nextRoute = ``\n\nwindow.addEventListener(`unhandledrejection`, event => {\n if (/loading chunk \\d* failed./i.test(event.reason)) {\n if (nextRoute) {\n window.location.pathname = nextRoute\n }\n }\n})\n\nconst onPreRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n nextRoute = location.pathname\n apiRunner(`onPreRouteUpdate`, { location, prevLocation })\n }\n}\n\nconst onRouteUpdate = (location, prevLocation) => {\n if (!maybeRedirect(location.pathname)) {\n apiRunner(`onRouteUpdate`, { location, prevLocation })\n if (\n process.env.GATSBY_EXPERIMENTAL_QUERY_ON_DEMAND &&\n process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`\n ) {\n emitter.emit(`onRouteUpdate`, { location, prevLocation })\n }\n }\n}\n\nconst navigate = (to, options = {}) => {\n // Support forward/backward navigation with numbers\n // navigate(-2) (jumps back 2 history steps)\n // navigate(2) (jumps forward 2 history steps)\n if (typeof to === `number`) {\n globalHistory.navigate(to)\n return\n }\n\n const { pathname, search, hash } = parsePath(to)\n const redirect = maybeGetBrowserRedirect(pathname)\n\n // If we're redirecting, just replace the passed in pathname\n // to the one we want to redirect to.\n if (redirect) {\n to = redirect.toPath + search + hash\n }\n\n // If we had a service worker update, no matter the path, reload window and\n // reset the pathname whitelist\n if (window.___swUpdated) {\n window.location = pathname + search + hash\n return\n }\n\n // Start a timer to wait for a second before transitioning and showing a\n // loader in case resources aren't around yet.\n const timeoutId = setTimeout(() => {\n emitter.emit(`onDelayedLoadPageResources`, { pathname })\n apiRunner(`onRouteUpdateDelayed`, {\n location: window.location,\n })\n }, 1000)\n\n loader.loadPage(pathname).then(pageResources => {\n // If no page resources, then refresh the page\n // Do this, rather than simply `window.location.reload()`, so that\n // pressing the back/forward buttons work - otherwise when pressing\n // back, the browser will just change the URL and expect JS to handle\n // the change, which won't always work since it might not be a Gatsby\n // page.\n if (!pageResources || pageResources.status === PageResourceStatus.Error) {\n window.history.replaceState({}, ``, location.href)\n window.location = pathname\n clearTimeout(timeoutId)\n return\n }\n\n // If the loaded page has a different compilation hash to the\n // window, then a rebuild has occurred on the server. Reload.\n if (process.env.NODE_ENV === `production` && pageResources) {\n // window.___webpackCompilationHash gets set in production-app.js after navigationInit() is called\n // So on a direct visit of a page with a browser redirect this check is truthy and thus the codepath is hit\n // While the resource actually exists, but only too late\n // TODO: This should probably be fixed by setting ___webpackCompilationHash before navigationInit() is called\n if (\n pageResources.page.webpackCompilationHash !==\n window.___webpackCompilationHash\n ) {\n // Purge plugin-offline cache\n if (\n `serviceWorker` in navigator &&\n navigator.serviceWorker.controller !== null &&\n navigator.serviceWorker.controller.state === `activated`\n ) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: `clearPathResources`,\n })\n }\n\n window.location = pathname + search + hash\n }\n }\n reachNavigate(to, options)\n clearTimeout(timeoutId)\n })\n}\n\nfunction shouldUpdateScroll(prevRouterProps, { location }) {\n const { pathname, hash } = location\n const results = apiRunner(`shouldUpdateScroll`, {\n prevRouterProps,\n // `pathname` for backwards compatibility\n pathname,\n routerProps: { location },\n getSavedScrollPosition: args => [\n 0,\n // FIXME this is actually a big code smell, we should fix this\n // eslint-disable-next-line @babel/no-invalid-this\n this._stateStorage.read(args, args.key),\n ],\n })\n if (results.length > 0) {\n // Use the latest registered shouldUpdateScroll result, this allows users to override plugin's configuration\n // @see https://github.com/gatsbyjs/gatsby/issues/12038\n return results[results.length - 1]\n }\n\n if (prevRouterProps) {\n const {\n location: { pathname: oldPathname },\n } = prevRouterProps\n if (oldPathname === pathname) {\n // Scroll to element if it exists, if it doesn't, or no hash is provided,\n // scroll to top.\n return hash ? decodeURI(hash.slice(1)) : [0, 0]\n }\n }\n return true\n}\n\nfunction init() {\n // The \"scroll-behavior\" package expects the \"action\" to be on the location\n // object so let's copy it over.\n globalHistory.listen(args => {\n args.location.action = args.action\n })\n\n window.___push = to => navigate(to, { replace: false })\n window.___replace = to => navigate(to, { replace: true })\n window.___navigate = (to, options) => navigate(to, options)\n\n // Check for initial page-load redirect\n maybeRedirect(window.location.pathname)\n}\n\nclass RouteAnnouncer extends React.Component {\n constructor(props) {\n super(props)\n this.announcementRef = React.createRef()\n }\n\n componentDidUpdate(prevProps, nextProps) {\n requestAnimationFrame(() => {\n let pageName = `new page at ${this.props.location.pathname}`\n if (document.title) {\n pageName = document.title\n }\n const pageHeadings = document.querySelectorAll(`#gatsby-focus-wrapper h1`)\n if (pageHeadings && pageHeadings.length) {\n pageName = pageHeadings[0].textContent\n }\n const newAnnouncement = `Navigated to ${pageName}`\n if (this.announcementRef.current) {\n const oldAnnouncement = this.announcementRef.current.innerText\n if (oldAnnouncement !== newAnnouncement) {\n this.announcementRef.current.innerText = newAnnouncement\n }\n }\n })\n }\n\n render() {\n return
\n }\n}\n\nconst compareLocationProps = (prevLocation, nextLocation) => {\n if (prevLocation.href !== nextLocation.href) {\n return true\n }\n\n if (prevLocation?.state?.key !== nextLocation?.state?.key) {\n return true\n }\n\n return false\n}\n\n// Fire on(Pre)RouteUpdate APIs\nclass RouteUpdates extends React.Component {\n constructor(props) {\n super(props)\n onPreRouteUpdate(props.location, null)\n }\n\n componentDidMount() {\n onRouteUpdate(this.props.location, null)\n }\n\n shouldComponentUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onPreRouteUpdate(this.props.location, prevProps.location)\n return true\n }\n return false\n }\n\n componentDidUpdate(prevProps) {\n if (compareLocationProps(prevProps.location, this.props.location)) {\n onRouteUpdate(this.props.location, prevProps.location)\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n \n )\n }\n}\n\nRouteUpdates.propTypes = {\n location: PropTypes.object.isRequired,\n}\n\nexport { init, shouldUpdateScroll, RouteUpdates, maybeGetBrowserRedirect }\n","// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(a, b) {\n for (var i in a) {\n if (!(i in b)) return true;\n }for (var _i in b) {\n if (a[_i] !== b[_i]) return true;\n }return false;\n}\n\nexport default (function (instance, nextProps, nextState) {\n return shallowDiffers(instance.props, nextProps) || shallowDiffers(instance.state, nextState);\n});","import React from \"react\"\nimport loader, { PageResourceStatus } from \"./loader\"\nimport shallowCompare from \"shallow-compare\"\n\nclass EnsureResources extends React.Component {\n constructor(props) {\n super()\n const { location, pageResources } = props\n this.state = {\n location: { ...location },\n pageResources:\n pageResources ||\n loader.loadPageSync(location.pathname, { withErrorDetails: true }),\n }\n }\n\n static getDerivedStateFromProps({ location }, prevState) {\n if (prevState.location.href !== location.href) {\n const pageResources = loader.loadPageSync(location.pathname, {\n withErrorDetails: true,\n })\n\n return {\n pageResources,\n location: { ...location },\n }\n }\n\n return {\n location: { ...location },\n }\n }\n\n loadResources(rawPath) {\n loader.loadPage(rawPath).then(pageResources => {\n if (pageResources && pageResources.status !== PageResourceStatus.Error) {\n this.setState({\n location: { ...window.location },\n pageResources,\n })\n } else {\n window.history.replaceState({}, ``, location.href)\n window.location = rawPath\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState) {\n // Always return false if we're missing resources.\n if (!nextState.pageResources) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n if (\n process.env.BUILD_STAGE === `develop` &&\n nextState.pageResources.stale\n ) {\n this.loadResources(nextProps.location.pathname)\n return false\n }\n\n // Check if the component or json have changed.\n if (this.state.pageResources !== nextState.pageResources) {\n return true\n }\n if (\n this.state.pageResources.component !== nextState.pageResources.component\n ) {\n return true\n }\n\n if (this.state.pageResources.json !== nextState.pageResources.json) {\n return true\n }\n // Check if location has changed on a page using internal routing\n // via matchPath configuration.\n if (\n this.state.location.key !== nextState.location.key &&\n nextState.pageResources.page &&\n (nextState.pageResources.page.matchPath ||\n nextState.pageResources.page.path)\n ) {\n return true\n }\n return shallowCompare(this, nextProps, nextState)\n }\n\n render() {\n if (\n process.env.NODE_ENV !== `production` &&\n (!this.state.pageResources ||\n this.state.pageResources.status === PageResourceStatus.Error)\n ) {\n const message = `EnsureResources was not able to find resources for path: \"${this.props.location.pathname}\"\nThis typically means that an issue occurred building components for that path.\nRun \\`gatsby clean\\` to remove any cached elements.`\n if (this.state.pageResources?.error) {\n console.error(message)\n throw this.state.pageResources.error\n }\n\n throw new Error(message)\n }\n\n return this.props.children(this.state)\n }\n}\n\nexport default EnsureResources\n","import { apiRunner, apiRunnerAsync } from \"./api-runner-browser\"\nimport React from \"react\"\nimport ReactDOM from \"react-dom\"\nimport { Router, navigate, Location, BaseContext } from \"@gatsbyjs/reach-router\"\nimport { ScrollContext } from \"gatsby-react-router-scroll\"\nimport { StaticQueryContext } from \"gatsby\"\nimport {\n shouldUpdateScroll,\n init as navigationInit,\n RouteUpdates,\n} from \"./navigation\"\nimport emitter from \"./emitter\"\nimport PageRenderer from \"./page-renderer\"\nimport asyncRequires from \"$virtual/async-requires\"\nimport {\n setLoader,\n ProdLoader,\n publicLoader,\n PageResourceStatus,\n getStaticQueryResults,\n} from \"./loader\"\nimport EnsureResources from \"./ensure-resources\"\nimport stripPrefix from \"./strip-prefix\"\n\n// Generated during bootstrap\nimport matchPaths from \"$virtual/match-paths.json\"\n\nconst loader = new ProdLoader(asyncRequires, matchPaths, window.pageData)\nsetLoader(loader)\nloader.setApiRunner(apiRunner)\n\nwindow.asyncRequires = asyncRequires\nwindow.___emitter = emitter\nwindow.___loader = publicLoader\n\nnavigationInit()\n\napiRunnerAsync(`onClientEntry`).then(() => {\n // Let plugins register a service worker. The plugin just needs\n // to return true.\n if (apiRunner(`registerServiceWorker`).filter(Boolean).length > 0) {\n require(`./register-service-worker`)\n }\n\n // In gatsby v2 if Router is used in page using matchPaths\n // paths need to contain full path.\n // For example:\n // - page have `/app/*` matchPath\n // - inside template user needs to use `/app/xyz` as path\n // Resetting `basepath`/`baseuri` keeps current behaviour\n // to not introduce breaking change.\n // Remove this in v3\n const RouteHandler = props => (\n \n \n \n )\n\n const DataContext = React.createContext({})\n\n class GatsbyRoot extends React.Component {\n render() {\n const { children } = this.props\n return (\n \n {({ location }) => (\n \n {({ pageResources, location }) => {\n const staticQueryResults = getStaticQueryResults()\n return (\n \n \n {children}\n \n \n )\n }}\n \n )}\n \n )\n }\n }\n\n class LocationHandler extends React.Component {\n render() {\n return (\n \n {({ pageResources, location }) => (\n \n \n \n \n \n \n \n )}\n \n )\n }\n }\n\n const { pagePath, location: browserLoc } = window\n\n // Explicitly call navigate if the canonical path (window.pagePath)\n // is different to the browser path (window.location.pathname). But\n // only if NONE of the following conditions hold:\n //\n // - The url matches a client side route (page.matchPath)\n // - it's a 404 page\n // - it's the offline plugin shell (/offline-plugin-app-shell-fallback/)\n if (\n pagePath &&\n __BASE_PATH__ + pagePath !== browserLoc.pathname &&\n !(\n loader.findMatchPath(stripPrefix(browserLoc.pathname, __BASE_PATH__)) ||\n pagePath === `/404.html` ||\n pagePath.match(/^\\/404\\/?$/) ||\n pagePath.match(/^\\/offline-plugin-app-shell-fallback\\/?$/)\n )\n ) {\n navigate(__BASE_PATH__ + pagePath + browserLoc.search + browserLoc.hash, {\n replace: true,\n })\n }\n\n publicLoader.loadPage(browserLoc.pathname).then(page => {\n if (!page || page.status === PageResourceStatus.Error) {\n const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`\n\n // if the chunk throws an error we want to capture the real error\n // This should help with https://github.com/gatsbyjs/gatsby/issues/19618\n if (page && page.error) {\n console.error(message)\n throw page.error\n }\n\n throw new Error(message)\n }\n\n window.___webpackCompilationHash = page.page.webpackCompilationHash\n\n const SiteRoot = apiRunner(\n `wrapRootElement`,\n { element: },\n ,\n ({ result }) => {\n return { element: result }\n }\n ).pop()\n\n const App = function App() {\n const onClientEntryRanRef = React.useRef(false)\n\n React.useEffect(() => {\n if (!onClientEntryRanRef.current) {\n onClientEntryRanRef.current = true\n if (performance.mark) {\n performance.mark(`onInitialClientRender`)\n }\n\n apiRunner(`onInitialClientRender`)\n }\n }, [])\n\n return {SiteRoot}\n }\n\n const renderer = apiRunner(\n `replaceHydrateFunction`,\n undefined,\n ReactDOM.hydrateRoot ? ReactDOM.hydrateRoot : ReactDOM.hydrate\n )[0]\n\n function runRender() {\n const rootElement =\n typeof window !== `undefined`\n ? document.getElementById(`___gatsby`)\n : null\n\n if (renderer === ReactDOM.hydrateRoot) {\n renderer(rootElement, )\n } else {\n renderer(, rootElement)\n }\n }\n\n // https://github.com/madrobby/zepto/blob/b5ed8d607f67724788ec9ff492be297f64d47dfc/src/zepto.js#L439-L450\n // TODO remove IE 10 support\n const doc = document\n if (\n doc.readyState === `complete` ||\n (doc.readyState !== `loading` && !doc.documentElement.doScroll)\n ) {\n setTimeout(function () {\n runRender()\n }, 0)\n } else {\n const handler = function () {\n doc.removeEventListener(`DOMContentLoaded`, handler, false)\n window.removeEventListener(`load`, handler, false)\n\n runRender()\n }\n\n doc.addEventListener(`DOMContentLoaded`, handler, false)\n window.addEventListener(`load`, handler, false)\n }\n })\n})\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\n\nimport loader from \"./loader\"\nimport InternalPageRenderer from \"./page-renderer\"\n\nconst ProdPageRenderer = ({ location }) => {\n const pageResources = loader.loadPageSync(location.pathname)\n if (!pageResources) {\n return null\n }\n return React.createElement(InternalPageRenderer, {\n location,\n pageResources,\n ...pageResources.json,\n })\n}\n\nProdPageRenderer.propTypes = {\n location: PropTypes.shape({\n pathname: PropTypes.string.isRequired,\n }).isRequired,\n}\n\nexport default ProdPageRenderer\n","const preferDefault = m => (m && m.default) || m\n\nif (process.env.BUILD_STAGE === `develop`) {\n module.exports = preferDefault(require(`./public-page-renderer-dev`))\n} else if (process.env.BUILD_STAGE === `build-javascript`) {\n module.exports = preferDefault(require(`./public-page-renderer-prod`))\n} else {\n module.exports = () => null\n}\n","exports.polyfill = Component => Component\n","import redirects from \"./redirects.json\"\n\n// Convert to a map for faster lookup in maybeRedirect()\n\nconst redirectMap = new Map()\nconst redirectIgnoreCaseMap = new Map()\n\nredirects.forEach(redirect => {\n if (redirect.ignoreCase) {\n redirectIgnoreCaseMap.set(redirect.fromPath, redirect)\n } else {\n redirectMap.set(redirect.fromPath, redirect)\n }\n})\n\nexport function maybeGetBrowserRedirect(pathname) {\n let redirect = redirectMap.get(pathname)\n if (!redirect) {\n redirect = redirectIgnoreCaseMap.get(pathname.toLowerCase())\n }\n return redirect\n}\n","import { apiRunner } from \"./api-runner-browser\"\n\nif (\n window.location.protocol !== `https:` &&\n window.location.hostname !== `localhost`\n) {\n console.error(\n `Service workers can only be used over HTTPS, or on localhost for development`\n )\n} else if (`serviceWorker` in navigator) {\n navigator.serviceWorker\n .register(`${__BASE_PATH__}/sw.js`)\n .then(function (reg) {\n reg.addEventListener(`updatefound`, () => {\n apiRunner(`onServiceWorkerUpdateFound`, { serviceWorker: reg })\n // The updatefound event implies that reg.installing is set; see\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\n const installingWorker = reg.installing\n console.log(`installingWorker`, installingWorker)\n installingWorker.addEventListener(`statechange`, () => {\n switch (installingWorker.state) {\n case `installed`:\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and the fresh content will\n // have been added to the cache.\n\n // We set a flag so Gatsby Link knows to refresh the page on next navigation attempt\n window.___swUpdated = true\n // We call the onServiceWorkerUpdateReady API so users can show update prompts.\n apiRunner(`onServiceWorkerUpdateReady`, { serviceWorker: reg })\n\n // If resources failed for the current page, reload.\n if (window.___failedResources) {\n console.log(`resources failed, SW updated - reloading`)\n window.location.reload()\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\n console.log(`Content is now available offline!`)\n\n // Post to service worker that install is complete.\n // Delay to allow time for the event listener to be added --\n // otherwise fetch is called too soon and resources aren't cached.\n apiRunner(`onServiceWorkerInstalled`, { serviceWorker: reg })\n }\n break\n\n case `redundant`:\n console.error(`The installing service worker became redundant.`)\n apiRunner(`onServiceWorkerRedundant`, { serviceWorker: reg })\n break\n\n case `activated`:\n apiRunner(`onServiceWorkerActive`, { serviceWorker: reg })\n break\n }\n })\n })\n })\n .catch(function (e) {\n console.error(`Error during service worker registration:`, e)\n })\n}\n","/**\n * Remove a prefix from a string. Return the input string if the given prefix\n * isn't found.\n */\n\nexport default function stripPrefix(str, prefix = ``) {\n if (!prefix) {\n return str\n }\n\n if (str === prefix) {\n return `/`\n }\n\n if (str.startsWith(`${prefix}/`)) {\n return str.slice(prefix.length)\n }\n\n return str\n}\n","import e from \"@firebase/app\";\nimport { U as r, T as t, q as a, C as s, M as o, a as i, j as n, W as p, z as f, X as m, t as c, Z as u, n as l, s as b, r as g, o as d, Q as h, E as v } from \"./prebuilt-306f43d8-45d6f0b9.js\";\nimport { Component as w } from \"@firebase/component\";\nimport \"tslib\";\nimport \"@firebase/util\";\nimport \"@firebase/logger\";\nimport \"@firebase/webchannel-wrapper\";\nvar C = {\n Firestore: r,\n GeoPoint: s,\n Timestamp: o,\n Blob: i,\n Transaction: n,\n WriteBatch: p,\n DocumentReference: f,\n DocumentSnapshot: m,\n Query: c,\n QueryDocumentSnapshot: u,\n QuerySnapshot: l,\n CollectionReference: b,\n FieldPath: g,\n FieldValue: d,\n setLogLevel: h,\n CACHE_SIZE_UNLIMITED: v\n};\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Registers the main Firestore build with the components framework.\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\n */\n\nfunction I(e) {\n !\n /**\n * Configures Firestore as part of the Firebase SDK by calling registerService.\n *\n * @param firebase - The FirebaseNamespace to register Firestore with\n * @param firestoreFactory - A factory function that returns a new Firestore\n * instance.\n */\n function (e, r) {\n e.INTERNAL.registerComponent(new w(\"firestore\", function (e) {\n var t = e.getProvider(\"app\").getImmediate();\n return r(t, e.getProvider(\"auth-internal\"));\n }, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(Object.assign({}, C)));\n }(e, function (e, s) {\n return new r(e, new t(e, s), new a());\n }), e.registerVersion(\"@firebase/firestore\", \"2.4.0\");\n}\n\nI(e);\nexport { I as registerFirestore };","import firebase from '@firebase/app';\nimport { __extends, __spreadArray, __awaiter, __generator, __assign } from 'tslib';\nimport { FirebaseError, createMockUserToken, getModularInstance } from '@firebase/util';\nimport { Component } from '@firebase/component';\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @fileoverview Constants used in the Firebase Storage library.\r\n */\n\n/**\r\n * Domain name for firebase storage.\r\n */\n\nvar DEFAULT_HOST = 'firebasestorage.googleapis.com';\n/**\r\n * The key in Firebase config json for the storage bucket.\r\n */\n\nvar CONFIG_STORAGE_BUCKET_KEY = 'storageBucket';\n/**\r\n * 2 minutes\r\n *\r\n * The timeout for all operations except upload.\r\n */\n\nvar DEFAULT_MAX_OPERATION_RETRY_TIME = 2 * 60 * 1000;\n/**\r\n * 10 minutes\r\n *\r\n * The timeout for upload.\r\n */\n\nvar DEFAULT_MAX_UPLOAD_RETRY_TIME = 10 * 60 * 1000;\n/**\r\n * An error returned by the Firebase Storage SDK.\r\n * @public\r\n */\n\nvar FirebaseStorageError = function (_super) {\n __extends(FirebaseStorageError, _super);\n /**\r\n * @param code - A StorageErrorCode string to be prefixed with 'storage/' and\r\n * added to the end of the message.\r\n * @param message - Error message.\r\n */\n\n\n function FirebaseStorageError(code, message) {\n var _this = _super.call(this, prependCode(code), \"Firebase Storage: \" + message + \" (\" + prependCode(code) + \")\") || this;\n /**\r\n * Stores custom error data unque to FirebaseStorageError.\r\n */\n\n\n _this.customData = {\n serverResponse: null\n };\n _this._baseMessage = _this.message; // Without this, `instanceof FirebaseStorageError`, in tests for example,\n // returns false.\n\n Object.setPrototypeOf(_this, FirebaseStorageError.prototype);\n return _this;\n }\n /**\r\n * Compares a StorageErrorCode against this error's code, filtering out the prefix.\r\n */\n\n\n FirebaseStorageError.prototype._codeEquals = function (code) {\n return prependCode(code) === this.code;\n };\n\n Object.defineProperty(FirebaseStorageError.prototype, \"serverResponse\", {\n /**\r\n * Optional response message that was added by the server.\r\n */\n get: function get() {\n return this.customData.serverResponse;\n },\n set: function set(serverResponse) {\n this.customData.serverResponse = serverResponse;\n\n if (this.customData.serverResponse) {\n this.message = this._baseMessage + \"\\n\" + this.customData.serverResponse;\n } else {\n this.message = this._baseMessage;\n }\n },\n enumerable: false,\n configurable: true\n });\n return FirebaseStorageError;\n}(FirebaseError);\n\nfunction prependCode(code) {\n return 'storage/' + code;\n}\n\nfunction unknown() {\n var message = 'An unknown error occurred, please check the error payload for ' + 'server response.';\n return new FirebaseStorageError(\"unknown\"\n /* UNKNOWN */\n , message);\n}\n\nfunction objectNotFound(path) {\n return new FirebaseStorageError(\"object-not-found\"\n /* OBJECT_NOT_FOUND */\n , \"Object '\" + path + \"' does not exist.\");\n}\n\nfunction quotaExceeded(bucket) {\n return new FirebaseStorageError(\"quota-exceeded\"\n /* QUOTA_EXCEEDED */\n , \"Quota for bucket '\" + bucket + \"' exceeded, please view quota on \" + 'https://firebase.google.com/pricing/.');\n}\n\nfunction unauthenticated() {\n var message = 'User is not authenticated, please authenticate using Firebase ' + 'Authentication and try again.';\n return new FirebaseStorageError(\"unauthenticated\"\n /* UNAUTHENTICATED */\n , message);\n}\n\nfunction unauthorizedApp() {\n return new FirebaseStorageError(\"unauthorized-app\"\n /* UNAUTHORIZED_APP */\n , 'This app does not have permission to access Firebase Storage on this project.');\n}\n\nfunction unauthorized(path) {\n return new FirebaseStorageError(\"unauthorized\"\n /* UNAUTHORIZED */\n , \"User does not have permission to access '\" + path + \"'.\");\n}\n\nfunction retryLimitExceeded() {\n return new FirebaseStorageError(\"retry-limit-exceeded\"\n /* RETRY_LIMIT_EXCEEDED */\n , 'Max retry time for operation exceeded, please try again.');\n}\n\nfunction canceled() {\n return new FirebaseStorageError(\"canceled\"\n /* CANCELED */\n , 'User canceled the upload/download.');\n}\n\nfunction invalidUrl(url) {\n return new FirebaseStorageError(\"invalid-url\"\n /* INVALID_URL */\n , \"Invalid URL '\" + url + \"'.\");\n}\n\nfunction invalidDefaultBucket(bucket) {\n return new FirebaseStorageError(\"invalid-default-bucket\"\n /* INVALID_DEFAULT_BUCKET */\n , \"Invalid default bucket '\" + bucket + \"'.\");\n}\n\nfunction noDefaultBucket() {\n return new FirebaseStorageError(\"no-default-bucket\"\n /* NO_DEFAULT_BUCKET */\n , 'No default bucket ' + \"found. Did you set the '\" + CONFIG_STORAGE_BUCKET_KEY + \"' property when initializing the app?\");\n}\n\nfunction cannotSliceBlob() {\n return new FirebaseStorageError(\"cannot-slice-blob\"\n /* CANNOT_SLICE_BLOB */\n , 'Cannot slice blob for upload. Please retry the upload.');\n}\n\nfunction serverFileWrongSize() {\n return new FirebaseStorageError(\"server-file-wrong-size\"\n /* SERVER_FILE_WRONG_SIZE */\n , 'Server recorded incorrect upload file size, please retry the upload.');\n}\n\nfunction noDownloadURL() {\n return new FirebaseStorageError(\"no-download-url\"\n /* NO_DOWNLOAD_URL */\n , 'The given file does not have any download URLs.');\n}\n\nfunction invalidArgument(message) {\n return new FirebaseStorageError(\"invalid-argument\"\n /* INVALID_ARGUMENT */\n , message);\n}\n\nfunction appDeleted() {\n return new FirebaseStorageError(\"app-deleted\"\n /* APP_DELETED */\n , 'The Firebase app was deleted.');\n}\n/**\r\n * @param name - The name of the operation that was invalid.\r\n */\n\n\nfunction invalidRootOperation(name) {\n return new FirebaseStorageError(\"invalid-root-operation\"\n /* INVALID_ROOT_OPERATION */\n , \"The operation '\" + name + \"' cannot be performed on a root reference, create a non-root \" + \"reference using child, such as .child('file.png').\");\n}\n/**\r\n * @param format - The format that was not valid.\r\n * @param message - A message describing the format violation.\r\n */\n\n\nfunction invalidFormat(format, message) {\n return new FirebaseStorageError(\"invalid-format\"\n /* INVALID_FORMAT */\n , \"String does not match format '\" + format + \"': \" + message);\n}\n/**\r\n * @param message - A message describing the internal error.\r\n */\n\n\nfunction internalError(message) {\n throw new FirebaseStorageError(\"internal-error\"\n /* INTERNAL_ERROR */\n , 'Internal error: ' + message);\n}\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/** Converts a Base64 encoded string to a binary string. */\n\n\nfunction decodeBase64(encoded) {\n return atob(encoded);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * An enumeration of the possible string formats for upload.\r\n * @public\r\n */\n\n\nvar StringFormat = {\n /**\r\n * Indicates the string should be interpreted \"raw\", that is, as normal text.\r\n * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte\r\n * sequence.\r\n * Example: The string 'Hello! \\\\ud83d\\\\ude0a' becomes the byte sequence\r\n * 48 65 6c 6c 6f 21 20 f0 9f 98 8a\r\n */\n RAW: 'raw',\n\n /**\r\n * Indicates the string should be interpreted as base64-encoded data.\r\n * Padding characters (trailing '='s) are optional.\r\n * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence\r\n * ad 69 8e fb e1 3a b7 bf eb 97\r\n */\n BASE64: 'base64',\n\n /**\r\n * Indicates the string should be interpreted as base64url-encoded data.\r\n * Padding characters (trailing '='s) are optional.\r\n * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence\r\n * ad 69 8e fb e1 3a b7 bf eb 97\r\n */\n BASE64URL: 'base64url',\n\n /**\r\n * Indicates the string is a data URL, such as one obtained from\r\n * canvas.toDataURL().\r\n * Example: the string 'data:application/octet-stream;base64,aaaa'\r\n * becomes the byte sequence\r\n * 69 a6 9a\r\n * (the content-type \"application/octet-stream\" is also applied, but can\r\n * be overridden in the metadata object).\r\n */\n DATA_URL: 'data_url'\n};\n\nvar StringData = function () {\n function StringData(data, contentType) {\n this.data = data;\n this.contentType = contentType || null;\n }\n\n return StringData;\n}();\n\nfunction dataFromString(format, stringData) {\n switch (format) {\n case StringFormat.RAW:\n return new StringData(utf8Bytes_(stringData));\n\n case StringFormat.BASE64:\n case StringFormat.BASE64URL:\n return new StringData(base64Bytes_(format, stringData));\n\n case StringFormat.DATA_URL:\n return new StringData(dataURLBytes_(stringData), dataURLContentType_(stringData));\n // do nothing\n } // assert(false);\n\n\n throw unknown();\n}\n\nfunction utf8Bytes_(value) {\n var b = [];\n\n for (var i = 0; i < value.length; i++) {\n var c = value.charCodeAt(i);\n\n if (c <= 127) {\n b.push(c);\n } else {\n if (c <= 2047) {\n b.push(192 | c >> 6, 128 | c & 63);\n } else {\n if ((c & 64512) === 55296) {\n // The start of a surrogate pair.\n var valid = i < value.length - 1 && (value.charCodeAt(i + 1) & 64512) === 56320;\n\n if (!valid) {\n // The second surrogate wasn't there.\n b.push(239, 191, 189);\n } else {\n var hi = c;\n var lo = value.charCodeAt(++i);\n c = 65536 | (hi & 1023) << 10 | lo & 1023;\n b.push(240 | c >> 18, 128 | c >> 12 & 63, 128 | c >> 6 & 63, 128 | c & 63);\n }\n } else {\n if ((c & 64512) === 56320) {\n // Invalid low surrogate.\n b.push(239, 191, 189);\n } else {\n b.push(224 | c >> 12, 128 | c >> 6 & 63, 128 | c & 63);\n }\n }\n }\n }\n }\n\n return new Uint8Array(b);\n}\n\nfunction percentEncodedBytes_(value) {\n var decoded;\n\n try {\n decoded = decodeURIComponent(value);\n } catch (e) {\n throw invalidFormat(StringFormat.DATA_URL, 'Malformed data URL.');\n }\n\n return utf8Bytes_(decoded);\n}\n\nfunction base64Bytes_(format, value) {\n switch (format) {\n case StringFormat.BASE64:\n {\n var hasMinus = value.indexOf('-') !== -1;\n var hasUnder = value.indexOf('_') !== -1;\n\n if (hasMinus || hasUnder) {\n var invalidChar = hasMinus ? '-' : '_';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64url encoded?\");\n }\n\n break;\n }\n\n case StringFormat.BASE64URL:\n {\n var hasPlus = value.indexOf('+') !== -1;\n var hasSlash = value.indexOf('/') !== -1;\n\n if (hasPlus || hasSlash) {\n var invalidChar = hasPlus ? '+' : '/';\n throw invalidFormat(format, \"Invalid character '\" + invalidChar + \"' found: is it base64 encoded?\");\n }\n\n value = value.replace(/-/g, '+').replace(/_/g, '/');\n break;\n }\n // do nothing\n }\n\n var bytes;\n\n try {\n bytes = decodeBase64(value);\n } catch (e) {\n throw invalidFormat(format, 'Invalid character found');\n }\n\n var array = new Uint8Array(bytes.length);\n\n for (var i = 0; i < bytes.length; i++) {\n array[i] = bytes.charCodeAt(i);\n }\n\n return array;\n}\n\nvar DataURLParts = function () {\n function DataURLParts(dataURL) {\n this.base64 = false;\n this.contentType = null;\n var matches = dataURL.match(/^data:([^,]+)?,/);\n\n if (matches === null) {\n throw invalidFormat(StringFormat.DATA_URL, \"Must be formatted 'data:[][;base64],\");\n }\n\n var middle = matches[1] || null;\n\n if (middle != null) {\n this.base64 = endsWith(middle, ';base64');\n this.contentType = this.base64 ? middle.substring(0, middle.length - ';base64'.length) : middle;\n }\n\n this.rest = dataURL.substring(dataURL.indexOf(',') + 1);\n }\n\n return DataURLParts;\n}();\n\nfunction dataURLBytes_(dataUrl) {\n var parts = new DataURLParts(dataUrl);\n\n if (parts.base64) {\n return base64Bytes_(StringFormat.BASE64, parts.rest);\n } else {\n return percentEncodedBytes_(parts.rest);\n }\n}\n\nfunction dataURLContentType_(dataUrl) {\n var parts = new DataURLParts(dataUrl);\n return parts.contentType;\n}\n\nfunction endsWith(s, end) {\n var longEnough = s.length >= end.length;\n\n if (!longEnough) {\n return false;\n }\n\n return s.substring(s.length - end.length) === end;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * An event that is triggered on a task.\r\n */\n\n\nvar TaskEvent = {\n /**\r\n * For this event,\r\n *
    \r\n *
  • The `next` function is triggered on progress updates and when the\r\n * task is paused/resumed with an `UploadTaskSnapshot` as the first\r\n * argument.
  • \r\n *
  • The `error` function is triggered if the upload is canceled or fails\r\n * for another reason.
  • \r\n *
  • The `complete` function is triggered if the upload completes\r\n * successfully.
  • \r\n *
\r\n */\n STATE_CHANGED: 'state_changed'\n};\n/**\r\n * Represents the current state of a running upload.\r\n */\n\nvar TaskState = {\n /** The task is currently transferring data. */\n RUNNING: 'running',\n\n /** The task was paused by the user. */\n PAUSED: 'paused',\n\n /** The task completed successfully. */\n SUCCESS: 'success',\n\n /** The task was canceled. */\n CANCELED: 'canceled',\n\n /** The task failed with an error. */\n ERROR: 'error'\n};\n\nfunction taskStateFromInternalTaskState(state) {\n switch (state) {\n case \"running\"\n /* RUNNING */\n :\n case \"pausing\"\n /* PAUSING */\n :\n case \"canceling\"\n /* CANCELING */\n :\n return TaskState.RUNNING;\n\n case \"paused\"\n /* PAUSED */\n :\n return TaskState.PAUSED;\n\n case \"success\"\n /* SUCCESS */\n :\n return TaskState.SUCCESS;\n\n case \"canceled\"\n /* CANCELED */\n :\n return TaskState.CANCELED;\n\n case \"error\"\n /* ERROR */\n :\n return TaskState.ERROR;\n\n default:\n // TODO(andysoto): assert(false);\n return TaskState.ERROR;\n }\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Error codes for requests made by the the XhrIo wrapper.\r\n */\n\n\nvar ErrorCode;\n\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"NO_ERROR\"] = 0] = \"NO_ERROR\";\n ErrorCode[ErrorCode[\"NETWORK_ERROR\"] = 1] = \"NETWORK_ERROR\";\n ErrorCode[ErrorCode[\"ABORT\"] = 2] = \"ABORT\";\n})(ErrorCode || (ErrorCode = {}));\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Network layer for browsers. We use this instead of goog.net.XhrIo because\r\n * goog.net.XhrIo is hyuuuuge and doesn't work in React Native on Android.\r\n */\n\n\nvar XhrConnection = function () {\n function XhrConnection() {\n var _this = this;\n\n this.sent_ = false;\n this.xhr_ = new XMLHttpRequest();\n this.errorCode_ = ErrorCode.NO_ERROR;\n this.sendPromise_ = new Promise(function (resolve) {\n _this.xhr_.addEventListener('abort', function () {\n _this.errorCode_ = ErrorCode.ABORT;\n resolve();\n });\n\n _this.xhr_.addEventListener('error', function () {\n _this.errorCode_ = ErrorCode.NETWORK_ERROR;\n resolve();\n });\n\n _this.xhr_.addEventListener('load', function () {\n resolve();\n });\n });\n }\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.send = function (url, method, body, headers) {\n if (this.sent_) {\n throw internalError('cannot .send() more than once');\n }\n\n this.sent_ = true;\n this.xhr_.open(method, url, true);\n\n if (headers !== undefined) {\n for (var key in headers) {\n if (headers.hasOwnProperty(key)) {\n this.xhr_.setRequestHeader(key, headers[key].toString());\n }\n }\n }\n\n if (body !== undefined) {\n this.xhr_.send(body);\n } else {\n this.xhr_.send();\n }\n\n return this.sendPromise_;\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.getErrorCode = function () {\n if (!this.sent_) {\n throw internalError('cannot .getErrorCode() before sending');\n }\n\n return this.errorCode_;\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.getStatus = function () {\n if (!this.sent_) {\n throw internalError('cannot .getStatus() before sending');\n }\n\n try {\n return this.xhr_.status;\n } catch (e) {\n return -1;\n }\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.getResponseText = function () {\n if (!this.sent_) {\n throw internalError('cannot .getResponseText() before sending');\n }\n\n return this.xhr_.responseText;\n };\n /**\r\n * Aborts the request.\r\n * @override\r\n */\n\n\n XhrConnection.prototype.abort = function () {\n this.xhr_.abort();\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.getResponseHeader = function (header) {\n return this.xhr_.getResponseHeader(header);\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.addUploadProgressListener = function (listener) {\n if (this.xhr_.upload != null) {\n this.xhr_.upload.addEventListener('progress', listener);\n }\n };\n /**\r\n * @override\r\n */\n\n\n XhrConnection.prototype.removeUploadProgressListener = function (listener) {\n if (this.xhr_.upload != null) {\n this.xhr_.upload.removeEventListener('progress', listener);\n }\n };\n\n return XhrConnection;\n}();\n\nfunction newConnection() {\n return new XhrConnection();\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Factory-like class for creating XhrIo instances.\r\n */\n\n\nvar ConnectionPool = function () {\n function ConnectionPool() {}\n\n ConnectionPool.prototype.createConnection = function () {\n return newConnection();\n };\n\n return ConnectionPool;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Firebase Storage location data.\r\n *\r\n * @internal\r\n */\n\n\nvar Location = function () {\n function Location(bucket, path) {\n this.bucket = bucket;\n this.path_ = path;\n }\n\n Object.defineProperty(Location.prototype, \"path\", {\n get: function get() {\n return this.path_;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Location.prototype, \"isRoot\", {\n get: function get() {\n return this.path.length === 0;\n },\n enumerable: false,\n configurable: true\n });\n\n Location.prototype.fullServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o/' + encode(this.path);\n };\n\n Location.prototype.bucketOnlyServerUrl = function () {\n var encode = encodeURIComponent;\n return '/b/' + encode(this.bucket) + '/o';\n };\n\n Location.makeFromBucketSpec = function (bucketString, host) {\n var bucketLocation;\n\n try {\n bucketLocation = Location.makeFromUrl(bucketString, host);\n } catch (e) {\n // Not valid URL, use as-is. This lets you put bare bucket names in\n // config.\n return new Location(bucketString, '');\n }\n\n if (bucketLocation.path === '') {\n return bucketLocation;\n } else {\n throw invalidDefaultBucket(bucketString);\n }\n };\n\n Location.makeFromUrl = function (url, host) {\n var location = null;\n var bucketDomain = '([A-Za-z0-9.\\\\-_]+)';\n\n function gsModify(loc) {\n if (loc.path.charAt(loc.path.length - 1) === '/') {\n loc.path_ = loc.path_.slice(0, -1);\n }\n }\n\n var gsPath = '(/(.*))?$';\n var gsRegex = new RegExp('^gs://' + bucketDomain + gsPath, 'i');\n var gsIndices = {\n bucket: 1,\n path: 3\n };\n\n function httpModify(loc) {\n loc.path_ = decodeURIComponent(loc.path);\n }\n\n var version = 'v[A-Za-z0-9_]+';\n var firebaseStorageHost = host.replace(/[.]/g, '\\\\.');\n var firebaseStoragePath = '(/([^?#]*).*)?$';\n var firebaseStorageRegExp = new RegExp(\"^https?://\" + firebaseStorageHost + \"/\" + version + \"/b/\" + bucketDomain + \"/o\" + firebaseStoragePath, 'i');\n var firebaseStorageIndices = {\n bucket: 1,\n path: 3\n };\n var cloudStorageHost = host === DEFAULT_HOST ? '(?:storage.googleapis.com|storage.cloud.google.com)' : host;\n var cloudStoragePath = '([^?#]*)';\n var cloudStorageRegExp = new RegExp(\"^https?://\" + cloudStorageHost + \"/\" + bucketDomain + \"/\" + cloudStoragePath, 'i');\n var cloudStorageIndices = {\n bucket: 1,\n path: 2\n };\n var groups = [{\n regex: gsRegex,\n indices: gsIndices,\n postModify: gsModify\n }, {\n regex: firebaseStorageRegExp,\n indices: firebaseStorageIndices,\n postModify: httpModify\n }, {\n regex: cloudStorageRegExp,\n indices: cloudStorageIndices,\n postModify: httpModify\n }];\n\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n var captures = group.regex.exec(url);\n\n if (captures) {\n var bucketValue = captures[group.indices.bucket];\n var pathValue = captures[group.indices.path];\n\n if (!pathValue) {\n pathValue = '';\n }\n\n location = new Location(bucketValue, pathValue);\n group.postModify(location);\n break;\n }\n }\n\n if (location == null) {\n throw invalidUrl(url);\n }\n\n return location;\n };\n\n return Location;\n}();\n/**\r\n * A request whose promise always fails.\r\n */\n\n\nvar FailRequest = function () {\n function FailRequest(error) {\n this.promise_ = Promise.reject(error);\n }\n /** @inheritDoc */\n\n\n FailRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n\n\n FailRequest.prototype.cancel = function (_appDelete) {};\n\n return FailRequest;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @param f May be invoked\r\n * before the function returns.\r\n * @param callback Get all the arguments passed to the function\r\n * passed to f, including the initial boolean.\r\n */\n\n\nfunction start(f, // eslint-disable-next-line @typescript-eslint/no-explicit-any\ncallback, timeout) {\n // TODO(andysoto): make this code cleaner (probably refactor into an actual\n // type instead of a bunch of functions with state shared in the closure)\n var waitSeconds = 1; // Would type this as \"number\" but that doesn't work for Node so ¯\\_(ツ)_/¯\n // TODO: find a way to exclude Node type definition for storage because storage only works in browser\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n var timeoutId = null;\n var hitTimeout = false;\n var cancelState = 0;\n\n function canceled() {\n return cancelState === 2;\n }\n\n var triggeredCallback = false;\n\n function triggerCallback() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (!triggeredCallback) {\n triggeredCallback = true;\n callback.apply(null, args);\n }\n }\n\n function callWithDelay(millis) {\n timeoutId = setTimeout(function () {\n timeoutId = null;\n f(handler, canceled());\n }, millis);\n }\n\n function handler(success) {\n var args = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n\n if (triggeredCallback) {\n return;\n }\n\n if (success) {\n triggerCallback.call.apply(triggerCallback, __spreadArray([null, success], args));\n return;\n }\n\n var mustStop = canceled() || hitTimeout;\n\n if (mustStop) {\n triggerCallback.call.apply(triggerCallback, __spreadArray([null, success], args));\n return;\n }\n\n if (waitSeconds < 64) {\n /* TODO(andysoto): don't back off so quickly if we know we're offline. */\n waitSeconds *= 2;\n }\n\n var waitMillis;\n\n if (cancelState === 1) {\n cancelState = 2;\n waitMillis = 0;\n } else {\n waitMillis = (waitSeconds + Math.random()) * 1000;\n }\n\n callWithDelay(waitMillis);\n }\n\n var stopped = false;\n\n function stop(wasTimeout) {\n if (stopped) {\n return;\n }\n\n stopped = true;\n\n if (triggeredCallback) {\n return;\n }\n\n if (timeoutId !== null) {\n if (!wasTimeout) {\n cancelState = 2;\n }\n\n clearTimeout(timeoutId);\n callWithDelay(0);\n } else {\n if (!wasTimeout) {\n cancelState = 1;\n }\n }\n }\n\n callWithDelay(0);\n setTimeout(function () {\n hitTimeout = true;\n stop(true);\n }, timeout);\n return stop;\n}\n/**\r\n * Stops the retry loop from repeating.\r\n * If the function is currently \"in between\" retries, it is invoked immediately\r\n * with the second parameter as \"true\". Otherwise, it will be invoked once more\r\n * after the current invocation finishes iff the current invocation would have\r\n * triggered another retry.\r\n */\n\n\nfunction stop(id) {\n id(false);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction isJustDef(p) {\n return p !== void 0;\n} // eslint-disable-next-line @typescript-eslint/ban-types\n\n\nfunction isFunction(p) {\n return typeof p === 'function';\n}\n\nfunction isNonArrayObject(p) {\n return typeof p === 'object' && !Array.isArray(p);\n}\n\nfunction isString(p) {\n return typeof p === 'string' || p instanceof String;\n}\n\nfunction isNativeBlob(p) {\n return isNativeBlobDefined() && p instanceof Blob;\n}\n\nfunction isNativeBlobDefined() {\n return typeof Blob !== 'undefined';\n}\n\nfunction validateNumber(argument, minValue, maxValue, value) {\n if (value < minValue) {\n throw invalidArgument(\"Invalid value for '\" + argument + \"'. Expected \" + minValue + \" or greater.\");\n }\n\n if (value > maxValue) {\n throw invalidArgument(\"Invalid value for '\" + argument + \"'. Expected \" + maxValue + \" or less.\");\n }\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction makeUrl(urlPart, host) {\n var protocolMatch = host.match(/^(\\w+):\\/\\/.+/);\n var protocol = protocolMatch === null || protocolMatch === void 0 ? void 0 : protocolMatch[1];\n var origin = host;\n\n if (protocol == null) {\n origin = \"https://\" + host;\n }\n\n return origin + \"/v0\" + urlPart;\n}\n\nfunction makeQueryString(params) {\n var encode = encodeURIComponent;\n var queryPart = '?';\n\n for (var key in params) {\n if (params.hasOwnProperty(key)) {\n var nextPart = encode(key) + '=' + encode(params[key]);\n queryPart = queryPart + nextPart + '&';\n }\n } // Chop off the extra '&' or '?' on the end\n\n\n queryPart = queryPart.slice(0, -1);\n return queryPart;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar NetworkRequest = function () {\n function NetworkRequest(url, method, headers, body, successCodes, additionalRetryCodes, callback, errorCallback, timeout, progressCallback, pool) {\n var _this = this;\n\n this.pendingConnection_ = null;\n this.backoffId_ = null;\n this.canceled_ = false;\n this.appDelete_ = false;\n this.url_ = url;\n this.method_ = method;\n this.headers_ = headers;\n this.body_ = body;\n this.successCodes_ = successCodes.slice();\n this.additionalRetryCodes_ = additionalRetryCodes.slice();\n this.callback_ = callback;\n this.errorCallback_ = errorCallback;\n this.progressCallback_ = progressCallback;\n this.timeout_ = timeout;\n this.pool_ = pool;\n this.promise_ = new Promise(function (resolve, reject) {\n _this.resolve_ = resolve;\n _this.reject_ = reject;\n\n _this.start_();\n });\n }\n /**\r\n * Actually starts the retry loop.\r\n */\n\n\n NetworkRequest.prototype.start_ = function () {\n var self = this;\n\n function doTheRequest(backoffCallback, canceled) {\n if (canceled) {\n backoffCallback(false, new RequestEndStatus(false, null, true));\n return;\n }\n\n var connection = self.pool_.createConnection();\n self.pendingConnection_ = connection;\n\n function progressListener(progressEvent) {\n var loaded = progressEvent.loaded;\n var total = progressEvent.lengthComputable ? progressEvent.total : -1;\n\n if (self.progressCallback_ !== null) {\n self.progressCallback_(loaded, total);\n }\n }\n\n if (self.progressCallback_ !== null) {\n connection.addUploadProgressListener(progressListener);\n } // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n connection.send(self.url_, self.method_, self.body_, self.headers_).then(function () {\n if (self.progressCallback_ !== null) {\n connection.removeUploadProgressListener(progressListener);\n }\n\n self.pendingConnection_ = null;\n var hitServer = connection.getErrorCode() === ErrorCode.NO_ERROR;\n var status = connection.getStatus();\n\n if (!hitServer || self.isRetryStatusCode_(status)) {\n var wasCanceled = connection.getErrorCode() === ErrorCode.ABORT;\n backoffCallback(false, new RequestEndStatus(false, null, wasCanceled));\n return;\n }\n\n var successCode = self.successCodes_.indexOf(status) !== -1;\n backoffCallback(true, new RequestEndStatus(successCode, connection));\n });\n }\n /**\r\n * @param requestWentThrough - True if the request eventually went\r\n * through, false if it hit the retry limit or was canceled.\r\n */\n\n\n function backoffDone(requestWentThrough, status) {\n var resolve = self.resolve_;\n var reject = self.reject_;\n var connection = status.connection;\n\n if (status.wasSuccessCode) {\n try {\n var result = self.callback_(connection, connection.getResponseText());\n\n if (isJustDef(result)) {\n resolve(result);\n } else {\n resolve();\n }\n } catch (e) {\n reject(e);\n }\n } else {\n if (connection !== null) {\n var err = unknown();\n err.serverResponse = connection.getResponseText();\n\n if (self.errorCallback_) {\n reject(self.errorCallback_(connection, err));\n } else {\n reject(err);\n }\n } else {\n if (status.canceled) {\n var err = self.appDelete_ ? appDeleted() : canceled();\n reject(err);\n } else {\n var err = retryLimitExceeded();\n reject(err);\n }\n }\n }\n }\n\n if (this.canceled_) {\n backoffDone(false, new RequestEndStatus(false, null, true));\n } else {\n this.backoffId_ = start(doTheRequest, backoffDone, this.timeout_);\n }\n };\n /** @inheritDoc */\n\n\n NetworkRequest.prototype.getPromise = function () {\n return this.promise_;\n };\n /** @inheritDoc */\n\n\n NetworkRequest.prototype.cancel = function (appDelete) {\n this.canceled_ = true;\n this.appDelete_ = appDelete || false;\n\n if (this.backoffId_ !== null) {\n stop(this.backoffId_);\n }\n\n if (this.pendingConnection_ !== null) {\n this.pendingConnection_.abort();\n }\n };\n\n NetworkRequest.prototype.isRetryStatusCode_ = function (status) {\n // The codes for which to retry came from this page:\n // https://cloud.google.com/storage/docs/exponential-backoff\n var isFiveHundredCode = status >= 500 && status < 600;\n var extraRetryCodes = [// Request Timeout: web server didn't receive full request in time.\n 408, // Too Many Requests: you're getting rate-limited, basically.\n 429];\n var isExtraRetryCode = extraRetryCodes.indexOf(status) !== -1;\n var isRequestSpecificRetryCode = this.additionalRetryCodes_.indexOf(status) !== -1;\n return isFiveHundredCode || isExtraRetryCode || isRequestSpecificRetryCode;\n };\n\n return NetworkRequest;\n}();\n/**\r\n * A collection of information about the result of a network request.\r\n * @param opt_canceled - Defaults to false.\r\n */\n\n\nvar RequestEndStatus = function () {\n function RequestEndStatus(wasSuccessCode, connection, canceled) {\n this.wasSuccessCode = wasSuccessCode;\n this.connection = connection;\n this.canceled = !!canceled;\n }\n\n return RequestEndStatus;\n}();\n\nfunction addAuthHeader_(headers, authToken) {\n if (authToken !== null && authToken.length > 0) {\n headers['Authorization'] = 'Firebase ' + authToken;\n }\n}\n\nfunction addVersionHeader_(headers, firebaseVersion) {\n headers['X-Firebase-Storage-Version'] = 'webjs/' + (firebaseVersion !== null && firebaseVersion !== void 0 ? firebaseVersion : 'AppManager');\n}\n\nfunction addGmpidHeader_(headers, appId) {\n if (appId) {\n headers['X-Firebase-GMPID'] = appId;\n }\n}\n\nfunction addAppCheckHeader_(headers, appCheckToken) {\n if (appCheckToken !== null) {\n headers['X-Firebase-AppCheck'] = appCheckToken;\n }\n}\n\nfunction makeRequest(requestInfo, appId, authToken, appCheckToken, pool, firebaseVersion) {\n var queryPart = makeQueryString(requestInfo.urlParams);\n var url = requestInfo.url + queryPart;\n var headers = Object.assign({}, requestInfo.headers);\n addGmpidHeader_(headers, appId);\n addAuthHeader_(headers, authToken);\n addVersionHeader_(headers, firebaseVersion);\n addAppCheckHeader_(headers, appCheckToken);\n return new NetworkRequest(url, requestInfo.method, headers, requestInfo.body, requestInfo.successCodes, requestInfo.additionalRetryCodes, requestInfo.handler, requestInfo.errorHandler, requestInfo.timeout, requestInfo.progressCallback, pool);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction getBlobBuilder() {\n if (typeof BlobBuilder !== 'undefined') {\n return BlobBuilder;\n } else if (typeof WebKitBlobBuilder !== 'undefined') {\n return WebKitBlobBuilder;\n } else {\n return undefined;\n }\n}\n/**\r\n * Concatenates one or more values together and converts them to a Blob.\r\n *\r\n * @param args The values that will make up the resulting blob.\r\n * @return The blob.\r\n */\n\n\nfunction getBlob() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var BlobBuilder = getBlobBuilder();\n\n if (BlobBuilder !== undefined) {\n var bb = new BlobBuilder();\n\n for (var i = 0; i < args.length; i++) {\n bb.append(args[i]);\n }\n\n return bb.getBlob();\n } else {\n if (isNativeBlobDefined()) {\n return new Blob(args);\n } else {\n throw new FirebaseStorageError(\"unsupported-environment\"\n /* UNSUPPORTED_ENVIRONMENT */\n , \"This browser doesn't seem to support creating Blobs\");\n }\n }\n}\n/**\r\n * Slices the blob. The returned blob contains data from the start byte\r\n * (inclusive) till the end byte (exclusive). Negative indices cannot be used.\r\n *\r\n * @param blob The blob to be sliced.\r\n * @param start Index of the starting byte.\r\n * @param end Index of the ending byte.\r\n * @return The blob slice or null if not supported.\r\n */\n\n\nfunction sliceBlob(blob, start, end) {\n if (blob.webkitSlice) {\n return blob.webkitSlice(start, end);\n } else if (blob.mozSlice) {\n return blob.mozSlice(start, end);\n } else if (blob.slice) {\n return blob.slice(start, end);\n }\n\n return null;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @param opt_elideCopy - If true, doesn't copy mutable input data\r\n * (e.g. Uint8Arrays). Pass true only if you know the objects will not be\r\n * modified after this blob's construction.\r\n *\r\n * @internal\r\n */\n\n\nvar FbsBlob = function () {\n function FbsBlob(data, elideCopy) {\n var size = 0;\n var blobType = '';\n\n if (isNativeBlob(data)) {\n this.data_ = data;\n size = data.size;\n blobType = data.type;\n } else if (data instanceof ArrayBuffer) {\n if (elideCopy) {\n this.data_ = new Uint8Array(data);\n } else {\n this.data_ = new Uint8Array(data.byteLength);\n this.data_.set(new Uint8Array(data));\n }\n\n size = this.data_.length;\n } else if (data instanceof Uint8Array) {\n if (elideCopy) {\n this.data_ = data;\n } else {\n this.data_ = new Uint8Array(data.length);\n this.data_.set(data);\n }\n\n size = data.length;\n }\n\n this.size_ = size;\n this.type_ = blobType;\n }\n\n FbsBlob.prototype.size = function () {\n return this.size_;\n };\n\n FbsBlob.prototype.type = function () {\n return this.type_;\n };\n\n FbsBlob.prototype.slice = function (startByte, endByte) {\n if (isNativeBlob(this.data_)) {\n var realBlob = this.data_;\n var sliced = sliceBlob(realBlob, startByte, endByte);\n\n if (sliced === null) {\n return null;\n }\n\n return new FbsBlob(sliced);\n } else {\n var slice = new Uint8Array(this.data_.buffer, startByte, endByte - startByte);\n return new FbsBlob(slice, true);\n }\n };\n\n FbsBlob.getBlob = function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n if (isNativeBlobDefined()) {\n var blobby = args.map(function (val) {\n if (val instanceof FbsBlob) {\n return val.data_;\n } else {\n return val;\n }\n });\n return new FbsBlob(getBlob.apply(null, blobby));\n } else {\n var uint8Arrays = args.map(function (val) {\n if (isString(val)) {\n return dataFromString(StringFormat.RAW, val).data;\n } else {\n // Blobs don't exist, so this has to be a Uint8Array.\n return val.data_;\n }\n });\n var finalLength_1 = 0;\n uint8Arrays.forEach(function (array) {\n finalLength_1 += array.byteLength;\n });\n var merged_1 = new Uint8Array(finalLength_1);\n var index_1 = 0;\n uint8Arrays.forEach(function (array) {\n for (var i = 0; i < array.length; i++) {\n merged_1[index_1++] = array[i];\n }\n });\n return new FbsBlob(merged_1, true);\n }\n };\n\n FbsBlob.prototype.uploadData = function () {\n return this.data_;\n };\n\n return FbsBlob;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Returns the Object resulting from parsing the given JSON, or null if the\r\n * given string does not represent a JSON object.\r\n */\n\n\nfunction jsonObjectOrNull(s) {\n var obj;\n\n try {\n obj = JSON.parse(s);\n } catch (e) {\n return null;\n }\n\n if (isNonArrayObject(obj)) {\n return obj;\n } else {\n return null;\n }\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * @fileoverview Contains helper methods for manipulating paths.\r\n */\n\n/**\r\n * @return Null if the path is already at the root.\r\n */\n\n\nfunction parent(path) {\n if (path.length === 0) {\n return null;\n }\n\n var index = path.lastIndexOf('/');\n\n if (index === -1) {\n return '';\n }\n\n var newPath = path.slice(0, index);\n return newPath;\n}\n\nfunction child(path, childPath) {\n var canonicalChildPath = childPath.split('/').filter(function (component) {\n return component.length > 0;\n }).join('/');\n\n if (path.length === 0) {\n return canonicalChildPath;\n } else {\n return path + '/' + canonicalChildPath;\n }\n}\n/**\r\n * Returns the last component of a path.\r\n * '/foo/bar' -> 'bar'\r\n * '/foo/bar/baz/' -> 'baz/'\r\n * '/a' -> 'a'\r\n */\n\n\nfunction lastComponent(path) {\n var index = path.lastIndexOf('/', path.length - 2);\n\n if (index === -1) {\n return path;\n } else {\n return path.slice(index + 1);\n }\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction noXform_(metadata, value) {\n return value;\n}\n\nvar Mapping = function () {\n function Mapping(server, local, writable, xform) {\n this.server = server;\n this.local = local || server;\n this.writable = !!writable;\n this.xform = xform || noXform_;\n }\n\n return Mapping;\n}();\n\nvar mappings_ = null;\n\nfunction xformPath(fullPath) {\n if (!isString(fullPath) || fullPath.length < 2) {\n return fullPath;\n } else {\n return lastComponent(fullPath);\n }\n}\n\nfunction getMappings() {\n if (mappings_) {\n return mappings_;\n }\n\n var mappings = [];\n mappings.push(new Mapping('bucket'));\n mappings.push(new Mapping('generation'));\n mappings.push(new Mapping('metageneration'));\n mappings.push(new Mapping('name', 'fullPath', true));\n\n function mappingsXformPath(_metadata, fullPath) {\n return xformPath(fullPath);\n }\n\n var nameMapping = new Mapping('name');\n nameMapping.xform = mappingsXformPath;\n mappings.push(nameMapping);\n /**\r\n * Coerces the second param to a number, if it is defined.\r\n */\n\n function xformSize(_metadata, size) {\n if (size !== undefined) {\n return Number(size);\n } else {\n return size;\n }\n }\n\n var sizeMapping = new Mapping('size');\n sizeMapping.xform = xformSize;\n mappings.push(sizeMapping);\n mappings.push(new Mapping('timeCreated'));\n mappings.push(new Mapping('updated'));\n mappings.push(new Mapping('md5Hash', null, true));\n mappings.push(new Mapping('cacheControl', null, true));\n mappings.push(new Mapping('contentDisposition', null, true));\n mappings.push(new Mapping('contentEncoding', null, true));\n mappings.push(new Mapping('contentLanguage', null, true));\n mappings.push(new Mapping('contentType', null, true));\n mappings.push(new Mapping('metadata', 'customMetadata', true));\n mappings_ = mappings;\n return mappings_;\n}\n\nfunction addRef(metadata, service) {\n function generateRef() {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var loc = new Location(bucket, path);\n return service._makeStorageReference(loc);\n }\n\n Object.defineProperty(metadata, 'ref', {\n get: generateRef\n });\n}\n\nfunction fromResource(service, resource, mappings) {\n var metadata = {};\n metadata['type'] = 'file';\n var len = mappings.length;\n\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n metadata[mapping.local] = mapping.xform(metadata, resource[mapping.server]);\n }\n\n addRef(metadata, service);\n return metadata;\n}\n\nfunction fromResourceString(service, resourceString, mappings) {\n var obj = jsonObjectOrNull(resourceString);\n\n if (obj === null) {\n return null;\n }\n\n var resource = obj;\n return fromResource(service, resource, mappings);\n}\n\nfunction downloadUrlFromResourceString(metadata, resourceString, host) {\n var obj = jsonObjectOrNull(resourceString);\n\n if (obj === null) {\n return null;\n }\n\n if (!isString(obj['downloadTokens'])) {\n // This can happen if objects are uploaded through GCS and retrieved\n // through list, so we don't want to throw an Error.\n return null;\n }\n\n var tokens = obj['downloadTokens'];\n\n if (tokens.length === 0) {\n return null;\n }\n\n var encode = encodeURIComponent;\n var tokensList = tokens.split(',');\n var urls = tokensList.map(function (token) {\n var bucket = metadata['bucket'];\n var path = metadata['fullPath'];\n var urlPart = '/b/' + encode(bucket) + '/o/' + encode(path);\n var base = makeUrl(urlPart, host);\n var queryString = makeQueryString({\n alt: 'media',\n token: token\n });\n return base + queryString;\n });\n return urls[0];\n}\n\nfunction toResourceString(metadata, mappings) {\n var resource = {};\n var len = mappings.length;\n\n for (var i = 0; i < len; i++) {\n var mapping = mappings[i];\n\n if (mapping.writable) {\n resource[mapping.server] = metadata[mapping.local];\n }\n }\n\n return JSON.stringify(resource);\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar PREFIXES_KEY = 'prefixes';\nvar ITEMS_KEY = 'items';\n\nfunction fromBackendResponse(service, bucket, resource) {\n var listResult = {\n prefixes: [],\n items: [],\n nextPageToken: resource['nextPageToken']\n };\n\n if (resource[PREFIXES_KEY]) {\n for (var _i = 0, _a = resource[PREFIXES_KEY]; _i < _a.length; _i++) {\n var path = _a[_i];\n var pathWithoutTrailingSlash = path.replace(/\\/$/, '');\n\n var reference = service._makeStorageReference(new Location(bucket, pathWithoutTrailingSlash));\n\n listResult.prefixes.push(reference);\n }\n }\n\n if (resource[ITEMS_KEY]) {\n for (var _b = 0, _c = resource[ITEMS_KEY]; _b < _c.length; _b++) {\n var item = _c[_b];\n\n var reference = service._makeStorageReference(new Location(bucket, item['name']));\n\n listResult.items.push(reference);\n }\n }\n\n return listResult;\n}\n\nfunction fromResponseString(service, bucket, resourceString) {\n var obj = jsonObjectOrNull(resourceString);\n\n if (obj === null) {\n return null;\n }\n\n var resource = obj;\n return fromBackendResponse(service, bucket, resource);\n}\n\nvar RequestInfo = function () {\n function RequestInfo(url, method,\n /**\r\n * Returns the value with which to resolve the request's promise. Only called\r\n * if the request is successful. Throw from this function to reject the\r\n * returned Request's promise with the thrown error.\r\n * Note: The XhrIo passed to this function may be reused after this callback\r\n * returns. Do not keep a reference to it in any way.\r\n */\n handler, timeout) {\n this.url = url;\n this.method = method;\n this.handler = handler;\n this.timeout = timeout;\n this.urlParams = {};\n this.headers = {};\n this.body = null;\n this.errorHandler = null;\n /**\r\n * Called with the current number of bytes uploaded and total size (-1 if not\r\n * computable) of the request body (i.e. used to report upload progress).\r\n */\n\n this.progressCallback = null;\n this.successCodes = [200];\n this.additionalRetryCodes = [];\n }\n\n return RequestInfo;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Throws the UNKNOWN FirebaseStorageError if cndn is false.\r\n */\n\n\nfunction handlerCheck(cndn) {\n if (!cndn) {\n throw unknown();\n }\n}\n\nfunction metadataHandler(service, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(service, text, mappings);\n handlerCheck(metadata !== null);\n return metadata;\n }\n\n return handler;\n}\n\nfunction listHandler(service, bucket) {\n function handler(xhr, text) {\n var listResult = fromResponseString(service, bucket, text);\n handlerCheck(listResult !== null);\n return listResult;\n }\n\n return handler;\n}\n\nfunction downloadUrlHandler(service, mappings) {\n function handler(xhr, text) {\n var metadata = fromResourceString(service, text, mappings);\n handlerCheck(metadata !== null);\n return downloadUrlFromResourceString(metadata, text, service.host);\n }\n\n return handler;\n}\n\nfunction sharedErrorHandler(location) {\n function errorHandler(xhr, err) {\n var newErr;\n\n if (xhr.getStatus() === 401) {\n if ( // This exact message string is the only consistent part of the\n // server's error response that identifies it as an App Check error.\n xhr.getResponseText().includes('Firebase App Check token is invalid')) {\n newErr = unauthorizedApp();\n } else {\n newErr = unauthenticated();\n }\n } else {\n if (xhr.getStatus() === 402) {\n newErr = quotaExceeded(location.bucket);\n } else {\n if (xhr.getStatus() === 403) {\n newErr = unauthorized(location.path);\n } else {\n newErr = err;\n }\n }\n }\n\n newErr.serverResponse = err.serverResponse;\n return newErr;\n }\n\n return errorHandler;\n}\n\nfunction objectErrorHandler(location) {\n var shared = sharedErrorHandler(location);\n\n function errorHandler(xhr, err) {\n var newErr = shared(xhr, err);\n\n if (xhr.getStatus() === 404) {\n newErr = objectNotFound(location.path);\n }\n\n newErr.serverResponse = err.serverResponse;\n return newErr;\n }\n\n return errorHandler;\n}\n\nfunction getMetadata$2(service, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeUrl(urlPart, service.host);\n var method = 'GET';\n var timeout = service.maxOperationRetryTime;\n var requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nfunction list$2(service, location, delimiter, pageToken, maxResults) {\n var urlParams = {};\n\n if (location.isRoot) {\n urlParams['prefix'] = '';\n } else {\n urlParams['prefix'] = location.path + '/';\n }\n\n if (delimiter && delimiter.length > 0) {\n urlParams['delimiter'] = delimiter;\n }\n\n if (pageToken) {\n urlParams['pageToken'] = pageToken;\n }\n\n if (maxResults) {\n urlParams['maxResults'] = maxResults;\n }\n\n var urlPart = location.bucketOnlyServerUrl();\n var url = makeUrl(urlPart, service.host);\n var method = 'GET';\n var timeout = service.maxOperationRetryTime;\n var requestInfo = new RequestInfo(url, method, listHandler(service, location.bucket), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n\nfunction getDownloadUrl(service, location, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeUrl(urlPart, service.host);\n var method = 'GET';\n var timeout = service.maxOperationRetryTime;\n var requestInfo = new RequestInfo(url, method, downloadUrlHandler(service, mappings), timeout);\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nfunction updateMetadata$2(service, location, metadata, mappings) {\n var urlPart = location.fullServerUrl();\n var url = makeUrl(urlPart, service.host);\n var method = 'PATCH';\n var body = toResourceString(metadata, mappings);\n var headers = {\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var timeout = service.maxOperationRetryTime;\n var requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nfunction deleteObject$2(service, location) {\n var urlPart = location.fullServerUrl();\n var url = makeUrl(urlPart, service.host);\n var method = 'DELETE';\n var timeout = service.maxOperationRetryTime;\n\n function handler(_xhr, _text) {}\n\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.successCodes = [200, 204];\n requestInfo.errorHandler = objectErrorHandler(location);\n return requestInfo;\n}\n\nfunction determineContentType_(metadata, blob) {\n return metadata && metadata['contentType'] || blob && blob.type() || 'application/octet-stream';\n}\n\nfunction metadataForUpload_(location, blob, metadata) {\n var metadataClone = Object.assign({}, metadata);\n metadataClone['fullPath'] = location.path;\n metadataClone['size'] = blob.size();\n\n if (!metadataClone['contentType']) {\n metadataClone['contentType'] = determineContentType_(null, blob);\n }\n\n return metadataClone;\n}\n/**\r\n * Prepare RequestInfo for uploads as Content-Type: multipart.\r\n */\n\n\nfunction multipartUpload(service, location, mappings, blob, metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var headers = {\n 'X-Goog-Upload-Protocol': 'multipart'\n };\n\n function genBoundary() {\n var str = '';\n\n for (var i = 0; i < 2; i++) {\n str = str + Math.random().toString().slice(2);\n }\n\n return str;\n }\n\n var boundary = genBoundary();\n headers['Content-Type'] = 'multipart/related; boundary=' + boundary;\n var metadata_ = metadataForUpload_(location, blob, metadata);\n var metadataString = toResourceString(metadata_, mappings);\n var preBlobPart = '--' + boundary + '\\r\\n' + 'Content-Type: application/json; charset=utf-8\\r\\n\\r\\n' + metadataString + '\\r\\n--' + boundary + '\\r\\n' + 'Content-Type: ' + metadata_['contentType'] + '\\r\\n\\r\\n';\n var postBlobPart = '\\r\\n--' + boundary + '--';\n var body = FbsBlob.getBlob(preBlobPart, blob, postBlobPart);\n\n if (body === null) {\n throw cannotSliceBlob();\n }\n\n var urlParams = {\n name: metadata_['fullPath']\n };\n var url = makeUrl(urlPart, service.host);\n var method = 'POST';\n var timeout = service.maxUploadRetryTime;\n var requestInfo = new RequestInfo(url, method, metadataHandler(service, mappings), timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param current The number of bytes that have been uploaded so far.\r\n * @param total The total number of bytes in the upload.\r\n * @param opt_finalized True if the server has finished the upload.\r\n * @param opt_metadata The upload metadata, should\r\n * only be passed if opt_finalized is true.\r\n */\n\n\nvar ResumableUploadStatus = function () {\n function ResumableUploadStatus(current, total, finalized, metadata) {\n this.current = current;\n this.total = total;\n this.finalized = !!finalized;\n this.metadata = metadata || null;\n }\n\n return ResumableUploadStatus;\n}();\n\nfunction checkResumeHeader_(xhr, allowed) {\n var status = null;\n\n try {\n status = xhr.getResponseHeader('X-Goog-Upload-Status');\n } catch (e) {\n handlerCheck(false);\n }\n\n var allowedStatus = allowed || ['active'];\n handlerCheck(!!status && allowedStatus.indexOf(status) !== -1);\n return status;\n}\n\nfunction createResumableUpload(service, location, mappings, blob, metadata) {\n var urlPart = location.bucketOnlyServerUrl();\n var metadataForUpload = metadataForUpload_(location, blob, metadata);\n var urlParams = {\n name: metadataForUpload['fullPath']\n };\n var url = makeUrl(urlPart, service.host);\n var method = 'POST';\n var headers = {\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': \"\" + blob.size(),\n 'X-Goog-Upload-Header-Content-Type': metadataForUpload['contentType'],\n 'Content-Type': 'application/json; charset=utf-8'\n };\n var body = toResourceString(metadataForUpload, mappings);\n var timeout = service.maxUploadRetryTime;\n\n function handler(xhr) {\n checkResumeHeader_(xhr);\n var url;\n\n try {\n url = xhr.getResponseHeader('X-Goog-Upload-URL');\n } catch (e) {\n handlerCheck(false);\n }\n\n handlerCheck(isString(url));\n return url;\n }\n\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.urlParams = urlParams;\n requestInfo.headers = headers;\n requestInfo.body = body;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n */\n\n\nfunction getResumableUploadStatus(service, location, url, blob) {\n var headers = {\n 'X-Goog-Upload-Command': 'query'\n };\n\n function handler(xhr) {\n var status = checkResumeHeader_(xhr, ['active', 'final']);\n var sizeString = null;\n\n try {\n sizeString = xhr.getResponseHeader('X-Goog-Upload-Size-Received');\n } catch (e) {\n handlerCheck(false);\n }\n\n if (!sizeString) {\n // null or empty string\n handlerCheck(false);\n }\n\n var size = Number(sizeString);\n handlerCheck(!isNaN(size));\n return new ResumableUploadStatus(size, blob.size(), status === 'final');\n }\n\n var method = 'POST';\n var timeout = service.maxUploadRetryTime;\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * Any uploads via the resumable upload API must transfer a number of bytes\r\n * that is a multiple of this number.\r\n */\n\n\nvar RESUMABLE_UPLOAD_CHUNK_SIZE = 256 * 1024;\n/**\r\n * @param url From a call to fbs.requests.createResumableUpload.\r\n * @param chunkSize Number of bytes to upload.\r\n * @param status The previous status.\r\n * If not passed or null, we start from the beginning.\r\n * @throws fbs.Error If the upload is already complete, the passed in status\r\n * has a final size inconsistent with the blob, or the blob cannot be sliced\r\n * for upload.\r\n */\n\nfunction continueResumableUpload(location, service, url, blob, chunkSize, mappings, status, progressCallback) {\n // TODO(andysoto): standardize on internal asserts\n // assert(!(opt_status && opt_status.finalized));\n var status_ = new ResumableUploadStatus(0, 0);\n\n if (status) {\n status_.current = status.current;\n status_.total = status.total;\n } else {\n status_.current = 0;\n status_.total = blob.size();\n }\n\n if (blob.size() !== status_.total) {\n throw serverFileWrongSize();\n }\n\n var bytesLeft = status_.total - status_.current;\n var bytesToUpload = bytesLeft;\n\n if (chunkSize > 0) {\n bytesToUpload = Math.min(bytesToUpload, chunkSize);\n }\n\n var startByte = status_.current;\n var endByte = startByte + bytesToUpload;\n var uploadCommand = bytesToUpload === bytesLeft ? 'upload, finalize' : 'upload';\n var headers = {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': \"\" + status_.current\n };\n var body = blob.slice(startByte, endByte);\n\n if (body === null) {\n throw cannotSliceBlob();\n }\n\n function handler(xhr, text) {\n // TODO(andysoto): Verify the MD5 of each uploaded range:\n // the 'x-range-md5' header comes back with status code 308 responses.\n // We'll only be able to bail out though, because you can't re-upload a\n // range that you previously uploaded.\n var uploadStatus = checkResumeHeader_(xhr, ['active', 'final']);\n var newCurrent = status_.current + bytesToUpload;\n var size = blob.size();\n var metadata;\n\n if (uploadStatus === 'final') {\n metadata = metadataHandler(service, mappings)(xhr, text);\n } else {\n metadata = null;\n }\n\n return new ResumableUploadStatus(newCurrent, size, uploadStatus === 'final', metadata);\n }\n\n var method = 'POST';\n var timeout = service.maxUploadRetryTime;\n var requestInfo = new RequestInfo(url, method, handler, timeout);\n requestInfo.headers = headers;\n requestInfo.body = body.uploadData();\n requestInfo.progressCallback = progressCallback || null;\n requestInfo.errorHandler = sharedErrorHandler(location);\n return requestInfo;\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar Observer = function () {\n function Observer(nextOrObserver, error, complete) {\n var asFunctions = isFunction(nextOrObserver) || error != null || complete != null;\n\n if (asFunctions) {\n this.next = nextOrObserver;\n this.error = error;\n this.complete = complete;\n } else {\n var observer = nextOrObserver;\n this.next = observer.next;\n this.error = observer.error;\n this.complete = observer.complete;\n }\n }\n\n return Observer;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Returns a function that invokes f with its arguments asynchronously as a\r\n * microtask, i.e. as soon as possible after the current script returns back\r\n * into browser code.\r\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\n\n\nfunction async(f) {\n return function () {\n var argsToForward = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n argsToForward[_i] = arguments[_i];\n } // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n Promise.resolve().then(function () {\n return f.apply(void 0, argsToForward);\n });\n };\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Represents a blob being uploaded. Can be used to pause/resume/cancel the\r\n * upload and manage callbacks for various events.\r\n * @internal\r\n */\n\n\nvar UploadTask = function () {\n /**\r\n * @param ref - The firebaseStorage.Reference object this task came\r\n * from, untyped to avoid cyclic dependencies.\r\n * @param blob - The blob to upload.\r\n */\n function UploadTask(ref, blob, metadata) {\n var _this = this;\n\n if (metadata === void 0) {\n metadata = null;\n }\n /**\r\n * Number of bytes transferred so far.\r\n */\n\n\n this._transferred = 0;\n this._needToFetchStatus = false;\n this._needToFetchMetadata = false;\n this._observers = [];\n this._error = undefined;\n this._uploadUrl = undefined;\n this._request = undefined;\n this._chunkMultiplier = 1;\n this._resolve = undefined;\n this._reject = undefined;\n this._ref = ref;\n this._blob = blob;\n this._metadata = metadata;\n this._mappings = getMappings();\n this._resumable = this._shouldDoResumable(this._blob);\n this._state = \"running\"\n /* RUNNING */\n ;\n\n this._errorHandler = function (error) {\n _this._request = undefined;\n _this._chunkMultiplier = 1;\n\n if (error._codeEquals(\"canceled\"\n /* CANCELED */\n )) {\n _this._needToFetchStatus = true;\n\n _this.completeTransitions_();\n } else {\n _this._error = error;\n\n _this._transition(\"error\"\n /* ERROR */\n );\n }\n };\n\n this._metadataErrorHandler = function (error) {\n _this._request = undefined;\n\n if (error._codeEquals(\"canceled\"\n /* CANCELED */\n )) {\n _this.completeTransitions_();\n } else {\n _this._error = error;\n\n _this._transition(\"error\"\n /* ERROR */\n );\n }\n };\n\n this._promise = new Promise(function (resolve, reject) {\n _this._resolve = resolve;\n _this._reject = reject;\n\n _this._start();\n }); // Prevent uncaught rejections on the internal promise from bubbling out\n // to the top level with a dummy handler.\n\n this._promise.then(null, function () {});\n }\n\n UploadTask.prototype._makeProgressCallback = function () {\n var _this = this;\n\n var sizeBefore = this._transferred;\n return function (loaded) {\n return _this._updateProgress(sizeBefore + loaded);\n };\n };\n\n UploadTask.prototype._shouldDoResumable = function (blob) {\n return blob.size() > 256 * 1024;\n };\n\n UploadTask.prototype._start = function () {\n if (this._state !== \"running\"\n /* RUNNING */\n ) {\n // This can happen if someone pauses us in a resume callback, for example.\n return;\n }\n\n if (this._request !== undefined) {\n return;\n }\n\n if (this._resumable) {\n if (this._uploadUrl === undefined) {\n this._createResumable();\n } else {\n if (this._needToFetchStatus) {\n this._fetchStatus();\n } else {\n if (this._needToFetchMetadata) {\n // Happens if we miss the metadata on upload completion.\n this._fetchMetadata();\n } else {\n this._continueUpload();\n }\n }\n }\n } else {\n this._oneShotUpload();\n }\n };\n\n UploadTask.prototype._resolveToken = function (callback) {\n var _this = this; // eslint-disable-next-line @typescript-eslint/no-floating-promises\n\n\n Promise.all([this._ref.storage._getAuthToken(), this._ref.storage._getAppCheckToken()]).then(function (_a) {\n var authToken = _a[0],\n appCheckToken = _a[1];\n\n switch (_this._state) {\n case \"running\"\n /* RUNNING */\n :\n callback(authToken, appCheckToken);\n break;\n\n case \"canceling\"\n /* CANCELING */\n :\n _this._transition(\"canceled\"\n /* CANCELED */\n );\n\n break;\n\n case \"pausing\"\n /* PAUSING */\n :\n _this._transition(\"paused\"\n /* PAUSED */\n );\n\n break;\n }\n });\n }; // TODO(andysoto): assert false\n\n\n UploadTask.prototype._createResumable = function () {\n var _this = this;\n\n this._resolveToken(function (authToken, appCheckToken) {\n var requestInfo = createResumableUpload(_this._ref.storage, _this._ref._location, _this._mappings, _this._blob, _this._metadata);\n\n var createRequest = _this._ref.storage._makeRequest(requestInfo, authToken, appCheckToken);\n\n _this._request = createRequest;\n createRequest.getPromise().then(function (url) {\n _this._request = undefined;\n _this._uploadUrl = url;\n _this._needToFetchStatus = false;\n\n _this.completeTransitions_();\n }, _this._errorHandler);\n });\n };\n\n UploadTask.prototype._fetchStatus = function () {\n var _this = this; // TODO(andysoto): assert(this.uploadUrl_ !== null);\n\n\n var url = this._uploadUrl;\n\n this._resolveToken(function (authToken, appCheckToken) {\n var requestInfo = getResumableUploadStatus(_this._ref.storage, _this._ref._location, url, _this._blob);\n\n var statusRequest = _this._ref.storage._makeRequest(requestInfo, authToken, appCheckToken);\n\n _this._request = statusRequest;\n statusRequest.getPromise().then(function (status) {\n status = status;\n _this._request = undefined;\n\n _this._updateProgress(status.current);\n\n _this._needToFetchStatus = false;\n\n if (status.finalized) {\n _this._needToFetchMetadata = true;\n }\n\n _this.completeTransitions_();\n }, _this._errorHandler);\n });\n };\n\n UploadTask.prototype._continueUpload = function () {\n var _this = this;\n\n var chunkSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier;\n var status = new ResumableUploadStatus(this._transferred, this._blob.size()); // TODO(andysoto): assert(this.uploadUrl_ !== null);\n\n var url = this._uploadUrl;\n\n this._resolveToken(function (authToken, appCheckToken) {\n var requestInfo;\n\n try {\n requestInfo = continueResumableUpload(_this._ref._location, _this._ref.storage, url, _this._blob, chunkSize, _this._mappings, status, _this._makeProgressCallback());\n } catch (e) {\n _this._error = e;\n\n _this._transition(\"error\"\n /* ERROR */\n );\n\n return;\n }\n\n var uploadRequest = _this._ref.storage._makeRequest(requestInfo, authToken, appCheckToken);\n\n _this._request = uploadRequest;\n uploadRequest.getPromise().then(function (newStatus) {\n _this._increaseMultiplier();\n\n _this._request = undefined;\n\n _this._updateProgress(newStatus.current);\n\n if (newStatus.finalized) {\n _this._metadata = newStatus.metadata;\n\n _this._transition(\"success\"\n /* SUCCESS */\n );\n } else {\n _this.completeTransitions_();\n }\n }, _this._errorHandler);\n });\n };\n\n UploadTask.prototype._increaseMultiplier = function () {\n var currentSize = RESUMABLE_UPLOAD_CHUNK_SIZE * this._chunkMultiplier; // Max chunk size is 32M.\n\n if (currentSize < 32 * 1024 * 1024) {\n this._chunkMultiplier *= 2;\n }\n };\n\n UploadTask.prototype._fetchMetadata = function () {\n var _this = this;\n\n this._resolveToken(function (authToken, appCheckToken) {\n var requestInfo = getMetadata$2(_this._ref.storage, _this._ref._location, _this._mappings);\n\n var metadataRequest = _this._ref.storage._makeRequest(requestInfo, authToken, appCheckToken);\n\n _this._request = metadataRequest;\n metadataRequest.getPromise().then(function (metadata) {\n _this._request = undefined;\n _this._metadata = metadata;\n\n _this._transition(\"success\"\n /* SUCCESS */\n );\n }, _this._metadataErrorHandler);\n });\n };\n\n UploadTask.prototype._oneShotUpload = function () {\n var _this = this;\n\n this._resolveToken(function (authToken, appCheckToken) {\n var requestInfo = multipartUpload(_this._ref.storage, _this._ref._location, _this._mappings, _this._blob, _this._metadata);\n\n var multipartRequest = _this._ref.storage._makeRequest(requestInfo, authToken, appCheckToken);\n\n _this._request = multipartRequest;\n multipartRequest.getPromise().then(function (metadata) {\n _this._request = undefined;\n _this._metadata = metadata;\n\n _this._updateProgress(_this._blob.size());\n\n _this._transition(\"success\"\n /* SUCCESS */\n );\n }, _this._errorHandler);\n });\n };\n\n UploadTask.prototype._updateProgress = function (transferred) {\n var old = this._transferred;\n this._transferred = transferred; // A progress update can make the \"transferred\" value smaller (e.g. a\n // partial upload not completed by server, after which the \"transferred\"\n // value may reset to the value at the beginning of the request).\n\n if (this._transferred !== old) {\n this._notifyObservers();\n }\n };\n\n UploadTask.prototype._transition = function (state) {\n if (this._state === state) {\n return;\n }\n\n switch (state) {\n case \"canceling\"\n /* CANCELING */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING);\n this._state = state;\n\n if (this._request !== undefined) {\n this._request.cancel();\n }\n\n break;\n\n case \"pausing\"\n /* PAUSING */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING);\n this._state = state;\n\n if (this._request !== undefined) {\n this._request.cancel();\n }\n\n break;\n\n case \"running\"\n /* RUNNING */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.PAUSING);\n var wasPaused = this._state === \"paused\"\n /* PAUSED */\n ;\n this._state = state;\n\n if (wasPaused) {\n this._notifyObservers();\n\n this._start();\n }\n\n break;\n\n case \"paused\"\n /* PAUSED */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSING);\n this._state = state;\n\n this._notifyObservers();\n\n break;\n\n case \"canceled\"\n /* CANCELED */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.PAUSED ||\n // this.state_ === InternalTaskState.CANCELING);\n this._error = canceled();\n this._state = state;\n\n this._notifyObservers();\n\n break;\n\n case \"error\"\n /* ERROR */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this._state = state;\n\n this._notifyObservers();\n\n break;\n\n case \"success\"\n /* SUCCESS */\n :\n // TODO(andysoto):\n // assert(this.state_ === InternalTaskState.RUNNING ||\n // this.state_ === InternalTaskState.PAUSING ||\n // this.state_ === InternalTaskState.CANCELING);\n this._state = state;\n\n this._notifyObservers();\n\n break;\n }\n };\n\n UploadTask.prototype.completeTransitions_ = function () {\n switch (this._state) {\n case \"pausing\"\n /* PAUSING */\n :\n this._transition(\"paused\"\n /* PAUSED */\n );\n\n break;\n\n case \"canceling\"\n /* CANCELING */\n :\n this._transition(\"canceled\"\n /* CANCELED */\n );\n\n break;\n\n case \"running\"\n /* RUNNING */\n :\n this._start();\n\n break;\n }\n };\n\n Object.defineProperty(UploadTask.prototype, \"snapshot\", {\n /**\r\n * A snapshot of the current task state.\r\n */\n get: function get() {\n var externalState = taskStateFromInternalTaskState(this._state);\n return {\n bytesTransferred: this._transferred,\n totalBytes: this._blob.size(),\n state: externalState,\n metadata: this._metadata,\n task: this,\n ref: this._ref\n };\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Adds a callback for an event.\r\n * @param type - The type of event to listen for.\r\n * @param nextOrObserver -\r\n * The `next` function, which gets called for each item in\r\n * the event stream, or an observer object with some or all of these three\r\n * properties (`next`, `error`, `complete`).\r\n * @param error - A function that gets called with a `FirebaseStorageError`\r\n * if the event stream ends due to an error.\r\n * @param completed - A function that gets called if the\r\n * event stream ends normally.\r\n * @returns\r\n * If only the event argument is passed, returns a function you can use to\r\n * add callbacks (see the examples above). If more than just the event\r\n * argument is passed, returns a function you can call to unregister the\r\n * callbacks.\r\n */\n\n UploadTask.prototype.on = function (type, nextOrObserver, error, completed) {\n var _this = this;\n\n var observer = new Observer(nextOrObserver, error, completed);\n\n this._addObserver(observer);\n\n return function () {\n _this._removeObserver(observer);\n };\n };\n /**\r\n * This object behaves like a Promise, and resolves with its snapshot data\r\n * when the upload completes.\r\n * @param onFulfilled - The fulfillment callback. Promise chaining works as normal.\r\n * @param onRejected - The rejection callback.\r\n */\n\n\n UploadTask.prototype.then = function (onFulfilled, onRejected) {\n // These casts are needed so that TypeScript can infer the types of the\n // resulting Promise.\n return this._promise.then(onFulfilled, onRejected);\n };\n /**\r\n * Equivalent to calling `then(null, onRejected)`.\r\n */\n\n\n UploadTask.prototype.catch = function (onRejected) {\n return this.then(null, onRejected);\n };\n /**\r\n * Adds the given observer.\r\n */\n\n\n UploadTask.prototype._addObserver = function (observer) {\n this._observers.push(observer);\n\n this._notifyObserver(observer);\n };\n /**\r\n * Removes the given observer.\r\n */\n\n\n UploadTask.prototype._removeObserver = function (observer) {\n var i = this._observers.indexOf(observer);\n\n if (i !== -1) {\n this._observers.splice(i, 1);\n }\n };\n\n UploadTask.prototype._notifyObservers = function () {\n var _this = this;\n\n this._finishPromise();\n\n var observers = this._observers.slice();\n\n observers.forEach(function (observer) {\n _this._notifyObserver(observer);\n });\n };\n\n UploadTask.prototype._finishPromise = function () {\n if (this._resolve !== undefined) {\n var triggered = true;\n\n switch (taskStateFromInternalTaskState(this._state)) {\n case TaskState.SUCCESS:\n async(this._resolve.bind(null, this.snapshot))();\n break;\n\n case TaskState.CANCELED:\n case TaskState.ERROR:\n var toCall = this._reject;\n async(toCall.bind(null, this._error))();\n break;\n\n default:\n triggered = false;\n break;\n }\n\n if (triggered) {\n this._resolve = undefined;\n this._reject = undefined;\n }\n }\n };\n\n UploadTask.prototype._notifyObserver = function (observer) {\n var externalState = taskStateFromInternalTaskState(this._state);\n\n switch (externalState) {\n case TaskState.RUNNING:\n case TaskState.PAUSED:\n if (observer.next) {\n async(observer.next.bind(observer, this.snapshot))();\n }\n\n break;\n\n case TaskState.SUCCESS:\n if (observer.complete) {\n async(observer.complete.bind(observer))();\n }\n\n break;\n\n case TaskState.CANCELED:\n case TaskState.ERROR:\n if (observer.error) {\n async(observer.error.bind(observer, this._error))();\n }\n\n break;\n\n default:\n // TODO(andysoto): assert(false);\n if (observer.error) {\n async(observer.error.bind(observer, this._error))();\n }\n\n }\n };\n /**\r\n * Resumes a paused task. Has no effect on a currently running or failed task.\r\n * @returns True if the operation took effect, false if ignored.\r\n */\n\n\n UploadTask.prototype.resume = function () {\n var valid = this._state === \"paused\"\n /* PAUSED */\n || this._state === \"pausing\"\n /* PAUSING */\n ;\n\n if (valid) {\n this._transition(\"running\"\n /* RUNNING */\n );\n }\n\n return valid;\n };\n /**\r\n * Pauses a currently running task. Has no effect on a paused or failed task.\r\n * @returns True if the operation took effect, false if ignored.\r\n */\n\n\n UploadTask.prototype.pause = function () {\n var valid = this._state === \"running\"\n /* RUNNING */\n ;\n\n if (valid) {\n this._transition(\"pausing\"\n /* PAUSING */\n );\n }\n\n return valid;\n };\n /**\r\n * Cancels a currently running or paused task. Has no effect on a complete or\r\n * failed task.\r\n * @returns True if the operation took effect, false if ignored.\r\n */\n\n\n UploadTask.prototype.cancel = function () {\n var valid = this._state === \"running\"\n /* RUNNING */\n || this._state === \"pausing\"\n /* PAUSING */\n ;\n\n if (valid) {\n this._transition(\"canceling\"\n /* CANCELING */\n );\n }\n\n return valid;\n };\n\n return UploadTask;\n}();\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Provides methods to interact with a bucket in the Firebase Storage service.\r\n * @internal\r\n * @param _location - An fbs.location, or the URL at\r\n * which to base this object, in one of the following forms:\r\n * gs:///\r\n * http[s]://firebasestorage.googleapis.com/\r\n * /b//o/\r\n * Any query or fragment strings will be ignored in the http[s]\r\n * format. If no value is passed, the storage object will use a URL based on\r\n * the project ID of the base firebase.App instance.\r\n */\n\n\nvar Reference = function () {\n function Reference(_service, location) {\n this._service = _service;\n\n if (location instanceof Location) {\n this._location = location;\n } else {\n this._location = Location.makeFromUrl(location, _service.host);\n }\n }\n /**\r\n * Returns the URL for the bucket and path this object references,\r\n * in the form gs:///\r\n * @override\r\n */\n\n\n Reference.prototype.toString = function () {\n return 'gs://' + this._location.bucket + '/' + this._location.path;\n };\n\n Reference.prototype._newRef = function (service, location) {\n return new Reference(service, location);\n };\n\n Object.defineProperty(Reference.prototype, \"root\", {\n /**\r\n * A reference to the root of this object's bucket.\r\n */\n get: function get() {\n var location = new Location(this._location.bucket, '');\n return this._newRef(this._service, location);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"bucket\", {\n /**\r\n * The name of the bucket containing this reference's object.\r\n */\n get: function get() {\n return this._location.bucket;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"fullPath\", {\n /**\r\n * The full path of this object.\r\n */\n get: function get() {\n return this._location.path;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"name\", {\n /**\r\n * The short name of this object, which is the last component of the full path.\r\n * For example, if fullPath is 'full/path/image.png', name is 'image.png'.\r\n */\n get: function get() {\n return lastComponent(this._location.path);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"storage\", {\n /**\r\n * The `StorageService` instance this `StorageReference` is associated with.\r\n */\n get: function get() {\n return this._service;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Reference.prototype, \"parent\", {\n /**\r\n * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if\r\n * this reference is the root.\r\n */\n get: function get() {\n var newPath = parent(this._location.path);\n\n if (newPath === null) {\n return null;\n }\n\n var location = new Location(this._location.bucket, newPath);\n return new Reference(this._service, location);\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Utility function to throw an error in methods that do not accept a root reference.\r\n */\n\n Reference.prototype._throwIfRoot = function (name) {\n if (this._location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n\n return Reference;\n}();\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the newly uploaded data.\r\n * @returns An UploadTask\r\n */\n\n\nfunction uploadBytesResumable$1(ref, data, metadata) {\n ref._throwIfRoot('uploadBytesResumable');\n\n return new UploadTask(ref, new FbsBlob(data), metadata);\n}\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: listAll may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - StorageReference to get list from.\r\n *\r\n * @returns A Promise that resolves with all the items and prefixes under\r\n * the current storage reference. `prefixes` contains references to\r\n * sub-directories and `items` contains references to objects in this\r\n * folder. `nextPageToken` is never returned.\r\n */\n\n\nfunction listAll$1(ref) {\n var accumulator = {\n prefixes: [],\n items: []\n };\n return listAllHelper(ref, accumulator).then(function () {\n return accumulator;\n });\n}\n/**\r\n * Separated from listAll because async functions can't use \"arguments\".\r\n * @param ref\r\n * @param accumulator\r\n * @param pageToken\r\n */\n\n\nfunction listAllHelper(ref, accumulator, pageToken) {\n return __awaiter(this, void 0, void 0, function () {\n var opt, nextPage;\n\n var _a, _b;\n\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n opt = {\n // maxResults is 1000 by default.\n pageToken: pageToken\n };\n return [4\n /*yield*/\n , list$1(ref, opt)];\n\n case 1:\n nextPage = _c.sent();\n\n (_a = accumulator.prefixes).push.apply(_a, nextPage.prefixes);\n\n (_b = accumulator.items).push.apply(_b, nextPage.items);\n\n if (!(nextPage.nextPageToken != null)) return [3\n /*break*/\n , 3];\n return [4\n /*yield*/\n , listAllHelper(ref, accumulator, nextPage.nextPageToken)];\n\n case 2:\n _c.sent();\n\n _c.label = 3;\n\n case 3:\n return [2\n /*return*/\n ];\n }\n });\n });\n}\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - StorageReference to get list from.\r\n * @param options - See ListOptions for details.\r\n * @returns A Promise that resolves with the items and prefixes.\r\n * `prefixes` contains references to sub-folders and `items`\r\n * contains references to objects in this folder. `nextPageToken`\r\n * can be used to get the rest of the results.\r\n */\n\n\nfunction list$1(ref, options) {\n return __awaiter(this, void 0, void 0, function () {\n var op, requestInfo;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (options != null) {\n if (typeof options.maxResults === 'number') {\n validateNumber('options.maxResults',\n /* minValue= */\n 1,\n /* maxValue= */\n 1000, options.maxResults);\n }\n }\n\n op = options || {};\n requestInfo = list$2(ref.storage, ref._location,\n /*delimiter= */\n '/', op.pageToken, op.maxResults);\n return [4\n /*yield*/\n , ref.storage.makeRequestWithTokens(requestInfo)];\n\n case 1:\n return [2\n /*return*/\n , _a.sent().getPromise()];\n }\n });\n });\n}\n/**\r\n * A promise that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - StorageReference to get metadata from.\r\n */\n\n\nfunction getMetadata$1(ref) {\n return __awaiter(this, void 0, void 0, function () {\n var requestInfo;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ref._throwIfRoot('getMetadata');\n\n requestInfo = getMetadata$2(ref.storage, ref._location, getMappings());\n return [4\n /*yield*/\n , ref.storage.makeRequestWithTokens(requestInfo)];\n\n case 1:\n return [2\n /*return*/\n , _a.sent().getPromise()];\n }\n });\n });\n}\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - StorageReference to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n * Only values that have been explicitly set will be changed. Explicitly\r\n * setting a value to null will remove the metadata.\r\n * @returns A promise that resolves\r\n * with the new metadata for this object.\r\n * See `firebaseStorage.Reference.prototype.getMetadata`\r\n */\n\n\nfunction updateMetadata$1(ref, metadata) {\n return __awaiter(this, void 0, void 0, function () {\n var requestInfo;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ref._throwIfRoot('updateMetadata');\n\n requestInfo = updateMetadata$2(ref.storage, ref._location, metadata, getMappings());\n return [4\n /*yield*/\n , ref.storage.makeRequestWithTokens(requestInfo)];\n\n case 1:\n return [2\n /*return*/\n , _a.sent().getPromise()];\n }\n });\n });\n}\n/**\r\n * Returns the download URL for the given Reference.\r\n * @public\r\n * @returns A promise that resolves with the download\r\n * URL for this object.\r\n */\n\n\nfunction getDownloadURL$1(ref) {\n return __awaiter(this, void 0, void 0, function () {\n var requestInfo;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ref._throwIfRoot('getDownloadURL');\n\n requestInfo = getDownloadUrl(ref.storage, ref._location, getMappings());\n return [4\n /*yield*/\n , ref.storage.makeRequestWithTokens(requestInfo)];\n\n case 1:\n return [2\n /*return*/\n , _a.sent().getPromise().then(function (url) {\n if (url === null) {\n throw noDownloadURL();\n }\n\n return url;\n })];\n }\n });\n });\n}\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - StorageReference for object to delete.\r\n * @returns A promise that resolves if the deletion succeeds.\r\n */\n\n\nfunction deleteObject$1(ref) {\n return __awaiter(this, void 0, void 0, function () {\n var requestInfo;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ref._throwIfRoot('deleteObject');\n\n requestInfo = deleteObject$2(ref.storage, ref._location);\n return [4\n /*yield*/\n , ref.storage.makeRequestWithTokens(requestInfo)];\n\n case 1:\n return [2\n /*return*/\n , _a.sent().getPromise()];\n }\n });\n });\n}\n/**\r\n * Returns reference for object obtained by appending `childPath` to `ref`.\r\n *\r\n * @param ref - StorageReference to get child of.\r\n * @param childPath - Child path from provided ref.\r\n * @returns A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n *\r\n */\n\n\nfunction _getChild$1(ref, childPath) {\n var newPath = child(ref._location.path, childPath);\n var location = new Location(ref._location.bucket, newPath);\n return new Reference(ref.storage, location);\n}\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nfunction isUrl(path) {\n return /^[A-Za-z]+:\\/\\//.test(path);\n}\n/**\r\n * Returns a firebaseStorage.Reference for the given url.\r\n */\n\n\nfunction refFromURL(service, url) {\n return new Reference(service, url);\n}\n/**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\n\n\nfunction refFromPath(ref, path) {\n if (ref instanceof FirebaseStorageImpl) {\n var service = ref;\n\n if (service._bucket == null) {\n throw noDefaultBucket();\n }\n\n var reference = new Reference(service, service._bucket);\n\n if (path != null) {\n return refFromPath(reference, path);\n } else {\n return reference;\n }\n } else {\n // ref is a Reference\n if (path !== undefined) {\n return _getChild$1(ref, path);\n } else {\n return ref;\n }\n }\n}\n\nfunction ref$1(serviceOrRef, pathOrUrl) {\n if (pathOrUrl && isUrl(pathOrUrl)) {\n if (serviceOrRef instanceof FirebaseStorageImpl) {\n return refFromURL(serviceOrRef, pathOrUrl);\n } else {\n throw invalidArgument('To use ref(service, url), the first argument must be a Storage instance.');\n }\n } else {\n return refFromPath(serviceOrRef, pathOrUrl);\n }\n}\n\nfunction extractBucket(host, config) {\n var bucketString = config === null || config === void 0 ? void 0 : config[CONFIG_STORAGE_BUCKET_KEY];\n\n if (bucketString == null) {\n return null;\n }\n\n return Location.makeFromBucketSpec(bucketString, host);\n}\n\nfunction connectStorageEmulator$1(storage, host, port, options) {\n if (options === void 0) {\n options = {};\n }\n\n storage.host = \"http://\" + host + \":\" + port;\n var mockUserToken = options.mockUserToken;\n\n if (mockUserToken) {\n storage._overrideAuthToken = typeof mockUserToken === 'string' ? mockUserToken : createMockUserToken(mockUserToken, storage.app.options.projectId);\n }\n}\n/**\r\n * A service that provides Firebase Storage Reference instances.\r\n * @public\r\n * @param opt_url - gs:// url to a custom Storage Bucket\r\n */\n\n\nvar FirebaseStorageImpl = function () {\n function FirebaseStorageImpl(\n /**\r\n * FirebaseApp associated with this StorageService instance.\r\n */\n app, _authProvider,\n /**\r\n * @internal\r\n */\n _appCheckProvider,\n /**\r\n * @internal\r\n */\n _pool, _url, _firebaseVersion) {\n this.app = app;\n this._authProvider = _authProvider;\n this._appCheckProvider = _appCheckProvider;\n this._pool = _pool;\n this._url = _url;\n this._firebaseVersion = _firebaseVersion;\n this._bucket = null;\n /**\r\n * This string can be in the formats:\r\n * - host\r\n * - host:port\r\n * - protocol://host:port\r\n */\n\n this._host = DEFAULT_HOST;\n this._appId = null;\n this._deleted = false;\n this._maxOperationRetryTime = DEFAULT_MAX_OPERATION_RETRY_TIME;\n this._maxUploadRetryTime = DEFAULT_MAX_UPLOAD_RETRY_TIME;\n this._requests = new Set();\n\n if (_url != null) {\n this._bucket = Location.makeFromBucketSpec(_url, this._host);\n } else {\n this._bucket = extractBucket(this._host, this.app.options);\n }\n }\n\n Object.defineProperty(FirebaseStorageImpl.prototype, \"host\", {\n get: function get() {\n return this._host;\n },\n\n /**\r\n * Set host string for this service.\r\n * @param host - host string in the form of host, host:port,\r\n * or protocol://host:port\r\n */\n set: function set(host) {\n this._host = host;\n\n if (this._url != null) {\n this._bucket = Location.makeFromBucketSpec(this._url, host);\n } else {\n this._bucket = extractBucket(host, this.app.options);\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageImpl.prototype, \"maxUploadRetryTime\", {\n /**\r\n * The maximum time to retry uploads in milliseconds.\r\n */\n get: function get() {\n return this._maxUploadRetryTime;\n },\n set: function set(time) {\n validateNumber('time',\n /* minValue=*/\n 0,\n /* maxValue= */\n Number.POSITIVE_INFINITY, time);\n this._maxUploadRetryTime = time;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FirebaseStorageImpl.prototype, \"maxOperationRetryTime\", {\n /**\r\n * The maximum time to retry operations other than uploads or downloads in\r\n * milliseconds.\r\n */\n get: function get() {\n return this._maxOperationRetryTime;\n },\n set: function set(time) {\n validateNumber('time',\n /* minValue=*/\n 0,\n /* maxValue= */\n Number.POSITIVE_INFINITY, time);\n this._maxOperationRetryTime = time;\n },\n enumerable: false,\n configurable: true\n });\n\n FirebaseStorageImpl.prototype._getAuthToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n var auth, tokenData;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this._overrideAuthToken) {\n return [2\n /*return*/\n , this._overrideAuthToken];\n }\n\n auth = this._authProvider.getImmediate({\n optional: true\n });\n if (!auth) return [3\n /*break*/\n , 2];\n return [4\n /*yield*/\n , auth.getToken()];\n\n case 1:\n tokenData = _a.sent();\n\n if (tokenData !== null) {\n return [2\n /*return*/\n , tokenData.accessToken];\n }\n\n _a.label = 2;\n\n case 2:\n return [2\n /*return*/\n , null];\n }\n });\n });\n };\n\n FirebaseStorageImpl.prototype._getAppCheckToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n var appCheck, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n appCheck = this._appCheckProvider.getImmediate({\n optional: true\n });\n if (!appCheck) return [3\n /*break*/\n , 2];\n return [4\n /*yield*/\n , appCheck.getToken()];\n\n case 1:\n result = _a.sent(); // TODO: What do we want to do if there is an error getting the token?\n // Context: appCheck.getToken() will never throw even if an error happened. In the error case, a dummy token will be\n // returned along with an error field describing the error. In general, we shouldn't care about the error condition and just use\n // the token (actual or dummy) to send requests.\n\n return [2\n /*return*/\n , result.token];\n\n case 2:\n return [2\n /*return*/\n , null];\n }\n });\n });\n };\n /**\r\n * Stop running requests and prevent more from being created.\r\n */\n\n\n FirebaseStorageImpl.prototype._delete = function () {\n if (!this._deleted) {\n this._deleted = true;\n\n this._requests.forEach(function (request) {\n return request.cancel();\n });\n\n this._requests.clear();\n }\n\n return Promise.resolve();\n };\n /**\r\n * Returns a new firebaseStorage.Reference object referencing this StorageService\r\n * at the given Location.\r\n */\n\n\n FirebaseStorageImpl.prototype._makeStorageReference = function (loc) {\n return new Reference(this, loc);\n };\n /**\r\n * @param requestInfo - HTTP RequestInfo object\r\n * @param authToken - Firebase auth token\r\n */\n\n\n FirebaseStorageImpl.prototype._makeRequest = function (requestInfo, authToken, appCheckToken) {\n var _this = this;\n\n if (!this._deleted) {\n var request_1 = makeRequest(requestInfo, this._appId, authToken, appCheckToken, this._pool, this._firebaseVersion);\n\n this._requests.add(request_1); // Request removes itself from set when complete.\n\n\n request_1.getPromise().then(function () {\n return _this._requests.delete(request_1);\n }, function () {\n return _this._requests.delete(request_1);\n });\n return request_1;\n } else {\n return new FailRequest(appDeleted());\n }\n };\n\n FirebaseStorageImpl.prototype.makeRequestWithTokens = function (requestInfo) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, authToken, appCheckToken;\n\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n return [4\n /*yield*/\n , Promise.all([this._getAuthToken(), this._getAppCheckToken()])];\n\n case 1:\n _a = _b.sent(), authToken = _a[0], appCheckToken = _a[1];\n return [2\n /*return*/\n , this._makeRequest(requestInfo, authToken, appCheckToken)];\n }\n });\n });\n };\n\n return FirebaseStorageImpl;\n}();\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Uploads data to this object's location.\r\n * The upload can be paused and resumed, and exposes progress updates.\r\n * @public\r\n * @param ref - StorageReference where data should be uploaded.\r\n * @param data - The data to upload.\r\n * @param metadata - Metadata for the data to upload.\r\n * @returns An UploadTask\r\n */\n\n\nfunction uploadBytesResumable(ref, data, metadata) {\n ref = getModularInstance(ref);\n return uploadBytesResumable$1(ref, data, metadata);\n}\n/**\r\n * A promise that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n * @public\r\n * @param ref - StorageReference to get metadata from.\r\n */\n\n\nfunction getMetadata(ref) {\n ref = getModularInstance(ref);\n return getMetadata$1(ref);\n}\n/**\r\n * Updates the metadata for this object.\r\n * @public\r\n * @param ref - StorageReference to update metadata for.\r\n * @param metadata - The new metadata for the object.\r\n * Only values that have been explicitly set will be changed. Explicitly\r\n * setting a value to null will remove the metadata.\r\n * @returns A promise that resolves with the new metadata for this object.\r\n */\n\n\nfunction updateMetadata(ref, metadata) {\n ref = getModularInstance(ref);\n return updateMetadata$1(ref, metadata);\n}\n/**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure.\r\n * Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n * @public\r\n *\r\n * @param ref - StorageReference to get list from.\r\n * @param options - See ListOptions for details.\r\n * @returns A Promise that resolves with the items and prefixes.\r\n * `prefixes` contains references to sub-folders and `items`\r\n * contains references to objects in this folder. `nextPageToken`\r\n * can be used to get the rest of the results.\r\n */\n\n\nfunction list(ref, options) {\n ref = getModularInstance(ref);\n return list$1(ref, options);\n}\n/**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: listAll may potentially consume too many resources if there are\r\n * too many results.\r\n * @public\r\n * @param ref - StorageReference to get list from.\r\n *\r\n * @returns A Promise that resolves with all the items and prefixes under\r\n * the current storage reference. `prefixes` contains references to\r\n * sub-directories and `items` contains references to objects in this\r\n * folder. `nextPageToken` is never returned.\r\n */\n\n\nfunction listAll(ref) {\n ref = getModularInstance(ref);\n return listAll$1(ref);\n}\n/**\r\n * Returns the download URL for the given Reference.\r\n * @public\r\n * @returns A promise that resolves with the download\r\n * URL for this object.\r\n */\n\n\nfunction getDownloadURL(ref) {\n ref = getModularInstance(ref);\n return getDownloadURL$1(ref);\n}\n/**\r\n * Deletes the object at this location.\r\n * @public\r\n * @param ref - StorageReference for object to delete.\r\n * @returns A promise that resolves if the deletion succeeds.\r\n */\n\n\nfunction deleteObject(ref) {\n ref = getModularInstance(ref);\n return deleteObject$1(ref);\n}\n\nfunction ref(serviceOrRef, pathOrUrl) {\n serviceOrRef = getModularInstance(serviceOrRef);\n return ref$1(serviceOrRef, pathOrUrl);\n}\n/**\r\n * @internal\r\n */\n\n\nfunction _getChild(ref, childPath) {\n return _getChild$1(ref, childPath);\n}\n/**\r\n * Modify this `StorageService` instance to communicate with the Cloud Storage emulator.\r\n *\r\n * @param storage - The `StorageService` instance\r\n * @param host - The emulator host (ex: localhost)\r\n * @param port - The emulator port (ex: 5001)\r\n * @param options.mockUserToken - the mock auth token to use for unit testing Security Rules.\r\n * @public\r\n */\n\n\nfunction connectStorageEmulator(storage, host, port, options) {\n if (options === void 0) {\n options = {};\n }\n\n connectStorageEmulator$1(storage, host, port, options);\n}\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar UploadTaskSnapshotCompat = function () {\n function UploadTaskSnapshotCompat(_delegate, task, ref) {\n this._delegate = _delegate;\n this.task = task;\n this.ref = ref;\n }\n\n Object.defineProperty(UploadTaskSnapshotCompat.prototype, \"bytesTransferred\", {\n get: function get() {\n return this._delegate.bytesTransferred;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(UploadTaskSnapshotCompat.prototype, \"metadata\", {\n get: function get() {\n return this._delegate.metadata;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(UploadTaskSnapshotCompat.prototype, \"state\", {\n get: function get() {\n return this._delegate.state;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(UploadTaskSnapshotCompat.prototype, \"totalBytes\", {\n get: function get() {\n return this._delegate.totalBytes;\n },\n enumerable: false,\n configurable: true\n });\n return UploadTaskSnapshotCompat;\n}();\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar UploadTaskCompat = function () {\n function UploadTaskCompat(_delegate, _ref) {\n this._delegate = _delegate;\n this._ref = _ref;\n this.cancel = this._delegate.cancel.bind(this._delegate);\n this.catch = this._delegate.catch.bind(this._delegate);\n this.pause = this._delegate.pause.bind(this._delegate);\n this.resume = this._delegate.resume.bind(this._delegate);\n }\n\n Object.defineProperty(UploadTaskCompat.prototype, \"snapshot\", {\n get: function get() {\n return new UploadTaskSnapshotCompat(this._delegate.snapshot, this, this._ref);\n },\n enumerable: false,\n configurable: true\n });\n\n UploadTaskCompat.prototype.then = function (onFulfilled, onRejected) {\n var _this = this;\n\n return this._delegate.then(function (snapshot) {\n if (onFulfilled) {\n return onFulfilled(new UploadTaskSnapshotCompat(snapshot, _this, _this._ref));\n }\n }, onRejected);\n };\n\n UploadTaskCompat.prototype.on = function (type, nextOrObserver, error, completed) {\n var _this = this;\n\n var wrappedNextOrObserver = undefined;\n\n if (!!nextOrObserver) {\n if (typeof nextOrObserver === 'function') {\n wrappedNextOrObserver = function wrappedNextOrObserver(taskSnapshot) {\n return nextOrObserver(new UploadTaskSnapshotCompat(taskSnapshot, _this, _this._ref));\n };\n } else {\n wrappedNextOrObserver = {\n next: !!nextOrObserver.next ? function (taskSnapshot) {\n return nextOrObserver.next(new UploadTaskSnapshotCompat(taskSnapshot, _this, _this._ref));\n } : undefined,\n complete: nextOrObserver.complete || undefined,\n error: nextOrObserver.error || undefined\n };\n }\n }\n\n return this._delegate.on(type, wrappedNextOrObserver, error || undefined, completed || undefined);\n };\n\n return UploadTaskCompat;\n}();\n\nvar ListResultCompat = function () {\n function ListResultCompat(_delegate, _service) {\n this._delegate = _delegate;\n this._service = _service;\n }\n\n Object.defineProperty(ListResultCompat.prototype, \"prefixes\", {\n get: function get() {\n var _this = this;\n\n return this._delegate.prefixes.map(function (ref) {\n return new ReferenceCompat(ref, _this._service);\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ListResultCompat.prototype, \"items\", {\n get: function get() {\n var _this = this;\n\n return this._delegate.items.map(function (ref) {\n return new ReferenceCompat(ref, _this._service);\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ListResultCompat.prototype, \"nextPageToken\", {\n get: function get() {\n return this._delegate.nextPageToken || null;\n },\n enumerable: false,\n configurable: true\n });\n return ListResultCompat;\n}();\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar ReferenceCompat = function () {\n function ReferenceCompat(_delegate, storage) {\n this._delegate = _delegate;\n this.storage = storage;\n }\n\n Object.defineProperty(ReferenceCompat.prototype, \"name\", {\n get: function get() {\n return this._delegate.name;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ReferenceCompat.prototype, \"bucket\", {\n get: function get() {\n return this._delegate.bucket;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ReferenceCompat.prototype, \"fullPath\", {\n get: function get() {\n return this._delegate.fullPath;\n },\n enumerable: false,\n configurable: true\n });\n\n ReferenceCompat.prototype.toString = function () {\n return this._delegate.toString();\n };\n /**\r\n * @returns A reference to the object obtained by\r\n * appending childPath, removing any duplicate, beginning, or trailing\r\n * slashes.\r\n */\n\n\n ReferenceCompat.prototype.child = function (childPath) {\n var reference = _getChild(this._delegate, childPath);\n\n return new ReferenceCompat(reference, this.storage);\n };\n\n Object.defineProperty(ReferenceCompat.prototype, \"root\", {\n get: function get() {\n return new ReferenceCompat(this._delegate.root, this.storage);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ReferenceCompat.prototype, \"parent\", {\n /**\r\n * @returns A reference to the parent of the\r\n * current object, or null if the current object is the root.\r\n */\n get: function get() {\n var reference = this._delegate.parent;\n\n if (reference == null) {\n return null;\n }\n\n return new ReferenceCompat(reference, this.storage);\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Uploads a blob to this object's location.\r\n * @param data - The blob to upload.\r\n * @returns An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n\n ReferenceCompat.prototype.put = function (data, metadata) {\n this._throwIfRoot('put');\n\n return new UploadTaskCompat(uploadBytesResumable(this._delegate, data, metadata), this);\n };\n /**\r\n * Uploads a string to this object's location.\r\n * @param value - The string to upload.\r\n * @param format - The format of the string to upload.\r\n * @returns An UploadTask that lets you control and\r\n * observe the upload.\r\n */\n\n\n ReferenceCompat.prototype.putString = function (value, format, metadata) {\n if (format === void 0) {\n format = StringFormat.RAW;\n }\n\n this._throwIfRoot('putString');\n\n var data = dataFromString(format, value);\n\n var metadataClone = __assign({}, metadata);\n\n if (metadataClone['contentType'] == null && data.contentType != null) {\n metadataClone['contentType'] = data.contentType;\n }\n\n return new UploadTaskCompat(new UploadTask(this._delegate, new FbsBlob(data.data, true), metadataClone), this);\n };\n /**\r\n * List all items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * This is a helper method for calling list() repeatedly until there are\r\n * no more results. The default pagination size is 1000.\r\n *\r\n * Note: The results may not be consistent if objects are changed while this\r\n * operation is running.\r\n *\r\n * Warning: listAll may potentially consume too many resources if there are\r\n * too many results.\r\n *\r\n * @returns A Promise that resolves with all the items and prefixes under\r\n * the current storage reference. `prefixes` contains references to\r\n * sub-directories and `items` contains references to objects in this\r\n * folder. `nextPageToken` is never returned.\r\n */\n\n\n ReferenceCompat.prototype.listAll = function () {\n var _this = this;\n\n return listAll(this._delegate).then(function (r) {\n return new ListResultCompat(r, _this.storage);\n });\n };\n /**\r\n * List items (files) and prefixes (folders) under this storage reference.\r\n *\r\n * List API is only available for Firebase Rules Version 2.\r\n *\r\n * GCS is a key-blob store. Firebase Storage imposes the semantic of '/'\r\n * delimited folder structure. Refer to GCS's List API if you want to learn more.\r\n *\r\n * To adhere to Firebase Rules's Semantics, Firebase Storage does not\r\n * support objects whose paths end with \"/\" or contain two consecutive\r\n * \"/\"s. Firebase Storage List API will filter these unsupported objects.\r\n * list() may fail if there are too many unsupported objects in the bucket.\r\n *\r\n * @param options - See ListOptions for details.\r\n * @returns A Promise that resolves with the items and prefixes.\r\n * `prefixes` contains references to sub-folders and `items`\r\n * contains references to objects in this folder. `nextPageToken`\r\n * can be used to get the rest of the results.\r\n */\n\n\n ReferenceCompat.prototype.list = function (options) {\n var _this = this;\n\n return list(this._delegate, options || undefined).then(function (r) {\n return new ListResultCompat(r, _this.storage);\n });\n };\n /**\r\n * A promise that resolves with the metadata for this object. If this\r\n * object doesn't exist or metadata cannot be retreived, the promise is\r\n * rejected.\r\n */\n\n\n ReferenceCompat.prototype.getMetadata = function () {\n return getMetadata(this._delegate);\n };\n /**\r\n * Updates the metadata for this object.\r\n * @param metadata - The new metadata for the object.\r\n * Only values that have been explicitly set will be changed. Explicitly\r\n * setting a value to null will remove the metadata.\r\n * @returns A promise that resolves\r\n * with the new metadata for this object.\r\n * @see firebaseStorage.Reference.prototype.getMetadata\r\n */\n\n\n ReferenceCompat.prototype.updateMetadata = function (metadata) {\n return updateMetadata(this._delegate, metadata);\n };\n /**\r\n * @returns A promise that resolves with the download\r\n * URL for this object.\r\n */\n\n\n ReferenceCompat.prototype.getDownloadURL = function () {\n return getDownloadURL(this._delegate);\n };\n /**\r\n * Deletes the object at this location.\r\n * @returns A promise that resolves if the deletion succeeds.\r\n */\n\n\n ReferenceCompat.prototype.delete = function () {\n this._throwIfRoot('delete');\n\n return deleteObject(this._delegate);\n };\n\n ReferenceCompat.prototype._throwIfRoot = function (name) {\n if (this._delegate._location.path === '') {\n throw invalidRootOperation(name);\n }\n };\n\n return ReferenceCompat;\n}();\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * A service that provides firebaseStorage.Reference instances.\r\n * @param opt_url gs:// url to a custom Storage Bucket\r\n */\n\n\nvar StorageServiceCompat = function () {\n function StorageServiceCompat(app, _delegate) {\n this.app = app;\n this._delegate = _delegate;\n }\n\n Object.defineProperty(StorageServiceCompat.prototype, \"maxOperationRetryTime\", {\n get: function get() {\n return this._delegate.maxOperationRetryTime;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StorageServiceCompat.prototype, \"maxUploadRetryTime\", {\n get: function get() {\n return this._delegate.maxUploadRetryTime;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Returns a firebaseStorage.Reference for the given path in the default\r\n * bucket.\r\n */\n\n StorageServiceCompat.prototype.ref = function (path) {\n if (isUrl(path)) {\n throw invalidArgument('ref() expected a child path but got a URL, use refFromURL instead.');\n }\n\n return new ReferenceCompat(ref(this._delegate, path), this);\n };\n /**\r\n * Returns a firebaseStorage.Reference object for the given absolute URL,\r\n * which must be a gs:// or http[s]:// URL.\r\n */\n\n\n StorageServiceCompat.prototype.refFromURL = function (url) {\n if (!isUrl(url)) {\n throw invalidArgument('refFromURL() expected a full URL but got a child path, use ref() instead.');\n }\n\n try {\n Location.makeFromUrl(url, this._delegate.host);\n } catch (e) {\n throw invalidArgument('refFromUrl() expected a valid full URL but got an invalid one.');\n }\n\n return new ReferenceCompat(ref(this._delegate, url), this);\n };\n\n StorageServiceCompat.prototype.setMaxUploadRetryTime = function (time) {\n this._delegate.maxUploadRetryTime = time;\n };\n\n StorageServiceCompat.prototype.setMaxOperationRetryTime = function (time) {\n this._delegate.maxOperationRetryTime = time;\n };\n\n StorageServiceCompat.prototype.useEmulator = function (host, port, options) {\n if (options === void 0) {\n options = {};\n }\n\n connectStorageEmulator(this._delegate, host, port, options);\n };\n\n return StorageServiceCompat;\n}();\n\nvar name = \"@firebase/storage\";\nvar version = \"0.7.0\";\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Type constant for Firebase Storage.\r\n */\n\nvar STORAGE_TYPE = 'storage';\n\nfunction factory(container, _a) {\n var url = _a.instanceIdentifier; // Dependencies\n // TODO: This should eventually be 'app-compat'\n\n var app = container.getProvider('app').getImmediate();\n var authProvider = container.getProvider('auth-internal');\n var appCheckProvider = container.getProvider('app-check-internal'); // TODO: get StorageService instance from component framework instead\n // of creating a new one.\n\n var storageServiceCompat = new StorageServiceCompat(app, new FirebaseStorageImpl(app, authProvider, appCheckProvider, new ConnectionPool(), url, firebase.SDK_VERSION));\n return storageServiceCompat;\n}\n\nfunction registerStorage(instance) {\n var namespaceExports = {\n // no-inline\n TaskState: TaskState,\n TaskEvent: TaskEvent,\n StringFormat: StringFormat,\n Storage: FirebaseStorageImpl,\n Reference: ReferenceCompat\n };\n instance.INTERNAL.registerComponent(new Component(STORAGE_TYPE, factory, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(namespaceExports).setMultipleInstances(true));\n instance.registerVersion(name, version);\n}\n\nregisterStorage(firebase);\nexport { registerStorage };","import firebase from '@firebase/app';\nimport { __extends, __awaiter, __generator } from 'tslib';\nimport { Component } from '@firebase/component';\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Standard error codes for different ways a request can fail, as defined by:\r\n * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto\r\n *\r\n * This map is used primarily to convert from a backend error code string to\r\n * a client SDK error code string, and make sure it's in the supported set.\r\n */\n\nvar errorCodeMap = {\n OK: 'ok',\n CANCELLED: 'cancelled',\n UNKNOWN: 'unknown',\n INVALID_ARGUMENT: 'invalid-argument',\n DEADLINE_EXCEEDED: 'deadline-exceeded',\n NOT_FOUND: 'not-found',\n ALREADY_EXISTS: 'already-exists',\n PERMISSION_DENIED: 'permission-denied',\n UNAUTHENTICATED: 'unauthenticated',\n RESOURCE_EXHAUSTED: 'resource-exhausted',\n FAILED_PRECONDITION: 'failed-precondition',\n ABORTED: 'aborted',\n OUT_OF_RANGE: 'out-of-range',\n UNIMPLEMENTED: 'unimplemented',\n INTERNAL: 'internal',\n UNAVAILABLE: 'unavailable',\n DATA_LOSS: 'data-loss'\n};\n/**\r\n * An explicit error that can be thrown from a handler to send an error to the\r\n * client that called the function.\r\n */\n\nvar HttpsErrorImpl = function (_super) {\n __extends(HttpsErrorImpl, _super);\n\n function HttpsErrorImpl(code, message, details) {\n var _this = _super.call(this, message) || this; // This is a workaround for a bug in TypeScript when extending Error:\n // tslint:disable-next-line\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n\n\n Object.setPrototypeOf(_this, HttpsErrorImpl.prototype);\n _this.code = code;\n _this.details = details;\n return _this;\n }\n\n return HttpsErrorImpl;\n}(Error);\n/**\r\n * Takes an HTTP status code and returns the corresponding ErrorCode.\r\n * This is the standard HTTP status code -> error mapping defined in:\r\n * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto\r\n *\r\n * @param status An HTTP status code.\r\n * @return The corresponding ErrorCode, or ErrorCode.UNKNOWN if none.\r\n */\n\n\nfunction codeForHTTPStatus(status) {\n // Make sure any successful status is OK.\n if (status >= 200 && status < 300) {\n return 'ok';\n }\n\n switch (status) {\n case 0:\n // This can happen if the server returns 500.\n return 'internal';\n\n case 400:\n return 'invalid-argument';\n\n case 401:\n return 'unauthenticated';\n\n case 403:\n return 'permission-denied';\n\n case 404:\n return 'not-found';\n\n case 409:\n return 'aborted';\n\n case 429:\n return 'resource-exhausted';\n\n case 499:\n return 'cancelled';\n\n case 500:\n return 'internal';\n\n case 501:\n return 'unimplemented';\n\n case 503:\n return 'unavailable';\n\n case 504:\n return 'deadline-exceeded';\n }\n\n return 'unknown';\n}\n/**\r\n * Takes an HTTP response and returns the corresponding Error, if any.\r\n */\n\n\nfunction _errorForResponse(status, bodyJSON, serializer) {\n var code = codeForHTTPStatus(status); // Start with reasonable defaults from the status code.\n\n var description = code;\n var details = undefined; // Then look through the body for explicit details.\n\n try {\n var errorJSON = bodyJSON && bodyJSON.error;\n\n if (errorJSON) {\n var status_1 = errorJSON.status;\n\n if (typeof status_1 === 'string') {\n if (!errorCodeMap[status_1]) {\n // They must've included an unknown error code in the body.\n return new HttpsErrorImpl('internal', 'internal');\n }\n\n code = errorCodeMap[status_1]; // TODO(klimt): Add better default descriptions for error enums.\n // The default description needs to be updated for the new code.\n\n description = status_1;\n }\n\n var message = errorJSON.message;\n\n if (typeof message === 'string') {\n description = message;\n }\n\n details = errorJSON.details;\n\n if (details !== undefined) {\n details = serializer.decode(details);\n }\n }\n } catch (e) {// If we couldn't parse explicit error data, that's fine.\n }\n\n if (code === 'ok') {\n // Technically, there's an edge case where a developer could explicitly\n // return an error code of OK, and we will treat it as success, but that\n // seems reasonable.\n return null;\n }\n\n return new HttpsErrorImpl(code, description, details);\n}\n/**\r\n * Helper class to get metadata that should be included with a function call.\r\n */\n\n\nvar ContextProvider = function () {\n function ContextProvider(authProvider, messagingProvider) {\n var _this = this;\n\n this.auth = null;\n this.messaging = null;\n this.auth = authProvider.getImmediate({\n optional: true\n });\n this.messaging = messagingProvider.getImmediate({\n optional: true\n });\n\n if (!this.auth) {\n authProvider.get().then(function (auth) {\n return _this.auth = auth;\n }, function () {\n /* get() never rejects */\n });\n }\n\n if (!this.messaging) {\n messagingProvider.get().then(function (messaging) {\n return _this.messaging = messaging;\n }, function () {\n /* get() never rejects */\n });\n }\n }\n\n ContextProvider.prototype.getAuthToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n var token;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.auth) {\n return [2\n /*return*/\n , undefined];\n }\n\n _a.label = 1;\n\n case 1:\n _a.trys.push([1, 3,, 4]);\n\n return [4\n /*yield*/\n , this.auth.getToken()];\n\n case 2:\n token = _a.sent();\n\n if (!token) {\n return [2\n /*return*/\n , undefined];\n }\n\n return [2\n /*return*/\n , token.accessToken];\n\n case 3:\n _a.sent(); // If there's any error when trying to get the auth token, leave it off.\n\n\n return [2\n /*return*/\n , undefined];\n\n case 4:\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n\n ContextProvider.prototype.getInstanceIdToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.messaging || !('Notification' in self) || Notification.permission !== 'granted') {\n return [2\n /*return*/\n , undefined];\n }\n\n _a.label = 1;\n\n case 1:\n _a.trys.push([1, 3,, 4]);\n\n return [4\n /*yield*/\n , this.messaging.getToken()];\n\n case 2:\n return [2\n /*return*/\n , _a.sent()];\n\n case 3:\n _a.sent(); // We don't warn on this, because it usually means messaging isn't set up.\n // console.warn('Failed to retrieve instance id token.', e);\n // If there's any error when trying to get the token, leave it off.\n\n\n return [2\n /*return*/\n , undefined];\n\n case 4:\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n\n ContextProvider.prototype.getContext = function () {\n return __awaiter(this, void 0, void 0, function () {\n var authToken, instanceIdToken;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4\n /*yield*/\n , this.getAuthToken()];\n\n case 1:\n authToken = _a.sent();\n return [4\n /*yield*/\n , this.getInstanceIdToken()];\n\n case 2:\n instanceIdToken = _a.sent();\n return [2\n /*return*/\n , {\n authToken: authToken,\n instanceIdToken: instanceIdToken\n }];\n }\n });\n });\n };\n\n return ContextProvider;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n\nvar LONG_TYPE = 'type.googleapis.com/google.protobuf.Int64Value';\nvar UNSIGNED_LONG_TYPE = 'type.googleapis.com/google.protobuf.UInt64Value';\n\nfunction mapValues( // { [k: string]: unknown } is no longer a wildcard assignment target after typescript 3.5\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no, f) {\n var result = {};\n\n for (var key in o) {\n if (o.hasOwnProperty(key)) {\n result[key] = f(o[key]);\n }\n }\n\n return result;\n}\n\nvar Serializer = function () {\n function Serializer() {} // Takes data and encodes it in a JSON-friendly way, such that types such as\n // Date are preserved.\n\n\n Serializer.prototype.encode = function (data) {\n var _this = this;\n\n if (data == null) {\n return null;\n }\n\n if (data instanceof Number) {\n data = data.valueOf();\n }\n\n if (typeof data === 'number' && isFinite(data)) {\n // Any number in JS is safe to put directly in JSON and parse as a double\n // without any loss of precision.\n return data;\n }\n\n if (data === true || data === false) {\n return data;\n }\n\n if (Object.prototype.toString.call(data) === '[object String]') {\n return data;\n }\n\n if (data instanceof Date) {\n return data.toISOString();\n }\n\n if (Array.isArray(data)) {\n return data.map(function (x) {\n return _this.encode(x);\n });\n }\n\n if (typeof data === 'function' || typeof data === 'object') {\n return mapValues(data, function (x) {\n return _this.encode(x);\n });\n } // If we got this far, the data is not encodable.\n\n\n throw new Error('Data cannot be encoded in JSON: ' + data);\n }; // Takes data that's been encoded in a JSON-friendly form and returns a form\n // with richer datatypes, such as Dates, etc.\n\n\n Serializer.prototype.decode = function (json) {\n var _this = this;\n\n if (json == null) {\n return json;\n }\n\n if (json['@type']) {\n switch (json['@type']) {\n case LONG_TYPE: // Fall through and handle this the same as unsigned.\n\n case UNSIGNED_LONG_TYPE:\n {\n // Technically, this could work return a valid number for malformed\n // data if there was a number followed by garbage. But it's just not\n // worth all the extra code to detect that case.\n var value = Number(json['value']);\n\n if (isNaN(value)) {\n throw new Error('Data cannot be decoded from JSON: ' + json);\n }\n\n return value;\n }\n\n default:\n {\n throw new Error('Data cannot be decoded from JSON: ' + json);\n }\n }\n }\n\n if (Array.isArray(json)) {\n return json.map(function (x) {\n return _this.decode(x);\n });\n }\n\n if (typeof json === 'function' || typeof json === 'object') {\n return mapValues(json, function (x) {\n return _this.decode(x);\n });\n } // Anything else is safe to return.\n\n\n return json;\n };\n\n return Serializer;\n}();\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Returns a Promise that will be rejected after the given duration.\r\n * The error will be of type HttpsErrorImpl.\r\n *\r\n * @param millis Number of milliseconds to wait before rejecting.\r\n */\n\n\nfunction failAfter(millis) {\n var timer;\n var promise = new Promise(function (_, reject) {\n timer = setTimeout(function () {\n reject(new HttpsErrorImpl('deadline-exceeded', 'deadline-exceeded'));\n }, millis);\n });\n return {\n timer: timer,\n promise: promise\n };\n}\n/**\r\n * The main class for the Firebase Functions SDK.\r\n */\n\n\nvar Service = function () {\n /**\r\n * Creates a new Functions service for the given app and (optional) region or custom domain.\r\n * @param app_ The FirebaseApp to use.\r\n * @param regionOrCustomDomain_ one of:\r\n * a) A region to call functions from, such as us-central1\r\n * b) A custom domain to use as a functions prefix, such as https://mydomain.com\r\n */\n function Service(app_, authProvider, messagingProvider, appCheckProvider, regionOrCustomDomain_, fetchImpl) {\n var _this = this;\n\n if (regionOrCustomDomain_ === void 0) {\n regionOrCustomDomain_ = 'us-central1';\n }\n\n this.app_ = app_;\n this.appCheckProvider = appCheckProvider;\n this.fetchImpl = fetchImpl;\n this.serializer = new Serializer();\n this.emulatorOrigin = null;\n this.INTERNAL = {\n delete: function _delete() {\n return Promise.resolve(_this.deleteService());\n }\n };\n this.contextProvider = new ContextProvider(authProvider, messagingProvider); // Cancels all ongoing requests when resolved.\n\n this.cancelAllRequests = new Promise(function (resolve) {\n _this.deleteService = function () {\n return resolve();\n };\n }); // Resolve the region or custom domain overload by attempting to parse it.\n\n try {\n var url = new URL(regionOrCustomDomain_);\n this.customDomain = url.origin;\n this.region = 'us-central1';\n } catch (e) {\n this.customDomain = null;\n this.region = regionOrCustomDomain_;\n }\n }\n\n Object.defineProperty(Service.prototype, \"app\", {\n get: function get() {\n return this.app_;\n },\n enumerable: false,\n configurable: true\n });\n /**\r\n * Returns the URL for a callable with the given name.\r\n * @param name The name of the callable.\r\n */\n\n Service.prototype._url = function (name) {\n var projectId = this.app_.options.projectId;\n\n if (this.emulatorOrigin !== null) {\n var origin_1 = this.emulatorOrigin;\n return origin_1 + \"/\" + projectId + \"/\" + this.region + \"/\" + name;\n }\n\n if (this.customDomain !== null) {\n return this.customDomain + \"/\" + name;\n }\n\n return \"https://\" + this.region + \"-\" + projectId + \".cloudfunctions.net/\" + name;\n };\n /**\r\n * Modify this instance to communicate with the Cloud Functions emulator.\r\n *\r\n * Note: this must be called before this instance has been used to do any operations.\r\n *\r\n * @param host The emulator host (ex: localhost)\r\n * @param port The emulator port (ex: 5001)\r\n */\n\n\n Service.prototype.useEmulator = function (host, port) {\n this.emulatorOrigin = \"http://\" + host + \":\" + port;\n };\n /**\r\n * Changes this instance to point to a Cloud Functions emulator running\r\n * locally. See https://firebase.google.com/docs/functions/local-emulator\r\n *\r\n * @deprecated Prefer the useEmulator(host, port) method.\r\n * @param origin The origin of the local emulator, such as\r\n * \"http://localhost:5005\".\r\n */\n\n\n Service.prototype.useFunctionsEmulator = function (origin) {\n this.emulatorOrigin = origin;\n };\n /**\r\n * Returns a reference to the callable https trigger with the given name.\r\n * @param name The name of the trigger.\r\n */\n\n\n Service.prototype.httpsCallable = function (name, options) {\n var _this = this;\n\n return function (data) {\n return _this.call(name, data, options || {});\n };\n };\n /**\r\n * Does an HTTP POST and returns the completed response.\r\n * @param url The url to post to.\r\n * @param body The JSON body of the post.\r\n * @param headers The HTTP headers to include in the request.\r\n * @return A Promise that will succeed when the request finishes.\r\n */\n\n\n Service.prototype.postJSON = function (url, body, headers) {\n return __awaiter(this, void 0, void 0, function () {\n var appCheckToken, response, json;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n headers['Content-Type'] = 'application/json';\n return [4\n /*yield*/\n , this.getAppCheckToken()];\n\n case 1:\n appCheckToken = _a.sent();\n\n if (appCheckToken !== null) {\n headers['X-Firebase-AppCheck'] = appCheckToken;\n }\n\n _a.label = 2;\n\n case 2:\n _a.trys.push([2, 4,, 5]);\n\n return [4\n /*yield*/\n , this.fetchImpl(url, {\n method: 'POST',\n body: JSON.stringify(body),\n headers: headers\n })];\n\n case 3:\n response = _a.sent();\n return [3\n /*break*/\n , 5];\n\n case 4:\n _a.sent(); // This could be an unhandled error on the backend, or it could be a\n // network error. There's no way to know, since an unhandled error on the\n // backend will fail to set the proper CORS header, and thus will be\n // treated as a network error by fetch.\n\n\n return [2\n /*return*/\n , {\n status: 0,\n json: null\n }];\n\n case 5:\n json = null;\n _a.label = 6;\n\n case 6:\n _a.trys.push([6, 8,, 9]);\n\n return [4\n /*yield*/\n , response.json()];\n\n case 7:\n json = _a.sent();\n return [3\n /*break*/\n , 9];\n\n case 8:\n _a.sent();\n\n return [3\n /*break*/\n , 9];\n\n case 9:\n return [2\n /*return*/\n , {\n status: response.status,\n json: json\n }];\n }\n });\n });\n };\n\n Service.prototype.getAppCheckToken = function () {\n return __awaiter(this, void 0, void 0, function () {\n var appCheck, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n appCheck = this.appCheckProvider.getImmediate({\n optional: true\n });\n if (!appCheck) return [3\n /*break*/\n , 2];\n return [4\n /*yield*/\n , appCheck.getToken()];\n\n case 1:\n result = _a.sent(); // If getToken() fails, it will still return a dummy token that also has\n // an error field containing the error message. We will send any token\n // provided here and show an error if/when it is rejected by the functions\n // endpoint.\n\n return [2\n /*return*/\n , result.token];\n\n case 2:\n return [2\n /*return*/\n , null];\n }\n });\n });\n };\n /**\r\n * Calls a callable function asynchronously and returns the result.\r\n * @param name The name of the callable trigger.\r\n * @param data The data to pass as params to the function.s\r\n */\n\n\n Service.prototype.call = function (name, data, options) {\n return __awaiter(this, void 0, void 0, function () {\n var url, body, headers, context, timeout, _a, timer, failAfterPromise, response, error, responseData, decodedData;\n\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n url = this._url(name); // Encode any special types, such as dates, in the input data.\n\n data = this.serializer.encode(data);\n body = {\n data: data\n };\n headers = {};\n return [4\n /*yield*/\n , this.contextProvider.getContext()];\n\n case 1:\n context = _b.sent();\n\n if (context.authToken) {\n headers['Authorization'] = 'Bearer ' + context.authToken;\n }\n\n if (context.instanceIdToken) {\n headers['Firebase-Instance-ID-Token'] = context.instanceIdToken;\n }\n\n timeout = options.timeout || 70000;\n _a = failAfter(timeout), timer = _a.timer, failAfterPromise = _a.promise;\n return [4\n /*yield*/\n , Promise.race([clearTimeoutWrapper(timer, this.postJSON(url, body, headers)), failAfterPromise, clearTimeoutWrapper(timer, this.cancelAllRequests)])];\n\n case 2:\n response = _b.sent(); // If service was deleted, interrupted response throws an error.\n\n if (!response) {\n throw new HttpsErrorImpl('cancelled', 'Firebase Functions instance was deleted.');\n }\n\n error = _errorForResponse(response.status, response.json, this.serializer);\n\n if (error) {\n throw error;\n }\n\n if (!response.json) {\n throw new HttpsErrorImpl('internal', 'Response is not valid JSON object.');\n }\n\n responseData = response.json.data; // TODO(klimt): For right now, allow \"result\" instead of \"data\", for\n // backwards compatibility.\n\n if (typeof responseData === 'undefined') {\n responseData = response.json.result;\n }\n\n if (typeof responseData === 'undefined') {\n // Consider the response malformed.\n throw new HttpsErrorImpl('internal', 'Response is missing data field.');\n }\n\n decodedData = this.serializer.decode(responseData);\n return [2\n /*return*/\n , {\n data: decodedData\n }];\n }\n });\n });\n };\n\n return Service;\n}();\n\nfunction clearTimeoutWrapper(timer, promise) {\n return __awaiter(this, void 0, void 0, function () {\n var result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4\n /*yield*/\n , promise];\n\n case 1:\n result = _a.sent(); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n clearTimeout(timer);\n return [2\n /*return*/\n , result];\n }\n });\n });\n}\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\n/**\r\n * Type constant for Firebase Functions.\r\n */\n\n\nvar FUNCTIONS_TYPE = 'functions';\n\nfunction registerFunctions(instance, fetchImpl) {\n var namespaceExports = {\n // no-inline\n Functions: Service\n };\n\n function factory(container, _a) {\n var regionOrCustomDomain = _a.instanceIdentifier; // Dependencies\n\n var app = container.getProvider('app').getImmediate();\n var authProvider = container.getProvider('auth-internal');\n var appCheckProvider = container.getProvider('app-check-internal');\n var messagingProvider = container.getProvider('messaging'); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n return new Service(app, authProvider, messagingProvider, appCheckProvider, regionOrCustomDomain, fetchImpl);\n }\n\n instance.INTERNAL.registerComponent(new Component(FUNCTIONS_TYPE, factory, \"PUBLIC\"\n /* PUBLIC */\n ).setServiceProps(namespaceExports).setMultipleInstances(true));\n}\n\nvar name = \"@firebase/functions\";\nvar version = \"0.6.15\";\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nregisterFunctions(firebase, fetch.bind(self));\nfirebase.registerVersion(name, version);","/**\n * Implement Gatsby's Browser APIs in this file.\n *\n * See: https://www.gatsbyjs.com/docs/browser-apis/\n */\n\n// You can delete this file if you're not using it\n\nimport \"antd/dist/antd.css\"\n// import \"antd/dist/antd.js\"\n\nimport \"firebase/auth\"\nimport \"firebase/firestore\"\nimport \"firebase/storage\"\nimport \"firebase/functions\"\n\nimport React from \"react\"\nimport AuthProvider from \"./src/context/auth\"\n\nexport const wrapRootElement = ({ element }) => (\n {element}\n)\n","import firebase from '@firebase/app';\nexport { default } from '@firebase/app';\nvar name = \"firebase\";\nvar version = \"8.10.0\";\n/**\r\n * @license\r\n * Copyright 2018 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n\nfirebase.registerVersion(name, version, 'app');\nfirebase.SDK_VERSION = version;","import firebase from \"firebase/app\";\n\nif (!firebase.apps.length) {\n firebase.initializeApp({\n apiKey: process.env.FIREBASE_API_KEY,\n authDomain: process.env.FIREBASE_AUTH_DOMAIN,\n databaseURL: process.env.FIREBASE_DATABASE_URL,\n projectId: process.env.FIREBASE_PROJECT_ID,\n storageBucket: process.env.FIREBASE_STORAGE_BUCKET,\n messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,\n appId: process.env.FIREBASE_APP_ID,\n measurementId: process.env.FIREBASE_MEASUREMENT_ID\n });\n}\n\nexport default firebase;\n","import firebase from \"./src/firebase\";\n\nexport default firebase;\n","import React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport Indicator from \"./components/Indicator\";\n\nconst ShadowPortal = ({\n children,\n identifier\n}) => {\n const mountNode = React.useRef(null);\n const portalNode = React.useRef(null);\n const shadowNode = React.useRef(null);\n const [, forceUpdate] = React.useState();\n React.useLayoutEffect(() => {\n const ownerDocument = mountNode.current.ownerDocument;\n portalNode.current = ownerDocument.createElement(identifier);\n shadowNode.current = portalNode.current.attachShadow({\n mode: `open`\n });\n ownerDocument.body.appendChild(portalNode.current);\n forceUpdate({});\n return () => {\n if (portalNode.current && portalNode.current.ownerDocument) {\n portalNode.current.ownerDocument.body.removeChild(portalNode.current);\n }\n };\n }, []);\n return shadowNode.current ? /*#__PURE__*/createPortal(children, shadowNode.current) : /*#__PURE__*/React.createElement(\"span\", {\n ref: mountNode\n });\n};\n\nexport const wrapRootElement = ({\n element\n}) => {\n if (process.env.GATSBY_PREVIEW_INDICATOR_ENABLED === `true`) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, element, /*#__PURE__*/React.createElement(ShadowPortal, {\n identifier: \"gatsby-preview-indicator\"\n }, /*#__PURE__*/React.createElement(Indicator, null)));\n } else {\n return /*#__PURE__*/React.createElement(React.Fragment, null, element);\n }\n};","\"use strict\";\n\nexports.onRouteUpdate = function (_ref) {\n var location = _ref.location;\n\n if (process.env.NODE_ENV !== \"production\" || typeof gtag !== \"function\") {\n return null;\n }\n\n var pathIsExcluded = location && typeof window.excludeGtagPaths !== \"undefined\" && window.excludeGtagPaths.some(function (rx) {\n return rx.test(location.pathname);\n });\n if (pathIsExcluded) return null; // wrap inside a timeout to make sure react-helmet is done with its changes (https://github.com/gatsbyjs/gatsby/issues/11592)\n\n var sendPageView = function sendPageView() {\n var pagePath = location ? location.pathname + location.search + location.hash : undefined;\n window.gtag(\"event\", \"page_view\", {\n page_path: pagePath\n });\n };\n\n if (\"requestAnimationFrame\" in window) {\n requestAnimationFrame(function () {\n requestAnimationFrame(sendPageView);\n });\n } else {\n // simulate 2 rAF calls\n setTimeout(sendPageView, 32);\n }\n\n return null;\n};","/* eslint-disable no-unused-expressions */\nimport { stripIndent } from \"common-tags\"\nimport camelCase from \"camelcase\"\nimport { IGatsbyImageData } from \".\"\n\nconst DEFAULT_PIXEL_DENSITIES = [0.25, 0.5, 1, 2]\nexport const DEFAULT_BREAKPOINTS = [750, 1080, 1366, 1920]\nexport const EVERY_BREAKPOINT = [\n 320, 654, 768, 1024, 1366, 1600, 1920, 2048, 2560, 3440, 3840, 4096,\n]\nconst DEFAULT_FLUID_WIDTH = 800\nconst DEFAULT_FIXED_WIDTH = 800\nconst DEFAULT_ASPECT_RATIO = 4 / 3\n\nexport type Fit = \"cover\" | \"fill\" | \"inside\" | \"outside\" | \"contain\"\n\nexport type Layout = \"fixed\" | \"fullWidth\" | \"constrained\"\nexport type ImageFormat = \"jpg\" | \"png\" | \"webp\" | \"avif\" | \"auto\" | \"\"\n\n/**\n * The minimal required reporter, as we don't want to import it from gatsby-cli\n */\nexport interface IReporter {\n warn(message: string): void\n}\n\nexport interface ISharpGatsbyImageArgs {\n layout?: Layout\n formats?: Array\n placeholder?: \"tracedSVG\" | \"dominantColor\" | \"blurred\" | \"none\"\n tracedSVGOptions?: Record\n width?: number\n height?: number\n aspectRatio?: number\n sizes?: string\n quality?: number\n transformOptions?: {\n fit?: Fit\n cropFocus?: number | string\n duotone?: {\n highlight: string\n shadow: string\n opacity?: number\n }\n grayscale?: boolean\n rotate?: number\n trim?: number\n }\n jpgOptions?: Record\n pngOptions?: Record\n webpOptions?: Record\n avifOptions?: Record\n blurredOptions?: { width?: number; toFormat?: ImageFormat }\n breakpoints?: Array\n backgroundColor?: string\n}\n\nexport interface IImageSizeArgs {\n width?: number\n height?: number\n layout?: Layout\n filename: string\n outputPixelDensities?: Array\n breakpoints?: Array\n fit?: Fit\n reporter?: IReporter\n sourceMetadata: { width: number; height: number }\n}\n\nexport interface IImageSizes {\n sizes: Array\n presentationWidth: number\n presentationHeight: number\n aspectRatio: number\n unscaledWidth: number\n}\n\nexport interface IImage {\n src: string\n width: number\n height: number\n format: ImageFormat\n}\n\nexport interface IGatsbyImageHelperArgs {\n pluginName: string\n generateImageSource: (\n filename: string,\n width: number,\n height: number,\n format: ImageFormat,\n fit?: Fit,\n options?: Record\n ) => IImage\n layout?: Layout\n formats?: Array\n filename: string\n placeholderURL?: string\n width?: number\n height?: number\n sizes?: string\n reporter?: IReporter\n sourceMetadata?: { width: number; height: number; format: ImageFormat }\n fit?: Fit\n options?: Record\n breakpoints?: Array\n backgroundColor?: string\n aspectRatio?: number\n}\n\nconst warn = (message: string): void => console.warn(message)\n\nconst sortNumeric = (a: number, b: number): number => a - b\n\nexport const getSizes = (width: number, layout: Layout): string | undefined => {\n switch (layout) {\n // If screen is wider than the max size, image width is the max size,\n // otherwise it's the width of the screen\n case `constrained`:\n return `(min-width: ${width}px) ${width}px, 100vw`\n\n // Image is always the same width, whatever the size of the screen\n case `fixed`:\n return `${width}px`\n\n // Image is always the width of the screen\n case `fullWidth`:\n return `100vw`\n\n default:\n return undefined\n }\n}\n\nexport const getSrcSet = (images: Array): string =>\n images.map(image => `${image.src} ${image.width}w`).join(`,\\n`)\n\nexport function formatFromFilename(filename: string): ImageFormat | undefined {\n const dot = filename.lastIndexOf(`.`)\n if (dot !== -1) {\n const ext = filename.substr(dot + 1)\n if (ext === `jpeg`) {\n return `jpg`\n }\n if (ext.length === 3 || ext.length === 4) {\n return ext as ImageFormat\n }\n }\n return undefined\n}\n\nexport function setDefaultDimensions(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageHelperArgs {\n let {\n layout = `constrained`,\n width,\n height,\n sourceMetadata,\n breakpoints,\n aspectRatio,\n formats = [`auto`, `webp`],\n } = args\n formats = formats.map(format => format.toLowerCase() as ImageFormat)\n layout = camelCase(layout) as Layout\n\n if (width && height) {\n return { ...args, formats, layout, aspectRatio: width / height }\n }\n if (sourceMetadata.width && sourceMetadata.height && !aspectRatio) {\n aspectRatio = sourceMetadata.width / sourceMetadata.height\n }\n\n if (layout === `fullWidth`) {\n width = width || sourceMetadata.width || breakpoints[breakpoints.length - 1]\n height = height || Math.round(width / (aspectRatio || DEFAULT_ASPECT_RATIO))\n } else {\n if (!width) {\n if (height && aspectRatio) {\n width = height * aspectRatio\n } else if (sourceMetadata.width) {\n width = sourceMetadata.width\n } else if (height) {\n width = Math.round(height / DEFAULT_ASPECT_RATIO)\n } else {\n width = DEFAULT_FIXED_WIDTH\n }\n }\n\n if (aspectRatio && !height) {\n height = Math.round(width / aspectRatio)\n } else if (!aspectRatio) {\n aspectRatio = width / height\n }\n }\n return { ...args, width, height, aspectRatio, layout, formats }\n}\n\n/**\n * Use this for getting an image for the blurred placeholder. This ensures the\n * aspect ratio and crop match the main image\n */\nexport function getLowResolutionImageURL(\n args: IGatsbyImageHelperArgs,\n width = 20\n): string {\n args = setDefaultDimensions(args)\n const { generateImageSource, filename, aspectRatio } = args\n return generateImageSource(\n filename,\n width,\n Math.round(width / aspectRatio),\n args.sourceMetadata.format || `jpg`,\n args.fit,\n args.options\n )?.src\n}\n\nexport function generateImageData(\n args: IGatsbyImageHelperArgs\n): IGatsbyImageData {\n args = setDefaultDimensions(args)\n\n let {\n pluginName,\n sourceMetadata,\n generateImageSource,\n layout,\n fit,\n options,\n width,\n height,\n filename,\n reporter = { warn },\n backgroundColor,\n placeholderURL,\n } = args\n\n if (!pluginName) {\n reporter.warn(\n `[gatsby-plugin-image] \"generateImageData\" was not passed a plugin name`\n )\n }\n\n if (typeof generateImageSource !== `function`) {\n throw new Error(`generateImageSource must be a function`)\n }\n\n if (!sourceMetadata || (!sourceMetadata.width && !sourceMetadata.height)) {\n // No metadata means we let the CDN handle max size etc, aspect ratio etc\n sourceMetadata = {\n width,\n height,\n format: sourceMetadata?.format || formatFromFilename(filename) || `auto`,\n }\n } else if (!sourceMetadata.format) {\n sourceMetadata.format = formatFromFilename(filename)\n }\n\n const formats = new Set(args.formats)\n\n if (formats.size === 0 || formats.has(`auto`) || formats.has(``)) {\n formats.delete(`auto`)\n formats.delete(``)\n formats.add(sourceMetadata.format)\n }\n\n if (formats.has(`jpg`) && formats.has(`png`)) {\n reporter.warn(\n `[${pluginName}] Specifying both 'jpg' and 'png' formats is not supported. Using 'auto' instead`\n )\n if (sourceMetadata.format === `jpg`) {\n formats.delete(`png`)\n } else {\n formats.delete(`jpg`)\n }\n }\n\n const imageSizes = calculateImageSizes({ ...args, sourceMetadata })\n\n const result: IGatsbyImageData[\"images\"] = {\n sources: [],\n }\n\n let sizes = args.sizes\n if (!sizes) {\n sizes = getSizes(imageSizes.presentationWidth, layout)\n }\n\n formats.forEach(format => {\n const images = imageSizes.sizes\n .map(size => {\n const imageSrc = generateImageSource(\n filename,\n size,\n Math.round(size / imageSizes.aspectRatio),\n format,\n fit,\n options\n )\n if (\n !imageSrc?.width ||\n !imageSrc.height ||\n !imageSrc.src ||\n !imageSrc.format\n ) {\n reporter.warn(\n `[${pluginName}] The resolver for image ${filename} returned an invalid value.`\n )\n return undefined\n }\n return imageSrc\n })\n .filter(Boolean)\n\n if (format === `jpg` || format === `png` || format === `auto`) {\n const unscaled =\n images.find(img => img.width === imageSizes.unscaledWidth) || images[0]\n\n if (unscaled) {\n result.fallback = {\n src: unscaled.src,\n srcSet: getSrcSet(images),\n sizes,\n }\n }\n } else {\n result.sources?.push({\n srcSet: getSrcSet(images),\n sizes,\n type: `image/${format}`,\n })\n }\n })\n\n const imageProps: Partial = {\n images: result,\n layout,\n backgroundColor,\n }\n\n if (placeholderURL) {\n imageProps.placeholder = { fallback: placeholderURL }\n }\n\n switch (layout) {\n case `fixed`:\n imageProps.width = imageSizes.presentationWidth\n imageProps.height = imageSizes.presentationHeight\n break\n\n case `fullWidth`:\n imageProps.width = 1\n imageProps.height = 1 / imageSizes.aspectRatio\n break\n\n case `constrained`:\n imageProps.width = args.width || imageSizes.presentationWidth || 1\n imageProps.height = (imageProps.width || 1) / imageSizes.aspectRatio\n }\n\n return imageProps as IGatsbyImageData\n}\n\nconst dedupeAndSortDensities = (values: Array): Array =>\n Array.from(new Set([1, ...values])).sort(sortNumeric)\n\nexport function calculateImageSizes(args: IImageSizeArgs): IImageSizes {\n const {\n width,\n height,\n filename,\n layout = `constrained`,\n sourceMetadata: imgDimensions,\n reporter = { warn },\n breakpoints = DEFAULT_BREAKPOINTS,\n } = args\n\n // check that all dimensions provided are positive\n const userDimensions = { width, height }\n const erroneousUserDimensions = Object.entries(userDimensions).filter(\n ([_, size]) => typeof size === `number` && size < 1\n )\n if (erroneousUserDimensions.length) {\n throw new Error(\n `Specified dimensions for images must be positive numbers (> 0). Problem dimensions you have are ${erroneousUserDimensions\n .map(dim => dim.join(`: `))\n .join(`, `)}`\n )\n }\n\n if (layout === `fixed`) {\n return fixedImageSizes(args)\n } else if (layout === `constrained`) {\n return responsiveImageSizes(args)\n } else if (layout === `fullWidth`) {\n return responsiveImageSizes({ breakpoints, ...args })\n } else {\n reporter.warn(\n `No valid layout was provided for the image at ${filename}. Valid image layouts are fixed, fullWidth, and constrained. Found ${layout}`\n )\n return {\n sizes: [imgDimensions.width],\n presentationWidth: imgDimensions.width,\n presentationHeight: imgDimensions.height,\n aspectRatio: imgDimensions.width / imgDimensions.height,\n unscaledWidth: imgDimensions.width,\n }\n }\n}\nexport function fixedImageSizes({\n filename,\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n reporter = { warn },\n}: IImageSizeArgs): IImageSizes {\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n if (!width) {\n if (!height) {\n width = DEFAULT_FIXED_WIDTH\n } else {\n width = Math.round(height * aspectRatio)\n }\n } else if (!height) {\n height = Math.round(width / aspectRatio)\n }\n\n const originalWidth = width // will use this for presentationWidth, don't want to lose it\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n\n // If the image is smaller than requested, warn the user that it's being processed as such\n // print out this message with the necessary information before we overwrite it for sizing\n if (isTopSizeOverriden) {\n const fixedDimension = imgDimensions.width < width ? `width` : `height`\n reporter.warn(stripIndent`\n The requested ${fixedDimension} \"${\n fixedDimension === `width` ? width : height\n }px\" for the image ${filename} was larger than the actual image ${fixedDimension} of ${\n imgDimensions[fixedDimension]\n }px. If possible, replace the current image with a larger one.`)\n\n if (fixedDimension === `width`) {\n width = imgDimensions.width\n height = Math.round(width / aspectRatio)\n } else {\n height = imgDimensions.height\n width = height * aspectRatio\n }\n }\n\n const sizes = densities\n .filter(size => size >= 1) // remove smaller densities because fixed images don't need them\n .map(density => Math.round(density * (width as number)))\n .filter(size => size <= imgDimensions.width)\n\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function responsiveImageSizes({\n sourceMetadata: imgDimensions,\n width,\n height,\n fit = `cover`,\n outputPixelDensities = DEFAULT_PIXEL_DENSITIES,\n breakpoints,\n layout,\n}: IImageSizeArgs): IImageSizes {\n let sizes\n let aspectRatio = imgDimensions.width / imgDimensions.height\n // Sort, dedupe and ensure there's a 1\n const densities = dedupeAndSortDensities(outputPixelDensities)\n\n // If both are provided then we need to check the fit\n if (width && height) {\n const calculated = getDimensionsAndAspectRatio(imgDimensions, {\n width,\n height,\n fit,\n })\n width = calculated.width\n height = calculated.height\n aspectRatio = calculated.aspectRatio\n }\n\n // Case 1: width of height were passed in, make sure it isn't larger than the actual image\n width = width && Math.min(width, imgDimensions.width)\n height = height && Math.min(height, imgDimensions.height)\n\n // Case 2: neither width or height were passed in, use default size\n if (!width && !height) {\n width = Math.min(DEFAULT_FLUID_WIDTH, imgDimensions.width)\n height = width / aspectRatio\n }\n\n // if it still hasn't been found, calculate width from the derived height.\n // TS isn't smart enough to realise the type for height has been narrowed here\n if (!width) {\n width = (height as number) * aspectRatio\n }\n\n const originalWidth = width\n const isTopSizeOverriden =\n imgDimensions.width < width || imgDimensions.height < (height as number)\n if (isTopSizeOverriden) {\n width = imgDimensions.width\n height = imgDimensions.height\n }\n\n width = Math.round(width)\n\n if (breakpoints?.length > 0) {\n sizes = breakpoints.filter(size => size <= imgDimensions.width)\n\n // If a larger breakpoint has been filtered-out, add the actual image width instead\n if (\n sizes.length < breakpoints.length &&\n !sizes.includes(imgDimensions.width)\n ) {\n sizes.push(imgDimensions.width)\n }\n } else {\n sizes = densities.map(density => Math.round(density * (width as number)))\n sizes = sizes.filter(size => size <= imgDimensions.width)\n }\n\n // ensure that the size passed in is included in the final output\n if (layout === `constrained` && !sizes.includes(width)) {\n sizes.push(width)\n }\n sizes = sizes.sort(sortNumeric)\n return {\n sizes,\n aspectRatio,\n presentationWidth: originalWidth,\n presentationHeight: Math.round(originalWidth / aspectRatio),\n unscaledWidth: width,\n }\n}\n\nexport function getDimensionsAndAspectRatio(\n dimensions,\n options\n): { width: number; height: number; aspectRatio: number } {\n // Calculate the eventual width/height of the image.\n const imageAspectRatio = dimensions.width / dimensions.height\n\n let width = options.width\n let height = options.height\n\n switch (options.fit) {\n case `fill`: {\n width = options.width ? options.width : dimensions.width\n height = options.height ? options.height : dimensions.height\n break\n }\n case `inside`: {\n const widthOption = options.width\n ? options.width\n : Number.MAX_SAFE_INTEGER\n const heightOption = options.height\n ? options.height\n : Number.MAX_SAFE_INTEGER\n\n width = Math.min(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.min(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n case `outside`: {\n const widthOption = options.width ? options.width : 0\n const heightOption = options.height ? options.height : 0\n\n width = Math.max(widthOption, Math.round(heightOption * imageAspectRatio))\n height = Math.max(\n heightOption,\n Math.round(widthOption / imageAspectRatio)\n )\n break\n }\n\n default: {\n if (options.width && !options.height) {\n width = options.width\n height = Math.round(options.width / imageAspectRatio)\n }\n\n if (options.height && !options.width) {\n width = Math.round(options.height * imageAspectRatio)\n height = options.height\n }\n }\n }\n\n return {\n width,\n height,\n aspectRatio: width / height,\n }\n}\n","/* eslint-disable no-unused-expressions */\nimport {\n useState,\n CSSProperties,\n useEffect,\n HTMLAttributes,\n ImgHTMLAttributes,\n ReactEventHandler,\n SetStateAction,\n Dispatch,\n RefObject,\n} from \"react\"\nimport { Node } from \"gatsby\"\nimport { PlaceholderProps } from \"./placeholder\"\nimport { MainImageProps } from \"./main-image\"\nimport type { IGatsbyImageData } from \"./gatsby-image.browser\"\nimport {\n IGatsbyImageHelperArgs,\n generateImageData,\n Layout,\n EVERY_BREAKPOINT,\n IImage,\n ImageFormat,\n} from \"../image-utils\"\nconst imageCache = new Set()\n\n// Native lazy-loading support: https://addyosmani.com/blog/lazy-loading/\nexport const hasNativeLazyLoadSupport = (): boolean =>\n typeof HTMLImageElement !== `undefined` &&\n `loading` in HTMLImageElement.prototype\n\nexport function gatsbyImageIsInstalled(): boolean {\n return typeof GATSBY___IMAGE !== `undefined` && GATSBY___IMAGE\n}\n\nexport function storeImageloaded(cacheKey?: string): void {\n if (cacheKey) {\n imageCache.add(cacheKey)\n }\n}\n\nexport function hasImageLoaded(cacheKey: string): boolean {\n return imageCache.has(cacheKey)\n}\nexport type IGatsbyImageDataParent = T & {\n gatsbyImageData: IGatsbyImageData\n}\nexport type FileNode = Node & {\n childImageSharp?: IGatsbyImageDataParent\n}\n\nconst isGatsbyImageData = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageData | any\n): node is IGatsbyImageData =>\n // 🦆 check for a deep prop to be sure this is a valid gatsbyImageData object\n Boolean(node?.images?.fallback?.src)\n\nconst isGatsbyImageDataParent = (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node: IGatsbyImageDataParent | any\n): node is IGatsbyImageDataParent => Boolean(node?.gatsbyImageData)\n\nexport type ImageDataLike = FileNode | IGatsbyImageDataParent | IGatsbyImageData\nexport const getImage = (node: ImageDataLike): IGatsbyImageData | undefined => {\n if (isGatsbyImageData(node)) {\n return node\n }\n if (isGatsbyImageDataParent(node)) {\n return node.gatsbyImageData\n }\n return node?.childImageSharp?.gatsbyImageData\n}\n\nexport const getSrc = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.src\n\nexport const getSrcSet = (node: ImageDataLike): string | undefined =>\n getImage(node)?.images?.fallback?.srcSet\n\nexport function getWrapperProps(\n width: number,\n height: number,\n layout: Layout\n): Pick, \"className\" | \"style\"> & {\n \"data-gatsby-image-wrapper\": string\n} {\n const wrapperStyle: CSSProperties = {}\n\n let className = `gatsby-image-wrapper`\n\n // If the plugin isn't installed we need to apply the styles inline\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.position = `relative`\n wrapperStyle.overflow = `hidden`\n }\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n } else if (layout === `constrained`) {\n if (!gatsbyImageIsInstalled()) {\n wrapperStyle.display = `inline-block`\n wrapperStyle.verticalAlign = `top`\n }\n className = `gatsby-image-wrapper gatsby-image-wrapper-constrained`\n }\n\n return {\n className,\n \"data-gatsby-image-wrapper\": ``,\n style: wrapperStyle,\n }\n}\n\nexport async function applyPolyfill(\n ref: RefObject\n): Promise {\n if (!(`objectFitPolyfill` in window)) {\n await import(\n // @ts-ignore typescript can't find the module for some reason ¯\\_(ツ)_/¯\n /* webpackChunkName: \"gatsby-plugin-image-objectfit-polyfill\" */ `objectFitPolyfill`\n )\n }\n ;(window as any).objectFitPolyfill(ref.current)\n}\n\nexport interface IUrlBuilderArgs {\n width: number\n height: number\n baseUrl: string\n format: ImageFormat\n options: OptionsType\n}\nexport interface IGetImageDataArgs> {\n baseUrl: string\n /**\n * For constrained and fixed images, the size of the image element\n */\n width?: number\n height?: number\n /**\n * If available, pass the source image width and height\n */\n sourceWidth?: number\n sourceHeight?: number\n /**\n * If only one dimension is passed, then this will be used to calculate the other.\n */\n aspectRatio?: number\n layout?: Layout\n /**\n * Returns a URL based on the passed arguments. Should be a pure function\n */\n urlBuilder: (args: IUrlBuilderArgs) => string\n\n /**\n * Should be a data URI\n */\n placeholderURL?: string\n backgroundColor?: string\n /**\n * Used in error messages etc\n */\n pluginName?: string\n\n /**\n * If you do not support auto-format, pass an array of image types here\n */\n formats?: Array\n\n breakpoints?: Array\n\n /**\n * Passed to the urlBuilder function\n */\n options?: OptionsType\n}\n\n/**\n * Use this hook to generate gatsby-plugin-image data in the browser.\n */\nexport function getImageData({\n baseUrl,\n urlBuilder,\n sourceWidth,\n sourceHeight,\n pluginName = `getImageData`,\n formats = [`auto`],\n breakpoints,\n options,\n ...props\n}: IGetImageDataArgs): IGatsbyImageData {\n if (\n !breakpoints?.length &&\n (props.layout === `fullWidth` || (props.layout as string) === `FULL_WIDTH`)\n ) {\n breakpoints = EVERY_BREAKPOINT\n }\n const generateImageSource = (\n baseUrl: string,\n width: number,\n height?: number,\n format?: ImageFormat\n ): IImage => {\n return {\n width,\n height,\n format,\n src: urlBuilder({ baseUrl, width, height, options, format }),\n }\n }\n\n const sourceMetadata: IGatsbyImageHelperArgs[\"sourceMetadata\"] = {\n width: sourceWidth,\n height: sourceHeight,\n format: `auto`,\n }\n\n const args: IGatsbyImageHelperArgs = {\n ...props,\n pluginName,\n generateImageSource,\n filename: baseUrl,\n formats,\n breakpoints,\n sourceMetadata,\n }\n return generateImageData(args)\n}\n\nexport function getMainProps(\n isLoading: boolean,\n isLoaded: boolean,\n images: IGatsbyImageData[\"images\"],\n loading?: \"eager\" | \"lazy\",\n toggleLoaded?: (loaded: boolean) => void,\n cacheKey?: string,\n ref?: RefObject,\n style: CSSProperties = {}\n): Partial {\n const onLoad: ReactEventHandler = function (e) {\n if (isLoaded) {\n return\n }\n\n storeImageloaded(cacheKey)\n\n const target = e.currentTarget\n const img = new Image()\n img.src = target.currentSrc\n\n if (img.decode) {\n // Decode the image through javascript to support our transition\n img\n .decode()\n .catch(() => {\n // ignore error, we just go forward\n })\n .then(() => {\n toggleLoaded(true)\n })\n } else {\n toggleLoaded(true)\n }\n }\n\n // Polyfill \"object-fit\" if unsupported (mostly IE)\n if (ref?.current && !(`objectFit` in document.documentElement.style)) {\n ref.current.dataset.objectFit = style.objectFit ?? `cover`\n ref.current.dataset.objectPosition = `${style.objectPosition ?? `50% 50%`}`\n applyPolyfill(ref)\n }\n\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n transform: `translateZ(0)`,\n transition: `opacity 250ms linear`,\n width: `100%`,\n willChange: `opacity`,\n ...style,\n }\n }\n\n const result = {\n ...images,\n loading,\n shouldLoad: isLoading,\n \"data-main-image\": ``,\n style: {\n ...style,\n opacity: isLoaded ? 1 : 0,\n },\n onLoad,\n ref,\n }\n\n return result\n}\n\nexport type PlaceholderImageAttrs = ImgHTMLAttributes &\n Pick & {\n \"data-placeholder-image\"?: string\n }\n\nexport function getPlaceholderProps(\n placeholder: PlaceholderImageAttrs | undefined,\n isLoaded: boolean,\n layout: Layout,\n width?: number,\n height?: number,\n backgroundColor?: string,\n objectFit?: CSSProperties[\"objectFit\"],\n objectPosition?: CSSProperties[\"objectPosition\"]\n): PlaceholderImageAttrs {\n const wrapperStyle: CSSProperties = {}\n\n if (backgroundColor) {\n wrapperStyle.backgroundColor = backgroundColor\n\n if (layout === `fixed`) {\n wrapperStyle.width = width\n wrapperStyle.height = height\n wrapperStyle.backgroundColor = backgroundColor\n wrapperStyle.position = `relative`\n } else if (layout === `constrained`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n } else if (layout === `fullWidth`) {\n wrapperStyle.position = `absolute`\n wrapperStyle.top = 0\n wrapperStyle.left = 0\n wrapperStyle.bottom = 0\n wrapperStyle.right = 0\n }\n }\n\n if (objectFit) {\n wrapperStyle.objectFit = objectFit\n }\n\n if (objectPosition) {\n wrapperStyle.objectPosition = objectPosition\n }\n const result: PlaceholderImageAttrs = {\n ...placeholder,\n \"aria-hidden\": true,\n \"data-placeholder-image\": ``,\n style: {\n opacity: isLoaded ? 0 : 1,\n transition: `opacity 500ms linear`,\n ...wrapperStyle,\n },\n }\n\n // fallback when it's not configured in gatsby-config.\n if (!gatsbyImageIsInstalled()) {\n result.style = {\n height: `100%`,\n left: 0,\n position: `absolute`,\n top: 0,\n width: `100%`,\n }\n }\n\n return result\n}\n\nexport function useImageLoaded(\n cacheKey: string,\n loading: \"lazy\" | \"eager\",\n ref: any\n): {\n isLoaded: boolean\n isLoading: boolean\n toggleLoaded: Dispatch>\n} {\n const [isLoaded, toggleLoaded] = useState(false)\n const [isLoading, toggleIsLoading] = useState(loading === `eager`)\n\n const rAF =\n typeof window !== `undefined` && `requestAnimationFrame` in window\n ? requestAnimationFrame\n : function (cb: TimerHandler): number {\n return setTimeout(cb, 16)\n }\n const cRAF =\n typeof window !== `undefined` && `cancelAnimationFrame` in window\n ? cancelAnimationFrame\n : clearTimeout\n\n useEffect(() => {\n let interval: number\n // @see https://stackoverflow.com/questions/44074747/componentdidmount-called-before-ref-callback/50019873#50019873\n function toggleIfRefExists(): void {\n if (ref.current) {\n if (loading === `eager` && ref.current.complete) {\n storeImageloaded(cacheKey)\n toggleLoaded(true)\n } else {\n toggleIsLoading(true)\n }\n } else {\n interval = rAF(toggleIfRefExists)\n }\n }\n toggleIfRefExists()\n\n return (): void => {\n cRAF(interval)\n }\n }, [])\n\n return {\n isLoading,\n isLoaded,\n toggleLoaded,\n }\n}\n\nexport interface IArtDirectedImage {\n media: string\n image: IGatsbyImageData\n}\n\n/**\n * Generate a Gatsby image data object with multiple, art-directed images that display at different\n * resolutions.\n *\n * @param defaultImage The image displayed when no media query matches.\n * It is also used for all other settings applied to the image, such as width, height and layout.\n * You should pass a className to the component with media queries to adjust the size of the container,\n * as this cannot be adjusted automatically.\n * @param artDirected Array of objects which each contains a `media` string which is a media query\n * such as `(min-width: 320px)`, and the image object to use when that query matches.\n */\nexport function withArtDirection(\n defaultImage: IGatsbyImageData,\n artDirected: Array\n): IGatsbyImageData {\n const { images, placeholder, ...props } = defaultImage\n const output: IGatsbyImageData = {\n ...props,\n images: {\n ...images,\n sources: [],\n },\n placeholder: placeholder && {\n ...placeholder,\n sources: [],\n },\n }\n\n artDirected.forEach(({ media, image }) => {\n if (!media) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(\n \"[gatsby-plugin-image] All art-directed images passed to must have a value set for `media`. Skipping.\"\n )\n }\n return\n }\n\n if (\n image.layout !== defaultImage.layout &&\n process.env.NODE_ENV === `development`\n ) {\n console.warn(\n `[gatsby-plugin-image] Mismatched image layout: expected \"${defaultImage.layout}\" but received \"${image.layout}\". All art-directed images use the same layout as the default image`\n )\n }\n\n output.images.sources.push(\n ...image.images.sources.map(source => {\n return { ...source, media }\n }),\n {\n media,\n srcSet: image.images.fallback.srcSet,\n }\n )\n\n if (!output.placeholder) {\n return\n }\n\n output.placeholder.sources.push({\n media,\n srcSet: image.placeholder.fallback,\n })\n })\n output.images.sources.push(...images.sources)\n if (placeholder?.sources) {\n output.placeholder?.sources.push(...placeholder.sources)\n }\n return output\n}\n","// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// \n\nimport React, { Fragment, FunctionComponent } from \"react\"\nimport terserMacro from \"../../macros/terser.macro\"\nimport { Layout } from \"../image-utils\"\n\nexport interface ILayoutWrapperProps {\n layout: Layout\n width: number\n height: number\n}\n\nconst NativeScriptLoading: FunctionComponent = () => (\n \n)\n\nexport function getSizer(\n layout: Layout,\n width: number,\n height: number\n): string {\n let sizer: string | null = null\n if (layout === `fullWidth`) {\n sizer = `
`\n }\n if (layout === `constrained`) {\n sizer = `
\"\"
`\n }\n return sizer\n}\n\nconst Sizer: FunctionComponent = function Sizer({\n layout,\n width,\n height,\n}) {\n if (layout === `fullWidth`) {\n return (\n
\n )\n }\n if (layout === `constrained`) {\n return (\n
\n \n
\n )\n }\n\n return null\n}\n\nexport const LayoutWrapper: FunctionComponent =\n function LayoutWrapper({ children, ...props }) {\n return (\n \n \n {children}\n\n {\n // eslint-disable-next-line no-undef\n SERVER && \n }\n \n )\n }\n","/* eslint-disable filenames/match-regex */\nimport React, {\n FunctionComponent,\n ImgHTMLAttributes,\n forwardRef,\n LegacyRef,\n} from \"react\"\nimport * as PropTypes from \"prop-types\"\n\nexport interface IResponsiveImageProps {\n sizes?: string\n srcSet: string\n}\n\nexport type SourceProps = IResponsiveImageProps &\n (\n | {\n media: string\n type?: string\n }\n | {\n media?: string\n type: string\n }\n )\n\ntype FallbackProps = { src: string } & Partial\n\ntype ImageProps = ImgHTMLAttributes & {\n src: string\n alt: string\n shouldLoad: boolean\n innerRef: LegacyRef\n}\n\nexport type PictureProps = ImgHTMLAttributes & {\n fallback?: FallbackProps\n sources?: Array\n alt: string\n shouldLoad?: boolean\n}\n\nconst Image: FunctionComponent = function Image({\n src,\n srcSet,\n loading,\n alt = ``,\n shouldLoad,\n innerRef,\n ...props\n}) {\n return (\n \n )\n}\n\nexport const Picture = forwardRef(\n function Picture(\n { fallback, sources = [], shouldLoad = true, ...props },\n ref\n ) {\n const sizes = props.sizes || fallback?.sizes\n const fallbackImage = (\n \n )\n\n if (!sources.length) {\n return fallbackImage\n }\n\n return (\n \n {sources.map(({ media, srcSet, type }) => (\n \n ))}\n {fallbackImage}\n \n )\n }\n)\n\nImage.propTypes = {\n src: PropTypes.string.isRequired,\n alt: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string,\n shouldLoad: PropTypes.bool,\n}\n\nPicture.displayName = `Picture`\nPicture.propTypes = {\n alt: PropTypes.string.isRequired,\n shouldLoad: PropTypes.bool,\n fallback: PropTypes.exact({\n src: PropTypes.string.isRequired,\n srcSet: PropTypes.string,\n sizes: PropTypes.string,\n }),\n sources: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.exact({\n media: PropTypes.string.isRequired,\n type: PropTypes.string,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n PropTypes.exact({\n media: PropTypes.string,\n type: PropTypes.string.isRequired,\n sizes: PropTypes.string,\n srcSet: PropTypes.string.isRequired,\n }),\n ])\n ),\n}\n","import React, { FunctionComponent, ImgHTMLAttributes } from \"react\"\nimport * as PropTypes from \"prop-types\"\nimport { Picture, SourceProps } from \"./picture\"\n\nexport type PlaceholderProps = ImgHTMLAttributes & {\n fallback?: string\n sources?: Array\n}\n\nexport const Placeholder: FunctionComponent =\n function Placeholder({ fallback, ...props }) {\n if (fallback) {\n return (\n \n )\n } else {\n return
\n }\n }\n\nPlaceholder.displayName = `Placeholder`\nPlaceholder.propTypes = {\n fallback: PropTypes.string,\n sources: Picture.propTypes?.sources,\n alt: function (props, propName, componentName): Error | null {\n if (!props[propName]) {\n return null\n }\n return new Error(\n `Invalid prop \\`${propName}\\` supplied to \\`${componentName}\\`. Validation failed.`\n )\n },\n}\n","import React, { forwardRef } from \"react\"\nimport { Picture, PictureProps } from \"./picture\"\n\nexport type MainImageProps = PictureProps\n\nexport const MainImage = forwardRef(\n function MainImage(props, ref) {\n return (\n <>\n \n \n \n )\n }\n)\n\nMainImage.displayName = `MainImage`\nMainImage.propTypes = Picture.propTypes\n","import React, {\n ElementType,\n FunctionComponent,\n CSSProperties,\n WeakValidationMap,\n} from \"react\"\nimport { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\nimport { getWrapperProps, getMainProps, getPlaceholderProps } from \"./hooks\"\nimport { Placeholder } from \"./placeholder\"\nimport { MainImage, MainImageProps } from \"./main-image\"\nimport { LayoutWrapper } from \"./layout-wrapper\"\nimport PropTypes from \"prop-types\"\n\nconst removeNewLines = (str: string): string => str.replace(/\\n/g, ``)\n\nexport const GatsbyImageHydrator: FunctionComponent<{\n as?: ElementType\n style?: CSSProperties\n className?: string\n}> = function GatsbyImageHydrator({ as: Type = `div`, children, ...props }) {\n return {children}\n}\n\nexport const GatsbyImage: FunctionComponent =\n function GatsbyImage({\n as,\n className,\n class: preactClass,\n style,\n image,\n loading = `lazy`,\n imgClassName,\n imgStyle,\n backgroundColor,\n objectFit,\n objectPosition,\n ...props\n }) {\n if (!image) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n return null\n }\n if (preactClass) {\n className = preactClass\n }\n imgStyle = {\n objectFit,\n objectPosition,\n backgroundColor,\n ...imgStyle,\n }\n\n const {\n width,\n height,\n layout,\n images,\n placeholder,\n backgroundColor: placeholderBackgroundColor,\n } = image\n\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n\n const cleanedImages: IGatsbyImageData[\"images\"] = {\n fallback: undefined,\n sources: [],\n }\n if (images.fallback) {\n cleanedImages.fallback = {\n ...images.fallback,\n srcSet: images.fallback.srcSet\n ? removeNewLines(images.fallback.srcSet)\n : undefined,\n }\n }\n\n if (images.sources) {\n cleanedImages.sources = images.sources.map(source => {\n return {\n ...source,\n srcSet: removeNewLines(source.srcSet),\n }\n })\n }\n\n return (\n \n \n \n\n )}\n // When eager is set we want to start the isLoading state on true (we want to load the img without react)\n {...getMainProps(\n loading === `eager`,\n false,\n cleanedImages,\n loading,\n undefined,\n undefined,\n undefined,\n imgStyle\n )}\n />\n \n \n )\n }\n\nexport const altValidator: PropTypes.Validator = (\n props: GatsbyImageProps,\n propName,\n componentName,\n ...rest\n): Error | undefined => {\n if (!props.alt && props.alt !== ``) {\n return new Error(\n `The \"alt\" prop is required in ${componentName}. If the image is purely presentational then pass an empty string: e.g. alt=\"\". Learn more: https://a11y-style-guide.com/style-guide/section-media.html`\n )\n }\n return PropTypes.string(props, propName, componentName, ...rest)\n}\nexport const propTypes = {\n image: PropTypes.object.isRequired,\n alt: altValidator,\n} as WeakValidationMap\n","/* eslint-disable no-unused-expressions */\nimport React, {\n Component,\n ElementType,\n createRef,\n MutableRefObject,\n FunctionComponent,\n ImgHTMLAttributes,\n RefObject,\n CSSProperties,\n} from \"react\"\nimport {\n getWrapperProps,\n hasNativeLazyLoadSupport,\n storeImageloaded,\n hasImageLoaded,\n gatsbyImageIsInstalled,\n} from \"./hooks\"\nimport { PlaceholderProps } from \"./placeholder\"\nimport { MainImageProps } from \"./main-image\"\nimport { Layout } from \"../image-utils\"\nimport { getSizer } from \"./layout-wrapper\"\nimport { propTypes } from \"./gatsby-image.server\"\nimport { Unobserver } from \"./intersection-observer\"\nimport { render } from \"react-dom\"\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport interface GatsbyImageProps\n extends Omit<\n ImgHTMLAttributes,\n \"placeholder\" | \"onLoad\" | \"src\" | \"srcSet\" | \"width\" | \"height\"\n > {\n alt: string\n as?: ElementType\n className?: string\n class?: string\n imgClassName?: string\n image: IGatsbyImageData\n imgStyle?: CSSProperties\n backgroundColor?: string\n objectFit?: CSSProperties[\"objectFit\"]\n objectPosition?: CSSProperties[\"objectPosition\"]\n onLoad?: () => void\n onError?: () => void\n onStartLoad?: (props: { wasCached?: boolean }) => void\n}\n\nexport interface IGatsbyImageData {\n layout: Layout\n width: number\n height: number\n backgroundColor?: string\n images: Pick\n placeholder?: Pick\n}\n\nclass GatsbyImageHydrator extends Component<\n GatsbyImageProps,\n { isLoading: boolean; isLoaded: boolean }\n> {\n root: RefObject = createRef<\n HTMLImageElement | undefined\n >()\n hydrated: MutableRefObject = { current: false }\n forceRender: MutableRefObject = {\n // In dev we use render not hydrate, to avoid hydration warnings\n current: process.env.NODE_ENV === `development`,\n }\n lazyHydrator: () => void | null = null\n ref = createRef()\n unobserveRef: Unobserver\n\n constructor(props) {\n super(props)\n\n this.state = {\n isLoading: hasNativeLazyLoadSupport(),\n isLoaded: false,\n }\n }\n\n _lazyHydrate(props, state): Promise {\n const hasSSRHtml = this.root.current.querySelector(\n `[data-gatsby-image-ssr]`\n )\n // On first server hydration do nothing\n if (hasNativeLazyLoadSupport() && hasSSRHtml && !this.hydrated.current) {\n this.hydrated.current = true\n return Promise.resolve()\n }\n\n return import(`./lazy-hydrate`).then(({ lazyHydrate }) => {\n this.lazyHydrator = lazyHydrate(\n {\n image: props.image.images,\n isLoading: state.isLoading,\n isLoaded: state.isLoaded,\n toggleIsLoaded: () => {\n props.onLoad?.()\n\n this.setState({\n isLoaded: true,\n })\n },\n ref: this.ref,\n ...props,\n },\n this.root,\n this.hydrated,\n this.forceRender\n )\n })\n }\n\n /**\n * Choose if setupIntersectionObserver should use the image cache or not.\n */\n _setupIntersectionObserver(useCache = true): void {\n import(`./intersection-observer`).then(({ createIntersectionObserver }) => {\n const intersectionObserver = createIntersectionObserver(() => {\n if (this.root.current) {\n const cacheKey = JSON.stringify(this.props.image.images)\n this.props.onStartLoad?.({\n wasCached: useCache && hasImageLoaded(cacheKey),\n })\n this.setState({\n isLoading: true,\n isLoaded: useCache && hasImageLoaded(cacheKey),\n })\n }\n })\n\n if (this.root.current) {\n this.unobserveRef = intersectionObserver(this.root)\n }\n })\n }\n\n shouldComponentUpdate(nextProps, nextState): boolean {\n let hasChanged = false\n if (!this.state.isLoading && nextState.isLoading && !nextState.isLoaded) {\n // Props have changed between SSR and hydration, so we need to force render instead of hydrate\n this.forceRender.current = true\n }\n // this check mostly means people do not have the correct ref checks in place, we want to reset some state to suppport loading effects\n if (this.props.image.images !== nextProps.image.images) {\n // reset state, we'll rely on intersection observer to reload\n if (this.unobserveRef) {\n // unregister intersectionObserver\n this.unobserveRef()\n\n // // on unmount, make sure we cleanup\n if (this.hydrated.current && this.lazyHydrator) {\n render(null, this.root.current)\n }\n }\n\n this.setState(\n {\n isLoading: false,\n isLoaded: false,\n },\n () => {\n this._setupIntersectionObserver(false)\n }\n )\n\n hasChanged = true\n }\n\n if (this.root.current && !hasChanged) {\n this._lazyHydrate(nextProps, nextState)\n }\n\n return false\n }\n\n componentDidMount(): void {\n if (this.root.current) {\n const ssrElement = this.root.current.querySelector(\n `[data-gatsby-image-ssr]`\n ) as HTMLImageElement\n const cacheKey = JSON.stringify(this.props.image.images)\n\n // when SSR and native lazyload is supported we'll do nothing ;)\n if (\n hasNativeLazyLoadSupport() &&\n ssrElement &&\n gatsbyImageIsInstalled()\n ) {\n this.props.onStartLoad?.({ wasCached: false })\n\n // When the image is already loaded before we have hydrated, we trigger onLoad and cache the item\n if (ssrElement.complete) {\n this.props.onLoad?.()\n storeImageloaded(cacheKey)\n } else {\n // We need the current class context (this) inside our named onLoad function\n // The named function is necessary to easily remove the listener afterward.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this\n // add an onLoad to the image\n ssrElement.addEventListener(`load`, function onLoad() {\n ssrElement.removeEventListener(`load`, onLoad)\n\n _this.props.onLoad?.()\n storeImageloaded(cacheKey)\n })\n }\n\n return\n }\n\n // Fallback to custom lazy loading (intersection observer)\n this._setupIntersectionObserver(true)\n }\n }\n\n componentWillUnmount(): void {\n // Cleanup when onmount happens\n if (this.unobserveRef) {\n // unregister intersectionObserver\n this.unobserveRef()\n\n // on unmount, make sure we cleanup\n if (this.hydrated.current && this.lazyHydrator) {\n this.lazyHydrator()\n }\n }\n\n return\n }\n\n render(): JSX.Element {\n const Type = this.props.as || `div`\n const { width, height, layout } = this.props.image\n const {\n style: wStyle,\n className: wClass,\n ...wrapperProps\n } = getWrapperProps(width, height, layout)\n\n let className = this.props.className\n // preact class\n if (this.props.class) {\n className = this.props.class\n }\n\n const sizer = getSizer(layout, width, height)\n\n return (\n \n )\n }\n}\n\nexport const GatsbyImage: FunctionComponent =\n function GatsbyImage(props) {\n if (!props.image) {\n if (process.env.NODE_ENV === `development`) {\n console.warn(`[gatsby-plugin-image] Missing image prop`)\n }\n return null\n }\n\n if (!gatsbyImageIsInstalled() && process.env.NODE_ENV === `development`) {\n console.warn(\n `[gatsby-plugin-image] You're missing out on some cool performance features. Please add \"gatsby-plugin-image\" to your gatsby-config.js`\n )\n }\n const { className, class: classSafe, backgroundColor, image } = props\n const { width, height, layout } = image\n const propsKey = JSON.stringify([\n width,\n height,\n layout,\n className,\n classSafe,\n backgroundColor,\n ])\n return \n }\n\nGatsbyImage.propTypes = propTypes\n\nGatsbyImage.displayName = `GatsbyImage`\n","import React, { FunctionComponent, ReactElement } from \"react\"\nimport {\n altValidator,\n GatsbyImage as GatsbyImageServer,\n} from \"./gatsby-image.server\"\nimport { GatsbyImageProps, IGatsbyImageData } from \"./gatsby-image.browser\"\nimport PropTypes from \"prop-types\"\nimport { ISharpGatsbyImageArgs } from \"../image-utils\"\n\nexport interface IStaticImageProps\n extends Omit,\n Omit {\n src: string\n}\n\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nexport function _getStaticImage(\n GatsbyImage: FunctionComponent\n): React.FC {\n return function StaticImage({\n src,\n __imageData: imageData,\n __error,\n // We extract these because they're not meant to be passed-down to GatsbyImage\n /* eslint-disable @typescript-eslint/no-unused-vars */\n width,\n height,\n aspectRatio,\n tracedSVGOptions,\n placeholder,\n formats,\n quality,\n transformOptions,\n jpgOptions,\n pngOptions,\n webpOptions,\n avifOptions,\n blurredOptions,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...props\n }): ReactElement {\n if (__error) {\n console.warn(__error)\n }\n\n if (imageData) {\n return \n }\n console.warn(`Image not loaded`, src)\n if (!__error && process.env.NODE_ENV === `development`) {\n console.warn(\n `Please ensure that \"gatsby-plugin-image\" is included in the plugins array in gatsby-config.js, and that your version of gatsby is at least 2.24.78`\n )\n }\n return null\n }\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageServer)\n\nconst checkDimensionProps: PropTypes.Validator = (\n props: IStaticImageProps & IPrivateProps,\n propName: keyof IStaticImageProps & IPrivateProps,\n ...rest\n) => {\n if (\n props.layout === `fullWidth` &&\n (propName === `width` || propName === `height`) &&\n props[propName]\n ) {\n return new Error(\n `\"${propName}\" ${props[propName]} may not be passed when layout is fullWidth.`\n )\n }\n return PropTypes.number(props, propName, ...rest)\n}\n\nconst validLayouts = new Set([`fixed`, `fullWidth`, `constrained`])\n\nexport const propTypes = {\n src: PropTypes.string.isRequired,\n alt: altValidator,\n width: checkDimensionProps,\n height: checkDimensionProps,\n sizes: PropTypes.string,\n layout: (props: IStaticImageProps & IPrivateProps): Error | undefined => {\n if (props.layout === undefined) {\n return undefined\n }\n if (validLayouts.has(props.layout)) {\n return undefined\n }\n\n return new Error(\n `Invalid value ${props.layout}\" provided for prop \"layout\". Defaulting to \"constrained\". Valid values are \"fixed\", \"fullWidth\" or \"constrained\".`\n )\n },\n}\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","import {\n GatsbyImage as GatsbyImageBrowser,\n IGatsbyImageData,\n} from \"./gatsby-image.browser\"\nimport React from \"react\"\nimport {\n _getStaticImage,\n propTypes,\n IStaticImageProps,\n} from \"./static-image.server\"\n// These values are added by Babel. Do not add them manually\ninterface IPrivateProps {\n __imageData?: IGatsbyImageData\n __error?: string\n}\n\nconst StaticImage: React.FC =\n _getStaticImage(GatsbyImageBrowser)\n\nStaticImage.displayName = `StaticImage`\nStaticImage.propTypes = propTypes\n\nexport { StaticImage }\n","import * as React from \"react\"\nexport function LaterHydrator({\n children,\n}: React.PropsWithChildren>): React.ReactNode {\n React.useEffect(() => {\n // eslint-disable-next-line no-unused-expressions\n import(`./lazy-hydrate`)\n }, [])\n\n return children\n}\n","import React from \"react\"\nimport { LaterHydrator } from \".\"\n\nexport function wrapRootElement({ element }) {\n return {element}\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _gatsby = require(\"gatsby\");\n\nvar _getManifestPathname = _interopRequireDefault(require(\"./get-manifest-pathname\"));\n\n/* global __MANIFEST_PLUGIN_HAS_LOCALISATION__ */\n// when we don't have localisation in our manifest, we tree shake everything away\nif (__MANIFEST_PLUGIN_HAS_LOCALISATION__) {\n exports.onRouteUpdate = function (_ref, pluginOptions) {\n var location = _ref.location;\n var localize = pluginOptions.localize;\n var manifestFilename = (0, _getManifestPathname.default)(location.pathname, localize);\n var manifestEl = document.head.querySelector(\"link[rel=\\\"manifest\\\"]\");\n\n if (manifestEl) {\n manifestEl.setAttribute(\"href\", (0, _gatsby.withPrefix)(manifestFilename));\n }\n };\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\n/**\n * Get a manifest filename depending on localized pathname\n *\n * @param {string} pathname\n * @param {Array<{start_url: string, lang: string}>} localizedManifests\n * @return string\n */\nvar _default = function _default(pathname, localizedManifests) {\n var defaultFilename = \"manifest.webmanifest\";\n\n if (!Array.isArray(localizedManifests)) {\n return defaultFilename;\n }\n\n var localizedManifest = localizedManifests.find(function (app) {\n return pathname.startsWith(app.start_url);\n });\n\n if (!localizedManifest) {\n return defaultFilename;\n }\n\n return \"manifest_\" + localizedManifest.lang + \".webmanifest\";\n};\n\nexports.default = _default;","\"use strict\";\n\nexports.registerServiceWorker = function () {\n return process.env.GATSBY_IS_PREVIEW !== \"true\";\n}; // only cache relevant resources for this page\n\n\nvar whiteListLinkRels = /^(stylesheet|preload)$/;\nvar prefetchedPathnames = [];\n\nexports.onServiceWorkerActive = function (_ref) {\n var getResourceURLsForPathname = _ref.getResourceURLsForPathname,\n serviceWorker = _ref.serviceWorker;\n\n if (process.env.GATSBY_IS_PREVIEW === \"true\") {\n return;\n } // if the SW has just updated then clear the path dependencies and don't cache\n // stuff, since we're on the old revision until we navigate to another page\n\n\n if (window.___swUpdated) {\n serviceWorker.active.postMessage({\n gatsbyApi: \"clearPathResources\"\n });\n return;\n } // grab nodes from head of document\n\n\n var nodes = document.querySelectorAll(\"\\n head > script[src],\\n head > link[href],\\n head > style[data-href]\\n \"); // get all resource URLs\n\n var headerResources = [].slice.call(nodes) // don't include preconnect/prefetch/prerender resources\n .filter(function (node) {\n return node.tagName !== \"LINK\" || whiteListLinkRels.test(node.getAttribute(\"rel\"));\n }).map(function (node) {\n return node.src || node.href || node.getAttribute(\"data-href\");\n }); // Loop over prefetched pages and add their resources to an array,\n // plus specify which resources are required for those paths.\n\n var prefetchedResources = [];\n prefetchedPathnames.forEach(function (path) {\n var resources = getResourceURLsForPathname(path);\n prefetchedResources.push.apply(prefetchedResources, resources);\n serviceWorker.active.postMessage({\n gatsbyApi: \"setPathResources\",\n path: path,\n resources: resources\n });\n }); // Loop over all resources and fetch the page component + JSON data\n // to add it to the SW cache.\n\n var resources = [].concat(headerResources, prefetchedResources);\n resources.forEach(function (resource) {\n // Create a prefetch link for each resource, so Workbox runtime-caches them\n var link = document.createElement(\"link\");\n link.rel = \"prefetch\";\n link.href = resource;\n link.onload = link.remove;\n link.onerror = link.remove;\n document.head.appendChild(link);\n });\n};\n\nfunction setPathResources(path, getResourceURLsForPathname) {\n // do nothing if the SW has just updated, since we still have old pages in\n // memory which we don't want to be whitelisted\n if (window.___swUpdated) return;\n\n if (\"serviceWorker\" in navigator) {\n var _navigator = navigator,\n serviceWorker = _navigator.serviceWorker;\n\n if (serviceWorker.controller === null) {\n // if SW is not installed, we need to record any prefetches\n // that happen so we can then add them to SW cache once installed\n prefetchedPathnames.push(path);\n } else {\n var resources = getResourceURLsForPathname(path);\n serviceWorker.controller.postMessage({\n gatsbyApi: \"setPathResources\",\n path: path,\n resources: resources\n });\n }\n }\n}\n\nexports.onRouteUpdate = function (_ref2) {\n var location = _ref2.location,\n getResourceURLsForPathname = _ref2.getResourceURLsForPathname;\n var pathname = location.pathname.replace(__BASE_PATH__, \"\");\n setPathResources(pathname, getResourceURLsForPathname);\n\n if (\"serviceWorker\" in navigator && navigator.serviceWorker.controller !== null) {\n navigator.serviceWorker.controller.postMessage({\n gatsbyApi: \"enableOfflineShell\"\n });\n }\n};\n\nexports.onPostPrefetchPathname = function (_ref3) {\n var pathname = _ref3.pathname,\n getResourceURLsForPathname = _ref3.getResourceURLsForPathname;\n setPathResources(pathname, getResourceURLsForPathname);\n};","import React, { createContext, useState, useEffect } from \"react\"\nimport firebase from \"gatsby-plugin-firebase\"\nexport const AuthContext = createContext({})\n\nconst AuthProvider = ({ children }) => {\n const [user, setUser] = useState(null)\n\n useEffect(() => {\n firebase.auth().onAuthStateChanged(user => setUser(user))\n }, [])\n\n return (\n \n {children}\n \n )\n}\n\nexport default AuthProvider\n","import invariant from \"invariant\"; ////////////////////////////////////////////////////////////////////////////////\n// startsWith(string, search) - Check if `string` starts with `search`\n\nvar startsWith = function startsWith(string, search) {\n return string.substr(0, search.length) === search;\n}; ////////////////////////////////////////////////////////////////////////////////\n// pick(routes, uri)\n//\n// Ranks and picks the best route to match. Each segment gets the highest\n// amount of points, then the type of segment gets an additional amount of\n// points where\n//\n// static > dynamic > splat > root\n//\n// This way we don't have to worry about the order of our routes, let the\n// computers do it.\n//\n// A route looks like this\n//\n// { path, default, value }\n//\n// And a returned match looks like:\n//\n// { route, params, uri }\n//\n// I know, I should use TypeScript not comments for these types.\n\n\nvar pick = function pick(routes, uri) {\n var match = void 0;\n var default_ = void 0;\n\n var _uri$split = uri.split(\"?\"),\n uriPathname = _uri$split[0];\n\n var uriSegments = segmentize(uriPathname);\n var isRootUri = uriSegments[0] === \"\";\n var ranked = rankRoutes(routes);\n\n for (var i = 0, l = ranked.length; i < l; i++) {\n var missed = false;\n var route = ranked[i].route;\n\n if (route.default) {\n default_ = {\n route: route,\n params: {},\n uri: uri\n };\n continue;\n }\n\n var routeSegments = segmentize(route.path);\n var params = {};\n var max = Math.max(uriSegments.length, routeSegments.length);\n var index = 0;\n\n for (; index < max; index++) {\n var routeSegment = routeSegments[index];\n var uriSegment = uriSegments[index];\n\n if (isSplat(routeSegment)) {\n // Hit a splat, just grab the rest, and return a match\n // uri: /files/documents/work\n // route: /files/*\n var param = routeSegment.slice(1) || \"*\";\n params[param] = uriSegments.slice(index).map(decodeURIComponent).join(\"/\");\n break;\n }\n\n if (uriSegment === undefined) {\n // URI is shorter than the route, no match\n // uri: /users\n // route: /users/:userId\n missed = true;\n break;\n }\n\n var dynamicMatch = paramRe.exec(routeSegment);\n\n if (dynamicMatch && !isRootUri) {\n var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;\n !matchIsNotReserved ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" dynamic segment \\\"\" + dynamicMatch[1] + \"\\\" is a reserved name. Please use a different name in path \\\"\" + route.path + \"\\\".\") : invariant(false) : void 0;\n var value = decodeURIComponent(uriSegment);\n params[dynamicMatch[1]] = value;\n } else if (routeSegment !== uriSegment) {\n // Current segments don't match, not dynamic, not splat, so no match\n // uri: /users/123/settings\n // route: /users/:id/profile\n missed = true;\n break;\n }\n }\n\n if (!missed) {\n match = {\n route: route,\n params: params,\n uri: \"/\" + uriSegments.slice(0, index).join(\"/\")\n };\n break;\n }\n }\n\n return match || default_ || null;\n}; ////////////////////////////////////////////////////////////////////////////////\n// match(path, uri) - Matches just one path to a uri, also lol\n\n\nvar match = function match(path, uri) {\n return pick([{\n path: path\n }], uri);\n}; ////////////////////////////////////////////////////////////////////////////////\n// resolve(to, basepath)\n//\n// Resolves URIs as though every path is a directory, no files. Relative URIs\n// in the browser can feel awkward because not only can you be \"in a directory\"\n// you can be \"at a file\", too. For example\n//\n// browserSpecResolve('foo', '/bar/') => /bar/foo\n// browserSpecResolve('foo', '/bar') => /foo\n//\n// But on the command line of a file system, it's not as complicated, you can't\n// `cd` from a file, only directories. This way, links have to know less about\n// their current path. To go deeper you can do this:\n//\n// \n// // instead of\n// \n//\n// Just like `cd`, if you want to go deeper from the command line, you do this:\n//\n// cd deeper\n// # not\n// cd $(pwd)/deeper\n//\n// By treating every path as a directory, linking to relative paths should\n// require less contextual information and (fingers crossed) be more intuitive.\n\n\nvar resolve = function resolve(to, base) {\n // /foo/bar, /baz/qux => /foo/bar\n if (startsWith(to, \"/\")) {\n return to;\n }\n\n var _to$split = to.split(\"?\"),\n toPathname = _to$split[0],\n toQuery = _to$split[1];\n\n var _base$split = base.split(\"?\"),\n basePathname = _base$split[0];\n\n var toSegments = segmentize(toPathname);\n var baseSegments = segmentize(basePathname); // ?a=b, /users?b=c => /users?a=b\n\n if (toSegments[0] === \"\") {\n return addQuery(basePathname, toQuery);\n } // profile, /users/789 => /users/789/profile\n\n\n if (!startsWith(toSegments[0], \".\")) {\n var pathname = baseSegments.concat(toSegments).join(\"/\");\n return addQuery((basePathname === \"/\" ? \"\" : \"/\") + pathname, toQuery);\n } // ./ /users/123 => /users/123\n // ../ /users/123 => /users\n // ../.. /users/123 => /\n // ../../one /a/b/c/d => /a/b/one\n // .././one /a/b/c/d => /a/b/c/one\n\n\n var allSegments = baseSegments.concat(toSegments);\n var segments = [];\n\n for (var i = 0, l = allSegments.length; i < l; i++) {\n var segment = allSegments[i];\n if (segment === \"..\") segments.pop();else if (segment !== \".\") segments.push(segment);\n }\n\n return addQuery(\"/\" + segments.join(\"/\"), toQuery);\n}; ////////////////////////////////////////////////////////////////////////////////\n// insertParams(path, params)\n\n\nvar insertParams = function insertParams(path, params) {\n var _path$split = path.split(\"?\"),\n pathBase = _path$split[0],\n _path$split$ = _path$split[1],\n query = _path$split$ === undefined ? \"\" : _path$split$;\n\n var segments = segmentize(pathBase);\n var constructedPath = \"/\" + segments.map(function (segment) {\n var match = paramRe.exec(segment);\n return match ? params[match[1]] : segment;\n }).join(\"/\");\n var _params$location = params.location;\n _params$location = _params$location === undefined ? {} : _params$location;\n var _params$location$sear = _params$location.search,\n search = _params$location$sear === undefined ? \"\" : _params$location$sear;\n var searchSplit = search.split(\"?\")[1] || \"\";\n constructedPath = addQuery(constructedPath, query, searchSplit);\n return constructedPath;\n};\n\nvar validateRedirect = function validateRedirect(from, to) {\n var filter = function filter(segment) {\n return isDynamic(segment);\n };\n\n var fromString = segmentize(from).filter(filter).sort().join(\"/\");\n var toString = segmentize(to).filter(filter).sort().join(\"/\");\n return fromString === toString;\n}; ////////////////////////////////////////////////////////////////////////////////\n// Junk\n\n\nvar paramRe = /^:(.+)/;\nvar SEGMENT_POINTS = 4;\nvar STATIC_POINTS = 3;\nvar DYNAMIC_POINTS = 2;\nvar SPLAT_PENALTY = 1;\nvar ROOT_POINTS = 1;\n\nvar isRootSegment = function isRootSegment(segment) {\n return segment === \"\";\n};\n\nvar isDynamic = function isDynamic(segment) {\n return paramRe.test(segment);\n};\n\nvar isSplat = function isSplat(segment) {\n return segment && segment[0] === \"*\";\n};\n\nvar rankRoute = function rankRoute(route, index) {\n var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {\n score += SEGMENT_POINTS;\n if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;\n return score;\n }, 0);\n return {\n route: route,\n score: score,\n index: index\n };\n};\n\nvar rankRoutes = function rankRoutes(routes) {\n return routes.map(rankRoute).sort(function (a, b) {\n return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;\n });\n};\n\nvar segmentize = function segmentize(uri) {\n return uri // strip starting/ending slashes\n .replace(/(^\\/+|\\/+$)/g, \"\").split(\"/\");\n};\n\nvar addQuery = function addQuery(pathname) {\n for (var _len = arguments.length, query = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n query[_key - 1] = arguments[_key];\n }\n\n query = query.filter(function (q) {\n return q && q.length > 0;\n });\n return pathname + (query && query.length > 0 ? \"?\" + query.join(\"&\") : \"\");\n};\n\nvar reservedNames = [\"uri\", \"path\"];\n/**\n * Shallow compares two objects.\n * @param {Object} obj1 The first object to compare.\n * @param {Object} obj2 The second object to compare.\n */\n\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n var obj1Keys = Object.keys(obj1);\n return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {\n return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n });\n}; ////////////////////////////////////////////////////////////////////////////////\n\n\nexport { startsWith, pick, match, resolve, insertParams, validateRedirect, shallowCompare };","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar getLocation = function getLocation(source) {\n var _source$location = source.location,\n search = _source$location.search,\n hash = _source$location.hash,\n href = _source$location.href,\n origin = _source$location.origin,\n protocol = _source$location.protocol,\n host = _source$location.host,\n hostname = _source$location.hostname,\n port = _source$location.port;\n var pathname = source.location.pathname;\n\n if (!pathname && href && canUseDOM) {\n var url = new URL(href);\n pathname = url.pathname;\n }\n\n return {\n pathname: encodeURI(decodeURI(pathname)),\n search: search,\n hash: hash,\n href: href,\n origin: origin,\n protocol: protocol,\n host: host,\n hostname: hostname,\n port: port,\n state: source.history.state,\n key: source.history.state && source.history.state.key || \"initial\"\n };\n};\n\nvar createHistory = function createHistory(source, options) {\n var listeners = [];\n var location = getLocation(source);\n var transitioning = false;\n\n var resolveTransition = function resolveTransition() {};\n\n return {\n get location() {\n return location;\n },\n\n get transitioning() {\n return transitioning;\n },\n\n _onTransitionComplete: function _onTransitionComplete() {\n transitioning = false;\n resolveTransition();\n },\n listen: function listen(listener) {\n listeners.push(listener);\n\n var popstateListener = function popstateListener() {\n location = getLocation(source);\n listener({\n location: location,\n action: \"POP\"\n });\n };\n\n source.addEventListener(\"popstate\", popstateListener);\n return function () {\n source.removeEventListener(\"popstate\", popstateListener);\n listeners = listeners.filter(function (fn) {\n return fn !== listener;\n });\n };\n },\n navigate: function navigate(to) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n state = _ref.state,\n _ref$replace = _ref.replace,\n replace = _ref$replace === undefined ? false : _ref$replace;\n\n if (typeof to === \"number\") {\n source.history.go(to);\n } else {\n state = _extends({}, state, {\n key: Date.now() + \"\"\n }); // try...catch iOS Safari limits to 100 pushState calls\n\n try {\n if (transitioning || replace) {\n source.history.replaceState(state, null, to);\n } else {\n source.history.pushState(state, null, to);\n }\n } catch (e) {\n source.location[replace ? \"replace\" : \"assign\"](to);\n }\n }\n\n location = getLocation(source);\n transitioning = true;\n var transition = new Promise(function (res) {\n return resolveTransition = res;\n });\n listeners.forEach(function (listener) {\n return listener({\n location: location,\n action: \"PUSH\"\n });\n });\n return transition;\n }\n };\n}; ////////////////////////////////////////////////////////////////////////////////\n// Stores history entries in memory for testing or other platforms like Native\n\n\nvar createMemorySource = function createMemorySource() {\n var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var searchIndex = initialPath.indexOf(\"?\");\n var initialLocation = {\n pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,\n search: searchIndex > -1 ? initialPath.substr(searchIndex) : \"\"\n };\n var index = 0;\n var stack = [initialLocation];\n var states = [null];\n return {\n get location() {\n return stack[index];\n },\n\n addEventListener: function addEventListener(name, fn) {},\n removeEventListener: function removeEventListener(name, fn) {},\n history: {\n get entries() {\n return stack;\n },\n\n get index() {\n return index;\n },\n\n get state() {\n return states[index];\n },\n\n pushState: function pushState(state, _, uri) {\n var _uri$split = uri.split(\"?\"),\n pathname = _uri$split[0],\n _uri$split$ = _uri$split[1],\n search = _uri$split$ === undefined ? \"\" : _uri$split$;\n\n index++;\n stack.push({\n pathname: pathname,\n search: search.length ? \"?\" + search : search\n });\n states.push(state);\n },\n replaceState: function replaceState(state, _, uri) {\n var _uri$split2 = uri.split(\"?\"),\n pathname = _uri$split2[0],\n _uri$split2$ = _uri$split2[1],\n search = _uri$split2$ === undefined ? \"\" : _uri$split2$;\n\n stack[index] = {\n pathname: pathname,\n search: search\n };\n states[index] = state;\n },\n go: function go(to) {\n var newIndex = index + to;\n\n if (newIndex < 0 || newIndex > states.length - 1) {\n return;\n }\n\n index = newIndex;\n }\n }\n };\n}; ////////////////////////////////////////////////////////////////////////////////\n// global history - uses window.history as the source if available, otherwise a\n// memory history\n\n\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n\nvar getSource = function getSource() {\n return canUseDOM ? window : createMemorySource();\n};\n\nvar globalHistory = createHistory(getSource());\nvar navigate = globalHistory.navigate; ////////////////////////////////////////////////////////////////////////////////\n\nexport { globalHistory, navigate, createHistory, createMemorySource };","var _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n/* eslint-disable jsx-a11y/anchor-has-content */\n\n\nimport React, { useContext, createContext } from \"react\";\nimport invariant from \"invariant\";\nimport { polyfill } from \"react-lifecycles-compat\";\nimport { startsWith, pick, resolve, match, insertParams, validateRedirect, shallowCompare } from \"./lib/utils\";\nimport { globalHistory, navigate, createHistory, createMemorySource } from \"./lib/history\"; ////////////////////////////////////////////////////////////////////////////////\n\nvar createNamedContext = function createNamedContext(name, defaultValue) {\n var Ctx = createContext(defaultValue);\n Ctx.displayName = name;\n return Ctx;\n}; ////////////////////////////////////////////////////////////////////////////////\n// Location Context/Provider\n\n\nvar LocationContext = createNamedContext(\"Location\"); // sets up a listener if there isn't one already so apps don't need to be\n// wrapped in some top level provider\n\nvar Location = function Location(_ref) {\n var children = _ref.children;\n return React.createElement(LocationContext.Consumer, null, function (context) {\n return context ? children(context) : React.createElement(LocationProvider, null, children);\n });\n};\n\nvar LocationProvider = function (_React$Component) {\n _inherits(LocationProvider, _React$Component);\n\n function LocationProvider() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, LocationProvider);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n context: _this.getContext(),\n refs: {\n unlisten: null\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n LocationProvider.prototype.getContext = function getContext() {\n var _props$history = this.props.history,\n navigate = _props$history.navigate,\n location = _props$history.location;\n return {\n navigate: navigate,\n location: location\n };\n };\n\n LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {\n if (isRedirect(error)) {\n var _navigate = this.props.history.navigate;\n\n _navigate(error.uri, {\n replace: true\n });\n } else {\n throw error;\n }\n };\n\n LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevState.context.location !== this.state.context.location) {\n this.props.history._onTransitionComplete();\n }\n };\n\n LocationProvider.prototype.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n var refs = this.state.refs,\n history = this.props.history;\n\n history._onTransitionComplete();\n\n refs.unlisten = history.listen(function () {\n Promise.resolve().then(function () {\n // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306\n requestAnimationFrame(function () {\n if (!_this2.unmounted) {\n _this2.setState(function () {\n return {\n context: _this2.getContext()\n };\n });\n }\n });\n });\n });\n };\n\n LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n var refs = this.state.refs;\n this.unmounted = true;\n refs.unlisten();\n };\n\n LocationProvider.prototype.render = function render() {\n var context = this.state.context,\n children = this.props.children;\n return React.createElement(LocationContext.Provider, {\n value: context\n }, typeof children === \"function\" ? children(context) : children || null);\n };\n\n return LocationProvider;\n}(React.Component); ////////////////////////////////////////////////////////////////////////////////\n\n\nLocationProvider.defaultProps = {\n history: globalHistory\n};\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0;\n\nvar ServerLocation = function ServerLocation(_ref2) {\n var url = _ref2.url,\n children = _ref2.children;\n var searchIndex = url.indexOf(\"?\");\n var searchExists = searchIndex > -1;\n var pathname = void 0;\n var search = \"\";\n var hash = \"\";\n\n if (searchExists) {\n pathname = url.substring(0, searchIndex);\n search = url.substring(searchIndex);\n } else {\n pathname = url;\n }\n\n return React.createElement(LocationContext.Provider, {\n value: {\n location: {\n pathname: pathname,\n search: search,\n hash: hash\n },\n navigate: function navigate() {\n throw new Error(\"You can't call navigate on the server.\");\n }\n }\n }, children);\n}; ////////////////////////////////////////////////////////////////////////////////\n// Sets baseuri and basepath for nested routers and links\n\n\nvar BaseContext = createNamedContext(\"Base\", {\n baseuri: \"/\",\n basepath: \"/\",\n navigate: globalHistory.navigate\n}); ////////////////////////////////////////////////////////////////////////////////\n// The main event, welcome to the show everybody.\n\nvar Router = function Router(props) {\n return React.createElement(BaseContext.Consumer, null, function (baseContext) {\n return React.createElement(Location, null, function (locationContext) {\n return React.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));\n });\n });\n};\n\nvar RouterImpl = function (_React$PureComponent) {\n _inherits(RouterImpl, _React$PureComponent);\n\n function RouterImpl() {\n _classCallCheck(this, RouterImpl);\n\n return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));\n }\n\n RouterImpl.prototype.render = function render() {\n var _props = this.props,\n location = _props.location,\n _navigate2 = _props.navigate,\n basepath = _props.basepath,\n primary = _props.primary,\n children = _props.children,\n baseuri = _props.baseuri,\n _props$component = _props.component,\n component = _props$component === undefined ? \"div\" : _props$component,\n domProps = _objectWithoutProperties(_props, [\"location\", \"navigate\", \"basepath\", \"primary\", \"children\", \"baseuri\", \"component\"]);\n\n var routes = React.Children.toArray(children).reduce(function (array, child) {\n var routes = createRoute(basepath)(child);\n return array.concat(routes);\n }, []);\n var pathname = location.pathname;\n var match = pick(routes, pathname);\n\n if (match) {\n var params = match.params,\n uri = match.uri,\n route = match.route,\n element = match.route.value; // remove the /* from the end for child routes relative paths\n\n basepath = route.default ? basepath : route.path.replace(/\\*$/, \"\");\n\n var props = _extends({}, params, {\n uri: uri,\n location: location,\n navigate: function navigate(to, options) {\n return _navigate2(resolve(to, uri), options);\n }\n });\n\n var clone = React.cloneElement(element, props, element.props.children ? React.createElement(Router, {\n location: location,\n primary: primary\n }, element.props.children) : undefined); // using 'div' for < 16.3 support\n\n var FocusWrapper = primary ? FocusHandler : component; // don't pass any props to 'div'\n\n var wrapperProps = primary ? _extends({\n uri: uri,\n location: location,\n component: component\n }, domProps) : domProps;\n return React.createElement(BaseContext.Provider, {\n value: {\n baseuri: uri,\n basepath: basepath,\n navigate: props.navigate\n }\n }, React.createElement(FocusWrapper, wrapperProps, clone));\n } else {\n // Not sure if we want this, would require index routes at every level\n // warning(\n // false,\n // `\\n\\nNothing matched:\\n\\t${\n // location.pathname\n // }\\n\\nPaths checked: \\n\\t${routes\n // .map(route => route.path)\n // .join(\n // \"\\n\\t\"\n // )}\\n\\nTo get rid of this warning, add a default NotFound component as child of Router:\n // \\n\\tlet NotFound = () =>
Not Found!
\n // \\n\\t\\n\\t \\n\\t {/* ... */}\\n\\t`\n // );\n return null;\n }\n };\n\n return RouterImpl;\n}(React.PureComponent);\n\nRouterImpl.defaultProps = {\n primary: true\n};\nvar FocusContext = createNamedContext(\"Focus\");\n\nvar FocusHandler = function FocusHandler(_ref3) {\n var uri = _ref3.uri,\n location = _ref3.location,\n component = _ref3.component,\n domProps = _objectWithoutProperties(_ref3, [\"uri\", \"location\", \"component\"]);\n\n return React.createElement(FocusContext.Consumer, null, function (requestFocus) {\n return React.createElement(FocusHandlerImpl, _extends({}, domProps, {\n component: component,\n requestFocus: requestFocus,\n uri: uri,\n location: location\n }));\n });\n}; // don't focus on initial render\n\n\nvar initialRender = true;\nvar focusHandlerCount = 0;\n\nvar FocusHandlerImpl = function (_React$Component2) {\n _inherits(FocusHandlerImpl, _React$Component2);\n\n function FocusHandlerImpl() {\n var _temp2, _this4, _ret2;\n\n _classCallCheck(this, FocusHandlerImpl);\n\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _ret2 = (_temp2 = (_this4 = _possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {\n if (!_this4.state.shouldFocus && node) {\n node.focus();\n }\n }, _temp2), _possibleConstructorReturn(_this4, _ret2);\n }\n\n FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n var initial = prevState.uri == null;\n\n if (initial) {\n return _extends({\n shouldFocus: true\n }, nextProps);\n } else {\n var myURIChanged = nextProps.uri !== prevState.uri;\n var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;\n return _extends({\n shouldFocus: myURIChanged || navigatedUpToMe\n }, nextProps);\n }\n };\n\n FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {\n focusHandlerCount++;\n this.focus();\n };\n\n FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {\n focusHandlerCount--;\n\n if (focusHandlerCount === 0) {\n initialRender = true;\n }\n };\n\n FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (prevProps.location !== this.props.location && this.state.shouldFocus) {\n this.focus();\n }\n };\n\n FocusHandlerImpl.prototype.focus = function focus() {\n if (process.env.NODE_ENV === \"test\") {\n // getting cannot read property focus of null in the tests\n // and that bit of global `initialRender` state causes problems\n // should probably figure it out!\n return;\n }\n\n var requestFocus = this.props.requestFocus;\n\n if (requestFocus) {\n requestFocus(this.node);\n } else {\n if (initialRender) {\n initialRender = false;\n } else if (this.node) {\n // React polyfills [autofocus] and it fires earlier than cDM,\n // so we were stealing focus away, this line prevents that.\n if (!this.node.contains(document.activeElement)) {\n this.node.focus();\n }\n }\n }\n };\n\n FocusHandlerImpl.prototype.render = function render() {\n var _this5 = this;\n\n var _props2 = this.props,\n children = _props2.children,\n style = _props2.style,\n requestFocus = _props2.requestFocus,\n _props2$component = _props2.component,\n Comp = _props2$component === undefined ? \"div\" : _props2$component,\n uri = _props2.uri,\n location = _props2.location,\n domProps = _objectWithoutProperties(_props2, [\"children\", \"style\", \"requestFocus\", \"component\", \"uri\", \"location\"]);\n\n return React.createElement(Comp, _extends({\n style: _extends({\n outline: \"none\"\n }, style),\n tabIndex: \"-1\",\n ref: function ref(n) {\n return _this5.node = n;\n }\n }, domProps), React.createElement(FocusContext.Provider, {\n value: this.requestFocus\n }, this.props.children));\n };\n\n return FocusHandlerImpl;\n}(React.Component);\n\npolyfill(FocusHandlerImpl);\n\nvar k = function k() {}; ////////////////////////////////////////////////////////////////////////////////\n\n\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = function forwardRef(C) {\n return C;\n };\n}\n\nvar Link = forwardRef(function (_ref4, ref) {\n var innerRef = _ref4.innerRef,\n props = _objectWithoutProperties(_ref4, [\"innerRef\"]);\n\n return React.createElement(BaseContext.Consumer, null, function (_ref5) {\n var basepath = _ref5.basepath,\n baseuri = _ref5.baseuri;\n return React.createElement(Location, null, function (_ref6) {\n var location = _ref6.location,\n navigate = _ref6.navigate;\n\n var to = props.to,\n state = props.state,\n replace = props.replace,\n _props$getProps = props.getProps,\n getProps = _props$getProps === undefined ? k : _props$getProps,\n anchorProps = _objectWithoutProperties(props, [\"to\", \"state\", \"replace\", \"getProps\"]);\n\n var href = resolve(to, baseuri);\n var encodedHref = encodeURI(href);\n var isCurrent = location.pathname === encodedHref;\n var isPartiallyCurrent = startsWith(location.pathname, encodedHref);\n return React.createElement(\"a\", _extends({\n ref: ref || innerRef,\n \"aria-current\": isCurrent ? \"page\" : undefined\n }, anchorProps, getProps({\n isCurrent: isCurrent,\n isPartiallyCurrent: isPartiallyCurrent,\n href: href,\n location: location\n }), {\n href: href,\n onClick: function onClick(event) {\n if (anchorProps.onClick) anchorProps.onClick(event);\n\n if (shouldNavigate(event)) {\n event.preventDefault();\n var shouldReplace = replace;\n\n if (typeof replace !== \"boolean\" && isCurrent) {\n var _location$state = _extends({}, location.state),\n key = _location$state.key,\n restState = _objectWithoutProperties(_location$state, [\"key\"]);\n\n shouldReplace = shallowCompare(_extends({}, state), restState);\n }\n\n navigate(href, {\n state: state,\n replace: shouldReplace\n });\n }\n }\n }));\n });\n });\n});\nLink.displayName = \"Link\";\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0; ////////////////////////////////////////////////////////////////////////////////\n\nfunction RedirectRequest(uri) {\n this.uri = uri;\n}\n\nvar isRedirect = function isRedirect(o) {\n return o instanceof RedirectRequest;\n};\n\nvar redirectTo = function redirectTo(to) {\n throw new RedirectRequest(to);\n};\n\nvar RedirectImpl = function (_React$Component3) {\n _inherits(RedirectImpl, _React$Component3);\n\n function RedirectImpl() {\n _classCallCheck(this, RedirectImpl);\n\n return _possibleConstructorReturn(this, _React$Component3.apply(this, arguments));\n } // Support React < 16 with this hook\n\n\n RedirectImpl.prototype.componentDidMount = function componentDidMount() {\n var _props3 = this.props,\n navigate = _props3.navigate,\n to = _props3.to,\n from = _props3.from,\n _props3$replace = _props3.replace,\n replace = _props3$replace === undefined ? true : _props3$replace,\n state = _props3.state,\n noThrow = _props3.noThrow,\n baseuri = _props3.baseuri,\n props = _objectWithoutProperties(_props3, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n Promise.resolve().then(function () {\n var resolvedTo = resolve(to, baseuri);\n navigate(insertParams(resolvedTo, props), {\n replace: replace,\n state: state\n });\n });\n };\n\n RedirectImpl.prototype.render = function render() {\n var _props4 = this.props,\n navigate = _props4.navigate,\n to = _props4.to,\n from = _props4.from,\n replace = _props4.replace,\n state = _props4.state,\n noThrow = _props4.noThrow,\n baseuri = _props4.baseuri,\n props = _objectWithoutProperties(_props4, [\"navigate\", \"to\", \"from\", \"replace\", \"state\", \"noThrow\", \"baseuri\"]);\n\n var resolvedTo = resolve(to, baseuri);\n if (!noThrow) redirectTo(insertParams(resolvedTo, props));\n return null;\n };\n\n return RedirectImpl;\n}(React.Component);\n\nvar Redirect = function Redirect(props) {\n return React.createElement(BaseContext.Consumer, null, function (_ref7) {\n var baseuri = _ref7.baseuri;\n return React.createElement(Location, null, function (locationContext) {\n return React.createElement(RedirectImpl, _extends({}, locationContext, {\n baseuri: baseuri\n }, props));\n });\n });\n};\n\nprocess.env.NODE_ENV !== \"production\" ? void 0 : void 0; ////////////////////////////////////////////////////////////////////////////////\n\nvar Match = function Match(_ref8) {\n var path = _ref8.path,\n children = _ref8.children;\n return React.createElement(BaseContext.Consumer, null, function (_ref9) {\n var baseuri = _ref9.baseuri;\n return React.createElement(Location, null, function (_ref10) {\n var navigate = _ref10.navigate,\n location = _ref10.location;\n var resolvedPath = resolve(path, baseuri);\n var result = match(resolvedPath, location.pathname);\n return children({\n navigate: navigate,\n location: location,\n match: result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null\n });\n });\n });\n}; ////////////////////////////////////////////////////////////////////////////////\n// Hooks\n\n\nvar useLocation = function useLocation() {\n var context = useContext(LocationContext);\n\n if (!context) {\n throw new Error(\"useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.location;\n};\n\nvar useNavigate = function useNavigate() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useNavigate hook was used but a BaseContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n return context.navigate;\n};\n\nvar useParams = function useParams() {\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n var results = match(context.basepath, location.pathname);\n return results ? results.params : null;\n};\n\nvar useMatch = function useMatch(path) {\n if (!path) {\n throw new Error(\"useMatch(path: string) requires an argument of a string to match against\");\n }\n\n var context = useContext(BaseContext);\n\n if (!context) {\n throw new Error(\"useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router\");\n }\n\n var location = useLocation();\n var resolvedPath = resolve(path, context.baseuri);\n var result = match(resolvedPath, location.pathname);\n return result ? _extends({}, result.params, {\n uri: result.uri,\n path: path\n }) : null;\n}; ////////////////////////////////////////////////////////////////////////////////\n// Junk\n\n\nvar stripSlashes = function stripSlashes(str) {\n return str.replace(/(^\\/+|\\/+$)/g, \"\");\n};\n\nvar createRoute = function createRoute(basepath) {\n return function (element) {\n if (!element) {\n return null;\n }\n\n if (element.type === React.Fragment && element.props.children) {\n return React.Children.map(element.props.children, createRoute(basepath));\n }\n\n !(element.props.path || element.props.default || element.type === Redirect) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \": Children of must have a `path` or `default` prop, or be a ``. None found on element type `\" + element.type + \"`\") : invariant(false) : void 0;\n !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" requires both \\\"from\\\" and \\\"to\\\" props when inside a .\") : invariant(false) : void 0;\n !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.\") : invariant(false) : void 0;\n\n if (element.props.default) {\n return {\n value: element,\n default: true\n };\n }\n\n var elementPath = element.type === Redirect ? element.props.from : element.props.path;\n var path = elementPath === \"/\" ? basepath : stripSlashes(basepath) + \"/\" + stripSlashes(elementPath);\n return {\n value: element,\n default: element.props.default,\n path: element.props.children ? stripSlashes(path) + \"/*\" : path\n };\n };\n};\n\nvar shouldNavigate = function shouldNavigate(event) {\n return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}; ////////////////////////////////////////////////////////////////////////\n\n\nexport { Link, Location, LocationProvider, Match, Redirect, Router, ServerLocation, createHistory, createMemorySource, isRedirect, navigate, redirectTo, globalHistory, match as matchPath, useLocation, useNavigate, useParams, useMatch , BaseContext };","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}"],"names":["module","exports","self","ReferenceError","__esModule","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","setPrototypeOf","subClass","superClass","create","constructor","obj","excluded","sourceKeys","keys","indexOf","_setPrototypeOf","o","p","__proto__","_a$1","_a","ERRORS","ERROR_FACTORY","name$c","DEFAULT_ENTRY_NAME","PLATFORM_LOG_STRING","logger","FirebaseAppImpl","options","config","firebase_","_this","isDeleted_","name_","name","automaticDataCollectionEnabled_","automaticDataCollectionEnabled","options_","container","_addComponent","INTERNAL","components","forEach","component","defineProperty","get","checkDestroyed_","set","val","enumerable","configurable","delete","Promise","resolve","then","removeApp","all","getProviders","map","provider","_getService","instanceIdentifier","getProvider","isInitialized","getComponent","instantiationMode","initialize","getImmediate","identifier","_removeServiceInstance","clearInstance","addComponent","e","debug","_addOrOverwriteComponent","addOrOverwriteComponent","toJSON","appName","console","log","firebase$1","createFirebaseNamespace","namespace","firebaseAppImpl","apps","Map","initializeApp","rawConfig","undefined","String","app","registerVersion","libraryKeyOrName","version","variant","library","libraryMismatch","match","versionMismatch","warning","push","warn","join","registerComponent","setLogLevel","onLog","logCallback","SDK_VERSION","useAsService","componentName","has","type","serviceNamespace","appArg","serviceProps","args","_i","bind","multipleInstances","createFirebaseNamespaceCore","extendNamespace","props","createSubscribe","ErrorFactory","deepExtend","PlatformLoggerService","getPlatformInfoString","isVersionServiceProvider","service","filter","logString","firebase","sdkVersion","registerCoreComponents","Component","instanceFactory","onInstanceCreated","setInstantiationMode","mode","setMultipleInstances","setServiceProps","setInstanceCreatedCallback","callback","Provider","instances","instancesDeferred","instancesOptions","onInitCallbacks","normalizedIdentifier","normalizeInstanceIdentifier","deferred","shouldAutoInitialize","instance","getOrInitializeService","promise","optional","Error","setComponent","e_1","isComponentEager","_b","entries","_c","next","done","_d","value","instanceDeferred","e_1_1","error","return","services","label","Array","from","values","_delete","sent","isComponentSet","getOptions","opts","e_2","_e","e_2_1","onInit","existingCallbacks","Set","add","existingInstance","invokeOnInitCallbacks","e_3","callbacks","callbacks_1","callbacks_1_1","e_3_1","ComponentContainer","providers","__spreadArrays","s","il","r","k","a","j","jl","LogLevel","levelStringToEnum","DEBUG","VERBOSE","INFO","WARN","ERROR","SILENT","defaultLogLevel","ConsoleMethod","defaultLogHandler","logType","logLevel","now","Date","toISOString","method","Logger","_logLevel","_logHandler","_userLogHandler","TypeError","info","level","inst","setUserLogHandler","_loop_1","customLogLevel","userLogHandler","message","arg","toString","JSON","stringify","ignored","toLowerCase","instances_1","stringToByteArray$1","str","out","c","charCodeAt","base64","byteToCharMap_","charToByteMap_","byteToCharMapWebSafe_","charToByteMapWebSafe_","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","HAS_NATIVE_SUPPORT","atob","encodeByteArray","input","webSafe","isArray","init_","byteToCharMap","output","byte1","haveByte2","byte2","haveByte3","byte3","outByte1","outByte2","outByte3","outByte4","encodeString","btoa","decodeString","bytes","pos","c1","fromCharCode","c2","u","c3","byteArrayToString","decodeStringToByteArray","charToByteMap","charAt","byte4","base64urlEncodeWithoutPadding","utf8Bytes","base64Encode","replace","deepCopy","getTime","prop","Deferred","reject","wrapCallback","catch","createMockUserToken","token","projectId","uid","project","iat","sub","user_id","payload","iss","aud","exp","auth_time","sign_in_provider","identities","alg","getUA","navigator","isMobileCordova","window","test","isNode","g","process","isBrowser","isBrowserExtension","runtime","chrome","browser","id","isReactNative","isElectron","isIE","ua","isUWP","isSafari","userAgent","includes","FirebaseError","_super","code","customData","captureStackTrace","serviceName","errors","data","fullCode","template","replaceTemplate","fullMessage","PATTERN","_","contains","Sha1","chain_","buf_","W_","pad_","inbuf_","total_","blockSize","reset","compress_","buf","offset","W","t","f","b","d","update","lengthMinusBlock","n","inbuf","digest","totalBits","executor","onNoObservers","proxy","ObserverProxy","subscribe","observers","unsubscribes","observerCount","task","finalized","forEachObserver","observer","close","complete","nextOrObserver","methods","methods_1","implementsAnyMethods","noop","unsub","unsubscribeOne","finalError","fn","sendOne","err","getModularInstance","_delegate","_extendStatics","__values","Symbol","iterator","m","commonjsGlobal","globalThis","goog","l","aa","ba","ea","Math","random","fa","ha","ia","slice","unshift","q","Function","ja","Z","Vb","h","v","la","na","M","da","shift","ma","split","qa","concat","ra","sa","x","ta","trim","exec","w","va","wa","xa","ya","za","Aa","Ca","Na","Ha","y","Ia","Ja","Ka","La","Ma","document","documentMode","Oa","Pa","Qa","parseFloat","Sa","Ga","Ra","Fa","max","parseInt","Ta","Ua","Va","addEventListener","removeEventListener","z","defaultPrevented","A","relatedTarget","button","screenY","screenX","clientY","clientX","metaKey","shiftKey","altKey","ctrlKey","state","pointerId","pointerType","changedTouches","srcElement","nodeName","fromElement","toElement","pageX","pageY","Wa","preventDefault","returnValue","B","Xa","Ya","listener","src","capture","ca","Za","$a","bb","splice","ab","cb","db","fb","once","gb","hb","N","ib","jb","mb","kb","attachEvent","lb","addListener","removeListener","O","nb","ob","detachEvent","pb","handleEvent","C","P","I","D","qb","rb","sb","tb","Ab","ub","vb","class_2","wb","yb","setTimeout","zb","Db","Bb","Cb","Eb","Fb","S","clearTimeout","Gb","Number","Hb","start","Ib","__","__extends","E","Jb","Kb","Lb","Mb","F","parse","Pb","H","Rb","Sb","Tb","Ub","STAT_EVENT","stat","J","size","K","Wb","NO_ERROR","xb","TIMEOUT","Xb","Yb","Zb","$b","cc","L","OPEN","ac","bc","dc","X","V","ec","Y","$","U","fc","XMLHttpRequest","gc","hc","ic","jc","kc","lc","mc","nc","G","Nb","qc","Ba","tc","vc","sc","wc","rc","substring","isNaN","substr","xc","eb","pc","uc","abort","yc","zc","Ac","Bc","Cc","ka","Q","Da","Ea","getResponseHeader","Dc","R","oa","Ec","Fc","Gc","Hc","Ic","Kc","T","Jc","Lc","ga","oc","TextDecoder","decode","stream","Ob","cancel","Qb","Mc","Oc","Pc","Qc","Rc","Sc","Tc","dd","Zc","Uc","$c","floor","abs","decodeURI","decodeURIComponent","encodeURI","cd","Vc","encodeURIComponent","Wc","Xc","Yc","Nc","ed","fd","gd","hd","PerformanceNavigationTiming","performance","getEntriesByType","nextHopProtocol","jd","kd","ld","md","od","onload","onerror","onabort","ontimeout","pd","qd","readyState","rd","status","responseType","responseText","response","statusText","onreadystatechange","Headers","clear","ud","read","td","sd","open","send","headers","credentials","cache","body","fetch","Request","arrayBuffer","ReadableStream","getReader","text","Uint8Array","setRequestHeader","append","getAllResponseHeaders","vd","wd","xd","yd","pa","zd","Cd","Dd","Ed","location","protocol","Ad","mozResponseArrayBuffer","Gd","Fd","Hd","internalChannelParams","Id","xmlHttpFactory","supportsCrossDomainXhr","concurrentRequestLimit","fastHandshake","forceLongPolling","detectBufferingProxy","Jd","Kd","sendBeacon","Image","Ld","Md","Qd","Pd","round","min","Od","Rd","Nd","d_1","nd","ad","bd","hostname","port","Sd","Td","messageUrlParams","messageHeaders","clientProtocolHeaderRequired","initMessageHeaders","messageContentType","httpHeadersOverwriteParam","sendRawJson","httpSessionIdParam","Ud","__sm__","Vd","toUpperCase","FormData","withCredentials","timeout","Bd","__data__","createWebChannel","HTTP_ERROR","COMPLETE","EventType","CLOSE","MESSAGE","listen","listenOnce","getLastError","getLastErrorCode","getStatus","getResponseJson","getResponseText","createWebChannelTransport","getStatEventTarget","ErrorCode","Event","Stat","PROXY","NOPROXY","FetchXmlHttpFactory","WebChannel","XhrIo","getLocation","_source$location","search","hash","href","origin","host","pathname","canUseDOM","URL","history","createHistory","listeners","transitioning","resolveTransition","_onTransitionComplete","popstateListener","action","navigate","to","_ref","_ref$replace","go","replaceState","pushState","transition","res","createMemorySource","initialPath","searchIndex","initialLocation","index","stack","states","uri","_uri$split","_uri$split$","_uri$split2","_uri$split2$","newIndex","createElement","globalHistory","shallowCompare","validateRedirect","insertParams","pick","startsWith","_invariant","_invariant2","default","string","routes","default_","uriPathname","uriSegments","segmentize","isRootUri","ranked","rankRoutes","missed","route","params","routeSegments","path","routeSegment","uriSegment","isSplat","dynamicMatch","paramRe","reservedNames","isDynamic","segment","rankRoute","score","reduce","isRootSegment","SEGMENT_POINTS","sort","addQuery","_len","query","_key","base","_to$split","toPathname","toQuery","basePathname","toSegments","baseSegments","allSegments","segments","pop","_path$split","pathBase","_path$split$","constructedPath","_params$location","_params$location$sear","searchSplit","obj1","obj2","obj1Keys","every","camelCase","pascalCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","character","preserveCamelCase","p1","strings","raw","_createClass","defineProperties","descriptor","writable","Constructor","protoProps","staticProps","_templateObject","freeze","_classCallCheck","TemplateTag","transformers","tag","_len2","expressions","_key2","interimTag","transformEndResult","transformString","processSubstitutions","transformer","previousTag","_len3","substitutions","_key3","resultSoFar","remainingPart","substitution","transformSubstitution","transform","onString","onSubstitution","endResult","onEndResult","defaults","separator","conjunction","serial","arrayLength","indent","separatorIndex","lastIndexOf","_toConsumableArray","arr","arr2","el","regexp","RegExp","side","splitBy","isValidValue","replaceWhat","replaceWith","_assign","__awaiter","thisArg","_arguments","generator","fulfilled","step","rejected","result","__generator","trys","ops","verb","op","__read","ar","__spreadArray","pack","isCallable","tryToString","argument","isObject","toIndexedObject","toLength","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","fromIndex","it","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","getOwnPropertyDescriptor","DESCRIPTORS","createPropertyDescriptor","object","bitmap","fails","global","EXISTS","getBuiltIn","Deno","versions","v8","createNonEnumerableProperty","redefine","setGlobal","copyConstructorProperties","isForced","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","noTargetGet","forced","sham","FunctionPrototype","getDescriptor","PROPER","CONFIGURABLE","aFunction","aCallable","func","check","toObject","hasOwn","classof","propertyIsEnumerable","store","functionToString","inspectSource","NATIVE_WEAK_MAP","objectHas","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","wmget","wmhas","wmset","metadata","facade","STATE","enforce","getterFor","TYPE","replacement","feature","detection","normalize","POLYFILL","NATIVE","USE_SYMBOL_AS_UID","$Symbol","V8_VERSION","getOwnPropertySymbols","symbol","IE8_DOM_DEFINE","anObject","toPropertyKey","$defineProperty","Attributes","propertyIsEnumerableModule","$getOwnPropertyDescriptor","internalObjectKeys","getOwnPropertyNames","names","$propertyIsEnumerable","NASHORN_BUG","pref","valueOf","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","InternalStateModule","CONFIGURABLE_FUNCTION_NAME","getInternalState","enforceInternalState","TEMPLATE","unsafe","simple","SHARED","IS_PURE","copyright","toInteger","integer","IndexedObject","requireObjectCoercible","ceil","isSymbol","getMethod","ordinaryToPrimitive","TO_PRIMITIVE","wellKnownSymbol","exoticToPrim","toPrimitive","postfix","NATIVE_SYMBOL","WellKnownSymbolsStore","createWellKnownSymbol","withoutSetter","_interopRequireDefault","withPrefix","getGlobalPathPrefix","_objectWithoutPropertiesLoose2","_assertThisInitialized2","_inheritsLoose2","_extends2","_propTypes","_react","_reachRouter","_utils","_parsePath","parsePath","_excluded","isAbsolutePath","prefix","_prefix","getGlobalBasePrefix","isLocalLink","endsWith","rewriteLinkPath","relativeTo","current","absolutify","NavLinkPropTypes","activeClassName","activeStyle","partiallyActive","bool","GatsbyLinkLocationWrapper","Location","_ref2","GatsbyLink","_location","_React$Component","defaultGetProps","_ref3","isPartiallyCurrent","isCurrent","className","Boolean","style","IOSupported","IntersectionObserver","handleRef","_proto","_prefetch","currentPath","rewrittenPath","newPathName","___loader","enqueue","componentDidUpdate","prevProps","prevState","componentDidMount","componentWillUnmount","io","_this$io","unobserve","disconnect","ref","_this2","innerRef","entry","isIntersecting","intersectionRatio","observe","render","_this3","_this$props","_this$props$getProps","getProps","_onClick","onClick","_onMouseEnter","onMouseEnter","rest","prefixedTo","Link","hovering","shouldReplace","___navigate","propTypes","isRequired","_default","forwardRef","hashIndex","_scrollHandler","ScrollHandler","_useScrollRestoration","useScrollRestoration","ScrollContext","React","nodeInterop","_getRequireWildcardCache","newObj","hasPropertyDescriptor","desc","_interopRequireWildcard","_sessionStorage","cacheBabelInterop","cacheNodeInterop","createContext","SessionStorage","displayName","_stateStorage","_isTicking","_latestKnownScrollY","scrollListener","scrollY","requestAnimationFrame","_saveScroll","windowScroll","position","shouldUpdateScroll","scrollTo","scrollToHash","node","getElementById","scrollIntoView","prevRouterProps","routerProps","save","scrollPosition","_this$props$location","_this$props$location2","children","element","GATSBY_ROUTER_SCROLL_STATE","stateKey","getStateKey","sessionStorage","getItem","storedValue","setItem","stateKeyBase","useLocation","useContext","useRef","useLayoutEffect","onScroll","scrollTop","plugin","require","plugins","getResourceURLsForPathname","loadPage","loadPageSync","api","defaultReturn","argTransform","results","previous","on","handler","off","emit","evt","mitt","pathCache","matchPaths","trimPathname","rawPathname","stripPrefix","__BASE_PATH__","setMatchPaths","findMatchPath","trimmedPathname","cleanPath","pickPaths","matchPath","originalPath","normalizePagePath","grabMatchParams","findPath","redirect","maybeGetBrowserRedirect","toPath","foundPath","prefetchPathname","loader","StaticQueryContext","StaticQueryDataRenderer","staticQueryData","finalData","StaticQuery","Consumer","useStaticQuery","context","graphql","supportedPrefetchStrategy","fakeLink","relList","supports","support","url","link","setAttribute","getElementsByTagName","getElementsByName","parentNode","appendChild","req","preFetched","PageResourceStatus","Success","preferDefault","createPageDataUrl","stripSurroundingSlashes","doFetch","toPageResources","pageData","page","componentChunkName","webpackCompilationHash","staticQueryHashes","json","BaseLoader","loadComponent","inFlightNetworkRequests","pageDb","inFlightDb","staticQueryDb","pageDataDb","prefetchTriggered","prefetchCompleted","memoizedGet","inFlightPromise","setApiRunner","apiRunner","prefetchDisabled","some","fetchPageDataJson","loadObj","pagePath","retries","jsonPayload","notFound","loadPageDataJson","rawPath","loadAppData","allData","finalResult","componentChunkPromise","pageResources","createdAt","staticQueryBatchPromise","staticQueryHash","staticQueryResults","staticQueryResultsMap","emitter","withErrorDetails","shouldPrefetch","connection","effectiveType","saveData","doesConnectionSupportPrefetch","prefetch","realPath","doPrefetch","pageDataUrl","prefetchHelper","crossOrigin","as","createComponentUrls","isPageNotFound","appData","___chunkMapping","chunk","__PATH_PREFIX__","ProdLoader","asyncRequires","chunkName","componentUrls","setLoader","_loader","publicLoader","getStaticQueryResults","PageRenderer","pageContext","__params","pageElement","RouteAnnouncerProps","top","width","height","padding","overflow","clip","whiteSpace","border","maybeRedirect","___replace","nextRoute","event","reason","onPreRouteUpdate","prevLocation","onRouteUpdate","___swUpdated","timeoutId","___webpackCompilationHash","serviceWorker","controller","postMessage","gatsbyApi","reachNavigate","getSavedScrollPosition","RouteAnnouncer","announcementRef","nextProps","pageName","title","pageHeadings","querySelectorAll","textContent","newAnnouncement","innerText","compareLocationProps","nextLocation","RouteUpdates","shouldComponentUpdate","shallowDiffers","EnsureResources","getDerivedStateFromProps","loadResources","setState","nextState","___emitter","___push","apiRunnerAsync","RouteHandler","BaseContext","baseuri","basepath","DataContext","GatsbyRoot","LocationHandler","Router","browserLoc","SiteRoot","App","onClientEntryRanRef","mark","renderer","ReactDOM","runRender","rootElement","doc","documentElement","doScroll","InternalPageRenderer","redirectMap","redirectIgnoreCaseMap","redirects","ignoreCase","fromPath","register","reg","installingWorker","installing","___failedResources","reload","Firestore","GeoPoint","Timestamp","Blob","Transaction","WriteBatch","DocumentReference","DocumentSnapshot","Query","QueryDocumentSnapshot","QuerySnapshot","CollectionReference","FieldPath","FieldValue","CACHE_SIZE_UNLIMITED","DEFAULT_HOST","FirebaseStorageError","prependCode","serverResponse","_baseMessage","_codeEquals","unknown","canceled","cannotSliceBlob","invalidArgument","appDeleted","invalidRootOperation","invalidFormat","format","internalError","StringFormat","RAW","BASE64","BASE64URL","DATA_URL","StringData","contentType","dataFromString","stringData","utf8Bytes_","base64Bytes_","parts","DataURLParts","decoded","percentEncodedBytes_","dataUrl","dataURLContentType_","hasMinus","hasUnder","hasPlus","hasSlash","array","dataURL","matches","middle","end","TaskEvent","STATE_CHANGED","TaskState","RUNNING","PAUSED","SUCCESS","CANCELED","taskStateFromInternalTaskState","XhrConnection","sent_","xhr_","errorCode_","sendPromise_","ABORT","NETWORK_ERROR","getErrorCode","header","addUploadProgressListener","upload","removeUploadProgressListener","ConnectionPool","createConnection","bucket","path_","fullServerUrl","encode","bucketOnlyServerUrl","makeFromBucketSpec","bucketString","bucketLocation","makeFromUrl","bucketDomain","gsRegex","httpModify","loc","firebaseStorageHost","groups","regex","indices","postModify","group","captures","bucketValue","pathValue","invalidUrl","FailRequest","promise_","getPromise","_appDelete","isString","isNativeBlob","isNativeBlobDefined","validateNumber","minValue","maxValue","makeUrl","urlPart","protocolMatch","makeQueryString","queryPart","NetworkRequest","successCodes","additionalRetryCodes","errorCallback","progressCallback","pool","pendingConnection_","backoffId_","canceled_","appDelete_","url_","method_","headers_","body_","successCodes_","additionalRetryCodes_","callback_","errorCallback_","progressCallback_","timeout_","pool_","resolve_","reject_","start_","backoffDone","requestWentThrough","wasSuccessCode","RequestEndStatus","waitSeconds","hitTimeout","cancelState","triggeredCallback","triggerCallback","callWithDelay","millis","success","waitMillis","stopped","stop","wasTimeout","backoffCallback","progressListener","hitServer","isRetryStatusCode_","successCode","wasCanceled","progressEvent","loaded","total","lengthComputable","appDelete","isFiveHundredCode","isExtraRetryCode","isRequestSpecificRetryCode","getBlobBuilder","BlobBuilder","WebKitBlobBuilder","getBlob","FbsBlob","elideCopy","blobType","data_","ArrayBuffer","byteLength","size_","type_","startByte","endByte","sliced","blob","webkitSlice","mozSlice","sliceBlob","buffer","blobby","uint8Arrays","finalLength_1","merged_1","index_1","uploadData","jsonObjectOrNull","lastComponent","noXform_","Mapping","server","local","xform","mappings_","getMappings","mappings","nameMapping","_metadata","fullPath","xformPath","sizeMapping","fromResource","resource","len","mapping","_makeStorageReference","addRef","fromResourceString","resourceString","toResourceString","fromResponseString","listResult","prefixes","items","nextPageToken","pathWithoutTrailingSlash","reference","item","fromBackendResponse","RequestInfo","urlParams","errorHandler","handlerCheck","cndn","metadataHandler","xhr","downloadUrlHandler","tokens","alt","downloadUrlFromResourceString","sharedErrorHandler","newErr","objectErrorHandler","getMetadata$2","maxOperationRetryTime","requestInfo","list$2","delimiter","pageToken","maxResults","isRoot","listHandler","metadataForUpload_","metadataClone","determineContentType_","ResumableUploadStatus","checkResumeHeader_","allowed","RESUMABLE_UPLOAD_CHUNK_SIZE","continueResumableUpload","chunkSize","status_","bytesLeft","bytesToUpload","maxUploadRetryTime","uploadStatus","newCurrent","Observer","argsToForward","UploadTask","_transferred","_needToFetchStatus","_needToFetchMetadata","_observers","_error","_uploadUrl","_request","_chunkMultiplier","_resolve","_reject","_blob","_mappings","_resumable","_shouldDoResumable","_state","_errorHandler","completeTransitions_","_transition","_metadataErrorHandler","_promise","_start","_makeProgressCallback","sizeBefore","_updateProgress","_createResumable","_fetchStatus","_fetchMetadata","_continueUpload","_oneShotUpload","_resolveToken","storage","_getAuthToken","_getAppCheckToken","authToken","appCheckToken","metadataForUpload","createResumableUpload","createRequest","_makeRequest","sizeString","getResumableUploadStatus","statusRequest","uploadRequest","newStatus","_increaseMultiplier","metadataRequest","boundary","genBoundary","metadata_","preBlobPart","postBlobPart","multipartUpload","multipartRequest","transferred","old","_notifyObservers","wasPaused","externalState","bytesTransferred","totalBytes","completed","_addObserver","_removeObserver","onFulfilled","onRejected","_notifyObserver","_finishPromise","triggered","snapshot","resume","valid","pause","Reference","_service","_newRef","newPath","_throwIfRoot","listAll$1","accumulator","listAllHelper","nextPage","list$1","makeRequestWithTokens","updateMetadata$1","updateMetadata$2","getDownloadURL$1","getDownloadUrl","deleteObject$1","_xhr","_text","deleteObject$2","_getChild$1","childPath","canonicalChildPath","child","isUrl","refFromPath","FirebaseStorageImpl","_bucket","ref$1","serviceOrRef","pathOrUrl","extractBucket","_authProvider","_appCheckProvider","_pool","_url","_firebaseVersion","_host","_appId","_deleted","_maxOperationRetryTime","_maxUploadRetryTime","_requests","time","POSITIVE_INFINITY","auth","tokenData","_overrideAuthToken","getToken","accessToken","appCheck","request","request_1","appId","firebaseVersion","addGmpidHeader_","addAuthHeader_","addVersionHeader_","addAppCheckHeader_","makeRequest","uploadBytesResumable","uploadBytesResumable$1","getMetadata","getMetadata$1","connectStorageEmulator","mockUserToken","connectStorageEmulator$1","namespaceExports","UploadTaskSnapshotCompat","UploadTaskCompat","wrappedNextOrObserver","taskSnapshot","ListResultCompat","ReferenceCompat","_getChild","root","parent","put","putString","listAll","list","updateMetadata","getDownloadURL","deleteObject","StorageServiceCompat","refFromURL","setMaxUploadRetryTime","setMaxOperationRetryTime","useEmulator","factory","authProvider","appCheckProvider","Storage","errorCodeMap","OK","CANCELLED","UNKNOWN","INVALID_ARGUMENT","DEADLINE_EXCEEDED","NOT_FOUND","ALREADY_EXISTS","PERMISSION_DENIED","UNAUTHENTICATED","RESOURCE_EXHAUSTED","FAILED_PRECONDITION","ABORTED","OUT_OF_RANGE","UNIMPLEMENTED","UNAVAILABLE","DATA_LOSS","HttpsErrorImpl","details","ContextProvider","messagingProvider","messaging","getAuthToken","getInstanceIdToken","Notification","permission","getContext","instanceIdToken","mapValues","Serializer","isFinite","Service","app_","regionOrCustomDomain_","fetchImpl","serializer","emulatorOrigin","deleteService","contextProvider","cancelAllRequests","customDomain","region","useFunctionsEmulator","httpsCallable","postJSON","getAppCheckToken","timer","failAfterPromise","responseData","failAfter","race","clearTimeoutWrapper","bodyJSON","codeForHTTPStatus","description","errorJSON","status_1","_errorForResponse","Functions","regionOrCustomDomain","registerFunctions","wrapRootElement","apiKey","authDomain","databaseURL","storageBucket","messagingSenderId","measurementId","gtag","excludeGtagPaths","rx","sendPageView","page_path","imageCache","hasNativeLazyLoadSupport","HTMLImageElement","GATSBY___IMAGE","storeImageloaded","cacheKey","hasImageLoaded","getMainProps","isLoading","isLoaded","images","loading","toggleLoaded","dataset","objectFit","objectPosition","objectFitPolyfill","import","shouldLoad","opacity","onLoad","currentTarget","img","currentSrc","getPlaceholderProps","placeholder","layout","backgroundColor","wrapperStyle","left","bottom","right","Sizer","paddingTop","maxWidth","display","role","LayoutWrapper","Fragment","srcSet","decoding","Picture","fallback","sources","sizes","fallbackImage","media","PropTypes","Placeholder","propName","MainImage","altValidator","image","GatsbyImageHydrator","createRef","hydrated","forceRender","NODE_ENV","lazyHydrator","unobserveRef","_lazyHydrate","hasSSRHtml","querySelector","lazyHydrate","toggleIsLoaded","_setupIntersectionObserver","useCache","intersectionObserver","createIntersectionObserver","_this4","onStartLoad","wasCached","hasChanged","_this5","ssrElement","Type","wStyle","wClass","wrapperProps","sizer","dangerouslySetInnerHTML","__html","suppressHydrationWarning","GatsbyImage","propsKey","checkDimensionProps","validLayouts","StaticImage","GatsbyImageBrowser","imageData","__imageData","__error","LaterHydrator","localizedManifests","defaultFilename","localizedManifest","find","start_url","lang","registerServiceWorker","GATSBY_IS_PREVIEW","whiteListLinkRels","prefetchedPathnames","setPathResources","resources","onServiceWorkerActive","active","nodes","headerResources","tagName","getAttribute","prefetchedResources","rel","remove","head","onPostPrefetchPathname","AuthContext","useState","user","setUser","useEffect","onAuthStateChanged","_objectWithoutProperties","_possibleConstructorReturn","_inherits","createNamedContext","defaultValue","Ctx","LocationContext","LocationProvider","_temp","refs","unlisten","_props$history","componentDidCatch","isRedirect","_navigate","unmounted","defaultProps","ServerLocation","baseContext","locationContext","RouterImpl","_React$PureComponent","_props","_navigate2","primary","_props$component","domProps","createRoute","clone","FocusWrapper","FocusHandler","FocusContext","requestFocus","FocusHandlerImpl","initialRender","focusHandlerCount","_React$Component2","_temp2","shouldFocus","focus","myURIChanged","navigatedUpToMe","activeElement","_props2","_props2$component","Comp","outline","tabIndex","_ref4","_ref5","_ref6","_props$getProps","anchorProps","encodedHref","shouldNavigate","_location$state","restState","RedirectRequest","redirectTo","RedirectImpl","_React$Component3","_props3","_props3$replace","noThrow","resolvedTo","_props4","Redirect","_ref7","Match","_ref8","_ref9","_ref10","resolvedPath","useNavigate","useParams","useMatch","stripSlashes","elementPath","condition","argIndex","framesToPop","_arrayLikeToArray","_inheritsLoose","_iterableToArray","iter","arrayLikeToArray","iterableToArray","unsupportedIterableToArray","_unsupportedIterableToArray","minLen"],"sourceRoot":""}