g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n 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]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) 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 switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) 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, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\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), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\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 return r;\n}\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}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\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 || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { 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) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : 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], 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 () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { 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}\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}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","//\n// Main\n//\nexport function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nvar ObjectWithoutPrototypeCache = /** @class */ (function () {\n function ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n }\n ObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n };\n ObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n };\n return ObjectWithoutPrototypeCache;\n}());\nvar cacheDefault = {\n create: function create() {\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `foo) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo123>`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: milliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","// @generated from regex-gen.ts\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n if (str[str.length - 1] === 'r') {\n result.roundingPriority = 'morePrecision';\n }\n else if (str[str.length - 1] === 's') {\n result.roundingPriority = 'lessPrecision';\n }\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n case 'rounding-mode-floor':\n result.roundingMode = 'floor';\n continue;\n case 'rounding-mode-ceiling':\n result.roundingMode = 'ceil';\n continue;\n case 'rounding-mode-down':\n result.roundingMode = 'trunc';\n continue;\n case 'rounding-mode-up':\n result.roundingMode = 'expand';\n continue;\n case 'rounding-mode-half-even':\n result.roundingMode = 'halfEven';\n continue;\n case 'rounding-mode-half-down':\n result.roundingMode = 'halfTrunc';\n continue;\n case 'rounding-mode-half-up':\n result.roundingMode = 'halfExpand';\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n var opt = token.options[0];\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n if (opt === 'w') {\n result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });\n }\n else if (opt) {\n result = __assign(__assign({}, result), parseSignificantPrecision(opt));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","// @generated from time-data-gen.ts\n// prettier-ignore \nexport var timeData = {\n \"001\": [\n \"H\",\n \"h\"\n ],\n \"419\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AD\": [\n \"H\",\n \"hB\"\n ],\n \"AE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"AF\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"AG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AL\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"AM\": [\n \"H\",\n \"hB\"\n ],\n \"AO\": [\n \"H\",\n \"hB\"\n ],\n \"AR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AS\": [\n \"h\",\n \"H\"\n ],\n \"AT\": [\n \"H\",\n \"hB\"\n ],\n \"AU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AW\": [\n \"H\",\n \"hB\"\n ],\n \"AX\": [\n \"H\"\n ],\n \"AZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BD\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"BE\": [\n \"H\",\n \"hB\"\n ],\n \"BF\": [\n \"H\",\n \"hB\"\n ],\n \"BG\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"BI\": [\n \"H\",\n \"h\"\n ],\n \"BJ\": [\n \"H\",\n \"hB\"\n ],\n \"BL\": [\n \"H\",\n \"hB\"\n ],\n \"BM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BN\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"BO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"BQ\": [\n \"H\"\n ],\n \"BR\": [\n \"H\",\n \"hB\"\n ],\n \"BS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BT\": [\n \"h\",\n \"H\"\n ],\n \"BW\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BY\": [\n \"H\",\n \"h\"\n ],\n \"BZ\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CA\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"CC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CD\": [\n \"hB\",\n \"H\"\n ],\n \"CF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CG\": [\n \"H\",\n \"hB\"\n ],\n \"CH\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"CI\": [\n \"H\",\n \"hB\"\n ],\n \"CK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CL\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CN\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"CO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CP\": [\n \"H\"\n ],\n \"CR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CU\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CV\": [\n \"H\",\n \"hB\"\n ],\n \"CW\": [\n \"H\",\n \"hB\"\n ],\n \"CX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CY\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"CZ\": [\n \"H\"\n ],\n \"DE\": [\n \"H\",\n \"hB\"\n ],\n \"DG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"DJ\": [\n \"h\",\n \"H\"\n ],\n \"DK\": [\n \"H\"\n ],\n \"DM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"DO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"DZ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"EC\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"EE\": [\n \"H\",\n \"hB\"\n ],\n \"EG\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ER\": [\n \"h\",\n \"H\"\n ],\n \"ES\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"ET\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"FI\": [\n \"H\"\n ],\n \"FJ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"FM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FO\": [\n \"H\",\n \"h\"\n ],\n \"FR\": [\n \"H\",\n \"hB\"\n ],\n \"GA\": [\n \"H\",\n \"hB\"\n ],\n \"GB\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GD\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GE\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"GF\": [\n \"H\",\n \"hB\"\n ],\n \"GG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GH\": [\n \"h\",\n \"H\"\n ],\n \"GI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GL\": [\n \"H\",\n \"h\"\n ],\n \"GM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GN\": [\n \"H\",\n \"hB\"\n ],\n \"GP\": [\n \"H\",\n \"hB\"\n ],\n \"GQ\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"GR\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"GT\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"GU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GW\": [\n \"H\",\n \"hB\"\n ],\n \"GY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"HK\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"HN\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"HR\": [\n \"H\",\n \"hB\"\n ],\n \"HU\": [\n \"H\",\n \"h\"\n ],\n \"IC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ID\": [\n \"H\"\n ],\n \"IE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IL\": [\n \"H\",\n \"hB\"\n ],\n \"IM\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IN\": [\n \"h\",\n \"H\"\n ],\n \"IO\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IQ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"IR\": [\n \"hB\",\n \"H\"\n ],\n \"IS\": [\n \"H\"\n ],\n \"IT\": [\n \"H\",\n \"hB\"\n ],\n \"JE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"JM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"JO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"JP\": [\n \"H\",\n \"K\",\n \"h\"\n ],\n \"KE\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"KG\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KH\": [\n \"hB\",\n \"h\",\n \"H\",\n \"hb\"\n ],\n \"KI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KM\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KN\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KP\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KW\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"KY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KZ\": [\n \"H\",\n \"hB\"\n ],\n \"LA\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"LB\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LI\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"LK\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"LR\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LS\": [\n \"h\",\n \"H\"\n ],\n \"LT\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"LU\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"LV\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"LY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MC\": [\n \"H\",\n \"hB\"\n ],\n \"MD\": [\n \"H\",\n \"hB\"\n ],\n \"ME\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"MF\": [\n \"H\",\n \"hB\"\n ],\n \"MG\": [\n \"H\",\n \"h\"\n ],\n \"MH\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ML\": [\n \"H\"\n ],\n \"MM\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"MN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MP\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MQ\": [\n \"H\",\n \"hB\"\n ],\n \"MR\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MS\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MT\": [\n \"H\",\n \"h\"\n ],\n \"MU\": [\n \"H\",\n \"h\"\n ],\n \"MV\": [\n \"H\",\n \"h\"\n ],\n \"MW\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MX\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"MY\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"MZ\": [\n \"H\",\n \"hB\"\n ],\n \"NA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NC\": [\n \"H\",\n \"hB\"\n ],\n \"NE\": [\n \"H\"\n ],\n \"NF\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NI\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NL\": [\n \"H\",\n \"hB\"\n ],\n \"NO\": [\n \"H\",\n \"h\"\n ],\n \"NP\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"NR\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NU\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"OM\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"PG\": [\n \"h\",\n \"H\"\n ],\n \"PH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PK\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"PL\": [\n \"H\",\n \"h\"\n ],\n \"PM\": [\n \"H\",\n \"hB\"\n ],\n \"PN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"PR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PS\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PT\": [\n \"H\",\n \"hB\"\n ],\n \"PW\": [\n \"h\",\n \"H\"\n ],\n \"PY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"QA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"RE\": [\n \"H\",\n \"hB\"\n ],\n \"RO\": [\n \"H\",\n \"hB\"\n ],\n \"RS\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"RU\": [\n \"H\"\n ],\n \"RW\": [\n \"H\",\n \"h\"\n ],\n \"SA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SC\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SD\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SE\": [\n \"H\"\n ],\n \"SG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SH\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SI\": [\n \"H\",\n \"hB\"\n ],\n \"SJ\": [\n \"H\"\n ],\n \"SK\": [\n \"H\"\n ],\n \"SL\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SN\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SO\": [\n \"h\",\n \"H\"\n ],\n \"SR\": [\n \"H\",\n \"hB\"\n ],\n \"SS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ST\": [\n \"H\",\n \"hB\"\n ],\n \"SV\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"SX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"TC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TD\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"TF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"TG\": [\n \"H\",\n \"hB\"\n ],\n \"TH\": [\n \"H\",\n \"h\"\n ],\n \"TJ\": [\n \"H\",\n \"h\"\n ],\n \"TL\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"TM\": [\n \"H\",\n \"h\"\n ],\n \"TN\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"TO\": [\n \"h\",\n \"H\"\n ],\n \"TR\": [\n \"H\",\n \"hB\"\n ],\n \"TT\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TW\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"TZ\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UG\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"US\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"UY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"UZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"VA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"VC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"VG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VN\": [\n \"H\",\n \"h\"\n ],\n \"VU\": [\n \"h\",\n \"H\"\n ],\n \"WF\": [\n \"H\",\n \"hB\"\n ],\n \"WS\": [\n \"h\",\n \"H\"\n ],\n \"XK\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"YE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"YT\": [\n \"H\",\n \"hB\"\n ],\n \"ZA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ZM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ZW\": [\n \"H\",\n \"h\"\n ],\n \"af-ZA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ar-001\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ca-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"en-001\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-HK\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-IL\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"en-MY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"es-BR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-ES\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-GQ\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"fr-CA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gl-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gu-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"hi-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"it-CH\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-IT\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"kn-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ml-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"mr-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"pa-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"ta-IN\": [\n \"hB\",\n \"h\",\n \"hb\",\n \"H\"\n ],\n \"te-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"zu-ZA\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ]\n};\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_REGEX } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nimport { getBestPattern } from './date-time-pattern-generator';\nvar SPACE_SEPARATOR_START_REGEX = new RegExp(\"^\".concat(SPACE_SEPARATOR_REGEX.source, \"*\"));\nvar SPACE_SEPARATOR_END_REGEX = new RegExp(\"\".concat(SPACE_SEPARATOR_REGEX.source, \"*$\"));\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith && '_a'.startsWith('a', 1);\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.locale = options.locale;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"\" tagName (whitespace)* \">\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\".concat(tagName, \"/>\"),\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('')) {\n if (this.isEOF() || !_isAlpha(this.char())) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n var closingTagNameStartPosition = this.clonePosition();\n var closingTagName = this.parseTagName();\n if (tagName !== closingTagName) {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (!this.bumpIf('>')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var dateTimePattern = skeleton;\n // Get \"best match\" pattern only if locale is passed, if not, let it\n // pass as-is where `parseDateTimeSkeleton()` will throw an error\n // for unsupported patterns.\n if (this.locale) {\n dateTimePattern = getBestPattern(skeleton, this.locale);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: dateTimePattern,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(dateTimePattern)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \".concat(offset, \" is at invalid UTF-16 code unit boundary\"));\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" must be greater than or equal to the current offset \").concat(this.offset()));\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" is at invalid UTF-16 code unit boundary\"));\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { timeData } from './time-data.generated';\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton, locale) {\n var skeletonCopy = '';\n for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {\n var patternChar = skeleton.charAt(patternPos);\n if (patternChar === 'j') {\n var extraLength = 0;\n while (patternPos + 1 < skeleton.length &&\n skeleton.charAt(patternPos + 1) === patternChar) {\n extraLength++;\n patternPos++;\n }\n var hourLen = 1 + (extraLength & 1);\n var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n var dayPeriodChar = 'a';\n var hourChar = getDefaultHourSymbolFromLocale(locale);\n if (hourChar == 'H' || hourChar == 'k') {\n dayPeriodLen = 0;\n }\n while (dayPeriodLen-- > 0) {\n skeletonCopy += dayPeriodChar;\n }\n while (hourLen-- > 0) {\n skeletonCopy = hourChar + skeletonCopy;\n }\n }\n else if (patternChar === 'J') {\n skeletonCopy += 'H';\n }\n else {\n skeletonCopy += patternChar;\n }\n }\n return skeletonCopy;\n}\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale) {\n var hourCycle = locale.hourCycle;\n if (hourCycle === undefined &&\n // @ts-ignore hourCycle(s) is not identified yet\n locale.hourCycles &&\n // @ts-ignore\n locale.hourCycles.length) {\n // @ts-ignore\n hourCycle = locale.hourCycles[0];\n }\n if (hourCycle) {\n switch (hourCycle) {\n case 'h24':\n return 'k';\n case 'h23':\n return 'H';\n case 'h12':\n return 'h';\n case 'h11':\n return 'K';\n default:\n throw new Error('Invalid hourCycle');\n }\n }\n // TODO: Once hourCycle is fully supported remove the following with data generation\n var languageTag = locale.language;\n var regionTag;\n if (languageTag !== 'root') {\n regionTag = locale.maximize().region;\n }\n var hourCycles = timeData[regionTag || ''] ||\n timeData[languageTag || ''] ||\n timeData[\"\".concat(languageTag, \"-001\")] ||\n timeData['001'];\n return hourCycles[0];\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n// only for testing\nexport var _Parser = Parser;\nexport { isStructurallySame } from './manipulator';\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \".concat(this.code, \"] \").concat(this.message);\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\".concat(variableId, \"\\\": \\\"\").concat(value, \"\\\". Options are \\\"\").concat(Object.keys(options).join('\", \"'), \"\\\"\"), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\".concat(value, \"\\\" must be of type \").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\".concat(variableId, \"\\\" was not provided to the string \\\"\").concat(originalMessage, \"\\\"\"), ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, } from '@formatjs/icu-messageformat-parser';\nimport { ErrorCode, FormatError, InvalidValueError, InvalidValueTypeError, MissingValueError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : formats.time.medium;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\".concat(value)];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __rest, __spreadArray } from \"tslib\";\nimport { memoize, strategies } from '@formatjs/fast-memoize';\nimport { parse, } from '@formatjs/icu-messageformat-parser';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n var _this = this;\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () {\n var _a;\n return ({\n locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) ||\n Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n });\n };\n this.getAst = function () { return _this.ast; };\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n var _a = opts || {}, formatters = _a.formatters, parseOpts = __rest(_a, [\"formatters\"]);\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale =\n new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.resolveLocale = function (locales) {\n if (typeof Intl.Locale === 'undefined') {\n return;\n }\n var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n if (supportedLocales.length > 0) {\n return new Intl.Locale(supportedLocales[0]);\n }\n return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);\n };\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n integer: {\n maximumFractionDigits: 0,\n },\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { __extends } from \"tslib\";\nexport var IntlErrorCode;\n(function (IntlErrorCode) {\n IntlErrorCode[\"FORMAT_ERROR\"] = \"FORMAT_ERROR\";\n IntlErrorCode[\"UNSUPPORTED_FORMATTER\"] = \"UNSUPPORTED_FORMATTER\";\n IntlErrorCode[\"INVALID_CONFIG\"] = \"INVALID_CONFIG\";\n IntlErrorCode[\"MISSING_DATA\"] = \"MISSING_DATA\";\n IntlErrorCode[\"MISSING_TRANSLATION\"] = \"MISSING_TRANSLATION\";\n})(IntlErrorCode || (IntlErrorCode = {}));\nvar IntlError = /** @class */ (function (_super) {\n __extends(IntlError, _super);\n function IntlError(code, message, exception) {\n var _this = this;\n var err = exception\n ? exception instanceof Error\n ? exception\n : new Error(String(exception))\n : undefined;\n _this = _super.call(this, \"[@formatjs/intl Error \".concat(code, \"] \").concat(message, \"\\n\").concat(err ? \"\\n\".concat(err.message, \"\\n\").concat(err.stack) : '')) || this;\n _this.code = code;\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (typeof Error.captureStackTrace === 'function') {\n // @ts-ignore just so we don't need to declare dep on @types/node\n Error.captureStackTrace(_this, IntlError);\n }\n return _this;\n }\n return IntlError;\n}(Error));\nexport { IntlError };\nvar UnsupportedFormatterError = /** @class */ (function (_super) {\n __extends(UnsupportedFormatterError, _super);\n function UnsupportedFormatterError(message, exception) {\n return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;\n }\n return UnsupportedFormatterError;\n}(IntlError));\nexport { UnsupportedFormatterError };\nvar InvalidConfigError = /** @class */ (function (_super) {\n __extends(InvalidConfigError, _super);\n function InvalidConfigError(message, exception) {\n return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;\n }\n return InvalidConfigError;\n}(IntlError));\nexport { InvalidConfigError };\nvar MissingDataError = /** @class */ (function (_super) {\n __extends(MissingDataError, _super);\n function MissingDataError(message, exception) {\n return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;\n }\n return MissingDataError;\n}(IntlError));\nexport { MissingDataError };\nvar IntlFormatError = /** @class */ (function (_super) {\n __extends(IntlFormatError, _super);\n function IntlFormatError(message, locale, exception) {\n var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, \"\".concat(message, \"\\nLocale: \").concat(locale, \"\\n\"), exception) || this;\n _this.locale = locale;\n return _this;\n }\n return IntlFormatError;\n}(IntlError));\nexport { IntlFormatError };\nvar MessageFormatError = /** @class */ (function (_super) {\n __extends(MessageFormatError, _super);\n function MessageFormatError(message, locale, descriptor, exception) {\n var _this = _super.call(this, \"\".concat(message, \"\\nMessageID: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, \"\\nDefault Message: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, \"\\nDescription: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, \"\\n\"), locale, exception) || this;\n _this.descriptor = descriptor;\n _this.locale = locale;\n return _this;\n }\n return MessageFormatError;\n}(IntlFormatError));\nexport { MessageFormatError };\nvar MissingTranslationError = /** @class */ (function (_super) {\n __extends(MissingTranslationError, _super);\n function MissingTranslationError(descriptor, locale) {\n var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, \"Missing message: \\\"\".concat(descriptor.id, \"\\\" for locale \\\"\").concat(locale, \"\\\", using \").concat(descriptor.defaultMessage\n ? \"default message (\".concat(typeof descriptor.defaultMessage === 'string'\n ? descriptor.defaultMessage\n : descriptor.defaultMessage\n .map(function (e) { var _a; return (_a = e.value) !== null && _a !== void 0 ? _a : JSON.stringify(e); })\n .join(), \")\")\n : 'id', \" as fallback.\")) || this;\n _this.descriptor = descriptor;\n return _this;\n }\n return MissingTranslationError;\n}(IntlError));\nexport { MissingTranslationError };\n","import { __assign, __spreadArray } from \"tslib\";\nimport { memoize, strategies } from '@formatjs/fast-memoize';\nimport { IntlMessageFormat } from 'intl-messageformat';\nimport { UnsupportedFormatterError } from './error';\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\nexport function filterProps(props, allowlist, defaults) {\n if (defaults === void 0) { defaults = {}; }\n return allowlist.reduce(function (filtered, name) {\n if (name in props) {\n filtered[name] = props[name];\n }\n else if (name in defaults) {\n filtered[name] = defaults[name];\n }\n return filtered;\n }, {});\n}\nvar defaultErrorHandler = function (error) {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.error(error);\n }\n};\nvar defaultWarnHandler = function (warning) {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n};\nexport var DEFAULT_INTL_CONFIG = {\n formats: {},\n messages: {},\n timeZone: undefined,\n defaultLocale: 'en',\n defaultFormats: {},\n fallbackOnEmptyString: true,\n onError: defaultErrorHandler,\n onWarn: defaultWarnHandler,\n};\nexport function createIntlCache() {\n return {\n dateTime: {},\n number: {},\n message: {},\n relativeTime: {},\n pluralRules: {},\n list: {},\n displayNames: {},\n };\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(cache) {\n if (cache === void 0) { cache = createIntlCache(); }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n var ListFormat = Intl.ListFormat;\n var DisplayNames = Intl.DisplayNames;\n var getDateTimeFormat = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n });\n var getNumberFormat = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n });\n var getPluralRules = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n });\n return {\n getDateTimeFormat: getDateTimeFormat,\n getNumberFormat: getNumberFormat,\n getMessageFormat: memoize(function (message, locales, overrideFormats, opts) {\n return new IntlMessageFormat(message, locales, overrideFormats, __assign({ formatters: {\n getNumberFormat: getNumberFormat,\n getDateTimeFormat: getDateTimeFormat,\n getPluralRules: getPluralRules,\n } }, (opts || {})));\n }, {\n cache: createFastMemoizeCache(cache.message),\n strategy: strategies.variadic,\n }),\n getRelativeTimeFormat: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.relativeTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: getPluralRules,\n getListFormat: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.list),\n strategy: strategies.variadic,\n }),\n getDisplayNames: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.displayNames),\n strategy: strategies.variadic,\n }),\n };\n}\nexport function getNamedFormat(formats, type, name, onError) {\n var formatType = formats && formats[type];\n var format;\n if (formatType) {\n format = formatType[name];\n }\n if (format) {\n return format;\n }\n onError(new UnsupportedFormatterError(\"No \".concat(type, \" format named: \").concat(name)));\n}\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG as CORE_DEFAULT_INTL_CONFIG } from '@formatjs/intl';\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\nexport function invariantIntlContext(intl) {\n invariant(intl, '[React Intl] Could not find required `intl` object. ' +\n ' needs to exist in the component ancestry.');\n}\nexport var DEFAULT_INTL_CONFIG = __assign(__assign({}, CORE_DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });\n/**\n * Takes a `formatXMLElementFn`, and composes it in function, which passes\n * argument `parts` through, assigning unique key to each part, to prevent\n * \"Each child in a list should have a unique \"key\"\" React error.\n * @param formatXMLElementFn\n */\nexport function assignUniqueKeysToParts(formatXMLElementFn) {\n return function (parts) {\n // eslint-disable-next-line prefer-rest-params\n return formatXMLElementFn(React.Children.toArray(parts));\n };\n}\nexport function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n if (!objA || !objB) {\n return false;\n }\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n if (bKeys.length !== len) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n if (objA[key] !== objB[key] ||\n !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n return true;\n}\n","import { __assign } from \"tslib\";\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { invariantIntlContext } from '../utils';\nfunction getDisplayName(Component) {\n return Component.displayName || Component.name || 'Component';\n}\n// This is primarily dealing with packaging systems where multiple copies of react-intl\n// might exist\nvar IntlContext = typeof window !== 'undefined' && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__\n ? window.__REACT_INTL_CONTEXT__ ||\n (window.__REACT_INTL_CONTEXT__ = React.createContext(null))\n : React.createContext(null);\nvar IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;\nexport var Provider = IntlProvider;\nexport var Context = IntlContext;\nexport default function injectIntl(WrappedComponent, options) {\n var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d;\n var WithIntl = function (props) { return (React.createElement(IntlConsumer, null, function (intl) {\n var _a;\n if (enforceContext) {\n invariantIntlContext(intl);\n }\n var intlProp = (_a = {}, _a[intlPropName] = intl, _a);\n return (React.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null })));\n })); };\n WithIntl.displayName = \"injectIntl(\".concat(getDisplayName(WrappedComponent), \")\");\n WithIntl.WrappedComponent = WrappedComponent;\n if (forwardRef) {\n return hoistNonReactStatics(\n // @ts-expect-error\n React.forwardRef(function (props, ref) { return (React.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent);\n }\n return hoistNonReactStatics(WithIntl, WrappedComponent);\n}\n","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport useIntl from './useIntl';\nvar DisplayName;\n(function (DisplayName) {\n DisplayName[\"formatDate\"] = \"FormattedDate\";\n DisplayName[\"formatTime\"] = \"FormattedTime\";\n DisplayName[\"formatNumber\"] = \"FormattedNumber\";\n DisplayName[\"formatList\"] = \"FormattedList\";\n // Note that this DisplayName is the locale display name, not to be confused with\n // the name of the enum, which is for React component display name in dev tools.\n DisplayName[\"formatDisplayName\"] = \"FormattedDisplayName\";\n})(DisplayName || (DisplayName = {}));\nvar DisplayNameParts;\n(function (DisplayNameParts) {\n DisplayNameParts[\"formatDate\"] = \"FormattedDateParts\";\n DisplayNameParts[\"formatTime\"] = \"FormattedTimeParts\";\n DisplayNameParts[\"formatNumber\"] = \"FormattedNumberParts\";\n DisplayNameParts[\"formatList\"] = \"FormattedListParts\";\n})(DisplayNameParts || (DisplayNameParts = {}));\nexport var FormattedNumberParts = function (props) {\n var intl = useIntl();\n var value = props.value, children = props.children, formatProps = __rest(props, [\"value\", \"children\"]);\n return children(intl.formatNumberToParts(value, formatProps));\n};\nFormattedNumberParts.displayName = 'FormattedNumberParts';\nexport var FormattedListParts = function (props) {\n var intl = useIntl();\n var value = props.value, children = props.children, formatProps = __rest(props, [\"value\", \"children\"]);\n return children(intl.formatListToParts(value, formatProps));\n};\nFormattedNumberParts.displayName = 'FormattedNumberParts';\nexport function createFormattedDateTimePartsComponent(name) {\n var ComponentParts = function (props) {\n var intl = useIntl();\n var value = props.value, children = props.children, formatProps = __rest(props, [\"value\", \"children\"]);\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n var formattedParts = name === 'formatDate'\n ? intl.formatDateToParts(date, formatProps)\n : intl.formatTimeToParts(date, formatProps);\n return children(formattedParts);\n };\n ComponentParts.displayName = DisplayNameParts[name];\n return ComponentParts;\n}\nexport function createFormattedComponent(name) {\n var Component = function (props) {\n var intl = useIntl();\n var value = props.value, children = props.children, formatProps = __rest(props\n // TODO: fix TS type definition for localeMatcher upstream\n , [\"value\", \"children\"]);\n // TODO: fix TS type definition for localeMatcher upstream\n var formattedValue = intl[name](value, formatProps);\n if (typeof children === 'function') {\n return children(formattedValue);\n }\n var Text = intl.textComponent || React.Fragment;\n return React.createElement(Text, null, formattedValue);\n };\n Component.displayName = DisplayName[name];\n return Component;\n}\n","import * as React from 'react';\nimport { invariantIntlContext } from '../utils';\nimport { Context } from './injectIntl';\nexport default function useIntl() {\n var intl = React.useContext(Context);\n invariantIntlContext(intl);\n return intl;\n}\n","import { __assign } from \"tslib\";\nimport { TYPE } from '@formatjs/icu-messageformat-parser';\nimport { IntlMessageFormat, } from 'intl-messageformat';\nimport { MessageFormatError, MissingTranslationError } from './error';\nimport { invariant } from './utils';\nfunction setTimeZoneInOptions(opts, timeZone) {\n return Object.keys(opts).reduce(function (all, k) {\n all[k] = __assign({ timeZone: timeZone }, opts[k]);\n return all;\n }, {});\n}\nfunction deepMergeOptions(opts1, opts2) {\n var keys = Object.keys(__assign(__assign({}, opts1), opts2));\n return keys.reduce(function (all, k) {\n all[k] = __assign(__assign({}, (opts1[k] || {})), (opts2[k] || {}));\n return all;\n }, {});\n}\nfunction deepMergeFormatsAndSetTimeZone(f1, timeZone) {\n if (!timeZone) {\n return f1;\n }\n var mfFormats = IntlMessageFormat.formats;\n return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });\n}\nexport var formatMessage = function (_a, state, messageDescriptor, values, opts) {\n var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, fallbackOnEmptyString = _a.fallbackOnEmptyString, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;\n if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }\n var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;\n // `id` is a required field of a Message Descriptor.\n invariant(!!msgId, \"[@formatjs/intl] An `id` must be provided to format a message. You can either:\\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\\nto autofix this issue\");\n var id = String(msgId);\n var message = \n // In case messages is Object.create(null)\n // e.g import('foo.json') from webpack)\n // See https://github.com/formatjs/formatjs/issues/1914\n messages &&\n Object.prototype.hasOwnProperty.call(messages, id) &&\n messages[id];\n // IMPORTANT: Hot path if `message` is AST with a single literal node\n if (Array.isArray(message) &&\n message.length === 1 &&\n message[0].type === TYPE.literal) {\n return message[0].value;\n }\n // IMPORTANT: Hot path straight lookup for performance\n if (!values &&\n message &&\n typeof message === 'string' &&\n !defaultRichTextElements) {\n return message.replace(/'\\{(.*?)\\}'/gi, \"{$1}\");\n }\n values = __assign(__assign({}, defaultRichTextElements), (values || {}));\n formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);\n defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);\n if (!message) {\n if (fallbackOnEmptyString === false && message === '') {\n return message;\n }\n if (!defaultMessage ||\n (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the for the\n // default locale.\n onError(new MissingTranslationError(messageDescriptor, locale));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting default message for: \\\"\".concat(id, \"\\\", rendering default message verbatim\"), locale, messageDescriptor, e));\n return typeof defaultMessage === 'string' ? defaultMessage : id;\n }\n }\n return id;\n }\n // We have the translated message\n try {\n var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, (opts || {})));\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting message: \\\"\".concat(id, \"\\\", using \").concat(defaultMessage ? 'default message' : 'id', \" as fallback.\"), locale, messageDescriptor, e));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting the default message for: \\\"\".concat(id, \"\\\", rendering message verbatim\"), locale, messageDescriptor, e));\n }\n }\n if (typeof message === 'string') {\n return message;\n }\n if (typeof defaultMessage === 'string') {\n return defaultMessage;\n }\n return id;\n};\n","import { __assign } from \"tslib\";\nimport { IntlFormatError } from './error';\nimport { filterProps, getNamedFormat } from './utils';\nvar DATE_TIME_FORMAT_OPTIONS = [\n 'formatMatcher',\n 'timeZone',\n 'hour12',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'hourCycle',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n // 'dayPeriod',\n 'numberingSystem',\n 'fractionalSecondDigits',\n];\nexport function getFormatter(_a, type, getDateTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);\n if (type === 'time' &&\n !filteredOptions.hour &&\n !filteredOptions.minute &&\n !filteredOptions.second &&\n !filteredOptions.timeStyle &&\n !filteredOptions.dateStyle) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = __assign(__assign({}, filteredOptions), { hour: 'numeric', minute: 'numeric' });\n }\n return getDateTimeFormat(locale, filteredOptions);\n}\nexport function formatDate(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date.', config.locale, e));\n }\n return String(date);\n}\nexport function formatTime(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting time.', config.locale, e));\n }\n return String(date);\n}\nexport function formatDateTimeRange(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var from = _a[0], to = _a[1], _b = _a[2], options = _b === void 0 ? {} : _b;\n var fromDate = typeof from === 'string' ? new Date(from || 0) : from;\n var toDate = typeof to === 'string' ? new Date(to || 0) : to;\n try {\n return getFormatter(config, 'dateTimeRange', getDateTimeFormat, options).formatRange(fromDate, toDate);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date time range.', config.locale, e));\n }\n return String(fromDate);\n}\nexport function formatDateToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date); // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date.', config.locale, e));\n }\n return [];\n}\nexport function formatTimeToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date); // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting time.', config.locale, e));\n }\n return [];\n}\n","import { filterProps } from './utils';\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nvar DISPLAY_NAMES_OPTONS = [\n 'style',\n 'type',\n 'fallback',\n 'languageDisplay',\n];\nexport function formatDisplayName(_a, getDisplayNames, value, options) {\n var locale = _a.locale, onError = _a.onError;\n var DisplayNames = Intl.DisplayNames;\n if (!DisplayNames) {\n onError(new FormatError(\"Intl.DisplayNames is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-displaynames\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);\n try {\n return getDisplayNames(locale, filteredOptions).of(value);\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting display name.', locale, e));\n }\n}\n","import { __assign } from \"tslib\";\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nimport { filterProps } from './utils';\nvar LIST_FORMAT_OPTIONS = [\n 'type',\n 'style',\n];\nvar now = Date.now();\nfunction generateToken(i) {\n return \"\".concat(now, \"_\").concat(i, \"_\").concat(now);\n}\nexport function formatList(opts, getListFormat, values, options) {\n if (options === void 0) { options = {}; }\n var results = formatListToParts(opts, getListFormat, values, options).reduce(function (all, el) {\n var val = el.value;\n if (typeof val !== 'string') {\n all.push(val);\n }\n else if (typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += val;\n }\n else {\n all.push(val);\n }\n return all;\n }, []);\n return results.length === 1 ? results[0] : results.length === 0 ? '' : results;\n}\nexport function formatListToParts(_a, getListFormat, values, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var ListFormat = Intl.ListFormat;\n if (!ListFormat) {\n onError(new FormatError(\"Intl.ListFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-listformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);\n try {\n var richValues_1 = {};\n var serializedValues = values.map(function (v, i) {\n if (typeof v === 'object') {\n var id = generateToken(i);\n richValues_1[id] = v;\n return id;\n }\n return String(v);\n });\n return getListFormat(locale, filteredOptions)\n .formatToParts(serializedValues)\n .map(function (part) {\n return (part.type === 'literal'\n ? part\n : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value }));\n });\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting list.', locale, e));\n }\n // @ts-ignore\n return values;\n}\n","import { IntlFormatError } from './error';\nimport { filterProps, getNamedFormat } from './utils';\nvar NUMBER_FORMAT_OPTIONS = [\n 'style',\n 'currency',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n // ES2020 NumberFormat\n 'compactDisplay',\n 'currencyDisplay',\n 'currencySign',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'numberingSystem',\n // ES2023 NumberFormat\n 'trailingZeroDisplay',\n 'roundingPriority',\n 'roundingIncrement',\n 'roundingMode',\n];\nexport function getFormatter(_a, getNumberFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = ((format &&\n getNamedFormat(formats, 'number', format, onError)) ||\n {});\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);\n return getNumberFormat(locale, filteredOptions);\n}\nexport function formatNumber(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).format(value);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting number.', config.locale, e));\n }\n return String(value);\n}\nexport function formatNumberToParts(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).formatToParts(value);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting number.', config.locale, e));\n }\n return [];\n}\n","import { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nimport { filterProps } from './utils';\nvar PLURAL_FORMAT_OPTIONS = ['type'];\nexport function formatPlural(_a, getPluralRules, value, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n if (!Intl.PluralRules) {\n onError(new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n try {\n return getPluralRules(locale, filteredOptions).select(value);\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting plural.', locale, e));\n }\n return 'other';\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nvar RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style'];\nfunction getFormatter(_a, getRelativeTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};\n var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);\n return getRelativeTimeFormat(locale, filteredOptions);\n}\nexport function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {\n if (options === void 0) { options = {}; }\n if (!unit) {\n unit = 'second';\n }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n if (!RelativeTimeFormat) {\n config.onError(new FormatError(\"Intl.RelativeTimeFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-relativetimeformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n try {\n return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));\n }\n return String(value);\n}\n","import { __assign } from \"tslib\";\nimport { formatDate, formatDateTimeRange, formatDateToParts, formatTime, formatTimeToParts, } from './dateTime';\nimport { formatDisplayName } from './displayName';\nimport { InvalidConfigError, MissingDataError } from './error';\nimport { formatList, formatListToParts } from './list';\nimport { formatMessage } from './message';\nimport { formatNumber, formatNumberToParts } from './number';\nimport { formatPlural } from './plural';\nimport { formatRelativeTime } from './relativeTime';\nimport { createFormatters, DEFAULT_INTL_CONFIG } from './utils';\nfunction messagesContainString(messages) {\n var firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined;\n return typeof firstMessage === 'string';\n}\nfunction verifyConfigMessages(config) {\n if (config.onWarn &&\n config.defaultRichTextElements &&\n messagesContainString(config.messages || {})) {\n config.onWarn(\"[@formatjs/intl] \\\"defaultRichTextElements\\\" was specified but \\\"message\\\" was not pre-compiled. \\nPlease consider using \\\"@formatjs/cli\\\" to pre-compile your messages for performance.\\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution\");\n }\n}\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl(config, cache) {\n var formatters = createFormatters(cache);\n var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);\n var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;\n if (!locale) {\n if (onError) {\n onError(new InvalidConfigError(\"\\\"locale\\\" was not configured, using \\\"\".concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details\")));\n }\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each contains a `defaultMessage` prop.\n resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';\n }\n else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.NumberFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details\")));\n }\n else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.DateTimeFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details\")));\n }\n verifyConfigMessages(resolvedConfig);\n return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), $t: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });\n}\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __assign, __rest, __spreadArray } from \"tslib\";\nimport { createIntl as coreCreateIntl, formatMessage as coreFormatMessage, } from '@formatjs/intl';\nimport { isFormatXMLElementFn, } from 'intl-messageformat';\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG, assignUniqueKeysToParts } from '../utils';\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = isFormatXMLElementFn(v)\n ? assignUniqueKeysToParts(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = coreFormatMessage.apply(void 0, __spreadArray([config,\n formatters,\n descriptor,\n values], rest, false));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport var createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = __rest(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = coreCreateIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n var resolvedConfig = {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n };\n return __assign(__assign({}, coreIntl), { formatMessage: formatMessage.bind(null, resolvedConfig, coreIntl.formatters), $t: formatMessage.bind(null, resolvedConfig, coreIntl.formatters) });\n};\n","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport useIntl from './useIntl';\nvar FormattedDateTimeRange = function (props) {\n var intl = useIntl();\n var from = props.from, to = props.to, children = props.children, formatProps = __rest(props, [\"from\", \"to\", \"children\"]);\n var formattedValue = intl.formatDateTimeRange(from, to, formatProps);\n if (typeof children === 'function') {\n return children(formattedValue);\n }\n var Text = intl.textComponent || React.Fragment;\n return React.createElement(Text, null, formattedValue);\n};\nFormattedDateTimeRange.displayName = 'FormattedDateTimeRange';\nexport default FormattedDateTimeRange;\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { shallowEqual } from '../utils';\nimport useIntl from './useIntl';\nfunction areEqual(prevProps, nextProps) {\n var values = prevProps.values, otherProps = __rest(prevProps, [\"values\"]);\n var nextValues = nextProps.values, nextOtherProps = __rest(nextProps, [\"values\"]);\n return (shallowEqual(nextValues, values) &&\n shallowEqual(otherProps, nextOtherProps));\n}\nfunction FormattedMessage(props) {\n var intl = useIntl();\n var formatMessage = intl.formatMessage, _a = intl.textComponent, Text = _a === void 0 ? React.Fragment : _a;\n var id = props.id, description = props.description, defaultMessage = props.defaultMessage, values = props.values, children = props.children, _b = props.tagName, Component = _b === void 0 ? Text : _b, ignoreTag = props.ignoreTag;\n var descriptor = { id: id, description: description, defaultMessage: defaultMessage };\n var nodes = formatMessage(descriptor, values, {\n ignoreTag: ignoreTag,\n });\n if (typeof children === 'function') {\n return children(Array.isArray(nodes) ? nodes : [nodes]);\n }\n if (Component) {\n return React.createElement(Component, null, React.Children.toArray(nodes));\n }\n return React.createElement(React.Fragment, null, nodes);\n}\nFormattedMessage.displayName = 'FormattedMessage';\nvar MemoizedFormattedMessage = React.memo(FormattedMessage, areEqual);\nMemoizedFormattedMessage.displayName = 'MemoizedFormattedMessage';\nexport default MemoizedFormattedMessage;\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport * as React from 'react';\nimport useIntl from './useIntl';\nvar FormattedPlural = function (props) {\n var _a = useIntl(), formatPlural = _a.formatPlural, Text = _a.textComponent;\n var value = props.value, other = props.other, children = props.children;\n var pluralCategory = formatPlural(value, props);\n var formattedPlural = props[pluralCategory] || other;\n if (typeof children === 'function') {\n return children(formattedPlural);\n }\n if (Text) {\n return React.createElement(Text, null, formattedPlural);\n }\n // Work around @types/react where React.FC cannot return string\n return formattedPlural;\n};\nFormattedPlural.displayName = 'FormattedPlural';\nexport default FormattedPlural;\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __extends } from \"tslib\";\nimport { createIntlCache } from '@formatjs/intl';\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG, invariantIntlContext, shallowEqual, } from '../utils';\nimport { createIntl } from './createIntl';\nimport { Provider } from './injectIntl';\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n fallbackOnEmptyString: config.fallbackOnEmptyString,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n onWarn: config.onWarn,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nvar IntlProvider = /** @class */ (function (_super) {\n __extends(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = createIntlCache();\n _this.state = {\n cache: _this.cache,\n intl: createIntl(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!shallowEqual(prevConfig, config)) {\n return {\n intl: createIntl(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n invariantIntlContext(this.state.intl);\n return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexport default IntlProvider;\n","import { __assign, __rest } from \"tslib\";\n/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport * as React from 'react';\nimport { invariant } from '../utils';\nimport useIntl from './useIntl';\nvar MINUTE = 60;\nvar HOUR = 60 * 60;\nvar DAY = 60 * 60 * 24;\nfunction selectUnit(seconds) {\n var absValue = Math.abs(seconds);\n if (absValue < MINUTE) {\n return 'second';\n }\n if (absValue < HOUR) {\n return 'minute';\n }\n if (absValue < DAY) {\n return 'hour';\n }\n return 'day';\n}\nfunction getDurationInSeconds(unit) {\n switch (unit) {\n case 'second':\n return 1;\n case 'minute':\n return MINUTE;\n case 'hour':\n return HOUR;\n default:\n return DAY;\n }\n}\nfunction valueToSeconds(value, unit) {\n if (!value) {\n return 0;\n }\n switch (unit) {\n case 'second':\n return value;\n case 'minute':\n return value * MINUTE;\n default:\n return value * HOUR;\n }\n}\nvar INCREMENTABLE_UNITS = [\n 'second',\n 'minute',\n 'hour',\n];\nfunction canIncrement(unit) {\n if (unit === void 0) { unit = 'second'; }\n return INCREMENTABLE_UNITS.indexOf(unit) > -1;\n}\nvar SimpleFormattedRelativeTime = function (props) {\n var _a = useIntl(), formatRelativeTime = _a.formatRelativeTime, Text = _a.textComponent;\n var children = props.children, value = props.value, unit = props.unit, otherProps = __rest(props, [\"children\", \"value\", \"unit\"]);\n var formattedRelativeTime = formatRelativeTime(value || 0, unit, otherProps);\n if (typeof children === 'function') {\n return children(formattedRelativeTime);\n }\n if (Text) {\n return React.createElement(Text, null, formattedRelativeTime);\n }\n return React.createElement(React.Fragment, null, formattedRelativeTime);\n};\nvar FormattedRelativeTime = function (_a) {\n var _b = _a.value, value = _b === void 0 ? 0 : _b, _c = _a.unit, unit = _c === void 0 ? 'second' : _c, updateIntervalInSeconds = _a.updateIntervalInSeconds, otherProps = __rest(_a, [\"value\", \"unit\", \"updateIntervalInSeconds\"]);\n invariant(!updateIntervalInSeconds ||\n !!(updateIntervalInSeconds && canIncrement(unit)), 'Cannot schedule update with unit longer than hour');\n var _d = React.useState(), prevUnit = _d[0], setPrevUnit = _d[1];\n var _e = React.useState(0), prevValue = _e[0], setPrevValue = _e[1];\n var _f = React.useState(0), currentValueInSeconds = _f[0], setCurrentValueInSeconds = _f[1];\n var updateTimer;\n if (unit !== prevUnit || value !== prevValue) {\n setPrevValue(value || 0);\n setPrevUnit(unit);\n setCurrentValueInSeconds(canIncrement(unit) ? valueToSeconds(value, unit) : 0);\n }\n React.useEffect(function () {\n function clearUpdateTimer() {\n clearTimeout(updateTimer);\n }\n clearUpdateTimer();\n // If there's no interval and we cannot increment this unit, do nothing\n if (!updateIntervalInSeconds || !canIncrement(unit)) {\n return clearUpdateTimer;\n }\n // Figure out the next interesting time\n var nextValueInSeconds = currentValueInSeconds - updateIntervalInSeconds;\n var nextUnit = selectUnit(nextValueInSeconds);\n // We've reached the max auto incrementable unit, don't schedule another update\n if (nextUnit === 'day') {\n return clearUpdateTimer;\n }\n var unitDuration = getDurationInSeconds(nextUnit);\n var remainder = nextValueInSeconds % unitDuration;\n var prevInterestingValueInSeconds = nextValueInSeconds - remainder;\n var nextInterestingValueInSeconds = prevInterestingValueInSeconds >= currentValueInSeconds\n ? prevInterestingValueInSeconds - unitDuration\n : prevInterestingValueInSeconds;\n var delayInSeconds = Math.abs(nextInterestingValueInSeconds - currentValueInSeconds);\n if (currentValueInSeconds !== nextInterestingValueInSeconds) {\n updateTimer = setTimeout(function () { return setCurrentValueInSeconds(nextInterestingValueInSeconds); }, delayInSeconds * 1e3);\n }\n return clearUpdateTimer;\n }, [currentValueInSeconds, updateIntervalInSeconds, unit]);\n var currentValue = value || 0;\n var currentUnit = unit;\n if (canIncrement(unit) &&\n typeof currentValueInSeconds === 'number' &&\n updateIntervalInSeconds) {\n currentUnit = selectUnit(currentValueInSeconds);\n var unitDuration = getDurationInSeconds(currentUnit);\n currentValue = Math.round(currentValueInSeconds / unitDuration);\n }\n return (React.createElement(SimpleFormattedRelativeTime, __assign({ value: currentValue, unit: currentUnit }, otherProps)));\n};\nFormattedRelativeTime.displayName = 'FormattedRelativeTime';\nexport default FormattedRelativeTime;\n","import { createFormattedComponent, createFormattedDateTimePartsComponent, } from './src/components/createFormattedComponent';\nimport { createIntl } from './src/components/createIntl';\nimport FormattedDateTimeRange from './src/components/dateTimeRange';\nimport injectIntl, { Context as IntlContext, Provider as RawIntlProvider, } from './src/components/injectIntl';\nimport FormattedMessage from './src/components/message';\nimport FormattedPlural from './src/components/plural';\nimport IntlProvider from './src/components/provider';\nimport FormattedRelativeTime from './src/components/relative';\nimport useIntl from './src/components/useIntl';\nexport { createIntlCache, InvalidConfigError, MessageFormatError, MissingDataError, MissingTranslationError, IntlError as ReactIntlError, IntlErrorCode as ReactIntlErrorCode, UnsupportedFormatterError, } from '@formatjs/intl';\nexport { createIntl, FormattedDateTimeRange, FormattedMessage, FormattedPlural, FormattedRelativeTime, injectIntl, IntlContext, IntlProvider, RawIntlProvider, useIntl, };\nexport function defineMessages(msgs) {\n return msgs;\n}\nexport function defineMessage(msg) {\n return msg;\n}\n// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`\nexport var FormattedDate = createFormattedComponent('formatDate');\nexport var FormattedTime = createFormattedComponent('formatTime');\nexport var FormattedNumber = createFormattedComponent('formatNumber');\nexport var FormattedList = createFormattedComponent('formatList');\nexport var FormattedDisplayName = createFormattedComponent('formatDisplayName');\nexport var FormattedDateParts = createFormattedDateTimePartsComponent('formatDate');\nexport var FormattedTimeParts = createFormattedDateTimePartsComponent('formatTime');\nexport { FormattedListParts, FormattedNumberParts, } from './src/components/createFormattedComponent';\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst valueOf = Symbol.prototype.valueOf;\nconst typeOf = require('kind-of');\n\nfunction clone(val, deep) {\n switch (typeOf(val)) {\n case 'array':\n return val.slice();\n case 'object':\n return Object.assign({}, val);\n case 'date':\n return new val.constructor(Number(val));\n case 'map':\n return new Map(val);\n case 'set':\n return new Set(val);\n case 'buffer':\n return cloneBuffer(val);\n case 'symbol':\n return cloneSymbol(val);\n case 'arraybuffer':\n return cloneArrayBuffer(val);\n case 'float32array':\n case 'float64array':\n case 'int16array':\n case 'int32array':\n case 'int8array':\n case 'uint16array':\n case 'uint32array':\n case 'uint8clampedarray':\n case 'uint8array':\n return cloneTypedArray(val);\n case 'regexp':\n return cloneRegExp(val);\n case 'error':\n return Object.create(val);\n default: {\n return val;\n }\n }\n}\n\nfunction cloneRegExp(val) {\n const flags = val.flags !== void 0 ? val.flags : (/\\w+$/.exec(val) || void 0);\n const re = new val.constructor(val.source, flags);\n re.lastIndex = val.lastIndex;\n return re;\n}\n\nfunction cloneArrayBuffer(val) {\n const res = new val.constructor(val.byteLength);\n new Uint8Array(res).set(new Uint8Array(val));\n return res;\n}\n\nfunction cloneTypedArray(val, deep) {\n return new val.constructor(val.buffer, val.byteOffset, val.length);\n}\n\nfunction cloneBuffer(val) {\n const len = val.length;\n const buf = Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : Buffer.from(len);\n val.copy(buf);\n return buf;\n}\n\nfunction cloneSymbol(val) {\n return valueOf ? Object(valueOf.call(val)) : {};\n}\n\n/**\n * Expose `clone`\n */\n\nmodule.exports = clone;\n","'use client';\nvar React = require('react');\nvar revalidateEvents = require('./events.js');\nvar lite = require('dequal/lite');\n\nfunction _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n.default = e;\n return n;\n}\n\nvar React__default = /*#__PURE__*/_interopDefault(React);\nvar revalidateEvents__namespace = /*#__PURE__*/_interopNamespace(revalidateEvents);\n\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\n\nconst EMPTY_CACHE = {};\nconst INITIAL_CACHE = {};\nconst STR_UNDEFINED = 'undefined';\n// NOTE: Use the function to guarantee it's re-evaluated between jsdom and node runtime for tests.\nconst isWindowDefined = typeof window != STR_UNDEFINED;\nconst isDocumentDefined = typeof document != STR_UNDEFINED;\nconst isLegacyDeno = isWindowDefined && 'Deno' in window;\nconst hasRequestAnimationFrame = ()=>isWindowDefined && typeof window['requestAnimationFrame'] != STR_UNDEFINED;\nconst createCacheHelper = (cache, key)=>{\n const state = SWRGlobalState.get(cache);\n return [\n // Getter\n ()=>!isUndefined(key) && cache.get(key) || EMPTY_CACHE,\n // Setter\n (info)=>{\n if (!isUndefined(key)) {\n const prev = cache.get(key);\n // Before writing to the store, we keep the value in the initial cache\n // if it's not there yet.\n if (!(key in INITIAL_CACHE)) {\n INITIAL_CACHE[key] = prev;\n }\n state[5](key, mergeObjects(prev, info), prev || EMPTY_CACHE);\n }\n },\n // Subscriber\n state[6],\n // Get server cache snapshot\n ()=>{\n if (!isUndefined(key)) {\n // If the cache was updated on the client, we return the stored initial value.\n if (key in INITIAL_CACHE) return INITIAL_CACHE[key];\n }\n // If we haven't done any client-side updates, we return the current value.\n return !isUndefined(key) && cache.get(key) || EMPTY_CACHE;\n }\n ];\n} // export { UNDEFINED, OBJECT, isUndefined, isFunction, mergeObjects, isPromiseLike }\n;\n\n/**\n * Due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,\n * it's not reliable to detect if the browser is currently online or offline\n * based on `navigator.onLine`.\n * As a workaround, we always assume it's online on the first load, and change\n * the status upon `online` or `offline` events.\n */ let online = true;\nconst isOnline = ()=>online;\n// For node and React Native, `add/removeEventListener` doesn't exist on window.\nconst [onWindowEvent, offWindowEvent] = isWindowDefined && window.addEventListener ? [\n window.addEventListener.bind(window),\n window.removeEventListener.bind(window)\n] : [\n noop,\n noop\n];\nconst isVisible = ()=>{\n const visibilityState = isDocumentDefined && document.visibilityState;\n return isUndefined(visibilityState) || visibilityState !== 'hidden';\n};\nconst initFocus = (callback)=>{\n // focus revalidate\n if (isDocumentDefined) {\n document.addEventListener('visibilitychange', callback);\n }\n onWindowEvent('focus', callback);\n return ()=>{\n if (isDocumentDefined) {\n document.removeEventListener('visibilitychange', callback);\n }\n offWindowEvent('focus', callback);\n };\n};\nconst initReconnect = (callback)=>{\n // revalidate on reconnected\n const onOnline = ()=>{\n online = true;\n callback();\n };\n // nothing to revalidate, just update the status\n const onOffline = ()=>{\n online = false;\n };\n onWindowEvent('online', onOnline);\n onWindowEvent('offline', onOffline);\n return ()=>{\n offWindowEvent('online', onOnline);\n offWindowEvent('offline', onOffline);\n };\n};\nconst preset = {\n isOnline,\n isVisible\n};\nconst defaultConfigOptions = {\n initFocus,\n initReconnect\n};\n\nconst IS_REACT_LEGACY = !React__default.default.useId;\nconst IS_SERVER = !isWindowDefined || isLegacyDeno;\n// Polyfill requestAnimationFrame\nconst rAF = (f)=>hasRequestAnimationFrame() ? window['requestAnimationFrame'](f) : setTimeout(f, 1);\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nconst useIsomorphicLayoutEffect = IS_SERVER ? React.useEffect : React.useLayoutEffect;\n// This assignment is to extend the Navigator type to use effectiveType.\nconst navigatorConnection = typeof navigator !== 'undefined' && navigator.connection;\n// Adjust the config based on slow connection status (<= 70Kbps).\nconst slowConnection = !IS_SERVER && navigatorConnection && ([\n 'slow-2g',\n '2g'\n].includes(navigatorConnection.effectiveType) || navigatorConnection.saveData);\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst isObjectType = (value, type)=>OBJECT.prototype.toString.call(value) === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const isDate = isObjectType(arg, 'Date');\n const isRegex = isObjectType(arg, 'RegExp');\n const isPlainObject = isObjectType(arg, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\n// Global timestamp.\nlet __timestamp = 0;\nconst getTimestamp = ()=>++__timestamp;\n\nasync function internalMutate(...args) {\n const [cache, _key, _data, _opts] = args;\n // When passing as a boolean, it's explicitly used to disable/enable\n // revalidation.\n const options = mergeObjects({\n populateCache: true,\n throwOnError: true\n }, typeof _opts === 'boolean' ? {\n revalidate: _opts\n } : _opts || {});\n let populateCache = options.populateCache;\n const rollbackOnErrorOption = options.rollbackOnError;\n let optimisticData = options.optimisticData;\n const rollbackOnError = (error)=>{\n return typeof rollbackOnErrorOption === 'function' ? rollbackOnErrorOption(error) : rollbackOnErrorOption !== false;\n };\n const throwOnError = options.throwOnError;\n // If the second argument is a key filter, return the mutation results for all\n // filtered keys.\n if (isFunction(_key)) {\n const keyFilter = _key;\n const matchedKeys = [];\n const it = cache.keys();\n for (const key of it){\n if (// Skip the special useSWRInfinite and useSWRSubscription keys.\n !/^\\$(inf|sub)\\$/.test(key) && keyFilter(cache.get(key)._k)) {\n matchedKeys.push(key);\n }\n }\n return Promise.all(matchedKeys.map(mutateByKey));\n }\n return mutateByKey(_key);\n async function mutateByKey(_k) {\n // Serialize key\n const [key] = serialize(_k);\n if (!key) return;\n const [get, set] = createCacheHelper(cache, key);\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n const startRevalidate = ()=>{\n const revalidators = EVENT_REVALIDATORS[key];\n const revalidate = isFunction(options.revalidate) ? options.revalidate(get().data, _k) : options.revalidate !== false;\n if (revalidate) {\n // Invalidate the key by deleting the concurrent request markers so new\n // requests will not be deduped.\n delete FETCH[key];\n delete PRELOAD[key];\n if (revalidators && revalidators[0]) {\n return revalidators[0](revalidateEvents__namespace.MUTATE_EVENT).then(()=>get().data);\n }\n }\n return get().data;\n };\n // If there is no new data provided, revalidate the key with current state.\n if (args.length < 3) {\n // Revalidate and broadcast state.\n return startRevalidate();\n }\n let data = _data;\n let error;\n // Update global timestamps.\n const beforeMutationTs = getTimestamp();\n MUTATION[key] = [\n beforeMutationTs,\n 0\n ];\n const hasOptimisticData = !isUndefined(optimisticData);\n const state = get();\n // `displayedData` is the current value on screen. It could be the optimistic value\n // that is going to be overridden by a `committedData`, or get reverted back.\n // `committedData` is the validated value that comes from a fetch or mutation.\n const displayedData = state.data;\n const currentData = state._c;\n const committedData = isUndefined(currentData) ? displayedData : currentData;\n // Do optimistic data update.\n if (hasOptimisticData) {\n optimisticData = isFunction(optimisticData) ? optimisticData(committedData, displayedData) : optimisticData;\n // When we set optimistic data, backup the current committedData data in `_c`.\n set({\n data: optimisticData,\n _c: committedData\n });\n }\n if (isFunction(data)) {\n // `data` is a function, call it passing current cache value.\n try {\n data = data(committedData);\n } catch (err) {\n // If it throws an error synchronously, we shouldn't update the cache.\n error = err;\n }\n }\n // `data` is a promise/thenable, resolve the final data first.\n if (data && isPromiseLike(data)) {\n // This means that the mutation is async, we need to check timestamps to\n // avoid race conditions.\n data = await data.catch((err)=>{\n error = err;\n });\n // Check if other mutations have occurred since we've started this mutation.\n // If there's a race we don't update cache or broadcast the change,\n // just return the data.\n if (beforeMutationTs !== MUTATION[key][0]) {\n if (error) throw error;\n return data;\n } else if (error && hasOptimisticData && rollbackOnError(error)) {\n // Rollback. Always populate the cache in this case but without\n // transforming the data.\n populateCache = true;\n // Reset data to be the latest committed data, and clear the `_c` value.\n set({\n data: committedData,\n _c: UNDEFINED\n });\n }\n }\n // If we should write back the cache after request.\n if (populateCache) {\n if (!error) {\n // Transform the result into data.\n if (isFunction(populateCache)) {\n const populateCachedData = populateCache(data, committedData);\n set({\n data: populateCachedData,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n } else {\n // Only update cached data and reset the error if there's no error. Data can be `undefined` here.\n set({\n data,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n }\n }\n }\n // Reset the timestamp to mark the mutation has ended.\n MUTATION[key][1] = getTimestamp();\n // Update existing SWR Hooks' internal states:\n Promise.resolve(startRevalidate()).then(()=>{\n // The mutation and revalidation are ended, we can clear it since the data is\n // not an optimistic value anymore.\n set({\n _c: UNDEFINED\n });\n });\n // Throw error or return data\n if (error) {\n if (throwOnError) throw error;\n return;\n }\n return data;\n }\n}\n\nconst revalidateAllKeys = (revalidators, type)=>{\n for(const key in revalidators){\n if (revalidators[key][0]) revalidators[key][0](type);\n }\n};\nconst initCache = (provider, options)=>{\n // The global state for a specific provider will be used to deduplicate\n // requests and store listeners. As well as a mutate function that is bound to\n // the cache.\n // The provider's global state might be already initialized. Let's try to get the\n // global state associated with the provider first.\n if (!SWRGlobalState.has(provider)) {\n const opts = mergeObjects(defaultConfigOptions, options);\n // If there's no global state bound to the provider, create a new one with the\n // new mutate function.\n const EVENT_REVALIDATORS = Object.create(null);\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = Object.create(null);\n const subscribe = (key, callback)=>{\n const subs = subscriptions[key] || [];\n subscriptions[key] = subs;\n subs.push(callback);\n return ()=>subs.splice(subs.indexOf(callback), 1);\n };\n const setter = (key, value, prev)=>{\n provider.set(key, value);\n const subs = subscriptions[key];\n if (subs) {\n for (const fn of subs){\n fn(value, prev);\n }\n }\n };\n const initProvider = ()=>{\n if (!SWRGlobalState.has(provider)) {\n // Update the state if it's new, or if the provider has been extended.\n SWRGlobalState.set(provider, [\n EVENT_REVALIDATORS,\n Object.create(null),\n Object.create(null),\n Object.create(null),\n mutate,\n setter,\n subscribe\n ]);\n if (!IS_SERVER) {\n // When listening to the native events for auto revalidations,\n // we intentionally put a delay (setTimeout) here to make sure they are\n // fired after immediate JavaScript executions, which can be\n // React's state updates.\n // This avoids some unnecessary revalidations such as\n // https://github.com/vercel/swr/issues/1680.\n const releaseFocus = opts.initFocus(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents__namespace.FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents__namespace.RECONNECT_EVENT)));\n unmount = ()=>{\n releaseFocus && releaseFocus();\n releaseReconnect && releaseReconnect();\n // When un-mounting, we need to remove the cache provider from the state\n // storage too because it's a side-effect. Otherwise, when re-mounting we\n // will not re-register those event listeners.\n SWRGlobalState.delete(provider);\n };\n }\n }\n };\n initProvider();\n // This is a new provider, we need to initialize it and setup DOM events\n // listeners for `focus` and `reconnect` actions.\n // We might want to inject an extra layer on top of `provider` in the future,\n // such as key serialization, auto GC, etc.\n // For now, it's just a `Map` interface without any modifications.\n return [\n provider,\n mutate,\n initProvider,\n unmount\n ];\n }\n return [\n provider,\n SWRGlobalState.get(provider)[4]\n ];\n};\n\n// error retry\nconst onErrorRetry = (_, __, config, revalidate, opts)=>{\n const maxRetryCount = config.errorRetryCount;\n const currentRetryCount = opts.retryCount;\n // Exponential backoff\n const timeout = ~~((Math.random() + 0.5) * (1 << (currentRetryCount < 8 ? currentRetryCount : 8))) * config.errorRetryInterval;\n if (!isUndefined(maxRetryCount) && currentRetryCount > maxRetryCount) {\n return;\n }\n setTimeout(revalidate, timeout, opts);\n};\nconst compare = lite.dequal;\n// Default cache provider\nconst [cache, mutate] = initCache(new Map());\n// Default config\nconst defaultConfig = mergeObjects({\n // events\n onLoadingSlow: noop,\n onSuccess: noop,\n onError: noop,\n onErrorRetry,\n onDiscarded: noop,\n // switches\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n revalidateIfStale: true,\n shouldRetryOnError: true,\n // timeouts\n errorRetryInterval: slowConnection ? 10000 : 5000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: slowConnection ? 5000 : 3000,\n // providers\n compare,\n isPaused: ()=>false,\n cache,\n mutate,\n fallback: {}\n}, // use web preset by default\npreset);\n\nconst mergeConfigs = (a, b)=>{\n // Need to create a new object to avoid mutating the original here.\n const v = mergeObjects(a, b);\n // If two configs are provided, merge their `use` and `fallback` options.\n if (b) {\n const { use: u1, fallback: f1 } = a;\n const { use: u2, fallback: f2 } = b;\n if (u1 && u2) {\n v.use = u1.concat(u2);\n }\n if (f1 && f2) {\n v.fallback = mergeObjects(f1, f2);\n }\n }\n return v;\n};\n\nconst SWRConfigContext = React.createContext({});\nconst SWRConfig = (props)=>{\n const { value } = props;\n const parentConfig = React.useContext(SWRConfigContext);\n const isFunctionalConfig = isFunction(value);\n const config = React.useMemo(()=>isFunctionalConfig ? value(parentConfig) : value, [\n isFunctionalConfig,\n parentConfig,\n value\n ]);\n // Extend parent context values and middleware.\n const extendedConfig = React.useMemo(()=>isFunctionalConfig ? config : mergeConfigs(parentConfig, config), [\n isFunctionalConfig,\n parentConfig,\n config\n ]);\n // Should not use the inherited provider.\n const provider = config && config.provider;\n // initialize the cache only on first access.\n const cacheContextRef = React.useRef(UNDEFINED);\n if (provider && !cacheContextRef.current) {\n cacheContextRef.current = initCache(provider(extendedConfig.cache || cache), config);\n }\n const cacheContext = cacheContextRef.current;\n // Override the cache if a new provider is given.\n if (cacheContext) {\n extendedConfig.cache = cacheContext[0];\n extendedConfig.mutate = cacheContext[1];\n }\n // Unsubscribe events.\n useIsomorphicLayoutEffect(()=>{\n if (cacheContext) {\n cacheContext[2] && cacheContext[2]();\n return cacheContext[3];\n }\n }, []);\n return React.createElement(SWRConfigContext.Provider, mergeObjects(props, {\n value: extendedConfig\n }));\n};\n\nexports.IS_REACT_LEGACY = IS_REACT_LEGACY;\nexports.IS_SERVER = IS_SERVER;\nexports.OBJECT = OBJECT;\nexports.SWRConfig = SWRConfig;\nexports.SWRConfigContext = SWRConfigContext;\nexports.SWRGlobalState = SWRGlobalState;\nexports.UNDEFINED = UNDEFINED;\nexports.cache = cache;\nexports.compare = compare;\nexports.createCacheHelper = createCacheHelper;\nexports.defaultConfig = defaultConfig;\nexports.defaultConfigOptions = defaultConfigOptions;\nexports.getTimestamp = getTimestamp;\nexports.hasRequestAnimationFrame = hasRequestAnimationFrame;\nexports.initCache = initCache;\nexports.internalMutate = internalMutate;\nexports.isDocumentDefined = isDocumentDefined;\nexports.isFunction = isFunction;\nexports.isLegacyDeno = isLegacyDeno;\nexports.isPromiseLike = isPromiseLike;\nexports.isUndefined = isUndefined;\nexports.isWindowDefined = isWindowDefined;\nexports.mergeConfigs = mergeConfigs;\nexports.mergeObjects = mergeObjects;\nexports.mutate = mutate;\nexports.noop = noop;\nexports.preset = preset;\nexports.rAF = rAF;\nexports.serialize = serialize;\nexports.slowConnection = slowConnection;\nexports.stableHash = stableHash;\nexports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst INFINITE_PREFIX = '$inf$';\n\nexports.INFINITE_PREFIX = INFINITE_PREFIX;\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nconst FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nexports.ERROR_REVALIDATE_EVENT = ERROR_REVALIDATE_EVENT;\nexports.FOCUS_EVENT = FOCUS_EVENT;\nexports.MUTATE_EVENT = MUTATE_EVENT;\nexports.RECONNECT_EVENT = RECONNECT_EVENT;\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nvar configContextClient = require('./config-context-client-BXAm5QZy.js');\nvar revalidateEvents = require('./events.js');\nvar constants_js = require('./constants.js');\nvar React = require('react');\nvar types_js = require('./types.js');\n\nfunction _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n.default = e;\n return n;\n}\n\nvar revalidateEvents__namespace = /*#__PURE__*/_interopNamespace(revalidateEvents);\nvar React__default = /*#__PURE__*/_interopDefault(React);\n\n// @ts-expect-error\nconst enableDevtools = configContextClient.isWindowDefined && window.__SWR_DEVTOOLS_USE__;\nconst use = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];\nconst setupDevTools = ()=>{\n if (enableDevtools) {\n // @ts-expect-error\n window.__SWR_DEVTOOLS_REACT__ = React__default.default;\n }\n};\n\nconst normalize = (args)=>{\n return configContextClient.isFunction(args[1]) ? [\n args[0],\n args[1],\n args[2] || {}\n ] : [\n args[0],\n null,\n (args[1] === null ? args[2] : args[1]) || {}\n ];\n};\n\nconst useSWRConfig = ()=>{\n return configContextClient.mergeObjects(configContextClient.defaultConfig, React.useContext(configContextClient.SWRConfigContext));\n};\n\nconst preload = (key_, fetcher)=>{\n const [key, fnArg] = configContextClient.serialize(key_);\n const [, , , PRELOAD] = configContextClient.SWRGlobalState.get(configContextClient.cache);\n // Prevent preload to be called multiple times before used.\n if (PRELOAD[key]) return PRELOAD[key];\n const req = fetcher(fnArg);\n PRELOAD[key] = req;\n return req;\n};\nconst middleware = (useSWRNext)=>(key_, fetcher_, config)=>{\n // fetcher might be a sync function, so this should not be an async function\n const fetcher = fetcher_ && ((...args)=>{\n const [key] = configContextClient.serialize(key_);\n const [, , , PRELOAD] = configContextClient.SWRGlobalState.get(configContextClient.cache);\n if (key.startsWith(constants_js.INFINITE_PREFIX)) {\n // we want the infinite fetcher to be called.\n // handling of the PRELOAD cache happens there.\n return fetcher_(...args);\n }\n const req = PRELOAD[key];\n if (configContextClient.isUndefined(req)) return fetcher_(...args);\n delete PRELOAD[key];\n return req;\n });\n return useSWRNext(key_, fetcher, config);\n };\n\nconst BUILT_IN_MIDDLEWARE = use.concat(middleware);\n\n// It's tricky to pass generic types as parameters, so we just directly override\n// the types here.\nconst withArgs = (hook)=>{\n return function useSWRArgs(...args) {\n // Get the default and inherited configuration.\n const fallbackConfig = useSWRConfig();\n // Normalize arguments.\n const [key, fn, _config] = normalize(args);\n // Merge configurations.\n const config = configContextClient.mergeConfigs(fallbackConfig, _config);\n // Apply middleware\n let next = hook;\n const { use } = config;\n const middleware = (use || []).concat(BUILT_IN_MIDDLEWARE);\n for(let i = middleware.length; i--;){\n next = middleware[i](next);\n }\n return next(key, fn || config.fetcher || null, config);\n };\n};\n\n// Add a callback function to a list of keyed callback functions and return\n// the unsubscribe function.\nconst subscribeCallback = (key, callbacks, callback)=>{\n const keyedRevalidators = callbacks[key] || (callbacks[key] = []);\n keyedRevalidators.push(callback);\n return ()=>{\n const index = keyedRevalidators.indexOf(callback);\n if (index >= 0) {\n // O(1): faster than splice\n keyedRevalidators[index] = keyedRevalidators[keyedRevalidators.length - 1];\n keyedRevalidators.pop();\n }\n };\n};\n\n// Create a custom hook with a middleware\nconst withMiddleware = (useSWR, middleware)=>{\n return (...args)=>{\n const [key, fn, config] = normalize(args);\n const uses = (config.use || []).concat(middleware);\n return useSWR(key, fn, {\n ...config,\n use: uses\n });\n };\n};\n\nsetupDevTools();\n\nexports.IS_REACT_LEGACY = configContextClient.IS_REACT_LEGACY;\nexports.IS_SERVER = configContextClient.IS_SERVER;\nexports.OBJECT = configContextClient.OBJECT;\nexports.SWRConfig = configContextClient.SWRConfig;\nexports.SWRGlobalState = configContextClient.SWRGlobalState;\nexports.UNDEFINED = configContextClient.UNDEFINED;\nexports.cache = configContextClient.cache;\nexports.compare = configContextClient.compare;\nexports.createCacheHelper = configContextClient.createCacheHelper;\nexports.defaultConfig = configContextClient.defaultConfig;\nexports.defaultConfigOptions = configContextClient.defaultConfigOptions;\nexports.getTimestamp = configContextClient.getTimestamp;\nexports.hasRequestAnimationFrame = configContextClient.hasRequestAnimationFrame;\nexports.initCache = configContextClient.initCache;\nexports.internalMutate = configContextClient.internalMutate;\nexports.isDocumentDefined = configContextClient.isDocumentDefined;\nexports.isFunction = configContextClient.isFunction;\nexports.isLegacyDeno = configContextClient.isLegacyDeno;\nexports.isPromiseLike = configContextClient.isPromiseLike;\nexports.isUndefined = configContextClient.isUndefined;\nexports.isWindowDefined = configContextClient.isWindowDefined;\nexports.mergeConfigs = configContextClient.mergeConfigs;\nexports.mergeObjects = configContextClient.mergeObjects;\nexports.mutate = configContextClient.mutate;\nexports.noop = configContextClient.noop;\nexports.preset = configContextClient.preset;\nexports.rAF = configContextClient.rAF;\nexports.serialize = configContextClient.serialize;\nexports.slowConnection = configContextClient.slowConnection;\nexports.stableHash = configContextClient.stableHash;\nexports.useIsomorphicLayoutEffect = configContextClient.useIsomorphicLayoutEffect;\nexports.revalidateEvents = revalidateEvents__namespace;\nObject.defineProperty(exports, \"INFINITE_PREFIX\", {\n enumerable: true,\n get: function () { return constants_js.INFINITE_PREFIX; }\n});\nexports.normalize = normalize;\nexports.preload = preload;\nexports.subscribeCallback = subscribeCallback;\nexports.useSWRConfig = useSWRConfig;\nexports.withArgs = withArgs;\nexports.withMiddleware = withMiddleware;\nObject.keys(types_js).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {\n enumerable: true,\n get: function () { return types_js[k]; }\n });\n});\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nvar React = require('react');\nvar index_js$1 = require('use-sync-external-store/shim/index.js');\nvar index_js = require('../_internal/index.js');\n\nfunction _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }\n\nvar React__default = /*#__PURE__*/_interopDefault(React);\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst isObjectType = (value, type)=>OBJECT.prototype.toString.call(value) === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const isDate = isObjectType(arg, 'Date');\n const isRegex = isObjectType(arg, 'RegExp');\n const isPlainObject = isObjectType(arg, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\nconst unstable_serialize = (key)=>serialize(key)[0];\n\n/// \nconst use = React__default.default.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax\n// and emitting an error.\n// We assume that this is only for the `use(thenable)` case, not `use(context)`.\n// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45\n((thenable)=>{\n switch(thenable.status){\n case 'pending':\n throw thenable;\n case 'fulfilled':\n return thenable.value;\n case 'rejected':\n throw thenable.reason;\n default:\n thenable.status = 'pending';\n thenable.then((v)=>{\n thenable.status = 'fulfilled';\n thenable.value = v;\n }, (e)=>{\n thenable.status = 'rejected';\n thenable.reason = e;\n });\n throw thenable;\n }\n});\nconst WITH_DEDUPE = {\n dedupe: true\n};\nconst useSWRHandler = (_key, fetcher, config)=>{\n const { cache, compare, suspense, fallbackData, revalidateOnMount, revalidateIfStale, refreshInterval, refreshWhenHidden, refreshWhenOffline, keepPreviousData } = config;\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = index_js.SWRGlobalState.get(cache);\n // `key` is the identifier of the SWR internal state,\n // `fnArg` is the argument/arguments parsed from the key, which will be passed\n // to the fetcher.\n // All of them are derived from `_key`.\n const [key, fnArg] = index_js.serialize(_key);\n // If it's the initial render of this hook.\n const initialMountedRef = React.useRef(false);\n // If the hook is unmounted already. This will be used to prevent some effects\n // to be called after unmounting.\n const unmountedRef = React.useRef(false);\n // Refs to keep the key and config.\n const keyRef = React.useRef(key);\n const fetcherRef = React.useRef(fetcher);\n const configRef = React.useRef(config);\n const getConfig = ()=>configRef.current;\n const isActive = ()=>getConfig().isVisible() && getConfig().isOnline();\n const [getCache, setCache, subscribeCache, getInitialCache] = index_js.createCacheHelper(cache, key);\n const stateDependencies = React.useRef({}).current;\n // Resolve the fallback data from either the inline option, or the global provider.\n // If it's a promise, we simply let React suspend and resolve it for us.\n const fallback = index_js.isUndefined(fallbackData) ? index_js.isUndefined(config.fallback) ? index_js.UNDEFINED : config.fallback[key] : fallbackData;\n const isEqual = (prev, current)=>{\n for(const _ in stateDependencies){\n const t = _;\n if (t === 'data') {\n if (!compare(prev[t], current[t])) {\n if (!index_js.isUndefined(prev[t])) {\n return false;\n }\n if (!compare(returnedData, current[t])) {\n return false;\n }\n }\n } else {\n if (current[t] !== prev[t]) {\n return false;\n }\n }\n }\n return true;\n };\n const getSnapshot = React.useMemo(()=>{\n const shouldStartRequest = (()=>{\n if (!key) return false;\n if (!fetcher) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (!index_js.isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n return revalidateIfStale !== false;\n })();\n // Get the cache and merge it with expected states.\n const getSelectedCache = (state)=>{\n // We only select the needed fields from the state.\n const snapshot = index_js.mergeObjects(state);\n delete snapshot._k;\n if (!shouldStartRequest) {\n return snapshot;\n }\n return {\n isValidating: true,\n isLoading: true,\n ...snapshot\n };\n };\n const cachedData = getCache();\n const initialData = getInitialCache();\n const clientSnapshot = getSelectedCache(cachedData);\n const serverSnapshot = cachedData === initialData ? clientSnapshot : getSelectedCache(initialData);\n // To make sure that we are returning the same object reference to avoid\n // unnecessary re-renders, we keep the previous snapshot and use deep\n // comparison to check if we need to return a new one.\n let memorizedSnapshot = clientSnapshot;\n return [\n ()=>{\n const newSnapshot = getSelectedCache(getCache());\n const compareResult = isEqual(newSnapshot, memorizedSnapshot);\n if (compareResult) {\n // Mentally, we should always return the `memorizedSnapshot` here\n // as there's no change between the new and old snapshots.\n // However, since the `isEqual` function only compares selected fields,\n // the values of the unselected fields might be changed. That's\n // simply because we didn't track them.\n // To support the case in https://github.com/vercel/swr/pull/2576,\n // we need to update these fields in the `memorizedSnapshot` too\n // with direct mutations to ensure the snapshot is always up-to-date\n // even for the unselected fields, but only trigger re-renders when\n // the selected fields are changed.\n memorizedSnapshot.data = newSnapshot.data;\n memorizedSnapshot.isLoading = newSnapshot.isLoading;\n memorizedSnapshot.isValidating = newSnapshot.isValidating;\n memorizedSnapshot.error = newSnapshot.error;\n return memorizedSnapshot;\n } else {\n memorizedSnapshot = newSnapshot;\n return newSnapshot;\n }\n },\n ()=>serverSnapshot\n ];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cache,\n key\n ]);\n // Get the current state that SWR should return.\n const cached = index_js$1.useSyncExternalStore(React.useCallback((callback)=>subscribeCache(key, (current, prev)=>{\n if (!isEqual(prev, current)) callback();\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n cache,\n key\n ]), getSnapshot[0], getSnapshot[1]);\n const isInitialMount = !initialMountedRef.current;\n const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;\n const cachedData = cached.data;\n const data = index_js.isUndefined(cachedData) ? fallback && index_js.isPromiseLike(fallback) ? use(fallback) : fallback : cachedData;\n const error = cached.error;\n // Use a ref to store previously returned data. Use the initial data as its initial value.\n const laggyDataRef = React.useRef(data);\n const returnedData = keepPreviousData ? index_js.isUndefined(cachedData) ? index_js.isUndefined(laggyDataRef.current) ? data : laggyDataRef.current : cachedData : data;\n // - Suspense mode and there's stale data for the initial render.\n // - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.\n // - `revalidateIfStale` is enabled but `data` is not defined.\n const shouldDoInitialRevalidation = (()=>{\n // if a key already has revalidators and also has error, we should not trigger revalidation\n if (hasRevalidator && !index_js.isUndefined(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !index_js.isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n // Under suspense mode, it will always fetch on render if there is no\n // stale data so no need to revalidate immediately mount it again.\n // If data exists, only revalidate if `revalidateIfStale` is true.\n if (suspense) return index_js.isUndefined(data) ? false : revalidateIfStale;\n // If there is no stale data, we need to revalidate when mount;\n // If `revalidateIfStale` is set to true, we will always revalidate.\n return index_js.isUndefined(data) || revalidateIfStale;\n })();\n // Resolve the default validating state:\n // If it's able to validate, and it should revalidate when mount, this will be true.\n const defaultValidatingState = !!(key && fetcher && isInitialMount && shouldDoInitialRevalidation);\n const isValidating = index_js.isUndefined(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = index_js.isUndefined(cached.isLoading) ? defaultValidatingState : cached.isLoading;\n // The revalidation function is a carefully crafted wrapper of the original\n // `fetcher`, to correctly handle the many edge cases.\n const revalidate = React.useCallback(async (revalidateOpts)=>{\n const currentFetcher = fetcherRef.current;\n if (!key || !currentFetcher || unmountedRef.current || getConfig().isPaused()) {\n return false;\n }\n let newData;\n let startAt;\n let loading = true;\n const opts = revalidateOpts || {};\n // If there is no ongoing concurrent request, or `dedupe` is not set, a\n // new request should be initiated.\n const shouldStartNewRequest = !FETCH[key] || !opts.dedupe;\n /*\n For React 17\n Do unmount check for calls:\n If key has changed during the revalidation, or the component has been\n unmounted, old dispatch and old event callbacks should not take any\n effect\n\n For React 18\n only check if key has changed\n https://github.com/reactwg/react-18/discussions/82\n */ const callbackSafeguard = ()=>{\n if (index_js.IS_REACT_LEGACY) {\n return !unmountedRef.current && key === keyRef.current && initialMountedRef.current;\n }\n return key === keyRef.current;\n };\n // The final state object when the request finishes.\n const finalState = {\n isValidating: false,\n isLoading: false\n };\n const finishRequestAndUpdateState = ()=>{\n setCache(finalState);\n };\n const cleanupState = ()=>{\n // Check if it's still the same request before deleting it.\n const requestInfo = FETCH[key];\n if (requestInfo && requestInfo[1] === startAt) {\n delete FETCH[key];\n }\n };\n // Start fetching. Change the `isValidating` state, update the cache.\n const initialState = {\n isValidating: true\n };\n // It is in the `isLoading` state, if and only if there is no cached data.\n // This bypasses fallback data and laggy data.\n if (index_js.isUndefined(getCache().data)) {\n initialState.isLoading = true;\n }\n try {\n if (shouldStartNewRequest) {\n setCache(initialState);\n // If no cache is being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && index_js.isUndefined(getCache().data)) {\n setTimeout(()=>{\n if (loading && callbackSafeguard()) {\n getConfig().onLoadingSlow(key, config);\n }\n }, config.loadingTimeout);\n }\n // Start the request and save the timestamp.\n // Key must be truthy if entering here.\n FETCH[key] = [\n currentFetcher(fnArg),\n index_js.getTimestamp()\n ];\n }\n // Wait until the ongoing request is done. Deduplication is also\n // considered here.\n ;\n [newData, startAt] = FETCH[key];\n newData = await newData;\n if (shouldStartNewRequest) {\n // If the request isn't interrupted, clean it up after the\n // deduplication interval.\n setTimeout(cleanupState, config.dedupingInterval);\n }\n // If there're other ongoing request(s), started after the current one,\n // we need to ignore the current one to avoid possible race conditions:\n // req1------------------>res1 (current one)\n // req2---------------->res2\n // the request that fired later will always be kept.\n // The timestamp maybe be `undefined` or a number\n if (!FETCH[key] || FETCH[key][1] !== startAt) {\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Clear error.\n finalState.error = index_js.UNDEFINED;\n // If there're other mutations(s), that overlapped with the current revalidation:\n // case 1:\n // req------------------>res\n // mutate------>end\n // case 2:\n // req------------>res\n // mutate------>end\n // case 3:\n // req------------------>res\n // mutate-------...---------->\n // we have to ignore the revalidation result (res) because it's no longer fresh.\n // meanwhile, a new revalidation should be triggered when the mutation ends.\n const mutationInfo = MUTATION[key];\n if (!index_js.isUndefined(mutationInfo) && // case 1\n (startAt <= mutationInfo[0] || // case 2\n startAt <= mutationInfo[1] || // case 3\n mutationInfo[1] === 0)) {\n finishRequestAndUpdateState();\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Deep compare with the latest state to avoid extra re-renders.\n // For local state, compare and assign.\n const cacheData = getCache().data;\n // Since the compare fn could be custom fn\n // cacheData might be different from newData even when compare fn returns True\n finalState.data = compare(cacheData, newData) ? cacheData : newData;\n // Trigger the successful callback if it's the original request.\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onSuccess(newData, key, config);\n }\n }\n } catch (err) {\n cleanupState();\n const currentConfig = getConfig();\n const { shouldRetryOnError } = currentConfig;\n // Not paused, we continue handling the error. Otherwise, discard it.\n if (!currentConfig.isPaused()) {\n // Get a new error, don't use deep comparison for errors.\n finalState.error = err;\n // Error event and retry logic. Only for the actual request, not\n // deduped ones.\n if (shouldStartNewRequest && callbackSafeguard()) {\n currentConfig.onError(err, key, currentConfig);\n if (shouldRetryOnError === true || index_js.isFunction(shouldRetryOnError) && shouldRetryOnError(err)) {\n if (!getConfig().revalidateOnFocus || !getConfig().revalidateOnReconnect || isActive()) {\n // If it's inactive, stop. It will auto-revalidate when\n // refocusing or reconnecting.\n // When retrying, deduplication is always enabled.\n currentConfig.onErrorRetry(err, key, currentConfig, (_opts)=>{\n const revalidators = EVENT_REVALIDATORS[key];\n if (revalidators && revalidators[0]) {\n revalidators[0](index_js.revalidateEvents.ERROR_REVALIDATE_EVENT, _opts);\n }\n }, {\n retryCount: (opts.retryCount || 0) + 1,\n dedupe: true\n });\n }\n }\n }\n }\n }\n // Mark loading as stopped.\n loading = false;\n // Update the current hook's state.\n finishRequestAndUpdateState();\n return true;\n }, // `setState` is immutable, and `eventsCallback`, `fnArg`, and\n // `keyValidating` are depending on `key`, so we can exclude them from\n // the deps array.\n //\n // FIXME:\n // `fn` and `config` might be changed during the lifecycle,\n // but they might be changed every render like this.\n // `useSWR('key', () => fetch('/api/'), { suspense: true })`\n // So we omit the values from the deps array\n // even though it might cause unexpected behaviors.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n key,\n cache\n ]);\n // Similar to the global mutate but bound to the current cache and key.\n // `cache` isn't allowed to change during the lifecycle.\n const boundMutate = React.useCallback(// Use callback to make sure `keyRef.current` returns latest result every time\n (...args)=>{\n return index_js.internalMutate(cache, keyRef.current, ...args);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // The logic for updating refs.\n index_js.useIsomorphicLayoutEffect(()=>{\n fetcherRef.current = fetcher;\n configRef.current = config;\n // Handle laggy data updates. If there's cached data of the current key,\n // it'll be the correct reference.\n if (!index_js.isUndefined(cachedData)) {\n laggyDataRef.current = cachedData;\n }\n });\n // After mounted or key changed.\n index_js.useIsomorphicLayoutEffect(()=>{\n if (!key) return;\n const softRevalidate = revalidate.bind(index_js.UNDEFINED, WITH_DEDUPE);\n let nextFocusRevalidatedAt = 0;\n if (getConfig().revalidateOnFocus) {\n const initNow = Date.now();\n nextFocusRevalidatedAt = initNow + getConfig().focusThrottleInterval;\n }\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n const onRevalidate = (type, opts = {})=>{\n if (type == index_js.revalidateEvents.FOCUS_EVENT) {\n const now = Date.now();\n if (getConfig().revalidateOnFocus && now > nextFocusRevalidatedAt && isActive()) {\n nextFocusRevalidatedAt = now + getConfig().focusThrottleInterval;\n softRevalidate();\n }\n } else if (type == index_js.revalidateEvents.RECONNECT_EVENT) {\n if (getConfig().revalidateOnReconnect && isActive()) {\n softRevalidate();\n }\n } else if (type == index_js.revalidateEvents.MUTATE_EVENT) {\n return revalidate();\n } else if (type == index_js.revalidateEvents.ERROR_REVALIDATE_EVENT) {\n return revalidate(opts);\n }\n return;\n };\n const unsubEvents = index_js.subscribeCallback(key, EVENT_REVALIDATORS, onRevalidate);\n // Mark the component as mounted and update corresponding refs.\n unmountedRef.current = false;\n keyRef.current = key;\n initialMountedRef.current = true;\n // Keep the original key in the cache.\n setCache({\n _k: fnArg\n });\n // Trigger a revalidation\n if (shouldDoInitialRevalidation) {\n if (index_js.isUndefined(data) || index_js.IS_SERVER) {\n // Revalidate immediately.\n softRevalidate();\n } else {\n // Delay the revalidate if we have data to return so we won't block\n // rendering.\n index_js.rAF(softRevalidate);\n }\n }\n return ()=>{\n // Mark it as unmounted.\n unmountedRef.current = true;\n unsubEvents();\n };\n }, [\n key\n ]);\n // Polling\n index_js.useIsomorphicLayoutEffect(()=>{\n let timer;\n function next() {\n // Use the passed interval\n // ...or invoke the function with the updated data to get the interval\n const interval = index_js.isFunction(refreshInterval) ? refreshInterval(getCache().data) : refreshInterval;\n // We only start the next interval if `refreshInterval` is not 0, and:\n // - `force` is true, which is the start of polling\n // - or `timer` is not 0, which means the effect wasn't canceled\n if (interval && timer !== -1) {\n timer = setTimeout(execute, interval);\n }\n }\n function execute() {\n // Check if it's OK to execute:\n // Only revalidate when the page is visible, online, and not errored.\n if (!getCache().error && (refreshWhenHidden || getConfig().isVisible()) && (refreshWhenOffline || getConfig().isOnline())) {\n revalidate(WITH_DEDUPE).then(next);\n } else {\n // Schedule the next interval to check again.\n next();\n }\n }\n next();\n return ()=>{\n if (timer) {\n clearTimeout(timer);\n timer = -1;\n }\n };\n }, [\n refreshInterval,\n refreshWhenHidden,\n refreshWhenOffline,\n key\n ]);\n // Display debug info in React DevTools.\n React.useDebugValue(returnedData);\n // In Suspense mode, we can't return the empty `data` state.\n // If there is an `error`, the `error` needs to be thrown to the error boundary.\n // If there is no `error`, the `revalidation` promise needs to be thrown to\n // the suspense boundary.\n if (suspense && index_js.isUndefined(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any fallback data. This causes hydration errors. See:\n // https://github.com/vercel/swr/issues/1832\n if (!index_js.IS_REACT_LEGACY && index_js.IS_SERVER) {\n throw new Error('Fallback data is required when using Suspense in SSR.');\n }\n // Always update fetcher and config refs even with the Suspense mode.\n fetcherRef.current = fetcher;\n configRef.current = config;\n unmountedRef.current = false;\n const req = PRELOAD[key];\n if (!index_js.isUndefined(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (index_js.isUndefined(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!index_js.isUndefined(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n const swrResponse = {\n mutate: boundMutate,\n get data () {\n stateDependencies.data = true;\n return returnedData;\n },\n get error () {\n stateDependencies.error = true;\n return error;\n },\n get isValidating () {\n stateDependencies.isValidating = true;\n return isValidating;\n },\n get isLoading () {\n stateDependencies.isLoading = true;\n return isLoading;\n }\n };\n return swrResponse;\n};\nconst SWRConfig = index_js.OBJECT.defineProperty(index_js.SWRConfig, 'defaultValue', {\n value: index_js.defaultConfig\n});\n/**\n * A hook to fetch data.\n *\n * @link https://swr.vercel.app\n * @example\n * ```jsx\n * import useSWR from 'swr'\n * function Profile() {\n * const { data, error, isLoading } = useSWR('/api/user', fetcher)\n * if (error) return failed to load
\n * if (isLoading) return loading...
\n * return hello {data.name}!
\n * }\n * ```\n */ const useSWR = index_js.withArgs(useSWRHandler);\n\n// useSWR\n\nObject.defineProperty(exports, \"mutate\", {\n enumerable: true,\n get: function () { return index_js.mutate; }\n});\nObject.defineProperty(exports, \"preload\", {\n enumerable: true,\n get: function () { return index_js.preload; }\n});\nObject.defineProperty(exports, \"useSWRConfig\", {\n enumerable: true,\n get: function () { return index_js.useSWRConfig; }\n});\nexports.SWRConfig = SWRConfig;\nexports.default = useSWR;\nexports.unstable_serialize = unstable_serialize;\n","Object.defineProperty(exports, '__esModule', { value: true });\n\nvar React = require('react');\nvar useSWR = require('../index/index.js');\nvar index_js = require('../_internal/index.js');\n\nfunction _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }\n\nvar React__default = /*#__PURE__*/_interopDefault(React);\nvar useSWR__default = /*#__PURE__*/_interopDefault(useSWR);\n\nconst startTransition = index_js.IS_REACT_LEGACY ? (cb)=>{\n cb();\n} : React__default.default.startTransition;\n/**\n * An implementation of state with dependency-tracking.\n * @param initialState - The initial state object.\n */ const useStateWithDeps = (initialState)=>{\n const [, rerender] = React.useState({});\n const unmountedRef = React.useRef(false);\n const stateRef = React.useRef(initialState);\n // If a state property (data, error, or isValidating) is accessed by the render\n // function, we mark the property as a dependency so if it is updated again\n // in the future, we trigger a rerender.\n // This is also known as dependency-tracking.\n const stateDependenciesRef = React.useRef({\n data: false,\n error: false,\n isValidating: false\n });\n /**\n * Updates state and triggers re-render if necessary.\n * @param payload To change stateRef, pass the values explicitly to setState:\n * @example\n * ```js\n * setState({\n * isValidating: false\n * data: newData // set data to newData\n * error: undefined // set error to undefined\n * })\n *\n * setState({\n * isValidating: false\n * data: undefined // set data to undefined\n * error: err // set error to err\n * })\n * ```\n */ const setState = React.useCallback((payload)=>{\n let shouldRerender = false;\n const currentState = stateRef.current;\n for(const key in payload){\n if (Object.prototype.hasOwnProperty.call(payload, key)) {\n const k = key;\n // If the property has changed, update the state and mark rerender as\n // needed.\n if (currentState[k] !== payload[k]) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n currentState[k] = payload[k];\n // If the property is accessed by the component, a rerender should be\n // triggered.\n if (stateDependenciesRef.current[k]) {\n shouldRerender = true;\n }\n }\n }\n }\n if (shouldRerender && !unmountedRef.current) {\n rerender({});\n }\n }, []);\n index_js.useIsomorphicLayoutEffect(()=>{\n unmountedRef.current = false;\n return ()=>{\n unmountedRef.current = true;\n };\n });\n return [\n stateRef,\n stateDependenciesRef.current,\n setState\n ];\n};\n\nconst mutation = ()=>(key, fetcher, config = {})=>{\n const { mutate } = useSWR.useSWRConfig();\n const keyRef = React.useRef(key);\n const fetcherRef = React.useRef(fetcher);\n const configRef = React.useRef(config);\n // Ditch all mutation results that happened earlier than this timestamp.\n const ditchMutationsUntilRef = React.useRef(0);\n const [stateRef, stateDependencies, setState] = useStateWithDeps({\n data: index_js.UNDEFINED,\n error: index_js.UNDEFINED,\n isMutating: false\n });\n const currentState = stateRef.current;\n const trigger = React.useCallback(async (arg, opts)=>{\n const [serializedKey, resolvedKey] = index_js.serialize(keyRef.current);\n if (!fetcherRef.current) {\n throw new Error('Can’t trigger the mutation: missing fetcher.');\n }\n if (!serializedKey) {\n throw new Error('Can’t trigger the mutation: missing key.');\n }\n // Disable cache population by default.\n const options = index_js.mergeObjects(index_js.mergeObjects({\n populateCache: false,\n throwOnError: true\n }, configRef.current), opts);\n // Trigger a mutation, and also track the timestamp. Any mutation that happened\n // earlier this timestamp should be ignored.\n const mutationStartedAt = index_js.getTimestamp();\n ditchMutationsUntilRef.current = mutationStartedAt;\n setState({\n isMutating: true\n });\n try {\n const data = await mutate(serializedKey, fetcherRef.current(resolvedKey, {\n arg\n }), // We must throw the error here so we can catch and update the states.\n index_js.mergeObjects(options, {\n throwOnError: true\n }));\n // If it's reset after the mutation, we don't broadcast any state change.\n if (ditchMutationsUntilRef.current <= mutationStartedAt) {\n startTransition(()=>setState({\n data,\n isMutating: false,\n error: undefined\n }));\n options.onSuccess == null ? void 0 : options.onSuccess.call(options, data, serializedKey, options);\n }\n return data;\n } catch (error) {\n // If it's reset after the mutation, we don't broadcast any state change\n // or throw because it's discarded.\n if (ditchMutationsUntilRef.current <= mutationStartedAt) {\n startTransition(()=>setState({\n error: error,\n isMutating: false\n }));\n options.onError == null ? undefined : options.onError.call(options, error, serializedKey, options);\n if (options.throwOnError) {\n throw error;\n }\n }\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n const reset = React.useCallback(()=>{\n ditchMutationsUntilRef.current = index_js.getTimestamp();\n setState({\n data: index_js.UNDEFINED,\n error: index_js.UNDEFINED,\n isMutating: false\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n index_js.useIsomorphicLayoutEffect(()=>{\n keyRef.current = key;\n fetcherRef.current = fetcher;\n configRef.current = config;\n });\n // We don't return `mutate` here as it can be pretty confusing (e.g. people\n // calling `mutate` but they actually mean `trigger`).\n // And also, `mutate` relies on the useSWR hook to exist too.\n return {\n trigger,\n reset,\n get data () {\n stateDependencies.data = true;\n return currentState.data;\n },\n get error () {\n stateDependencies.error = true;\n return currentState.error;\n },\n get isMutating () {\n stateDependencies.isMutating = true;\n return currentState.isMutating;\n }\n };\n };\n/**\n * A hook to define and manually trigger remote mutations like POST, PUT, DELETE and PATCH use cases.\n *\n * @link https://swr.vercel.app/docs/mutation\n * @example\n * ```jsx\n * import useSWRMutation from 'swr/mutation'\n *\n * const {\n * data,\n * error,\n * trigger,\n * reset,\n * isMutating\n * } = useSWRMutation(key, fetcher, options?)\n * ```\n */ const useSWRMutation = index_js.withMiddleware(useSWR__default.default, mutation);\n\nexports.default = useSWRMutation;\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\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\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;\nconst util_1 = require(\"./helpers/util\");\nexports.ZodIssueCode = util_1.util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexports.quotelessJson = quotelessJson;\nclass ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util_1.util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nexports.ZodError = ZodError;\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = void 0;\nconst en_1 = __importDefault(require(\"./locales/en\"));\nexports.defaultErrorMap = en_1.default;\nlet overrideErrorMap = en_1.default;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nexports.setErrorMap = setErrorMap;\nfunction getErrorMap() {\n return overrideErrorMap;\n}\nexports.getErrorMap = getErrorMap;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./helpers/parseUtil\"), exports);\n__exportStar(require(\"./helpers/typeAliases\"), exports);\n__exportStar(require(\"./helpers/util\"), exports);\n__exportStar(require(\"./types\"), exports);\n__exportStar(require(\"./ZodError\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.errorUtil = void 0;\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (exports.errorUtil = errorUtil = {}));\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;\nconst errors_1 = require(\"../errors\");\nconst en_1 = __importDefault(require(\"../locales/en\"));\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexports.makeIssue = makeIssue;\nexports.EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const overrideMap = (0, errors_1.getErrorMap)();\n const issue = (0, exports.makeIssue)({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap, // contextual error map is first priority\n ctx.schemaErrorMap, // then schema-bound map if available\n overrideMap, // then global override map\n overrideMap === en_1.default ? undefined : en_1.default, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexports.addIssueToContext = addIssueToContext;\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return exports.INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return exports.INVALID;\n if (value.status === \"aborted\")\n return exports.INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexports.ParseStatus = ParseStatus;\nexports.INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nexports.DIRTY = DIRTY;\nconst OK = (value) => ({ status: \"valid\", value });\nexports.OK = OK;\nconst isAborted = (x) => x.status === \"aborted\";\nexports.isAborted = isAborted;\nconst isDirty = (x) => x.status === \"dirty\";\nexports.isDirty = isDirty;\nconst isValid = (x) => x.status === \"valid\";\nexports.isValid = isValid;\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\nexports.isAsync = isAsync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;\nvar util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (exports.util = util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (exports.objectUtil = objectUtil = {}));\nexports.ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return exports.ZodParsedType.undefined;\n case \"string\":\n return exports.ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;\n case \"boolean\":\n return exports.ZodParsedType.boolean;\n case \"function\":\n return exports.ZodParsedType.function;\n case \"bigint\":\n return exports.ZodParsedType.bigint;\n case \"symbol\":\n return exports.ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return exports.ZodParsedType.array;\n }\n if (data === null) {\n return exports.ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return exports.ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return exports.ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return exports.ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return exports.ZodParsedType.date;\n }\n return exports.ZodParsedType.object;\n default:\n return exports.ZodParsedType.unknown;\n }\n};\nexports.getParsedType = getParsedType;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.z = void 0;\nconst z = __importStar(require(\"./external\"));\nexports.z = z;\n__exportStar(require(\"./external\"), exports);\nexports.default = z;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_1 = require(\"../helpers/util\");\nconst ZodError_1 = require(\"../ZodError\");\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodError_1.ZodIssueCode.invalid_type:\n if (issue.received === util_1.ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodError_1.ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util_1.util.jsonStringifyReplacer)}`;\n break;\n case ZodError_1.ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util_1.util.joinValues(issue.options)}`;\n break;\n case ZodError_1.ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util_1.util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodError_1.ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodError_1.ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodError_1.ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodError_1.ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util_1.util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodError_1.ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodError_1.ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodError_1.ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodError_1.ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodError_1.ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util_1.util.assertNever(issue);\n }\n return { message };\n};\nexports.default = errorMap;\n","\"use strict\";\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (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};\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (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};\nvar _ZodEnum_cache, _ZodNativeEnum_cache;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.custom = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.datetimeRegex = exports.ZodType = void 0;\nexports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = exports.discriminatedUnion = exports.date = void 0;\nconst errors_1 = require(\"./errors\");\nconst errorUtil_1 = require(\"./helpers/errorUtil\");\nconst parseUtil_1 = require(\"./helpers/parseUtil\");\nconst util_1 = require(\"./helpers/util\");\nconst ZodError_1 = require(\"./ZodError\");\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if ((0, parseUtil_1.isValid)(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError_1.ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n var _a, _b;\n const { message } = params;\n if (iss.code === \"invalid_enum_value\") {\n return { message: message !== null && message !== void 0 ? message : ctx.defaultError };\n }\n if (typeof ctx.data === \"undefined\") {\n return { message: (_a = message !== null && message !== void 0 ? message : required_error) !== null && _a !== void 0 ? _a : ctx.defaultError };\n }\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n return { message: (_b = message !== null && message !== void 0 ? message : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return (0, util_1.getParsedType)(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new parseUtil_1.ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: (0, util_1.getParsedType)(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if ((0, parseUtil_1.isAsync)(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n \"~validate\"(data) {\n var _a, _b;\n const ctx = {\n common: {\n issues: [],\n async: !!this[\"~standard\"].async,\n },\n path: [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n if (!this[\"~standard\"].async) {\n try {\n const result = this._parseSync({ data, path: [], parent: ctx });\n return (0, parseUtil_1.isValid)(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n };\n }\n catch (err) {\n if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(\"encountered\")) {\n this[\"~standard\"].async = true;\n }\n ctx.common = {\n issues: [],\n async: true,\n };\n }\n }\n return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_1.isValid)(result)\n ? {\n value: result.value,\n }\n : {\n issues: ctx.common.issues,\n });\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: (0, util_1.getParsedType)(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await ((0, parseUtil_1.isAsync)(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodError_1.ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n this[\"~standard\"] = {\n version: 1,\n vendor: \"zod\",\n validate: (data) => this[\"~validate\"](data),\n };\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nexports.ZodType = ZodType;\nexports.Schema = ZodType;\nexports.ZodSchema = ZodType;\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\nconst durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nconst ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/(3[0-2]|[12]?[0-9])$/;\n// const ipv6Regex =\n// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\nconst ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\nconst ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// https://base64.guru/standards/base64url\nconst base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n // let regex = `\\\\d{2}:\\\\d{2}:\\\\d{2}`;\n let regex = `([01]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d`;\n if (args.precision) {\n regex = `${regex}\\\\.\\\\d{${args.precision}}`;\n }\n else if (args.precision == null) {\n regex = `${regex}(\\\\.\\\\d+)?`;\n }\n return regex;\n}\nfunction timeRegex(args) {\n return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nfunction datetimeRegex(args) {\n let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n const opts = [];\n opts.push(args.local ? `Z?` : `Z`);\n if (args.offset)\n opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n regex = `${regex}(${opts.join(\"|\")})`;\n return new RegExp(`^${regex}$`);\n}\nexports.datetimeRegex = datetimeRegex;\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nfunction isValidJWT(jwt, alg) {\n if (!jwtRegex.test(jwt))\n return false;\n try {\n const [header] = jwt.split(\".\");\n // Convert base64url to base64\n const base64 = header\n .replace(/-/g, \"+\")\n .replace(/_/g, \"/\")\n .padEnd(header.length + ((4 - (header.length % 4)) % 4), \"=\");\n const decoded = JSON.parse(atob(base64));\n if (typeof decoded !== \"object\" || decoded === null)\n return false;\n if (!decoded.typ || !decoded.alg)\n return false;\n if (alg && decoded.alg !== alg)\n return false;\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nfunction isValidCidr(ip, version) {\n if ((version === \"v4\" || !version) && ipv4CidrRegex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6CidrRegex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.string,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"email\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"emoji\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"uuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"nanoid\") {\n if (!nanoidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"nanoid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cuid2\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ulid\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"url\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"regex\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"date\") {\n const regex = dateRegex;\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"date\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"time\") {\n const regex = timeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_string,\n validation: \"time\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"duration\") {\n if (!durationRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"duration\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"ip\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"jwt\") {\n if (!isValidJWT(input.data, check.alg)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"jwt\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cidr\") {\n if (!isValidCidr(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"cidr\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64\") {\n if (!base64Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"base64\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"base64url\") {\n if (!base64urlRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n validation: \"base64url\",\n code: ZodError_1.ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodError_1.ZodIssueCode.invalid_string,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n nanoid(message) {\n return this._addCheck({ kind: \"nanoid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n base64(message) {\n return this._addCheck({ kind: \"base64\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n base64url(message) {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return this._addCheck({\n kind: \"base64url\",\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n jwt(options) {\n return this._addCheck({ kind: \"jwt\", ...errorUtil_1.errorUtil.errToObj(options) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil_1.errorUtil.errToObj(options) });\n }\n cidr(options) {\n return this._addCheck({ kind: \"cidr\", ...errorUtil_1.errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a, _b;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n local: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n date(message) {\n return this._addCheck({ kind: \"date\", message });\n }\n time(options) {\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"time\",\n precision: null,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"time\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n duration(message) {\n return this._addCheck({ kind: \"duration\", ...errorUtil_1.errorUtil.errToObj(message) });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil_1.errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil_1.errorUtil.errToObj(message),\n });\n }\n /**\n * Equivalent to `.min(1)`\n */\n nonempty(message) {\n return this.min(1, errorUtil_1.errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isDate() {\n return !!this._def.checks.find((ch) => ch.kind === \"date\");\n }\n get isTime() {\n return !!this._def.checks.find((ch) => ch.kind === \"time\");\n }\n get isDuration() {\n return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isNANOID() {\n return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get isCIDR() {\n return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n }\n get isBase64() {\n return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n }\n get isBase64url() {\n // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodString = ZodString;\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.number,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util_1.util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util_1.util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nexports.ZodNumber = ZodNumber;\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n try {\n input.data = BigInt(input.data);\n }\n catch (_a) {\n return this._getInvalidInput(input);\n }\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.bigint) {\n return this._getInvalidInput(input);\n }\n let ctx = undefined;\n const status = new parseUtil_1.ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _getInvalidInput(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil_1.errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil_1.errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil_1.errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nexports.ZodBigInt = ZodBigInt;\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodBoolean = ZodBoolean;\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.date,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_date,\n });\n return parseUtil_1.INVALID;\n }\n const status = new parseUtil_1.ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util_1.util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil_1.errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nexports.ZodDate = ZodDate;\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodSymbol = ZodSymbol;\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUndefined = ZodUndefined;\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.null,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodNull = ZodNull;\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodAny = ZodAny;\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodUnknown = ZodUnknown;\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.never,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n}\nexports.ZodNever = ZodNever;\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.void,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n}\nexports.ZodVoid = ZodVoid;\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: tooBig ? ZodError_1.ZodIssueCode.too_big : ZodError_1.ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return parseUtil_1.ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodArray = ZodArray;\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util_1.util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") {\n }\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil_1.errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil_1.errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util_1.util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util_1.util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util_1.util.objectKeys(this.shape));\n }\n}\nexports.ZodObject = ZodObject;\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError_1.ZodError(result.ctx.common.issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError_1.ZodError(issues));\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union,\n unionErrors,\n });\n return parseUtil_1.INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nexports.ZodUnion = ZodUnion;\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return util_1.util.objectValues(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else if (type instanceof ZodOptional) {\n return [undefined, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodNullable) {\n return [null, ...getDiscriminator(type.unwrap())];\n }\n else if (type instanceof ZodBranded) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodReadonly) {\n return getDiscriminator(type.unwrap());\n }\n else if (type instanceof ZodCatch) {\n return getDiscriminator(type._def.innerType);\n }\n else {\n return [];\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues.length) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;\nfunction mergeValues(a, b) {\n const aType = (0, util_1.getParsedType)(a);\n const bType = (0, util_1.getParsedType)(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === util_1.ZodParsedType.object && bType === util_1.ZodParsedType.object) {\n const bKeys = util_1.util.objectKeys(b);\n const sharedKeys = util_1.util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === util_1.ZodParsedType.array && bType === util_1.ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === util_1.ZodParsedType.date &&\n bType === util_1.ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if ((0, parseUtil_1.isAborted)(parsedLeft) || (0, parseUtil_1.isAborted)(parsedRight)) {\n return parseUtil_1.INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_intersection_types,\n });\n return parseUtil_1.INVALID;\n }\n if ((0, parseUtil_1.isDirty)(parsedLeft) || (0, parseUtil_1.isDirty)(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nexports.ZodIntersection = ZodIntersection;\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.array) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.array,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return parseUtil_1.INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return parseUtil_1.ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return parseUtil_1.ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nexports.ZodTuple = ZodTuple;\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.object) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.object,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (ctx.common.async) {\n return parseUtil_1.ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return parseUtil_1.ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nexports.ZodRecord = ZodRecord;\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.map) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.map,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return parseUtil_1.INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nexports.ZodMap = ZodMap;\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.set) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.set,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil_1.errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nexports.ZodSet = ZodSet;\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.function) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.function,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n function makeArgsIssue(args, error) {\n return (0, parseUtil_1.makeIssue)({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return (0, parseUtil_1.makeIssue)({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n (0, errors_1.getErrorMap)(),\n errors_1.defaultErrorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodError_1.ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(async function (...args) {\n const error = new ZodError_1.ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return (0, parseUtil_1.OK)(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nexports.ZodFunction = ZodFunction;\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nexports.ZodLazy = ZodLazy;\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nexports.ZodLiteral = ZodLiteral;\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodEnum_cache.set(this, void 0);\n }\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodEnum_cache, \"f\").has(input.data)) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values, newDef = this._def) {\n return ZodEnum.create(values, {\n ...this._def,\n ...newDef,\n });\n }\n exclude(values, newDef = this._def) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n ...this._def,\n ...newDef,\n });\n }\n}\nexports.ZodEnum = ZodEnum;\n_ZodEnum_cache = new WeakMap();\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n constructor() {\n super(...arguments);\n _ZodNativeEnum_cache.set(this, void 0);\n }\n _parse(input) {\n const nativeEnumValues = util_1.util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== util_1.ZodParsedType.string &&\n ctx.parsedType !== util_1.ZodParsedType.number) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n expected: util_1.util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodError_1.ZodIssueCode.invalid_type,\n });\n return parseUtil_1.INVALID;\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\")) {\n __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util_1.util.getValidEnumValues(this._def.values)), \"f\");\n }\n if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, \"f\").has(input.data)) {\n const expectedValues = util_1.util.objectValues(nativeEnumValues);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n received: ctx.data,\n code: ZodError_1.ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return parseUtil_1.INVALID;\n }\n return (0, parseUtil_1.OK)(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nexports.ZodNativeEnum = ZodNativeEnum;\n_ZodNativeEnum_cache = new WeakMap();\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== util_1.ZodParsedType.promise &&\n ctx.common.async === false) {\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n const promisified = ctx.parsedType === util_1.ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return (0, parseUtil_1.OK)(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nexports.ZodPromise = ZodPromise;\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n (0, parseUtil_1.addIssueToContext)(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(processed).then(async (processed) => {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = await this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n });\n }\n else {\n if (status.value === \"aborted\")\n return parseUtil_1.INVALID;\n const result = this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n if (result.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (result.status === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n if (status.value === \"dirty\")\n return (0, parseUtil_1.DIRTY)(result.value);\n return result;\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!(0, parseUtil_1.isValid)(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util_1.util.assertNever(effect);\n }\n}\nexports.ZodEffects = ZodEffects;\nexports.ZodTransformer = ZodEffects;\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.undefined) {\n return (0, parseUtil_1.OK)(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodOptional = ZodOptional;\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === util_1.ZodParsedType.null) {\n return (0, parseUtil_1.OK)(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodNullable = ZodNullable;\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === util_1.ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nexports.ZodDefault = ZodDefault;\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if ((0, parseUtil_1.isAsync)(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError_1.ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nexports.ZodCatch = ZodCatch;\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== util_1.ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n (0, parseUtil_1.addIssueToContext)(ctx, {\n code: ZodError_1.ZodIssueCode.invalid_type,\n expected: util_1.ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return parseUtil_1.INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nexports.ZodNaN = ZodNaN;\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nexports.BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nexports.ZodBranded = ZodBranded;\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return (0, parseUtil_1.DIRTY)(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return parseUtil_1.INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nexports.ZodPipeline = ZodPipeline;\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n const freeze = (data) => {\n if ((0, parseUtil_1.isValid)(data)) {\n data.value = Object.freeze(data.value);\n }\n return data;\n };\n return (0, parseUtil_1.isAsync)(result)\n ? result.then((data) => freeze(data))\n : freeze(result);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nexports.ZodReadonly = ZodReadonly;\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\n////////////////////////////////////////\n////////////////////////////////////////\n////////// //////////\n////////// z.custom //////////\n////////// //////////\n////////////////////////////////////////\n////////////////////////////////////////\nfunction cleanParams(params, data) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n return p2;\n}\nfunction custom(check, _params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n const r = check(data);\n if (r instanceof Promise) {\n return r.then((r) => {\n var _a, _b;\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n });\n }\n if (!r) {\n const params = cleanParams(_params, data);\n const _fatal = (_b = (_a = params.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n }\n return;\n });\n return ZodAny.create();\n}\nexports.custom = custom;\nexports.late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nexports.instanceof = instanceOfType;\nconst stringType = ZodString.create;\nexports.string = stringType;\nconst numberType = ZodNumber.create;\nexports.number = numberType;\nconst nanType = ZodNaN.create;\nexports.nan = nanType;\nconst bigIntType = ZodBigInt.create;\nexports.bigint = bigIntType;\nconst booleanType = ZodBoolean.create;\nexports.boolean = booleanType;\nconst dateType = ZodDate.create;\nexports.date = dateType;\nconst symbolType = ZodSymbol.create;\nexports.symbol = symbolType;\nconst undefinedType = ZodUndefined.create;\nexports.undefined = undefinedType;\nconst nullType = ZodNull.create;\nexports.null = nullType;\nconst anyType = ZodAny.create;\nexports.any = anyType;\nconst unknownType = ZodUnknown.create;\nexports.unknown = unknownType;\nconst neverType = ZodNever.create;\nexports.never = neverType;\nconst voidType = ZodVoid.create;\nexports.void = voidType;\nconst arrayType = ZodArray.create;\nexports.array = arrayType;\nconst objectType = ZodObject.create;\nexports.object = objectType;\nconst strictObjectType = ZodObject.strictCreate;\nexports.strictObject = strictObjectType;\nconst unionType = ZodUnion.create;\nexports.union = unionType;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nexports.discriminatedUnion = discriminatedUnionType;\nconst intersectionType = ZodIntersection.create;\nexports.intersection = intersectionType;\nconst tupleType = ZodTuple.create;\nexports.tuple = tupleType;\nconst recordType = ZodRecord.create;\nexports.record = recordType;\nconst mapType = ZodMap.create;\nexports.map = mapType;\nconst setType = ZodSet.create;\nexports.set = setType;\nconst functionType = ZodFunction.create;\nexports.function = functionType;\nconst lazyType = ZodLazy.create;\nexports.lazy = lazyType;\nconst literalType = ZodLiteral.create;\nexports.literal = literalType;\nconst enumType = ZodEnum.create;\nexports.enum = enumType;\nconst nativeEnumType = ZodNativeEnum.create;\nexports.nativeEnum = nativeEnumType;\nconst promiseType = ZodPromise.create;\nexports.promise = promiseType;\nconst effectsType = ZodEffects.create;\nexports.effect = effectsType;\nexports.transformer = effectsType;\nconst optionalType = ZodOptional.create;\nexports.optional = optionalType;\nconst nullableType = ZodNullable.create;\nexports.nullable = nullableType;\nconst preprocessType = ZodEffects.createWithPreprocess;\nexports.preprocess = preprocessType;\nconst pipelineType = ZodPipeline.create;\nexports.pipeline = pipelineType;\nconst ostring = () => stringType().optional();\nexports.ostring = ostring;\nconst onumber = () => numberType().optional();\nexports.onumber = onumber;\nconst oboolean = () => booleanType().optional();\nexports.oboolean = oboolean;\nexports.coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexports.NEVER = parseUtil_1.INVALID;\n","function _extends() {\n return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*!\n * Axios Cache Interceptor 1.6.2\n * (c) 2021-present Arthur Fiorette & Contributors\n * Released under the MIT License.\n */\nvar cacheParser = require('cache-parser');\nvar fastDefer = require('fast-defer');\nvar objectCode = require('object-code');\n\nconst Header = Object.freeze({\n /**\n * ```txt\n * If-Modified-Since: , :: GMT\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Since\n */\n IfModifiedSince: 'if-modified-since',\n /**\n * ```txt\n * Last-Modified: , :: GMT\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified\n */\n LastModified: 'last-modified',\n /**\n * ```txt\n * If-None-Match: \"\"\n * If-None-Match: \"\", \"\", …\n * If-None-Match: *\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match\n */\n IfNoneMatch: 'if-none-match',\n /**\n * ```txt\n * Cache-Control: max-age=604800\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control\n */\n CacheControl: 'cache-control',\n /**\n * ```txt\n * Pragma: no - cache;\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Pragma\n */\n Pragma: 'pragma',\n /**\n * ```txt\n * ETag: W / '';\n * ETag: '';\n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag\n */\n ETag: 'etag',\n /**\n * ```txt\n * Expires: \n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires\n */\n Expires: 'expires',\n /**\n * ```txt\n * Age: \n * ```\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Age\n */\n Age: 'age',\n /**\n * Used internally as metadata to mark the cache item as revalidatable and enabling\n * stale cache state Contains a string of ASCII characters that can be used as ETag for\n * `If-Match` header Provided by user using `cache.etag` value.\n *\n * ```txt\n * X-Axios-Cache-Etag: \"\"\n * ```\n */\n XAxiosCacheEtag: 'x-axios-cache-etag',\n /**\n * Used internally as metadata to mark the cache item as revalidatable and enabling\n * stale cache state may contain `'use-cache-timestamp'` if `cache.modifiedSince` is\n * `true`, otherwise will contain a date from `cache.modifiedSince`. If a date is\n * provided, it can be used for `If-Modified-Since` header, otherwise the cache\n * timestamp can be used for `If-Modified-Since` header.\n *\n * ```txt\n * X-Axios-Cache-Last-Modified: , :: GMT\n * X-Axios-Cache-Last-Modified: use-cache-timestamp\n * ```\n */\n XAxiosCacheLastModified: 'x-axios-cache-last-modified',\n /**\n * Used internally as metadata to mark the cache item able to be used if the server\n * returns an error. The stale-if-error response directive indicates that the cache can\n * reuse a stale response when any error occurs.\n *\n * ```txt\n * XAxiosCacheStaleIfError: \n * ```\n */\n XAxiosCacheStaleIfError: 'x-axios-cache-stale-if-error'\n});\n\nconst defaultHeaderInterpreter = headers => {\n if (!headers) return 'not enough headers';\n const cacheControl = headers[Header.CacheControl];\n if (cacheControl) {\n const {\n noCache,\n noStore,\n maxAge,\n maxStale,\n immutable,\n staleWhileRevalidate\n } = cacheParser.parse(String(cacheControl));\n // Header told that this response should not be cached.\n if (noCache || noStore) {\n return 'dont cache';\n }\n if (immutable) {\n // 1 year is sufficient, as Infinity may cause problems with certain storages.\n // It might not be the best way, but a year is better than none. Facebook shows\n // that a browser session stays at the most 1 month.\n return {\n cache: 1000 * 60 * 60 * 24 * 365\n };\n }\n if (maxAge !== undefined) {\n const age = headers[Header.Age];\n return {\n cache: age ?\n // If age is present, we must subtract it from maxAge\n (maxAge - Number(age)) * 1000 : maxAge * 1000,\n // Already out of date, must be requested again\n stale:\n // I couldn't find any documentation about who should be used, as they\n // are not meant to overlap each other. But, as we cannot request in the\n // background, as the stale-while-revalidate says, and we just increase\n // its staleTtl when its present, max-stale is being preferred over\n // stale-while-revalidate.\n maxStale !== undefined ? maxStale * 1000 : staleWhileRevalidate !== undefined ? staleWhileRevalidate * 1000 : undefined\n };\n }\n }\n const expires = headers[Header.Expires];\n if (expires) {\n const milliseconds = Date.parse(String(expires)) - Date.now();\n return milliseconds >= 0 ? {\n cache: milliseconds\n } : 'dont cache';\n }\n return 'not enough headers';\n};\n\n/**\n * Creates a new validateStatus function that will use the one already used and also\n * accept status code 304.\n */\nfunction createValidateStatus(oldValidate) {\n return oldValidate ? status => oldValidate(status) || status === 304 : status => status >= 200 && status < 300 || status === 304;\n}\n/** Checks if the given method is in the methods array */\nfunction isMethodIn(requestMethod = 'get', methodList = []) {\n requestMethod = requestMethod.toLowerCase();\n return methodList.some(method => method === requestMethod);\n}\n/**\n * This function updates the cache when the request is stale. So, the next request to the\n * server will be made with proper header / settings.\n */\nfunction updateStaleRequest(cache, config) {\n config.headers || (config.headers = {});\n const {\n etag,\n modifiedSince\n } = config.cache;\n if (etag) {\n var _cache$data;\n const etagValue = etag === true ? (_cache$data = cache.data) == null ? void 0 : _cache$data.headers[Header.ETag] : etag;\n if (etagValue) {\n config.headers[Header.IfNoneMatch] = etagValue;\n }\n }\n if (modifiedSince) {\n config.headers[Header.IfModifiedSince] = modifiedSince === true ?\n // If last-modified is not present, use the createdAt timestamp\n cache.data.headers[Header.LastModified] || new Date(cache.createdAt).toUTCString() : modifiedSince.toUTCString();\n }\n}\n/**\n * Creates the new date to the cache by the provided response. Also handles possible 304\n * Not Modified by updating response properties.\n */\nfunction createCacheResponse(response, previousCache) {\n if (response.status === 304 && previousCache) {\n // Set the cache information into the response object\n response.cached = true;\n response.data = previousCache.data;\n response.status = previousCache.status;\n response.statusText = previousCache.statusText;\n // Update possible new headers\n response.headers = {\n ...previousCache.headers,\n ...response.headers\n };\n // return the old cache\n return previousCache;\n }\n // New Response\n return {\n data: response.data,\n status: response.status,\n statusText: response.statusText,\n headers: response.headers\n };\n}\n\nfunction defaultRequestInterceptor(axios) {\n const onFulfilled = async config => {\n config.id = axios.generateKey(config);\n if (config.cache === false) {\n return config;\n }\n // merge defaults with per request configuration\n config.cache = {\n ...axios.defaults.cache,\n ...config.cache\n };\n if (typeof config.cache.cachePredicate === 'object' && config.cache.cachePredicate.ignoreUrls && config.url) {\n for (const url of config.cache.cachePredicate.ignoreUrls) {\n if (url instanceof RegExp ? (\n // Handles stateful regexes\n // biome-ignore lint: reduces the number of checks\n url.lastIndex = 0, url.test(config.url)) : config.url.includes(url)) {\n return config;\n }\n }\n }\n // Applies sufficient headers to prevent other cache systems to work along with this one\n //\n // Its currently used before isMethodIn because if the isMethodIn returns false, the request\n // shouldn't be cached an therefore neither in the browser.\n if (config.cache.cacheTakeover) {\n var _config$headers, _Header$CacheControl, _config$headers$_Head, _config$headers2, _Header$Pragma, _config$headers2$_Hea, _config$headers3, _Header$Expires, _config$headers3$_Hea;\n (_config$headers$_Head = (_config$headers = config.headers)[_Header$CacheControl = Header.CacheControl]) != null ? _config$headers$_Head : _config$headers[_Header$CacheControl] = 'no-cache';\n (_config$headers2$_Hea = (_config$headers2 = config.headers)[_Header$Pragma = Header.Pragma]) != null ? _config$headers2$_Hea : _config$headers2[_Header$Pragma] = 'no-cache';\n (_config$headers3$_Hea = (_config$headers3 = config.headers)[_Header$Expires = Header.Expires]) != null ? _config$headers3$_Hea : _config$headers3[_Header$Expires] = '0';\n }\n if (!isMethodIn(config.method, config.cache.methods)) {\n return config;\n }\n // Assumes that the storage handled staled responses\n let cache = await axios.storage.get(config.id, config);\n const overrideCache = config.cache.override;\n // Not cached, continue the request, and mark it as fetching\n // biome-ignore lint/suspicious/noConfusingLabels: required to break condition in simultaneous accesses\n ignoreAndRequest: if (cache.state === 'empty' || cache.state === 'stale' || cache.state === 'must-revalidate' || overrideCache) {\n // This checks for simultaneous access to a new key. The js event loop jumps on the\n // first await statement, so the second (asynchronous call) request may have already\n // started executing.\n if (axios.waiting.has(config.id) && !overrideCache) {\n cache = await axios.storage.get(config.id, config);\n // @ts-expect-error This check is required when a request has it own cache deleted manually, lets\n // say by a `axios.storage.delete(key)` and has a concurrent loading request.\n // Because in this case, the cache will be empty and may still has a pending key\n // on waiting map.\n if (cache.state !== 'empty' && cache.state !== 'must-revalidate') {\n break ignoreAndRequest;\n }\n }\n // Create a deferred to resolve other requests for the same key when it's completed\n const def = fastDefer.deferred();\n axios.waiting.set(config.id, def);\n // Adds a default reject handler to catch when the request gets aborted without\n // others waiting for it.\n def.catch(() => undefined);\n await axios.storage.set(config.id, {\n state: 'loading',\n previous: overrideCache ?\n // Simply determine if the request is stale or not\n // based if it had previous data or not\n cache.data ? 'stale' : 'empty' :\n // Typescript doesn't know that cache.state here can only be 'empty' or 'stale'\n cache.state,\n data: cache.data,\n // If the cache is empty and asked to override it, use the current timestamp\n createdAt: overrideCache && !cache.createdAt ? Date.now() : cache.createdAt\n }, config);\n if (cache.state === 'stale' || cache.state === 'must-revalidate') {\n updateStaleRequest(cache, config);\n }\n config.validateStatus = createValidateStatus(config.validateStatus);\n // Hydrates any UI temporarily, if cache is available\n if (cache.state === 'stale' || cache.data && cache.state !== 'must-revalidate') {\n await (config.cache.hydrate == null ? void 0 : config.cache.hydrate(cache));\n }\n return config;\n }\n let cachedResponse;\n if (cache.state === 'loading') {\n const deferred = axios.waiting.get(config.id);\n // The deferred may not exists when the process is using a persistent\n // storage and cancelled in the middle of a request, this would result in\n // a pending loading state in the storage but no current promises to resolve\n if (!deferred) {\n // Hydrates any UI temporarily, if cache is available\n if (cache.data) {\n await (config.cache.hydrate == null ? void 0 : config.cache.hydrate(cache));\n }\n return config;\n }\n try {\n // Deferred can't reuse the value because the user's storage might clone\n // or mutate the value, so we need to ask it again.\n // For example with memoryStorage + cloneData\n await deferred;\n const state = await axios.storage.get(config.id, config);\n // This is a cache mismatch and should never happen, but in case it does,\n // we need to redo the request all over again.\n /* c8 ignore start */\n if (!state.data) {\n if (false) ;\n return onFulfilled(config);\n }\n /* c8 ignore end */\n cachedResponse = state.data;\n } catch (err) {\n // Hydrates any UI temporarily, if cache is available\n /* c8 ignore start */\n if (cache.data) {\n await (config.cache.hydrate == null ? void 0 : config.cache.hydrate(cache));\n }\n /* c8 ignore end */\n // The deferred is rejected when the request that we are waiting rejects its cache.\n // In this case, we need to redo the request all over again.\n return onFulfilled(config);\n }\n } else {\n cachedResponse = cache.data;\n }\n // The cached data is already transformed after receiving the response from the server.\n // Reapplying the transformation on the transformed data will have an unintended effect.\n // Since the cached data is already in the desired format, there is no need to apply the transformation function again.\n config.transformResponse = undefined;\n // Even though the response interceptor receives this one from here,\n // it has been configured to ignore cached responses = true\n config.adapter = function cachedAdapter() {\n return Promise.resolve({\n config,\n data: cachedResponse.data,\n headers: cachedResponse.headers,\n status: cachedResponse.status,\n statusText: cachedResponse.statusText,\n cached: true,\n stale: cache.previous === 'stale',\n id: config.id\n });\n };\n return config;\n };\n return {\n onFulfilled,\n apply: () => axios.interceptors.request.use(onFulfilled)\n };\n}\n\n/** Tests an response against a {@link CachePredicateObject}. */\nasync function testCachePredicate(response, predicate) {\n if (typeof predicate === 'function') {\n return predicate(response);\n }\n const {\n statusCheck,\n responseMatch,\n containsHeaders\n } = predicate;\n if (statusCheck && !(await statusCheck(response.status)) || responseMatch && !(await responseMatch(response))) {\n return false;\n }\n if (containsHeaders) {\n for (const [header, predicate] of Object.entries(containsHeaders)) {\n var _response$headers$hea;\n if (!(await predicate( // Avoid bugs in case the header is not in lower case\n (_response$headers$hea = response.headers[header.toLowerCase()]) != null ? _response$headers$hea : response.headers[header]))) {\n return false;\n }\n }\n }\n return true;\n}\n\n/** Function to update all caches, from CacheProperties.update, with the new data. */\nasync function updateCache(storage, data, cacheUpdater) {\n // Global cache update function.\n if (typeof cacheUpdater === 'function') {\n return cacheUpdater(data);\n }\n for (const [cacheKey, updater] of Object.entries(cacheUpdater)) {\n if (updater === 'delete') {\n await storage.remove(cacheKey, data.config);\n continue;\n }\n const value = await storage.get(cacheKey, data.config);\n if (value.state === 'loading') {\n continue;\n }\n const newValue = await updater(value, data);\n if (newValue === 'delete') {\n await storage.remove(cacheKey, data.config);\n continue;\n }\n if (newValue !== 'ignore') {\n await storage.set(cacheKey, newValue, data.config);\n }\n }\n}\n\nfunction defaultResponseInterceptor(axios) {\n /**\n * Rejects cache for an response response.\n *\n * Also update the waiting list for this key by rejecting it.\n */\n const rejectResponse = async (responseId, config, clearCache) => {\n // Updates the cache to empty to prevent infinite loading state\n if (clearCache) {\n await axios.storage.remove(responseId, config);\n }\n // Rejects the deferred, if present\n const deferred = axios.waiting.get(responseId);\n if (deferred) {\n deferred.reject();\n axios.waiting.delete(responseId);\n }\n };\n const onFulfilled = async response => {\n var _response$cached;\n // When response.config is not present, the response is indeed a error.\n if (!(response != null && response.config)) {\n // Re-throws the error\n throw response;\n }\n response.id = response.config.id;\n (_response$cached = response.cached) != null ? _response$cached : response.cached = false;\n const config = response.config;\n // Request interceptor merges defaults with per request configuration\n const cacheConfig = config.cache;\n // Response is already cached\n if (response.cached) {\n return response;\n }\n // Skip cache: either false or weird behavior\n // config.cache should always exists, at least from global config merge.\n if (!cacheConfig) {\n response.cached = false;\n return response;\n }\n // Update other entries before updating himself\n if (cacheConfig.update) {\n await updateCache(axios.storage, response, cacheConfig.update);\n }\n if (!isMethodIn(config.method, cacheConfig.methods)) {\n return response;\n }\n const cache = await axios.storage.get(response.id, config);\n if (\n // If the request interceptor had a problem or it wasn't cached\n cache.state !== 'loading') {\n return response;\n }\n // Config told that this response should be cached.\n if (\n // For 'loading' values (previous: stale), this check already ran in the past.\n !cache.data && !(await testCachePredicate(response, cacheConfig.cachePredicate))) {\n await rejectResponse(response.id, config, true);\n return response;\n }\n // Avoid remnant headers from remote server to break implementation\n for (const header of Object.keys(response.headers)) {\n if (header.startsWith('x-axios-cache')) {\n delete response.headers[header];\n }\n }\n if (cacheConfig.etag && cacheConfig.etag !== true) {\n response.headers[Header.XAxiosCacheEtag] = cacheConfig.etag;\n }\n if (cacheConfig.modifiedSince) {\n response.headers[Header.XAxiosCacheLastModified] = cacheConfig.modifiedSince === true ? 'use-cache-timestamp' : cacheConfig.modifiedSince.toUTCString();\n }\n let ttl = cacheConfig.ttl || -1; // always set from global config\n let staleTtl;\n if (cacheConfig.interpretHeader) {\n const expirationTime = axios.headerInterpreter(response.headers);\n // Cache should not be used\n if (expirationTime === 'dont cache') {\n await rejectResponse(response.id, config, true);\n return response;\n }\n if (expirationTime !== 'not enough headers') {\n if (typeof expirationTime === 'number') {\n ttl = expirationTime;\n } else {\n ttl = expirationTime.cache;\n staleTtl = expirationTime.stale;\n }\n }\n }\n const data = createCacheResponse(response, cache.data);\n if (typeof ttl === 'function') {\n ttl = await ttl(response);\n }\n if (cacheConfig.staleIfError) {\n response.headers[Header.XAxiosCacheStaleIfError] = String(ttl);\n }\n const newCache = {\n state: 'cached',\n ttl,\n staleTtl,\n createdAt: Date.now(),\n data\n };\n // Define this key as cache on the storage\n await axios.storage.set(response.id, newCache, config);\n // Resolve all other requests waiting for this response\n const waiting = axios.waiting.get(response.id);\n if (waiting) {\n waiting.resolve();\n axios.waiting.delete(response.id);\n }\n // Return the response with cached as false, because it was not cached at all\n return response;\n };\n const onRejected = async error => {\n // When response.config is not present, the response is indeed a error.\n if (!error.isAxiosError || !error.config) {\n // We should probably re-request the response to avoid an infinite loading state here\n // but, since this is an unknown error, we cannot figure out what request ID to use.\n // And the only solution is to let the storage actively reject the current loading state.\n throw error;\n }\n const config = error.config;\n const id = config.id;\n const cacheConfig = config.cache;\n const response = error.response;\n // config.cache should always exist, at least from global config merge.\n if (!cacheConfig || !id) {\n throw error;\n }\n if (!isMethodIn(config.method, cacheConfig.methods)) {\n // Rejects all other requests waiting for this response\n await rejectResponse(id, config, true);\n throw error;\n }\n const cache = await axios.storage.get(id, config);\n if (\n // This will only not be loading if the interceptor broke\n cache.state !== 'loading' || cache.previous !== 'stale') {\n // Rejects all other requests waiting for this response\n await rejectResponse(id, config,\n // Do not clear cache if this request is cached, but the request was cancelled before returning the cached response\n error.code !== 'ERR_CANCELED' || error.code === 'ERR_CANCELED' && cache.state !== 'cached');\n throw error;\n }\n if (cacheConfig.staleIfError) {\n const cacheControl = String(response == null ? void 0 : response.headers[Header.CacheControl]);\n const staleHeader = cacheControl && cacheParser.parse(cacheControl).staleIfError;\n const staleIfError = typeof cacheConfig.staleIfError === 'function' ? await cacheConfig.staleIfError(response, cache, error) : cacheConfig.staleIfError === true && staleHeader ? staleHeader * 1000 //staleIfError is in seconds\n : cacheConfig.staleIfError;\n if (staleIfError === true ||\n // staleIfError is the number of seconds that stale is allowed to be used\n typeof staleIfError === 'number' && cache.createdAt + staleIfError > Date.now()) {\n // re-mark the cache as stale\n await axios.storage.set(id, {\n state: 'stale',\n createdAt: Date.now(),\n data: cache.data\n }, config);\n // Resolve all other requests waiting for this response\n const waiting = axios.waiting.get(id);\n if (waiting) {\n waiting.resolve();\n axios.waiting.delete(id);\n }\n return {\n cached: true,\n stale: true,\n config,\n id,\n data: cache.data.data,\n headers: cache.data.headers,\n status: cache.data.status,\n statusText: cache.data.statusText\n };\n }\n }\n // Rejects all other requests waiting for this response\n await rejectResponse(id, config, true);\n throw error;\n };\n return {\n onFulfilled,\n onRejected,\n apply: () => axios.interceptors.response.use(onFulfilled, onRejected)\n };\n}\n\n/** Returns true if the provided object was created from {@link buildStorage} function. */\nconst isStorage = obj => !!obj && !!obj['is-storage'];\nfunction hasUniqueIdentifierHeader(value) {\n const headers = value.data.headers;\n return Header.ETag in headers || Header.LastModified in headers || Header.XAxiosCacheEtag in headers || Header.XAxiosCacheLastModified in headers;\n}\n/** Returns true if value must be revalidated */\nfunction mustRevalidate(value) {\n // Must revalidate is a special case and should not serve stale values\n // We could use cache-control's parse function, but this is way faster and simpler\n return String(value.data.headers[Header.CacheControl]).includes('must-revalidate');\n}\n/** Returns true if this has sufficient properties to stale instead of expire. */\nfunction canStale(value) {\n if (hasUniqueIdentifierHeader(value)) {\n return true;\n }\n return value.state === 'cached' && value.staleTtl !== undefined &&\n // Only allow stale values after the ttl is already in the past and the staleTtl is in the future.\n // In cases that just createdAt + ttl > Date.now(), isn't enough because the staleTtl could be <= 0.\n // This logic only returns true when Date.now() is between the (createdAt + ttl) and (createdAt + ttl + staleTtl).\n // Following the example below:\n // |--createdAt--:--ttl--:---staleTtl--->\n // [ past ][now is in here]\n Math.abs(Date.now() - (value.createdAt + value.ttl)) <= value.staleTtl;\n}\n/**\n * Checks if the provided cache is expired. You should also check if the cache\n * {@link canStale} and {@link mayUseStale}\n */\nfunction isExpired(value) {\n return value.ttl !== undefined && value.createdAt + value.ttl <= Date.now();\n}\n/**\n * All integrated storages are wrappers around the `buildStorage` function. External\n * libraries use it and if you want to build your own, `buildStorage` is the way to go!\n *\n * The exported `buildStorage` function abstracts the storage interface and requires a\n * super simple object to build the storage.\n *\n * **Note**: You can only create an custom storage with this function.\n *\n * @example\n *\n * ```js\n * const myStorage = buildStorage({\n * find: () => {...},\n * set: () => {...},\n * remove: () => {...},\n * clear: () => {...}\n * });\n *\n * const axios = setupCache(axios, { storage: myStorage });\n * ```\n *\n * @see https://axios-cache-interceptor.js.org/guide/storages#buildstorage\n */\nfunction buildStorage({\n set,\n find,\n remove,\n clear\n}) {\n return {\n //@ts-expect-error - we don't want to expose this\n 'is-storage': 1,\n set,\n remove,\n clear,\n get: async (key, config) => {\n let value = await find(key, config);\n if (!value) {\n return {\n state: 'empty'\n };\n }\n if (value.state === 'empty' || value.state === 'loading' || value.state === 'must-revalidate') {\n return value;\n }\n // Handle cached values\n if (value.state === 'cached') {\n if (!isExpired(value)) {\n return value;\n }\n // Tries to stale expired value\n if (!canStale(value)) {\n await remove(key, config);\n return {\n state: 'empty'\n };\n }\n value = {\n state: 'stale',\n createdAt: value.createdAt,\n data: value.data,\n ttl: value.staleTtl !== undefined ? value.staleTtl + value.ttl : undefined\n };\n await set(key, value, config);\n // Must revalidate is a special case and should not serve stale values\n if (mustRevalidate(value)) {\n return {\n ...value,\n state: 'must-revalidate'\n };\n }\n }\n // A second check in case the new stale value was created already expired.\n if (!isExpired(value)) {\n return value;\n }\n if (hasUniqueIdentifierHeader(value)) {\n return value;\n }\n await remove(key, config);\n return {\n state: 'empty'\n };\n }\n };\n}\n\n/* c8 ignore start */\n/**\n * Clones an object using the structured clone algorithm if available, otherwise\n * it uses JSON.parse(JSON.stringify(value)).\n */\nconst clone =\n// https://caniuse.com/mdn-api_structuredclone (10/18/2023 92.51%)\ntypeof structuredClone === 'function' ? structuredClone : value => JSON.parse(JSON.stringify(value));\n/* c8 ignore stop */\n/**\n * Creates a simple in-memory storage. This means that if you need to persist data between\n * page or server reloads, this will not help.\n *\n * This is the storage used by default.\n *\n * If you need to modify it's data, you can do by the `data` property.\n *\n * @example\n *\n * ```js\n * const memoryStorage = buildMemoryStorage();\n *\n * setupCache(axios, { storage: memoryStorage });\n *\n * // Simple example to force delete the request cache\n *\n * const { id } = axios.get('url');\n *\n * delete memoryStorage.data[id];\n * ```\n *\n * @param {boolean | 'double'} cloneData Use `true` if the data returned by `find()`\n * should be cloned to avoid mutating the original data outside the `set()` method. Use\n * `'double'` to also clone before saving value in storage using `set()`. Disabled is\n * default\n * @param {number | false} cleanupInterval The interval in milliseconds to run a\n * setInterval job of cleaning old entries. If false, the job will not be created.\n * Disabled is default\n * @param {number | false} maxEntries The maximum number of entries to keep in the\n * storage. Its hard to determine the size of the entries, so a smart FIFO order is used\n * to determine eviction. If false, no check will be done and you may grow up memory\n * usage. Disabled is default\n */\nfunction buildMemoryStorage(cloneData = false, cleanupInterval = false, maxEntries = false) {\n const storage = buildStorage({\n set: (key, value) => {\n if (maxEntries) {\n let keys = Object.keys(storage.data);\n // Tries to cleanup first\n if (keys.length >= maxEntries) {\n storage.cleanup();\n // Recalculates the keys\n keys = Object.keys(storage.data);\n // Keeps deleting until there's space\n while (keys.length >= maxEntries) {\n // There's always at least one key here, otherwise it would not be\n // in the loop.\n delete storage.data[keys.shift()];\n }\n }\n }\n // Clone the value before storing to prevent future mutations\n // from affecting cached data.\n storage.data[key] = cloneData === 'double' ? clone(value) : value;\n },\n remove: key => {\n delete storage.data[key];\n },\n find: key => {\n const value = storage.data[key];\n return cloneData && value !== undefined ? clone(value) : value;\n },\n clear: () => {\n storage.data = Object.create(null);\n }\n });\n storage.data = Object.create(null);\n // When this program gets running for more than the specified interval, there's a good\n // chance of it being a long-running process or at least have a lot of entries. Therefore,\n // \"faster\" loop is more important than code readability.\n storage.cleanup = () => {\n const keys = Object.keys(storage.data);\n let i = -1;\n let value;\n let key;\n // Looping forward, as older entries are more likely to be expired\n // than newer ones.\n while (++i < keys.length) {\n key = keys[i];\n value = storage.data[key];\n if (value.state === 'empty') {\n storage.remove(key);\n continue;\n }\n // If the value is expired and can't be stale, remove it\n if (value.state === 'cached' && isExpired(value) && !canStale(value)) {\n // this storage returns void.\n storage.remove(key);\n }\n }\n };\n if (cleanupInterval) {\n storage.cleaner = setInterval(storage.cleanup, cleanupInterval);\n }\n return storage;\n}\n\n// Remove first and last '/' char, if present\nconst SLASHES_REGEX = /^\\/|\\/$/g;\n/**\n * Builds an generator that receives a {@link CacheRequestConfig} and returns a value\n * hashed by {@link hash}.\n *\n * The value is hashed into a signed integer when the returned value from the provided\n * generator is not a `string` or a `number`.\n *\n * You can return any type of data structure.\n *\n * @example\n *\n * ```js\n * // This generator will return a hash code.\n * // The code will only be the same if url, method and data are the same.\n * const generator = buildKeyGenerator(({ url, method, data }) => ({\n * url,\n * method,\n * data\n * }));\n * ```\n */\nfunction buildKeyGenerator(generator) {\n return request => {\n if (request.id) {\n return request.id;\n }\n const key = generator(request);\n if (typeof key === 'string' || typeof key === 'number') {\n return `${key}`;\n }\n return `${objectCode.hash(key)}`;\n };\n}\nconst defaultKeyGenerator = buildKeyGenerator(({\n baseURL,\n url,\n method,\n params,\n data\n}) => {\n // Remove trailing slashes to avoid generating different keys for the \"same\" final url.\n if (baseURL !== undefined) {\n baseURL = baseURL.replace(SLASHES_REGEX, '');\n } else {\n // just to have a consistent hash\n baseURL = '';\n }\n if (url !== undefined) {\n url = url.replace(SLASHES_REGEX, '');\n } else {\n // just to have a consistent hash\n url = '';\n }\n if (method !== undefined) {\n method = method.toLowerCase();\n } else {\n // just to have a consistent hash\n method = 'get';\n }\n return {\n url: baseURL + (baseURL && url ? '/' : '') + url,\n params: params,\n method: method,\n data: data\n };\n});\n\n/**\n * Apply the caching interceptors for a already created axios instance.\n *\n * ```ts\n * const axios = setupCache(axios, OPTIONS);\n * ```\n *\n * The `setupCache` function receives global options and all [request\n * specifics](https://axios-cache-interceptor.js.org/config/request-specifics) ones too.\n * This way, you can customize the defaults for all requests.\n *\n * @param axios The already created axios instance\n * @param config The config for the caching interceptors\n * @returns The same instance with extended typescript types.\n * @see https://axios-cache-interceptor.js.org/config\n */\nfunction setupCache(axios, options = {}) {\n var _options$ttl, _options$etag, _options$modifiedSinc, _options$interpretHea, _options$cacheTakeove, _options$staleIfError, _options$override, _options$hydrate;\n const axiosCache = axios;\n if (axiosCache.defaults.cache) {\n throw new Error('setupCache() should be called only once');\n }\n axiosCache.storage = options.storage || buildMemoryStorage();\n if (!isStorage(axiosCache.storage)) {\n throw new Error('Use buildStorage() function');\n }\n axiosCache.waiting = options.waiting || new Map();\n axiosCache.generateKey = options.generateKey || defaultKeyGenerator;\n axiosCache.headerInterpreter = options.headerInterpreter || defaultHeaderInterpreter;\n axiosCache.requestInterceptor = options.requestInterceptor || defaultRequestInterceptor(axiosCache);\n axiosCache.responseInterceptor = options.responseInterceptor || defaultResponseInterceptor(axiosCache);\n axiosCache.debug = options.debug || function noop() {};\n // CacheRequestConfig values\n axiosCache.defaults.cache = {\n update: options.update || {},\n ttl: (_options$ttl = options.ttl) != null ? _options$ttl : 1000 * 60 * 5,\n // Although RFC 7231 also marks POST as cacheable, most users don't know that\n // and may have problems about why their \"create X\" route not working.\n methods: options.methods || ['get', 'head'],\n cachePredicate: options.cachePredicate || {\n // All cacheable status codes defined in RFC 7231\n statusCheck: status => [200, 203, 300, 301, 302, 404, 405, 410, 414, 501].includes(status)\n },\n etag: (_options$etag = options.etag) != null ? _options$etag : true,\n // This option is going to be ignored by servers when ETag is enabled\n // Checks strict equality to false to avoid undefined-ish values\n modifiedSince: (_options$modifiedSinc = options.modifiedSince) != null ? _options$modifiedSinc : options.etag === false,\n interpretHeader: (_options$interpretHea = options.interpretHeader) != null ? _options$interpretHea : true,\n cacheTakeover: (_options$cacheTakeove = options.cacheTakeover) != null ? _options$cacheTakeove : true,\n staleIfError: (_options$staleIfError = options.staleIfError) != null ? _options$staleIfError : true,\n override: (_options$override = options.override) != null ? _options$override : false,\n hydrate: (_options$hydrate = options.hydrate) != null ? _options$hydrate : undefined\n };\n // Apply interceptors\n axiosCache.requestInterceptor.apply();\n axiosCache.responseInterceptor.apply();\n return axiosCache;\n}\n\n/**\n * Creates a simple storage. You can persist his data by using `sessionStorage` or\n * `localStorage` with it.\n *\n * **ImplNote**: Without polyfill, this storage only works on browser environments.\n *\n * @example\n *\n * ```js\n * const fromLocalStorage = buildWebStorage(localStorage);\n * const fromSessionStorage = buildWebStorage(sessionStorage);\n *\n * const myStorage = new Storage();\n * const fromMyStorage = buildWebStorage(myStorage);\n * ```\n *\n * @param storage The type of web storage to use. localStorage or sessionStorage.\n * @param prefix The prefix to index the storage. Useful to prevent collision between\n * multiple places using the same storage.\n */\nfunction buildWebStorage(storage, prefix = 'axios-cache-') {\n return buildStorage({\n clear: () => {\n for (const key in storage) {\n if (key.startsWith(prefix)) {\n storage.removeItem(key);\n }\n }\n },\n find: key => {\n const json = storage.getItem(prefix + key);\n return json ? JSON.parse(json) : undefined;\n },\n remove: key => {\n storage.removeItem(prefix + key);\n },\n set: (key, value) => {\n const save = () => storage.setItem(prefix + key, JSON.stringify(value));\n try {\n return save();\n } catch (error) {\n const allValues = Object.entries(storage).filter(item => item[0].startsWith(prefix)).map(item => [item[0], JSON.parse(item[1])]);\n // Remove all expired values\n for (const value of allValues) {\n if (value[1].state === 'cached' && isExpired(value[1]) && !canStale(value[1])) {\n storage.removeItem(value[0]);\n }\n }\n // Try save again after removing expired values\n try {\n return save();\n } catch {\n // Storage still full, try removing the oldest value until it can be saved\n // Descending sort by createdAt\n const sortedItems = allValues.sort((a, b) => (a[1].createdAt || 0) - (b[1].createdAt || 0));\n for (const item of sortedItems) {\n storage.removeItem(item[0]);\n try {\n return save();\n } catch {\n // This key didn't free all the required space\n }\n }\n }\n // Clear the cache for the specified key\n storage.removeItem(prefix + key);\n }\n }\n });\n}\n\nexports.Header = Header;\nexports.buildKeyGenerator = buildKeyGenerator;\nexports.buildMemoryStorage = buildMemoryStorage;\nexports.buildStorage = buildStorage;\nexports.buildWebStorage = buildWebStorage;\nexports.canStale = canStale;\nexports.createCacheResponse = createCacheResponse;\nexports.createValidateStatus = createValidateStatus;\nexports.defaultHeaderInterpreter = defaultHeaderInterpreter;\nexports.defaultKeyGenerator = defaultKeyGenerator;\nexports.defaultRequestInterceptor = defaultRequestInterceptor;\nexports.defaultResponseInterceptor = defaultResponseInterceptor;\nexports.isExpired = isExpired;\nexports.isMethodIn = isMethodIn;\nexports.isStorage = isStorage;\nexports.mustRevalidate = mustRevalidate;\nexports.setupCache = setupCache;\nexports.testCachePredicate = testCachePredicate;\nexports.updateCache = updateCache;\nexports.updateStaleRequest = updateStaleRequest;\n//# sourceMappingURL=index.cjs.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_OPTIONS = exports.linearDelay = exports.exponentialDelay = exports.retryAfter = exports.isNetworkOrIdempotentRequestError = exports.isIdempotentRequestError = exports.isSafeRequestError = exports.isRetryableError = exports.isNetworkError = exports.namespace = void 0;\nconst is_retry_allowed_1 = __importDefault(require(\"is-retry-allowed\"));\nexports.namespace = 'axios-retry';\nfunction isNetworkError(error) {\n const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];\n if (error.response) {\n return false;\n }\n if (!error.code) {\n return false;\n }\n // Prevents retrying timed out & cancelled requests\n if (CODE_EXCLUDE_LIST.includes(error.code)) {\n return false;\n }\n // Prevents retrying unsafe errors\n return (0, is_retry_allowed_1.default)(error);\n}\nexports.isNetworkError = isNetworkError;\nconst SAFE_HTTP_METHODS = ['get', 'head', 'options'];\nconst IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);\nfunction isRetryableError(error) {\n return (error.code !== 'ECONNABORTED' &&\n (!error.response ||\n error.response.status === 429 ||\n (error.response.status >= 500 && error.response.status <= 599)));\n}\nexports.isRetryableError = isRetryableError;\nfunction isSafeRequestError(error) {\n var _a;\n if (!((_a = error.config) === null || _a === void 0 ? void 0 : _a.method)) {\n // Cannot determine if the request can be retried\n return false;\n }\n return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;\n}\nexports.isSafeRequestError = isSafeRequestError;\nfunction isIdempotentRequestError(error) {\n var _a;\n if (!((_a = error.config) === null || _a === void 0 ? void 0 : _a.method)) {\n // Cannot determine if the request can be retried\n return false;\n }\n return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;\n}\nexports.isIdempotentRequestError = isIdempotentRequestError;\nfunction isNetworkOrIdempotentRequestError(error) {\n return isNetworkError(error) || isIdempotentRequestError(error);\n}\nexports.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;\nfunction retryAfter(error = undefined) {\n var _a;\n const retryAfterHeader = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.headers['retry-after'];\n if (!retryAfterHeader) {\n return 0;\n }\n // if the retry after header is a number, convert it to milliseconds\n let retryAfterMs = (Number(retryAfterHeader) || 0) * 1000;\n // If the retry after header is a date, get the number of milliseconds until that date\n if (retryAfterMs === 0) {\n retryAfterMs = (new Date(retryAfterHeader).valueOf() || 0) - Date.now();\n }\n return Math.max(0, retryAfterMs);\n}\nexports.retryAfter = retryAfter;\nfunction noDelay(_retryNumber = 0, error = undefined) {\n return Math.max(0, retryAfter(error));\n}\nfunction exponentialDelay(retryNumber = 0, error = undefined, delayFactor = 100) {\n const calculatedDelay = Math.pow(2, retryNumber) * delayFactor;\n const delay = Math.max(calculatedDelay, retryAfter(error));\n const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay\n return delay + randomSum;\n}\nexports.exponentialDelay = exponentialDelay;\n/**\n * Linear delay\n * @param {number | undefined} delayFactor - delay factor in milliseconds (default: 100)\n * @returns {function} (retryNumber: number, error: AxiosError | undefined) => number\n */\nfunction linearDelay(delayFactor = 100) {\n return (retryNumber = 0, error = undefined) => {\n const delay = retryNumber * delayFactor;\n return Math.max(delay, retryAfter(error));\n };\n}\nexports.linearDelay = linearDelay;\nexports.DEFAULT_OPTIONS = {\n retries: 3,\n retryCondition: isNetworkOrIdempotentRequestError,\n retryDelay: noDelay,\n shouldResetTimeout: false,\n onRetry: () => { },\n onMaxRetryTimesExceeded: () => { },\n validateResponse: null\n};\nfunction getRequestOptions(config, defaultOptions) {\n return Object.assign(Object.assign(Object.assign({}, exports.DEFAULT_OPTIONS), defaultOptions), config[exports.namespace]);\n}\nfunction setCurrentState(config, defaultOptions, resetLastRequestTime = false) {\n const currentState = getRequestOptions(config, defaultOptions || {});\n currentState.retryCount = currentState.retryCount || 0;\n if (!currentState.lastRequestTime || resetLastRequestTime) {\n currentState.lastRequestTime = Date.now();\n }\n config[exports.namespace] = currentState;\n return currentState;\n}\nfunction fixConfig(axiosInstance, config) {\n // @ts-ignore\n if (axiosInstance.defaults.agent === config.agent) {\n // @ts-ignore\n delete config.agent;\n }\n if (axiosInstance.defaults.httpAgent === config.httpAgent) {\n delete config.httpAgent;\n }\n if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {\n delete config.httpsAgent;\n }\n}\nfunction shouldRetry(currentState, error) {\n return __awaiter(this, void 0, void 0, function* () {\n const { retries, retryCondition } = currentState;\n const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);\n // This could be a promise\n if (typeof shouldRetryOrPromise === 'object') {\n try {\n const shouldRetryPromiseResult = yield shouldRetryOrPromise;\n // keep return true unless shouldRetryPromiseResult return false for compatibility\n return shouldRetryPromiseResult !== false;\n }\n catch (_err) {\n return false;\n }\n }\n return shouldRetryOrPromise;\n });\n}\nfunction handleRetry(axiosInstance, currentState, error, config) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n currentState.retryCount += 1;\n const { retryDelay, shouldResetTimeout, onRetry } = currentState;\n const delay = retryDelay(currentState.retryCount, error);\n // Axios fails merging this configuration to the default configuration because it has an issue\n // with circular structures: https://github.com/mzabriskie/axios/issues/370\n fixConfig(axiosInstance, config);\n if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {\n const lastRequestDuration = Date.now() - currentState.lastRequestTime;\n const timeout = config.timeout - lastRequestDuration - delay;\n if (timeout <= 0) {\n return Promise.reject(error);\n }\n config.timeout = timeout;\n }\n config.transformRequest = [(data) => data];\n yield onRetry(currentState.retryCount, error, config);\n if ((_a = config.signal) === null || _a === void 0 ? void 0 : _a.aborted) {\n return Promise.resolve(axiosInstance(config));\n }\n return new Promise((resolve) => {\n var _a;\n const abortListener = () => {\n clearTimeout(timeout);\n resolve(axiosInstance(config));\n };\n const timeout = setTimeout(() => {\n var _a;\n resolve(axiosInstance(config));\n if ((_a = config.signal) === null || _a === void 0 ? void 0 : _a.removeEventListener) {\n config.signal.removeEventListener('abort', abortListener);\n }\n }, delay);\n if ((_a = config.signal) === null || _a === void 0 ? void 0 : _a.addEventListener) {\n config.signal.addEventListener('abort', abortListener, { once: true });\n }\n });\n });\n}\nfunction handleMaxRetryTimesExceeded(currentState, error) {\n return __awaiter(this, void 0, void 0, function* () {\n if (currentState.retryCount >= currentState.retries)\n yield currentState.onMaxRetryTimesExceeded(error, currentState.retryCount);\n });\n}\nconst axiosRetry = (axiosInstance, defaultOptions) => {\n const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {\n var _a;\n setCurrentState(config, defaultOptions, true);\n if ((_a = config[exports.namespace]) === null || _a === void 0 ? void 0 : _a.validateResponse) {\n // by setting this, all HTTP responses will be go through the error interceptor first\n config.validateStatus = () => false;\n }\n return config;\n });\n const responseInterceptorId = axiosInstance.interceptors.response.use(null, (error) => __awaiter(void 0, void 0, void 0, function* () {\n var _a;\n const { config } = error;\n // If we have no information to retry the request\n if (!config) {\n return Promise.reject(error);\n }\n const currentState = setCurrentState(config, defaultOptions);\n if (error.response && ((_a = currentState.validateResponse) === null || _a === void 0 ? void 0 : _a.call(currentState, error.response))) {\n // no issue with response\n return error.response;\n }\n if (yield shouldRetry(currentState, error)) {\n return handleRetry(axiosInstance, currentState, error, config);\n }\n yield handleMaxRetryTimesExceeded(currentState, error);\n return Promise.reject(error);\n }));\n return { requestInterceptorId, responseInterceptorId };\n};\n// Compatibility with CommonJS\naxiosRetry.isNetworkError = isNetworkError;\naxiosRetry.isSafeRequestError = isSafeRequestError;\naxiosRetry.isIdempotentRequestError = isIdempotentRequestError;\naxiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;\naxiosRetry.exponentialDelay = exponentialDelay;\naxiosRetry.linearDelay = linearDelay;\naxiosRetry.isRetryableError = isRetryableError;\nexports.default = axiosRetry;\n","/*! Axios v1.8.3 Copyright (c) 2025 Matt Zabriskie and contributors */\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils$1.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv,\n navigator: _navigator,\n origin: origin\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data) ||\n utils$1.isReadableStream(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils$1.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nconst progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n};\n\nconst progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n};\n\nconst asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nvar resolveConfig = (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders$1.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils$1.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n};\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n };\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n };\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils$1.asap(unsubscribe);\n\n return signal;\n }\n};\n\nvar composeSignals$1 = composeSignals;\n\nconst streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nconst readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nconst trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n};\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n};\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils$1.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n });\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils$1.isBlob(body)) {\n return body.size;\n }\n\n if(utils$1.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils$1.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils$1.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n};\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils$1.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n};\n\nvar fetchAdapter = isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils$1.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders$1.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n });\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst VERSION = \"1.8.3\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators$1.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jwtDecode = exports.InvalidTokenError = void 0;\nclass InvalidTokenError extends Error {\n}\nexports.InvalidTokenError = InvalidTokenError;\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\nfunction b64DecodeUnicode(str) {\n return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {\n let code = p.charCodeAt(0).toString(16).toUpperCase();\n if (code.length < 2) {\n code = \"0\" + code;\n }\n return \"%\" + code;\n }));\n}\nfunction base64UrlDecode(str) {\n let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n switch (output.length % 4) {\n case 0:\n break;\n case 2:\n output += \"==\";\n break;\n case 3:\n output += \"=\";\n break;\n default:\n throw new Error(\"base64 string is not of the correct length\");\n }\n try {\n return b64DecodeUnicode(output);\n }\n catch (err) {\n return atob(output);\n }\n}\nfunction jwtDecode(token, options) {\n if (typeof token !== \"string\") {\n throw new InvalidTokenError(\"Invalid token specified: must be a string\");\n }\n options || (options = {});\n const pos = options.header === true ? 0 : 1;\n const part = token.split(\".\")[pos];\n if (typeof part !== \"string\") {\n throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);\n }\n let decoded;\n try {\n decoded = base64UrlDecode(part);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);\n }\n try {\n return JSON.parse(decoded);\n }\n catch (e) {\n throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);\n }\n}\nexports.jwtDecode = jwtDecode;\n","'use strict'\n\nconst errSerializer = require('./lib/err')\nconst errWithCauseSerializer = require('./lib/err-with-cause')\nconst reqSerializers = require('./lib/req')\nconst resSerializers = require('./lib/res')\n\nmodule.exports = {\n err: errSerializer,\n errWithCause: errWithCauseSerializer,\n mapHttpRequest: reqSerializers.mapHttpRequest,\n mapHttpResponse: resSerializers.mapHttpResponse,\n req: reqSerializers.reqSerializer,\n res: resSerializers.resSerializer,\n\n wrapErrorSerializer: function wrapErrorSerializer (customSerializer) {\n if (customSerializer === errSerializer) return customSerializer\n return function wrapErrSerializer (err) {\n return customSerializer(errSerializer(err))\n }\n },\n\n wrapRequestSerializer: function wrapRequestSerializer (customSerializer) {\n if (customSerializer === reqSerializers.reqSerializer) return customSerializer\n return function wrappedReqSerializer (req) {\n return customSerializer(reqSerializers.reqSerializer(req))\n }\n },\n\n wrapResponseSerializer: function wrapResponseSerializer (customSerializer) {\n if (customSerializer === resSerializers.resSerializer) return customSerializer\n return function wrappedResSerializer (res) {\n return customSerializer(resSerializers.resSerializer(res))\n }\n }\n}\n","'use strict'\n\n// **************************************************************\n// * Code initially copied/adapted from \"pony-cause\" npm module *\n// * Please upstream improvements there *\n// **************************************************************\n\nconst isErrorLike = (err) => {\n return err && typeof err.message === 'string'\n}\n\n/**\n * @param {Error|{ cause?: unknown|(()=>err)}} err\n * @returns {Error|Object|undefined}\n */\nconst getErrorCause = (err) => {\n if (!err) return\n\n /** @type {unknown} */\n // @ts-ignore\n const cause = err.cause\n\n // VError / NError style causes\n if (typeof cause === 'function') {\n // @ts-ignore\n const causeResult = err.cause()\n\n return isErrorLike(causeResult)\n ? causeResult\n : undefined\n } else {\n return isErrorLike(cause)\n ? cause\n : undefined\n }\n}\n\n/**\n * Internal method that keeps a track of which error we have already added, to avoid circular recursion\n *\n * @private\n * @param {Error} err\n * @param {Set} seen\n * @returns {string}\n */\nconst _stackWithCauses = (err, seen) => {\n if (!isErrorLike(err)) return ''\n\n const stack = err.stack || ''\n\n // Ensure we don't go circular or crazily deep\n if (seen.has(err)) {\n return stack + '\\ncauses have become circular...'\n }\n\n const cause = getErrorCause(err)\n\n if (cause) {\n seen.add(err)\n return (stack + '\\ncaused by: ' + _stackWithCauses(cause, seen))\n } else {\n return stack\n }\n}\n\n/**\n * @param {Error} err\n * @returns {string}\n */\nconst stackWithCauses = (err) => _stackWithCauses(err, new Set())\n\n/**\n * Internal method that keeps a track of which error we have already added, to avoid circular recursion\n *\n * @private\n * @param {Error} err\n * @param {Set} seen\n * @param {boolean} [skip]\n * @returns {string}\n */\nconst _messageWithCauses = (err, seen, skip) => {\n if (!isErrorLike(err)) return ''\n\n const message = skip ? '' : (err.message || '')\n\n // Ensure we don't go circular or crazily deep\n if (seen.has(err)) {\n return message + ': ...'\n }\n\n const cause = getErrorCause(err)\n\n if (cause) {\n seen.add(err)\n\n // @ts-ignore\n const skipIfVErrorStyleCause = typeof err.cause === 'function'\n\n return (message +\n (skipIfVErrorStyleCause ? '' : ': ') +\n _messageWithCauses(cause, seen, skipIfVErrorStyleCause))\n } else {\n return message\n }\n}\n\n/**\n * @param {Error} err\n * @returns {string}\n */\nconst messageWithCauses = (err) => _messageWithCauses(err, new Set())\n\nmodule.exports = {\n isErrorLike,\n getErrorCause,\n stackWithCauses,\n messageWithCauses\n}\n","'use strict'\n\nconst seen = Symbol('circular-ref-tag')\nconst rawSymbol = Symbol('pino-raw-err-ref')\n\nconst pinoErrProto = Object.create({}, {\n type: {\n enumerable: true,\n writable: true,\n value: undefined\n },\n message: {\n enumerable: true,\n writable: true,\n value: undefined\n },\n stack: {\n enumerable: true,\n writable: true,\n value: undefined\n },\n aggregateErrors: {\n enumerable: true,\n writable: true,\n value: undefined\n },\n raw: {\n enumerable: false,\n get: function () {\n return this[rawSymbol]\n },\n set: function (val) {\n this[rawSymbol] = val\n }\n }\n})\nObject.defineProperty(pinoErrProto, rawSymbol, {\n writable: true,\n value: {}\n})\n\nmodule.exports = {\n pinoErrProto,\n pinoErrorSymbols: {\n seen,\n rawSymbol\n }\n}\n","'use strict'\n\nmodule.exports = errWithCauseSerializer\n\nconst { isErrorLike } = require('./err-helpers')\nconst { pinoErrProto, pinoErrorSymbols } = require('./err-proto')\nconst { seen } = pinoErrorSymbols\n\nconst { toString } = Object.prototype\n\nfunction errWithCauseSerializer (err) {\n if (!isErrorLike(err)) {\n return err\n }\n\n err[seen] = undefined // tag to prevent re-looking at this\n const _err = Object.create(pinoErrProto)\n _err.type = toString.call(err.constructor) === '[object Function]'\n ? err.constructor.name\n : err.name\n _err.message = err.message\n _err.stack = err.stack\n\n if (Array.isArray(err.errors)) {\n _err.aggregateErrors = err.errors.map(err => errWithCauseSerializer(err))\n }\n\n if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) {\n _err.cause = errWithCauseSerializer(err.cause)\n }\n\n for (const key in err) {\n if (_err[key] === undefined) {\n const val = err[key]\n if (isErrorLike(val)) {\n if (!Object.prototype.hasOwnProperty.call(val, seen)) {\n _err[key] = errWithCauseSerializer(val)\n }\n } else {\n _err[key] = val\n }\n }\n }\n\n delete err[seen] // clean up tag in case err is serialized again later\n _err.raw = err\n return _err\n}\n","'use strict'\n\nmodule.exports = errSerializer\n\nconst { messageWithCauses, stackWithCauses, isErrorLike } = require('./err-helpers')\nconst { pinoErrProto, pinoErrorSymbols } = require('./err-proto')\nconst { seen } = pinoErrorSymbols\n\nconst { toString } = Object.prototype\n\nfunction errSerializer (err) {\n if (!isErrorLike(err)) {\n return err\n }\n\n err[seen] = undefined // tag to prevent re-looking at this\n const _err = Object.create(pinoErrProto)\n _err.type = toString.call(err.constructor) === '[object Function]'\n ? err.constructor.name\n : err.name\n _err.message = messageWithCauses(err)\n _err.stack = stackWithCauses(err)\n\n if (Array.isArray(err.errors)) {\n _err.aggregateErrors = err.errors.map(err => errSerializer(err))\n }\n\n for (const key in err) {\n if (_err[key] === undefined) {\n const val = err[key]\n if (isErrorLike(val)) {\n // We append cause messages and stacks to _err, therefore skipping causes here\n if (key !== 'cause' && !Object.prototype.hasOwnProperty.call(val, seen)) {\n _err[key] = errSerializer(val)\n }\n } else {\n _err[key] = val\n }\n }\n }\n\n delete err[seen] // clean up tag in case err is serialized again later\n _err.raw = err\n return _err\n}\n","'use strict'\n\nmodule.exports = {\n mapHttpRequest,\n reqSerializer\n}\n\nconst rawSymbol = Symbol('pino-raw-req-ref')\nconst pinoReqProto = Object.create({}, {\n id: {\n enumerable: true,\n writable: true,\n value: ''\n },\n method: {\n enumerable: true,\n writable: true,\n value: ''\n },\n url: {\n enumerable: true,\n writable: true,\n value: ''\n },\n query: {\n enumerable: true,\n writable: true,\n value: ''\n },\n params: {\n enumerable: true,\n writable: true,\n value: ''\n },\n headers: {\n enumerable: true,\n writable: true,\n value: {}\n },\n remoteAddress: {\n enumerable: true,\n writable: true,\n value: ''\n },\n remotePort: {\n enumerable: true,\n writable: true,\n value: ''\n },\n raw: {\n enumerable: false,\n get: function () {\n return this[rawSymbol]\n },\n set: function (val) {\n this[rawSymbol] = val\n }\n }\n})\nObject.defineProperty(pinoReqProto, rawSymbol, {\n writable: true,\n value: {}\n})\n\nfunction reqSerializer (req) {\n // req.info is for hapi compat.\n const connection = req.info || req.socket\n const _req = Object.create(pinoReqProto)\n _req.id = (typeof req.id === 'function' ? req.id() : (req.id || (req.info ? req.info.id : undefined)))\n _req.method = req.method\n // req.originalUrl is for expressjs compat.\n if (req.originalUrl) {\n _req.url = req.originalUrl\n } else {\n const path = req.path\n // path for safe hapi compat.\n _req.url = typeof path === 'string' ? path : (req.url ? req.url.path || req.url : undefined)\n }\n\n if (req.query) {\n _req.query = req.query\n }\n\n if (req.params) {\n _req.params = req.params\n }\n\n _req.headers = req.headers\n _req.remoteAddress = connection && connection.remoteAddress\n _req.remotePort = connection && connection.remotePort\n // req.raw is for hapi compat/equivalence\n _req.raw = req.raw || req\n return _req\n}\n\nfunction mapHttpRequest (req) {\n return {\n req: reqSerializer(req)\n }\n}\n","'use strict'\n\nmodule.exports = {\n mapHttpResponse,\n resSerializer\n}\n\nconst rawSymbol = Symbol('pino-raw-res-ref')\nconst pinoResProto = Object.create({}, {\n statusCode: {\n enumerable: true,\n writable: true,\n value: 0\n },\n headers: {\n enumerable: true,\n writable: true,\n value: ''\n },\n raw: {\n enumerable: false,\n get: function () {\n return this[rawSymbol]\n },\n set: function (val) {\n this[rawSymbol] = val\n }\n }\n})\nObject.defineProperty(pinoResProto, rawSymbol, {\n writable: true,\n value: {}\n})\n\nfunction resSerializer (res) {\n const _res = Object.create(pinoResProto)\n _res.statusCode = res.headersSent ? res.statusCode : null\n _res.headers = res.getHeaders ? res.getHeaders() : res._headers\n _res.raw = res\n return _res\n}\n\nfunction mapHttpResponse (res) {\n return {\n res: resSerializer(res)\n }\n}\n","'use strict'\n\nconst format = require('quick-format-unescaped')\n\nmodule.exports = pino\n\nconst _console = pfGlobalThisOrFallback().console || {}\nconst stdSerializers = {\n mapHttpRequest: mock,\n mapHttpResponse: mock,\n wrapRequestSerializer: passthrough,\n wrapResponseSerializer: passthrough,\n wrapErrorSerializer: passthrough,\n req: mock,\n res: mock,\n err: asErrValue,\n errWithCause: asErrValue\n}\nfunction levelToValue (level, logger) {\n return level === 'silent'\n ? Infinity\n : logger.levels.values[level]\n}\nconst baseLogFunctionSymbol = Symbol('pino.logFuncs')\nconst hierarchySymbol = Symbol('pino.hierarchy')\n\nconst logFallbackMap = {\n error: 'log',\n fatal: 'error',\n warn: 'error',\n info: 'log',\n debug: 'log',\n trace: 'log'\n}\n\nfunction appendChildLogger (parentLogger, childLogger) {\n const newEntry = {\n logger: childLogger,\n parent: parentLogger[hierarchySymbol]\n }\n childLogger[hierarchySymbol] = newEntry\n}\n\nfunction setupBaseLogFunctions (logger, levels, proto) {\n const logFunctions = {}\n levels.forEach(level => {\n logFunctions[level] = proto[level] ? proto[level] : (_console[level] || _console[logFallbackMap[level] || 'log'] || noop)\n })\n logger[baseLogFunctionSymbol] = logFunctions\n}\n\nfunction shouldSerialize (serialize, serializers) {\n if (Array.isArray(serialize)) {\n const hasToFilter = serialize.filter(function (k) {\n return k !== '!stdSerializers.err'\n })\n return hasToFilter\n } else if (serialize === true) {\n return Object.keys(serializers)\n }\n\n return false\n}\n\nfunction pino (opts) {\n opts = opts || {}\n opts.browser = opts.browser || {}\n\n const transmit = opts.browser.transmit\n if (transmit && typeof transmit.send !== 'function') { throw Error('pino: transmit option must have a send function') }\n\n const proto = opts.browser.write || _console\n if (opts.browser.write) opts.browser.asObject = true\n const serializers = opts.serializers || {}\n const serialize = shouldSerialize(opts.browser.serialize, serializers)\n let stdErrSerialize = opts.browser.serialize\n\n if (\n Array.isArray(opts.browser.serialize) &&\n opts.browser.serialize.indexOf('!stdSerializers.err') > -1\n ) stdErrSerialize = false\n\n const customLevels = Object.keys(opts.customLevels || {})\n const levels = ['error', 'fatal', 'warn', 'info', 'debug', 'trace'].concat(customLevels)\n\n if (typeof proto === 'function') {\n levels.forEach(function (level) {\n proto[level] = proto\n })\n }\n if (opts.enabled === false || opts.browser.disabled) opts.level = 'silent'\n const level = opts.level || 'info'\n const logger = Object.create(proto)\n if (!logger.log) logger.log = noop\n\n setupBaseLogFunctions(logger, levels, proto)\n // setup root hierarchy entry\n appendChildLogger({}, logger)\n\n Object.defineProperty(logger, 'levelVal', {\n get: getLevelVal\n })\n Object.defineProperty(logger, 'level', {\n get: getLevel,\n set: setLevel\n })\n\n const setOpts = {\n transmit,\n serialize,\n asObject: opts.browser.asObject,\n formatters: opts.browser.formatters,\n levels,\n timestamp: getTimeFunction(opts),\n messageKey: opts.messageKey || 'msg',\n onChild: opts.onChild || noop\n }\n logger.levels = getLevels(opts)\n logger.level = level\n\n logger.setMaxListeners = logger.getMaxListeners =\n logger.emit = logger.addListener = logger.on =\n logger.prependListener = logger.once =\n logger.prependOnceListener = logger.removeListener =\n logger.removeAllListeners = logger.listeners =\n logger.listenerCount = logger.eventNames =\n logger.write = logger.flush = noop\n logger.serializers = serializers\n logger._serialize = serialize\n logger._stdErrSerialize = stdErrSerialize\n logger.child = function (...args) { return child.call(this, setOpts, ...args) }\n\n if (transmit) logger._logEvent = createLogEventShape()\n\n function getLevelVal () {\n return levelToValue(this.level, this)\n }\n\n function getLevel () {\n return this._level\n }\n function setLevel (level) {\n if (level !== 'silent' && !this.levels.values[level]) {\n throw Error('unknown level ' + level)\n }\n this._level = level\n\n set(this, setOpts, logger, 'error') // <-- must stay first\n set(this, setOpts, logger, 'fatal')\n set(this, setOpts, logger, 'warn')\n set(this, setOpts, logger, 'info')\n set(this, setOpts, logger, 'debug')\n set(this, setOpts, logger, 'trace')\n\n customLevels.forEach((level) => {\n set(this, setOpts, logger, level)\n })\n }\n\n function child (setOpts, bindings, childOptions) {\n if (!bindings) {\n throw new Error('missing bindings for child Pino')\n }\n childOptions = childOptions || {}\n if (serialize && bindings.serializers) {\n childOptions.serializers = bindings.serializers\n }\n const childOptionsSerializers = childOptions.serializers\n if (serialize && childOptionsSerializers) {\n var childSerializers = Object.assign({}, serializers, childOptionsSerializers)\n var childSerialize = opts.browser.serialize === true\n ? Object.keys(childSerializers)\n : serialize\n delete bindings.serializers\n applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize)\n }\n function Child (parent) {\n this._childLevel = (parent._childLevel | 0) + 1\n\n // make sure bindings are available in the `set` function\n this.bindings = bindings\n\n if (childSerializers) {\n this.serializers = childSerializers\n this._serialize = childSerialize\n }\n if (transmit) {\n this._logEvent = createLogEventShape(\n [].concat(parent._logEvent.bindings, bindings)\n )\n }\n }\n Child.prototype = this\n const newLogger = new Child(this)\n\n // must happen before the level is assigned\n appendChildLogger(this, newLogger)\n newLogger.child = function (...args) { return child.call(this, setOpts, ...args) }\n // required to actually initialize the logger functions for any given child\n newLogger.level = childOptions.level || this.level // allow level to be set by childOptions\n setOpts.onChild(newLogger)\n\n return newLogger\n }\n return logger\n}\n\nfunction getLevels (opts) {\n const customLevels = opts.customLevels || {}\n\n const values = Object.assign({}, pino.levels.values, customLevels)\n const labels = Object.assign({}, pino.levels.labels, invertObject(customLevels))\n\n return {\n values,\n labels\n }\n}\n\nfunction invertObject (obj) {\n const inverted = {}\n Object.keys(obj).forEach(function (key) {\n inverted[obj[key]] = key\n })\n return inverted\n}\n\npino.levels = {\n values: {\n fatal: 60,\n error: 50,\n warn: 40,\n info: 30,\n debug: 20,\n trace: 10\n },\n labels: {\n 10: 'trace',\n 20: 'debug',\n 30: 'info',\n 40: 'warn',\n 50: 'error',\n 60: 'fatal'\n }\n}\n\npino.stdSerializers = stdSerializers\npino.stdTimeFunctions = Object.assign({}, { nullTime, epochTime, unixTime, isoTime })\n\nfunction getBindingChain (logger) {\n const bindings = []\n if (logger.bindings) {\n bindings.push(logger.bindings)\n }\n\n // traverse up the tree to get all bindings\n let hierarchy = logger[hierarchySymbol]\n while (hierarchy.parent) {\n hierarchy = hierarchy.parent\n if (hierarchy.logger.bindings) {\n bindings.push(hierarchy.logger.bindings)\n }\n }\n\n return bindings.reverse()\n}\n\nfunction set (self, opts, rootLogger, level) {\n // override the current log functions with either `noop` or the base log function\n Object.defineProperty(self, level, {\n value: (levelToValue(self.level, rootLogger) > levelToValue(level, rootLogger)\n ? noop\n : rootLogger[baseLogFunctionSymbol][level]),\n writable: true,\n enumerable: true,\n configurable: true\n })\n\n if (self[level] === noop) {\n if (!opts.transmit) return\n\n const transmitLevel = opts.transmit.level || self.level\n const transmitValue = rootLogger.levels.values[transmitLevel]\n const methodValue = rootLogger.levels.values[level]\n if (methodValue < transmitValue) return\n }\n\n // make sure the log format is correct\n self[level] = createWrap(self, opts, rootLogger, level)\n\n // prepend bindings if it is not the root logger\n const bindings = getBindingChain(self)\n if (bindings.length === 0) {\n // early exit in case for rootLogger\n return\n }\n self[level] = prependBindingsInArguments(bindings, self[level])\n}\n\nfunction prependBindingsInArguments (bindings, logFunc) {\n return function () {\n return logFunc.apply(this, [...bindings, ...arguments])\n }\n}\n\nfunction createWrap (self, opts, rootLogger, level) {\n return (function (write) {\n return function LOG () {\n const ts = opts.timestamp()\n const args = new Array(arguments.length)\n const proto = (Object.getPrototypeOf && Object.getPrototypeOf(this) === _console) ? _console : this\n for (var i = 0; i < args.length; i++) args[i] = arguments[i]\n\n var argsIsSerialized = false\n if (opts.serialize) {\n applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize)\n argsIsSerialized = true\n }\n if (opts.asObject || opts.formatters) {\n write.call(proto, asObject(this, level, args, ts, opts))\n } else write.apply(proto, args)\n\n if (opts.transmit) {\n const transmitLevel = opts.transmit.level || self._level\n const transmitValue = rootLogger.levels.values[transmitLevel]\n const methodValue = rootLogger.levels.values[level]\n if (methodValue < transmitValue) return\n transmit(this, {\n ts,\n methodLevel: level,\n methodValue,\n transmitLevel,\n transmitValue: rootLogger.levels.values[opts.transmit.level || self._level],\n send: opts.transmit.send,\n val: levelToValue(self._level, rootLogger)\n }, args, argsIsSerialized)\n }\n }\n })(self[baseLogFunctionSymbol][level])\n}\n\nfunction asObject (logger, level, args, ts, opts) {\n const {\n level: levelFormatter,\n log: logObjectFormatter = (obj) => obj\n } = opts.formatters || {}\n const argsCloned = args.slice()\n let msg = argsCloned[0]\n const logObject = {}\n if (ts) {\n logObject.time = ts\n }\n\n if (levelFormatter) {\n const formattedLevel = levelFormatter(level, logger.levels.values[level])\n Object.assign(logObject, formattedLevel)\n } else {\n logObject.level = logger.levels.values[level]\n }\n\n let lvl = (logger._childLevel | 0) + 1\n if (lvl < 1) lvl = 1\n // deliberate, catching objects, arrays\n if (msg !== null && typeof msg === 'object') {\n while (lvl-- && typeof argsCloned[0] === 'object') {\n Object.assign(logObject, argsCloned.shift())\n }\n msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : undefined\n } else if (typeof msg === 'string') msg = format(argsCloned.shift(), argsCloned)\n if (msg !== undefined) logObject[opts.messageKey] = msg\n\n const formattedLogObject = logObjectFormatter(logObject)\n return formattedLogObject\n}\n\nfunction applySerializers (args, serialize, serializers, stdErrSerialize) {\n for (const i in args) {\n if (stdErrSerialize && args[i] instanceof Error) {\n args[i] = pino.stdSerializers.err(args[i])\n } else if (typeof args[i] === 'object' && !Array.isArray(args[i]) && serialize) {\n for (const k in args[i]) {\n if (serialize.indexOf(k) > -1 && k in serializers) {\n args[i][k] = serializers[k](args[i][k])\n }\n }\n }\n }\n}\n\nfunction transmit (logger, opts, args, argsIsSerialized = false) {\n const send = opts.send\n const ts = opts.ts\n const methodLevel = opts.methodLevel\n const methodValue = opts.methodValue\n const val = opts.val\n const bindings = logger._logEvent.bindings\n\n if (!argsIsSerialized) {\n applySerializers(\n args,\n logger._serialize || Object.keys(logger.serializers),\n logger.serializers,\n logger._stdErrSerialize === undefined ? true : logger._stdErrSerialize\n )\n }\n\n logger._logEvent.ts = ts\n logger._logEvent.messages = args.filter(function (arg) {\n // bindings can only be objects, so reference equality check via indexOf is fine\n return bindings.indexOf(arg) === -1\n })\n\n logger._logEvent.level.label = methodLevel\n logger._logEvent.level.value = methodValue\n\n send(methodLevel, logger._logEvent, val)\n\n logger._logEvent = createLogEventShape(bindings)\n}\n\nfunction createLogEventShape (bindings) {\n return {\n ts: 0,\n messages: [],\n bindings: bindings || [],\n level: { label: '', value: 0 }\n }\n}\n\nfunction asErrValue (err) {\n const obj = {\n type: err.constructor.name,\n msg: err.message,\n stack: err.stack\n }\n for (const key in err) {\n if (obj[key] === undefined) {\n obj[key] = err[key]\n }\n }\n return obj\n}\n\nfunction getTimeFunction (opts) {\n if (typeof opts.timestamp === 'function') {\n return opts.timestamp\n }\n if (opts.timestamp === false) {\n return nullTime\n }\n return epochTime\n}\n\nfunction mock () { return {} }\nfunction passthrough (a) { return a }\nfunction noop () {}\n\nfunction nullTime () { return false }\nfunction epochTime () { return Date.now() }\nfunction unixTime () { return Math.round(Date.now() / 1000.0) }\nfunction isoTime () { return new Date(Date.now()).toISOString() } // using Date.now() for testability\n\n/* eslint-disable */\n/* istanbul ignore next */\nfunction pfGlobalThisOrFallback () {\n function defd (o) { return typeof o !== 'undefined' && o }\n try {\n if (typeof globalThis !== 'undefined') return globalThis\n Object.defineProperty(Object.prototype, 'globalThis', {\n get: function () {\n delete Object.prototype.globalThis\n return (this.globalThis = this)\n },\n configurable: true\n })\n return globalThis\n } catch (e) {\n return defd(self) || defd(window) || defd(this) || {}\n }\n}\n/* eslint-enable */\n\nmodule.exports.default = pino\nmodule.exports.pino = pino\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import isRetryAllowed from 'is-retry-allowed';\nexport const namespace = 'axios-retry';\nexport function isNetworkError(error) {\n const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];\n if (error.response) {\n return false;\n }\n if (!error.code) {\n return false;\n }\n // Prevents retrying timed out & cancelled requests\n if (CODE_EXCLUDE_LIST.includes(error.code)) {\n return false;\n }\n // Prevents retrying unsafe errors\n return isRetryAllowed(error);\n}\nconst SAFE_HTTP_METHODS = ['get', 'head', 'options'];\nconst IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);\nexport function isRetryableError(error) {\n return (error.code !== 'ECONNABORTED' &&\n (!error.response ||\n error.response.status === 429 ||\n (error.response.status >= 500 && error.response.status <= 599)));\n}\nexport function isSafeRequestError(error) {\n if (!error.config?.method) {\n // Cannot determine if the request can be retried\n return false;\n }\n return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;\n}\nexport function isIdempotentRequestError(error) {\n if (!error.config?.method) {\n // Cannot determine if the request can be retried\n return false;\n }\n return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;\n}\nexport function isNetworkOrIdempotentRequestError(error) {\n return isNetworkError(error) || isIdempotentRequestError(error);\n}\nexport function retryAfter(error = undefined) {\n const retryAfterHeader = error?.response?.headers['retry-after'];\n if (!retryAfterHeader) {\n return 0;\n }\n // if the retry after header is a number, convert it to milliseconds\n let retryAfterMs = (Number(retryAfterHeader) || 0) * 1000;\n // If the retry after header is a date, get the number of milliseconds until that date\n if (retryAfterMs === 0) {\n retryAfterMs = (new Date(retryAfterHeader).valueOf() || 0) - Date.now();\n }\n return Math.max(0, retryAfterMs);\n}\nfunction noDelay(_retryNumber = 0, error = undefined) {\n return Math.max(0, retryAfter(error));\n}\nexport function exponentialDelay(retryNumber = 0, error = undefined, delayFactor = 100) {\n const calculatedDelay = 2 ** retryNumber * delayFactor;\n const delay = Math.max(calculatedDelay, retryAfter(error));\n const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay\n return delay + randomSum;\n}\n/**\n * Linear delay\n * @param {number | undefined} delayFactor - delay factor in milliseconds (default: 100)\n * @returns {function} (retryNumber: number, error: AxiosError | undefined) => number\n */\nexport function linearDelay(delayFactor = 100) {\n return (retryNumber = 0, error = undefined) => {\n const delay = retryNumber * delayFactor;\n return Math.max(delay, retryAfter(error));\n };\n}\nexport const DEFAULT_OPTIONS = {\n retries: 3,\n retryCondition: isNetworkOrIdempotentRequestError,\n retryDelay: noDelay,\n shouldResetTimeout: false,\n onRetry: () => { },\n onMaxRetryTimesExceeded: () => { },\n validateResponse: null\n};\nfunction getRequestOptions(config, defaultOptions) {\n return { ...DEFAULT_OPTIONS, ...defaultOptions, ...config[namespace] };\n}\nfunction setCurrentState(config, defaultOptions, resetLastRequestTime = false) {\n const currentState = getRequestOptions(config, defaultOptions || {});\n currentState.retryCount = currentState.retryCount || 0;\n if (!currentState.lastRequestTime || resetLastRequestTime) {\n currentState.lastRequestTime = Date.now();\n }\n config[namespace] = currentState;\n return currentState;\n}\nfunction fixConfig(axiosInstance, config) {\n // @ts-ignore\n if (axiosInstance.defaults.agent === config.agent) {\n // @ts-ignore\n delete config.agent;\n }\n if (axiosInstance.defaults.httpAgent === config.httpAgent) {\n delete config.httpAgent;\n }\n if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {\n delete config.httpsAgent;\n }\n}\nasync function shouldRetry(currentState, error) {\n const { retries, retryCondition } = currentState;\n const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);\n // This could be a promise\n if (typeof shouldRetryOrPromise === 'object') {\n try {\n const shouldRetryPromiseResult = await shouldRetryOrPromise;\n // keep return true unless shouldRetryPromiseResult return false for compatibility\n return shouldRetryPromiseResult !== false;\n }\n catch (_err) {\n return false;\n }\n }\n return shouldRetryOrPromise;\n}\nasync function handleRetry(axiosInstance, currentState, error, config) {\n currentState.retryCount += 1;\n const { retryDelay, shouldResetTimeout, onRetry } = currentState;\n const delay = retryDelay(currentState.retryCount, error);\n // Axios fails merging this configuration to the default configuration because it has an issue\n // with circular structures: https://github.com/mzabriskie/axios/issues/370\n fixConfig(axiosInstance, config);\n if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {\n const lastRequestDuration = Date.now() - currentState.lastRequestTime;\n const timeout = config.timeout - lastRequestDuration - delay;\n if (timeout <= 0) {\n return Promise.reject(error);\n }\n config.timeout = timeout;\n }\n config.transformRequest = [(data) => data];\n await onRetry(currentState.retryCount, error, config);\n if (config.signal?.aborted) {\n return Promise.resolve(axiosInstance(config));\n }\n return new Promise((resolve) => {\n const abortListener = () => {\n clearTimeout(timeout);\n resolve(axiosInstance(config));\n };\n const timeout = setTimeout(() => {\n resolve(axiosInstance(config));\n if (config.signal?.removeEventListener) {\n config.signal.removeEventListener('abort', abortListener);\n }\n }, delay);\n if (config.signal?.addEventListener) {\n config.signal.addEventListener('abort', abortListener, { once: true });\n }\n });\n}\nasync function handleMaxRetryTimesExceeded(currentState, error) {\n if (currentState.retryCount >= currentState.retries)\n await currentState.onMaxRetryTimesExceeded(error, currentState.retryCount);\n}\nconst axiosRetry = (axiosInstance, defaultOptions) => {\n const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {\n setCurrentState(config, defaultOptions, true);\n if (config[namespace]?.validateResponse) {\n // by setting this, all HTTP responses will be go through the error interceptor first\n config.validateStatus = () => false;\n }\n return config;\n });\n const responseInterceptorId = axiosInstance.interceptors.response.use(null, async (error) => {\n const { config } = error;\n // If we have no information to retry the request\n if (!config) {\n return Promise.reject(error);\n }\n const currentState = setCurrentState(config, defaultOptions);\n if (error.response && currentState.validateResponse?.(error.response)) {\n // no issue with response\n return error.response;\n }\n if (await shouldRetry(currentState, error)) {\n return handleRetry(axiosInstance, currentState, error, config);\n }\n await handleMaxRetryTimesExceeded(currentState, error);\n return Promise.reject(error);\n });\n return { requestInterceptorId, responseInterceptorId };\n};\n// Compatibility with CommonJS\naxiosRetry.isNetworkError = isNetworkError;\naxiosRetry.isSafeRequestError = isSafeRequestError;\naxiosRetry.isIdempotentRequestError = isIdempotentRequestError;\naxiosRetry.isNetworkOrIdempotentRequestError = isNetworkOrIdempotentRequestError;\naxiosRetry.exponentialDelay = exponentialDelay;\naxiosRetry.linearDelay = linearDelay;\naxiosRetry.isRetryableError = isRetryableError;\nexport default axiosRetry;\n","var e=Symbol(\"cache-parser\");function r(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t=0&&e=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}(e.toLowerCase().replace(/\\s+/g,\"\").split(\",\"));!(t=n()).done;){var o,i=t.value.split(\"=\",2);a[i[0]]=null==(o=i[1])||o}return a}(o),l=s[\"max-age\"],u=s[\"max-stale\"],m=s[\"min-fresh\"],p=s[\"s-maxage\"],f=s[\"stale-if-error\"],c=s[\"stale-while-revalidate\"];return a(s.immutable)&&(i.immutable=!0),t(l)&&(i.maxAge=n(l)),t(u)&&(i.maxStale=n(u)),t(m)&&(i.minFresh=n(m)),a(s[\"must-revalidate\"])&&(i.mustRevalidate=!0),a(s[\"must-understand\"])&&(i.mustUnderstand=!0),a(s[\"no-cache\"])&&(i.noCache=!0),a(s[\"no-store\"])&&(i.noStore=!0),a(s[\"no-transform\"])&&(i.noTransform=!0),a(s[\"only-if-cached\"])&&(i.onlyIfCached=!0),a(s.private)&&(i.private=!0),a(s[\"proxy-revalidate\"])&&(i.proxyRevalidate=!0),a(s.public)&&(i.public=!0),t(p)&&(i.sMaxAge=n(p)),t(f)&&(i.staleIfError=n(f)),t(c)&&(i.staleWhileRevalidate=n(c)),i}function i(e){if(!e||\"object\"!=typeof e)return[];var r=[];return a(e.immutable)&&r.push(\"immutable\"),t(e.maxAge)&&r.push(\"max-age=\"+e.maxAge),t(e.maxStale)&&r.push(\"max-stale=\"+e.maxStale),t(e.minFresh)&&r.push(\"min-fresh=\"+e.minFresh),a(e.mustRevalidate)&&r.push(\"must-revalidate\"),a(e.mustUnderstand)&&r.push(\"must-understand\"),a(e.noCache)&&r.push(\"no-cache\"),a(e.noStore)&&r.push(\"no-store\"),a(e.noTransform)&&r.push(\"no-transform\"),a(e.onlyIfCached)&&r.push(\"only-if-cached\"),a(e.private)&&r.push(\"private\"),a(e.proxyRevalidate)&&r.push(\"proxy-revalidate\"),a(e.public)&&r.push(\"public\"),t(e.sMaxAge)&&r.push(\"s-maxage=\"+e.sMaxAge),t(e.staleIfError)&&r.push(\"stale-if-error=\"+e.staleIfError),t(e.staleWhileRevalidate)&&r.push(\"stale-while-revalidate=\"+e.staleWhileRevalidate),r}function s(r){return!!r&&!!r[e]}export{s as isCacheControl,o as parse,i as tokenize};\n//# sourceMappingURL=index.mjs.map\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;tr?1:-1}function r(o,e){var n=5381;if(\"object\"==typeof o&&null!==o&&(o.toString===Object.prototype.toString||o.toString===Array.prototype.toString)){e||(e=new WeakSet);for(var i=Object.keys(o).sort(t),a=0;a{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\n\nconst EMPTY_CACHE = {};\nconst INITIAL_CACHE = {};\nconst STR_UNDEFINED = 'undefined';\n// NOTE: Use the function to guarantee it's re-evaluated between jsdom and node runtime for tests.\nconst isWindowDefined = typeof window != STR_UNDEFINED;\nconst isDocumentDefined = typeof document != STR_UNDEFINED;\nconst isLegacyDeno = isWindowDefined && 'Deno' in window;\nconst hasRequestAnimationFrame = ()=>isWindowDefined && typeof window['requestAnimationFrame'] != STR_UNDEFINED;\nconst createCacheHelper = (cache, key)=>{\n const state = SWRGlobalState.get(cache);\n return [\n // Getter\n ()=>!isUndefined(key) && cache.get(key) || EMPTY_CACHE,\n // Setter\n (info)=>{\n if (!isUndefined(key)) {\n const prev = cache.get(key);\n // Before writing to the store, we keep the value in the initial cache\n // if it's not there yet.\n if (!(key in INITIAL_CACHE)) {\n INITIAL_CACHE[key] = prev;\n }\n state[5](key, mergeObjects(prev, info), prev || EMPTY_CACHE);\n }\n },\n // Subscriber\n state[6],\n // Get server cache snapshot\n ()=>{\n if (!isUndefined(key)) {\n // If the cache was updated on the client, we return the stored initial value.\n if (key in INITIAL_CACHE) return INITIAL_CACHE[key];\n }\n // If we haven't done any client-side updates, we return the current value.\n return !isUndefined(key) && cache.get(key) || EMPTY_CACHE;\n }\n ];\n} // export { UNDEFINED, OBJECT, isUndefined, isFunction, mergeObjects, isPromiseLike }\n;\n\n/**\n * Due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,\n * it's not reliable to detect if the browser is currently online or offline\n * based on `navigator.onLine`.\n * As a workaround, we always assume it's online on the first load, and change\n * the status upon `online` or `offline` events.\n */ let online = true;\nconst isOnline = ()=>online;\n// For node and React Native, `add/removeEventListener` doesn't exist on window.\nconst [onWindowEvent, offWindowEvent] = isWindowDefined && window.addEventListener ? [\n window.addEventListener.bind(window),\n window.removeEventListener.bind(window)\n] : [\n noop,\n noop\n];\nconst isVisible = ()=>{\n const visibilityState = isDocumentDefined && document.visibilityState;\n return isUndefined(visibilityState) || visibilityState !== 'hidden';\n};\nconst initFocus = (callback)=>{\n // focus revalidate\n if (isDocumentDefined) {\n document.addEventListener('visibilitychange', callback);\n }\n onWindowEvent('focus', callback);\n return ()=>{\n if (isDocumentDefined) {\n document.removeEventListener('visibilitychange', callback);\n }\n offWindowEvent('focus', callback);\n };\n};\nconst initReconnect = (callback)=>{\n // revalidate on reconnected\n const onOnline = ()=>{\n online = true;\n callback();\n };\n // nothing to revalidate, just update the status\n const onOffline = ()=>{\n online = false;\n };\n onWindowEvent('online', onOnline);\n onWindowEvent('offline', onOffline);\n return ()=>{\n offWindowEvent('online', onOnline);\n offWindowEvent('offline', onOffline);\n };\n};\nconst preset = {\n isOnline,\n isVisible\n};\nconst defaultConfigOptions = {\n initFocus,\n initReconnect\n};\n\nconst IS_REACT_LEGACY = !React.useId;\nconst IS_SERVER = !isWindowDefined || isLegacyDeno;\n// Polyfill requestAnimationFrame\nconst rAF = (f)=>hasRequestAnimationFrame() ? window['requestAnimationFrame'](f) : setTimeout(f, 1);\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nconst useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\n// This assignment is to extend the Navigator type to use effectiveType.\nconst navigatorConnection = typeof navigator !== 'undefined' && navigator.connection;\n// Adjust the config based on slow connection status (<= 70Kbps).\nconst slowConnection = !IS_SERVER && navigatorConnection && ([\n 'slow-2g',\n '2g'\n].includes(navigatorConnection.effectiveType) || navigatorConnection.saveData);\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst isObjectType = (value, type)=>OBJECT.prototype.toString.call(value) === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const isDate = isObjectType(arg, 'Date');\n const isRegex = isObjectType(arg, 'RegExp');\n const isPlainObject = isObjectType(arg, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\n// Global timestamp.\nlet __timestamp = 0;\nconst getTimestamp = ()=>++__timestamp;\n\nasync function internalMutate(...args) {\n const [cache, _key, _data, _opts] = args;\n // When passing as a boolean, it's explicitly used to disable/enable\n // revalidation.\n const options = mergeObjects({\n populateCache: true,\n throwOnError: true\n }, typeof _opts === 'boolean' ? {\n revalidate: _opts\n } : _opts || {});\n let populateCache = options.populateCache;\n const rollbackOnErrorOption = options.rollbackOnError;\n let optimisticData = options.optimisticData;\n const rollbackOnError = (error)=>{\n return typeof rollbackOnErrorOption === 'function' ? rollbackOnErrorOption(error) : rollbackOnErrorOption !== false;\n };\n const throwOnError = options.throwOnError;\n // If the second argument is a key filter, return the mutation results for all\n // filtered keys.\n if (isFunction(_key)) {\n const keyFilter = _key;\n const matchedKeys = [];\n const it = cache.keys();\n for (const key of it){\n if (// Skip the special useSWRInfinite and useSWRSubscription keys.\n !/^\\$(inf|sub)\\$/.test(key) && keyFilter(cache.get(key)._k)) {\n matchedKeys.push(key);\n }\n }\n return Promise.all(matchedKeys.map(mutateByKey));\n }\n return mutateByKey(_key);\n async function mutateByKey(_k) {\n // Serialize key\n const [key] = serialize(_k);\n if (!key) return;\n const [get, set] = createCacheHelper(cache, key);\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n const startRevalidate = ()=>{\n const revalidators = EVENT_REVALIDATORS[key];\n const revalidate = isFunction(options.revalidate) ? options.revalidate(get().data, _k) : options.revalidate !== false;\n if (revalidate) {\n // Invalidate the key by deleting the concurrent request markers so new\n // requests will not be deduped.\n delete FETCH[key];\n delete PRELOAD[key];\n if (revalidators && revalidators[0]) {\n return revalidators[0](revalidateEvents.MUTATE_EVENT).then(()=>get().data);\n }\n }\n return get().data;\n };\n // If there is no new data provided, revalidate the key with current state.\n if (args.length < 3) {\n // Revalidate and broadcast state.\n return startRevalidate();\n }\n let data = _data;\n let error;\n // Update global timestamps.\n const beforeMutationTs = getTimestamp();\n MUTATION[key] = [\n beforeMutationTs,\n 0\n ];\n const hasOptimisticData = !isUndefined(optimisticData);\n const state = get();\n // `displayedData` is the current value on screen. It could be the optimistic value\n // that is going to be overridden by a `committedData`, or get reverted back.\n // `committedData` is the validated value that comes from a fetch or mutation.\n const displayedData = state.data;\n const currentData = state._c;\n const committedData = isUndefined(currentData) ? displayedData : currentData;\n // Do optimistic data update.\n if (hasOptimisticData) {\n optimisticData = isFunction(optimisticData) ? optimisticData(committedData, displayedData) : optimisticData;\n // When we set optimistic data, backup the current committedData data in `_c`.\n set({\n data: optimisticData,\n _c: committedData\n });\n }\n if (isFunction(data)) {\n // `data` is a function, call it passing current cache value.\n try {\n data = data(committedData);\n } catch (err) {\n // If it throws an error synchronously, we shouldn't update the cache.\n error = err;\n }\n }\n // `data` is a promise/thenable, resolve the final data first.\n if (data && isPromiseLike(data)) {\n // This means that the mutation is async, we need to check timestamps to\n // avoid race conditions.\n data = await data.catch((err)=>{\n error = err;\n });\n // Check if other mutations have occurred since we've started this mutation.\n // If there's a race we don't update cache or broadcast the change,\n // just return the data.\n if (beforeMutationTs !== MUTATION[key][0]) {\n if (error) throw error;\n return data;\n } else if (error && hasOptimisticData && rollbackOnError(error)) {\n // Rollback. Always populate the cache in this case but without\n // transforming the data.\n populateCache = true;\n // Reset data to be the latest committed data, and clear the `_c` value.\n set({\n data: committedData,\n _c: UNDEFINED\n });\n }\n }\n // If we should write back the cache after request.\n if (populateCache) {\n if (!error) {\n // Transform the result into data.\n if (isFunction(populateCache)) {\n const populateCachedData = populateCache(data, committedData);\n set({\n data: populateCachedData,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n } else {\n // Only update cached data and reset the error if there's no error. Data can be `undefined` here.\n set({\n data,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n }\n }\n }\n // Reset the timestamp to mark the mutation has ended.\n MUTATION[key][1] = getTimestamp();\n // Update existing SWR Hooks' internal states:\n Promise.resolve(startRevalidate()).then(()=>{\n // The mutation and revalidation are ended, we can clear it since the data is\n // not an optimistic value anymore.\n set({\n _c: UNDEFINED\n });\n });\n // Throw error or return data\n if (error) {\n if (throwOnError) throw error;\n return;\n }\n return data;\n }\n}\n\nconst revalidateAllKeys = (revalidators, type)=>{\n for(const key in revalidators){\n if (revalidators[key][0]) revalidators[key][0](type);\n }\n};\nconst initCache = (provider, options)=>{\n // The global state for a specific provider will be used to deduplicate\n // requests and store listeners. As well as a mutate function that is bound to\n // the cache.\n // The provider's global state might be already initialized. Let's try to get the\n // global state associated with the provider first.\n if (!SWRGlobalState.has(provider)) {\n const opts = mergeObjects(defaultConfigOptions, options);\n // If there's no global state bound to the provider, create a new one with the\n // new mutate function.\n const EVENT_REVALIDATORS = Object.create(null);\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = Object.create(null);\n const subscribe = (key, callback)=>{\n const subs = subscriptions[key] || [];\n subscriptions[key] = subs;\n subs.push(callback);\n return ()=>subs.splice(subs.indexOf(callback), 1);\n };\n const setter = (key, value, prev)=>{\n provider.set(key, value);\n const subs = subscriptions[key];\n if (subs) {\n for (const fn of subs){\n fn(value, prev);\n }\n }\n };\n const initProvider = ()=>{\n if (!SWRGlobalState.has(provider)) {\n // Update the state if it's new, or if the provider has been extended.\n SWRGlobalState.set(provider, [\n EVENT_REVALIDATORS,\n Object.create(null),\n Object.create(null),\n Object.create(null),\n mutate,\n setter,\n subscribe\n ]);\n if (!IS_SERVER) {\n // When listening to the native events for auto revalidations,\n // we intentionally put a delay (setTimeout) here to make sure they are\n // fired after immediate JavaScript executions, which can be\n // React's state updates.\n // This avoids some unnecessary revalidations such as\n // https://github.com/vercel/swr/issues/1680.\n const releaseFocus = opts.initFocus(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents.FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, revalidateEvents.RECONNECT_EVENT)));\n unmount = ()=>{\n releaseFocus && releaseFocus();\n releaseReconnect && releaseReconnect();\n // When un-mounting, we need to remove the cache provider from the state\n // storage too because it's a side-effect. Otherwise, when re-mounting we\n // will not re-register those event listeners.\n SWRGlobalState.delete(provider);\n };\n }\n }\n };\n initProvider();\n // This is a new provider, we need to initialize it and setup DOM events\n // listeners for `focus` and `reconnect` actions.\n // We might want to inject an extra layer on top of `provider` in the future,\n // such as key serialization, auto GC, etc.\n // For now, it's just a `Map` interface without any modifications.\n return [\n provider,\n mutate,\n initProvider,\n unmount\n ];\n }\n return [\n provider,\n SWRGlobalState.get(provider)[4]\n ];\n};\n\n// error retry\nconst onErrorRetry = (_, __, config, revalidate, opts)=>{\n const maxRetryCount = config.errorRetryCount;\n const currentRetryCount = opts.retryCount;\n // Exponential backoff\n const timeout = ~~((Math.random() + 0.5) * (1 << (currentRetryCount < 8 ? currentRetryCount : 8))) * config.errorRetryInterval;\n if (!isUndefined(maxRetryCount) && currentRetryCount > maxRetryCount) {\n return;\n }\n setTimeout(revalidate, timeout, opts);\n};\nconst compare = dequal;\n// Default cache provider\nconst [cache, mutate] = initCache(new Map());\n// Default config\nconst defaultConfig = mergeObjects({\n // events\n onLoadingSlow: noop,\n onSuccess: noop,\n onError: noop,\n onErrorRetry,\n onDiscarded: noop,\n // switches\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n revalidateIfStale: true,\n shouldRetryOnError: true,\n // timeouts\n errorRetryInterval: slowConnection ? 10000 : 5000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: slowConnection ? 5000 : 3000,\n // providers\n compare,\n isPaused: ()=>false,\n cache,\n mutate,\n fallback: {}\n}, // use web preset by default\npreset);\n\nconst mergeConfigs = (a, b)=>{\n // Need to create a new object to avoid mutating the original here.\n const v = mergeObjects(a, b);\n // If two configs are provided, merge their `use` and `fallback` options.\n if (b) {\n const { use: u1, fallback: f1 } = a;\n const { use: u2, fallback: f2 } = b;\n if (u1 && u2) {\n v.use = u1.concat(u2);\n }\n if (f1 && f2) {\n v.fallback = mergeObjects(f1, f2);\n }\n }\n return v;\n};\n\nconst SWRConfigContext = createContext({});\nconst SWRConfig = (props)=>{\n const { value } = props;\n const parentConfig = useContext(SWRConfigContext);\n const isFunctionalConfig = isFunction(value);\n const config = useMemo(()=>isFunctionalConfig ? value(parentConfig) : value, [\n isFunctionalConfig,\n parentConfig,\n value\n ]);\n // Extend parent context values and middleware.\n const extendedConfig = useMemo(()=>isFunctionalConfig ? config : mergeConfigs(parentConfig, config), [\n isFunctionalConfig,\n parentConfig,\n config\n ]);\n // Should not use the inherited provider.\n const provider = config && config.provider;\n // initialize the cache only on first access.\n const cacheContextRef = useRef(UNDEFINED);\n if (provider && !cacheContextRef.current) {\n cacheContextRef.current = initCache(provider(extendedConfig.cache || cache), config);\n }\n const cacheContext = cacheContextRef.current;\n // Override the cache if a new provider is given.\n if (cacheContext) {\n extendedConfig.cache = cacheContext[0];\n extendedConfig.mutate = cacheContext[1];\n }\n // Unsubscribe events.\n useIsomorphicLayoutEffect(()=>{\n if (cacheContext) {\n cacheContext[2] && cacheContext[2]();\n return cacheContext[3];\n }\n }, []);\n return createElement(SWRConfigContext.Provider, mergeObjects(props, {\n value: extendedConfig\n }));\n};\n\nexport { noop as A, isPromiseLike as B, IS_REACT_LEGACY as I, OBJECT as O, SWRConfigContext as S, UNDEFINED as U, isFunction as a, SWRGlobalState as b, cache as c, defaultConfig as d, isUndefined as e, mergeConfigs as f, SWRConfig as g, initCache as h, isWindowDefined as i, mutate as j, compare as k, stableHash as l, mergeObjects as m, internalMutate as n, getTimestamp as o, preset as p, defaultConfigOptions as q, IS_SERVER as r, serialize as s, rAF as t, useIsomorphicLayoutEffect as u, slowConnection as v, isDocumentDefined as w, isLegacyDeno as x, hasRequestAnimationFrame as y, createCacheHelper as z };\n","const FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nexport { ERROR_REVALIDATE_EVENT, FOCUS_EVENT, MUTATE_EVENT, RECONNECT_EVENT };\n","import { i as isWindowDefined, a as isFunction, m as mergeObjects, S as SWRConfigContext, d as defaultConfig, s as serialize, b as SWRGlobalState, c as cache, e as isUndefined, f as mergeConfigs } from './config-context-client-v7VOFo66.mjs';\nexport { I as IS_REACT_LEGACY, r as IS_SERVER, O as OBJECT, g as SWRConfig, U as UNDEFINED, k as compare, z as createCacheHelper, q as defaultConfigOptions, o as getTimestamp, y as hasRequestAnimationFrame, h as initCache, n as internalMutate, w as isDocumentDefined, x as isLegacyDeno, B as isPromiseLike, j as mutate, A as noop, p as preset, t as rAF, v as slowConnection, l as stableHash, u as useIsomorphicLayoutEffect } from './config-context-client-v7VOFo66.mjs';\nimport * as revalidateEvents from './events.mjs';\nexport { revalidateEvents };\nimport { INFINITE_PREFIX } from './constants.mjs';\nexport { INFINITE_PREFIX } from './constants.mjs';\nimport React, { useContext } from 'react';\nexport * from './types.mjs';\n\n// @ts-expect-error\nconst enableDevtools = isWindowDefined && window.__SWR_DEVTOOLS_USE__;\nconst use = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];\nconst setupDevTools = ()=>{\n if (enableDevtools) {\n // @ts-expect-error\n window.__SWR_DEVTOOLS_REACT__ = React;\n }\n};\n\nconst normalize = (args)=>{\n return isFunction(args[1]) ? [\n args[0],\n args[1],\n args[2] || {}\n ] : [\n args[0],\n null,\n (args[1] === null ? args[2] : args[1]) || {}\n ];\n};\n\nconst useSWRConfig = ()=>{\n return mergeObjects(defaultConfig, useContext(SWRConfigContext));\n};\n\nconst preload = (key_, fetcher)=>{\n const [key, fnArg] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n // Prevent preload to be called multiple times before used.\n if (PRELOAD[key]) return PRELOAD[key];\n const req = fetcher(fnArg);\n PRELOAD[key] = req;\n return req;\n};\nconst middleware = (useSWRNext)=>(key_, fetcher_, config)=>{\n // fetcher might be a sync function, so this should not be an async function\n const fetcher = fetcher_ && ((...args)=>{\n const [key] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n if (key.startsWith(INFINITE_PREFIX)) {\n // we want the infinite fetcher to be called.\n // handling of the PRELOAD cache happens there.\n return fetcher_(...args);\n }\n const req = PRELOAD[key];\n if (isUndefined(req)) return fetcher_(...args);\n delete PRELOAD[key];\n return req;\n });\n return useSWRNext(key_, fetcher, config);\n };\n\nconst BUILT_IN_MIDDLEWARE = use.concat(middleware);\n\n// It's tricky to pass generic types as parameters, so we just directly override\n// the types here.\nconst withArgs = (hook)=>{\n return function useSWRArgs(...args) {\n // Get the default and inherited configuration.\n const fallbackConfig = useSWRConfig();\n // Normalize arguments.\n const [key, fn, _config] = normalize(args);\n // Merge configurations.\n const config = mergeConfigs(fallbackConfig, _config);\n // Apply middleware\n let next = hook;\n const { use } = config;\n const middleware = (use || []).concat(BUILT_IN_MIDDLEWARE);\n for(let i = middleware.length; i--;){\n next = middleware[i](next);\n }\n return next(key, fn || config.fetcher || null, config);\n };\n};\n\n// Add a callback function to a list of keyed callback functions and return\n// the unsubscribe function.\nconst subscribeCallback = (key, callbacks, callback)=>{\n const keyedRevalidators = callbacks[key] || (callbacks[key] = []);\n keyedRevalidators.push(callback);\n return ()=>{\n const index = keyedRevalidators.indexOf(callback);\n if (index >= 0) {\n // O(1): faster than splice\n keyedRevalidators[index] = keyedRevalidators[keyedRevalidators.length - 1];\n keyedRevalidators.pop();\n }\n };\n};\n\n// Create a custom hook with a middleware\nconst withMiddleware = (useSWR, middleware)=>{\n return (...args)=>{\n const [key, fn, config] = normalize(args);\n const uses = (config.use || []).concat(middleware);\n return useSWR(key, fn, {\n ...config,\n use: uses\n });\n };\n};\n\nsetupDevTools();\n\nexport { SWRGlobalState, cache, defaultConfig, isFunction, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, normalize, preload, serialize, subscribeCallback, useSWRConfig, withArgs, withMiddleware };\n","const INFINITE_PREFIX = '$inf$';\n\nexport { INFINITE_PREFIX };\n","import React, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { OBJECT as OBJECT$1, SWRConfig as SWRConfig$1, defaultConfig, withArgs, SWRGlobalState, serialize as serialize$1, createCacheHelper, isUndefined as isUndefined$1, UNDEFINED as UNDEFINED$1, isPromiseLike, getTimestamp, isFunction as isFunction$1, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects } from '../_internal/index.mjs';\nexport { mutate, preload, useSWRConfig } from '../_internal/index.mjs';\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\nconst isObjectType = (value, type)=>OBJECT.prototype.toString.call(value) === `[object ${type}]`;\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const isDate = isObjectType(arg, 'Date');\n const isRegex = isObjectType(arg, 'RegExp');\n const isPlainObject = isObjectType(arg, 'Object');\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && !isRegex) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (Array.isArray(arg)) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (isPlainObject) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\nconst unstable_serialize = (key)=>serialize(key)[0];\n\n/// \nconst use = React.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax\n// and emitting an error.\n// We assume that this is only for the `use(thenable)` case, not `use(context)`.\n// https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45\n((thenable)=>{\n switch(thenable.status){\n case 'pending':\n throw thenable;\n case 'fulfilled':\n return thenable.value;\n case 'rejected':\n throw thenable.reason;\n default:\n thenable.status = 'pending';\n thenable.then((v)=>{\n thenable.status = 'fulfilled';\n thenable.value = v;\n }, (e)=>{\n thenable.status = 'rejected';\n thenable.reason = e;\n });\n throw thenable;\n }\n});\nconst WITH_DEDUPE = {\n dedupe: true\n};\nconst useSWRHandler = (_key, fetcher, config)=>{\n const { cache, compare, suspense, fallbackData, revalidateOnMount, revalidateIfStale, refreshInterval, refreshWhenHidden, refreshWhenOffline, keepPreviousData } = config;\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n // `key` is the identifier of the SWR internal state,\n // `fnArg` is the argument/arguments parsed from the key, which will be passed\n // to the fetcher.\n // All of them are derived from `_key`.\n const [key, fnArg] = serialize$1(_key);\n // If it's the initial render of this hook.\n const initialMountedRef = useRef(false);\n // If the hook is unmounted already. This will be used to prevent some effects\n // to be called after unmounting.\n const unmountedRef = useRef(false);\n // Refs to keep the key and config.\n const keyRef = useRef(key);\n const fetcherRef = useRef(fetcher);\n const configRef = useRef(config);\n const getConfig = ()=>configRef.current;\n const isActive = ()=>getConfig().isVisible() && getConfig().isOnline();\n const [getCache, setCache, subscribeCache, getInitialCache] = createCacheHelper(cache, key);\n const stateDependencies = useRef({}).current;\n // Resolve the fallback data from either the inline option, or the global provider.\n // If it's a promise, we simply let React suspend and resolve it for us.\n const fallback = isUndefined$1(fallbackData) ? isUndefined$1(config.fallback) ? UNDEFINED$1 : config.fallback[key] : fallbackData;\n const isEqual = (prev, current)=>{\n for(const _ in stateDependencies){\n const t = _;\n if (t === 'data') {\n if (!compare(prev[t], current[t])) {\n if (!isUndefined$1(prev[t])) {\n return false;\n }\n if (!compare(returnedData, current[t])) {\n return false;\n }\n }\n } else {\n if (current[t] !== prev[t]) {\n return false;\n }\n }\n }\n return true;\n };\n const getSnapshot = useMemo(()=>{\n const shouldStartRequest = (()=>{\n if (!key) return false;\n if (!fetcher) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (!isUndefined$1(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n return revalidateIfStale !== false;\n })();\n // Get the cache and merge it with expected states.\n const getSelectedCache = (state)=>{\n // We only select the needed fields from the state.\n const snapshot = mergeObjects(state);\n delete snapshot._k;\n if (!shouldStartRequest) {\n return snapshot;\n }\n return {\n isValidating: true,\n isLoading: true,\n ...snapshot\n };\n };\n const cachedData = getCache();\n const initialData = getInitialCache();\n const clientSnapshot = getSelectedCache(cachedData);\n const serverSnapshot = cachedData === initialData ? clientSnapshot : getSelectedCache(initialData);\n // To make sure that we are returning the same object reference to avoid\n // unnecessary re-renders, we keep the previous snapshot and use deep\n // comparison to check if we need to return a new one.\n let memorizedSnapshot = clientSnapshot;\n return [\n ()=>{\n const newSnapshot = getSelectedCache(getCache());\n const compareResult = isEqual(newSnapshot, memorizedSnapshot);\n if (compareResult) {\n // Mentally, we should always return the `memorizedSnapshot` here\n // as there's no change between the new and old snapshots.\n // However, since the `isEqual` function only compares selected fields,\n // the values of the unselected fields might be changed. That's\n // simply because we didn't track them.\n // To support the case in https://github.com/vercel/swr/pull/2576,\n // we need to update these fields in the `memorizedSnapshot` too\n // with direct mutations to ensure the snapshot is always up-to-date\n // even for the unselected fields, but only trigger re-renders when\n // the selected fields are changed.\n memorizedSnapshot.data = newSnapshot.data;\n memorizedSnapshot.isLoading = newSnapshot.isLoading;\n memorizedSnapshot.isValidating = newSnapshot.isValidating;\n memorizedSnapshot.error = newSnapshot.error;\n return memorizedSnapshot;\n } else {\n memorizedSnapshot = newSnapshot;\n return newSnapshot;\n }\n },\n ()=>serverSnapshot\n ];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cache,\n key\n ]);\n // Get the current state that SWR should return.\n const cached = useSyncExternalStore(useCallback((callback)=>subscribeCache(key, (current, prev)=>{\n if (!isEqual(prev, current)) callback();\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n cache,\n key\n ]), getSnapshot[0], getSnapshot[1]);\n const isInitialMount = !initialMountedRef.current;\n const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;\n const cachedData = cached.data;\n const data = isUndefined$1(cachedData) ? fallback && isPromiseLike(fallback) ? use(fallback) : fallback : cachedData;\n const error = cached.error;\n // Use a ref to store previously returned data. Use the initial data as its initial value.\n const laggyDataRef = useRef(data);\n const returnedData = keepPreviousData ? isUndefined$1(cachedData) ? isUndefined$1(laggyDataRef.current) ? data : laggyDataRef.current : cachedData : data;\n // - Suspense mode and there's stale data for the initial render.\n // - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.\n // - `revalidateIfStale` is enabled but `data` is not defined.\n const shouldDoInitialRevalidation = (()=>{\n // if a key already has revalidators and also has error, we should not trigger revalidation\n if (hasRevalidator && !isUndefined$1(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !isUndefined$1(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n // Under suspense mode, it will always fetch on render if there is no\n // stale data so no need to revalidate immediately mount it again.\n // If data exists, only revalidate if `revalidateIfStale` is true.\n if (suspense) return isUndefined$1(data) ? false : revalidateIfStale;\n // If there is no stale data, we need to revalidate when mount;\n // If `revalidateIfStale` is set to true, we will always revalidate.\n return isUndefined$1(data) || revalidateIfStale;\n })();\n // Resolve the default validating state:\n // If it's able to validate, and it should revalidate when mount, this will be true.\n const defaultValidatingState = !!(key && fetcher && isInitialMount && shouldDoInitialRevalidation);\n const isValidating = isUndefined$1(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = isUndefined$1(cached.isLoading) ? defaultValidatingState : cached.isLoading;\n // The revalidation function is a carefully crafted wrapper of the original\n // `fetcher`, to correctly handle the many edge cases.\n const revalidate = useCallback(async (revalidateOpts)=>{\n const currentFetcher = fetcherRef.current;\n if (!key || !currentFetcher || unmountedRef.current || getConfig().isPaused()) {\n return false;\n }\n let newData;\n let startAt;\n let loading = true;\n const opts = revalidateOpts || {};\n // If there is no ongoing concurrent request, or `dedupe` is not set, a\n // new request should be initiated.\n const shouldStartNewRequest = !FETCH[key] || !opts.dedupe;\n /*\n For React 17\n Do unmount check for calls:\n If key has changed during the revalidation, or the component has been\n unmounted, old dispatch and old event callbacks should not take any\n effect\n\n For React 18\n only check if key has changed\n https://github.com/reactwg/react-18/discussions/82\n */ const callbackSafeguard = ()=>{\n if (IS_REACT_LEGACY) {\n return !unmountedRef.current && key === keyRef.current && initialMountedRef.current;\n }\n return key === keyRef.current;\n };\n // The final state object when the request finishes.\n const finalState = {\n isValidating: false,\n isLoading: false\n };\n const finishRequestAndUpdateState = ()=>{\n setCache(finalState);\n };\n const cleanupState = ()=>{\n // Check if it's still the same request before deleting it.\n const requestInfo = FETCH[key];\n if (requestInfo && requestInfo[1] === startAt) {\n delete FETCH[key];\n }\n };\n // Start fetching. Change the `isValidating` state, update the cache.\n const initialState = {\n isValidating: true\n };\n // It is in the `isLoading` state, if and only if there is no cached data.\n // This bypasses fallback data and laggy data.\n if (isUndefined$1(getCache().data)) {\n initialState.isLoading = true;\n }\n try {\n if (shouldStartNewRequest) {\n setCache(initialState);\n // If no cache is being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && isUndefined$1(getCache().data)) {\n setTimeout(()=>{\n if (loading && callbackSafeguard()) {\n getConfig().onLoadingSlow(key, config);\n }\n }, config.loadingTimeout);\n }\n // Start the request and save the timestamp.\n // Key must be truthy if entering here.\n FETCH[key] = [\n currentFetcher(fnArg),\n getTimestamp()\n ];\n }\n // Wait until the ongoing request is done. Deduplication is also\n // considered here.\n ;\n [newData, startAt] = FETCH[key];\n newData = await newData;\n if (shouldStartNewRequest) {\n // If the request isn't interrupted, clean it up after the\n // deduplication interval.\n setTimeout(cleanupState, config.dedupingInterval);\n }\n // If there're other ongoing request(s), started after the current one,\n // we need to ignore the current one to avoid possible race conditions:\n // req1------------------>res1 (current one)\n // req2---------------->res2\n // the request that fired later will always be kept.\n // The timestamp maybe be `undefined` or a number\n if (!FETCH[key] || FETCH[key][1] !== startAt) {\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Clear error.\n finalState.error = UNDEFINED$1;\n // If there're other mutations(s), that overlapped with the current revalidation:\n // case 1:\n // req------------------>res\n // mutate------>end\n // case 2:\n // req------------>res\n // mutate------>end\n // case 3:\n // req------------------>res\n // mutate-------...---------->\n // we have to ignore the revalidation result (res) because it's no longer fresh.\n // meanwhile, a new revalidation should be triggered when the mutation ends.\n const mutationInfo = MUTATION[key];\n if (!isUndefined$1(mutationInfo) && // case 1\n (startAt <= mutationInfo[0] || // case 2\n startAt <= mutationInfo[1] || // case 3\n mutationInfo[1] === 0)) {\n finishRequestAndUpdateState();\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Deep compare with the latest state to avoid extra re-renders.\n // For local state, compare and assign.\n const cacheData = getCache().data;\n // Since the compare fn could be custom fn\n // cacheData might be different from newData even when compare fn returns True\n finalState.data = compare(cacheData, newData) ? cacheData : newData;\n // Trigger the successful callback if it's the original request.\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onSuccess(newData, key, config);\n }\n }\n } catch (err) {\n cleanupState();\n const currentConfig = getConfig();\n const { shouldRetryOnError } = currentConfig;\n // Not paused, we continue handling the error. Otherwise, discard it.\n if (!currentConfig.isPaused()) {\n // Get a new error, don't use deep comparison for errors.\n finalState.error = err;\n // Error event and retry logic. Only for the actual request, not\n // deduped ones.\n if (shouldStartNewRequest && callbackSafeguard()) {\n currentConfig.onError(err, key, currentConfig);\n if (shouldRetryOnError === true || isFunction$1(shouldRetryOnError) && shouldRetryOnError(err)) {\n if (!getConfig().revalidateOnFocus || !getConfig().revalidateOnReconnect || isActive()) {\n // If it's inactive, stop. It will auto-revalidate when\n // refocusing or reconnecting.\n // When retrying, deduplication is always enabled.\n currentConfig.onErrorRetry(err, key, currentConfig, (_opts)=>{\n const revalidators = EVENT_REVALIDATORS[key];\n if (revalidators && revalidators[0]) {\n revalidators[0](revalidateEvents.ERROR_REVALIDATE_EVENT, _opts);\n }\n }, {\n retryCount: (opts.retryCount || 0) + 1,\n dedupe: true\n });\n }\n }\n }\n }\n }\n // Mark loading as stopped.\n loading = false;\n // Update the current hook's state.\n finishRequestAndUpdateState();\n return true;\n }, // `setState` is immutable, and `eventsCallback`, `fnArg`, and\n // `keyValidating` are depending on `key`, so we can exclude them from\n // the deps array.\n //\n // FIXME:\n // `fn` and `config` might be changed during the lifecycle,\n // but they might be changed every render like this.\n // `useSWR('key', () => fetch('/api/'), { suspense: true })`\n // So we omit the values from the deps array\n // even though it might cause unexpected behaviors.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n key,\n cache\n ]);\n // Similar to the global mutate but bound to the current cache and key.\n // `cache` isn't allowed to change during the lifecycle.\n const boundMutate = useCallback(// Use callback to make sure `keyRef.current` returns latest result every time\n (...args)=>{\n return internalMutate(cache, keyRef.current, ...args);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // The logic for updating refs.\n useIsomorphicLayoutEffect(()=>{\n fetcherRef.current = fetcher;\n configRef.current = config;\n // Handle laggy data updates. If there's cached data of the current key,\n // it'll be the correct reference.\n if (!isUndefined$1(cachedData)) {\n laggyDataRef.current = cachedData;\n }\n });\n // After mounted or key changed.\n useIsomorphicLayoutEffect(()=>{\n if (!key) return;\n const softRevalidate = revalidate.bind(UNDEFINED$1, WITH_DEDUPE);\n let nextFocusRevalidatedAt = 0;\n if (getConfig().revalidateOnFocus) {\n const initNow = Date.now();\n nextFocusRevalidatedAt = initNow + getConfig().focusThrottleInterval;\n }\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n const onRevalidate = (type, opts = {})=>{\n if (type == revalidateEvents.FOCUS_EVENT) {\n const now = Date.now();\n if (getConfig().revalidateOnFocus && now > nextFocusRevalidatedAt && isActive()) {\n nextFocusRevalidatedAt = now + getConfig().focusThrottleInterval;\n softRevalidate();\n }\n } else if (type == revalidateEvents.RECONNECT_EVENT) {\n if (getConfig().revalidateOnReconnect && isActive()) {\n softRevalidate();\n }\n } else if (type == revalidateEvents.MUTATE_EVENT) {\n return revalidate();\n } else if (type == revalidateEvents.ERROR_REVALIDATE_EVENT) {\n return revalidate(opts);\n }\n return;\n };\n const unsubEvents = subscribeCallback(key, EVENT_REVALIDATORS, onRevalidate);\n // Mark the component as mounted and update corresponding refs.\n unmountedRef.current = false;\n keyRef.current = key;\n initialMountedRef.current = true;\n // Keep the original key in the cache.\n setCache({\n _k: fnArg\n });\n // Trigger a revalidation\n if (shouldDoInitialRevalidation) {\n if (isUndefined$1(data) || IS_SERVER) {\n // Revalidate immediately.\n softRevalidate();\n } else {\n // Delay the revalidate if we have data to return so we won't block\n // rendering.\n rAF(softRevalidate);\n }\n }\n return ()=>{\n // Mark it as unmounted.\n unmountedRef.current = true;\n unsubEvents();\n };\n }, [\n key\n ]);\n // Polling\n useIsomorphicLayoutEffect(()=>{\n let timer;\n function next() {\n // Use the passed interval\n // ...or invoke the function with the updated data to get the interval\n const interval = isFunction$1(refreshInterval) ? refreshInterval(getCache().data) : refreshInterval;\n // We only start the next interval if `refreshInterval` is not 0, and:\n // - `force` is true, which is the start of polling\n // - or `timer` is not 0, which means the effect wasn't canceled\n if (interval && timer !== -1) {\n timer = setTimeout(execute, interval);\n }\n }\n function execute() {\n // Check if it's OK to execute:\n // Only revalidate when the page is visible, online, and not errored.\n if (!getCache().error && (refreshWhenHidden || getConfig().isVisible()) && (refreshWhenOffline || getConfig().isOnline())) {\n revalidate(WITH_DEDUPE).then(next);\n } else {\n // Schedule the next interval to check again.\n next();\n }\n }\n next();\n return ()=>{\n if (timer) {\n clearTimeout(timer);\n timer = -1;\n }\n };\n }, [\n refreshInterval,\n refreshWhenHidden,\n refreshWhenOffline,\n key\n ]);\n // Display debug info in React DevTools.\n useDebugValue(returnedData);\n // In Suspense mode, we can't return the empty `data` state.\n // If there is an `error`, the `error` needs to be thrown to the error boundary.\n // If there is no `error`, the `revalidation` promise needs to be thrown to\n // the suspense boundary.\n if (suspense && isUndefined$1(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any fallback data. This causes hydration errors. See:\n // https://github.com/vercel/swr/issues/1832\n if (!IS_REACT_LEGACY && IS_SERVER) {\n throw new Error('Fallback data is required when using Suspense in SSR.');\n }\n // Always update fetcher and config refs even with the Suspense mode.\n fetcherRef.current = fetcher;\n configRef.current = config;\n unmountedRef.current = false;\n const req = PRELOAD[key];\n if (!isUndefined$1(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (isUndefined$1(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!isUndefined$1(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n const swrResponse = {\n mutate: boundMutate,\n get data () {\n stateDependencies.data = true;\n return returnedData;\n },\n get error () {\n stateDependencies.error = true;\n return error;\n },\n get isValidating () {\n stateDependencies.isValidating = true;\n return isValidating;\n },\n get isLoading () {\n stateDependencies.isLoading = true;\n return isLoading;\n }\n };\n return swrResponse;\n};\nconst SWRConfig = OBJECT$1.defineProperty(SWRConfig$1, 'defaultValue', {\n value: defaultConfig\n});\n/**\n * A hook to fetch data.\n *\n * @link https://swr.vercel.app\n * @example\n * ```jsx\n * import useSWR from 'swr'\n * function Profile() {\n * const { data, error, isLoading } = useSWR('/api/user', fetcher)\n * if (error) return failed to load
\n * if (isLoading) return loading...
\n * return hello {data.name}!
\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\n// useSWR\n\nexport { SWRConfig, useSWR as default, unstable_serialize };\n"],"names":["StyleSheet","options","_this","this","_insertTag","tag","before","tags","length","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","push","isSpeedy","undefined","speedy","ctr","nonce","key","_proto","prototype","hydrate","nodes","forEach","insert","rule","document","createElement","setAttribute","appendChild","createTextNode","createStyleElement","sheet","i","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","e","flush","_tag$parentNode","parentNode","removeChild","abs","Math","String","fromCharCode","Object","assign","trim","value","pattern","replacement","replace","indexof","search","indexOf","index","charCodeAt","begin","end","slice","array","line","column","position","character","characters","node","root","parent","type","props","children","return","prev","next","peek","caret","token","alloc","dealloc","delimit","delimiter","whitespace","escaping","count","commenter","identifier","COMMENT","callback","output","stringify","element","join","compile","parse","rules","rulesets","pseudo","points","declarations","offset","atrule","property","previous","variable","scanning","ampersand","reference","comment","declaration","ruleset","post","size","j","k","x","y","z","identifierWithPointTracking","getRules","parsed","toRules","fixedElements","WeakMap","compat","isImplicitRule","get","set","parentRules","removeLabel","hash","defaultStylisPlugins","map","exec","createCache","ssrStyles","querySelectorAll","Array","call","getAttribute","head","_insert","stylisPlugins","inserted","nodesToHydrate","attrib","split","currentSheet","collection","finalizingPlugins","serializer","concat","selector","serialized","shouldCache","styles","cache","name","registered","memoize","fn","create","arg","EmotionCacheContext","HTMLElement","CacheProvider","Provider","withEmotionCache","func","forwardRef","ref","useContext","ThemeContext","hasOwn","hasOwnProperty","typePropName","createEmotionProps","newProps","_key","Insertion","_ref","isStringTag","Emotion$1","cssProp","css","WrappedComponent","registeredStyles","className","_key2","jsx","args","arguments","h","apply","argsLength","createElementArgArray","E","c","_jsx","JSX","Global","w","T","sheetRef","constructor","rehydrating","querySelector","current","sheetRefCurrent","nextElementSibling","_len","keyframes","insertable","anim","toString","unitlessKeys","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","isDevelopment","hyphenateRegex","animationRegex","isCustomProperty","isProcessableValue","processStyleName","styleName","toLowerCase","processStyleValue","match","p1","p2","cursor","noComponentSelectorMessage","handleInterpolation","mergedProps","interpolation","componentSelector","__emotion_styles","serializedStyles","obj","string","isArray","asString","Error","interpolated","_i","createStringFromObject","previousCursor","result","cached","labelPattern","serializeStyles","stringMode","strings","raw","lastIndex","identifierName","str","len","useInsertionEffect","useInsertionEffectAlwaysWithSyncFallback","useInsertionEffectWithLayoutFallback","getRegisteredStyles","classNames","rawClassName","registerStyles","insertStyles","SeverityLevel","Verbose","Information","Warning","Critical","PropertiesPluginIdentifier","BreezeChannelIdentifier","AnalyticsPluginIdentifier","_stringToBoolOrDefault","theValue","defaultValue","theConfig","cfgDfMerge","mrg","v","cfgDfSet","setter","cfgDfValidate","validator","fallBackName","fb","isVal","cfgDfBoolean","cfgDfString","_isConfigDefaults","_getDefault","dynamicHandler","cfgDefaults","defValue","isDefaultValid","dfVal","fallbacks","lp","fallback","fbValue","cfg","_resolveDefaultValue","newValue_1","_applyDefaultValue","isValid","setFn","mergeDf","readOnly","blkDynamicValue","rdOnly","blkVal","usingDefault","cfgValue","dfName","dfValue","CFG_HANDLER_LINK","BLOCK_DYNAMIC","FORCE_DYNAMIC","_cfgDeepCopy","source","target_1","_canMakeDynamic","getFunc","state","throwInvalidAccess","message","aggregationErrorType","arrayMethodsToPatch","_throwDynamicError","logger","desc","_getOwnPropGetter","target","propDesc","_setDynamicProperty","getter","prop","detail","n","trk","handler","clr","idx","checkDynamic","isObjectOrArray","_getProperty","_makeDynamicObject","activeHandler","act","chng","add","g","s","newValue","ro","upd","isReferenced","rf","hdlr","valueState","newIsObjectOrArray","_createDynamicProperty","_setDynamicPropertyState","flags","isDynamic","inPlace","blkProp","blockDynamicConversion","method","orgMethod","_patchArray","symPrefix","symPostfix","_createState","cfgHandler","theState","dynamicPropertySymbol","uid","dynamicPropertyReadOnly","dynamicPropertyReferenced","dynamicPropertyBlockValue","dynamicPropertyDetail","_waitingHandlers","_watcherTimer","_useHandler","prevWatcher","bind","setDf","_notifyWatchers","notifyHandlers","watcherFailures_1","sourceErrors","self","errors","theMessage","srcError","throwAggregationError","notify","use","details","_createDynamicHandler","getDynamicConfigHandler","newTarget","defaultValues","watch","configHandler","rm","_createAndUseHandler","_a","_block","allowUpdate","prevUpd","createDynamicConfig","config","defaultConfig","onConfigChange","_logInvalidAccess","createEnumStyle","createValueMap","strGetPlugin","BaseTelemetryPlugin","_isinitialized","_rootCtx","_nextPlugin","_unloadHandlerContainer","_hookContainer","_self","_getTelCtx","currentCtx","itemCtx","rootCtx","_setDefaults","core","pluginChain","nextPlugin","_initDefaults","extensions","unloadCtx","unloadState","unloadDone","theUnloadCtx","theUnloadState","reason","isAsync","_unloadCallback","run","updateCtx","updateState","updateDone","theUpdateCtx","theUpdateState","_doUpdate","_updateCallback","getCfg","setInitialized","isInitialized","env","__ieDyn","_b","_doc","strToGMTString","strToUTCString","strCookie","strExpires","strIsCookieUseDisabled","strDisableCookiesUsage","strConfigCookieMgr","_supportsCookies","_allowUaSameSite","_parsedCookieValue","_cookieCache","_globalCookieConfig","rootDefaultConfig","cookieCfg","path","enabled","ignoreCookies","blockedCookies","cookieDomain","cookiePath","_getDoc","_isMgrEnabled","cookieMgr","isEnabled","_isIgnoredCookie","cookieMgrCfg","_isCfgEnabled","rootConfig","cookieMgrConfig","isCfgEnabled","cookieEnabled","safeGetCookieMgr","getCookieMgr","createCookieMgr","inst","_gblCookieMgr","_path","_domain","unloadHandler","_enabled","_getCookieFn","_setCookieFn","_delCookieFn","getCookie","_getCookieValue","setCookie","_setCookieValue","delCookie","areCookiesSupported","gblManager","setEnabled","maxAgeSec","domain","_isBlockedCookie","values","_extractParts","_isIE","expireMs","expiry","Date","setTime","_formatDate","location_1","protocol","userAgent","uaDisallowsSameSiteNone","_formatCookieValue","del","purge","unload","doc","exception","parts","thePart","theDate","cookieValue","theCookie","generateW3CId","tmp","hexValues","oct","a","clockSequenceHi","version","instanceName","_dataUid","_canAcceptData","nodeType","createUniqueNamespace","includeVersion","createElmNodeData","data","id","accept","addDefault","theCache","_getCache","kill","_debugListener","listenerFuncs","_aiNamespace","_listenerProxyFunc","dbgExt","getDebugExt","listener","ns","disableDbgExt","getDebugListener","STR_WARN_TO_CONSOLE","loggingLevelConsole","loggingLevelTelemetry","maxMessageLimit","enableDebug","_logFuncs","_sanitizeDiagnosticText","text","_logToConsole","theConsole","logFunc","_InternalLogMessage","msgId","msg","isUserAct","properties","strProps","diagnosticText","dataType","safeGetLogger","DiagnosticLogger","queue","_loggingLevelConsole","_loggingLevelTelemetry","_maxInternalMessageLimit","_enableDebug","_unloadHandler","_messageCount","_messageLogged","_logInternalMessage","severity","logMessage","messageKey","_debugExtMsg","throttleLimitMessage","throttleMessage","errorToConsole","_setDefaultsFromConfig","consoleLoggingLevel","debugToConsole","resetInternalMessageCount","logInternalMessage","_getLogger","_throwInternal","_warnToConsole","strDocumentMode","strLocation","strConsole","strJSON","strCrypto","strMsCrypto","strReactNative","strMsie","strTrident","strXMLHttpRequest","_isTrident","_navUserAgentCheck","_enableMocks","_useXDomainRequest","_beaconsSupported","_hasProperty","theClass","supported","proto","getLocation","checkForMock","mockLocation","location","getConsole","console","hasJSON","Boolean","JSON","getJSON","getCrypto","getMsCrypto","isReactNative","nav","product","isIE","getIEVersion","userAgentStr","navigator_1","ua","parseInt","tridentVer","isBeaconsSupported","useCached","sendBeacon","isFetchSupported","withKeepAlive","isSupported","request","useXDomainRequest","XDomainRequest","isXhrSupported","sendCustomEvent","evtName","customDetails","evnt","global","CustomEvent","eventName","event","createEvent","initCustomEvent","createCustomDomEvent","dispatchEvent","rCamelCase","rNormalizeInvalid","rLeadingNumeric","_getObjProto","isNotNullOrUndefined","normalizeJsName","_all","letter","toUpperCase","strContains","toISOString","date","getExceptionName","object","setValue","field","valChk","srcChk","getSetValue","_createProxyFunction","funcName","srcFunc","src","originalArguments","proxyAssign","chkSet","_loop_1","proxyFunctionAs","theFunc","overwriteTarget","proxyFunctions","functionsToProxy","theFuncName","createClassFromInterface","defaults","optimizeObject","theObject","objExtend","obj1","obj2","obj3","obj4","obj5","obj6","theArgs","extended","argLen","deep","isArgArray","isArgObj","isNewArray","clone","isFeatureEnabled","feature","rlt","ft","featureOptIn","mode","getResponseText","xhr","responseText","formatErrorMessageXdr","xdr","formatErrorMessageXhr","prependTransports","theTransports","newTransports","strDisabledPropertyName","strWithCredentials","strTimeout","openXhr","urlString","withCredentials","disabled","isSync","timeout","_wrapSetXhrProp","XMLHttpRequest","open","_appendHeader","theHeaders","getResponseHeader","STR_KILL_DURATION_HEADER","STR_KILL_DURATION_SECONDS_HEADER","STR_TIME_DELTA_HEADER","_getAllResponseHeaders","isOneDs","headersString","headers","headersArray","headerEntry","header","substring","convertAllHeadersToMap","UNDEFINED_VALUE","STR_EMPTY","STR_CHANNELS","STR_CORE","STR_CREATE_PERF_MGR","STR_DISABLED","STR_EXTENSION_CONFIG","STR_EXTENSIONS","STR_PROCESS_TELEMETRY","STR_PRIORITY","STR_EVENTS_SENT","STR_EVENTS_DISCARDED","STR_EVENTS_SEND_REQUEST","STR_PERF_EVENT","STR_OFFLINE_STORE","STR_OFFLINE_SENT","STR_OFFLINE_DROP","STR_GET_PERF_MGR","STR_DOMAIN","STR_PATH","STR_NOT_DYNAMIC_ERROR","strExecutionContextKey","strParentContextKey","strChildrenContextKey","_defaultPerfManager","PerfEvent","payloadDetails","theDetails_1","start","complete","childTime","childEvts","childEvt","time","exTime","ParentContextKey","ChildrenContextKey","PerfManager","manager","ctx","fire","perfEvent","doPerfActiveKey","doPerf","mgrSource","getSource","perfMgr","perfEvt","currentActive","ex","getGblPerfMgr","strTelemetryPluginChain","strHasRunFlags","strGetTelCtx","_chainId","_createInternalContext","telemetryChain","startAt","_nextProxy","_onComplete","proxy","createTelemetryProxyChain","_getNextProxyStart","context","_next","nextProxy","onComplete","completeDetails","diagLog","getExtCfg","newConfig","_getExtCfg","getConfig","extConfig","hasNext","getNext","setNext","iterate","cb","plugin","that","createIfMissing","idCfg","extCfg","createProcessTelemetryContext","internalContext","plugins","createProcessTelemetryUnloadContext","createProcessTelemetryUpdateContext","firstProxy","lastProxy_1","thePlugin","newProxy","chainId","hasProcessTelemetry","hasSetNext","proxyChain","getPlugin","processTelemetry","_processTelemetry","_unloadPlugin","update","_updatePlugin","_id","_setNext","_processChain","processPluginFn","hasRun","hasRunContext","nextId","error","hasNextRun","_callProcessTelemetry","pluginState","item","_callTeardown","pluginCore","_callUpdate","createTelemetryPluginProxy","UInt32Mask","MaxUInt32","SEED1","SEED2","_mwcSeeded","_mwcW","_mwcZ","_mwcSeed","seedValue","_autoSeedMwc","now","random","randomValue","maxValue","random32","signed","getRandomValues","Uint32Array","mwcRandom32","newId","maxLength","number","chars","charAt","pluginStateData","_getPluginState","initializePlugins","processContext","initPlugins","lastPlugin","sortPlugins","sort","extA","extB","bHasProcess","createDistributedTraceContext","parentCtx","trace","getName","setName","getTraceId","traceId","setTraceId","getSpanId","spanId","setSpanId","getTraceFlags","setTraceFlags","newTraceFlags","createUnloadHandlerContainer","handlers","_maxHooks","_hookAddMonitor","createUnloadHookContainer","_hooks","oldHooks","remove","hooks","DEFAULT_VERSION","INVALID_VERSION","INVALID_TRACE_ID","INVALID_SPAN_ID","_isValid","invalidValue","_formatValue","_formatFlags","isNaN","createTraceParent","isValidTraceId","isValidSpanId","traceFlags","formatTraceParent","findAllScripts","scripts","getElementsByTagName","script","crossOrigin","async","hasAttribute","defer","referrerPolicy","info","url","_DYN_TO_LOWER_CASE","_DYN_LENGTH","_DYN_WARN_TO_CONSOLE","_DYN_THROW_INTERNAL","_DYN_WATCH","_DYN_APPLY","_DYN_PUSH","_DYN_SPLICE","_DYN_LOGGER","_DYN_CANCEL","_DYN_INITIALIZE","_DYN_IDENTIFIER","_DYN_REMOVE_NOTIFICATION_0","_DYN_ADD_NOTIFICATION_LIS1","_DYN_IS_INITIALIZED","_DYN_VALUE","_DYN_GET_NOTIFY_MGR","_DYN_GET_PLUGIN","_DYN_NAME","_DYN_PROCESS_NEXT","_DYN_GET_PROCESS_TEL_CONT2","_DYN_ENABLED","_DYN_STOP_POLLING_INTERNA3","_DYN_UNLOAD","_DYN_ON_COMPLETE","_DYN_VERSION","_DYN_LOGGING_LEVEL_CONSOL4","_DYN_CREATE_NEW","_DYN_TEARDOWN","_DYN_MESSAGE_ID","_DYN_MESSAGE","_DYN_DIAG_LOG","_DYN__DO_TEARDOWN","_DYN_UPDATE","_DYN_GET_NEXT","_DYN_SET_NEXT_PLUGIN","_DYN_USER_AGENT","_DYN_SPLIT","_DYN_REPLACE","_DYN_TYPE","_DYN_EVT_NAME","_DYN_STATUS","_DYN_GET_ALL_RESPONSE_HEA5","_DYN_IS_CHILD_EVT","_DYN_DATA","_DYN_GET_CTX","_DYN_SET_CTX","_DYN_ITEMS_RECEIVED","_DYN_URL_STRING","_DYN_HEADERS","_DYN_TIMEOUT","_DYN_TRACE_FLAGS","_DYN_GET_ATTRIBUTE","defaultReactExtensionConfig","history","_super","ReactPlugin","_analyticsPlugin","_extensionConfig","_unlisten","_pageViewTimer","_pageViewTracked","priority","_base","_getAnalytics","initialize","_addHook","locationListener","locn","setTimeout","pageViewTelemetry","uri","pathname","trackPageView","listen","getAppInsights","processNext","_doTeardown","asyncCallback","clearTimeout","AITrackedComponentBase","reactPlugin","componentName","_mountTimestamp","_firstActiveTimestamp","_idleStartTimestamp","_lastActiveTimestamp","_totalIdleTime","_idleCount","_idleTimeout","trackActivity","lastIdleTime","_reactPlugin","_componentName","componentDidMount","_intervalId","setInterval","componentWillUnmount","clearInterval","metricData","average","getEngagementTimeSeconds","sampleCount","additionalProperties","trackMetric","withAITracking","Component","class_1","render","onKeyDown","onMouseMove","onScroll","onMouseDown","onTouchStart","onTouchMove","AppInsightsErrorBoundary","hasError","componentDidCatch","errorInfo","setState","appInsights","trackException","severityLevel","onError","AppInsightsContext","createContext","useAppInsightsContext","useCustomEvent","eventData","skipFirstRun","useState","setData","firstRun","useRef","savedSkipFirstRun","useEffect","trackEvent","customProperties","tracking","hookTimestamp","firstActiveTimestamp","totalIdleTime","lastActiveTimestamp","idleStartTimestamp","idleCount","idleTimeout","savedCallback","trackedData","engagementTime","strShimFunction","strShimObject","strShimUndefined","strShimPrototype","ObjClass","ObjProto","strHasOwnProperty","__assignFn","t","p","extendStaticsFn","d","b","__proto__","__extendsFn","__","__spreadArrayFn","to","from","il","StorageType","LocalStorage","SessionStorage","DistributedTracingModes","AI","AI_AND_W3C","W3C","EventPersistence","Normal","_DYN_INGESTIONENDPOINT","_DYN_TO_STRING","_DYN_REMOVE_ITEM","_DYN_COUNT","_DYN_PRE_TRIGGER_DATE","_DYN_GET_UTCDATE","_DYN_STRINGIFY","_DYN_MATCH","_DYN_CORRELATION_HEADER_E0","_DYN_PROPERTIES","_DYN_MEASUREMENTS","_DYN_SIZE_IN_BYTES","_DYN_TYPE_NAME","_DYN_EXCEPTIONS","_DYN_SEVERITY_LEVEL","_DYN_PROBLEM_GROUP","_DYN_PARSED_STACK","_DYN_HAS_FULL_STACK","_DYN_ASSEMBLY","_DYN_FILE_NAME","_DYN_LINE","_DYN_AI_DATA_CONTRACT","_DYN_DURATION","_canUseLocalStorage","_canUseSessionStorage","_storagePrefix","_getLocalStorageObject","utlCanUseLocalStorage","_getVerifiedStorageObject","storageType","storage","name_1","setItem","fail","getItem","_getSessionStorageObject","utlCanUseSessionStorage","utlSetStoragePrefix","storagePrefix","reset","utlGetLocalStorage","utlSetLocalStorage","utlGetSessionStorage","utlSetSessionStorage","utlRemoveSessionStorage","DisabledPropertyName","SampleRate","ProcessLegacy","HttpMethod","DEFAULT_BREEZE_ENDPOINT","DEFAULT_BREEZE_PATH","strNotSpecified","strIkey","dataSanitizeKeyAndAddUniqueness","origLength","nameTrunc","dataSanitizeKey","uniqueField","dataSanitizeString","valueTrunc","dataSanitizeUrl","dataSanitizeInput","dataSanitizeMessage","messageTrunc","dataSanitizeProperties","tempProps_1","dataSanitizeMeasurements","measurements","tempMeasurements_1","measure","input","_msgId","inputTrunc","createTelemetryItem","baseType","envelopeName","systemProperties","iKey","telemetryItem","ext","baseData","TelemetryItemCreator","Event","aiDataContract","ver","envelopeType","Trace","DataPoint","kind","min","max","stdDev","Metric","metrics","dataPoint","msToTimeSpan","totalms","ms","sec","hour","days","PageView","durationMs","duration","dataSanitizeId","PageViewPerformance","unused","cs4BaseData","perfTotal","networkConnect","sentRequest","receivedResponse","domProcessing","IS_FRAME","PARSE_FILENAME_LINE_COL","PARSE_FILENAME_LINE_ONLY","NoMethod","strError","strStack","strStackDetails","strErrorSrc","strMessage","strDescription","_parseSequence","re","m","ln","col","chk","frame","pre","hdl","_handleFilename","_stringify","convertToString","_formatMessage","theEvent","errorType","evtMessage","_isStackDetails","_convertStackObj","errorStack","items","_getStackFromErrorObj","errorObj","errorMessage","stack","lines","entry","_getOperaStack","_parseStack","parsedStack","frames","level_1","foundStackStart_1","totalSizeInBytes_1","trimmedFrame","test","_isStackFrame","theFrame","parsedFrame","level","stackFrameAiDataContract","assembly","fileName","sizeInBytes","sequence","matches","_parseFilename","_populateFrameSizeInBytes","_extractStackFrame","left","right","acceptedLeft","acceptedRight","howMany","splice","_getErrorType","typeName","results","_formatErrorCode","Exception","exceptions","_isExceptionInternal","_createExceptionDetails","isManual","CreateAutoException","lineNumber","columnNumber","evt","errorSrc","stackDetails","CreateFromInterface","_stackFrameFromInterface","exceptionDetails","_createExDetailsFromInterface","toInterface","problemGroup","CreateSimpleException","formatError","exDetailsAiDataContract","outerId","hasFullStack","_toInterface","_parsedFrameToInterface","theStack","_isExceptionDetailsInternal","exceptionTrunc","dataSanitizeException","_formatStackTrace","lineCol","lineNo","filename","RequestHeaders","requestContextHeader","requestContextTargetKey","requestContextAppIdFormat","requestIdHeader","traceParentHeader","traceStateHeader","sdkContextHeader","sdkContextHeaderAppIdRequest","requestContextHeaderLowerCase","_document","_htmlAnchorIdx","_htmlAnchorElement","urlParseUrl","anchorIdx","anchorCache","tempAnchor","host","urlParseHost","href","inclPort","fullHost","urlParseFullHost","port","_internalEndpoints","_correlationIdPrefix","isInternalApplicationInsightsEndpoint","endpointUrl","correlationIdCanIncludeCorrelationHeader","requestUrl","currentHost","disableCorrelationHeaders","correlationHeaderExcludePatterns","requestHost","enableCorsCorrelation","matchExists_1","includedDomains","correlationHeaderDomains","regex","RegExp","excludedDomains","correlationHeaderExcludedDomains","correlationIdGetCorrelationContext","responseHeader","correlationId","keyValues","keyValue","correlationIdGetCorrelationContextValue","dateTimeUtilsNow","perf","timing","navigationStart","dateTimeUtilsDuration","createDistributedTraceContextFromTrace","telemetryTrace","traceID","parentID","RemoteDependencyData","absoluteUrl","commandName","success","resultCode","requestAPI","correlationContext","dependencyKind","dependencySource","dependencyTypeName","dependencyFields","parsedUrl","pathName","AjaxHelperParseDependencyPath","createDomEvent","initEvent","strAttachEvent","strAddEventHelper","strDetachEvent","strRemoveEventListener","strEvents","strVisibilityChangeEvt","strPageHide","strUnload","strBeforeUnload","strPageHideNamespace","rRemoveEmptyNs","rRemoveTrailingEmptyNs","_guid","elmNodeData","eventNamespace","_normalizeNamespace","_getEvtNamespace","evtNamespace","theNamespace_1","parsedEvent","_getRegisteredEvents","aiEvts","registeredEvents","_doDetach","handlerRef","useCapture","_doUnregister","events","unRegFn","capture","mergeEvtNamespace","theNamespace","namespaces","eventOn","_doAttach","registeredEvent","guid","eventOff","evtName_1","found_1","eventCache","evtType","_unregisterEvents","regEvent","_addEventListeners","excludeEvents","added","addEventHandler","removeEventListeners","removeEventHandler","addPageUnloadEventListener","addEventListeners","addPageHideEventListener","newNamespaces","pageUnloadAdded","visibilityState","aiInstrumentHooks","cbNames","_arrLoop","arr","_doCallbacks","callDetails","cbArgs","hookCtx","hook","cbks","err","orgEx","hookErrorCb","_getOwner","checkPrototype","checkParentProto","owner","_createInstrumentHook","callbacks","aiHook","newFunc","orgArgs","funcArgs","_createArgs","f","rslt","_createFunctionHook","theHook","InstrumentFunc","InstrumentEvent","_DYN_IS_STORAGE_USE_DISAB0","_DYN__ADD_HOOK","_DYN_CORE","_DYN_DATA_TYPE","_DYN_ENVELOPE_TYPE","_DYN_TRACK","_DYN_TRACK_PAGE_VIEW","_DYN_TRACK_PREVIOUS_PAGE_1","_DYN_SEND_PAGE_VIEW_INTER2","_DYN_START_TIME","_DYN_SEND_PAGE_VIEW_PERFO3","_DYN_POPULATE_PAGE_VIEW_P4","_DYN_HREF","_DYN_SEND_EXCEPTION_INTER5","_DYN_ERROR","_DYN_LINE_NUMBER","_DYN_COLUMN_NUMBER","_DYN__CREATE_AUTO_EXCEPTI6","_DYN_ADD_TELEMETRY_INITIA7","_DYN_AUTO_EXCEPTION_INSTR9","_DYN_AUTO_TRACK_PAGE_VISI10","_DYN_IS_BROWSER_LINK_TRAC11","_DYN_ENABLE_AUTO_ROUTE_TR12","_DYN_ENABLE_UNHANDLED_PRO13","_DYN_AUTO_UNHANDLED_PROMI14","_DYN_GET_ENTRIES_BY_TYPE","_DYN_IS_PERFORMANCE_TIMIN15","_DYN_GET_PERFORMANCE_TIMI16","_DYN_NAVIGATION_START","_DYN_SHOULD_COLLECT_DURAT17","_DYN_IS_PERFORMANCE_TIMIN18","_DYN_RESPONSE_START","_DYN_LOAD_EVENT_END","_DYN_RESPONSE_END","_DYN_CONNECT_END","PageViewManager","overridePageViewDuration","pageViewPerformanceManager","_logger","queueTimer","itemQueue","pageViewPerformanceSent","firstPageViewSent","_flushChannels","_startTimer","allItems","doFlush","_addQueue","pageView","title","navigationEntries","timeOrigin","loadEventStart","duration_1","getTime","customDuration","pageViewSent","processed","pageViewPerformance","teardown","cancel","botAgentNames","_isPerformanceTimingSupported","_isPerformanceTimingDataReady","domainLookupStart","domLoading","_getPerformanceTiming","_getPerformanceNavigationTiming","getEntriesByType","_shouldCollectDuration","durations","isGoogleBot","PageViewPerformanceManager","navigationTiming","total","network","response","dom","requestStart","responseEnd","PageVisitTimeManager","pageVisitTimeTrackingHandler","prevPageVisitDataKeyName","currentPageName","currentPageUrl","prevPageVisitTimeData","pageName","pageUrl","prevPageVisitData","pageVisitEndTime","pageVisitDataJsonStr","pageVisitTime","pageVisitStartTime","stopPageVisitTimer","currPageVisitDataStr","PageVisitData","restartPageVisitTimer","Timing","_events","stop","action","_dispatchEvent","sessionRenewalMs","_chkConfigMilliseconds","sessionExpirationMs","disableExceptionTracking","samplingPercentage","namePrefix","disableFlushOnBeforeUnload","disableFlushOnUnload","expCfg","inclScripts","expLog","maxLogs","_updateStorageUsage","_debugState","_debugResult","_debugHandled","AnalyticsPlugin","_eventTracking","_pageTracking","_pageViewManager","_pageViewPerformanceManager","_pageVisitTimeManager","_preInitTelemetryInitializers","_isBrowserLinkTrackingEnabled","_browserLinkInitializerAdded","_enableAutoRouteTracking","_historyListenerAdded","_disableExceptionTracking","_autoExceptionInstrumented","_enableUnhandledPromiseRejectionTracking","_autoUnhandledPromiseInstrumented","_extConfig","_autoTrackPageVisitTime","_expCfg","autoRoutePVDelay","_prevUri","_currUri","_evtNamespace","_errorHookCnt","throwInternal","startTrackEvent","stopTrackEvent","trackTrace","metric","inPv","refUri","referrer","trackPageViewPerformance","inPvp","startTrackPage","stopTrackPage","measurement","loc","theError","exceptionPartB","scriptsInfo","logs","_onerror","_window","URL","isCrossOriginError","_sendCORSException","errorString","telemetryInitializer","initializer","browserLinkPaths_1","dropBrowserLinkRequests","envelope","remoteData","_addDefaultTelemetryInitializers","_populateDefaults","PageName","PageUrl","trackPageVisitTime","pageViewItem","rsp","_location","_getReason","_addUnhandledPromiseRejectionTracking","win","_history","pushState","replaceState","_popstateHandler","_locationChangeHandler","distributedTraceCtx","getTraceCtx","_getDistributedTraceCtx","traceLocationName","_addHistoryListener","_updateLocationChange","window","Version","STR_PROMISE","REJECTED","doAwaitResponse","doAwait","status","rejected","resolveFn","rejectFn","finallyFn","then","doFinally","finally","_promiseDebugEnabled","_hasInitEvent","STRING_STATES","DISPATCH_EVENT","_hasInitEventFn","_hasPromiseRejectionEvent","NODE_UNHANDLED_REJECTION","UNHANDLED_REJECTION","_currentPromiseId","_uniquePromiseId","dumpFnObj","_createPromise","newPromise","processor","executor","_settledValue","_thePromise","additionalArgs","_state","_hasResolved","_queue","_parentId","_handled","_unHandledRejectionHandler","_then","onResolved","onRejected","resolve","reject","_processQueue","pop","_strState","pending","_createSettleIfFn","newState","allowState","_notifyUnhandledRejection","process","emit","gbl","populateEvent","useNewEvent","theEvt","emitEvent","onFinally","thenFinally","catchFinally","thePromise","stateFn","resultFn","handledFn","_addDebugState$1","_rejectFn","_createAllPromise","values_1","pending_1","_createAllSettledPromise","processItem","syncItemProcessor","createAsyncPromise","callbackTimeout","timeoutItemProcessor","_promiseCls","createNativePromise","PrmCls","_allSyncSettledCreator","createSyncPromise","_promiseCreator","createPromise","createAllPromise","_DYN_FEATURE_OPT_IN","_DYN_SCHEDULE_FETCH_TIMEO0","replaceByNonOverrideCfg","nonOverrideConfigs","curLevel","maxLevel","exceedMaxLevel","curCfg_1","nonOverrideVal","F","M","ON","OFF","applyCdnfeatureCfg","cdnCfg","optInMap","cdnConfig_1","featureVal","userOptInDetails","cdnFt","cdnM","cdnOnV","onCfg","cdnOffV","offCfg","userFt","userM","userOnV","userOffV","blockCdn","blockCdnCfg","onFld","offFld","onV","offV","resolveCdnFeatureCfg","val","ftVal","dVal","_overrideCdnCfgByFeature","EVENT_NAME","udfVal","_defaultConfig","syncMode","blkCdnCfg","customEvtName","cfgUrl","overrideSyncFn","overrideFetchFn","onCfgChangeReceive","instrumentationKey","connectionString","enableAjax","CfgSyncPlugin","_mainConfig","_evtName","_cfgUrl","_timeoutHandle","_receiveChanges","_broadcastChanges","_blkCdnCfg","_fetchTimeout","_retryCnt","_onCfgChangeReceive","_nonOverrideConfigs","_fetchFn","_overrideFetchFn","_overrideSyncFn","_enableAjax","_paused","_setCfg","isAutoSync","_sendCfgsyncEvents","updateCfg","_eventOff","global_1","_updateEventListenerName","global_2","cfgEvent","newCfg","_replaceTartgetByKeys","_addEventListener","_fetchSender","oncomplete","fetchFn","fetch","init","Request","_doOnComplete","ok","res","_xhrSender","xhr_1","onreadystatechange","readyState","DONE","onerror","ontimeout","send","_onFetchComplete","JSON_1","_setupTimer","_cfg","unref","_clearScheduledTimer","preBlkCdn","newEvtName","_getFetchFnInterface","pause","resume","setCfg","sync","updateEventListenerName","_disableEvents","ActiveStatus","NONE","PENDING","INACTIVE","ACTIVE","_noResponseQs","STR_POST_METHOD","SenderPostManager","_enableSendPromise","_isInitialized","_diagLog","_isOneDs","_onCompleteFuncs","_disableCredentials","_fetchCredentials","_fallbackInst","_disableXhr","_disableBeacon","_disableBeaconSync","_disableFetchKeepAlive","_addNoResponse","_timeoutWrapper","_syncFetchPayload","_sendCredentials","_onError","_onNoPayloadUrl","_doBeaconSend","payload","plainTextBatch","Blob","_beaconSender","onRetry","beaconOnRetry","sendPOST","resolveFunc","rejectFunc","disableXhrSync","endPointUrl","_doOnReadyFunc","onReadyFunc","xhrOnComplete","setRequestHeader","headerName","onload","_doFetchSender","batch","requestHeaders","Headers","batchLength","ignoreResponse","responseHandled","body","append","credentials","keepalive","_handleError","onCompleteFunc","fetchOnComplete","response_1","resp","statusText","_xdrSender","onloadFunc","xdrOnComplete","onprogress","hostingProtocol","endpoint","lastIndexOf","SetConfig","senderOnCompleteCallBack","disableCredentials","fetchCredentials","enableSendPromise","disableXhr","disableBeacon","disableBeaconSync","timeWrapper","addNoResponse","disableFetchKeepAlive","getSyncFetchPayload","getSenderInst","transports","syncSupport","transportType","sendPostFunc","_transport","_isSync","_getSenderInterface","getFallbackInst","runTargetUnload","doUnloadAll","targets","done","resolved","parseResponse","itemsAccepted","itemsReceived","_aiNameFunc","baseName","aiName","_aiApplication","_aiDevice","_aiLocation","_aiOperation","_aiSession","_aiUser","_aiCloud","_aiInternal","ContextTagKeys","applicationVersion","applicationBuild","applicationTypeId","applicationId","applicationLayer","deviceId","deviceIp","deviceLanguage","deviceLocale","deviceModel","deviceFriendlyName","deviceNetwork","deviceNetworkName","deviceOEMName","deviceOS","deviceOSVersion","deviceRoleInstance","deviceRoleName","deviceScreenResolution","deviceType","deviceMachineName","deviceVMName","deviceBrowser","deviceBrowserVersion","locationIp","locationCountry","locationProvince","locationCity","operationId","operationName","operationParentId","operationRootId","operationSyntheticSource","operationCorrelationVector","sessionId","sessionIsFirst","sessionIsNew","userAccountAcquisitionDate","userAccountId","userId","userStoreRegion","userAuthUserId","userAnonymousUserAcquisitionDate","userAuthenticatedUserAcquisitionDate","cloudName","cloudRole","cloudRoleVer","cloudRoleInstance","cloudEnvironment","cloudLocation","cloudDeploymentUnit","internalNodeName","internalSdkVersion","internalAgentVersion","internalSnippet","internalSdkSrc","Extensions","CtxTagKeys","Envelope","sampleRate","Data","STR_DURATION","_DYN_TAGS","_DYN_DEVICE_TYPE","_DYN_TRACE_ID","_DYN_ENQUEUE","_DYN_EMIT_LINE_DELIMITED_0","_DYN_CLEAR","_DYN_MARK_AS_SENT","_DYN_CLEAR_SENT","_DYN_BUFFER_OVERRIDE","_DYN__BUFFER__KEY","_DYN__SENT__BUFFER__KEY","_DYN_CONCAT","_DYN__MAX__BUFFER__SIZE","_DYN_TRIGGER_SEND","_DYN__SENDER","_DYN_ENDPOINT_URL","_DYN_INSTRUMENTATION_KEY","_DYN_CUSTOM_HEADERS","_DYN_MAX_BATCH_SIZE_IN_BY1","_DYN_ONUNLOAD_DISABLE_BEA2","_DYN_IS_BEACON_API_DISABL3","_DYN_ALWAYS_USE_XHR_OVERR4","_DYN_ENABLE_SESSION_STORA5","_DYN__BUFFER","_DYN_ONUNLOAD_DISABLE_FET6","_DYN_DISABLE_SEND_BEACON_7","_DYN_GET_SENDER_INST","_DYN__ON_ERROR","_DYN__ON_PARTIAL_SUCCESS","_DYN__ON_SUCCESS","_DYN_ITEMS_ACCEPTED","_DYN_BASE_TYPE","_DYN_SAMPLE_RATE","strBaseType","strBaseData","strProperties","strTrue","_setValueIf","_extractPropsAndMeasurements","_convertPropsUndefinedToCustomDefinedValue","customUndefinedValue","_createEnvelope","startTime","iKeyNoDashes","envTags","itmExt","itmTags","extUser","user","authId","localId","extApp","app","sesId","extDevice","device","deviceClass","ip","model","web","browserLang","browserVer","browser","envData","envBaseData","envProps","screenRes","userConsent","extOs","os","osVer","extTrace","tgs","tg","theTags","EnvelopeCreator","_extractPartAExtensions","EnvelopeCreatorInit","EventEnvelopeCreator","customMeasurements","BaseSendBuffer","_buffer","_bufferFullMessageSent","_maxRetryCnt","maxRetryCnt","_get","_set","buffer","eventsLimitInMem","cnt","getItems","batchPayloads","payloads","payloadStr_1","createNew","newLogger","canUseSessionStorage","newBuffer","SessionStorageSendBuffer","ArraySendBuffer","PREVIOUS_KEYS","_namePrefix","bufferItems","_getBuffer","itemsInSentBuffer","previousItems","_getItemsFromPreviousKey","prefixEvents","_getPreviousEvents","notDeliveredItems","_removePayloadsFromBuffer","remaining","payloadStr","prefixedKey","_getBufferBase","bufferJson","buffer_1","_setBuffer","transFormedItems_1","internalItem","sentElements","unsentItems","sentItems","VERSION","BUFFER_KEY","SENT_BUFFER_KEY","MAX_BUFFER_SIZE","Serializer","_serializeObject","circularReferenceCheck","_serializeStringMap","_serializeArray","contract","isRequired","isHidden","isPresent","isObj","sources","expectedType","num","parseFloat","serialize","HashCodeScoreGenerator","getHashCodeScore","getHashCode","INT_MAX_VALUE","SamplingScoreGenerator","hashCodeGenerator","keys","getSamplingScore","Sample","samplingRate","samplingScoreGenerator","isSampledIn","_getResponseText","defaultAppInsightsChannelConfig","maxBatchInterval","disableTelemetry","isRetryDisabled","convertUndefined","httpXHROverride","retryCodes","EnvelopeTypeCreator","currentContextId","bd","pageType","isLoggedIn","pageTags","pageViewData","exData","baseMetricData","remoteDepData","responseCode","Sender","_consecutiveErrors","_retryAt","_serializer","_stamp_specific_redirects","_headers","_syncUnloadSender","_offlineListener","_endpointUrl","_orgEndpointUrl","_maxBatchSizeInBytes","_beaconSupported","_beaconOnUnloadSupported","_beaconNormalSupported","_customHeaders","_disableTelemetry","_instrumentationKey","_convertUndefined","_isRetryDisabled","_maxBatchInterval","_sessionStorageUsed","_bufferOverrideUsed","_alwaysUseCustomSend","_fetchKeepAlive","_xhrSend","_fallbackSend","_disableBeaconSplit","_sendPostMgr","_retryCodes","_xdrOnLoad","_xhrReadyStateChange","countOfItemsInPayload","_checkResponsStatus","responseURL","_getPayloadArr","oriPayload","_validate","diagLogger","_sample","_getEnvelope","defaultEnvelopeIkey","aiEnvelope","constructEnvelope","doNotSendItem","callBack","_serialize","valid","_batch","_createPayload","_getHeaders","_doSend","sendInterface","markAsSent","payloadData","_getPayload","_onSuccess","_getOnComplete","_checkMaxSize","incomingPayload","incomingSize","isOnline","responseUrl","_appId","appId","_checkAndUpdateEndPointUrl","_resendPayload","_isRetriable","_doUnloadSend","_isStringArr","_fetchKeepAliveSender","transport","payloadSize","linearFactor","payload_1","delayInSeconds","SlotDelayInSeconds","backOffSlot","pow","backOffDelay","retryAfterTimeSpan","_setRetryTime","retryInterval","timerValue","statusCode","sendReason","onunloadFlush","addHeader","parentEvtNamespace","_navigator","_isListening","listenerList","rState","onLine","uState","_currentState","calCurrentState","_enableEvents","ononline","_setOnline","_setOffline","listnerNoticeCheck","offlineState","isListening","addListener","setOnlineState","createOfflineListener","senderConfig","curExtUrl","coreUrl","activeStatus","customHeader","bufferOverride","shouldUpdate","disableValidation","disableInstrumentationKeyValidation","_validateInstrumentationKey","sendPostConfig","resValue","canSend","internalPayload","droppedPayload","thePayload","_onBeaconRetry","_getSendPostMgrConfig","customInterface","httpInterface","syncInterface","xhrInterface","syncTransports","unloadTransports","filter","payloadItem","isCompletelyIdle","getOfflineListener","forcedSender","sendRequest","_getNotifyMgr","eventsSendRequest","_notifySendRequest","ieVer","getOfflineSupport","getUrl","createPayload","shouldProcess","failed","retry","reverse","errors_1","extracted","_onPartialSuccess","orig","parseConnectionString","kvPairs","fields","kv","kvParts","endpointsuffix","locationPrefix","ThrottleMgr","_config","_localStorageObj","_isTriggered","_isReady","_isSpecificDaysGiven","_flushMessage","msgID","saveUnsentMsg","_getCfgByKey","limit","_canSampledIn","localStorageObj","_getLocalStorageObjByKey","canThrottle","_canThrottle","throttled","isTriggered","_isTrigger","maxSendNumber","localStorageName","_getLocalStorageName","_resetLocalStorage","_sendMessage","isThrottled","throttleNum","_getQueueByKey","_setCfgByKey","interval","monthInterval","dayInterval","curCfg","configInterval","daysOfMonth","canUseLocalStorage","curDate","_getThrottleDate","monthCheck","monthExpand","getUTCFullYear","getUTCMonth","_checkInterval","dayCheck","daySpan","msgKey","prefix","fix","dateStr","getDate","storageName","curObj","storageObj","preTriggerDate","_getLocalStorageObj","isTrigger","_isTriggeredOnCurDate","addUnloadHook","coreConfig","configMgr","throttleMgrCfg","localObj","isReady","flushAll","result_1","isFlushed","onReadyState","sendMessage","perfEvtsSendAll","_runScheduledListeners","asyncNotifications","_runListeners","listeners","NotificationManager","_listeners","_asyncNotifications","rn_1","waiting","_finishUnload","asyncUnload","TelemetryInitializerPlugin","_initializers","addTelemetryInitializer","theInitializer","_addInitializer","telemetryInitializersCount","_runInitializers","strValidationError","strSdkUnloadingError","diagnosticLogInterval","_createPerfManager","notificationMgr","_isPluginPresent","exists","_deepMergeConfig","newValues","merge","_findWatcher","newWatcher","theListener","l","AppInsightsCore","_configHandler","_eventQueue","_notificationManager","_perfManager","_cfgPerfManager","_cookieManager","_pluginChain","_configExtensions","_channelConfig","_channels","_isUnloading","_telemetryInitializerPlugin","_internalLogsEventName","_unloadHandlers","_traceCtx","_cfgListeners","_extensions","_pluginVersionStringArr","_pluginVersionString","_activeStatus","_endpoint","_initInMemoMaxSize","_isStatusSet","_internalLogPoller","_internalLogPollerListening","_forceStopInternalLogPoller","_setStatus","_releaseQueues","releaseQueue","pollInternalLogs","_startLogPoller","alwaysStart","_addUnloadHook","isRunning","_flushInternalLogs","_setPluginVersions","thePlugins","_addPluginVersions","channels","cfgExtensions","_createTelCtx","theCtx","_getPluginChain","_initPluginChain","theExtensions","channelPriority","allExtensions","coreExtensions","extPriorities","extPriority","_validateExtensions","_getPlugin","pluginIdentifier","theExt","channelHosts","getChannel","removeCb","pluginsToRemove","_removePlugins","removed","removeComplete","unloadChain","newConfigExtensions","newChannelConfig","newQueue","channel","track","cbTimeout","doneIterating","cbTimer","doCallback","handled_1","_updateHook","_logOrThrowError","_notifyInvalidEvent","_setPendingStatus","notificationManager","prevCfgPerfMgr","rootCfg","initInMemoMaxSize","ikey","promises","initTimeout","initTimeOut","allPromises","ikeyRes","endpointRes","unloadContainer","debugListener","_initDebugListener","enablePerfMgr","createPerfMgr","teeController","unloadHdl","_registerDelayedCfgListener","getChannels","controls","getNotifyMgr","setCookieMgr","setPerfMgr","eventCnt","eventQueue","unloadComplete","flushComplete","processUnloadCtx","_doUnload","addPlugin","replaceExisting","addCb","existingPlugin","_addPlugin","removedPlugins_1","mergeExisting","oldCfg","setTraceCtx","traceCtx","onCfgChange","unloadHook","fnd","_createUnloadHook","getWParam","enableWParam","STR_PROPERTIES","_DYN_REQUEST_URL","_DYN_SPAN_ID","_DYN_CONTEXT","_DYN_ABORTED","_DYN_INCLUDE_CORRELATION_0","_DYN_GET_ABSOLUTE_URL","_DYN_REQUEST_HEADERS","_DYN_SET_REQUEST_HEADER","_DYN_TRACK_DEPENDENCY_DAT1","_DYN_ENABLE_REQUEST_HEADE2","_DYN_ENABLE_AJAX_ERROR_ST3","_DYN_ENABLE_AJAX_PERF_TRA4","_DYN_MAX_AJAX_CALLS_PER_V5","_DYN_EXCLUDE_REQUEST_FROM6","_DYN_DISABLE_AJAX_TRACKIN7","_DYN_AJAX_PERF_LOOKUP_DEL8","_DYN_DISABLE_FETCH_TRACKI9","_DYN_ENABLE_RESPONSE_HEAD10","_DYN_STATUS_TEXT","_DYN_HEADER_MAP","_DYN_REQUEST_SENT_TIME","_DYN_GET_TRACE_ID","_DYN_GET_TRACE_FLAGS","_DYN_METHOD","_DYN_ERROR_STATUS_TEXT","_DYN_STATE_CHANGE_ATTACHE11","_DYN_RESPONSE_TEXT","_DYN_RESPONSE_FINISHED_TI12","_DYN__CREATE_TRACK_ITEM","_DYN_GET_ALL_RESPONSE_HEA13","_DYN_GET_PART_APROPS","_DYN_PERF_MARK","_DYN_PERF_TIMING","_DYN_AJAX_DIAGNOSTICS_MES14","_DYN_CORRELATION_CONTEXT","_DYN_AJAX_TOTAL_DURATION","_DYN_EVENT_TRACE_CTX","_calcPerfDuration","resourceEntry","_setPerfDuration","_setPerfValue","strPerf","XHRMonitoringState","openDone","setRequestHeaderDone","sendDone","abortDone","ajaxRecord","completed","requestHeadersSize","responseReceivingDuration","callbackDuration","requestSize","responseStartedTime","callbackFinishedTime","endTime","xhrMonitoringState","clientFailure","getAbsoluteUrl","getPathName","ajaxType","enableRequestHeaderTracking","getResponse","ajaxTotalDuration","requestSentTime","responseFinishedTime","dependency","ajaxData","propsSet","strName","strStart","strEnd","strDomainLookup","strConnect","strRedirect","strRequest","strResponse","strStartTime","strDomainLookupStart","strDomainLookupEnd","strConnectStart","strConnectEnd","strRequestStart","strRequestEnd","strResponseStart","strResponseEnd","strRedirectStart","strRedirectEnd","strTransferSize","strEncodedBodySize","strDecodedBodySize","strServerTiming","serverTiming","server_1","perfAttempts","_populatePerfData","headerMap","responseHeaders","responseType","partA","traceExt","strDiagLog","AJAX_DATA_CONTAINER","STR_FETCH","ERROR_HEADER","ERROR_PREFIX","ERROR_POSTFIX","ERROR_NOT_SENT","CORRELATION_HEADER_ERROR","CUSTOM_REQUEST_CONTEXT_ERROR","FAILED_TO_CALCULATE_DURATION_ERROR","_markCount","_getAjaxData","ajaxDataId","_isHeaderSet","xh","_getFailedAjaxDiagnosticsMessage","_throwInternalCritical","ajaxMonitorInstance","_throwInternalWarning","_createErrorCallbackFunc","internalMessage","_ajaxDataId","_indexOf","_addHandler","theHandler","_processDependencyContainer","BLOB_CORE","DfltAjaxCorrelationHeaderExDomains","_internalExcludeEndpoints","distributedTracingMode","maxAjaxPerfLookupAttempts","ignoreHeaders","addRequestContext","addIntEndpoints","AjaxMonitor","_fetchInitialized","_xhrInitialized","_currentWindowHost","_enableRequestHeaderTracking","_enableAjaxErrorStatusText","_trackAjaxAttempts","_context","_isUsingW3CHeaders","_isUsingAIHeaders","_markPrefix","_enableAjaxPerfTracking","_maxAjaxCallsPerView","_enableResponseHeaderTracking","_disabledUrls","_disableAjaxTracking","_disableFetchTracking","_excludeRequestFromAutoTrackingPatterns","_addRequestContext","_dependencyHandlerId","_dependencyListeners","_dependencyInitializers","_ignoreHeaders","_maxAjaxPerfLookupAttempts","_ajaxPerfLookupDelay","_distributedTracingMode","_polyfillInitialized","_canIncludeHeaders","_hookProto","InstrumentProto","_isDisabledRequest","isDisabled","theUrl","theRegex","idx2","_isMonitoredXhrInstance","excludeAjaxDataValidation","ajaxValidation","initialized","_createMarkId","performance_1","mark","markId","entries","getEntriesByName","_findPerfResourceEntry","initiatorType","trackCallback","reportError","perfMark","performance","maxAttempts","retryDelay","attempt","locateResourceTiming","perfTiming","getEntries","entryType","clearMarks","_getFailedFetchDiagnosticsMessage","_reportFetchMetrics","_reportFetchError","failedProps","errorProps","sysProperties","_reportDependencyInternal","initializers","aborted","propExt","abort","xhrData","theOpen","_supportsAjaxMonitoring","req","spanID","xhrRequestData","ajaxDataCntr","_openHandler","_reportXhrError","ajaxResponse","responseHeadersString","_getAjaxCorrelationContext","responseHeaderMap_2","shift","_onAjaxComplete","exceptionText","_attachToOnReadyStateChange","hkErr","_addSharedXhrHeaders","_instrumentXhr","_global","isPolyfill","polyfill","fetchData","_createFetchRecord","newInit","fetchData_1","fetchDiagnosticsMessage","_getFetchCorrelationContext","responseHeaderMap_1","catch","_instrumentFetch","trackDependencyData","currentWindowHost","_processDependencyListeners","traceParent","addDependencyListener","dependencyListener","addDependencyInitializer","dependencyInitializer","Application","Device","Internal","unloadHookContainer","sdkExtension","sdkVersion","Location","_DYN_SESSION","_DYN_SESSION_MANAGER","_DYN_IS_USER_COOKIE_SET","_DYN_IS_NEW_USER","_DYN_GET_TRACE_CTX","_DYN_TELEMETRY_TRACE","_DYN_APPLY_SESSION_CONTEX0","_DYN_APPLY_APPLICATION_CO1","_DYN_APPLY_OPERATION_CONT2","_DYN_APPLY_OPERATING_SYST3","_DYN_APPLY_LOCATION_CONTE4","_DYN_APPLY_INTERNAL_CONTE5","_DYN_GET_SESSION_ID","_DYN_SESSION_COOKIE_POSTF6","_DYN_AUTOMATIC_SESSION","_DYN_ACCOUNT_ID","_DYN_AUTHENTICATED_ID","_DYN_ACQUISITION_DATE","_DYN_RENEWAL_DATE","_DYN_COOKIE_SEPARATOR","_DYN_AUTH_USER_COOKIE_NAM7","Session","_SessionManager","_storageNamePrefix","_cookieUpdatedTimestamp","_sessionExpirationMs","_sessionRenewalMs","sessionCookiePostfix","_initializeAutomaticSessionWithData","session","sessionData","sessionReset","tokens","acqMs","renewalMs","_setCookie","nowMs","acq","renewalPeriodMs","acqTimeLeftMs","cookie","isExpired","storageValue","_initializeAutomaticSession","timeSinceAcqMs","timeSinceRenewalMs","getNewId","idLength","_renew","backup","renewal","TelemetryTrace","parentId","_validateUserInput","User","isNewUser","isUserCookieSet","userCookiePostfix","userCookieName","params","_generateNewId","_setUserCookie","_generateNewCookie","utlRemoveStorage","authCookie","authCookieString","decodeURI","acqStr","accountAcquisitionDate","setAuthenticatedUserContext","authenticatedUserId","accountId","storeInCookie","encodeURI","clearAuthenticatedUserContext","cookieSeparator","authUserCookieName","strExt","strTags","_removeEmpty","_nullResult","undefString","TelemetryContext","previousTraceCtx","application","internal","autoSession","build","applyDeviceContext","agentVersion","snippetVer","sdkSrc","applyWebContext","applyUserContext","cleanUp","nullValue","isBrowserLinkTrackingEnabled","PropertiesPlugin","_distributedTraceCtx","_previousTraceCtx","_disableUserInitMessage","disableUserInitMessage","_unloadHooks","breezeChannel","theContext","userCtx","_processTelemetryInternal","_c","_d","_internalSdkSrc","_AUTHENTICATED_USER_CONTEXT","_TRACK","STR_SNIPPET","STR_FLUSH","STR_ADD_TELEMETRY_INITIALIZER","STR_POLL_INTERNAL_LOGS","STR_GET_PLUGIN","STR_EVT_NAMESPACE","STR_TRACK_EVENT","STR_TRACK_TRACE","STR_TRACK_METRIC","STR_TRACK_PAGE_VIEW","STR_TRACK_EXCEPTION","STR_TRACK_DEPENDENCY_DATA","STR_SET_AUTHENTICATED_USER_CONTEXT","STR_CLEAR_AUTHENTICATED_USER_CONTEXT","_DYN_QUEUE","_DYN_CONNECTION_STRING","_DYN_USER_OVERRIDE_ENDPOI0","_DYN_ONUNLOAD_FLUSH","_DYN_ADD_HOUSEKEEPING_BEF1","_DYN_SEND_MESSAGE","_DYN_UPDATE_SNIPPET_DEFIN2","_ignoreUpdateSnippetProperties","IKEY_USAGE","CDN_USAGE","SDK_LOADER_VER","default_throttle_config","defaultConfigValues","extensionConfig","AppInsightsSku","snippet","dependencies","_sender","_snippetVersion","_houseKeepingNamespace","_core","_cfgSyncPlugin","_throttleMgr","_iKeySentMessage","_cdnSentMessage","_sdkVerSentMessage","sv","_removePageEventHandlers","removePageHideEventListener","configCs","_parseCs","curCs","parsedCs","ikeyPromise","cs","instrumentationkey","ingest","ingestionendpoint","flushDone","loadAppInsights","legacyMode","isModule","cdns","scrpt","currentScript","url_1","src_1","_findSdkSourceFile","_updateSnippetProperties","emptyQueue","defaultEnable","length_1","appInsightsInstance","performHousekeeping_1","loadedPlugin","propertiesPlugin","_sessionManager","added_1","analyticsPlugin","excludePageUnloadEvents","disablePageUnloadEvents","getSender","ApplicationInsightsContainer","theSku","LoggingSeverity","DISABLED","CRITICAL","WARNING","DEBUG","Constructor","Prototype","strFunction","DynInstFuncTable","DynProxyTag","DynClassName","DynClassNamePrefix","DynInstChkTag","DynAllowInstChkTag","DynProtoDefaultOptions","UnknownValue","str__Proto","DynProtoBaseProto","DynProtoGlobalSettings","DynProtoCurrent","strUseBaseInst","strSetInstFuncs","Obj","_objGetPrototypeOf","_objGetOwnProps","_gbl","_gblInst","o","_isObjectOrArrayPrototype","_isObjectArrayOrFunctionPrototype","Function","newProto","curProto","_forEachProp","_isDynamicCandidate","skipOwn","_throwTypeError","_hasVisited","_populatePrototype","baseInstFuncs","setInstanceFunc","_createDynamicPrototype","dynProtoProxy","instFunc","currentDynProtoProxy","instFuncTable","canAddInst","objProto","visited","protoFunc","_getInstFunc","_getProtoFunc","instFuncs_1","_getObjName","unknownValue","dynamicProto","delegateFunc","classProto","thisTarget","thisProto","_checkPrototype","perfOptions","useBaseInst","instFuncs","_getInstanceFuncs","baseFuncs","_instFuncProxy","funcHost","baseProto","_getBaseFuncs","getCircularProgressUtilityClass","slot","generateUtilityClass","generateUtilityClasses","_excluded","_t","_t2","_t3","_t4","_","SIZE","circularRotateKeyframe","circularDashKeyframe","CircularProgressRoot","styled","overridesResolver","ownerState","variant","capitalize","color","theme","display","transition","transitions","vars","palette","main","CircularProgressSVG","svg","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","inProps","style","thickness","other","classes","slots","composeClasses","useUtilityClasses","circleStyle","rootStyle","rootProps","circumference","PI","toFixed","round","transform","clsx","width","height","role","viewBox","cx","cy","r","fill","useDefaultProps","black","white","A100","A200","A400","A700","light","primary","secondary","divider","background","paper","default","active","hover","hoverOpacity","selected","selectedOpacity","disabledBackground","disabledOpacity","focus","focusOpacity","activatedOpacity","dark","icon","addLightOrDark","intent","direction","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","createPalette","contrastThreshold","getDefaultPrimary","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","warning","getDefaultWarning","getContrastText","augmentColor","mainShade","lightShade","darkShade","contrastText","modes","deepmerge","common","grey","caseAllCaps","textTransform","defaultFontFamily","createTypography","typography","fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem","pxToRem2","coef","buildVariant","letterSpacing","casing","variants","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","button","caption","overline","inherit","createShadow","px","mobileStepper","fab","speedDial","appBar","drawer","modal","snackbar","tooltip","mixins","mixinsInput","paletteInput","transitionsInput","typographyInput","systemTheme","muiTheme","breakpoints","toolbar","minHeight","up","shadows","createTransitions","reduce","acc","argument","unstable_sxConfig","defaultSxConfig","unstable_sx","styleFunctionSx","sx","easing","easeInOut","easeOut","easeIn","sharp","shortest","shorter","short","standard","complex","enteringScreen","leavingScreen","formatMs","milliseconds","getAutoHeightDuration","constant","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","delay","animatedProp","createStyled","themeId","defaultTheme","rootShouldForwardProp","getSvgIconUtilityClass","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette","_palette2","_palette3","userSelect","hasSvgAsChild","small","medium","large","SvgIcon","component","htmlColor","inheritViewBox","titleAccess","instanceFontSize","more","as","focusable","muiName","createSvgIcon","displayName","StyledEngineProvider","injectFirst","C","reactPropsRegex","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","shouldForwardProp","optionsShouldForwardProp","__emotion_forwardProp","propName","newStyled","targetClassName","__emotion_real","baseTag","__emotion_base","label","defaultShouldForwardProp","shouldUseAs","templateStringsArr","Styled","FinalTag","classInterpolations","finalShouldForwardProp","defaultProps","defineProperty","withComponent","nextTag","nextOptions","tagName","GlobalStyles","globalStyles","themeInput","internal_processStyles","_interopRequireDefault","exports","darken","foreground","lumA","getLuminance","lumB","lighten","_formatMuiErrorMessage2","_clamp","clampWrapper","hexToRgb","colors","decomposeColor","marker","colorSpace","colorChannel","decomposedColor","recomposeColor","hslToRgb","rgb","Number","alpha","coefficient","emphasize","systemDefaultTheme","slotShouldForwardProp","systemSx","_styleFunctionSx","_extends2","resolveTheme","__mui_systemSx","inputOptions","_styledEngine","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","skipSx","inputSkipSx","defaultOverridesResolver","lowercaseFirstLetter","_objectWithoutPropertiesLoose2","_excluded3","shouldForwardPropOption","defaultStyledResolver","transformStyleArg","stylesArg","_deepmerge","isPlainObject","processStyleArg","muiStyledResolver","styleArg","expressions","transformedStyleArg","expressionsWithDefaultTheme","components","styleOverrides","resolvedStyleOverrides","slotKey","slotStyle","_theme$components","numOfCustomFnsApplied","placeholders","withConfig","__esModule","_getRequireWildcardCache","has","getOwnPropertyDescriptor","u","_interopRequireWildcard","_createTheme","_excluded2","callableStyle","resolvedStylesArg","flatMap","resolvedStyle","isMatch","resolveProps","defaultSlotProps","slotProps","slotPropName","PropsContext","getThemeProps","xs","sm","md","lg","xl","defaultBreakpoints","handleBreakpoints","propValue","styleFromPropValue","themeBreakpoints","breakpoint","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","removeUnusedBreakpoints","breakpointKeys","breakpointOutput","applyStyles","getColorSchemeSelector","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","unit","step","sortedValues","down","between","endIndex","only","not","keyIndex","borderRadius","spacing","spacingInput","shape","shapeInput","mui","argsInput","createSpacing","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","dir","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","themeKey","_getPath","themeSpacing","createUnarySpacing","getValue","transformer","transformed","resolveCssProperty","cssProperties","cssProperty","getStyleFromPropValue","margin","padding","propTypes","filterProps","getPath","checkVars","getStyleValue","themeMapping","propValueFinal","userValue","borderTransform","createBorderStyle","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outline","outlineColor","gap","columnGap","rowGap","paletteTransform","sizingTransform","maxWidth","_props$theme","_props$theme2","minWidth","maxHeight","bgcolor","backgroundColor","pt","pr","pb","pl","py","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd","mt","mr","mb","ml","mx","my","marginTop","marginRight","marginBottom","marginLeft","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd","displayPrint","overflow","textOverflow","visibility","whiteSpace","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignContent","alignSelf","justifyItems","justifySelf","gridAutoFlow","gridAutoColumns","gridAutoRows","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridArea","top","bottom","boxShadow","boxSizing","fontStyle","textAlign","splitProps","_props$theme$unstable","systemProps","otherProps","extendSxProp","inSx","finalSx","unstable_createStyleFunctionSx","getThemeValue","_theme$unstable_sxCon","traverse","sxInput","sxObject","emptyBreakpoints","breakpointsKeys","styleKey","maybeFn","breakpointsValues","objects","allKeys","union","Set","every","objectsHaveSameKeys","contextTheme","MIN_SAFE_INTEGER","MAX_SAFE_INTEGER","getUtilityClass","utilityClass","getPrototypeOf","Symbol","toStringTag","iterator","deepClone","formatMuiErrorMessage","code","encodeURIComponent","defaultGenerator","generate","configure","generator","createClassNameGenerator","globalStateClasses","checked","expanded","focused","focusVisible","required","globalStatePrefix","globalStateClass","fnNameMatchRegex","getFunctionName","getFunctionComponentName","getWrappedName","outerType","innerType","wrapperName","functionName","getDisplayName","$$typeof","REACT_ELEMENT_TYPE","for","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","REACT_CLIENT_REFERENCE","typeOf","_pureAssign","func1","func2","_pureRef","_primitiveTypes","UNDEF_VALUE","NULL_VALUE","EMPTY","FUNCTION","OBJECT","PROTOTYPE","__PROTO__","UNDEFINED","CONSTRUCTOR","SYMBOL","POLYFILL_TAG","LENGTH","NAME","CALL","TO_STRING","StrCls","StrProto","MathCls","ArrCls","ArrProto","ArrSlice","safe","argArray","_createIs","theType","_createObjIs","theName","objToString","isUndefined","isNullOrUndefined","isDefined","isPrimitiveType","isString","isFunction","isObject","isDate","isNumber","isBoolean","isError","isPromiseLike","isTruthy","objGetOwnPropertyDescriptor","objHasOwnProperty","objHasOwn","polyObjHasOwn","objForEachKey","callbackfn","thisArg","propMap","_createProp","objDefineProp","objDefineProperties","objDefineAccessors","getProp","setProp","configurable","enumerable","objDefine","_createKeyValueMap","keyType","valueType","completeFn","writable","theMap","_assignMapValue","ERROR_TYPE","dumpObj","format","propertyValueDump","objType","throwError","throwTypeError","TypeError","_objFreeze","_doNothing","_getProto","objAssign","objKeys","objDeepFreeze","objFreeze","objGetPrototypeOf","createEnum","createEnumKeyMap","createTypeMap","mapClass","createSimpleMap","_globalCfg","_wellKnownSymbolMap","asyncIterator","hasInstance","isConcatSpreadable","matchAll","species","toPrimitive","unscopables","GLOBAL_CONFIG_KEY","_getGlobalValue","globalThis","_getGlobalConfig","_unwrapFunction","_unwrapFunctionWithPoly","clsProto","polyFunc","clsFn","_unwrapProp","mathMin","mathMax","strSlice","strSubstring","strSubstr","polyStrSubstr","strLeft","_polySymbols","_wellKnownSymbolCache","_globalLazyTestHooks","UNIQUE_REGISTRY_ID","_globalSymbolRegistry","gblCfg","gblSym","polyNewSymbol","description","theSymbol","polySymbolFor","registry","newSymbol_1","regId_1","_initTestHooks","getLazy","lazyValue","lzy","createCachedValue","toJSON","_cachedGlobal","WINDOW","_getGlobalInstFn","getFn","cachedValue","getGlobal","getInst","hasDocument","getDocument","hasWindow","getWindow","hasNavigator","getNavigator","hasHistory","getHistory","_symbol","_symbolFor","isNode","versions","isWebWorker","WorkerGlobalScope","_initSymbol","_getSymbolKey","_iterSymbol$1","hasSymbol","getSymbol","getKnownSymbol","noPoly","knownName","sym","polyGetKnownSymbol","newSymbol","symbolFor","isIterator","isIterable","isStrictNullOrUndefined","iterForOf","iter","iterResult","throw","fnApply","arrAppend","elms","elm","arrForEach","theArray","arrIndexOf","arrMap","arrSlice","arrReduce","_isProtoArray","_unsupportedError","objCreate","polyObjCreate","tempFunc","objSetPrototypeOf","_setName","baseClass","createCustomError","constructCb","errorBase","theBaseClass","orgName","captureFn","captureStackTrace","_createCustomError","orgProto","throwUnsupported","utcNow","polyUtcNow","_createTrimFn","exp","strTrim","mathFloor","_fnToString","_objCtrFnString","_gblWindow","_defaultDeepCopyHandler","plainObjDeepCopyHandler","defaultDeepCopyHandlers","copyTo","_deepCopy","visitMap","userHandler","newPath","newCtx","isPlain","isPrim","origin","copy","newKey","_copyProps","theEntry","_getSetVisited","newEntry","_doExtend","theArg","objCopyProps","deepExtend","_perf","getLength","getPerformance","mathRound","strSplit","setValueByKey","lastKey","strEndsWith","polyStrEndsWith","searchString","searchValue","strIndexOf","REF","UNREF","HAS_REF","ENABLED","_createTimerHandler","startTimer","refreshFn","cancelFn","theTimerHandler","timerId","_unref","_cancel","_refresh","refresh","dn","_createTimeoutWith","overrideFn","isArr","clearFn","timerFn","scheduleTimeout","createTimeout","ponyfillGlobal","__MUI_LICENSE_INFO__","LicenseInfo","getLicenseInfo","getLicenseKey","setLicenseKey","useTheme","localTheme","outerTheme","mergeOuterLocalTheme","nested","RtlContext","EMPTY_THEME","useThemeScoping","upperTheme","isPrivate","resolvedTheme","mergedTheme","useThemeWithoutDefault","upperPrivateTheme","engineTheme","privateTheme","rtlValue","DefaultPropsProvider","scopedTheme","enableCacheProvider","cacheKey","internalTheme","useMemo","memo","createTheme","defaultColors","superApp","commonColors","oriGrey","A900","lightItem","textAlert","textTag","offer","filledSuccess","dispaly","textWrap","iconMapping","ErrorCircle","InfoCircle","CheckCircle","selectedMark","inputRoot","listbox","option","content","clearIcon","Clear","popupIcon","ArrowDownThin","clamp","backdropFilter","WebkitBackdropFilter","invisible","badge","dot","overlap","borderWidth","sizeSmall","iconSizeSmall","sizeMedium","iconSizeMedium","sizeLarge","iconSizeLarge","startIcon","endIcon","textPrimary","contained","outlined","outlinedSizeSmall","disableElevation","fillRule","clipRule","CheckboxEmpty","indeterminateIcon","CheckboxIndeterminate","checkedIcon","CheckboxChecked","largeComponentRadius","mediumComponentRadius","smallComponentRadius","clickable","deleteIcon","deletable","labelSmall","labelMedium","circleDeterminate","strokeLinecap","LeftArrowIcon","RightArrowIcon","SwitchViewIcon","gridClasses","SELECTED_OPACITY","msOverflowStyle","scrollbarWidth","scrollbarColor","backgroundClip","columnHeaders","pinnedColumnHeaders","pinnedColumns","row","cell","footerContainer","hideFooterSelectedRowCount","disableUnderline","borderTopLeftRadius","borderTopRightRadius","inputSizeSmall","adornedStart","adornedEnd","multiline","filled","borderBottomStyle","bar","dashed","backgroundSize","bar2Buffer","barColorPrimary","dashedColorPrimary","backgroundImage","barColorSecondary","dashedColorSecondary","textUnderlineOffset","textDecorationThickness","underlineAlways","textDecorationColor","underline","fontFamilyCondensed","dotActive","dots","willChange","positionStatic","progress","LinearProgressProps","_setPrototypeOf","setPrototypeOf","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","nextCallback","getDerivedStateFromProps","prevState","updateStatus","componentDidUpdate","prevProps","nextStatus","cancelNextCallback","getTimeouts","exit","mounting","nodeRef","scrollTop","forceReflow","performEnter","performExit","_this2","appearing","_ref2","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onTransitionEnd","_this3","onExit","onExiting","onExited","nextState","setNextCallback","_this4","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","_this$props","childProps","TransitionGroupContext","noop","contextType","getTransitionProps","_style$transitionDura","_style$transitionTimi","transitionDuration","transitionTimingFunction","transitionDelay","refs","instance","setRef","entering","entered","Fade","defaultTimeout","inProp","TransitionComponent","handleRef","normalizedTransitionCallback","maybeIsAppearing","handleEntering","handleEnter","isAppearing","reflow","transitionProps","webkitTransition","handleEntered","handleExiting","handleExit","handleExited","getBackdropUtilityClass","BackdropRoot","WebkitTapHighlightColor","BackdropComponent","_slotProps$root","_slots$root","componentsProps","rootSlotProps","Root","notchedOutline","rounded","RadioButtonEmpty","RadioButtonChecked","iconFilled","iconEmpty","FavouriteFilled","emptyIcon","IconComponent","MenuProps","elevation","list","BackdropProps","rail","thumb","thumbColorPrimary","thumbColorSecondary","staticTooltipLabel","tooltipPlacementLeft","horizontal","alternativeLabel","lineHorizontal","borderTopStyle","iconContainer","labelContainer","StepIconComponent","focusVisibleClassName","disableRipple","switchBase","textColorPrimary","selectLabel","displayedRows","actions","indicator","scroller","textColor","arrow","html","webkitTextSizeAdjust","webkitFontSmoothing","mozOsxFontSmoothing","textDecoration","verticalAlign","sup","sub","listStyle","listStyleImage","img","webkitAppearance","webkitBoxSizing","textarea","table","borderCollapse","borderSpacing","th","variantMapping","banner","hero","blue","blueGrey","brown","bannerButton","green","inputElements","pink","purple","red","yellow","themeObject","SHADOW_LEVEL1","SHADOW_LEVEL2","SHADOW_LEVEL3","AuthorizationCodeTokenClient","_class","_AuthorizationCodeTokenClient","_defineProperty2","_axios","_jsCookie","_constants","_OidcTokenStorage","_OidcIdToken","_OidcToken","_singleton","singleton","OidcTokenStorage","initializeTokenFromAuthorizationCode","authCode","authorizationCode","authCodeTokenData","requestToken","accessToken","OidcToken","access_token","getClaim","UNKNOWN_USER","setAccessToken","ExpirationDate","expires_in","Token","LOGGED_IN_USER_COOKIE","idToken","OidcIdToken","id_token","setIdToken","redirectUri","codeVerifier","tokenRequest","SafeURL","identityUrl","REQUEST_OPTIONS","URLSearchParams","client_id","clientId","grant_type","redirect_uri","code_verifier","json","OidcClient","_CryptoUtils","_getRandomInt","RANDOM_NUMBER_UPPER_BOUND","oauthOptions","getRandomInt","callbackUrl","CryptoUtils","generateCodeVerifier","codeChallenge","generateCodeChallenge","redirectUrl","acr_values","acrValues","prompt","response_type","scope","code_challenge_method","code_challenge","OidcUrlHelper","validateParams","AUTH_CODE","errorParam","stateParam","TokenClient","_TokenRoutes","_AuthCookies","_TokenFetcher","_SessionTokenStorage","mainLogger","createChild","providedUrlIsValid","TokenRoutes","includes","warn","PUBLIC_ACCESS","tokenConfiguration","tokenConfigurationForTokenRoutes","SessionTokenStorage","sessionStorageKey","bindTokenUpdated","addEventListener","unbindTokenUpdated","removeEventListener","getToken","refreshToken","getTokenData","clearTokenData","newTokenData","isForUserToken","AuthCookies","hasAuthorizedUserValue","setTokenData","setRefreshTimeout","TokenFetcher","requestOptions","tokenData","isTimeoutSet","getTokenRefreshTime","dispatchTokenUpdated","_tokenData","timeToRefresh","TOKEN_REQUEST_INTERVAL","TokenEventNames","TokenService","_internals","_storage","getInstance","getAuthorizationToken","customerId","NOT_LOGGED_IN_USER_ID","getTokenServiceUserToken","getSessionStorageToken","getTokenServicePublicToken","oidcTokenStorage","getAccessToken","userTokenClient","publicTokenClient","UserTokenClient","PublicTokenClient","TokenSessionStorageKeys","TEAM_NAME","PACKAGE_NAME","LIBRARY_NAME","EMOTION_CACHE_KEY","USER_TOKEN_STORAGE_KEY","PUBLIC_TOKEN_USER","NONCE_STORAGE_KEY","ID_TOKEN_STORAGE_KEY","IDENTITY_CLIENT_ID","CODE_VERIFIER_STORAGE_KEY","AUTH_STATE_STORAGE_KEY","AUTH_REDIRECT_URL_STORAGE_KEY","AUTH_REDIRECT_URI_STORAGE_KEY","AUTHORIZATION_CODE_STORAGE_KEY","ANONYMOUS_TOKEN_STORAGE_KEY","_TokenEventNames","_TokenSessionStorageKeys","USER_ACCESS","_OidcClient","_OidcUrlHelper","_TokenClient","_TokenService","_reactIntegration","_tokens","_decodeToken","_isTokenValid","_doDevelopmentLogin","_isAuthenticatedCustomer","_validateLoggedInUserCookie","getAuthorizedUserValue","loggedInUserCookie","validateLoggedInUserCookie","super","hashFromKeys","getStorage","storageSpace","ori","_tokenRequestsStorage","Map","createStorageKey","objectToHash","isStorageItemMissing","isStorageItemExpired","itemResolved","upsertStorageItem","factory","removeStorageItem","delete","clearStorage","ExpirationSeconds","expirationDate","setSeconds","getSeconds","cleanToken","replaceAll","getRemainingSeconds","decoded","decodeToken","floor","getTokenClients","_PublicTokenClient","_UserTokenClient","_cleanToken","_getRemainingSeconds","_getTokenClients","loggedInUserCookieSchema","cookieContent","safeParse","_constantsGenerated","Logger","teamName","IfAnonymousUser","_useToken","isAnonymousUser","useToken","IfLoggedInUser","LegacyTokenService","getUserAccessToken","getPublicAccessToken","tokenService","getPublicToken","MockedTokenProvider","PrefetchedTokenProvider","_react","_tokenContext","_jsxRuntime","initialToken","isTokenValid","contextValue","formattedToken","isUserVerified","tokenContext","StandaloneTokenProvider","clientToken","setClientToken","isAnonymous","setIsAnonymous","setIsUserVerified","fetchedToken","fetchToken","cause","remainder","timer","tokenValue","UniversalTokenProvider","_useUniversalToken","useUniversalToken","_IfAnonymousUser","_IfLoggedInUser","_LegacyTokenService","_MockedTokenProvider","_PrefetchedTokenProvider","_StandaloneTokenProvider","_UniversalTokenProvider","cleanInitialToken","validInitialToken","updateTokenData","newToken","decodedToken","customer_id","tokenChangedListener","CombinedSessionItem","_SessionStorage","removeItem","userToken","anonymousToken","CombinedTokenStorage","_CombinedSessionItem","createStorageItem","_OidcAccessToken","_SessionValue","SessionValue","OidcAccessToken","oidcIdToken","_isSessionStorageSupported","isSessionStorageAvailable","isSessionStorageSupported","sessionStorage","clearItems","keyName","tokenStorageKey","validateStored","newStorageValue","getTokenUser","existingUserInsideToken","storedData","cleanStored","isNewAuthCookie","_CombinedTokenStorage","_StorageItem","_TokenStorage","_jwtDecode","claim","jwtDecode","_Token","_TokenData","_encBase","_sha","_randomWord","lib","WordArray","words","generateUUIDv4","hashed","doDevelopmentLogin","tenant","searchParams","oidcUrlHelper","tokenClient","storeAuthCodeFromParams","handleRedirectAfterLogin","doLogin","ceiledMin","ceil","flooredMax","getRandomNumber","crypto","isAuthenticatedCustomer","TEST","tokenPayload","_Singleton","Singleton","_joinPathSegments","base","baseAsURL","joinPathSegments","settle","fetchAdapter","validateStatus","AxiosError","ERR_BAD_REQUEST","ERR_BAD_RESPONSE","normalizeValue","getRequest","rawHeaders","ERR_NETWORK","axiosResponse","fromEntries","arrayBuffer","blob","promiseChain","Promise","timeoutErrorMessage","ECONNABORTED","race","_fetchAdapter","createAxiosWithCache","maxAge","ttl","generateKey","_axiosCacheInterceptor","buildKeyGenerator","setupCache","_exportNames","axios","_adapters","_createAxiosWithCache","_SafeURL","fixExcessiveSlashing","_fixExcessiveSlashing","startsWith","baseURL","baseURLObject","queryParamsSerializer","_getUrl","pathnames","MISSING_PROPERTY","JSON_NOT_VALID","JSON_NOT_PROVIDED","_ClientAppDataConfig","_parseClientAppConfig","_isValidClientAppConfigProperty","_safeParseJson","isValidClientAppConfigProperty","SafeParseJsonError","safeParseJson","jsonString","messageParameters","_error","ParseClientAppConfigError","parseClientAppConfig","requiredProperties","parsedClientAppConfig","ServiceUrlsProvider","_serviceUrlsContext","_useServiceUrlsProvider","serviceUrls","useServiceUrlsProvider","serviceUrlsContext","_ServiceUrlsProvider","_useServiceUrls","useServiceUrls","requiredServices","allClientServices","missingServices","serviceName","getAuthenticationConfiguration","environment","azureRegionOrTenant","_loadConfiguration","loadConfiguration","_cache","createCacheKey","CACHE_KEY","_fetchConfiguration","fetchConfiguration","_createConfigurationUrl","createConfigurationUrl","_types","ConfigurationType","Authentication","configurationManagerOptions","withoutCache","getEnvironmentTenants","configuration","Hierarchy","localeCompare","getEnvironmentTenantsAndLanguages","languages","Languages","getRegionTenants","region","Tenants","Tenant","getRuntimeUrl","urlsConfiguration","runtime","runtimeHierarchy","targetRuntime","at","_ServiceRuntime","ServiceRuntime","VNet","K8s","getRuntimeUrlInternal","Public","intranetUrl","baseUrl","getServicesUrls","servicesUrls","_getUrlsConfigurations","getUrlsConfigurations","_transforms","transformUrlsWithOverrides","getUrlsConfiguration","Url","getUrlsConfigurationsByRegion","getUrlsConfigurationsByTenant","getValidatedRequiredServices","allServiceUrls","_contexts","_getAuthenticationConfiguration","_getEnvironmentTenants","_getEnvironmentTenantsAndLanguages","_getRegionTenants","_getRuntimeUrl","_getServicesUrls","_getUrlsConfiguration","_getUrlsConfigurationsByRegion","_getUrlsConfigurationsByTenant","_getValidatedRequiredServices","_pickBaseUrlsOfServices","TTL","_memoryCache","configurationUrl","defaultLogger","storageUrls","_getDefaultStorageUrls","getDefaultStorageUrls","axiosOptions","urls","settingsStorageCdn","settingsStorage","settingsSecondaryStorage","lastError","_getAxios","getAxios","configurationStorageUrl","axiosClient","axiosClients","ACCEPT_ENCODING_HEADER","ACCEPTED_ENCODING","axiosInstance","TIMEOUT","transitional","clarifyTimeoutError","_axiosRetry","retries","RETRIES_COUNT","shouldResetTimeout","_zodUtils","validateEnvironment","ENVIRONMENT","REGION","Region","_getStorageUrls","getStorageUrls","getRuntimeBackendUrl","isAKS","TEST_SECONDARY_CONFIGURATION_STORAGE","TEST_CONFIGURATION_STORAGE_CDN_BACKUP","TEST_CONFIGURATION_STORAGE_CDN","TEST_CONFIGURATION_STORAGE","SECONDARY_CONFIGURATION_STORAGE","CONFIGURATION_STORAGE_CDN_BACKUP","CONFIGURATION_STORAGE_CDN","CONFIGURATION_STORAGE","CHINA_TEST_SECONDARY_CONFIGURATION_STORAGE","CHINA_TEST_CONFIGURATION_STORAGE_CDN","CHINA_TEST_CONFIGURATION_STORAGE","CHINA_SECONDARY_CONFIGURATION_STORAGE","CHINA_CONFIGURATION_STORAGE_CDN","CHINA_CONFIGURATION_STORAGE","isLiveEnvironment","isChinaRegion","getSettingsStorageCdnUrl","getSettingsStorageUrl","getSecondaryStorageUrl","loader","CACHE_BACKUP_KEY","CACHE_BACKUP_KEY_SUFFIX","cacheItem","load","cacheBackupKey","put","HOUR","DAY","createUrlEnvKey","urlName","getValueWithOverrides","_createUrlEnvKey","pickBaseUrlsOfServices","optionalServices","uniqueRequiredServices","pickedUrls","accumulator","_transformUrlsWithOverrides","serviceNameKey","newServiceName","serviceMapping","_getValueWithOverrides","BaseUrl","internalUrl","InternalUrl","IntranetUrl","k8sUrl","K8sUrl","backendUrl","_getRuntimeBackendUrl","azureRegionsRaw","azureRegions","azureRegionSchemaRaw","azureRegionSchema","enum","environmentsSchema","environmentsRawSchema","environmentsRaw","environments","serviceSchemaRaw","serviceSchema","serviceNamesRaw","serviceNames","_Authentication","_AuthenticationConfiguration","_AzureRegionHierarchyConfiguration","_AzureRegionOrTenant","_AzureRegions","_ClientServiceUrl","_ClientServiceUrls","_ConfigurationManagerOptions","_ConfigurationType","_EnvironmentHierarchyConfiguration","_AzureRegion","_Environment","_Service","_PickBaseServiceUrls","_RequiredServices","_Services","_ServiceUrls","_StorageUrls","_Tenant","_TenantHierarchyConfiguration","_Tenants","configurationType","regionOrTenant","urlParts","Common","Messaging","_isAzureRegion","isAzureRegion","ENVIRONMENT_CODES","DEV","UAT","STG","LIVE","DEFAULT_TENANT","_enviromentCodes","EnvironmentProvider","_environmentContext","contextValues","environmentContext","_useEnvironment","useEnvironment","_EnvironmentProvider","_utils","getEnvironmentFromHost","BASE_HOST_REGEX","NATIONAL_DOMAIN_HOST_REGEX","PR_DEPLOY_HOST_REGEX","DEVELOPMENT_HOST_REGEX","getEnvironment","groups","_getEnvironmentFromHost","UNKNOWN_ERROR","INTERNAL_ERROR_MESSAGES","ERROR_MESSAGE_TOKEN_PATTERN","errorName","errorMessages","errorCode","createErrorMessage","errorOptions","createCustomErrorWithData","errorData","_createCustomErrorWithData","_createErrorMessage","_CustomError","_CustomErrorOptions","_CustomErrorWithData","_CustomErrorWithDataOptions","_ErrorMessages","JSON_CONTENT","VISITOR_SEGMENT","USE_PRODUCT_DATA_CACHING","USE_PRODUCTS_SERVICE","TENANT_CONTEXT","REGISTRATION_ID","PREVIEW_MODE","PLACEMENT","CUSTOMER_TYPE_ID","CUSTOMER_CONTEXT","CONTENT_TYPE","CLIENT_APPLICATION","CHANNEL_TYPE","AUTHORIZATION","ATP_CLUSTER_ID","ACCEPT_LANGUAGE","DEFAULT_TIMEOUT","_contentTypes","_statusCodes","STATUS_OK","STATUS_NOT_FOUND","STATUS_INTERNAL_SERVER_ERROR","EmptyBodyFetchGraphqlError","_FetchGraphqlError","FetchGraphqlError","query","FormattedAxiosError","axiosError","graphqlQuery","variables","trimGraphqlQuery","NonOkResponseFetchGraphqlError","_EmptyBodyFetchGraphqlError","_NonOkResponseFetchGraphqlError","gql","_useGraphqlQuery","useGraphqlQuery","skip","swrConfig","fetcherOptions","_swr","useSWRConfig","createSimplifiedCacheKey","configForSWR","fallbackData","_middleware","initialDataMiddleware","revalidateOnMount","unstable_serialize","fetchGraphql","useSWR","useSWRMutation","_mutation","_errors","_gql","_initialDataMiddleware","useSWRNext","fetcher","hasMounted","fallbackConfig","swr","mutate","_defaultHeaders","_isEmptyObject","headersForCacheKey","isEmptyObject","requestConfig","requestData","_handleResponse","handleResponse","onSuccess","_tsUtils","isNonNullable","error_","rethrowError","getHeaders","_auth","_prepareToken","sourceAppName","language","formatToken","_createSimplifiedCacheKey","_fetchGraphql","_validateStatus","composeToken","BEARER","isoDateFormat","isIsoDateString","handleDates","applyDateMiddleware","interceptors","originalResponse","customQuerySerializer","__assign","__awaiter","_arguments","P","fulfilled","__generator","sent","trys","ops","verb","op","excludedPropertyNames","ApiClient","camelcaseKeysOptions","axiosRetryOptions","httpAgent","httpsAgent","paramsSerializer","exclude","applyCaseMiddleware","createFetcher","ApiClientProvider","apiClient","apiClientContext","DynamicFormattedMessage","_reactIntl","translatedMessage","formatMessage","useIntl","DYNAMIC_TRANSLATION_PREFIX","defaultMessage","FormattedMessage","_translationsNamespaceContext","namespace","translationsNamespaceContext","_DynamicFormattedMessage","_FormattedMessage","TranslationsNamespaceProvider","_TranslationsProvider","translationsWithNamespaces","translationsContext","_TranslationsNamespaceProvider","TranslationsProvider","_fetching","_translationsContext","_utils2","handleIntlProviderError","ReactIntlErrorCode","MISSING_DATA","FORMAT_ERROR","MISSING_TRANSLATION","descriptor","defaultTranslationsWithNamespaces","currentLanguage","clientFetchConfiguration","usedLanguage","fallbackLocale","shouldFetch","localizationData","fetchTranslationsWithNamespaces","suspense","revalidateIfStale","revalidateOnFocus","revalidateOnReconnect","shouldRetryOnError","showTranslationKeys","mapNamespacedTranslations","mapTranslationsToKeys","reactIntlData","flattenAndConcatenateKeysWithNamespace","IntlProvider","locale","defaultLocale","messages","_useLanguage","_useTranslationsFromNamespace","_useTranslationsWithNamespaces","useLanguage","useTranslationsFromNamespace","translations","useTranslationsWithNamespaces","usedTranslationsWithNamespaces","namespaceData","_flattenAndConcatenateKeysWithNamespace","_mapTranslationsToKeys","_mapNamespacedTranslations","namespacedTranslations","mapper","formatKeyValue","_legacy","_components","TRANSLATIONS_QUERY_PARAMETER_NAME","TRANSLATIONS_ENDPOINT","TRANSLATIONS_CACHE_MAX_AGE","FILE_HEADER","ENTRIES_DELIMITER","DEFAULT_LOCALIZATION_FILES_FOLDER_NAME","fetchTranslations","defaultKey","_md","assertHeaders","isAxiosError","_fetchTranslations","_updateDefaultNamespacesWithFetchedTranslations","_makeValueAsKey","makeValueAsKey","updateDefaultNamespacesWithFetchedTranslations","fetchedTranslations","currentNamespaceWithTranslations","translatedValue","_FetchTranslationsWithNamespacesOptions","_Language","_Translations","_TranslationsWithNamespaces","staticApiClient","_staticApiClientReact","stopPaths","getTranslations","all","packageTranslations","getTenantLocalization","packageId","lang","localizations","getPackageTranslations","_mergeTranslations","mergeTranslations","getTranslationsWithoutNamespaces","translationsWithoutNamespaces","namespaceTranslations","_fetchTranslationsWithNamespaces","_getTranslationsWithoutNamespaces","fetchedTranslationsWithoutNamespaces","_Logger","_cloneDeep","_pino","_pinoStdSerializers","_applicationInsights","_formatError","_LoggerBrowserConfiguration","_isPlainObject","_loggerEventEmitter","_pinoBrowserRuntimeTransport","_createMetadataDependencyInitializer","_SeverityLevels","isInBrowserRuntime","isInNodeRuntime","parentLoggerDefaultMessageMetadata","childLoggerDefaultMessageMetadata","loggerMetadataOrAreaName","loggerMetadata","areaName","messageMetadata","incommingChildMetadata","globalMetadata","asyncLocalStorage","storedMetadata","getStore","_globalMetadata","isMergeableObject","metadata","ApplicationInsights","metadataDependencyInitializer","createMetadataDependencyInitializer","getForClient","setGlobalMetadata","updateGlobalMetadata","pinoParent","isPageViewTracked","TRACK_THIS_PAGE_VIEW","initializeConfiguration","currentBrowserConfiguration","LoggerBrowserConfiguration","setConfiguration","localStorageListener","withPinoConfigurationNodeTransports","pipeline","loggerConfiguration","getConfiguration","applicationInsightsConfiguration","oriAppInsightsSettings","withPinoConfigurationBrowserTransports","pinoBrowserRuntimeTransport","write","pinoMessage","initializeParent","pinoOptions","useOnlyCustomLevels","customLevels","SeverityLevels","serializers","errWithCause","pino","initializeChild","getPinoParent","setupOptions","pinoChild","child","getPinoChild","createPinoMessage","additionalMeta","metadataWithoutTeamName","isServerApplicationInsightsClient","getForServer","getCorrelationContext","operation","applicationInsightsOperation","causeMessage","ERROR","metricName","metricValue","METRIC","INFO","debug","WARN","setMetadata","setBindings","updateMetadata","bindings","nextConfiguration","defaultLoggerConfiguration","loggerEventEmitter","updateConfiguration","isTransportConfigured","filters","some","byTransportType","_applicationinsightsReactJs","_applicationinsightsWeb","_EventEmitter","_pageViewInitializer","_createFilterTelemetryProcessor","_createFixedRateSampler","_enhanceDependencyDataProcessor","_excludeHealthProbesTelemetryProcessor","_excludeNextjsTelemetryProcessor","_ApplicationInsightsNotInitializedError","_isServerApplicationInsightsClient","_reset","realApplicationInsights","ApplicationInsightsNotInitializedError","onInitialized","eventListener","eventEmitter","removeListener","fallbackOptions","isInEdgeRuntime","EdgeRuntime","browserHistory","applicationInsights","pageViewInitializer","createFilterTelemetryProcessor","createFixedRateSampler","isMainThread","serverApplicationInsights","setup","setAutoCollectExceptions","setSendLiveMetrics","setAutoCollectConsole","setAutoCollectRequests","setAutoCollectPerformance","setAutoDependencyCorrelation","setAutoCollectIncomingRequestAzureFunctions","defaultClient","addTelemetryProcessor","excludeHealthProbesTelemetryProcessor","excludeNextjsTelemetryProcessor","enhanceDependencyDataProcessor","EventEmitter","getApplicationInsightsReactPlugin","_ApplicationInsights","ai","find","extension","getClientApplicationInsightsConfig","_ApplicationInsightsLike","_getApplicationInsightsReactPlugin","_getClientApplicationInsightsConfig","_ServerApplicationInsights","GET_STATIC_PROPS_ERROR","minimalSeverityLevel","LoggerTransportType","APPLICATION_INSIGHTS","NO_RESPONSE_STATUS_CODE","providedError","dataAsJson","numberOfChars","responseBody","innerCallstack","_measureFunctionDuration","_loggerConfigurationSchema","_nodeEvents","isBrowser","isEventTarget","EventTarget","listenerToBrowserEventListeners","listenerReference","eventListenerUnderReference","LOCAL_STORAGE_KEY","localStorageValue","localStorage","loggerConfigurationSchema","partial","validated","mergedWithCurrent","definePinoLogHandlers","onInfo","onMetric","onWarn","onDebug","pinoApplicationInsightsLogHandler","_definePinoLogHandlers","DeserializedError","getServerApplicationInsightsTagOverrides","serializedOrNormalError","otherMessageProperties","errorCause","otherProperties","errorProperties","causeName","causeStack","otherCauseProperties","Contracts","tagOverrides","otherMesageProperties","pinoConsoleLogHandler","_ansis","_isObject","_stringifyErrorObject","_stringifyObject","levelToColoretteFunctionName","gray","bgWhite","levelToConsoleMethod","logLevelToLabel","userMessage","formattedTime","Intl","DateTimeFormat","minute","second","fractionalSecondDigits","hour12","formatTime","logLinePrefix","logLine","propertiesWithoutError","dim","stringifyObject","stringifyErrorObject","logParams","log","pinoGroupedLogHandlers","_pinoApplicationInsightsLogHandler","_pinoConsoleLogHandler","CONSOLE","canRunLogHandler","loggingEnabled","canRunHandler","shouldRunForRule","byName","byAreaName","byNameRegExp","byAreaNameRegExp","byMinimalSeverityLevel","filterPinoMessage","pid","hostname","getEnabledLogHandlersForTransport","_pinoGroupedLogHandlers","isTransportTypeEnabled","enabledLogHandlers","isApplicationInsightsTransportEnabled","isConsoleTransportEnabled","_canRunLogHandler","_filterPinoMessage","_getEnabledLogHandlersForTransport","updatedLoggerConfiguration","logHandler","_pinoAbstractTransport","pinoNodeRuntimeTransport","printWarningWithTrace","NEWLINE_CHAR","leftPad","bold","inputValue","oneLineOnly","seen","indent","pad","newline","newlineOrSpace","Buffer","returnValue","elements","eol","objectKeys","getOwnPropertyNames","getOwnPropertySymbols","propertyIsEnumerable","isSymbol","isClassic","currentMetadata","newMetadata","filterFn","sampler","telemetryRecord","telemetryId","CryptoJS","percentage","hashValue","SHA256","enc","Hex","hashTelemetryId","customProps","flattenedProps","_zod","_LoggerTransportType","zodRegexOrRegexpLikeString","custom","severityLevelKeys","severityLevelValues","allowedSeverityOptions","zodCoerceSeverityLevel","loggerConfigurationFilterSchema","optional","nativeEnum","coerce","boolean","measureFunctionDuration","t0","AppInsightsProvider","setAppInsights","ErrorBoundary","_InternalErrorBoundary","_loggerContext","rest","paramLogger","parentLogger","loggerContext","InternalErrorBoundary","LoggerProvider","_AppInsightsProvider","_ErrorBoundary","_LoggerProvider","_useLogger","getDerivedStateFromError","useLogger","_nodeAsync_hooks","AsyncLocalStorage","_ChildLogger","_LoggerApplicationInsightsConfig","_LoggerLike","_LoggerMetadata","_LoggerMetadataPrimitiveValue","_MessageMetadata","useGlobalEvents","controller","AbortController","signal","finalOptions","useGetCustomerInfo","customInstance","swrOptions","swrKey","getGetCustomerInfoKey","client","getCustomerInfo","enabledFetch","customerCategory","customerType","customerTypeId","loading","visitorSegment","basicSwrOptions","getRetryErrorSwrOptions","retryCount","retryCountParam","errorRetryCount","errorRetryInterval","onErrorRetry","revalidate","HttpStatusCode","GatewayTimeout","BadRequest","InternalServerError","getClientQueryParam","queryParam","isSSR","__spreadArray","pack","ar","getTenantAccountsSendTemporaryPasswordMetadata","getGetTenantAccountsSendTemporaryPasswordMetadataKey","useGetTenantAccountsSendTemporaryPasswordMetadata","getTenantApplicationsAddressFormLocalization","getGetTenantApplicationsAddressFormLocalizationKey","useGetTenantApplicationsAddressFormLocalization","getTenantAddressFormats","getGetTenantAddressFormatsKey","useGetTenantAddressFormats","getTenantAddressFormat","getGetTenantAddressFormatKey","useGetTenantAddressFormat","getTenantApplicationsAdverseReactionLocalization","getGetTenantApplicationsAdverseReactionLocalizationKey","useGetTenantApplicationsAdverseReactionLocalization","getTenantApplicationsAdverseReactionProductsPartialSet","getGetTenantApplicationsAdverseReactionProductsPartialSetKey","useGetTenantApplicationsAdverseReactionProductsPartialSet","getTenantAppLinkTypeAppLink","appLinkType","getGetTenantAppLinkTypeAppLinkKey","useGetTenantAppLinkTypeAppLink","getTenantAtpCluster","atpClusterId","getGetTenantAtpClusterKey","useGetTenantAtpCluster","getTenantAtpClusters","getGetTenantAtpClustersKey","useGetTenantAtpClusters","getTenantProductAvailability","productCode","getGetTenantProductAvailabilityKey","useGetTenantProductAvailability","getTenantConceptAvailability","conceptCode","getGetTenantConceptAvailabilityKey","useGetTenantConceptAvailability","getTenantBackInStockNotifications","getGetTenantBackInStockNotificationsKey","useGetTenantBackInStockNotifications","getTenantBackInStockNotificationsConfiguration","getGetTenantBackInStockNotificationsConfigurationKey","useGetTenantBackInStockNotificationsConfiguration","getTenantBazaarvoiceConfiguration","getGetTenantBazaarvoiceConfigurationKey","useGetTenantBazaarvoiceConfiguration","getBeautyRewardPointsTenantLocalization","getGetBeautyRewardPointsTenantLocalizationKey","useGetBeautyRewardPointsTenantLocalization","getTenantBrands","getGetTenantBrandsKey","useGetTenantBrands","getTenantBrand","brandId","getGetTenantBrandKey","useGetTenantBrand","getTenantBrandDynamiclink","getGetTenantBrandDynamiclinkKey","useGetTenantBrandDynamiclink","getTenantApplicationsMv7BrandProductListing","getGetTenantApplicationsMv7BrandProductListingKey","useGetTenantApplicationsMv7BrandProductListing","getTenantApplicationsBreadcrumbLinks","getGetTenantApplicationsBreadcrumbLinksKey","useGetTenantApplicationsBreadcrumbLinks","getTenantBusinessModelsBcmIncentivesConfiguration","getGetTenantBusinessModelsBcmIncentivesConfigurationKey","useGetTenantBusinessModelsBcmIncentivesConfiguration","getTenantRewardShopConfigurations","getGetTenantRewardShopConfigurationsKey","useGetTenantRewardShopConfigurations","getTenantApplicationsCatalogueIPaperConfiguration","getGetTenantApplicationsCatalogueIPaperConfigurationKey","useGetTenantApplicationsCatalogueIPaperConfiguration","getTenantApplicationsCatalogueOverview","getGetTenantApplicationsCatalogueOverviewKey","useGetTenantApplicationsCatalogueOverview","getTenantCatalogues","getGetTenantCataloguesKey","useGetTenantCatalogues","getTenantCatalogueDynamiclink","catalogueId","getGetTenantCatalogueDynamiclinkKey","useGetTenantCatalogueDynamiclink","getTenantDigitalCatalogueDynamiclink","getGetTenantDigitalCatalogueDynamiclinkKey","useGetTenantDigitalCatalogueDynamiclink","getTenantCategories","getGetTenantCategoriesKey","useGetTenantCategories","getTenantCategoryDynamiclink","categoryId","getGetTenantCategoryDynamiclinkKey","useGetTenantCategoryDynamiclink","getTenantApplicationsMv7CategoryProductListing","getGetTenantApplicationsMv7CategoryProductListingKey","useGetTenantApplicationsMv7CategoryProductListing","getTenantApplicationsCeoContent","getGetTenantApplicationsCeoContentKey","useGetTenantApplicationsCeoContent","getTenantApplicationsChatBotMetadata","getGetTenantApplicationsChatBotMetadataKey","useGetTenantApplicationsChatBotMetadata","getTenantApplicationsChatBotPageMetadata","getGetTenantApplicationsChatBotPageMetadataKey","useGetTenantApplicationsChatBotPageMetadata","getTenantApplicationsShoppingBagConfiguration","getGetTenantApplicationsShoppingBagConfigurationKey","useGetTenantApplicationsShoppingBagConfiguration","getTenantApplicationsCheckoutRegistrationContent","getGetTenantApplicationsCheckoutRegistrationContentKey","useGetTenantApplicationsCheckoutRegistrationContent","getTenantCommissionPlanType","getGetTenantCommissionPlanTypeKey","useGetTenantCommissionPlanType","getTenantConceptIndexItems","getGetTenantConceptIndexItemsKey","useGetTenantConceptIndexItems","getTenantConceptLabels","getGetTenantConceptLabelsKey","useGetTenantConceptLabels","getTenantDeprecatedConcept","getGetTenantDeprecatedConceptKey","useGetTenantDeprecatedConcept","getTenantConcept","getGetTenantConceptKey","useGetTenantConcept","getTenantApplicationsMv7ModulesConceptsRepositoryConcepts","getGetTenantApplicationsMv7ModulesConceptsRepositoryConceptsKey","useGetTenantApplicationsMv7ModulesConceptsRepositoryConcepts","getTenantApplicationsMv7ModulesConceptsRepositoryConceptsHashCodes","getGetTenantApplicationsMv7ModulesConceptsRepositoryConceptsHashCodesKey","useGetTenantApplicationsMv7ModulesConceptsRepositoryConceptsHashCodes","getTenantApplicationsMv7ModulesConceptsLabelsRepositoryConceptsLabels","getGetTenantApplicationsMv7ModulesConceptsLabelsRepositoryConceptsLabelsKey","useGetTenantApplicationsMv7ModulesConceptsLabelsRepositoryConceptsLabels","getTenantConceptRecommendations","getGetTenantConceptRecommendationsKey","useGetTenantConceptRecommendations","getTenantBestsellers","getGetTenantBestsellersKey","useGetTenantBestsellers","getTenantApplicationsConcernReportFormLocalization","getGetTenantApplicationsConcernReportFormLocalizationKey","useGetTenantApplicationsConcernReportFormLocalization","getTenantApplicationsConcernReportFormConfiguration","getGetTenantApplicationsConcernReportFormConfigurationKey","useGetTenantApplicationsConcernReportFormConfiguration","getConsultantInfoTenantLocalization","getGetConsultantInfoTenantLocalizationKey","useGetConsultantInfoTenantLocalization","getTenantApplicationsBusinessappConsultantTitlesLocalization","getGetTenantApplicationsBusinessappConsultantTitlesLocalizationKey","useGetTenantApplicationsBusinessappConsultantTitlesLocalization","getTenantCustomerRegistrationsMetadatumContactDetailsMetadata","registrationType","getGetTenantCustomerRegistrationsMetadatumContactDetailsMetadataKey","useGetTenantCustomerRegistrationsMetadatumContactDetailsMetadata","getTenantCountries","getGetTenantCountriesKey","useGetTenantCountries","getTenantCountry","countryCode","getGetTenantCountryKey","useGetTenantCountry","getTenantCulture","getGetTenantCultureKey","useGetTenantCulture","getTenantCustomerConfirmationMetadata","getGetTenantCustomerConfirmationMetadataKey","useGetTenantCustomerConfirmationMetadata","getTenantCustomerRegistrationInstructionsMetadata","getGetTenantCustomerRegistrationInstructionsMetadataKey","useGetTenantCustomerRegistrationInstructionsMetadata","getTenantApplicationsConfigurationDelivery","getGetTenantApplicationsConfigurationDeliveryKey","useGetTenantApplicationsConfigurationDelivery","getTenantDeliveryMethods","getGetTenantDeliveryMethodsKey","useGetTenantDeliveryMethods","getTenantDocumentTypes","getGetTenantDocumentTypesKey","useGetTenantDocumentTypes","getTenantApplicationsDowngradeContent","getGetTenantApplicationsDowngradeContentKey","useGetTenantApplicationsDowngradeContent","getTenantDynamicLinksConfiguration","getGetTenantDynamicLinksConfigurationKey","useGetTenantDynamicLinksConfiguration","getTenantDynamicLinkTypeDynamicLink","dynamicLinkType","getGetTenantDynamicLinkTypeDynamicLinkKey","useGetTenantDynamicLinkTypeDynamicLink","getTenantApplicationsEarningsAppLocalization","getGetTenantApplicationsEarningsAppLocalizationKey","useGetTenantApplicationsEarningsAppLocalization","getTenantECatalogueSearchResult","eCatalogueId","getGetTenantECatalogueSearchResultKey","useGetTenantECatalogueSearchResult","getTenantECatalogueStructure","getGetTenantECatalogueStructureKey","useGetTenantECatalogueStructure","getTenantApplicationsEditorialEditorialPages","getGetTenantApplicationsEditorialEditorialPagesKey","useGetTenantApplicationsEditorialEditorialPages","getTenantApplicationsEditorialHeaders","getGetTenantApplicationsEditorialHeadersKey","useGetTenantApplicationsEditorialHeaders","getTenantApplicationsEditorialProductBoxCarousels","getGetTenantApplicationsEditorialProductBoxCarouselsKey","useGetTenantApplicationsEditorialProductBoxCarousels","getTenantApplicationsEditorialOlapics","getGetTenantApplicationsEditorialOlapicsKey","useGetTenantApplicationsEditorialOlapics","getTenantApplicationsEditorialBanners","getGetTenantApplicationsEditorialBannersKey","useGetTenantApplicationsEditorialBanners","getTenantApplicationsEditorialLandingPages","getGetTenantApplicationsEditorialLandingPagesKey","useGetTenantApplicationsEditorialLandingPages","getTenantApplicationsEditorialRelatedEditorialPages","getGetTenantApplicationsEditorialRelatedEditorialPagesKey","useGetTenantApplicationsEditorialRelatedEditorialPages","getTenantApplicationsEditorialMixedPlpContent","contentItemId","getGetTenantApplicationsEditorialMixedPlpContentKey","useGetTenantApplicationsEditorialMixedPlpContent","getTenantApplicationsEditorialEditorialBannerCarousels","getGetTenantApplicationsEditorialEditorialBannerCarouselsKey","useGetTenantApplicationsEditorialEditorialBannerCarousels","getTenantApplicationsEditorialTestimonialCarousels","getGetTenantApplicationsEditorialTestimonialCarouselsKey","useGetTenantApplicationsEditorialTestimonialCarousels","getTenantApplicationsEditorialFrequentlyAskedQuestions","getGetTenantApplicationsEditorialFrequentlyAskedQuestionsKey","useGetTenantApplicationsEditorialFrequentlyAskedQuestions","getTenantApplicationsEditorialLinkLists","getGetTenantApplicationsEditorialLinkListsKey","useGetTenantApplicationsEditorialLinkLists","getTenantApplicationsEditorialFiftyBanners","getGetTenantApplicationsEditorialFiftyBannersKey","useGetTenantApplicationsEditorialFiftyBanners","getTenantApplicationsEditorialBenefits","getGetTenantApplicationsEditorialBenefitsKey","useGetTenantApplicationsEditorialBenefits","getTenantEditorialArticles","getGetTenantEditorialArticlesKey","useGetTenantEditorialArticles","getTenantApplicationsEInvoiceLocalization","getGetTenantApplicationsEInvoiceLocalizationKey","useGetTenantApplicationsEInvoiceLocalization","getTenantApplicationsEndCustomerReferralDiscountLocalization","getGetTenantApplicationsEndCustomerReferralDiscountLocalizationKey","useGetTenantApplicationsEndCustomerReferralDiscountLocalization","getTenantSystemEndpointsIdentityServer","getGetTenantSystemEndpointsIdentityServerKey","useGetTenantSystemEndpointsIdentityServer","getTenantSystemEndpointsOnline","getGetTenantSystemEndpointsOnlineKey","useGetTenantSystemEndpointsOnline","getTenantSystemEndpointsGraphQLNetServer","getGetTenantSystemEndpointsGraphQLNetServerKey","useGetTenantSystemEndpointsGraphQLNetServer","getTenantApplicationsExternalCampaignAppExternalCampaigns","getGetTenantApplicationsExternalCampaignAppExternalCampaignsKey","useGetTenantApplicationsExternalCampaignAppExternalCampaigns","getTenantCustomerExternalProfilesMetadata","getGetTenantCustomerExternalProfilesMetadataKey","useGetTenantCustomerExternalProfilesMetadata","getTenantFeatureToggle","featureId","getGetTenantFeatureToggleKey","useGetTenantFeatureToggle","getTenantFeatureToggles","getGetTenantFeatureTogglesKey","useGetTenantFeatureToggles","getTenantApplicationsBannerFeedbackBenefitBanners","getGetTenantApplicationsBannerFeedbackBenefitBannersKey","useGetTenantApplicationsBannerFeedbackBenefitBanners","getTenantApplicationsFooter","getGetTenantApplicationsFooterKey","useGetTenantApplicationsFooter","getTenantProductsFormattedPrices","getGetTenantProductsFormattedPricesKey","useGetTenantProductsFormattedPrices","getTenantConceptsFormattedPrices","getGetTenantConceptsFormattedPricesKey","useGetTenantConceptsFormattedPrices","getTenantApplicationsFrontPageProductStandards","getGetTenantApplicationsFrontPageProductStandardsKey","useGetTenantApplicationsFrontPageProductStandards","getTenantApplicationsFrontPageMotivationContent","getGetTenantApplicationsFrontPageMotivationContentKey","useGetTenantApplicationsFrontPageMotivationContent","getTenantApplicationsFrontPageBeautyEdit","getGetTenantApplicationsFrontPageBeautyEditKey","useGetTenantApplicationsFrontPageBeautyEdit","getTenantApplicationsFrontPageVipBenefits","getGetTenantApplicationsFrontPageVipBenefitsKey","useGetTenantApplicationsFrontPageVipBenefits","getTenantApplicationsFrontPageTopBrands","getGetTenantApplicationsFrontPageTopBrandsKey","useGetTenantApplicationsFrontPageTopBrands","getTenantApplicationsFrontPageBeautyVideo","getGetTenantApplicationsFrontPageBeautyVideoKey","useGetTenantApplicationsFrontPageBeautyVideo","getTenantApplicationsFrontPageBenefitBanner","getGetTenantApplicationsFrontPageBenefitBannerKey","useGetTenantApplicationsFrontPageBenefitBanner","getTenantApplicationsFrontPageNotificationBanner","getGetTenantApplicationsFrontPageNotificationBannerKey","useGetTenantApplicationsFrontPageNotificationBanner","getTenantApplicationsFrontPageIconicProducts","getGetTenantApplicationsFrontPageIconicProductsKey","useGetTenantApplicationsFrontPageIconicProducts","getTenantApplicationsFrontPageBestsellerProducts","getGetTenantApplicationsFrontPageBestsellerProductsKey","useGetTenantApplicationsFrontPageBestsellerProducts","getTenantApplicationsFrontPage","getGetTenantApplicationsFrontPageKey","useGetTenantApplicationsFrontPage","getTenantApplicationsGamificationBusinessActivities","getGetTenantApplicationsGamificationBusinessActivitiesKey","useGetTenantApplicationsGamificationBusinessActivities","getTenantApplicationsGenesysWidgetMetadata","getGetTenantApplicationsGenesysWidgetMetadataKey","useGetTenantApplicationsGenesysWidgetMetadata","getTenantApplicationsGenesysWidgetPageMetadata","getGetTenantApplicationsGenesysWidgetPageMetadataKey","useGetTenantApplicationsGenesysWidgetPageMetadata","getTenantApplicationsGuaranteeCreditLocalization","getGetTenantApplicationsGuaranteeCreditLocalizationKey","useGetTenantApplicationsGuaranteeCreditLocalization","getTenantApplicationsGuaranteeCreditGrantedCreditConfiguration","getGetTenantApplicationsGuaranteeCreditGrantedCreditConfigurationKey","useGetTenantApplicationsGuaranteeCreditGrantedCreditConfiguration","getTenantApplicationsMV7Homepage","getGetTenantApplicationsMV7HomepageKey","useGetTenantApplicationsMV7Homepage","getTenantApplicationsMV7Usersegmenttypes","getGetTenantApplicationsMV7UsersegmenttypesKey","useGetTenantApplicationsMV7Usersegmenttypes","getTenantApplicationsIncentivesAppLocalization","getGetTenantApplicationsIncentivesAppLocalizationKey","useGetTenantApplicationsIncentivesAppLocalization","getTenantApplicationsIncentivesAppContent","getGetTenantApplicationsIncentivesAppContentKey","useGetTenantApplicationsIncentivesAppContent","getTenantIngredients","getGetTenantIngredientsKey","useGetTenantIngredients","getTenantIngredient","ingredientName","getGetTenantIngredientKey","useGetTenantIngredient","getTenantIngredientsInspirations","getGetTenantIngredientsInspirationsKey","useGetTenantIngredientsInspirations","getTenantInviteFriendConfiguration","getGetTenantInviteFriendConfigurationKey","useGetTenantInviteFriendConfiguration","getTenantInviteFriendLink","consultantNumber","getGetTenantInviteFriendLinkKey","useGetTenantInviteFriendLink","getTenantJoiningFeeDialogHtml","getGetTenantJoiningFeeDialogHtmlKey","useGetTenantJoiningFeeDialogHtml","getTenantApplicationsFooterLanguageConfiguration","getGetTenantApplicationsFooterLanguageConfigurationKey","useGetTenantApplicationsFooterLanguageConfiguration","getTenantLanguages","getGetTenantLanguagesKey","useGetTenantLanguages","getTenantCustomerRegistrationsMetadatumLegalDetailsMetadata","getGetTenantCustomerRegistrationsMetadatumLegalDetailsMetadataKey","useGetTenantCustomerRegistrationsMetadatumLegalDetailsMetadata","getGetTenantLocalizationKey","useGetTenantLocalization","getApplicationsSharingAppTenants","getGetApplicationsSharingAppTenantsKey","useGetApplicationsSharingAppTenants","getTenantApplicationsLoginSidebarLocalization","getGetTenantApplicationsLoginSidebarLocalizationKey","useGetTenantApplicationsLoginSidebarLocalization","getTenantApplicationsMakeupTryOnConfiguration","getGetTenantApplicationsMakeupTryOnConfigurationKey","useGetTenantApplicationsMakeupTryOnConfiguration","getTenantApplicationsMakeupTryOnProductsRelation","getGetTenantApplicationsMakeupTryOnProductsRelationKey","useGetTenantApplicationsMakeupTryOnProductsRelation","getTenantCommissionPlanTypesSuccessPlanManagerSeminarConfiguration","getGetTenantCommissionPlanTypesSuccessPlanManagerSeminarConfigurationKey","useGetTenantCommissionPlanTypesSuccessPlanManagerSeminarConfiguration","getTenantApplicationsMemberUpgradeContent","getGetTenantApplicationsMemberUpgradeContentKey","useGetTenantApplicationsMemberUpgradeContent","getTenantApplicationsMiniBagConfiguration","getGetTenantApplicationsMiniBagConfigurationKey","useGetTenantApplicationsMiniBagConfiguration","getTenantMobileApps","getGetTenantMobileAppsKey","useGetTenantMobileApps","getTenantApplicationsMobileAppsPageHeader","getGetTenantApplicationsMobileAppsPageHeaderKey","useGetTenantApplicationsMobileAppsPageHeader","getTenantMobileAppsLinks","getGetTenantMobileAppsLinksKey","useGetTenantMobileAppsLinks","getTenantApplicationsMobileOfficeConfiguration","getGetTenantApplicationsMobileOfficeConfigurationKey","useGetTenantApplicationsMobileOfficeConfiguration","getMyBusinessTenantLocalization","getGetMyBusinessTenantLocalizationKey","useGetMyBusinessTenantLocalization","getTenantApplicationsMypagesDashboardLocalization","getGetTenantApplicationsMypagesDashboardLocalizationKey","useGetTenantApplicationsMypagesDashboardLocalization","getTenantApplicationsMV7NavigationCategory","category","getGetTenantApplicationsMV7NavigationCategoryKey","useGetTenantApplicationsMV7NavigationCategory","getTenantApplicationsMV7NavigationBrand","brand","getGetTenantApplicationsMV7NavigationBrandKey","useGetTenantApplicationsMV7NavigationBrand","getTenantApplicationsMV7NavigationCategoryConcepts","getGetTenantApplicationsMV7NavigationCategoryConceptsKey","useGetTenantApplicationsMV7NavigationCategoryConcepts","getTenantApplicationsMV7NavigationBrandConcepts","getGetTenantApplicationsMV7NavigationBrandConceptsKey","useGetTenantApplicationsMV7NavigationBrandConcepts","getTenantApplicationsMV7ModulesNavigationGeneralConcepts","getGetTenantApplicationsMV7ModulesNavigationGeneralConceptsKey","useGetTenantApplicationsMV7ModulesNavigationGeneralConcepts","getTenantApplicationsNavigationCategoryConcepts","getGetTenantApplicationsNavigationCategoryConceptsKey","useGetTenantApplicationsNavigationCategoryConcepts","getTenantApplicationsNavigationBrandConcepts","getGetTenantApplicationsNavigationBrandConceptsKey","useGetTenantApplicationsNavigationBrandConcepts","getTenantApplicationsNavigationConcepts","getGetTenantApplicationsNavigationConceptsKey","useGetTenantApplicationsNavigationConcepts","getTenantApplicationsNavigationNavigation","navigationType","getGetTenantApplicationsNavigationNavigationKey","useGetTenantApplicationsNavigationNavigation","getTenantApplicationsNavigationPageNavigationCollection","getGetTenantApplicationsNavigationPageNavigationCollectionKey","useGetTenantApplicationsNavigationPageNavigationCollection","getTenantNavigationTag","relatedCategory","getGetTenantNavigationTagKey","useGetTenantNavigationTag","getTenantApplicationsNewsletterSubscriptionConfiguration","getGetTenantApplicationsNewsletterSubscriptionConfigurationKey","useGetTenantApplicationsNewsletterSubscriptionConfiguration","getNotificationsTenantLocalization","getGetNotificationsTenantLocalizationKey","useGetNotificationsTenantLocalization","getTenantApplicationsAdvisorNovAgeSkincareConfiguration","getGetTenantApplicationsAdvisorNovAgeSkincareConfigurationKey","useGetTenantApplicationsAdvisorNovAgeSkincareConfiguration","getTenantApplicationsAdvisorNovAgeSkincareLocalization","getGetTenantApplicationsAdvisorNovAgeSkincareLocalizationKey","useGetTenantApplicationsAdvisorNovAgeSkincareLocalization","getTenantApplicationsOlapicConfiguration","getGetTenantApplicationsOlapicConfigurationKey","useGetTenantApplicationsOlapicConfiguration","getTenantApplicationsOnBehalfRegistrationConfirmationContent","getGetTenantApplicationsOnBehalfRegistrationConfirmationContentKey","useGetTenantApplicationsOnBehalfRegistrationConfirmationContent","getTenantApplicationsOnBehalfRegistrationConfirmationConfiguration","getGetTenantApplicationsOnBehalfRegistrationConfirmationConfigurationKey","useGetTenantApplicationsOnBehalfRegistrationConfirmationConfiguration","getTenantApplicationsOnboardingLocalization","getGetTenantApplicationsOnboardingLocalizationKey","useGetTenantApplicationsOnboardingLocalization","getTenantApplicationsOrderHistoryLocalization","getGetTenantApplicationsOrderHistoryLocalizationKey","useGetTenantApplicationsOrderHistoryLocalization","getTenantPageMetaData","getGetTenantPageMetaDataKey","useGetTenantPageMetaData","getTenantPagesGamepageDynamiclink","getGetTenantPagesGamepageDynamiclinkKey","useGetTenantPagesGamepageDynamiclink","getTenantPagesHomepageDynamiclink","getGetTenantPagesHomepageDynamiclinkKey","useGetTenantPagesHomepageDynamiclink","getTenantApplicationsParentalConsentBrandPartnerContent","getGetTenantApplicationsParentalConsentBrandPartnerContentKey","useGetTenantApplicationsParentalConsentBrandPartnerContent","getTenantApplicationsParentalConsentVipRegistrationContent","getGetTenantApplicationsParentalConsentVipRegistrationContentKey","useGetTenantApplicationsParentalConsentVipRegistrationContent","getTenantApplicationsConfigurationPaymentMethods","getGetTenantApplicationsConfigurationPaymentMethodsKey","useGetTenantApplicationsConfigurationPaymentMethods","getTenantPeriodsCurrentPeriod","getGetTenantPeriodsCurrentPeriodKey","useGetTenantPeriodsCurrentPeriod","getTenantApplicationsBannerPermanentTopAreaBanners","getGetTenantApplicationsBannerPermanentTopAreaBannersKey","useGetTenantApplicationsBannerPermanentTopAreaBanners","getTenantApplicationsBannerEnrichedPermanentTopAreaBanners","getGetTenantApplicationsBannerEnrichedPermanentTopAreaBannersKey","useGetTenantApplicationsBannerEnrichedPermanentTopAreaBanners","getTenantProductPermission","getGetTenantProductPermissionKey","useGetTenantProductPermission","getTenantConceptPermission","getGetTenantConceptPermissionKey","useGetTenantConceptPermission","getPersonalBeautyStoreTenantLocalization","getGetPersonalBeautyStoreTenantLocalizationKey","useGetPersonalBeautyStoreTenantLocalization","getTenantApplicationsPersonalBeautyStoreConfiguration","getGetTenantApplicationsPersonalBeautyStoreConfigurationKey","useGetTenantApplicationsPersonalBeautyStoreConfiguration","getTenantCustomerRegistrationsMetadatumPersonalDetailsMetadata","getGetTenantCustomerRegistrationsMetadatumPersonalDetailsMetadataKey","useGetTenantCustomerRegistrationsMetadatumPersonalDetailsMetadata","getPersonalGroupListingTenantLocalization","getGetPersonalGroupListingTenantLocalizationKey","useGetPersonalGroupListingTenantLocalization","getPersonalGroupOverviewTenantLocalization","getGetPersonalGroupOverviewTenantLocalizationKey","useGetPersonalGroupOverviewTenantLocalization","getApplicationsPersonalMenuTenantLocalization","getGetApplicationsPersonalMenuTenantLocalizationKey","useGetApplicationsPersonalMenuTenantLocalization","getTenantPhoneFormats","getGetTenantPhoneFormatsKey","useGetTenantPhoneFormats","getTenantProductPrice","getGetTenantProductPriceKey","useGetTenantProductPrice","getTenantConceptPrice","getGetTenantConceptPriceKey","useGetTenantConceptPrice","getTenantApplicationsProductBox","getGetTenantApplicationsProductBoxKey","useGetTenantApplicationsProductBox","getTenantApplicationsProductboxConfiguration","getGetTenantApplicationsProductboxConfigurationKey","useGetTenantApplicationsProductboxConfiguration","getTenantProductBundle","getGetTenantProductBundleKey","useGetTenantProductBundle","getTenantProductBundles","getGetTenantProductBundlesKey","useGetTenantProductBundles","getTenantApplicationsProductDetailConfiguration","getGetTenantApplicationsProductDetailConfigurationKey","useGetTenantApplicationsProductDetailConfiguration","getTenantApplicationsProductDetailToolingBanners","getGetTenantApplicationsProductDetailToolingBannersKey","useGetTenantApplicationsProductDetailToolingBanners","getTenantApplicationsProductDetailEditorialCarousels","getGetTenantApplicationsProductDetailEditorialCarouselsKey","useGetTenantApplicationsProductDetailEditorialCarousels","getTenantApplicationsProductDetailProductPageMetaData","getGetTenantApplicationsProductDetailProductPageMetaDataKey","useGetTenantApplicationsProductDetailProductPageMetaData","getTenantApplicationsProductDetailProductBreadcrumbLinks","getGetTenantApplicationsProductDetailProductBreadcrumbLinksKey","useGetTenantApplicationsProductDetailProductBreadcrumbLinks","getTenantApplicationsProductDetailSections","getGetTenantApplicationsProductDetailSectionsKey","useGetTenantApplicationsProductDetailSections","getTenantProductIndexItems","getGetTenantProductIndexItemsKey","useGetTenantProductIndexItems","getTenantProductLabelsContent","getGetTenantProductLabelsContentKey","useGetTenantProductLabelsContent","getTenantApplicationsMV7Productlistings","getGetTenantApplicationsMV7ProductlistingsKey","useGetTenantApplicationsMV7Productlistings","getTenantApplicationsProductListingSortDefinitions","getGetTenantApplicationsProductListingSortDefinitionsKey","useGetTenantApplicationsProductListingSortDefinitions","getTenantApplicationsMv7ProductListingsV2","getGetTenantApplicationsMv7ProductListingsV2Key","useGetTenantApplicationsMv7ProductListingsV2","getTenantProductlistDynamiclink","productListId","getGetTenantProductlistDynamiclinkKey","useGetTenantProductlistDynamiclink","getTenantProductMedia","getGetTenantProductMediaKey","useGetTenantProductMedia","getTenantDeprecatedProduct","getGetTenantDeprecatedProductKey","useGetTenantDeprecatedProduct","getTenantProductDynamiclink","getGetTenantProductDynamiclinkKey","useGetTenantProductDynamiclink","getTenantProduct","getGetTenantProductKey","useGetTenantProduct","getTenantApplicationsMv7ModulesProductsRepositoryProducts","getGetTenantApplicationsMv7ModulesProductsRepositoryProductsKey","useGetTenantApplicationsMv7ModulesProductsRepositoryProducts","getTenantApplicationsMv7ModulesProductsRepositoryProductsHashCodes","getGetTenantApplicationsMv7ModulesProductsRepositoryProductsHashCodesKey","useGetTenantApplicationsMv7ModulesProductsRepositoryProductsHashCodes","getTenantApplicationsMv7ModulesProductsRepositoryProductsToolingBanners","getGetTenantApplicationsMv7ModulesProductsRepositoryProductsToolingBannersKey","useGetTenantApplicationsMv7ModulesProductsRepositoryProductsToolingBanners","getTenantProductsExpectedInbounds","getGetTenantProductsExpectedInboundsKey","useGetTenantProductsExpectedInbounds","getTenantProductsIngredients","getGetTenantProductsIngredientsKey","useGetTenantProductsIngredients","getTenantProductsLabels","getGetTenantProductsLabelsKey","useGetTenantProductsLabels","getTenantApplicationsMv7ModulesProductsLabelsRepositoryProductsLabels","getGetTenantApplicationsMv7ModulesProductsLabelsRepositoryProductsLabelsKey","useGetTenantApplicationsMv7ModulesProductsLabelsRepositoryProductsLabels","getTenantProductsManufacturers","getGetTenantProductsManufacturersKey","useGetTenantProductsManufacturers","getTenantApplicationsMv7ModulesProductsPricesRepositoryProductsPrices","getGetTenantApplicationsMv7ModulesProductsPricesRepositoryProductsPricesKey","useGetTenantApplicationsMv7ModulesProductsPricesRepositoryProductsPrices","getTenantUserRecommendations","getGetTenantUserRecommendationsKey","useGetTenantUserRecommendations","getTenantProductRecommendations","getGetTenantProductRecommendationsKey","useGetTenantProductRecommendations","getTenantProductsReplacements","getGetTenantProductsReplacementsKey","useGetTenantProductsReplacements","getTenantApplicationsProfileLocalization","getGetTenantApplicationsProfileLocalizationKey","useGetTenantApplicationsProfileLocalization","getTenantApplicationsProfileContent","getGetTenantApplicationsProfileContentKey","useGetTenantApplicationsProfileContent","getTenantProfileApprovalMetadata","getGetTenantProfileApprovalMetadataKey","useGetTenantProfileApprovalMetadata","getTenantApplicationsMobileOfficePromoBanner","getGetTenantApplicationsMobileOfficePromoBannerKey","useGetTenantApplicationsMobileOfficePromoBanner","getTenantPromotionsBannersBestoffers","getGetTenantPromotionsBannersBestoffersKey","useGetTenantPromotionsBannersBestoffers","getTenantPromotionsBannersWhatsnew","getGetTenantPromotionsBannersWhatsnewKey","useGetTenantPromotionsBannersWhatsnew","getTenantPromotionsBannersHero","getGetTenantPromotionsBannersHeroKey","useGetTenantPromotionsBannersHero","getTenantPromotionsBannersCampaign","getGetTenantPromotionsBannersCampaignKey","useGetTenantPromotionsBannersCampaign","getTenantPromotionsBannersCategory","getGetTenantPromotionsBannersCategoryKey","useGetTenantPromotionsBannersCategory","getTenantDigitalPromotions","getGetTenantDigitalPromotionsKey","useGetTenantDigitalPromotions","getTenantApplicationsRatingsAndReviewsAppConfiguration","getGetTenantApplicationsRatingsAndReviewsAppConfigurationKey","useGetTenantApplicationsRatingsAndReviewsAppConfiguration","getTenantApplicationsRealTimeOrderTrackingLocalization","getGetTenantApplicationsRealTimeOrderTrackingLocalizationKey","useGetTenantApplicationsRealTimeOrderTrackingLocalization","getTenantRealtimeOrderTracking","orderId","getGetTenantRealtimeOrderTrackingKey","useGetTenantRealtimeOrderTracking","getTenantCustomerRegistrationsMetadatumRegistrationsMetadata","getGetTenantCustomerRegistrationsMetadatumRegistrationsMetadataKey","useGetTenantCustomerRegistrationsMetadatumRegistrationsMetadata","getTenantProductRelations","getGetTenantProductRelationsKey","useGetTenantProductRelations","getTenantApplicationsReportsSpaMetadata","getGetTenantApplicationsReportsSpaMetadataKey","useGetTenantApplicationsReportsSpaMetadata","getTenantSample","getGetTenantSampleKey","useGetTenantSample","getTenantSeminarParams","getGetTenantSeminarParamsKey","useGetTenantSeminarParams","getTenantApplicationsMV7FacetSettings","getGetTenantApplicationsMV7FacetSettingsKey","useGetTenantApplicationsMV7FacetSettings","getTenantApplicationsShareAndEarnPage","getGetTenantApplicationsShareAndEarnPageKey","useGetTenantApplicationsShareAndEarnPage","getTenantApplicationsShareAndEarnPersonalLinksContent","getGetTenantApplicationsShareAndEarnPersonalLinksContentKey","useGetTenantApplicationsShareAndEarnPersonalLinksContent","getTenantApplicationsShareAndEarnSharingConditions","getGetTenantApplicationsShareAndEarnSharingConditionsKey","useGetTenantApplicationsShareAndEarnSharingConditions","getTenantApplicationsShareAndEarnPersonalCodeEditPage","getGetTenantApplicationsShareAndEarnPersonalCodeEditPageKey","useGetTenantApplicationsShareAndEarnPersonalCodeEditPage","getTenantApplicationsShareAndEarnPersonalCodeCustomer","personalCode","getGetTenantApplicationsShareAndEarnPersonalCodeCustomerKey","useGetTenantApplicationsShareAndEarnPersonalCodeCustomer","getTenantApplicationsSimplifiedRegistrationBrandPartnerLocalization","getGetTenantApplicationsSimplifiedRegistrationBrandPartnerLocalizationKey","useGetTenantApplicationsSimplifiedRegistrationBrandPartnerLocalization","getTenantApplicationsSimplifiedRegistrationVipCustomerLocalization","getGetTenantApplicationsSimplifiedRegistrationVipCustomerLocalizationKey","useGetTenantApplicationsSimplifiedRegistrationVipCustomerLocalization","getTenantApplicationsSimplifiedRegistrationBrandPartnerContent","getGetTenantApplicationsSimplifiedRegistrationBrandPartnerContentKey","useGetTenantApplicationsSimplifiedRegistrationBrandPartnerContent","getTenantApplicationsSimplifiedRegistrationVipCustomerContent","getGetTenantApplicationsSimplifiedRegistrationVipCustomerContentKey","useGetTenantApplicationsSimplifiedRegistrationVipCustomerContent","getTenantMobileAppSmartAppBanner","platform","getGetTenantMobileAppSmartAppBannerKey","useGetTenantMobileAppSmartAppBanner","getTenantSocialMediaLinks","getGetTenantSocialMediaLinksKey","useGetTenantSocialMediaLinks","getTenantCustomerRegistrationsMetadatumSponsorDetailsMetadata","getGetTenantCustomerRegistrationsMetadatumSponsorDetailsMetadataKey","useGetTenantCustomerRegistrationsMetadatumSponsorDetailsMetadata","getTenantStepsToSuccessPhases","getGetTenantStepsToSuccessPhasesKey","useGetTenantStepsToSuccessPhases","getTenantApplicationsStepsToSuccessLocalization","getGetTenantApplicationsStepsToSuccessLocalizationKey","useGetTenantApplicationsStepsToSuccessLocalization","getTenantSubscriptionTypes","getGetTenantSubscriptionTypesKey","useGetTenantSubscriptionTypes","getTenantApplicationsBannerSubscriptionBenefitBanners","getGetTenantApplicationsBannerSubscriptionBenefitBannersKey","useGetTenantApplicationsBannerSubscriptionBenefitBanners","getTenantSubscriptionReplacements","getGetTenantSubscriptionReplacementsKey","useGetTenantSubscriptionReplacements","getTenantApplicationsSubscriptionWizardLocalization","getGetTenantApplicationsSubscriptionWizardLocalizationKey","useGetTenantApplicationsSubscriptionWizardLocalization","getApplicationsSupportCenterTenantLocalization","getGetApplicationsSupportCenterTenantLocalizationKey","useGetApplicationsSupportCenterTenantLocalization","getTenantTagGroups","getGetTenantTagGroupsKey","useGetTenantTagGroups","getTargetListTenantLocalization","getGetTargetListTenantLocalizationKey","useGetTargetListTenantLocalization","getTenantTermHtml","termId","getGetTenantTermHtmlKey","useGetTenantTermHtml","getTestTenantPing","getGetTestTenantPingKey","useGetTestTenantPing","getTestTenantPingproxy","getGetTestTenantPingproxyKey","useGetTestTenantPingproxy","getTenantTestfreaksConfiguration","getGetTenantTestfreaksConfigurationKey","useGetTenantTestfreaksConfiguration","getTenantThirdPartyConfiguration","getGetTenantThirdPartyConfigurationKey","useGetTenantThirdPartyConfiguration","getTitleProgressTenantLocalization","getGetTitleProgressTenantLocalizationKey","useGetTitleProgressTenantLocalization","getTenantTranslationsDeprecated","getGetTenantTranslationsDeprecatedKey","useGetTenantTranslationsDeprecated","getTenantVipCustomerBanner","getGetTenantVipCustomerBannerKey","useGetTenantVipCustomerBanner","getTenantApplicationsVipUpgradeLocalization","getGetTenantApplicationsVipUpgradeLocalizationKey","useGetTenantApplicationsVipUpgradeLocalization","getTenantApplicationsVipUpgradeContent","getGetTenantApplicationsVipUpgradeContentKey","useGetTenantApplicationsVipUpgradeContent","getTenantApplicationsVouchersLocalization","getGetTenantApplicationsVouchersLocalizationKey","useGetTenantApplicationsVouchersLocalization","getTenantApplicationsWalletLocalization","getGetTenantApplicationsWalletLocalizationKey","useGetTenantApplicationsWalletLocalization","getTenantApplicationsWebMessengerConfiguration","getGetTenantApplicationsWebMessengerConfigurationKey","useGetTenantApplicationsWebMessengerConfiguration","getTenantApplicationsWellnessClubBanners","getGetTenantApplicationsWellnessClubBannersKey","useGetTenantApplicationsWellnessClubBanners","GetTenantApplicationsWebMessengerConfigurationVisitorSegment","NotDefined","Anonymous","NewConsultant","Consultant","Manager","DirectorAndAbove","EndCustomer","Member","Spo","GetTenantProductRelationsRelationTypesItem","Undefined","Related","RecentlyViewed","Popular","Favourite","Samples","GetTenantDigitalPromotionsChannel","Website","MV7","GetTenantDigitalPromotionsPromotionTypesItem","BestOffers","WhatsNew","Hero","Campaign","Category","GetTenantProductsReplacementsVisitorSegment","GetTenantApplicationsMv7ModulesProductsPricesRepositoryProductsPricesVisitorSegment","GetTenantProductsManufacturersVisitorSegment","GetTenantApplicationsMv7ModulesProductsLabelsRepositoryProductsLabelsVisitorSegment","GetTenantProductsLabelsVisitorSegment","GetTenantProductsLabelsProductLabelDomainsItem","PPA","Deal","Shopping","GetTenantProductsIngredientsVisitorSegment","GetTenantProductsExpectedInboundsVisitorSegment","GetTenantApplicationsMv7ModulesProductsRepositoryProductsToolingBannersVisitorSegment","GetTenantApplicationsMv7ModulesProductsRepositoryProductsHashCodesVisitorSegment","GetTenantApplicationsMv7ModulesProductsRepositoryProductsVisitorSegment","GetTenantDeprecatedProductVisitorSegment","GetTenantApplicationsMv7ProductListingsV2OrderBy","Recommended","Latest","HighestRating","LowestPrice","HighestPrice","HighestDiscount","GetTenantApplicationsMv7ProductListingsV2VisitorSegment","GetTenantProductBundlesVisitorSegment","GetTenantProductBundleVisitorSegment","GetTenantApplicationsProductBoxVisitorSegment","GetTenantConceptPriceVisitorSegment","GetTenantProductPriceVisitorSegment","GetTenantConceptPermissionVisitorSegment","GetTenantProductPermissionVisitorSegment","GetTenantApplicationsBannerEnrichedPermanentTopAreaBannersBannerType","PublicPage","PublicPageWithReferral","Checkout","MyPages","GetTenantApplicationsBannerPermanentTopAreaBannersBannerTypesItem","GetTenantApplicationsOlapicConfigurationOlapicType","FrontPage","Gallery","ProductDetails","GetTenantApplicationsNavigationNavigationVisitorSegment","GetTenantApplicationsFrontPageVisitorSegment","GetTenantApplicationsFrontPageBenefitBannerVisitorSegment","GetTenantConceptsFormattedPricesVisitorSegment","GetTenantProductsFormattedPricesVisitorSegment","GetTenantApplicationsFooterVisitorSegment","GetTenantApplicationsBannerFeedbackBenefitBannersBannerTypesItem","ShareAndEarn","Cashback","GetTenantEditorialArticlesArticleType","BeautyEdit","RelatedToProduct","GetTenantApplicationsEditorialEditorialPagesChannel","Web","Mobile","GetTenantCustomerConfirmationMetadataConfirmationContextType","Profile","SelfRegistration","SponsorRegistration","GetTenantConceptRecommendationsType","Collaborative","Content","GetTenantApplicationsMv7ModulesConceptsLabelsRepositoryConceptsLabelsVisitorSegment","GetTenantApplicationsMv7ModulesConceptsRepositoryConceptsHashCodesVisitorSegment","GetTenantApplicationsMv7ModulesConceptsRepositoryConceptsVisitorSegment","GetTenantDeprecatedConceptVisitorSegment","GetTenantConceptLabelsVisitorSegment","GetTenantConceptLabelsConceptLabelDomainsItem","GetTenantApplicationsChatBotPageMetadataVisitorSegment","GetTenantApplicationsMv7CategoryProductListingOrderBy","GetTenantApplicationsMv7CategoryProductListingVisitorSegment","GetTenantApplicationsCatalogueOverviewCatalogueTypesItem","None","DigitalCurrent","DigitalNext","LocalCustom","Lookbook","GetTenantApplicationsCatalogueOverviewVisitorSegment","GetTenantRewardShopConfigurationsCustomerCategory","EndConsumer","Invitation","Employee","Other","GetTenantApplicationsMv7BrandProductListingOrderBy","GetTenantApplicationsMv7BrandProductListingVisitorSegment","GetTenantConceptAvailabilityVisitorSegment","GetTenantProductAvailabilityVisitorSegment","GetTenantApplicationsAdverseReactionProductsPartialSetCategoriesItem","Unknown","Cosmetics","AddOns","Jewellery","PrintingMaterial","Wellness","Fee","DemoProduct","Packaging","Training","RecruitmentGifts","NonFinancial","OtherSample","GetTenantApplicationsAdverseReactionProductsPartialSetItemType","Bundle","Composite","Product","StaticTermsTermHtmlDtoTermsSource","Sitecore","OneTrust","StaticSubscriptionsSubscriptionTypeDtoCategory","LifePlus","HairCare","StaticSocialMediaLinksSocialMediaLinkType","Facebook","VKontakte","Twitter","YouTube","Instagram","Pinterest","Odnoklassniki","Weibo","QQ","Youku","Line","WeChat","Telegram","StaticShoppingOrderTrackingsDtoCurrentStatus","Create","Cancel","Print","Pick","Ship","CourierTakeover","TakenByCourier","OutForDelivery","ReturnedToSender","ToBeReturnedToSender","ReadyForPickup","PickedUpBy","HandoverFailed","CourierHandover","Deliver","EstimatedDelivery","StaticShoppingOrderTrackingStepDtoStatus","StaticSharedLinkDtoType","Brand","PLpage","EditorialArticle","Invite","Custom","NewProducts","Catalogue","NovageSkincareAdvisor","EditorialCampaign","Ingredient","SignIn","Frontpage","RegistrationPage","InvitationOffer","StaticSampleSampleDtoType","StaticProductsReplacementsReplacementDtoReplacementType","Automatic","Manual","Subscription","Alternative","WellnessAutomatic","WellnessManual","StaticProductsRelationRelationType","StaticProductsProductLabelsDtoProductLabelDomain","StaticProductsProductLabelsDtoProductsLabelsCollectionItem","NoLongerForSale","SoldOut","SaleLimitation","OutOfStock","NotSoldOnline","ComingSoon","LowStock","Offer","New","LastChance","ValueSet","Hidden","SuperDeal","AddToBasketVisible","BackInStock","CanBeReserved","ShowBackOrder","NewEdition","NewEditionAvailable","CanBeSubscribed","StaticProductsProductDtoItemCategory","StaticProductsProductDtoProductType","StaticParentalConsentRegistrationParentalConsentMetadataDtoParentalConsentMode","ParentalInfo","InfoMessage","StaticOlapicOlapicConfigurationDtoType","StaticNavigationNavigationItemDtoType","TopNavigation","ShopSection","AboutTiles","JoinTiles","InspirationTiles","Footer","StaticNavigationNavigationItemDtoLinkType","MenuTiles","FocusPage","SubCategory","Segment","OutletShop","JoinRewards","RewardsShop","SampleShop","DigitalCatalogueCurrent","DigitalCatalogueNext","Catalogues","PopularProducts","PopularBrands","PopularBrand","PopularLookbook","KeyIngredients","WhatsNewInCategory","IconsInCategory","BestsellersInCategory","Icons","Bestsellers","Inspiration","AllCategory","SupportCenter","IDontKnowYet","FooterColumn","FooterColumnItem","Bottom","BottomCopyright","BottomLinks","PaymentMethods","PaymentMethod","QRTR","OurApps","BeautyTips","StaticMobileOfficeModulesVisibilityDtoEarningsOnDashboardVisitorSegmentsItem","StaticMobileAppsMobileAppTypeDtoType","ToSell","ToShop","StaticManagerSeminarParamsMinDiscountRateQualificationDtoDiscountRateLevel","LevelBasic","Level10","Level20","Level30","Level40","Level50","Level60","LevelMax","StaticMV7ProductsProductReplacementsDtoReplacementType","StaticMV7ProductListingsProductListingPromoItemDtoType","PromoBanner","StaticLanguagesLanguageType","Default","StaticEditorialArticlesEditorialArticleDtoArticleType","StaticECatalogueStructureImageDtoType","Thumb","Zoom","StaticDocumentsDocumentTypeDtoDocumentCategory","General","CreditRequest","Personal","Claim","Legal","StaticDocumentsDocumentTypeDtoDocumentTag","NotSpecified","IdentityCard","Passport","ProfileImage","DamageParcel","DamageCover","BankAccount","WellnessSellingApplication","WellnessSellingCertificate","Caf","Commitment","Annex","DamagedProduct","ExportedFile","StaticDigitalPromotionsCurrentPromotionDtoChannel","StaticDigitalPromotionsCurrentPromotionDtoPromotionType","StaticDeprecatedProductDtoProductType","StaticDeliveryDeliveryMethodDtoType","ParcelLocker","DepartmentStore","Home","Lpo","NextOrder","PostOffice","PickupPoint","NearestPostOffice","StaticCustomersMetadataCustomerApprovalSharedMetadataDtoDefaultStatus","Expanded","Collapsed","Disabled","StaticCustomersMetadataAddressSearchMetadataDtoAllowedSearchResultsItem","Market","Country","Province","District","Area","City","Locality","Street","ZipCode","StaticCustomerRegistrationsMetadataRegistrationSponsorDetailsMetadataDtoPreselectedSponsorSelectionMethod","ManualInput","SponsorLocator","StaticCustomerRegistrationInstructionsMetadataCustomerRegistrationInstructionsMetadataDtoEnabledRegistrationTypesItem","SelfBrandPartner","SelfVip","SponsorBrandPartner","SponsorVip","SponsorOnBehalf","SelfOnBehalf","StaticCustomerExternalProfilesMetadataExternalProfilesMetadataDtoAvailableOptionsItem","Google","ActiveDirectory","StaticCulturePointsFormatDtoCurrency","Points","Hearts","StaticConceptsConceptLabelsDtoConceptLabelDomain","StaticConceptsConceptLabelsDtoConceptLabelsCollectionItem","StaticCampaignsRewardShopConfigurationDtoCustomerCategory","StaticBonusesParametersNewTitleBracketDtoCutOffTitleType","TitleAndQualification","TitleOrQualification","Title","Qualification","StaticBonusesParametersNewTitleBracketDtoTargetMaxTitleCode","A","B","CS","D","G","H","I","J","K","L","N","O","Q","R","S","StaticBonusesParametersNewComerBracketDtoTargetDiscountRateLevel","StaticBonusesParametersNewComerBracketDtoBaseNewComerType","NewBrandPartner","UpgradedMember","StaticBonusesParametersManagerBracketDtoTargetDiscountRateLevel","StaticBonusesParametersManagerBracketDtoInitialDiscountRateLevel","StaticBonusesParametersDirectorBracketDtoCutOffTitleCode","StaticBonusesParametersDirectorBracketDtoTargetTitleCode","StaticBonusesCommissionPlanTypeDtoCommissionPlanType","SuccessPlan","MatureMarkets","StaticApplicationsProductListingsV2MixedPlpContentDtoSize","Size1","Size2","StaticApplicationsProductListingsV2EditorialBannerContentDtoVerticalAlignment","Top","Middle","StaticApplicationsProductListingsV2EditorialBannerContentDtoTitleStorybookColor","TextPrimary","TextSecondary","DefaultContrastText","SecondaryMain","Grey50","DefaultMain","Brown300","Purple200","PrimaryLight","Pink50","Brown50","Blue100","Yellow50","Red50","Purple50","Purple400","Green400","Pink300","Brown400","InfoDark","Yellow400","Green50","CommonWhite","Grey700","Grey900","PrimaryContrastText","PrimaryMain","Grey100","Green200","SecondaryContrastText","StaticApplicationsProductListingsProductSortDefinitionDtoOrderBy","StaticApplicationsPersonalBeautyStorePbsConfigurationDtoBeautyStoreType","PbsStandard","PbsLite","StaticApplicationsNewsletterSubsciptionConfigurationResponseMessageType","Subscribed","Pending","Unsubscribed","Cleaned","StaticApplicationsFrontpageV3VideoDtoType","Mp4","Youtube","StaticApplicationsFrontpageV3ProductsPromotionBannerDtoFontColor","StaticApplicationsFrontpageV3NotificationBannerDtoMessageTheme","Black","Grey","StaticApplicationsFooterBffSocialMediaLinkDtoType","StaticApplicationsFooterBffResponseMessageDtoType","StaticApplicationsFooterBffNavigationItemDtoLinkType","StaticApplicationsFooterBffNavigationDtoNavigationType","StaticApplicationsFooterBffMobileAppMobileAppTypeDtoType","StaticApplicationsFooterBffLanguageDtoType","StaticApplicationsEditorialProductListingProductDtoPosition","Position1","Position2","Position3","Position4","StaticApplicationsEditorialProductListingBannerDtoSize","StaticApplicationsEditorialProductListingBannerDtoPosition","StaticApplicationsEditorialOlapicDtoType","StaticApplicationsEditorialMixedPlpContentDtoListingModifier","Outlet","StaticApplicationsEditorialMixedPlpContentDtoListingType","StaticApplicationsEditorialLandingPageDtoBackgroundStorybookColor","StaticApplicationsEditorialLandingPageDtoHeadlineStorybookColor","StaticApplicationsEditorialLandingPageDtoTitleColor","DarkGrey","White","StaticApplicationsEditorialHeaderDtoHeadlineStorybookColor","StaticApplicationsEditorialHeaderDtoBackgroundStorybookColor","StaticApplicationsEditorialFiftyBannerDtoBackgroundStorybookColor","StaticApplicationsEditorialFiftyBannerDtoBackgroundType","Image","Video","Color","StaticApplicationsEditorialFiftyBannerDtoContentAlignment","Left","Right","StaticApplicationsEditorialEditorialBannerModuleDtoBackgroundStorybookColor","StaticApplicationsEditorialEditorialBannerModuleDtoBackgroundType","StaticApplicationsEditorialEditorialBannerDtoLayout","ThreeMediaRightBottomText","Quote","ParagraphText","TwoMedia","Headline","OneMediaParagraphText","OneMediaOverlayLeftText","OneMediaOverlayRightText","OneMediaCenterBottomText","TwoMediaRightTopText","FourMedia","OneMediaProductPromo","VerticalVideo","FiftyBanner","StaticApplicationsEditorialEditorialBannerContentDtoHorizontalAlignment","StaticApplicationsEditorialEditorialBannerContentDtoVerticalAlignment","StaticApplicationsEditorialEditorialBannerContentDtoTitleSize","H5","H6","StaticApplicationsEditorialEditorialBannerContentDtoTitleStorybookColor","StaticApplicationsEditorialEditorialBannerContentDtoTitleColor","StaticApplicationsEditorialContentDtoType","Header","Banner","Olapic","ProductBoxCarousel","EditorialCarousel","MixedPlpContent","EditorialBannerCarousel","TestimonialCarousel","FrequentlyAskedQuestions","LinkList","Benefits","StaticApplicationsEditorialBenefitDtoIcon","Check","Dollar","Send","WelcomeKit","Conference","BubbleHeart","Share","Wallet","Truck","DiscountTag","Gift","StaticApplicationsEditorialBackgroundVideoDtoType","StaticApplicationsEditorialBackgroundColorDtoType","Brown","Green","StaticApplicationsCategoryPlpCategoryPlpPromoBannerRowMixedContentDtoSize","StaticApplicationsCategoryPlpCategoryPlpPromoBannerContentDtoVerticalAlignment","StaticApplicationsCategoryPlpCategoryPlpPromoBannerContentDtoTitleColor","StaticApplicationsCatalogueOverviewCatalogueDtoCatalogueType","StaticApplicationsCatalogueOverviewCataloguMetadataDtoProviderType","Online","IPaper","StaticApplicationsBrandPlpBrandPlpPromoBannerRowMixedContentDtoSize","StaticApplicationsBrandPlpBrandPlpPromoBannerContentDtoVerticalAlignment","StaticApplicationsBrandPlpBrandPlpPromoBannerContentDtoTitleColor","StaticApplicationsBannersFeedbackBenefitBannerDtoBannerType","StaticApplicationsAdverseReactionProductAdrDtoItemCategory","StaticApplicationsAdverseReactionProductAdrDtoItemType","StaticAddressFormatsAddressFormatLineDtoFieldsItem","AddressType","StreetAddress","Delivery","CustomerName","StaticAddressFormatsAddressFormatDtoType","SingleLine","MultiLine","CustomerMultiLine","Searched","HttpStatusCodes","status100Continue","status101SwitchingProtocols","status102Processing","status200OK","status201Created","status202Accepted","status203NonAuthoritative","status204NoContent","status205ResetContent","status206PartialContent","status207MultiStatus","status208AlreadyReported","status226IMUsed","status300MultipleChoices","status301MovedPermanently","status302Found","status303SeeOther","status304NotModified","status305UseProxy","status306SwitchProxy","status307TemporaryRedirect","status308PermanentRedirect","status400BadRequest","status401Unauthorized","status402PaymentRequired","status403Forbidden","status404NotFound","status405MethodNotAllowed","status406NotAcceptable","status407ProxyAuthenticationRequired","status408RequestTimeout","status409Conflict","status410Gone","status411LengthRequired","status412PreconditionFailed","status413RequestEntityTooLarge","status413PayloadTooLarge","status414RequestUriTooLong","status414UriTooLong","status415UnsupportedMediaType","status416RequestedRangeNotSatisfiable","status416RangeNotSatisfiable","status417ExpectationFailed","status418ImATeapot","status419AuthenticationTimeout","status421MisdirectedRequest","status422UnprocessableEntity","status423Locked","status424FailedDependency","status426UpgradeRequired","status428PreconditionRequired","status429TooManyRequests","status431RequestHeaderFieldsTooLarge","status451UnavailableForLegalReasons","status500InternalServerError","status501NotImplemented","status502BadGateway","status503ServiceUnavailable","status504GatewayTimeout","status505HttpVersionNotsupported","status506VariantAlsoNegotiates","status507InsufficientStorage","status508LoopDetected","status510NotExtended","status511NetworkAuthenticationRequired","useApiClient","Team","_testIdContext","TestIdProvider","team","project","getTestId","generateTestId","getTestIdProps","generateTestIdProps","_TestIdProvider","testIdContext","_useTestId","_isJestEnv","isJestEnv","_Team","testId","_generateTestId","_generateTestIdProps","JEST_WORKER_ID","internalDevelopment","_AtLeastOneRequired","_DeepMutable","_DeepPartial","_DeepReadonly","_Equals","_If","_IsEqual","_LiteralUnion","_NonArray","_NonArrayLike","_NonOptionalKeys","_OptionalKeys","_Parameters","_Primitive","_ReturnType","_Simplify","_TupleToUnion","_UncapitalizeKeys","_UncapitalizeObjectKeys","_UnionToIntersection","_UnpackPromise","AssertionError","assert","condition","_assert","_is","_isNonNullable","is","isMatched","_validators","jsonSchema","literalSchema","null","lazy","record","localizationJsonSchema","keySchema","errorMap","issue","valueSchema","oriPackageJsonSchema","_OriTeam","_PackageJson","coverageThresholdPropsSchema","branches","functions","statements","coverageThresholdSchema","strict","jestConfigSchema","coverageThreshold","packageJsonSchema","extend","jest","unknown","lumos","oriTeamSchema","packageManager","msw","workerDirectory","packageManagerSchema","packageJsonFundingSchema","packageJsonPublishConfigSchema","intersection","access","packageJsonPersonSchema","email","packageJsonBugsLocationSchema","packageJsonDirectoryLocationsSchema","bin","example","man","packageJsonScriptsSchema","prepublish","prepare","prepublishOnly","prepack","postpack","publish","postpublish","preinstall","install","postinstall","preuninstall","uninstall","postuninstall","preversion","postversion","pretest","posttest","prestop","poststop","prestart","poststart","prerestart","restart","postrestart","packageJsonDependenciesSchema","packageJsonExportsSchema","deno","development","electron","import","production","require","packageJsonBundledDependenciesSchema","keywords","homepage","bugs","license","author","contributors","maintainers","files","literal","directories","repository","directory","devDependencies","optionalDependencies","peerDependencies","peerDependenciesMeta","bundledDependencies","bundleDependencies","overrides","pnpm","funding","module","esnext","sideEffects","engines","npm","cpu","private","publishConfig","preferGlobal","workspaces","packages","nohoist","flat","resolutions","types","typings","tsconfigJsonSchema","jsxSchema","moduleSchema","newLineSchema","targetSchema","libSchema","pluginSchema","and","importsNotUsedAsValuesSchema","fallbackPollingSchema","watchDirectory","watchFileSchema","compilerOptionsSchema","allowJs","allowSyntheticDefaultImports","allowUmdGlobalAccess","allowUnreachableCode","allowUnusedLabels","alwaysStrict","assumeChangesOnlyAffectDirectDependencies","charset","checkJs","composite","declarationDir","declarationMap","diagnostics","disableReferencedProjectLoad","disableSizeLimit","disableSolutionSearching","disableSourceOfProjectReferenceRedirect","downlevelIteration","emitBOM","emitDeclarationOnly","emitDecoratorMetadata","esModuleInterop","exactOptionalPropertyTypes","experimentalDecorators","explainFiles","extendedDiagnostics","fallbackPolling","forceConsistentCasingInFileNames","generateCpuProfile","importHelpers","importsNotUsedAsValues","incremental","inlineSourceMap","inlineSources","isolatedModules","jsxFactory","jsxFragmentFactory","jsxImportSource","keyofStringsOnly","listEmittedFiles","listFiles","listFilesOnly","mapRoot","maxNodeModuleJsDepth","moduleResolution","newLine","noEmit","noEmitHelpers","noEmitOnError","noErrorTruncation","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noImplicitUseStrict","noLib","noPropertyAccessFromIndexSignature","noResolve","noStrictGenericChecks","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","outDir","outFile","paths","preserveConstEnums","preserveSymlinks","preserveWatchOutput","pretty","reactNamespace","removeComments","resolveJsonModule","rootDir","rootDirs","skipDefaultLibCheck","skipLibCheck","sourceMap","sourceRoot","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","stripInternal","suppressExcessPropertyErrors","suppressImplicitAnyIndexErrors","traceResolution","tsBuildInfoFile","typeRoots","useDefineForClassFields","useUnknownInCatchVariables","watchFile","typeAcquisitionSchema","enable","include","referencesSchema","originalPath","circular","compileOnSave","compilerOptions","extends","references","typeAcquisition","_Json","_LocalizationJson","_OriPackageJson","_TsconfigJson","_isOriPackageJson","_isPackageJson","_readFile","_readJson","_readPackageJson","_zodIssuesToString","isOriPackageJson","isPackageJson","readFile","schema","rawJson","parser","_promises","encoding","throwOnZodError","readJson","readPackageJson","zodIssuesToStrings","zodIssues","zodIssue","zodIssueToString","zodIssuePathToText","zodIssuePath","ZodIssueCode","invalid_type","expected","received","unrecognized_keys","invalid_union","unionErrors","unionError","issues","zodIssueString","_validateEnvironment","_validateInteger","_validateLanguage","_validateLanguageCode","_validatePortNumber","_validateTenant","zod","validEnvironments","environmentSchema","or","refine","validateInteger","integerSchema","validateLanguage","languageSchema","validateLanguageCode","languageCodeSchema","languageCode","validatePortNumber","portNumberSchema","portNumber","validateTenant","tenantSchema","Deno","argv","toObject","PM2_HOME","pm_id","NEXT_RUNTIME","isatty","stdout","isTTY","TERM","truecolor","ansi256","ansi","COLORTERM","TF_BUILD","CI","NO_COLOR","chrome","close","$","bgAnsi256","fg","bg","bgRgb","hex","bgHex","visible","italic","inverse","hidden","bgGrey","bgGray","strikethrough","strike","_p","Ansis","strip","mapObj","camelCase","QuickLru","maxSize","camelCaseConvert","pascalCase","stopPathsSet","makeMapper","parentPath","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","preserveConsecutiveUppercase","toLocaleLowerCase","toLocaleUpperCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","preserveCamelCase","m1","postProcess","QuickLRU","onEviction","oldCache","_size","deleted","clear","oldCacheSize","cloneDeep","instanceClone","cloneObjectDeep","cloneArrayDeep","isObjectObject","ctor","prot","BlockCipher","C_algo","algo","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","x2","x4","x8","RCON","AES","_doReset","_nRounds","_keyPriorReset","keyWords","keySize","sigBytes","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","encryptBlock","_doCryptBlock","decryptBlock","nRounds","s0","s1","s2","s3","t1","t2","t3","_createHelper","ORIG_P","ORIG_S","BLOWFISH_CTX","pbox","sbox","BlowFish_Encrypt","temp","Xl","Xr","BlowFish_Decrypt","BlowFishInit","keysize","Row","Col","Data1","Data2","Blowfish","blockSize","ivSize","Cipher","C_lib","Base","BufferedBlockAlgorithm","C_enc","Base64","Utf8","EvpKDF","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","dataUpdate","_append","_process","finalize","_doFinalize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","encrypt","decrypt","ciphertext","C_mode","StreamCipher","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","block","_prevBlock","processBlock","thisBlock","Pkcs7","blockSizeBytes","nPaddingBytes","paddingWord","paddingWords","unpad","CipherParams","modeCreator","_minBufferSize","_mode","__creator","_doProcessBlock","finalProcessedBlocks","_data","cipherParams","mixIn","formatter","OpenSSLFormatter","OpenSSL","salt","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","OpenSSLKdf","kdf","execute","password","hasher","compute","derivedParams","msCrypto","cryptoSecureRandomInt","randomBytes","readInt32LE","subtype","$super","propertyName","encoder","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","hexChars","bite","hexStr","hexStrLength","substr","Latin1","latin1Chars","latin1Str","latin1StrLength","decodeURIComponent","escape","utf8Str","unescape","_nDataBytes","processedWords","dataWords","dataSigBytes","nBlocksReady","nWordsReady","nBytesReady","Hasher","messageUpdate","_createHmacHelper","HMAC","parseLoop","base64Str","base64StrLength","reverseMap","bitsCombined","_map","base64Chars","triplet","paddingChar","_reverseMap","paddingIndex","Base64url","urlSafe","_safe_map","swapEndian","word","Utf16","Utf16BE","utf16Chars","codePoint","utf16Str","utf16StrLength","Utf16LE","MD5","iterations","derivedKey","derivedKeyWords","_hasher","hasherBlockSize","hasherBlockSizeBytes","oKey","_oKey","_iKey","oKeyWords","iKeyWords","innerHash","ArrayBuffer","superInit","subInit","typedArray","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","byteOffset","byteLength","typedArrayByteLength","sin","_hash","offset_i","M_offset_i","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","FF","GG","HH","II","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","HmacMD5","CFB","generateKeystreamAndEncrypt","keystream","CTRGladman","incWord","b1","b2","b3","incCounter","counter","_counter","CTR","ECB","OFB","_keystream","AnsiX923","lastBytePos","Ansix923","Iso10126","Iso97971","ZeroPadding","NoPadding","PBKDF2","hmac","blockIndex","blockIndexWords","blockWords","blockWordsLength","intermediate","intermediateWords","C_","RabbitLegacy","X","_X","_C","IV","IV_0","IV_1","i0","i2","i1","i3","gx","ga","gb","gh","gl","Rabbit","RC4","keySigBytes","_S","keyByteIndex","keyByte","_j","generateKeystreamWord","keystreamWord","RC4Drop","drop","_zl","_zr","_sl","_sr","_hl","_hr","RIPEMD160","al","bl","cl","dl","el","br","cr","dr","er","hl","hr","zl","zr","sl","sr","f1","f2","f3","f4","f5","rotl","HmacRIPEMD160","W","SHA1","HmacSHA1","SHA224","HmacSHA224","isPrime","sqrtN","sqrt","factor","getFractionalBits","nPrime","gamma0x","gamma0","gamma1x","gamma1","maj","sigma0","HmacSHA256","X64Word","x64","Word","RHO_OFFSETS","PI_INDEXES","ROUND_CONSTANTS","newY","LFSR","roundConstantMsw","roundConstantLsw","bitPosition","SHA3","outputLength","nBlockSizeLanes","M2i","M2i1","lane","high","low","tMsw","tLsw","Tx","Tx4","Tx1","Tx1Msw","Tx1Lsw","laneIndex","laneMsw","laneLsw","rhoOffset","TPiLane","T0","state0","TLane","Tx1Lane","Tx2Lane","roundConstant","blockSizeBits","outputLengthBytes","outputLengthLanes","hashWords","HmacSHA3","C_x64","X64WordArray","SHA512","SHA384","HmacSHA384","X64Word_create","H0","H1","H2","H3","H4","H7","H0h","H0l","H1h","H1l","H2h","H2l","H3h","H3l","H4h","H4l","H5h","H5l","H6h","H6l","H7h","H7l","ah","bh","ch","dh","eh","fh","fl","hh","Wil","Wih","Wi","gamma0xh","gamma0xl","gamma0h","gamma0l","gamma1xh","gamma1xl","gamma1h","gamma1l","Wi7","Wi7h","Wi7l","Wi16","Wi16h","Wi16l","t1l","chh","chl","majh","majl","sigma0h","sigma0l","sigma1h","sigma1l","Ki","Kih","Kil","t1h","t2l","toX32","HmacSHA512","PC1","PC2","BIT_SHIFTS","SBOX_P","SBOX_MASK","DES","keyBits","keyBitPos","subKeys","_subKeys","nSubKey","subKey","bitShift","invSubKeys","_invSubKeys","_lBlock","_rBlock","exchangeLR","exchangeRL","lBlock","rBlock","mask","TripleDES","key1","key2","key3","_des1","_des2","_des3","X32WordArray","x64Words","x64WordsLength","x32Words","x64Word","wordsLength","isNonNullObject","stringValue","isReactElement","isSpecial","cloneUnlessOtherwiseSpecified","defaultArrayMerge","getKeys","symbol","getEnumerableOwnPropertySymbols","propertyIsOnObject","mergeObject","destination","propertyIsUnsafe","customMerge","getMergeFunction","arrayMerge","sourceIsArray","deepmerge_1","dequal","foo","ReflectOwnKeys","Reflect","ReflectApply","receiver","ownKeys","NumberIsNaN","once","emitter","errorListener","resolver","eventTargetAgnosticAddListener","on","addErrorHandlerIfEventEmitter","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","_addListener","existing","newListener","unshift","warned","onceWrapper","fired","wrapFn","_onceWrap","wrapped","unwrap","evlistener","ret","unwrapListeners","arrayClone","listenerCount","wrapListener","RangeError","setMaxListeners","getMaxListeners","doError","prependListener","prependOnceListener","originalListener","spliceOne","off","removeAllListeners","rawListeners","eventNames","reactIs","REACT_STATICS","childContextTypes","contextTypes","getDefaultProps","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","isMemo","ForwardRef","Memo","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","q","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","denyList","converter","defaultAttributes","attributes","expires","toUTCString","stringifiedAttributes","attributeName","cookies","jar","found","read","withAttributes","withConverter","freeze","ctorName","isBuffer","isArguments","toDateString","setDate","stackTraceLimit","ignoreCase","isRegexp","isGeneratorObj","mapObjectSkip","isObjectCustom","mapObject","isSeen","mapArray","mapResult","shouldRecurse","Cache","_hitCount","_missCount","_debug","_del","timeoutCallback","oldRecord","expire","canDelete","memsize","bool","hits","misses","exportJson","plainJsCache","importJson","jsonToImport","cacheToImport","currTime","skipDuplicates","remainingTime","tryStringify","opts","ss","lastPos","flen","aa","ca","da","ea","fa","ha","ia","ja","ka","la","ma","acceptsBooleans","attributeNamespace","mustUseProperty","sanitizeURL","removeEmptyString","ra","sa","ta","pa","qa","oa","removeAttribute","setAttributeNS","xlinkHref","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","Ma","Na","Oa","prepareStackTrace","construct","Pa","Qa","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","stopTracking","Ua","Wa","Xa","activeElement","Ya","defaultChecked","_wrapperState","initialChecked","Za","initialValue","controlled","ab","bb","db","ownerDocument","eb","defaultSelected","dangerouslySetInnerHTML","hb","ib","jb","textContent","kb","lb","nb","namespaceURI","innerHTML","valueOf","MSApp","execUnsafeLocalFunction","ob","lastChild","nodeValue","lineClamp","qb","rb","sb","setProperty","tb","menuitem","area","embed","keygen","link","meta","param","wbr","ub","vb","wb","xb","srcElement","correspondingUseElement","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Nb","Ob","Pb","Qb","Rb","Sb","Tb","Vb","alternate","Wb","memoizedState","dehydrated","Xb","Zb","sibling","Yb","$b","ac","unstable_scheduleCallback","bc","unstable_cancelCallback","cc","unstable_shouldYield","dc","unstable_requestPaint","unstable_now","ec","unstable_getCurrentPriorityLevel","fc","unstable_ImmediatePriority","gc","unstable_UserBlockingPriority","hc","unstable_NormalPriority","ic","unstable_LowPriority","jc","unstable_IdlePriority","kc","lc","oc","clz32","pc","qc","LN2","rc","sc","tc","uc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","xc","yc","zc","Ac","eventTimes","Cc","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","Rc","Sc","pointerId","Tc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Vc","Wc","isDehydrated","containerInfo","Xc","Yc","Zc","$c","ad","cd","ReactCurrentBatchConfig","dd","ed","fd","gd","hd","Uc","stopPropagation","jd","kd","ld","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","isTrusted","td","ud","view","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Up","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","repeat","which","Rd","Td","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","datetime","month","range","tel","week","me","ne","oe","pe","qe","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","defaultView","getSelection","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","scrollLeft","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","nf","Ub","of","pf","qf","sf","passive","tf","uf","parentWindow","vf","wf","na","xa","$a","ba","je","char","ke","xf","yf","zf","Af","Bf","Cf","Df","Ef","__html","Ff","Gf","Hf","Jf","queueMicrotask","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","Vf","Wf","Xf","Yf","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","$f","ag","getChildContext","cg","__reactInternalMemoizedMergedChildContext","dg","eg","gg","hg","jg","kg","mg","ng","og","pg","qg","rg","sg","ug","vg","wg","xg","yg","zg","Ag","Bg","elementType","deletions","Cg","pendingProps","treeContext","retryLane","Dg","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","_owner","_stringRef","Mg","Ng","Og","Pg","Qg","Rg","implementation","Sg","Tg","Ug","Vg","Wg","Xg","Yg","Zg","$g","_currentValue","childLanes","firstContext","lanes","memoizedValue","interleaved","ih","jh","kh","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","effects","lh","mh","eventTime","nh","oh","ph","qh","rh","sh","uh","vh","wh","yh","zh","Ah","Bh","Ch","revealOrder","Dh","Eh","_workInProgressVersionPrimary","Fh","ReactCurrentDispatcher","Gh","Hh","Ih","Jh","Kh","Lh","Mh","Nh","Oh","Ph","Qh","Rh","Sh","Th","baseQueue","Uh","Vh","Wh","lastRenderedReducer","hasEagerState","eagerState","lastRenderedState","dispatch","Xh","Yh","Zh","$h","getSnapshot","bi","ci","di","lastEffect","stores","ei","fi","gi","hi","ii","destroy","deps","ji","ki","li","mi","ni","oi","pi","qi","ri","si","ti","ui","vi","wi","yi","zi","Ai","Bi","readContext","useCallback","useImperativeHandle","useLayoutEffect","useReducer","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Ci","Di","Ei","isMounted","_reactInternals","enqueueSetState","enqueueReplaceState","enqueueForceUpdate","Fi","shouldComponentUpdate","isPureReactComponent","Gi","updater","Hi","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","Ii","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","Ji","digest","Li","Mi","Ni","Oi","Pi","Qi","Ri","componentStack","Si","pingCache","Ti","Ui","Vi","ReactCurrentOwner","Xi","Yi","Zi","$i","aj","bj","cj","dj","baseLanes","cachePool","ej","fj","gj","hj","ij","UNSAFE_componentWillUpdate","componentWillUpdate","jj","kj","pendingContext","lj","zj","Aj","Bj","Cj","mj","nj","oj","pj","qj","sj","dataset","dgst","tj","uj","_reactRetry","rj","subtreeFlags","vj","wj","isBackwards","rendering","renderingStartTime","last","tail","tailMode","xj","Dj","Ej","Fj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","createElementNS","autoFocus","Gj","Hj","Ij","Jj","U","Kj","WeakSet","V","Lj","Mj","Nj","Pj","Qj","Rj","Sj","Tj","Uj","Vj","_reactRootContainer","Wj","Xj","Yj","Zj","onCommitFiberUnmount","ak","bk","ck","dk","ek","fk","gk","hk","ik","jk","kk","__reactInternalSnapshotBeforeUpdate","Vk","lk","mk","nk","Y","Z","pk","qk","rk","sk","tk","Infinity","uk","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","callbackNode","expirationTimes","expiredLanes","wc","callbackPriority","ig","Ek","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","finishedWork","finishedLanes","Pk","timeoutHandle","Qk","Rk","Sk","Tk","Uk","mutableReadLanes","Bc","Oj","onCommitFiberRoot","mc","onRecoverableError","Wk","onPostCommitFiberRoot","Xk","Yk","$k","isReactComponent","pendingChildren","mutableSourceEagerHydrationData","pendingSuspenseBoundaries","yj","Zk","kl","ll","_internalRoot","nl","ol","rl","ql","unmount","unstable_scheduleHydration","form","usingClientEntryPoint","Events","tl","findFiberByHostInstance","bundleType","rendererPackageName","ul","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","vl","supportsFiber","inject","createPortal","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","sortIndex","setImmediate","expirationTime","priorityLevel","navigator","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","unstable_wrapCallback","extendStatics","__extends","__rest","SuppressedError","cacheDefault","serializerDefault","strategy","strategyDefault","monadic","computedValue","variadic","assemble","ErrorKind","SKELETON_TYPE","ObjectWithoutPrototypeCache","strategies","isLiteralElement","select","plural","isPoundElement","pound","isNumberSkeleton","isDateTimeSkeleton","dateTime","TYPE","SPACE_SEPARATOR_REGEX","DATE_TIME_REGEX","parseDateTimeSkeleton","skeleton","era","year","day","weekday","hourCycle","timeZoneName","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","roundingPriority","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseConciseScientificAndEngineeringStem","stem","notation","minimumIntegerDigits","parseNotationOptions","opt","signOpts","parseNumberSkeleton","tokens_1","currency","useGrouping","maximumFractionDigits","compactDisplay","currencyDisplay","unitDisplay","roundingMode","g3","g4","g5","minimumFractionDigits","trailingZeroDisplay","conciseScientificAndEngineeringOpts","timeData","getDefaultHourSymbolFromLocale","hourCycles","regionTag","languageTag","maximize","SPACE_SEPARATOR_START_REGEX","SPACE_SEPARATOR_END_REGEX","createLocation","hasNativeStartsWith","hasNativeFromCodePoint","fromCodePoint","hasNativeFromEntries","hasNativeCodePointAt","codePointAt","hasTrimStart","trimStart","hasTrimEnd","trimEnd","isSafeInteger","isFinite","REGEX_SUPPORTS_U_AND_Y","RE","matchIdentifierAtIndex","codePoints","entries_1","first","flag","IDENTIFIER_PREFIX_RE_1","_isWhiteSpace","_isPatternSyntax","Parser","ignoreTag","requiresOtherClause","shouldParseSkeletons","parseMessage","nestingLevel","parentArgType","expectingCloseTag","isEOF","parseArgument","UNMATCHED_CLOSING_TAG","clonePosition","_isAlpha","parseTag","parseLiteral","bump","startPosition","parseTagName","bumpSpace","bumpIf","childrenResult","endTagStartPosition","INVALID_TAG","closingTagNameStartPosition","UNCLOSED_TAG","startOffset","parseQuoteResult","tryParseQuote","parseUnquotedResult","tryParseUnquoted","parseLeftAngleResult","tryParseLeftAngleBracket","codepoint","openingBracePosition","EXPECT_ARGUMENT_CLOSING_BRACE","EMPTY_ARGUMENT","parseIdentifierIfPossible","MALFORMED_ARGUMENT","parseArgumentOptions","startingPosition","endOffset","bumpTo","typeStartPosition","argType","typeEndPosition","EXPECT_ARGUMENT_TYPE","styleAndLocation","styleStartPosition","parseSimpleArgStyleIfPossible","EXPECT_ARGUMENT_STYLE","styleLocation","argCloseResult","tryParseArgumentClose","parseNumberSkeletonFromString","EXPECT_DATE_TIME_SKELETON","dateTimePattern","skeletonCopy","patternPos","patternChar","extraLength","hourLen","dayPeriodLen","hourChar","getBestPattern","parsedOptions","typeEndPosition_1","EXPECT_SELECT_ARGUMENT_OPTIONS","identifierAndLocation","pluralOffset","EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE","tryParseDecimalInteger","INVALID_PLURAL_ARGUMENT_OFFSET_VALUE","optionsResult","tryParsePluralOrSelectOptions","location_2","pluralType","INVALID_ARGUMENT_TYPE","nestedBraces","apostrophePosition","bumpUntil","UNCLOSED_QUOTE_IN_ARGUMENT_STYLE","stringTokens_1","stemAndOptions","options_1","INVALID_NUMBER_SKELETON","expectCloseTag","parsedFirstIdentifier","hasOtherClause","parsedSelectors","selectorLocation","EXPECT_PLURAL_ARGUMENT_SELECTOR","INVALID_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_SELECT_ARGUMENT_SELECTOR","DUPLICATE_PLURAL_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT","fragmentResult","EXPECT_SELECT_ARGUMENT_SELECTOR","MISSING_OTHER_CLAUSE","expectNumberError","invalidNumberError","sign","hasDigits","decimal","currentOffset","targetOffset","nextCode","pruneLocation","els","SyntaxError","originalMessage","captureLocation","ErrorCode","PART_TYPE","FormatError","InvalidValueError","variableId","INVALID_VALUE","InvalidValueTypeError","MissingValueError","MISSING_VALUE","isFormatXMLElementFn","formatToParts","locales","formatters","formats","currentPluralValue","els_1","getNumberFormat","varName","getDateTimeFormat","value_1","formatFn","chunks","PluralRules","MISSING_INTL_API","getPluralRules","part","lastPart","mergeLiteral","mergeConfigs","configs","c1","c2","createFastMemoizeCache","store","IntlErrorCode","IntlMessageFormat","overrideFormats","formatterCache","pluralRules","ast","resolvedOptions","resolvedLocale","NumberFormat","supportedLocalesOf","getAst","resolveLocale","__parse","parseOpts","createDefaultFormatters","memoizedDefaultLocale","Locale","supportedLocales","integer","percent","long","full","IntlError","UnsupportedFormatterError","UNSUPPORTED_FORMATTER","InvalidConfigError","INVALID_CONFIG","MissingDataError","IntlFormatError","MessageFormatError","MissingTranslationError","allowlist","filtered","DEFAULT_INTL_CONFIG","timeZone","defaultFormats","fallbackOnEmptyString","createIntlCache","relativeTime","displayNames","getNamedFormat","formatType","Err","invariantIntlContext","intl","textComponent","shallowEqual","objA","objB","aKeys","bKeys","DisplayName","DisplayNameParts","IntlContext","__REACT_INTL_BYPASS_GLOBAL_CONTEXT__","__REACT_INTL_CONTEXT__","IntlConsumer","Consumer","Context","injectIntl","intlPropName","enforceContext","WithIntl","intlProp","forwardedRef","FormattedNumberParts","formatProps","formatNumberToParts","FormattedListParts","formatListToParts","createFormattedDateTimePartsComponent","ComponentParts","formatDateToParts","formatTimeToParts","createFormattedComponent","formattedValue","Text","setTimeZoneInOptions","deepMergeOptions","opts1","opts2","deepMergeFormatsAndSetTimeZone","mfFormats","messageDescriptor","defaultRichTextElements","invariant","getMessageFormat","DATE_TIME_FORMAT_OPTIONS","getFormatter","filteredOptions","timeStyle","dateStyle","formatDate","formatDateTimeRange","fromDate","toDate","formatRange","DISPLAY_NAMES_OPTONS","formatDisplayName","getDisplayNames","DisplayNames","LIST_FORMAT_OPTIONS","formatList","getListFormat","ListFormat","richValues_1","serializedValues","generateToken","NUMBER_FORMAT_OPTIONS","formatNumber","PLURAL_FORMAT_OPTIONS","formatPlural","RELATIVE_TIME_FORMAT_OPTIONS","formatRelativeTime","getRelativeTimeFormat","RelativeTimeFormat","verifyConfigMessages","createIntl","createFormatters","resolvedConfig","$t","assignUniqueKeysToFormatXMLElementFnArgument","formatXMLElementFn","toArray","rawValues","rawDefaultRichTextElements","coreIntl","FormattedDateTimeRange","MemoizedFormattedMessage","nextProps","nextValues","nextOtherProps","FormattedPlural","formattedPlural","processIntlConfig","wrapRichTextChunksInFragment","prevConfig","selectUnit","seconds","absValue","getDurationInSeconds","INCREMENTABLE_UNITS","canIncrement","SimpleFormattedRelativeTime","formattedRelativeTime","FormattedRelativeTime","updateIntervalInSeconds","updateTimer","prevUnit","setPrevUnit","_e","prevValue","setPrevValue","_f","currentValueInSeconds","setCurrentValueInSeconds","valueToSeconds","clearUpdateTimer","nextValueInSeconds","nextUnit","unitDuration","prevInterestingValueInSeconds","nextInterestingValueInSeconds","currentValue","currentUnit","defineMessages","msgs","defineMessage","FormattedDate","FormattedTime","FormattedNumber","FormattedList","FormattedDisplayName","FormattedDateParts","FormattedTimeParts","__self","__source","jsxs","forceUpdate","_status","_result","Children","PureComponent","cloneElement","_currentValue2","_threadCount","_defaultValue","_globalName","createFactory","createRef","isValidElement","startTransition","unstable_act","buf","allocUnsafe","cloneBuffer","cloneSymbol","cloneArrayBuffer","cloneTypedArray","cloneRegExp","React","revalidateEvents","lite","_interopDefault","_interopNamespace","React__default","revalidateEvents__namespace","SWRGlobalState","mergeObjects","EMPTY_CACHE","INITIAL_CACHE","STR_UNDEFINED","isWindowDefined","isDocumentDefined","isLegacyDeno","hasRequestAnimationFrame","createCacheHelper","online","onWindowEvent","offWindowEvent","preset","isVisible","defaultConfigOptions","initFocus","initReconnect","onOnline","onOffline","IS_REACT_LEGACY","IS_SERVER","useIsomorphicLayoutEffect","navigatorConnection","connection","slowConnection","effectiveType","saveData","isObjectType","stableHash","isRegex","__timestamp","getTimestamp","internalMutate","_opts","populateCache","throwOnError","rollbackOnErrorOption","rollbackOnError","optimisticData","keyFilter","matchedKeys","it","_k","mutateByKey","EVENT_REVALIDATORS","MUTATION","FETCH","PRELOAD","startRevalidate","revalidators","MUTATE_EVENT","beforeMutationTs","hasOptimisticData","displayedData","currentData","committedData","populateCachedData","revalidateAllKeys","initCache","provider","subscriptions","subscribe","subs","initProvider","releaseFocus","FOCUS_EVENT","releaseReconnect","RECONNECT_EVENT","onLoadingSlow","maxRetryCount","currentRetryCount","onDiscarded","focusThrottleInterval","dedupingInterval","loadingTimeout","isPaused","u1","u2","SWRConfigContext","SWRConfig","parentConfig","isFunctionalConfig","extendedConfig","cacheContextRef","cacheContext","rAF","INFINITE_PREFIX","ERROR_REVALIDATE_EVENT","configContextClient","constants_js","types_js","enableDevtools","__SWR_DEVTOOLS_USE__","normalize","BUILT_IN_MIDDLEWARE","key_","fetcher_","__SWR_DEVTOOLS_REACT__","preload","fnArg","subscribeCallback","keyedRevalidators","withArgs","middleware","withMiddleware","uses","index_js$1","index_js","thenable","WITH_DEDUPE","dedupe","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","initialMountedRef","unmountedRef","keyRef","fetcherRef","configRef","isActive","getCache","setCache","subscribeCache","getInitialCache","stateDependencies","isEqual","returnedData","shouldStartRequest","getSelectedCache","snapshot","isValidating","isLoading","cachedData","initialData","clientSnapshot","serverSnapshot","memorizedSnapshot","newSnapshot","isInitialMount","hasRevalidator","laggyDataRef","shouldDoInitialRevalidation","defaultValidatingState","revalidateOpts","currentFetcher","newData","shouldStartNewRequest","callbackSafeguard","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","mutationInfo","cacheData","currentConfig","boundMutate","softRevalidate","nextFocusRevalidatedAt","initNow","unsubEvents","promise","useSWR__default","ditchMutationsUntilRef","stateRef","rerender","stateDependenciesRef","shouldRerender","currentState","useStateWithDeps","isMutating","trigger","serializedKey","resolvedKey","mutationStartedAt","objectIs","checkIfSnapshotChanged","latestGetSnapshot","nextValue","shim","_useState","ZodError","quotelessJson","util_1","util","arrayToEnum","addIssue","addIssues","actualProto","_mapper","fieldErrors","processError","returnTypeError","argumentsError","curr","jsonStringifyReplacer","isEmpty","flatten","formErrors","__importDefault","mod","getErrorMap","setErrorMap","defaultErrorMap","en_1","overrideErrorMap","__createBinding","k2","__exportStar","errorUtil","errToObj","isDirty","isAborted","OK","DIRTY","INVALID","ParseStatus","addIssueToContext","EMPTY_PATH","makeIssue","errorMaps","issueData","fullPath","fullIssue","maps","defaultError","overrideMap","contextualErrorMap","schemaErrorMap","dirty","mergeArray","arrayValue","mergeObjectAsync","pairs","syncPairs","pair","mergeObjectSync","finalObject","alwaysSet","objectUtil","getParsedType","ZodParsedType","assertEqual","assertIs","_arg","assertNever","_x","getValidEnumValues","validKeys","objectValues","checker","isInteger","joinValues","separator","mergeShapes","nan","function","bigint","__setModuleDefault","__importStar","ZodError_1","_ctx","invalid_literal","invalid_union_discriminator","invalid_enum_value","invalid_arguments","invalid_return_type","invalid_date","invalid_string","validation","endsWith","too_small","exact","inclusive","minimum","too_big","maximum","invalid_intersection_types","not_multiple_of","multipleOf","not_finite","_ZodEnum_cache","_ZodNativeEnum_cache","__classPrivateFieldGet","__classPrivateFieldSet","any","ZodFirstPartyTypeKind","late","ZodSchema","Schema","ZodReadonly","ZodPipeline","ZodBranded","BRAND","ZodNaN","ZodCatch","ZodDefault","ZodNullable","ZodOptional","ZodTransformer","ZodEffects","ZodPromise","ZodNativeEnum","ZodEnum","ZodLiteral","ZodLazy","ZodFunction","ZodSet","ZodMap","ZodRecord","ZodTuple","ZodIntersection","ZodDiscriminatedUnion","ZodUnion","ZodObject","ZodArray","ZodVoid","ZodNever","ZodUnknown","ZodAny","ZodNull","ZodUndefined","ZodSymbol","ZodDate","ZodBoolean","ZodBigInt","ZodNumber","ZodString","datetimeRegex","ZodType","NEVER","tuple","strictObject","preprocess","ostring","onumber","oboolean","nullable","never","effect","discriminatedUnion","errorUtil_1","parseUtil_1","ParseInputLazyPath","_cachedPath","handleResult","processCreateParams","invalid_type_error","required_error","iss","_def","_getType","_getOrReturnCtx","parsedType","_processInputParams","_parseSync","_parseAsync","parseAsync","safeParseAsync","maybeAsyncResult","check","getIssueProperties","_refinement","setError","refinement","refinementData","superRefine","def","spa","nullish","describe","pipe","readonly","isNullable","isOptional","vendor","validate","incoming","defaultValueFunc","catchValueFunc","catchValue","This","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","nanoidRegex","jwtRegex","durationRegex","emailRegex","emojiRegex","ipv4Regex","ipv4CidrRegex","ipv6Regex","ipv6CidrRegex","base64Regex","base64urlRegex","dateRegexSource","dateRegex","timeRegexSource","precision","local","isValidJWT","jwt","alg","base64","padEnd","atob","typ","isValidCidr","checks","tooBig","tooSmall","_regex","_addCheck","emoji","uuid","nanoid","cuid","cuid2","ulid","base64url","cidr","minLength","nonempty","isDatetime","isTime","isDuration","isEmail","isURL","isEmoji","isUUID","isNANOID","isCUID","isCUID2","isULID","isIP","isCIDR","isBase64","isBase64url","floatSafeRemainder","valDecCount","stepDecCount","decCount","gte","lte","setLimit","gt","lt","int","positive","negative","nonpositive","nonnegative","finite","minValue","isInt","BigInt","_getInvalidInput","minDate","maxDate","_any","_unknown","void","exactLength","deepPartialify","newShape","fieldSchema","_cached","nonstrict","passthrough","augment","_getCached","shapeKeys","extraKeys","catchall","unknownKeys","keyValidator","augmentation","merging","setKey","pick","omit","deepPartial","newField","keyof","createZodEnum","strictCreate","lazycreate","childCtx","getDiscriminator","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","aType","bType","sharedKeys","newObj","sharedValue","newArray","handleParsed","parsedLeft","parsedRight","merged","itemIndex","schemas","third","finalMap","minSize","finalizeSet","parsedSet","implement","makeArgsIssue","makeReturnsIssue","returns","parsedArgs","parsedReturns","parameters","returnType","strictImplement","expectedValues","enumValues","Values","Enum","extract","newDef","nativeEnumValues","promisified","sourceType","checkCtx","fatal","executeRefinement","inner","createWithPreprocess","removeDefault","removeCatch","inResult","out","handleAsync","cleanParams","_params","_fatal","cls","stringType","numberType","nanType","bigIntType","booleanType","dateType","symbolType","undefinedType","nullType","anyType","unknownType","neverType","voidType","arrayType","objectType","strictObjectType","unionType","discriminatedUnionType","intersectionType","tupleType","recordType","mapType","setType","functionType","lazyType","literalType","enumType","nativeEnumType","promiseType","effectsType","optionalType","nullableType","preprocessType","pipelineType","_extends","toPropertyKey","_typeof","cacheParser","fastDefer","objectCode","IfModifiedSince","LastModified","IfNoneMatch","CacheControl","Pragma","ETag","Expires","Age","XAxiosCacheEtag","XAxiosCacheLastModified","XAxiosCacheStaleIfError","defaultHeaderInterpreter","cacheControl","noCache","noStore","maxStale","immutable","staleWhileRevalidate","age","stale","createValidateStatus","oldValidate","isMethodIn","requestMethod","methodList","updateStaleRequest","etag","modifiedSince","_cache$data","etagValue","createdAt","createCacheResponse","previousCache","defaultRequestInterceptor","onFulfilled","cachePredicate","ignoreUrls","_config$headers","_Header$CacheControl","_config$headers2","_Header$Pragma","_config$headers3","_Header$Expires","cacheTakeover","methods","overrideCache","override","ignoreAndRequest","deferred","cachedResponse","transformResponse","adapter","testCachePredicate","predicate","statusCheck","responseMatch","containsHeaders","_response$headers$hea","updateCache","cacheUpdater","defaultResponseInterceptor","rejectResponse","responseId","clearCache","cacheConfig","staleTtl","interpretHeader","headerInterpreter","staleIfError","newCache","staleHeader","isStorage","hasUniqueIdentifierHeader","mustRevalidate","canStale","buildStorage","structuredClone","buildMemoryStorage","cloneData","cleanupInterval","maxEntries","cleanup","cleaner","SLASHES_REGEX","defaultKeyGenerator","buildWebStorage","save","allValues","sortedItems","_options$ttl","_options$etag","_options$modifiedSinc","_options$interpretHea","_options$cacheTakeove","_options$staleIfError","_options$override","_options$hydrate","axiosCache","requestInterceptor","responseInterceptor","DEFAULT_OPTIONS","linearDelay","exponentialDelay","retryAfter","isNetworkOrIdempotentRequestError","isIdempotentRequestError","isSafeRequestError","isRetryableError","isNetworkError","is_retry_allowed_1","SAFE_HTTP_METHODS","IDEMPOTENT_HTTP_METHODS","retryAfterHeader","retryAfterMs","retryNumber","delayFactor","calculatedDelay","setCurrentState","defaultOptions","resetLastRequestTime","getRequestOptions","lastRequestTime","retryCondition","_retryNumber","onMaxRetryTimesExceeded","validateResponse","axiosRetry","requestInterceptorId","responseInterceptorId","shouldRetryOrPromise","_err","shouldRetry","agent","fixConfig","lastRequestDuration","transformRequest","abortListener","handleRetry","handleMaxRetryTimesExceeded","kindOf","thing","kindOfTest","typeOfTest","isArrayBuffer","isFile","isBlob","isFileList","isURLSearchParams","isReadableStream","isRequest","isResponse","isHeaders","allOwnKeys","findKey","isContextDefined","isTypedArray","TypedArray","isHTMLForm","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","defineProperties","isAsyncFn","_setImmediate","setImmediateSupported","postMessageSupported","asap","nextTick","utils$1","isFormData","FormData","isArrayBufferView","isView","isStream","caseless","assignValue","targetKey","stripBOM","inherits","superConstructor","toFlatObject","sourceObj","destObj","propFilter","forEachEntry","regExp","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","define","toCamelCase","toFiniteNumber","isSpecCompliantForm","toJSONObject","visit","reducedValue","isThenable","prototype$1","isVisitable","removeBrackets","renderKey","predicates","toFormData","formData","metaTokens","indexes","visitor","defaultVisitor","useBlob","convertValue","isFlatArray","exposedHelpers","encode$1","charMap","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serializedParams","hashmarkIndex","InterceptorManager$1","synchronous","runWhen","eject","transitionalDefaults","silentJSONParsing","forcedJSONParsing","platform$1","protocols","hasBrowserEnv","hasStandardBrowserEnv","hasStandardBrowserWebWorkerEnv","importScripts","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","toURLEncodedForm","formSerializer","_FormData","rawValue","stringifySafely","JSONRequested","strictJSONParsing","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","parseHeaders","tokensRE","parseTokens","matcher","deleteHeader","normalized","formatHeader","asStrings","computed","accessor","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","progressEventReducer","isDownloadStream","freq","bytesNotified","_speedometer","samplesCount","bytes","timestamps","firstSampleTS","chunkLength","startedAt","bytesCount","passed","speedometer","lastArgs","timestamp","threshold","invoke","throttle","loaded","lengthComputable","progressBytes","rate","estimated","progressEventDecorator","asyncDecorator","isURLSameOrigin","isMSIE","secure","toGMTString","buildFullPath","requestedURL","allowAbsoluteUrls","isRelativeUrl","relativeURL","combineURLs","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","cancelToken","socketPath","responseEncoding","configValue","resolveConfig","auth","btoa","username","xsrfValue","xhrAdapter","onCanceled","uploadThrottled","downloadThrottled","flushUpload","flushDownload","unsubscribe","onloadend","getAllResponseHeaders","onabort","ETIMEDOUT","upload","parseProtocol","composeSignals$1","signals","streamChunk","chunk","chunkSize","pos","readStream","stream","reader","getReader","trackStream","onProgress","onFinish","iterable","readBytes","_onFinish","ReadableStream","pull","loadedBytes","enqueue","highWaterMark","Response","isReadableStreamSupported","encodeText","TextEncoder","supportsRequestStream","duplexAccessed","hasContentType","duplex","supportsResponseStream","resolvers","ERR_NOT_SUPPORT","resolveBodyLength","getContentLength","_request","getBodyLength","knownAdapters","http","fetchOptions","composedSignal","toAbortSignal","requestContentLength","contentTypeHeader","isCredentialsSupported","isStreamResponse","responseContentLength","responseData","renderReason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","throwIfCancellationRequested","throwIfRequested","dispatchRequest","validators$1","deprecatedWarnings","ERR_DEPRECATED","spelling","correctSpelling","assertOptions","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","configOrUrl","dummy","withXsrfToken","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","chain","getUri","generateHTTPMethod","isForm","Axios$1","CancelToken","resolvePromise","onfulfilled","_resolve","CancelToken$1","Continue","SwitchingProtocols","Processing","EarlyHints","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","NotImplemented","BadGateway","ServiceUnavailable","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","createInstance","spread","formToJSON","getAdapter","InvalidTokenError","base64UrlDecode","b64DecodeUnicode","errSerializer","errWithCauseSerializer","reqSerializers","resSerializers","mapHttpRequest","mapHttpResponse","reqSerializer","resSerializer","wrapErrorSerializer","customSerializer","wrapRequestSerializer","wrapResponseSerializer","isErrorLike","getErrorCause","causeResult","_stackWithCauses","_messageWithCauses","skipIfVErrorStyleCause","stackWithCauses","messageWithCauses","rawSymbol","pinoErrProto","aggregateErrors","pinoErrorSymbols","pinoReqProto","remoteAddress","remotePort","socket","_req","originalUrl","pinoResProto","_res","headersSent","_console","defd","pfGlobalThisOrFallback","stdSerializers","mock","asErrValue","levelToValue","levels","baseLogFunctionSymbol","hierarchySymbol","logFallbackMap","appendChildLogger","childLogger","transmit","asObject","shouldSerialize","stdErrSerialize","logFunctions","setupBaseLogFunctions","_level","setOpts","getTimeFunction","onChild","childOptions","childOptionsSerializers","childSerializers","childSerialize","applySerializers","_stdErrSerialize","Child","_childLevel","_logEvent","createLogEventShape","labels","inverted","invertObject","getLevels","rootLogger","transmitLevel","transmitValue","ts","argsIsSerialized","levelFormatter","logObjectFormatter","argsCloned","logObject","formattedLevel","lvl","methodValue","methodLevel","createWrap","hierarchy","getBindingChain","prependBindingsInArguments","nullTime","epochTime","stdTimeFunctions","unixTime","isoTime","_objectWithoutPropertiesLoose","minFresh","mustUnderstand","noTransform","onlyIfCached","proxyRevalidate","public","sMaxAge"],"sourceRoot":""}