upconta.frontend-utils 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@4.20.0_tslib@2.6.3_typescript@5.5.4/node_modules/tslib/tslib.es6.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../src/components/Header.tsx","../../src/libs/utils.tsx","../../src/libs/reglas.ts","../../src/libs/filtros.ts","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/shim/index.js","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../node_modules/.pnpm/swr@2.2.5_react@18.3.1/node_modules/swr/dist/_internal/index.mjs","../../node_modules/.pnpm/swr@2.2.5_react@18.3.1/node_modules/swr/dist/immutable/index.mjs","../../src/components/Seeker.tsx","../../src/components/TemaPrincipal.tsx","../../src/components/LayoutBase.tsx","../../src/components/Seeker.utils.tsx","../../src/libs/hooks/vista-insertar.tsx","../../src/libs/hooks/confirmacion-salida.tsx","../../src/libs/hooks/vista-principal.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\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]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\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-jsx-runtime.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","import Link from 'next/link'\nimport { useRouter } from 'next/router'\nimport { ReloadOutlined } from '@ant-design/icons'\nimport { ReactNode, FC, useState, useRef, useEffect } from 'react'\nimport { Input, Button, Breadcrumb, Typography } from 'antd'\n\ntype BreadcrumbPath = {\n to?: string\n label: string\n}\n\nconst Navegador: FC<{ paths?: BreadcrumbPath[] }> = (props) =>\n !props.paths ? null : (\n <Breadcrumb\n items={props.paths.map(({ to, label }) => ({\n title: to ? <Link href={to}>{label}</Link> : label,\n }))}\n />\n )\n\nconst Header: FC<{\n title: ReactNode\n subtitle?: ReactNode\n /**\n * Oculta la segunda columna o cambia la segunda columna\n */\n column?: ReactNode | null\n /**\n * Cambiar el boton de insertar, lo sustituye o lo oculta si es null\n */\n defaultInsert?: ReactNode | null\n /**\n * Indica que el botón de refrescar debe ponerse en modo carga.\n */\n loading?: boolean\n /**\n * Los paths para mostrar en Breadcrumb\n */\n paths?: BreadcrumbPath[]\n children?: ReactNode\n ocultarBuscador?: boolean\n /**\n * Evento para refrescar los datos.\n */\n onRefrescar?: () => void\n}> = ({ defaultInsert = false, loading: isLoading = false, ...props }) => {\n const router = useRouter()\n const pathname = router.pathname\n const [qQuery, setQQuery] = useState('')\n const searchParams = new URLSearchParams(\n router.query as Record<string, string>\n )\n\n const getUrlInsert = () => {\n let newPathname = pathname\n if (newPathname.endsWith('/')) newPathname = newPathname.slice(0, -1)\n return newPathname + '/insert'\n }\n\n const onSearch = () => {\n const params = new URLSearchParams(searchParams.toString())\n const antiguoString = params.get('q') || ''\n if (antiguoString === qQuery) return\n if (!qQuery) params.delete('q')\n else params.set('q', qQuery)\n params.delete('page')\n router.push({ query: Object.fromEntries(params) })\n }\n\n const segundaColumna = (\n <div className=\"flex w-full md:w-auto flex-wrap md:flex-nowrap gap-2 justify-end\">\n {props.ocultarBuscador !== true ? (\n <Input.Search\n value={qQuery}\n placeholder=\"Ingresar búsqueda\"\n onChange={(event) => setQQuery(event.target.value || '')}\n onSearch={onSearch}\n onPressEnter={onSearch}\n />\n ) : null}\n\n {defaultInsert !== null\n ? defaultInsert || (\n <Link href={getUrlInsert()}>\n <Button type=\"primary\">Insertar</Button>\n </Link>\n )\n : null}\n\n {props.onRefrescar ? (\n <div>\n <Button\n loading={isLoading}\n title=\"Refrescar datos\"\n icon={<ReloadOutlined />}\n onClick={props.onRefrescar}\n />\n </div>\n ) : null}\n\n {props.children}\n\n {/* <SearchVideos /> */}\n </div>\n )\n\n useEffect(() => {\n if (!router.isReady) return\n setQQuery(searchParams.get('q') || '')\n }, [router.isReady])\n\n return (\n <div className=\"flex md:flex-row flex-col md:items-end items-start justify-between gap-6 mb-6\">\n <div>\n <Navegador paths={props.paths} />\n <Typography.Title className=\"!mb-0 mt-4\">\n {props.title}\n </Typography.Title>\n {props.subtitle && (\n <Typography.Title\n level={3}\n type=\"secondary\"\n className=\"!font-normal !m-0\"\n >\n {props.subtitle}\n </Typography.Title>\n )}\n </div>\n {props.column !== null ? props.column || segundaColumna : null}\n </div>\n )\n}\n\nexport default Header\n","import { App } from 'antd'\nimport axiosBase from 'axios'\nimport { ReactNode } from 'react'\nimport { deleteCookie, getCookie, setCookie } from 'cookies-next'\n\nlet configs = {\n hostFastify: '',\n hostRestify: '',\n userTokenName: '',\n adminTokenName: '',\n cookieDominio: '',\n}\n\nexport const configurarUtils = (override: Partial<typeof configs>) => {\n configs = { ...configs, ...override }\n}\n\n/**\n * Identifica el error, de axios o de la aplicación, y retorna el mensaje\n * @param err El error lanzado\n * @returns El mensaje de error\n */\nconst getMensajeError = async (\n err: any\n): Promise<{\n message: string\n tipo: 'error'\n}> => {\n const result: string | Blob = err.response?.data\n ? err.response.data?.message || err.response.data\n : err.message\n if (result instanceof Blob) {\n try {\n const error = JSON.parse(await result.text())\n return error.message\n } catch {\n return { message: await result.text(), tipo: 'error' }\n }\n }\n return { message: result, tipo: 'error' }\n}\n\n/**\n * Hook con utilidades para el funcionamiento de la aplicación\n */\nexport const useUtils = () => {\n const { modal, message, notification } = App.useApp()\n\n const showError = async (\n err: Error | unknown,\n args?: { title?: string; cuerpoAdicional: ReactNode }\n ) => {\n const content = await getMensajeError(err)\n modal[content.tipo]({\n title: args?.title || 'Proceso fallido',\n width: 450,\n content: (\n <>\n {content.message}\n {args?.cuerpoAdicional}\n </>\n ),\n okType: 'danger',\n })\n }\n\n return {\n showError,\n modal,\n message,\n notification,\n }\n}\n\nconst getNombreCookie = (tipo?: 'usuario' | 'administrador') => {\n switch (tipo) {\n case 'administrador':\n return configs.adminTokenName\n default:\n return configs.userTokenName\n }\n}\n\n/**\n * Obtiene la instancia de axios correspondiente al servidor de fastify o\n * restify\n * @param endpoint El servidor al que se desea conectar\n * @param args Argumentos adicionales\n * @param args.tipo El tipo de usuario al que debe dar acceso, por defecto\n * usuario\n * @returns La instancia de axios\n */\nexport const getAxios = (\n endpoint: 'fastify' | 'restify' | string,\n args?: {\n tipo: 'usuario' | 'administrador'\n }\n) => {\n let baseURL = ''\n if (!endpoint || endpoint === 'fastify' || endpoint.includes('/v4'))\n baseURL = configs.hostFastify\n else baseURL = configs.hostRestify\n const axios = axiosBase.create({ baseURL })\n axios.defaults.headers.common.Authorization = getCookie(\n getNombreCookie(args?.tipo),\n { domain: configs.cookieDominio }\n ) as string\n return axios\n}\n\nexport const crearToken = (\n token: string,\n args: { usuario: 'usuario' | 'administrador' }\n) => {\n setCookie(getNombreCookie(args.usuario), token, {\n domain: configs.cookieDominio,\n maxAge: 60 * 60 * 24 * 7,\n })\n}\n\nexport const destruirToken = (tipo: 'usuario' | 'administrador') => {\n deleteCookie(getNombreCookie(tipo), { domain: configs.cookieDominio })\n}\n\n/**\n * Retorna la url completa, apuntando al endpoind en restify o fastify\n */\nexport const getApiEndpoint = (\n endpoint: string,\n queries?: Record<string, string>\n) => {\n const url = new URL(\n endpoint,\n endpoint.includes('v4') ? configs.hostFastify : configs.hostRestify\n )\n let queryString = ''\n if (queries) queryString = new URLSearchParams(queries).toString()\n return url.href + (queryString ? '?' + queryString : '')\n}\n\nexport const hashear = (mensaje: string) => {\n let hash = 0,\n i,\n chr\n if (mensaje.length === 0) return hash\n for (i = 0; i < mensaje.length; i++) {\n chr = mensaje.charCodeAt(i)\n hash = (hash << 5) - hash + chr\n hash |= 0\n }\n return hash\n}\n","import dayjs from 'dayjs'\nimport { getAxios } from './utils'\nimport { Rule } from 'antd/lib/form'\nimport { debounce } from 'ts-debounce'\nimport type { ValidatorRule } from 'rc-field-form/lib/interface'\n\nconst tiposValidadorUnico = {\n empresa: async (_: never, value: string) => {\n if (!value) return\n const axios = getAxios('restify')\n const { data } = await axios.get('/v3/auth/business/' + value)\n if (data) throw new Error('La empresa ya se encuentra registrada')\n },\n}\n\nconst $reglas = {\n required: (message = 'El campo es requerido'): Rule => ({\n required: true,\n message,\n }),\n min: (\n length: number,\n message = `Debe tener mínimo ${length.toString()} caracteres`\n ): Rule => ({\n min: length,\n message,\n }),\n max: (\n length: number,\n message = `Debe tener máximo ${length.toString()} caracteres`\n ): Rule => ({\n max: length,\n message,\n }),\n email: (message = 'El correo electrónico no es válido'): Rule => ({\n type: 'email',\n message,\n }),\n pattern: (\n patron: RegExp,\n message = 'No cumple el formato requerido'\n ): Rule => ({ pattern: patron, message }),\n unico: (tipo: keyof typeof tiposValidadorUnico): ValidatorRule => ({\n validator: debounce(tiposValidadorUnico[tipo], 300) as never,\n }),\n correos: (): ValidatorRule => ({\n validator: async (_, value: string[] = []) => {\n if (value.some((item) => !item.includes('@')))\n throw new Error('Alguno de los correos no es válido')\n },\n }),\n diasDiferencia: (\n dias: number,\n mensaje = 'La fecha ingresada no es válido'\n ): ValidatorRule => ({\n validator: async (_, value: dayjs.Dayjs) => {\n const diferencia = dayjs(value)\n .startOf('day')\n .diff(dayjs().startOf('day'), 'day')\n if (dias < 0 ? diferencia < dias : diferencia > dias)\n throw new Error(mensaje)\n },\n }),\n}\n\nexport default $reglas\n","import dayjs, { Dayjs } from 'dayjs'\n\nconst defaultLocale = 'es-EC'\n\nconst $filtros = {\n currency(value?: number | string, arg = 2): string {\n if (!value) {\n value = 0\n }\n return new Intl.NumberFormat(defaultLocale, {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: arg,\n }).format(typeof value === 'number' ? value : parseFloat(value))\n },\n date(value: string | Dayjs, format = 'DD/MM/YYYY'): string {\n return dayjs(value).format(format)\n },\n completeDate(value: string | Dayjs): string {\n return dayjs(value).format('DD/MM/YYYY HH:mm:ss')\n },\n month(value: string | Dayjs): string {\n return dayjs(value).format('MM/YYYY')\n },\n percent(value?: number | string, arg = 2): string {\n value ||= 0\n return new Intl.NumberFormat(defaultLocale, {\n style: 'percent',\n minimumFractionDigits: arg,\n }).format(typeof value === 'number' ? value : parseFloat(value))\n },\n}\n\nexport default $filtros\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim.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 e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from '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';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\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();\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 constructor = arg && arg.constructor;\n const isDate = constructor == Date;\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && constructor != RegExp) {\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 (constructor == Array) {\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 (constructor == OBJECT) {\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\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\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 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 || 'Deno' in window;\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\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\nconst FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nvar events = {\n __proto__: null,\n ERROR_REVALIDATE_EVENT: ERROR_REVALIDATE_EVENT,\n FOCUS_EVENT: FOCUS_EVENT,\n MUTATE_EVENT: MUTATE_EVENT,\n RECONNECT_EVENT: RECONNECT_EVENT\n};\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](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 = {};\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = {};\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 {},\n {},\n {},\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, FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, 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 = (currentData, newData)=>stableHash(currentData) == stableHash(newData);\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\nconst INFINITE_PREFIX = '$inf$';\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 { INFINITE_PREFIX, IS_REACT_LEGACY, IS_SERVER, OBJECT, SWRConfig, SWRGlobalState, UNDEFINED, cache, compare, createCacheHelper, defaultConfig, defaultConfigOptions, getTimestamp, hasRequestAnimationFrame, initCache, internalMutate, isDocumentDefined, isFunction, isPromiseLike, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, mutate, noop, normalize, preload, preset, rAF, events as revalidateEvents, serialize, slowConnection, stableHash, subscribeCallback, useIsomorphicLayoutEffect, useSWRConfig, withArgs, withMiddleware };\n","import 'client-only';\nimport ReactExports, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { OBJECT, SWRConfig, defaultConfig, withArgs, SWRGlobalState, serialize, createCacheHelper, isUndefined, getTimestamp, UNDEFINED, isFunction, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects, withMiddleware } from 'swr/_internal';\n\n/// <reference types=\"react/experimental\" />\nconst use = ReactExports.use || ((promise)=>{\n if (promise.status === 'pending') {\n throw promise;\n } else if (promise.status === 'fulfilled') {\n return promise.value;\n } else if (promise.status === 'rejected') {\n throw promise.reason;\n } else {\n promise.status = 'pending';\n promise.then((v)=>{\n promise.status = 'fulfilled';\n promise.value = v;\n }, (e)=>{\n promise.status = 'rejected';\n promise.reason = e;\n });\n throw promise;\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(_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 const fallback = isUndefined(fallbackData) ? 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(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(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n if (!isUndefined(revalidateIfStale)) return revalidateIfStale;\n return true;\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(cachedData) ? 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(cachedData) ? 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(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !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 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 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 = isUndefined(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = 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 = 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(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(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 [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;\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(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(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(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, WITH_DEDUPE);\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n let nextFocusRevalidatedAt = 0;\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(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(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(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any initial data. 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(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (isUndefined(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!isUndefined(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n return {\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};\nOBJECT.defineProperty(SWRConfig, '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 <div>failed to load</div>\n * if (isLoading) return <div>loading...</div>\n * return <div>hello {data.name}!</div>\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\nconst immutable = (useSWRNext)=>(key, fetcher, config)=>{\n // Always override all revalidate options.\n config.revalidateOnFocus = false;\n config.revalidateIfStale = false;\n config.revalidateOnReconnect = false;\n return useSWRNext(key, fetcher, config);\n };\nconst useSWRImmutable = withMiddleware(useSWR, immutable);\n\nexport { useSWRImmutable as default, immutable };\n","import { $reglas } from '../libs'\nimport { FC, useState } from 'react'\nimport type { Params } from '../types'\nimport { Form, FormItemProps } from 'antd'\nimport useSeekerTypes, { Tipos } from './Seeker.utils'\n\ninterface SeekerProps {\n // formModelItemProps: { type: Object, default: () => ({}) },\n /**\n * Sirve para retornar el valor del formulario.\n */\n name: string | number | (number | string)[]\n /**\n * Label a mostrar.\n */\n label?: string\n /**\n * Oculta el label\n */\n hideLabel?: boolean\n /**\n * Tipo de recurso que se quiere buscar.\n */\n type?: Tipos\n /**\n * Indica si el input es requerido.\n */\n required?: boolean\n /**\n * Desactiva el input.\n */\n disabled?: boolean\n /**\n * Oculta el nombre del recurso cuando este haya sido seleccionado.\n */\n hideMessage?: boolean\n /**\n * Indica que se debe validar o no el `value`\n */\n llenarCuandoTipea?: boolean\n /**\n * Reemplaza el `params` que será proporcionado al axios para hacer\n * consultas mas personalizadas.\n */\n params?: Params\n /**\n * Indica si se debe mostrar la opción para poder crear recursos desde el\n * autocomplete.\n */\n canCreate?: boolean\n\n allowClear?: boolean\n // /**\n // * Indica si se puede realizar una búsqueda mas personalizada de los\n // * recursos.\n // */\n // canSearch: { type: Boolean, default: false },\n // /**\n // * Configuraciones para el autocompletar en el caso que no se encuentre\n // * dentro de las opciones por defecto.\n // */\n // configs: { type: Object, default: () => undefined },\n\n /**\n * Este objeto hará que se habilité el botón para poder crear recurso. Una\n * vez que se cree el recurso esta variable debe volver a `undefined` para\n * que se deje de mostrar el botón.\n */\n cuerpoCrear?: any\n\n /**\n * Las clases que se aplicaran al `Form.Field`\n */\n classNameFormItem?: FormItemProps['className']\n\n /**\n * Si este campo es proporcionado en la carga inicial entonces se carga\n * automáticamente al seeker.\n */\n initialValue?: any\n\n onSelect?: (data: any) => void\n}\n\nconst Seeker: FC<SeekerProps> = (props) => {\n const [textoExtra, setTextoExtra] = useState('')\n const tipoDefecto = useSeekerTypes({\n type: props.type,\n defaultOptions: undefined,\n })\n\n return tipoDefecto ? (\n <Form.Item\n name={props.name}\n label={!props.hideLabel ? props.label || tipoDefecto.label : undefined}\n extra={!props.hideMessage ? textoExtra : undefined}\n rules={props.required ? [$reglas.required()] : [{}]}\n className={props.classNameFormItem}\n >\n {/* <Buscador\n type={props.type}\n allowClear={props.allowClear}\n canCreate={props.canCreate}\n values={tipoDefecto}\n textoExtra={textoExtra}\n params={props.params}\n onSetTextoExtra={setTextoExtra}\n onSelect={props.onSelect}\n llenarCuandoTipea={props.llenarCuandoTipea}\n disabled={props.disabled}\n cuerpoCrear={props.cuerpoCrear}\n initialValue={props.initialValue}\n /> */}\n </Form.Item>\n ) : null\n}\n\nexport default Seeker\n","// import './globals.css'\nimport esEs from 'antd/locale/es_ES'\nimport { App, ConfigProvider, Layout } from 'antd'\nimport { CSSProperties, FC, ReactNode, useEffect, useState } from 'react'\n\nconst colorPrimary = '#F34D24'\nconst layoutBodyBg = '#FFFFFF'\n\nconst TemaPrincipal: FC<{\n children: ReactNode\n className?: string\n style?: CSSProperties\n}> = (props) => {\n const [isClient, setIsClient] = useState(false)\n\n useEffect(() => {\n setIsClient(true)\n }, [])\n\n return !isClient ? null : (\n <ConfigProvider\n locale={esEs}\n theme={{\n token: {\n colorPrimary,\n colorLink: colorPrimary,\n // fontFamily:\n // 'BlinkMacSystemFont, -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"Helvetica\", \"Arial\", sans-serif',\n colorTextDisabled: '#00000080',\n },\n components: {\n Layout: { bodyBg: layoutBodyBg, headerBg: layoutBodyBg },\n },\n }}\n >\n <App>\n <Layout\n className={props.className + ' min-h-screen'}\n style={props.style}\n hasSider\n >\n {props.children}\n </Layout>\n </App>\n </ConfigProvider>\n )\n}\n\nexport default TemaPrincipal\n","import Link from 'next/link'\nimport { Button, Layout } from 'antd'\nimport React, { FC, ReactNode, useState } from 'react'\nimport { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons'\n\nconst LayoutBase: FC<{\n children: ReactNode\n sidebar?: {\n title: {\n label: ReactNode\n href: string\n }\n menu?: ReactNode\n }\n navbar?: { title: string; options?: ReactNode }\n footer?: ReactNode\n}> = (props) => {\n const [collapsed, setCollapsed] = useState(true)\n const [responsive, setResponsive] = useState(false)\n\n return (\n <>\n {!props.sidebar ? null : (\n <Layout.Sider\n style={{\n overflow: 'auto',\n height: '100vh',\n position: 'fixed',\n insetInlineStart: 0,\n top: 0,\n bottom: 0,\n scrollbarWidth: 'thin',\n scrollbarColor: 'unset',\n zIndex: 10,\n }}\n breakpoint=\"md\"\n collapsedWidth={0}\n trigger={null}\n collapsed={collapsed}\n collapsible\n width=\"230px\"\n onBreakpoint={(broken) => {\n setCollapsed(broken)\n setResponsive(broken)\n }}\n >\n <Link href={props.sidebar.title.href}>\n <div className=\"flex justify-center items-center h-16 text-lg text-white font-bold\">\n <div>{props.sidebar.title.label}</div>\n </div>\n </Link>\n {props.sidebar.menu}\n </Layout.Sider>\n )}\n <Layout\n className={!responsive && !collapsed ? 'ml-[230px]' : 'ml-0'}\n onClick={\n !collapsed && responsive\n ? (e) => {\n e.stopPropagation()\n e.preventDefault()\n setCollapsed(true)\n }\n : undefined\n }\n >\n {!props.navbar ? null : (\n <Layout.Header className=\"border-b top-0 !z-[2] sticky !px-4\">\n <div className=\"flex justify-between items-center h-full\">\n {props.navbar.title ? (\n <div>\n <Button\n type=\"text\"\n icon={\n collapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />\n }\n onClick={() => setCollapsed(!collapsed)}\n >\n {props.navbar.title}\n </Button>\n </div>\n ) : (\n <div />\n )}\n {props.navbar.options ? (\n <div>{props.navbar.options}</div>\n ) : (\n <div />\n )}\n </div>\n </Layout.Header>\n )}\n <Layout.Content className=\"m-4 md:m-8 xl:m-16\">\n {props.children}\n </Layout.Content>\n {!props.footer ? null : (\n <Layout.Footer className=\"!text-gray-500\">\n {props.footer}\n </Layout.Footer>\n )}\n </Layout>\n </>\n )\n}\n\nexport default LayoutBase\n","import useSWR from 'swr'\nimport { getAxios } from '../libs'\nimport type { Option, Options, Params } from '../types'\nimport { MutableRefObject, ReactNode, useRef } from 'react'\n\nexport type Tipos = 'clients'\n\nexport interface SeekerType {\n /**\n * El label que se va a mostrar en el FormItem.\n */\n label: string\n\n /**\n * El endpoint del cual debe traer los datos.\n */\n endpoint: string\n\n /**\n * Los parámetros que se madarán al axios para traer los datos.\n */\n params?: Params\n\n /**\n * El campo que se mostrará en el input del autocomplete.\n */\n field: string\n\n /**\n * El placeholder que se visualizará en el input del autocomplete.\n */\n placeholder: string\n\n /**\n * Indica que el endpoint tiene opciones y que debe ser descargadas.\n */\n withOptions?: boolean\n\n title: (record: any) => string\n subtitle?: (record: any) => ReactNode\n formItemTexto?: (record: any) => string\n\n /**\n * El path al identificador único. Por defecto: `_id`.\n */\n customDocumentId?: string\n\n /**\n * Si es `true` se busca uno por query string, caso contratio agregando el id\n * del documento: {api}/{id-recurso}.\n */\n buscarPorQueryString?: boolean\n\n // modal?: {\n // itemNoEncontrado?: string\n // title: string\n // getTexto: (doc: any) => string\n // componente: (props: {\n // ref: RefObject<{ insertar: VistaInsertar }>\n // }) => ReactNode\n // }\n\n /**\n * Está función altera el valor con el cual se realizará una búsqueda por `q`.\n * Ideal para hacer uso de expresiones regulares como `^`.\n */\n preBusquedaQ?: (value: string) => string\n}\n\nconst getTipoPreestablecido = (props: {\n opciones?: MutableRefObject<Options | undefined>\n tipo: Tipos\n}): SeekerType => {\n // const getIdType = (d: string) =>\n // getDescripcionNombre(props.opciones.current.TiposDeIdentificacion, d)\n\n // const getBank = (d: string) =>\n // getDescripcionNombre(props.opciones.current.Banks, d)\n\n switch (props.tipo) {\n // case 'cuentas-contables':\n // return {\n // label: 'Cuenta contable',\n // endpoint: '/v3/contability/chart-of-accounts',\n // params: {\n // fields: 'codigo descripcion tipoDeCuenta auxiliar signo',\n // tipoDeCuenta: 'D',\n // },\n // field: 'codigo',\n // placeholder: 'Ingrese el código de la cuenta',\n // title: (d: AccountingAccount) => d.codigo,\n // subtitle: (d: AccountingAccount) => d.descripcion,\n // preBusquedaQ: (value) => (/^\\d+\\./.test(value) ? '^' + value : value),\n // }\n // case 'claves-de-unidad-ec':\n // return {\n // label: 'Clave SAT para unidad',\n // endpoint: '/v3/utils/enums/claves-unidad-ec',\n // field: 'id',\n // placeholder: 'Ingrese la unidad',\n // title: (d: any) => d.id,\n // subtitle: (d: any) => d.description,\n // customDocumentId: 'id',\n // }\n // case 'cost-centers':\n // return {\n // label: 'Centro de costos',\n // endpoint: '/v3/contability/cost-centers',\n // params: { fields: 'code description' },\n // field: 'code',\n // placeholder: 'Ingrese el código del centro de costos',\n // title: (d: CostCenter) => d.code,\n // subtitle: (d: CostCenter) => d.description,\n // }\n // case 'products':\n // return {\n // label: 'Producto',\n // endpoint: '/v3/production/products',\n // params: {\n // fields:\n // 'code description price total claveUnidad precioFinal descuento auxiliarCode',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingrese el código del producto',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'Producto no existe en tu inventario ¿Deseas registrarlo?',\n // title: 'Productos',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // tipoPorDefecto=\"producto\"\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'products-services':\n // return {\n // label: 'Producto',\n // endpoint: '/v3/production/products-services',\n // params: {\n // fields: 'code description price total iva',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingrese el código del producto',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string; type: string; total: 0 }) => {\n // let message: ReactNode = d.description\n // if (d.type === 'product') {\n // message = (\n // <>\n // Producto: {message}\n // <div className=\"text-sm\">En stock: {d.total}</div>\n // </>\n // )\n // } else {\n // message = `Servicio: ${message}`\n // }\n // return message\n // },\n // formItemTexto: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'El producto o servicio no se encuentra registrado ¿Desea registrarlo?',\n // title: 'Productos y servicios',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'services':\n // return {\n // label: 'Servicio',\n // endpoint: '/v3/production/services',\n // params: {\n // fields: 'code description price total iva',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingresar el código del servicio',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'Servicio no existe en el inventario ¿Desea registrarlo?',\n // title: 'Servicios',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // tipoPorDefecto=\"servicio\"\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'providers':\n // return {\n // withOptions: true,\n // label: 'Proveedor',\n // endpoint: '/v3/administrative/providers',\n // params: {\n // fields: 'idType id name diasPlazo phone email',\n // estado: 'activo',\n // },\n // field: 'id',\n // placeholder: 'Ingrese la identificación del proveedor',\n // title: (d: { idType: string; id: string }) => {\n // return `${getIdType(d.idType)} · ${d.id}`\n // },\n // subtitle: (d: { name: string }) => d.name,\n // modal: {\n // title: 'Proveedores',\n // getTexto: (doc) => doc.name,\n // componente: (props) => (\n // <FormularioPersonas\n // ref={props.ref}\n // type=\"provider\"\n // ocultarBotones\n // />\n // ),\n // },\n // }\n // case 'categorias':\n // return {\n // label: 'Categoria',\n // endpoint: '/v3/production/categorias',\n // params: {\n // fields: `nombre descripcion`,\n // },\n // field: 'nombre',\n // placeholder: 'Ingrese el nombre',\n // title: (record) => {\n // return record.data?.length === 1\n // ? decodeURIComponent(record.data[0].nombre)\n // : decodeURIComponent(record.nombre)\n // },\n // customDocumentId: 'nombre',\n // buscarPorQueryString: true,\n // }\n // case 'ordenes-trabajo':\n // return {\n // label: 'Orden de trabajo',\n // endpoint: '/v3/production/ordenes-trabajo',\n // params: {\n // fields: 'secuencial fecha',\n // estado: `{$in}pendiente,proceso`,\n // },\n // field: 'secuencial',\n // placeholder: 'Ingresar un secuencial',\n // title: (record) => {\n // return `Orden de trabajo #${record.secuencial}`\n // },\n // customDocumentId: '_id',\n // }\n // /**\n // * Tesoreria\n // */\n // case 'bankaccounts':\n // return {\n // withOptions: true,\n // label: 'Cuenta bancaria',\n // endpoint: '/v4/treasury/cuentas-bancarias',\n // params: { fields: 'number bank total', status: 'enabled' },\n // field: 'number',\n // placeholder: 'Ingrese la cuenta de banco',\n // title: (d: any) => d.number,\n // subtitle: (d: any) =>\n // `${getBank(d.bank)} - Saldo: ${$filtros.currency(d.total)}`,\n // }\n // case 'boxes':\n // return {\n // label: 'Caja',\n // endpoint: '/v4/treasury/cajas',\n // params: { fields: 'name total', status: 'enabled' },\n // field: 'name',\n // placeholder: 'Ingresar el nombre de la caja',\n // title: (d: { name: string }) => d.name,\n // subtitle: (d: { total: number }) =>\n // `Saldo: ${$filtros.currency(d.total)}`,\n // }\n\n // case 'creditcards':\n // return {\n // withOptions: true,\n // label: 'Tarjeta de crédito',\n // endpoint: '/v4/treasury/tarjetas-credito',\n // params: { fields: 'number cardholder bank total', status: 'enabled' },\n // field: 'number',\n // placeholder: 'Ingrese el número de tarjeta de crédito',\n // title: (d: any) => d.number,\n // subtitle: (d: any) =>\n // `${d.cardholder} · ${getBank(d.bank)} · Saldo: ${$filtros.currency(\n // d.total\n // )}`,\n // }\n case 'clients':\n default:\n return {\n withOptions: true,\n label: 'Cliente',\n endpoint: '/v3/administrative/clients',\n params: {\n fields: 'idType id name phone email address',\n estado: 'activo',\n },\n field: 'id',\n placeholder: 'Ingresar la identificación del cliente',\n title: (d: { id: string }) => `${d.id}`,\n subtitle: (d: { name: string }) => d.name,\n preBusquedaQ: (value = '') => {\n value = value.trim()\n return /^\\d+/.test(value) ? '^' + value : value\n },\n // modal: {\n // title: 'Clientes',\n // getTexto: (doc) => doc.name,\n // componente: (props) => (\n // <FormularioPersonas ref={props.ref} type=\"client\" ocultarBotones />\n // ),\n // },\n }\n // case 'sellers': {\n // return {\n // withOptions: true,\n // label: 'Vendedor',\n // endpoint: '/v3/administrative/sellers',\n // params: { fields: 'name', estado: 'activo' },\n // field: 'name',\n // placeholder: 'Ingrese el nombre del vendedor',\n // title: (d: any) => d.name,\n // }\n // }\n // case 'transporters':\n // return {\n // withOptions: true,\n // label: 'Transportista',\n // endpoint: '/v3/administrative/transporters',\n // params: {\n // fields: 'idType id name email phone address licensePlate',\n // estado: 'activo',\n // },\n // field: 'id',\n // placeholder: 'Ingrese la identificación del transportista',\n // title: (d: any) => `${getIdType(d.idType)} · ${d.id}`,\n // subtitle: (d: any) => d.name,\n // modal: {\n // title: 'Trasportista',\n // getTexto: (doc) => doc.name,\n // componente: (props) => {\n // return (\n // <FormularioPersonas\n // ref={props.ref}\n // type=\"transporter\"\n // ocultarBotones\n // />\n // )\n // },\n // },\n // }\n // case 'empleados':\n // return {\n // withOptions: true,\n // label: 'Empleado',\n // endpoint: '/v3/payroll/employees',\n // params: { fields: 'names surnames documentNumber documentType' },\n // field: 'documentNumber',\n // placeholder: 'Ingresar el empleado',\n // title: (d: { documentType: string; documentNumber: string }) => {\n // const { DocumentTypePerson } = props.opciones.current\n // return `${getDescripcionNombre(\n // DocumentTypePerson,\n // d.documentType\n // )} · ${d.documentNumber}`\n // },\n // subtitle: (d: any) => `${d.names} ${d.surnames}`,\n // }\n // case 'bodegas':\n // return {\n // label: 'Bodegas',\n // endpoint: '/v3/production/bodegas',\n // params: { fields: 'code name description color' },\n // field: 'code',\n // placeholder: 'Ingrese la bodega',\n // title: (d: any) => d.code,\n // subtitle: (d: any) => d.name,\n // }\n // case 'pettycashs':\n // return {\n // label: 'Caja chica',\n // endpoint: '/v4/treasury/cajas-chicas',\n // params: { fields: 'name bank total', status: 'enabled' },\n // field: 'name',\n // placeholder: 'Ingrese el nombre de caja chica',\n // title: (d: any) => d.name,\n // subtitle: (d: any) => `Saldo: ${$filtros?.currency(d.total)}`,\n // }\n }\n}\n\nexport default function useSeekerTypes(args: {\n type?: Tipos\n defaultOptions?: Options\n}): SeekerType | null {\n const opciones = useRef(args.defaultOptions)\n const preestablecido = getTipoPreestablecido({\n opciones,\n tipo: args.type || 'clients',\n })\n if (!preestablecido) return null\n const axios = getAxios(preestablecido.endpoint)\n const { data: optionsRequest } = useSWR(\n preestablecido.withOptions && !args.defaultOptions\n ? preestablecido.endpoint + '/get-options'\n : null,\n async (key) => {\n const { data } = await axios.get<Record<string, Option[]>>(key)\n return data\n },\n { revalidateOnFocus: false }\n )\n if (optionsRequest) opciones.current = optionsRequest\n return preestablecido\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Link from 'next/link'\nimport useSWRImmutable from 'swr/immutable'\n\nimport { Router, useRouter } from 'next/router'\nimport { useEffect, useRef, useState } from 'react'\n// import { useContextoEmpresa } from '~/contexts/Empresa'\nimport { QuestionCircleOutlined } from '@ant-design/icons'\nimport { Button, Form, Space, Skeleton, FormProps } from 'antd'\n// import {\n// getMensajeError,\n// hashear,\n// useUtils,\n// } from '~/assets/utils'\nimport type { Options, Params } from '../../types'\n// import { Automatizaciones } from './automatizaciones'\nimport { getAxios, useUtils, hashear } from '../utils'\nimport useConfirmacionSalida from './confirmacion-salida'\n\nconst useVistaInsertar = <T,>(args: {\n endpoint: string\n params?: Params\n data: Partial<T>\n automatizacionPara?: any // Automatizaciones\n formatearDataInicial?: (data: T) => Promise<void> | void\n registroId?: string\n soloParaInsertar?: boolean\n recuperacionEmergencia?: boolean\n sinOptions?: boolean\n onMounted?: () => Promise<void>\n}) => {\n const axios = getAxios(args.endpoint)\n const [form] = Form.useForm<T>()\n const [isLoading, setIsLoading] = useState(false)\n const [isReady, setIsReady] = useState(false)\n const router = useRouter()\n const { showError, message } = useUtils()\n const preventor = useConfirmacionSalida(router.asPath)\n const tipoEmision = useRef<'emitir' | 'borrador' | 'lote'>('emitir')\n\n const objectId = useRef<string | undefined>(router.query.id as string)\n\n const { data: options = {} } = useSWRImmutable(\n args.sinOptions ? null : args.endpoint + '/get-options',\n async (key) => (await axios.get<Options>(key)).data,\n { revalidateOnFocus: false }\n )\n\n useEffect(() => {\n objectId.current = args.registroId\n if (!objectId.current) {\n objectId.current = args.soloParaInsertar\n ? undefined\n : (router.query.id as string)\n }\n }, [args?.registroId, args.soloParaInsertar])\n\n /**\n * La ruta principal a la cual se debe redireccionar una vez se haya\n * completado la operación.\n */\n const mainroute = router.asPath.replace(/\\/(insert|[\\w]*\\/edit$)/g, '') || '/'\n // const previsualziacion = usePrevisualizacion({\n // automatizacionPara: args.automatizacionPara,\n // })\n\n const getDocumentoEditar = async () => {\n let desdeEmergencia = false\n let datos = await preventor.obtenerDataEmergencia()\n if (datos) {\n objectId.current = datos._id\n desdeEmergencia = true\n } else if (objectId.current) {\n ;({ data: datos } = await axios.get(\n `${args.endpoint}/${objectId.current}`,\n { params: args.params }\n ))\n }\n if (datos) {\n await args.formatearDataInicial?.(datos)\n form.setFieldsValue(datos)\n }\n return desdeEmergencia ? args.data : datos || args.data\n }\n\n const onSubmit = async (\n values: T,\n opciones: {\n /**\n * Indica si al guardar el documento debe redireccionar a la vista\n * principal\n */\n noRedirect?: boolean\n /**\n * Un endpoint personalizado para realizar la operación\n */\n endpoint?: string\n /**\n * Params personalizados\n */\n params?: Params\n /**\n * No lanza el error desde el hook, mas bien lanza un throw con el error\n */\n noShowError?: boolean\n } = {}\n ) => {\n if (isLoading === true) return\n setIsLoading(true)\n preventor.limpiar()\n const endpoint = opciones.endpoint || args.endpoint\n const params = opciones.params || undefined\n try {\n let result: T\n if (objectId.current) {\n ;({ data: result } = await axios.put(\n endpoint + '/' + objectId.current,\n values,\n { params }\n ))\n } else {\n ;({ data: result } = await axios.post(endpoint, values, { params }))\n }\n // previsualziacion.abrirAsientoContable((result as any)?.accountingVoucher)\n if (opciones.noRedirect !== true) {\n message.success('Guardado correctamente')\n router.push(mainroute)\n } else {\n setIsLoading(false)\n }\n return result\n } catch (err) {\n setIsLoading(false)\n if (opciones.noShowError) throw err\n showError(err)\n const voucherid = (err as any)?.response?.data?.comprobante\n const erroresSRI = [\n \"Hostname/IP does not match certificate's altnames:\",\n 'El servidor del SRI no ha respondido en un largo tiempo por lo que se ha cerrado la conexión.',\n ]\n const content = 'pruebas' // await getMensajeError(err)\n if (erroresSRI.some((item) => content?.includes(item))) {\n router.push(mainroute)\n } else if (\n !opciones.noRedirect &&\n voucherid &&\n voucherid !== objectId.current\n ) {\n objectId.current = voucherid\n router.push(mainroute + '/' + voucherid + '/edit')\n } else {\n preventor.reanudar()\n }\n }\n }\n\n const onMainRouter = () => router.push(mainroute)\n\n const BotonesPorDefecto = (\n <Space>\n <Button type=\"primary\" loading={isLoading} onClick={() => form.submit()}>\n Guardar\n </Button>\n <Link href={mainroute}>\n <Button>Cancelar</Button>\n </Link>\n </Space>\n )\n\n const ModoCarga = (\n <>\n <Skeleton paragraph={{ rows: 3, width: '100%' }} className=\"mb-4\" />\n <Skeleton paragraph={{ rows: 4, width: '100%' }} className=\"mb-4\" />\n <div className=\"grid grid-cols-2 gap-4 mb-4\">\n <Skeleton paragraph={{ rows: 4, width: '100%' }} />\n <Skeleton paragraph={{ rows: 4, width: '100%' }} />\n </div>\n <Space>\n <Skeleton.Button />\n <Skeleton.Button />\n </Space>\n </>\n )\n\n const onMensajeValidacion = () =>\n message.warning('Revisa los errores del formulario')\n\n const getOption = (name: string, value: string) =>\n options[name]?.find((x) => x.id === value)?.description || ''\n\n const formProps: FormProps = {\n form,\n autoComplete: 'off',\n initialValues: args.data,\n onFinish: onSubmit,\n layout: 'vertical',\n onFinishFailed: onMensajeValidacion,\n }\n\n useEffect(() => {\n if (!args.recuperacionEmergencia) return\n const timer = setInterval(() => {\n if (!isReady) return\n const values = form.getFieldsValue()\n preventor.cambiarDatosFormulario(values)\n }, 1000)\n return () => clearInterval(timer)\n }, [isReady])\n\n // mounted\n useEffect(() => {\n const timer = setTimeout(() => {\n if (args.soloParaInsertar) return\n getDocumentoEditar()\n .then((data) =>\n Promise.all([preventor.cambiarHashInicial(data), args.onMounted?.()])\n )\n .then(() => setIsReady(true))\n }, 200)\n return () => clearTimeout(timer)\n }, [router.query.id])\n\n return {\n form,\n router,\n options,\n tipoEmision,\n objectId: objectId.current,\n mainroute,\n isLoading,\n isReady,\n data: args.data,\n endpoint: args.endpoint,\n onSubmit,\n onMainRouter,\n setIsLoading,\n preventor,\n ModoCarga,\n BotonesPorDefecto,\n onMensajeValidacion,\n getOption,\n formProps,\n }\n}\n\nexport type VistaInsertar<T = unknown> = ReturnType<typeof useVistaInsertar<T>>\n\nexport default useVistaInsertar\n","import { Router } from 'next/router'\nimport { hashear, useUtils } from '../utils'\nimport { useEffect, useRef, useState } from 'react'\nimport { QuestionCircleOutlined } from '@ant-design/icons'\n\n/**\n * Identifica los datos iniciales de una página y verifica si estos han cambiado\n * para prevenir cerrar la página o impedir que navegue. También guarda\n * periódicamente los datos para que en el caso de un cierre se pueda restaurar.\n */\nconst useConfirmacionSalida = (key: string) => {\n const empezar = useRef(false)\n const { modal } = useUtils()\n const hashInicial = useRef(0)\n const [hashFormulario, setHashFormulario] = useState(0)\n\n const navegarHanlder = () => {\n const confirmarSalir = window.confirm('¿Estás seguro que quieres salir?')\n if (!confirmarSalir) {\n throw 'Route Canceled'\n }\n limpiar()\n localStorage.removeItem(key)\n }\n\n const refrescarHandler = (event: BeforeUnloadEvent) => {\n event.preventDefault()\n }\n\n const reanudar = () => {\n empezar.current = true\n }\n\n const limpiar = () => {\n empezar.current = false\n window.removeEventListener('beforeunload', refrescarHandler)\n Router.events.off('routeChangeStart', navegarHanlder)\n localStorage.removeItem(key)\n setHashFormulario(0)\n }\n\n const obtenerDataEmergencia = async (): Promise<any> => {\n const datosGuardados = localStorage.getItem(key)\n const datos = await new Promise<never | undefined>((resolve) => {\n if (!datosGuardados) return resolve(undefined)\n modal.confirm({\n title: 'Existen datos guardados',\n icon: <QuestionCircleOutlined />,\n content:\n 'Hubo un cierre inesperado pero los datos fueron guardados temporalmente ¿Deseas recuperarlos?',\n onOk: () => resolve(JSON.parse(datosGuardados)),\n onCancel: () => resolve(undefined),\n })\n })\n empezar.current = true\n return datos\n }\n\n useEffect(() => {\n if (!empezar.current) return\n const prevenir = hashInicial.current !== hashFormulario\n if (prevenir) {\n window.addEventListener('beforeunload', refrescarHandler)\n Router.events.on('routeChangeStart', navegarHanlder)\n }\n return () => {\n window.removeEventListener('beforeunload', refrescarHandler)\n Router.events.off('routeChangeStart', navegarHanlder)\n }\n }, [hashInicial.current, hashFormulario])\n\n return {\n cambiarHashInicial: (values: unknown) => {\n const hash = hashear(JSON.stringify(values))\n setHashFormulario(hash)\n hashInicial.current = hash\n },\n\n cambiarDatosFormulario: (values: unknown) => {\n if (!empezar.current || hashInicial.current === 0) return\n const cadenaTexto = JSON.stringify(values)\n const nuevoHash = hashear(cadenaTexto)\n setHashFormulario(nuevoHash)\n if (nuevoHash === hashInicial.current) localStorage.removeItem(key)\n else localStorage.setItem(key, cadenaTexto)\n },\n\n limpiar,\n reanudar,\n obtenerDataEmergencia,\n }\n}\n\nexport default useConfirmacionSalida\n","import { TableProps } from 'antd'\nimport { AxiosInstance } from 'axios'\nimport { useRouter } from 'next/router'\nimport type { Options } from '../../types'\nimport useSWR, { useSWRConfig } from 'swr'\nimport useSWRImmutable from 'swr/immutable'\nimport { getAxios, useUtils, getApiEndpoint } from '../utils'\n\ninterface ApiResponse<T> {\n data: T[]\n total: number\n page: number\n}\n\ntype Option = {\n id: string\n description: string\n value?: number\n stringValue?: string\n show?: boolean\n}\n\ninterface Params {\n q?: string\n fields?: string\n sort?: string\n page?: string\n total?: string\n $getAllFields?: 'true'\n [key: string]: string | number | undefined\n}\n\nconst useVistaPrincipal = <T,>(args: {\n endpoint: string\n params?: Params\n sinOptions?: true\n optionsPath?: string\n}) => {\n const axios: AxiosInstance = getAxios(args.endpoint)\n\n const router = useRouter()\n const { showError } = useUtils()\n const { mutate } = useSWRConfig()\n\n const { data: options = {} } = useSWRImmutable(\n args.sinOptions\n ? null\n : (args.optionsPath || args.endpoint) + '/get-options',\n async (key) => (await axios.get<Options>(key)).data\n )\n const searchParamsKey = new URLSearchParams({\n ...args.params,\n ...router.query,\n } as Record<string, string>).toString()\n const swrKey = args.endpoint + (searchParamsKey ? '?' + searchParamsKey : '')\n const {\n data: response,\n error,\n isLoading,\n } = useSWR(router.isReady ? swrKey : null, async (key) => {\n const { data } = await axios.get<ApiResponse<T>>(key)\n return data\n })\n const data = response?.data || []\n const totalDocumentos = response?.total || 0\n const searchParams = new URLSearchParams(\n router.query as Record<string, string>\n )\n const page = searchParams.get('page')\n const currentPage = page ? parseInt(page) : 1\n const limit = searchParams.get('limit')\n const pageSize = limit ? parseInt(limit) : 20\n\n const tableProps: TableProps<T> = {\n loading: isLoading,\n dataSource: data,\n rowKey: '_id',\n bordered: true,\n pagination: {\n current: currentPage,\n defaultPageSize: pageSize,\n total: totalDocumentos,\n },\n onChange: async (pagination, filters, sorter) => {\n const paramsInicial = searchParams.toString()\n const params = new URLSearchParams(paramsInicial)\n\n // paginación\n if (pagination.current !== currentPage) {\n const newPage = pagination.current!.toString()\n if (newPage === '1') params.delete('page')\n else params.set('page', newPage)\n }\n\n // tamaño de página\n if (pagination.pageSize !== pageSize) {\n const newPageSize = pagination.pageSize!.toString()\n if (newPageSize === '20') params.delete('limit')\n else params.set('limit', newPageSize)\n }\n\n // ordenar\n if (Array.isArray(sorter)) {\n // TODO: Implementar multiple orden\n } else {\n if (sorter.order === 'ascend') {\n params.set('sort', sorter.field as string)\n } else if (sorter.order === 'descend') {\n params.set('sort', '-' + sorter.field)\n } else {\n params.delete('sort')\n }\n }\n\n // // filtros\n // const keysPersonalizadas: string[] = []\n // for (const property in filters) {\n // const filtro = filters[property]\n // if (filtro && filtro!.length !== 0) {\n // const esPersonalizado = filtro.some((item) =>\n // Object.entries(args.filtros || {}).some(\n // ([, opcion]) => opcion.value === item\n // )\n // )\n // if (esPersonalizado) {\n // keysPersonalizadas.push(property)\n // filtro.forEach((item) => {\n // const urlParams = new URLSearchParams(item as string)\n // urlParams.forEach((value, key) => {\n // query[key] = value\n // })\n // })\n // } else if (\n // filtro.length === 1 &&\n // /\\{\\$(gte?|lte?)\\}/.test(filtro[0] as string)\n // ) {\n // query[property] = filtro[0] as string\n // } else {\n // query[property] = '{$in}' + filtro!.join(',')\n // }\n // } else {\n // delete query[property]\n // }\n // }\n\n // if (args.filtros)\n // for (const key in args.filtros) {\n // if (keysPersonalizadas.includes(key)) continue\n // const urlParams = new URLSearchParams(args.filtros[key].value)\n // urlParams.forEach((value, key) => {\n // if (query[key] === value) delete query[key]\n // })\n // }\n if (paramsInicial !== params.toString()) {\n router.push({ query: Object.fromEntries(params) })\n }\n },\n }\n\n const init = () => {\n mutate(swrKey)\n }\n\n const getOpt = (name: string, value: string) => {\n const enumerate = options[name]?.find((x) => x.id === value)\n return enumerate ? enumerate.description : ''\n }\n\n const remove = async (id: string | { endpoint: string }) => {\n try {\n await axios.delete(\n typeof id === 'string' ? args.endpoint + '/' + id : id.endpoint\n )\n init()\n } catch (err) {\n showError(err)\n }\n }\n\n const cancel = async (id: string | { endpoint: string }) => {\n try {\n await axios.delete(\n typeof id === 'string'\n ? args.endpoint + '/' + id + '/cancel'\n : id.endpoint\n )\n init()\n } catch (err) {\n showError(err)\n }\n }\n\n return {\n data,\n isLoading,\n error,\n options,\n endpoint: args.endpoint,\n endpointWithHost: getApiEndpoint(args.endpoint),\n mainroute: router.route,\n tableProps,\n\n init,\n getOpt,\n remove,\n cancel,\n }\n}\n\nexport default useVistaPrincipal\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","__spreadArray","to","from","pack","ar","l","Array","slice","concat","SuppressedError","process","env","NODE_ENV","jsxRuntimeModule","exports","require$$0","k","for","m","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","key","__self","__source","q","c","a","b","d","h","defaultProps","$$typeof","props","_owner","current","reactJsxRuntime_production_min","jsx","jsxs","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ReactSharedInternals","error","format","_len2","args","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","argsWithFormat","map","item","String","unshift","Function","console","printWarning","REACT_MODULE_REFERENCE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","getContextName","displayName","getComponentNameFromType","tag","name","_context","outerType","innerType","wrapperName","functionName","getWrappedName","render","outerName","lazyComponent","payload","_payload","init","_init","x","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","undefined","Error","match","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","get","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","log","info","warn","group","groupCollapsed","groupEnd","configurable","enumerable","writable","defineProperties","disableLogs","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","_frame","replace","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","isReactComponent","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","_source","setExtraStackFrame","isArrayImpl","isArray","testStringCoercion","checkKeyStringCoercion","willCoercionThrow","toStringTag","constructor","typeName","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","ReactElement","self","_store","freeze","jsxDEV","config","maybeKey","propName","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","hasValidRef","stateNode","componentName","warnIfStringRefCannotBeAutoConverted","warnAboutAccessingKey","defineKeyPropWarningGetter","warnAboutAccessingRef","defineRefPropWarningGetter","propTypesMisspellWarningShown","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","isValidElement","object","getDeclarationErrorAddendum","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","child","iteratorFn","maybeIterable","maybeIterator","getIteratorFn","entries","validatePropTypes","propTypes","typeSpecs","values","location","has","bind","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","getModuleId","isValidElementType","typeString","keys","children","filter","beforeExample","join","fragment","validateFragmentProps","reactJsxRuntime_development","Fragment","Navegador","paths","_jsx","Breadcrumb","items","_a","title","Link","href","configs","hostFastify","hostRestify","userTokenName","adminTokenName","cookieDominio","getMensajeError","_e","response","data","_f","Blob","_b","JSON","parse","text","_g","_d","tipo","useUtils","App","useApp","modal","notification","showError","content","width","_jsxs","_Fragment","cuerpoAdicional","okType","getNombreCookie","getAxios","endpoint","baseURL","axios","axiosBase","create","defaults","headers","common","Authorization","getCookie","domain","getApiEndpoint","queries","url","URL","queryString","URLSearchParams","toString","hashear","mensaje","hash","charCodeAt","tiposValidadorUnico","empresa","$reglas","required","min","max","email","pattern","patron","unico","validator","debounce","correos","_1","args_1","some","diasDiferencia","dias","diferencia","dayjs","startOf","diff","defaultLocale","$filtros","currency","arg","Intl","NumberFormat","minimumFractionDigits","parseFloat","date","completeDate","month","percent","shimModule","is","useState","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","u","window","inst","useSyncExternalStoreShim_production_min","useSyncExternalStore","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","objectIs","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","useSyncExternalStoreShim_development","registerInternalModuleStop","noop","UNDEFINED","OBJECT","isUndefined","isFunction","mergeObjects","table","counter","stableHash","isDate","Date","index","RegExp","toJSON","stringify","sort","SWRGlobalState","EMPTY_CACHE","INITIAL_CACHE","STR_UNDEFINED","isWindowDefined","isDocumentDefined","createCacheHelper","cache","state","prev","online","onWindowEvent","offWindowEvent","addEventListener","removeEventListener","preset","isOnline","isVisible","visibilityState","defaultConfigOptions","initFocus","callback","initReconnect","onOnline","onOffline","IS_REACT_LEGACY","useId","IS_SERVER","rAF","setTimeout","useIsomorphicLayoutEffect","navigatorConnection","navigator","connection","slowConnection","effectiveType","saveData","serialize","__timestamp","getTimestamp","events","async","internalMutate","_key","_data","_opts","options","populateCache","throwOnError","revalidate","rollbackOnErrorOption","rollbackOnError","optimisticData","keyFilter","matchedKeys","it","test","_k","all","mutateByKey","EVENT_REVALIDATORS","MUTATION","FETCH","PRELOAD","startRevalidate","revalidators","beforeMutationTs","hasOptimisticData","displayedData","currentData","_c","committedData","catch","populateCachedData","revalidateAllKeys","mutate","provider","opts","unmount","subscriptions","subs","splice","indexOf","setter","initProvider","releaseFocus","releaseReconnect","delete","initCache","defaultConfig","onLoadingSlow","onSuccess","onError","onErrorRetry","__","maxRetryCount","errorRetryCount","currentRetryCount","retryCount","timeout","Math","random","errorRetryInterval","onDiscarded","revalidateOnFocus","revalidateOnReconnect","revalidateIfStale","shouldRetryOnError","focusThrottleInterval","dedupingInterval","loadingTimeout","compare","newData","isPaused","fallback","SWRConfigContext","createContext","enableDevtools","__SWR_DEVTOOLS_USE__","use","normalize","BUILT_IN_MIDDLEWARE","useSWRNext","key_","fetcher_","startsWith","req","__SWR_DEVTOOLS_REACT__","ReactExports","promise","status","reason","WITH_DEDUPE","dedupe","useSWR","hook","fetcher","suspense","fallbackData","revalidateOnMount","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","fnArg","initialMountedRef","useRef","unmountedRef","keyRef","fetcherRef","configRef","getConfig","isActive","getCache","setCache","subscribeCache","getInitialCache","stateDependencies","isEqual","returnedData","useMemo","shouldStartRequest","getSelectedCache","snapshot","isValidating","isLoading","cachedData","initialData","clientSnapshot","serverSnapshot","memorizedSnapshot","newSnapshot","cached","useCallback","isInitialMount","hasRevalidator","laggyDataRef","shouldDoInitialRevalidation","defaultValidatingState","revalidateOpts","currentFetcher","startAt","loading","shouldStartNewRequest","callbackSafeguard","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","mutationInfo","cacheData","currentConfig","revalidateEvents","boundMutate","softRevalidate","nextFocusRevalidatedAt","unsubEvents","callbacks","keyedRevalidators","subscribeCallback","now","timer","interval","execute","clearTimeout","fallbackConfig","useContext","_config","u1","f1","u2","f2","mergeConfigs","middleware","useSWRImmutable","uses","withMiddleware","colorPrimary","layoutBodyBg","newPathname","defaultInsert","getOwnPropertySymbols","propertyIsEnumerable","__rest","router","useRouter","pathname","qQuery","setQQuery","searchParams","query","onSearch","params","fromEntries","segundaColumna","className","ocultarBuscador","Input","Search","placeholder","onChange","event","target","onPressEnter","endsWith","Button","onRefrescar","icon","ReloadOutlined","onClick","isReady","Typography","Title","subtitle","column","collapsed","setCollapsed","responsive","setResponsive","sidebar","Layout","Sider","overflow","height","position","insetInlineStart","top","bottom","scrollbarWidth","scrollbarColor","zIndex","breakpoint","collapsedWidth","trigger","collapsible","onBreakpoint","broken","menu","stopPropagation","preventDefault","navbar","Header","MenuUnfoldOutlined","MenuFoldOutlined","Content","footer","Footer","textoExtra","tipoDefecto","_this","opciones","defaultOptions","preestablecido","withOptions","fields","estado","field","id","preBusquedaQ","optionsRequest","useSeekerTypes","Form","Item","hideLabel","extra","hideMessage","rules","classNameFormItem","isClient","setIsClient","ConfigProvider","locale","esEs","theme","token","colorLink","colorTextDisabled","components","bodyBg","headerBg","hasSider","override","setCookie","usuario","maxAge","deleteCookie","form","useForm","setIsLoading","setIsReady","preventor","empezar","hashInicial","hashFormulario","setHashFormulario","navegarHanlder","confirm","limpiar","localStorage","removeItem","refrescarHandler","Router","off","on","cambiarHashInicial","cambiarDatosFormulario","cadenaTexto","nuevoHash","setItem","reanudar","obtenerDataEmergencia","datosGuardados","getItem","QuestionCircleOutlined","onOk","onCancel","datos","useConfirmacionSalida","asPath","tipoEmision","objectId","sinOptions","registroId","soloParaInsertar","mainroute","onSubmit","values_1","put","post","noRedirect","success","noShowError","err_1","voucherid","comprobante","content_1","BotonesPorDefecto","Space","submit","ModoCarga","Skeleton","paragraph","rows","onMensajeValidacion","warning","formProps","autoComplete","initialValues","onFinish","layout","onFinishFailed","recuperacionEmergencia","setInterval","getFieldsValue","clearInterval","desdeEmergencia","_id","formatearDataInicial","setFieldsValue","onMounted","onMainRouter","getOption","find","description","useSWRConfig","optionsPath","searchParamsKey","swrKey","totalDocumentos","total","page","currentPage","parseInt","limit","pageSize","tableProps","dataSource","rowKey","bordered","pagination","defaultPageSize","filters","sorter","paramsInicial","newPage","newPageSize","order","endpointWithHost","route","getOpt","enumerate","remove","cancel","err_2"],"mappings":"+QAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,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GAAA,mEAEnD,6BAAA,CAAA,EAAM0U,EAAM6L,OACI,iBAAPmN,EACH3nB,EAAKyO,SAAW,IAAMkZ,EAAK,UAC3BA,EAAGlZ,yBAHTrC,EAAA3Q,OAKA2G,mCAEA4L,EAAUmiB,kCAmBhB","x_google_ignoreList":[0,1,2,3,4,9,10,11,12,13]}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@4.20.0_tslib@2.6.3_typescript@5.5.4/node_modules/tslib/tslib.es6.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../src/components/Header.tsx","../../src/libs/utils.tsx","../../src/libs/reglas.ts","../../src/libs/filtros.ts","../../src/libs/contexts/Empresa.tsx","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/shim/index.js","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../node_modules/.pnpm/swr@2.2.5_react@18.3.1/node_modules/swr/dist/_internal/index.mjs","../../node_modules/.pnpm/swr@2.2.5_react@18.3.1/node_modules/swr/dist/immutable/index.mjs","../../src/components/Seeker.tsx","../../src/components/TemaPrincipal.tsx","../../src/components/IdentificadorPersona.tsx","../../src/components/LayoutBase.tsx","../../src/components/Seeker.utils.tsx","../../src/libs/hooks/vista-insertar.tsx","../../src/libs/hooks/confirmacion-salida.tsx","../../src/libs/hooks/vista-principal.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\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]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\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-jsx-runtime.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","import Link from 'next/link'\nimport { useRouter } from 'next/router'\nimport { ReloadOutlined } from '@ant-design/icons'\nimport { ReactNode, FC, useState, useRef, useEffect } from 'react'\nimport { Input, Button, Breadcrumb, Typography } from 'antd'\n\ntype BreadcrumbPath = {\n to?: string\n label: string\n}\n\nconst Navegador: FC<{ paths?: BreadcrumbPath[] }> = (props) =>\n !props.paths ? null : (\n <Breadcrumb\n items={props.paths.map(({ to, label }) => ({\n title: to ? <Link href={to}>{label}</Link> : label,\n }))}\n />\n )\n\nconst Header: FC<{\n title: ReactNode\n subtitle?: ReactNode\n /**\n * Oculta la segunda columna o cambia la segunda columna\n */\n column?: ReactNode | null\n /**\n * Cambiar el boton de insertar, lo sustituye o lo oculta si es null\n */\n defaultInsert?: ReactNode | null\n /**\n * Indica que el botón de refrescar debe ponerse en modo carga.\n */\n loading?: boolean\n /**\n * Los paths para mostrar en Breadcrumb\n */\n paths?: BreadcrumbPath[]\n children?: ReactNode\n ocultarBuscador?: boolean\n /**\n * Evento para refrescar los datos.\n */\n onRefrescar?: () => void\n}> = ({ defaultInsert = false, loading: isLoading = false, ...props }) => {\n const router = useRouter()\n const pathname = router.pathname\n const [qQuery, setQQuery] = useState('')\n const searchParams = new URLSearchParams(\n router.query as Record<string, string>\n )\n\n const getUrlInsert = () => {\n let newPathname = pathname\n if (newPathname.endsWith('/')) newPathname = newPathname.slice(0, -1)\n return newPathname + '/insert'\n }\n\n const onSearch = () => {\n const params = new URLSearchParams(searchParams.toString())\n const antiguoString = params.get('q') || ''\n if (antiguoString === qQuery) return\n if (!qQuery) params.delete('q')\n else params.set('q', qQuery)\n params.delete('page')\n router.push({ query: Object.fromEntries(params) })\n }\n\n const segundaColumna = (\n <div className=\"flex w-full md:w-auto flex-wrap md:flex-nowrap gap-2 justify-end\">\n {props.ocultarBuscador !== true ? (\n <Input.Search\n value={qQuery}\n placeholder=\"Ingresar búsqueda\"\n onChange={(event) => setQQuery(event.target.value || '')}\n onSearch={onSearch}\n onPressEnter={onSearch}\n />\n ) : null}\n\n {defaultInsert !== null\n ? defaultInsert || (\n <Link href={getUrlInsert()}>\n <Button type=\"primary\">Insertar</Button>\n </Link>\n )\n : null}\n\n {props.onRefrescar ? (\n <div>\n <Button\n loading={isLoading}\n title=\"Refrescar datos\"\n icon={<ReloadOutlined />}\n onClick={props.onRefrescar}\n />\n </div>\n ) : null}\n\n {props.children}\n\n {/* <SearchVideos /> */}\n </div>\n )\n\n useEffect(() => {\n if (!router.isReady) return\n setQQuery(searchParams.get('q') || '')\n }, [router.isReady])\n\n return (\n <div className=\"flex md:flex-row flex-col md:items-end items-start justify-between gap-6 mb-6\">\n <div>\n <Navegador paths={props.paths} />\n <Typography.Title className=\"!mb-0 mt-4\">\n {props.title}\n </Typography.Title>\n {props.subtitle && (\n <Typography.Title\n level={3}\n type=\"secondary\"\n className=\"!font-normal !m-0\"\n >\n {props.subtitle}\n </Typography.Title>\n )}\n </div>\n {props.column !== null ? props.column || segundaColumna : null}\n </div>\n )\n}\n\nexport default Header\n","import { App } from 'antd'\nimport axiosBase from 'axios'\nimport { ReactNode } from 'react'\nimport type { NextRouter } from 'next/router'\nimport { deleteCookie, getCookie, setCookie } from 'cookies-next'\n\nlet configs = {\n hostUtils: 'https://utils.upconta.com',\n hostFastify: '',\n hostRestify: '',\n userTokenName: '',\n adminTokenName: '',\n cookieDominio: '',\n cookiePath: undefined as string | undefined,\n}\n\nexport const configurarUtils = (override: Partial<typeof configs>) => {\n configs = { ...configs, ...override }\n}\n\n/**\n * Identifica el error, de axios o de la aplicación, y retorna el mensaje\n * @param err El error lanzado\n * @returns El mensaje de error\n */\nconst getMensajeError = async (\n err: any\n): Promise<{\n message: string\n tipo: 'error'\n}> => {\n const result: string | Blob = err.response?.data\n ? err.response.data?.message || err.response.data\n : err.message\n if (result instanceof Blob) {\n try {\n const error = JSON.parse(await result.text())\n return error.message\n } catch {\n return { message: await result.text(), tipo: 'error' }\n }\n }\n return { message: result, tipo: 'error' }\n}\n\n/**\n * Hook con utilidades para el funcionamiento de la aplicación\n */\nexport const useUtils = () => {\n const { modal, message, notification } = App.useApp()\n\n const showError = async (\n err: Error | unknown,\n args?: { title?: string; cuerpoAdicional: ReactNode }\n ) => {\n const content = await getMensajeError(err)\n modal[content.tipo]({\n title: args?.title || 'Proceso fallido',\n width: 450,\n content: (\n <>\n {content.message}\n {args?.cuerpoAdicional}\n </>\n ),\n okType: 'danger',\n })\n }\n\n return {\n showError,\n modal,\n message,\n notification,\n }\n}\n\nconst getNombreCookie = (tipo?: 'usuario' | 'administrador') => {\n switch (tipo) {\n case 'administrador':\n return configs.adminTokenName\n default:\n return configs.userTokenName\n }\n}\n\n/**\n * Obtiene la instancia de axios correspondiente al servidor de fastify o\n * restify\n * @param endpoint El servidor al que se desea conectar\n * @param args Argumentos adicionales\n * @param args.tipo El tipo de usuario al que debe dar acceso, por defecto\n * usuario\n * @returns La instancia de axios\n */\nexport const getAxios = (\n endpoint: 'fastify' | 'restify' | 'utils' | string,\n args?: {\n tipo: 'usuario' | 'administrador'\n }\n) => {\n let baseURL = ''\n if (!endpoint || endpoint === 'fastify' || endpoint.includes('/v4'))\n baseURL = configs.hostFastify\n else if (endpoint === 'utils') baseURL = configs.hostUtils\n else baseURL = configs.hostRestify\n const axios = axiosBase.create({ baseURL })\n if (endpoint !== 'utils') {\n axios.defaults.headers.common.Authorization = getCookie(\n getNombreCookie(args?.tipo),\n { domain: configs.cookieDominio, path: configs.cookiePath }\n ) as string\n }\n return axios\n}\n\nexport const crearToken = (\n token: string,\n args: { usuario: 'usuario' | 'administrador' }\n) => {\n setCookie(getNombreCookie(args.usuario), token, {\n domain: configs.cookieDominio,\n maxAge: 60 * 60 * 24 * 7,\n path: configs.cookiePath,\n })\n}\n\nexport const destruirToken = (tipo: 'usuario' | 'administrador') => {\n deleteCookie(getNombreCookie(tipo), {\n domain: configs.cookieDominio,\n path: configs.cookiePath,\n })\n}\n\n/**\n * Retorna la url completa, apuntando al endpoind en restify o fastify\n */\nexport const getApiEndpoint = (\n endpoint: string,\n queries?: Record<string, string>\n) => {\n const url = new URL(\n endpoint,\n endpoint.includes('v4') ? configs.hostFastify : configs.hostRestify\n )\n let queryString = ''\n if (queries) queryString = new URLSearchParams(queries).toString()\n return url.href + (queryString ? '?' + queryString : '')\n}\n\nexport const hashear = (mensaje: string) => {\n let hash = 0,\n i,\n chr\n if (mensaje.length === 0) return hash\n for (i = 0; i < mensaje.length; i++) {\n chr = mensaje.charCodeAt(i)\n hash = (hash << 5) - hash + chr\n hash |= 0\n }\n return hash\n}\n\nexport const redireccionarLogin = (\n router: NextRouter,\n pathLogin = '/login'\n) => {\n const esOtroDominio = pathLogin.includes('://')\n const url = new URL(\n esOtroDominio ? pathLogin : window.location.origin + pathLogin\n )\n if (router.asPath !== '/' || esOtroDominio)\n url.searchParams.append(\n 'redirect',\n esOtroDominio ? window.location.href : router.asPath\n )\n if (esOtroDominio) {\n window.location.href = url.href\n } else {\n router.push(url.pathname + url.search)\n }\n}\n","import dayjs from 'dayjs'\nimport { getAxios } from './utils'\nimport { Rule } from 'antd/lib/form'\nimport { debounce } from 'ts-debounce'\nimport type { ValidatorRule } from 'rc-field-form/lib/interface'\n\nconst tiposValidadorUnico = {\n empresa: async (_: never, value: string) => {\n if (!value) return\n const axios = getAxios('restify')\n const { data } = await axios.get('/v3/auth/business/' + value)\n if (data) throw new Error('La empresa ya se encuentra registrada')\n },\n}\n\nconst $reglas = {\n required: (message = 'El campo es requerido'): Rule => ({\n required: true,\n message,\n }),\n min: (\n length: number,\n message = `Debe tener mínimo ${length.toString()} caracteres`\n ): Rule => ({\n min: length,\n message,\n }),\n max: (\n length: number,\n message = `Debe tener máximo ${length.toString()} caracteres`\n ): Rule => ({\n max: length,\n message,\n }),\n email: (message = 'El correo electrónico no es válido'): Rule => ({\n type: 'email',\n message,\n }),\n pattern: (\n patron: RegExp,\n message = 'No cumple el formato requerido'\n ): Rule => ({ pattern: patron, message }),\n unico: (tipo: keyof typeof tiposValidadorUnico): ValidatorRule => ({\n validator: debounce(tiposValidadorUnico[tipo], 300) as never,\n }),\n correos: (): ValidatorRule => ({\n validator: async (_, value: string[] = []) => {\n if (value.some((item) => !item.includes('@')))\n throw new Error('Alguno de los correos no es válido')\n },\n }),\n diasDiferencia: (\n dias: number,\n mensaje = 'La fecha ingresada no es válido'\n ): ValidatorRule => ({\n validator: async (_, value: dayjs.Dayjs) => {\n const diferencia = dayjs(value)\n .startOf('day')\n .diff(dayjs().startOf('day'), 'day')\n if (dias < 0 ? diferencia < dias : diferencia > dias)\n throw new Error(mensaje)\n },\n }),\n}\n\nexport default $reglas\n","import dayjs, { Dayjs } from 'dayjs'\n\nconst defaultLocale = 'es-EC'\n\nconst $filtros = {\n currency(value?: number | string, arg = 2): string {\n if (!value) {\n value = 0\n }\n return new Intl.NumberFormat(defaultLocale, {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: arg,\n }).format(typeof value === 'number' ? value : parseFloat(value))\n },\n date(value: string | Dayjs, format = 'DD/MM/YYYY'): string {\n return dayjs(value).format(format)\n },\n completeDate(value: string | Dayjs): string {\n return dayjs(value).format('DD/MM/YYYY HH:mm:ss')\n },\n month(value: string | Dayjs): string {\n return dayjs(value).format('MM/YYYY')\n },\n percent(value?: number | string, arg = 2): string {\n value ||= 0\n return new Intl.NumberFormat(defaultLocale, {\n style: 'percent',\n minimumFractionDigits: arg,\n }).format(typeof value === 'number' ? value : parseFloat(value))\n },\n}\n\nexport default $filtros\n","import { useRouter } from 'next/router'\nimport { getAxios, redireccionarLogin } from '../utils'\nimport {\n createContext,\n FC,\n ReactNode,\n useContext,\n useEffect,\n useState,\n} from 'react'\n\ninterface BusinessInfo {\n _id: string\n business: string\n businessModules: Array<{\n activationDate: string\n key: string\n operationDate: string\n }>\n configs: {\n monthsBlocked: string[]\n useTestEnviroment: boolean\n vouchers: {\n nDecimals: number\n }\n pac: {\n usuario?: string\n fechaContrato?: Date\n fechaContratoTest?: Date\n }\n // comprobantes: Comprobantes\n nDecimals: number\n }\n // configuraciones: BusinessConfig\n hasSignature: boolean\n createdAt: string\n modules: Array<{\n icon: string\n key: string\n label: string\n operationDate: string\n submodules: Array<{\n key?: string\n label: string\n permisos?: string\n items?: Array<{\n key: string\n label: string\n permisos: string\n }>\n }>\n }>\n ruc: string\n sessionEndDate: string\n sessionStartDate: string\n user: string\n userId: string\n userType: 'admin' | 'user'\n esAdmin: boolean\n accesoBloqueoMensual: boolean\n wooCommerce?: boolean\n}\n\ninterface Empresa {\n business: BusinessInfo\n nombreEmpresa: string\n nombreUsuario: string\n testEnviroment: boolean\n usuarioEsAdmin: boolean\n}\n\nconst EmpresaContext = createContext<Empresa>(null as never)\n\nexport function useContextoEmpresa() {\n return useContext(EmpresaContext)\n}\n\nconst obtenerDatosSesion = async () => {\n const axios = getAxios('restify')\n try {\n const [{ data }, { data: dataConfigs }] = await Promise.all([\n axios.get('/v3/auth/user'),\n axios.get('/v3/businesses/me/configurations', {\n params: { fields: 'comprobantes nDecimals invoice' },\n }),\n ])\n data.configuraciones = dataConfigs\n return data\n } catch (err) {\n return null\n }\n}\n\nconst ContextoEmpresa: FC<{ children: ReactNode; pathLogin?: string }> = (\n props\n) => {\n const router = useRouter()\n const [ready, setReady] = useState(false)\n\n const [business, setBusiness] = useState<BusinessInfo>()\n\n useEffect(() => {\n obtenerDatosSesion().then((data) => {\n if (data) {\n setReady(true)\n setBusiness(data)\n } else {\n redireccionarLogin(router, props.pathLogin)\n }\n })\n }, [])\n\n return ready ? (\n <EmpresaContext.Provider\n value={{\n business: business!,\n nombreEmpresa: business!.business,\n nombreUsuario: business!.user,\n testEnviroment: business!.configs.useTestEnviroment,\n usuarioEsAdmin: business!.userType === 'admin',\n }}\n >\n {props.children}\n </EmpresaContext.Provider>\n ) : (\n <div className=\"w-full h-screen flex items-center justify-center\">\n Cargando...\n </div>\n )\n}\n\nexport default ContextoEmpresa\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim.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 e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.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\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from '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';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\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();\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 constructor = arg && arg.constructor;\n const isDate = constructor == Date;\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && constructor != RegExp) {\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 (constructor == Array) {\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 (constructor == OBJECT) {\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\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\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 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 || 'Deno' in window;\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\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\nconst FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nvar events = {\n __proto__: null,\n ERROR_REVALIDATE_EVENT: ERROR_REVALIDATE_EVENT,\n FOCUS_EVENT: FOCUS_EVENT,\n MUTATE_EVENT: MUTATE_EVENT,\n RECONNECT_EVENT: RECONNECT_EVENT\n};\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](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 = {};\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = {};\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 {},\n {},\n {},\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, FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, 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 = (currentData, newData)=>stableHash(currentData) == stableHash(newData);\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\nconst INFINITE_PREFIX = '$inf$';\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 { INFINITE_PREFIX, IS_REACT_LEGACY, IS_SERVER, OBJECT, SWRConfig, SWRGlobalState, UNDEFINED, cache, compare, createCacheHelper, defaultConfig, defaultConfigOptions, getTimestamp, hasRequestAnimationFrame, initCache, internalMutate, isDocumentDefined, isFunction, isPromiseLike, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, mutate, noop, normalize, preload, preset, rAF, events as revalidateEvents, serialize, slowConnection, stableHash, subscribeCallback, useIsomorphicLayoutEffect, useSWRConfig, withArgs, withMiddleware };\n","import 'client-only';\nimport ReactExports, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { OBJECT, SWRConfig, defaultConfig, withArgs, SWRGlobalState, serialize, createCacheHelper, isUndefined, getTimestamp, UNDEFINED, isFunction, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects, withMiddleware } from 'swr/_internal';\n\n/// <reference types=\"react/experimental\" />\nconst use = ReactExports.use || ((promise)=>{\n if (promise.status === 'pending') {\n throw promise;\n } else if (promise.status === 'fulfilled') {\n return promise.value;\n } else if (promise.status === 'rejected') {\n throw promise.reason;\n } else {\n promise.status = 'pending';\n promise.then((v)=>{\n promise.status = 'fulfilled';\n promise.value = v;\n }, (e)=>{\n promise.status = 'rejected';\n promise.reason = e;\n });\n throw promise;\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(_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 const fallback = isUndefined(fallbackData) ? 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(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(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n if (!isUndefined(revalidateIfStale)) return revalidateIfStale;\n return true;\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(cachedData) ? 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(cachedData) ? 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(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !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 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 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 = isUndefined(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = 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 = 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(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(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 [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;\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(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(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(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, WITH_DEDUPE);\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n let nextFocusRevalidatedAt = 0;\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(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(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(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any initial data. 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(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (isUndefined(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!isUndefined(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n return {\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};\nOBJECT.defineProperty(SWRConfig, '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 <div>failed to load</div>\n * if (isLoading) return <div>loading...</div>\n * return <div>hello {data.name}!</div>\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\nconst immutable = (useSWRNext)=>(key, fetcher, config)=>{\n // Always override all revalidate options.\n config.revalidateOnFocus = false;\n config.revalidateIfStale = false;\n config.revalidateOnReconnect = false;\n return useSWRNext(key, fetcher, config);\n };\nconst useSWRImmutable = withMiddleware(useSWR, immutable);\n\nexport { useSWRImmutable as default, immutable };\n","import { $reglas } from '../libs'\nimport { FC, useState } from 'react'\nimport type { Params } from '../types'\nimport { Form, FormItemProps } from 'antd'\nimport useSeekerTypes, { Tipos } from './Seeker.utils'\n\ninterface SeekerProps {\n // formModelItemProps: { type: Object, default: () => ({}) },\n /**\n * Sirve para retornar el valor del formulario.\n */\n name: string | number | (number | string)[]\n /**\n * Label a mostrar.\n */\n label?: string\n /**\n * Oculta el label\n */\n hideLabel?: boolean\n /**\n * Tipo de recurso que se quiere buscar.\n */\n type?: Tipos\n /**\n * Indica si el input es requerido.\n */\n required?: boolean\n /**\n * Desactiva el input.\n */\n disabled?: boolean\n /**\n * Oculta el nombre del recurso cuando este haya sido seleccionado.\n */\n hideMessage?: boolean\n /**\n * Indica que se debe validar o no el `value`\n */\n llenarCuandoTipea?: boolean\n /**\n * Reemplaza el `params` que será proporcionado al axios para hacer\n * consultas mas personalizadas.\n */\n params?: Params\n /**\n * Indica si se debe mostrar la opción para poder crear recursos desde el\n * autocomplete.\n */\n canCreate?: boolean\n\n allowClear?: boolean\n // /**\n // * Indica si se puede realizar una búsqueda mas personalizada de los\n // * recursos.\n // */\n // canSearch: { type: Boolean, default: false },\n // /**\n // * Configuraciones para el autocompletar en el caso que no se encuentre\n // * dentro de las opciones por defecto.\n // */\n // configs: { type: Object, default: () => undefined },\n\n /**\n * Este objeto hará que se habilité el botón para poder crear recurso. Una\n * vez que se cree el recurso esta variable debe volver a `undefined` para\n * que se deje de mostrar el botón.\n */\n cuerpoCrear?: any\n\n /**\n * Las clases que se aplicaran al `Form.Field`\n */\n classNameFormItem?: FormItemProps['className']\n\n /**\n * Si este campo es proporcionado en la carga inicial entonces se carga\n * automáticamente al seeker.\n */\n initialValue?: any\n\n onSelect?: (data: any) => void\n}\n\nconst Seeker: FC<SeekerProps> = (props) => {\n const [textoExtra, setTextoExtra] = useState('')\n const tipoDefecto = useSeekerTypes({\n type: props.type,\n defaultOptions: undefined,\n })\n\n return tipoDefecto ? (\n <Form.Item\n name={props.name}\n label={!props.hideLabel ? props.label || tipoDefecto.label : undefined}\n extra={!props.hideMessage ? textoExtra : undefined}\n rules={props.required ? [$reglas.required()] : [{}]}\n className={props.classNameFormItem}\n >\n {/* <Buscador\n type={props.type}\n allowClear={props.allowClear}\n canCreate={props.canCreate}\n values={tipoDefecto}\n textoExtra={textoExtra}\n params={props.params}\n onSetTextoExtra={setTextoExtra}\n onSelect={props.onSelect}\n llenarCuandoTipea={props.llenarCuandoTipea}\n disabled={props.disabled}\n cuerpoCrear={props.cuerpoCrear}\n initialValue={props.initialValue}\n /> */}\n </Form.Item>\n ) : null\n}\n\nexport default Seeker\n","// import './globals.css'\nimport esEs from 'antd/locale/es_ES'\nimport { App, ConfigProvider, Layout } from 'antd'\nimport { CSSProperties, FC, ReactNode, useEffect, useState } from 'react'\n\nconst colorPrimary = '#F34D24'\nconst layoutBodyBg = '#FFFFFF'\n\nconst TemaPrincipal: FC<{\n children: ReactNode\n className?: string\n style?: CSSProperties\n}> = (props) => {\n const [isClient, setIsClient] = useState(false)\n\n useEffect(() => {\n setIsClient(true)\n }, [])\n\n return !isClient ? null : (\n <ConfigProvider\n locale={esEs}\n theme={{\n token: {\n colorPrimary,\n colorLink: colorPrimary,\n // fontFamily:\n // 'BlinkMacSystemFont, -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"Helvetica\", \"Arial\", sans-serif',\n colorTextDisabled: '#00000080',\n },\n components: {\n Layout: { bodyBg: layoutBodyBg, headerBg: layoutBodyBg },\n },\n }}\n >\n <App>\n <Layout\n className={props.className + ' min-h-screen'}\n style={props.style}\n hasSider\n >\n {props.children}\n </Layout>\n </App>\n </ConfigProvider>\n )\n}\n\nexport default TemaPrincipal\n","import { Rule } from 'antd/lib/form'\nimport { debounce } from 'ts-debounce'\nimport { AutoComplete, Form } from 'antd'\nimport { $reglas, getAxios } from '../libs'\nimport { FC, useMemo, useState } from 'react'\nimport { NamePath } from 'antd/es/form/interface'\nimport { DefaultOptionType } from 'antd/es/select'\n\nconst IdentificadorPersona: FC<{\n name: string | string[]\n dependencies?: string[]\n label?: string\n type: 'ruc' | 'ci' | 'other'\n rules?: Rule[]\n placeholder?: string\n disabled?: boolean\n hiddenLabel?: boolean\n className?: string\n /**\n * Si este campo está activado se realiza una búsqueda en el utils para\n * obtener el nombre del cliente.\n */\n campoNombre?: NamePath\n onChange?: (value: string) => void\n}> = (props) => {\n const form = Form.useFormInstance()\n const [opciones, setOpciones] = useState<DefaultOptionType[]>([])\n\n const validations = useMemo<{\n label: string\n placeholder: string\n max?: number\n rules?: Rule[]\n }>(() => {\n const rules = props.rules || []\n switch (props.type) {\n case 'ruc':\n return {\n label: 'RUC',\n placeholder: 'Ingresar el RUC',\n max: 13,\n rules: [\n ...rules,\n $reglas.pattern(\n /^[0-9]{13}$/,\n 'El ruc debe tener 13 caracteres numéricos'\n ),\n ],\n }\n case 'ci':\n return {\n label: 'Cédula',\n placeholder: 'Ingresar la cédula',\n max: 10,\n rules: [\n ...rules,\n $reglas.pattern(\n /^[0-9]{10}$/,\n 'La cédula debe tener 10 caracteres numéricos'\n ),\n ],\n }\n default:\n return {\n label: 'Nº identificación',\n placeholder: 'Ingresar el número de identificación',\n rules,\n }\n }\n }, [props.type])\n\n const onBuscarPersona = debounce(async (identificador: string) => {\n const axios = getAxios('utils')\n if (\n !props.campoNombre ||\n identificador.length < 6 ||\n !['ci', 'ruc'].includes(props.type)\n ) {\n if (opciones.length !== 0) setOpciones([])\n return\n }\n try {\n const { data } = await axios.get<\n Array<{\n identificador: string\n nombre: string\n nombreComercial?: string\n }>\n >('/clientes/buscar', {\n params: { identificador, tipo: props.type === 'ci' ? 'cedula' : 'ruc' },\n })\n setOpciones(\n data.map((item) => ({\n value: item.identificador,\n nombre: item.nombre,\n label: (\n <>\n <b>{item.identificador}</b>\n <br />\n {item.nombre}\n </>\n ),\n }))\n )\n } catch (err) {\n console.error(err)\n }\n }, 500)\n\n const seleccionarOpcion = (value: string, option: DefaultOptionType) => {\n form.setFieldValue(props.campoNombre!, option.nombre)\n }\n\n return (\n <Form.Item\n name={props.name}\n rules={validations.rules}\n normalize={(text: string) => text.trim().toUpperCase()}\n className={props.className}\n dependencies={props.dependencies}\n {...(props.hiddenLabel\n ? {}\n : { label: props.label || validations.label })}\n >\n <AutoComplete\n options={opciones}\n onSelect={seleccionarOpcion}\n onSearch={onBuscarPersona}\n placeholder={props.placeholder || validations.placeholder}\n maxLength={validations.max}\n disabled={props.disabled}\n onChange={(value) => props.onChange?.(value)}\n />\n </Form.Item>\n )\n}\n\nexport default IdentificadorPersona\n","import Link from 'next/link'\nimport { Button, Layout } from 'antd'\nimport React, { FC, ReactNode, useState } from 'react'\nimport { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons'\n\nconst LayoutBase: FC<{\n children: ReactNode\n sidebar?: {\n title: {\n label: ReactNode\n href: string\n }\n menu?: ReactNode\n }\n navbar?: { title: string; options?: ReactNode }\n footer?: ReactNode\n}> = (props) => {\n const [collapsed, setCollapsed] = useState(true)\n const [responsive, setResponsive] = useState(false)\n\n return (\n <>\n {!props.sidebar ? null : (\n <Layout.Sider\n style={{\n overflow: 'auto',\n height: '100vh',\n position: 'fixed',\n insetInlineStart: 0,\n top: 0,\n bottom: 0,\n scrollbarWidth: 'thin',\n scrollbarColor: 'unset',\n zIndex: 10,\n }}\n breakpoint=\"md\"\n collapsedWidth={0}\n trigger={null}\n collapsed={collapsed}\n collapsible\n width=\"230px\"\n onBreakpoint={(broken) => {\n setCollapsed(broken)\n setResponsive(broken)\n }}\n >\n <Link href={props.sidebar.title.href}>\n <div className=\"flex justify-center items-center h-16 text-lg text-white font-bold\">\n <div>{props.sidebar.title.label}</div>\n </div>\n </Link>\n {props.sidebar.menu}\n </Layout.Sider>\n )}\n <Layout\n className={!responsive && !collapsed ? 'ml-[230px]' : 'ml-0'}\n onClick={\n !collapsed && responsive\n ? (e) => {\n e.stopPropagation()\n e.preventDefault()\n setCollapsed(true)\n }\n : undefined\n }\n >\n {!props.navbar ? null : (\n <Layout.Header className=\"border-b top-0 !z-[2] sticky !px-4\">\n <div className=\"flex justify-between items-center h-full\">\n {props.navbar.title ? (\n <div>\n <Button\n type=\"text\"\n icon={\n collapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />\n }\n onClick={() => setCollapsed(!collapsed)}\n >\n {props.navbar.title}\n </Button>\n </div>\n ) : (\n <div />\n )}\n {props.navbar.options ? (\n <div>{props.navbar.options}</div>\n ) : (\n <div />\n )}\n </div>\n </Layout.Header>\n )}\n <Layout.Content className=\"m-4 md:m-8 xl:m-16\">\n {props.children}\n </Layout.Content>\n {!props.footer ? null : (\n <Layout.Footer className=\"!text-gray-500\">\n {props.footer}\n </Layout.Footer>\n )}\n </Layout>\n </>\n )\n}\n\nexport default LayoutBase\n","import useSWR from 'swr'\nimport { getAxios } from '../libs'\nimport type { Option, Options, Params } from '../types'\nimport { MutableRefObject, ReactNode, useRef } from 'react'\n\nexport type Tipos = 'clients'\n\nexport interface SeekerType {\n /**\n * El label que se va a mostrar en el FormItem.\n */\n label: string\n\n /**\n * El endpoint del cual debe traer los datos.\n */\n endpoint: string\n\n /**\n * Los parámetros que se madarán al axios para traer los datos.\n */\n params?: Params\n\n /**\n * El campo que se mostrará en el input del autocomplete.\n */\n field: string\n\n /**\n * El placeholder que se visualizará en el input del autocomplete.\n */\n placeholder: string\n\n /**\n * Indica que el endpoint tiene opciones y que debe ser descargadas.\n */\n withOptions?: boolean\n\n title: (record: any) => string\n subtitle?: (record: any) => ReactNode\n formItemTexto?: (record: any) => string\n\n /**\n * El path al identificador único. Por defecto: `_id`.\n */\n customDocumentId?: string\n\n /**\n * Si es `true` se busca uno por query string, caso contratio agregando el id\n * del documento: {api}/{id-recurso}.\n */\n buscarPorQueryString?: boolean\n\n // modal?: {\n // itemNoEncontrado?: string\n // title: string\n // getTexto: (doc: any) => string\n // componente: (props: {\n // ref: RefObject<{ insertar: VistaInsertar }>\n // }) => ReactNode\n // }\n\n /**\n * Está función altera el valor con el cual se realizará una búsqueda por `q`.\n * Ideal para hacer uso de expresiones regulares como `^`.\n */\n preBusquedaQ?: (value: string) => string\n}\n\nconst getTipoPreestablecido = (props: {\n opciones?: MutableRefObject<Options | undefined>\n tipo: Tipos\n}): SeekerType => {\n // const getIdType = (d: string) =>\n // getDescripcionNombre(props.opciones.current.TiposDeIdentificacion, d)\n\n // const getBank = (d: string) =>\n // getDescripcionNombre(props.opciones.current.Banks, d)\n\n switch (props.tipo) {\n // case 'cuentas-contables':\n // return {\n // label: 'Cuenta contable',\n // endpoint: '/v3/contability/chart-of-accounts',\n // params: {\n // fields: 'codigo descripcion tipoDeCuenta auxiliar signo',\n // tipoDeCuenta: 'D',\n // },\n // field: 'codigo',\n // placeholder: 'Ingrese el código de la cuenta',\n // title: (d: AccountingAccount) => d.codigo,\n // subtitle: (d: AccountingAccount) => d.descripcion,\n // preBusquedaQ: (value) => (/^\\d+\\./.test(value) ? '^' + value : value),\n // }\n // case 'claves-de-unidad-ec':\n // return {\n // label: 'Clave SAT para unidad',\n // endpoint: '/v3/utils/enums/claves-unidad-ec',\n // field: 'id',\n // placeholder: 'Ingrese la unidad',\n // title: (d: any) => d.id,\n // subtitle: (d: any) => d.description,\n // customDocumentId: 'id',\n // }\n // case 'cost-centers':\n // return {\n // label: 'Centro de costos',\n // endpoint: '/v3/contability/cost-centers',\n // params: { fields: 'code description' },\n // field: 'code',\n // placeholder: 'Ingrese el código del centro de costos',\n // title: (d: CostCenter) => d.code,\n // subtitle: (d: CostCenter) => d.description,\n // }\n // case 'products':\n // return {\n // label: 'Producto',\n // endpoint: '/v3/production/products',\n // params: {\n // fields:\n // 'code description price total claveUnidad precioFinal descuento auxiliarCode',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingrese el código del producto',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'Producto no existe en tu inventario ¿Deseas registrarlo?',\n // title: 'Productos',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // tipoPorDefecto=\"producto\"\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'products-services':\n // return {\n // label: 'Producto',\n // endpoint: '/v3/production/products-services',\n // params: {\n // fields: 'code description price total iva',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingrese el código del producto',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string; type: string; total: 0 }) => {\n // let message: ReactNode = d.description\n // if (d.type === 'product') {\n // message = (\n // <>\n // Producto: {message}\n // <div className=\"text-sm\">En stock: {d.total}</div>\n // </>\n // )\n // } else {\n // message = `Servicio: ${message}`\n // }\n // return message\n // },\n // formItemTexto: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'El producto o servicio no se encuentra registrado ¿Desea registrarlo?',\n // title: 'Productos y servicios',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'services':\n // return {\n // label: 'Servicio',\n // endpoint: '/v3/production/services',\n // params: {\n // fields: 'code description price total iva',\n // sort: 'code',\n // status: 'active',\n // },\n // field: 'code',\n // placeholder: 'Ingresar el código del servicio',\n // title: (d: { code: string }) => d.code,\n // subtitle: (d: { description: string }) => d.description,\n // modal: {\n // itemNoEncontrado:\n // 'Servicio no existe en el inventario ¿Desea registrarlo?',\n // title: 'Servicios',\n // getTexto: (doc) => doc.description,\n // componente: (props) => {\n // return (\n // <FormularioProductoServicio\n // ref={props.ref}\n // tipoPorDefecto=\"servicio\"\n // ocultarBotones\n // bordered={false}\n // />\n // )\n // },\n // },\n // }\n // case 'providers':\n // return {\n // withOptions: true,\n // label: 'Proveedor',\n // endpoint: '/v3/administrative/providers',\n // params: {\n // fields: 'idType id name diasPlazo phone email',\n // estado: 'activo',\n // },\n // field: 'id',\n // placeholder: 'Ingrese la identificación del proveedor',\n // title: (d: { idType: string; id: string }) => {\n // return `${getIdType(d.idType)} · ${d.id}`\n // },\n // subtitle: (d: { name: string }) => d.name,\n // modal: {\n // title: 'Proveedores',\n // getTexto: (doc) => doc.name,\n // componente: (props) => (\n // <FormularioPersonas\n // ref={props.ref}\n // type=\"provider\"\n // ocultarBotones\n // />\n // ),\n // },\n // }\n // case 'categorias':\n // return {\n // label: 'Categoria',\n // endpoint: '/v3/production/categorias',\n // params: {\n // fields: `nombre descripcion`,\n // },\n // field: 'nombre',\n // placeholder: 'Ingrese el nombre',\n // title: (record) => {\n // return record.data?.length === 1\n // ? decodeURIComponent(record.data[0].nombre)\n // : decodeURIComponent(record.nombre)\n // },\n // customDocumentId: 'nombre',\n // buscarPorQueryString: true,\n // }\n // case 'ordenes-trabajo':\n // return {\n // label: 'Orden de trabajo',\n // endpoint: '/v3/production/ordenes-trabajo',\n // params: {\n // fields: 'secuencial fecha',\n // estado: `{$in}pendiente,proceso`,\n // },\n // field: 'secuencial',\n // placeholder: 'Ingresar un secuencial',\n // title: (record) => {\n // return `Orden de trabajo #${record.secuencial}`\n // },\n // customDocumentId: '_id',\n // }\n // /**\n // * Tesoreria\n // */\n // case 'bankaccounts':\n // return {\n // withOptions: true,\n // label: 'Cuenta bancaria',\n // endpoint: '/v4/treasury/cuentas-bancarias',\n // params: { fields: 'number bank total', status: 'enabled' },\n // field: 'number',\n // placeholder: 'Ingrese la cuenta de banco',\n // title: (d: any) => d.number,\n // subtitle: (d: any) =>\n // `${getBank(d.bank)} - Saldo: ${$filtros.currency(d.total)}`,\n // }\n // case 'boxes':\n // return {\n // label: 'Caja',\n // endpoint: '/v4/treasury/cajas',\n // params: { fields: 'name total', status: 'enabled' },\n // field: 'name',\n // placeholder: 'Ingresar el nombre de la caja',\n // title: (d: { name: string }) => d.name,\n // subtitle: (d: { total: number }) =>\n // `Saldo: ${$filtros.currency(d.total)}`,\n // }\n\n // case 'creditcards':\n // return {\n // withOptions: true,\n // label: 'Tarjeta de crédito',\n // endpoint: '/v4/treasury/tarjetas-credito',\n // params: { fields: 'number cardholder bank total', status: 'enabled' },\n // field: 'number',\n // placeholder: 'Ingrese el número de tarjeta de crédito',\n // title: (d: any) => d.number,\n // subtitle: (d: any) =>\n // `${d.cardholder} · ${getBank(d.bank)} · Saldo: ${$filtros.currency(\n // d.total\n // )}`,\n // }\n case 'clients':\n default:\n return {\n withOptions: true,\n label: 'Cliente',\n endpoint: '/v3/administrative/clients',\n params: {\n fields: 'idType id name phone email address',\n estado: 'activo',\n },\n field: 'id',\n placeholder: 'Ingresar la identificación del cliente',\n title: (d: { id: string }) => `${d.id}`,\n subtitle: (d: { name: string }) => d.name,\n preBusquedaQ: (value = '') => {\n value = value.trim()\n return /^\\d+/.test(value) ? '^' + value : value\n },\n // modal: {\n // title: 'Clientes',\n // getTexto: (doc) => doc.name,\n // componente: (props) => (\n // <FormularioPersonas ref={props.ref} type=\"client\" ocultarBotones />\n // ),\n // },\n }\n // case 'sellers': {\n // return {\n // withOptions: true,\n // label: 'Vendedor',\n // endpoint: '/v3/administrative/sellers',\n // params: { fields: 'name', estado: 'activo' },\n // field: 'name',\n // placeholder: 'Ingrese el nombre del vendedor',\n // title: (d: any) => d.name,\n // }\n // }\n // case 'transporters':\n // return {\n // withOptions: true,\n // label: 'Transportista',\n // endpoint: '/v3/administrative/transporters',\n // params: {\n // fields: 'idType id name email phone address licensePlate',\n // estado: 'activo',\n // },\n // field: 'id',\n // placeholder: 'Ingrese la identificación del transportista',\n // title: (d: any) => `${getIdType(d.idType)} · ${d.id}`,\n // subtitle: (d: any) => d.name,\n // modal: {\n // title: 'Trasportista',\n // getTexto: (doc) => doc.name,\n // componente: (props) => {\n // return (\n // <FormularioPersonas\n // ref={props.ref}\n // type=\"transporter\"\n // ocultarBotones\n // />\n // )\n // },\n // },\n // }\n // case 'empleados':\n // return {\n // withOptions: true,\n // label: 'Empleado',\n // endpoint: '/v3/payroll/employees',\n // params: { fields: 'names surnames documentNumber documentType' },\n // field: 'documentNumber',\n // placeholder: 'Ingresar el empleado',\n // title: (d: { documentType: string; documentNumber: string }) => {\n // const { DocumentTypePerson } = props.opciones.current\n // return `${getDescripcionNombre(\n // DocumentTypePerson,\n // d.documentType\n // )} · ${d.documentNumber}`\n // },\n // subtitle: (d: any) => `${d.names} ${d.surnames}`,\n // }\n // case 'bodegas':\n // return {\n // label: 'Bodegas',\n // endpoint: '/v3/production/bodegas',\n // params: { fields: 'code name description color' },\n // field: 'code',\n // placeholder: 'Ingrese la bodega',\n // title: (d: any) => d.code,\n // subtitle: (d: any) => d.name,\n // }\n // case 'pettycashs':\n // return {\n // label: 'Caja chica',\n // endpoint: '/v4/treasury/cajas-chicas',\n // params: { fields: 'name bank total', status: 'enabled' },\n // field: 'name',\n // placeholder: 'Ingrese el nombre de caja chica',\n // title: (d: any) => d.name,\n // subtitle: (d: any) => `Saldo: ${$filtros?.currency(d.total)}`,\n // }\n }\n}\n\nexport default function useSeekerTypes(args: {\n type?: Tipos\n defaultOptions?: Options\n}): SeekerType | null {\n const opciones = useRef(args.defaultOptions)\n const preestablecido = getTipoPreestablecido({\n opciones,\n tipo: args.type || 'clients',\n })\n if (!preestablecido) return null\n const axios = getAxios(preestablecido.endpoint)\n const { data: optionsRequest } = useSWR(\n preestablecido.withOptions && !args.defaultOptions\n ? preestablecido.endpoint + '/get-options'\n : null,\n async (key) => {\n const { data } = await axios.get<Record<string, Option[]>>(key)\n return data\n },\n { revalidateOnFocus: false }\n )\n if (optionsRequest) opciones.current = optionsRequest\n return preestablecido\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Link from 'next/link'\nimport useSWRImmutable from 'swr/immutable'\n\nimport { Router, useRouter } from 'next/router'\nimport { useEffect, useRef, useState } from 'react'\n// import { useContextoEmpresa } from '~/contexts/Empresa'\nimport { QuestionCircleOutlined } from '@ant-design/icons'\nimport { Button, Form, Space, Skeleton, FormProps } from 'antd'\n// import {\n// getMensajeError,\n// hashear,\n// useUtils,\n// } from '~/assets/utils'\nimport type { Options, Params } from '../../types'\n// import { Automatizaciones } from './automatizaciones'\nimport { getAxios, useUtils, hashear } from '../utils'\nimport useConfirmacionSalida from './confirmacion-salida'\n\nconst useVistaInsertar = <T,>(args: {\n endpoint: string\n params?: Params\n data: Partial<T>\n automatizacionPara?: any // Automatizaciones\n formatearDataInicial?: (data: T) => Promise<void> | void\n registroId?: string\n soloParaInsertar?: boolean\n recuperacionEmergencia?: boolean\n sinOptions?: boolean\n onMounted?: () => Promise<void>\n}) => {\n const axios = getAxios(args.endpoint)\n const [form] = Form.useForm<T>()\n const [isLoading, setIsLoading] = useState(false)\n const [isReady, setIsReady] = useState(false)\n const router = useRouter()\n const { showError, message } = useUtils()\n const preventor = useConfirmacionSalida(router.asPath)\n const tipoEmision = useRef<'emitir' | 'borrador' | 'lote'>('emitir')\n\n const objectId = useRef<string | undefined>(router.query.id as string)\n\n const { data: options = {} } = useSWRImmutable(\n args.sinOptions ? null : args.endpoint + '/get-options',\n async (key) => (await axios.get<Options>(key)).data,\n { revalidateOnFocus: false }\n )\n\n useEffect(() => {\n objectId.current = args.registroId\n if (!objectId.current) {\n objectId.current = args.soloParaInsertar\n ? undefined\n : (router.query.id as string)\n }\n }, [args?.registroId, args.soloParaInsertar])\n\n /**\n * La ruta principal a la cual se debe redireccionar una vez se haya\n * completado la operación.\n */\n const mainroute = router.asPath.replace(/\\/(insert|[\\w]*\\/edit$)/g, '') || '/'\n // const previsualziacion = usePrevisualizacion({\n // automatizacionPara: args.automatizacionPara,\n // })\n\n const getDocumentoEditar = async () => {\n let desdeEmergencia = false\n let datos = await preventor.obtenerDataEmergencia()\n if (datos) {\n objectId.current = datos._id\n desdeEmergencia = true\n } else if (objectId.current) {\n ;({ data: datos } = await axios.get(\n `${args.endpoint}/${objectId.current}`,\n { params: args.params }\n ))\n }\n if (datos) {\n await args.formatearDataInicial?.(datos)\n form.setFieldsValue(datos)\n }\n return desdeEmergencia ? args.data : datos || args.data\n }\n\n const onSubmit = async (\n values: T,\n opciones: {\n /**\n * Indica si al guardar el documento debe redireccionar a la vista\n * principal\n */\n noRedirect?: boolean\n /**\n * Un endpoint personalizado para realizar la operación\n */\n endpoint?: string\n /**\n * Params personalizados\n */\n params?: Params\n /**\n * No lanza el error desde el hook, mas bien lanza un throw con el error\n */\n noShowError?: boolean\n } = {}\n ) => {\n if (isLoading === true) return\n setIsLoading(true)\n preventor.limpiar()\n const endpoint = opciones.endpoint || args.endpoint\n const params = opciones.params || undefined\n try {\n let result: T\n if (objectId.current) {\n ;({ data: result } = await axios.put(\n endpoint + '/' + objectId.current,\n values,\n { params }\n ))\n } else {\n ;({ data: result } = await axios.post(endpoint, values, { params }))\n }\n // previsualziacion.abrirAsientoContable((result as any)?.accountingVoucher)\n if (opciones.noRedirect !== true) {\n message.success('Guardado correctamente')\n router.push(mainroute)\n } else {\n setIsLoading(false)\n }\n return result\n } catch (err) {\n setIsLoading(false)\n if (opciones.noShowError) throw err\n showError(err)\n const voucherid = (err as any)?.response?.data?.comprobante\n const erroresSRI = [\n \"Hostname/IP does not match certificate's altnames:\",\n 'El servidor del SRI no ha respondido en un largo tiempo por lo que se ha cerrado la conexión.',\n ]\n const content = 'pruebas' // await getMensajeError(err)\n if (erroresSRI.some((item) => content?.includes(item))) {\n router.push(mainroute)\n } else if (\n !opciones.noRedirect &&\n voucherid &&\n voucherid !== objectId.current\n ) {\n objectId.current = voucherid\n router.push(mainroute + '/' + voucherid + '/edit')\n } else {\n preventor.reanudar()\n }\n }\n }\n\n const onMainRouter = () => router.push(mainroute)\n\n const BotonesPorDefecto = (\n <Space>\n <Button type=\"primary\" loading={isLoading} onClick={() => form.submit()}>\n Guardar\n </Button>\n <Link href={mainroute}>\n <Button>Cancelar</Button>\n </Link>\n </Space>\n )\n\n const ModoCarga = (\n <>\n <Skeleton paragraph={{ rows: 3, width: '100%' }} className=\"mb-4\" />\n <Skeleton paragraph={{ rows: 4, width: '100%' }} className=\"mb-4\" />\n <div className=\"grid grid-cols-2 gap-4 mb-4\">\n <Skeleton paragraph={{ rows: 4, width: '100%' }} />\n <Skeleton paragraph={{ rows: 4, width: '100%' }} />\n </div>\n <Space>\n <Skeleton.Button />\n <Skeleton.Button />\n </Space>\n </>\n )\n\n const onMensajeValidacion = () =>\n message.warning('Revisa los errores del formulario')\n\n const getOption = (name: string, value: string) =>\n options[name]?.find((x) => x.id === value)?.description || ''\n\n const formProps: FormProps = {\n form,\n autoComplete: 'off',\n initialValues: args.data,\n onFinish: onSubmit,\n layout: 'vertical',\n onFinishFailed: onMensajeValidacion,\n }\n\n useEffect(() => {\n if (!args.recuperacionEmergencia) return\n const timer = setInterval(() => {\n if (!isReady) return\n const values = form.getFieldsValue()\n preventor.cambiarDatosFormulario(values)\n }, 1000)\n return () => clearInterval(timer)\n }, [isReady])\n\n // mounted\n useEffect(() => {\n const timer = setTimeout(() => {\n if (args.soloParaInsertar) return\n getDocumentoEditar()\n .then((data) =>\n Promise.all([preventor.cambiarHashInicial(data), args.onMounted?.()])\n )\n .then(() => setIsReady(true))\n }, 200)\n return () => clearTimeout(timer)\n }, [router.query.id])\n\n return {\n form,\n router,\n options,\n tipoEmision,\n objectId: objectId.current,\n mainroute,\n isLoading,\n isReady,\n data: args.data,\n endpoint: args.endpoint,\n onSubmit,\n onMainRouter,\n setIsLoading,\n preventor,\n ModoCarga,\n BotonesPorDefecto,\n onMensajeValidacion,\n getOption,\n formProps,\n }\n}\n\nexport type VistaInsertar<T = unknown> = ReturnType<typeof useVistaInsertar<T>>\n\nexport default useVistaInsertar\n","import { Router } from 'next/router'\nimport { hashear, useUtils } from '../utils'\nimport { useEffect, useRef, useState } from 'react'\nimport { QuestionCircleOutlined } from '@ant-design/icons'\n\n/**\n * Identifica los datos iniciales de una página y verifica si estos han cambiado\n * para prevenir cerrar la página o impedir que navegue. También guarda\n * periódicamente los datos para que en el caso de un cierre se pueda restaurar.\n */\nconst useConfirmacionSalida = (key: string) => {\n const empezar = useRef(false)\n const { modal } = useUtils()\n const hashInicial = useRef(0)\n const [hashFormulario, setHashFormulario] = useState(0)\n\n const navegarHanlder = () => {\n const confirmarSalir = window.confirm('¿Estás seguro que quieres salir?')\n if (!confirmarSalir) {\n throw 'Route Canceled'\n }\n limpiar()\n localStorage.removeItem(key)\n }\n\n const refrescarHandler = (event: BeforeUnloadEvent) => {\n event.preventDefault()\n }\n\n const reanudar = () => {\n empezar.current = true\n }\n\n const limpiar = () => {\n empezar.current = false\n window.removeEventListener('beforeunload', refrescarHandler)\n Router.events.off('routeChangeStart', navegarHanlder)\n localStorage.removeItem(key)\n setHashFormulario(0)\n }\n\n const obtenerDataEmergencia = async (): Promise<any> => {\n const datosGuardados = localStorage.getItem(key)\n const datos = await new Promise<never | undefined>((resolve) => {\n if (!datosGuardados) return resolve(undefined)\n modal.confirm({\n title: 'Existen datos guardados',\n icon: <QuestionCircleOutlined />,\n content:\n 'Hubo un cierre inesperado pero los datos fueron guardados temporalmente ¿Deseas recuperarlos?',\n onOk: () => resolve(JSON.parse(datosGuardados)),\n onCancel: () => resolve(undefined),\n })\n })\n empezar.current = true\n return datos\n }\n\n useEffect(() => {\n if (!empezar.current) return\n const prevenir = hashInicial.current !== hashFormulario\n if (prevenir) {\n window.addEventListener('beforeunload', refrescarHandler)\n Router.events.on('routeChangeStart', navegarHanlder)\n }\n return () => {\n window.removeEventListener('beforeunload', refrescarHandler)\n Router.events.off('routeChangeStart', navegarHanlder)\n }\n }, [hashInicial.current, hashFormulario])\n\n return {\n cambiarHashInicial: (values: unknown) => {\n const hash = hashear(JSON.stringify(values))\n setHashFormulario(hash)\n hashInicial.current = hash\n },\n\n cambiarDatosFormulario: (values: unknown) => {\n if (!empezar.current || hashInicial.current === 0) return\n const cadenaTexto = JSON.stringify(values)\n const nuevoHash = hashear(cadenaTexto)\n setHashFormulario(nuevoHash)\n if (nuevoHash === hashInicial.current) localStorage.removeItem(key)\n else localStorage.setItem(key, cadenaTexto)\n },\n\n limpiar,\n reanudar,\n obtenerDataEmergencia,\n }\n}\n\nexport default useConfirmacionSalida\n","import { TableProps } from 'antd'\nimport { AxiosInstance } from 'axios'\nimport { useRouter } from 'next/router'\nimport type { Options } from '../../types'\nimport useSWR, { useSWRConfig } from 'swr'\nimport useSWRImmutable from 'swr/immutable'\nimport { getAxios, useUtils, getApiEndpoint } from '../utils'\n\ninterface ApiResponse<T> {\n data: T[]\n total: number\n page: number\n}\n\ntype Option = {\n id: string\n description: string\n value?: number\n stringValue?: string\n show?: boolean\n}\n\ninterface Params {\n q?: string\n fields?: string\n sort?: string\n page?: string\n total?: string\n $getAllFields?: 'true'\n [key: string]: string | number | undefined\n}\n\nconst useVistaPrincipal = <T,>(args: {\n endpoint: string\n params?: Params\n sinOptions?: true\n optionsPath?: string\n}) => {\n const axios: AxiosInstance = getAxios(args.endpoint)\n\n const router = useRouter()\n const { showError } = useUtils()\n const { mutate } = useSWRConfig()\n\n const { data: options = {} } = useSWRImmutable(\n args.sinOptions\n ? null\n : (args.optionsPath || args.endpoint) + '/get-options',\n async (key) => (await axios.get<Options>(key)).data\n )\n const searchParamsKey = new URLSearchParams({\n ...args.params,\n ...router.query,\n } as Record<string, string>).toString()\n const swrKey = args.endpoint + (searchParamsKey ? '?' + searchParamsKey : '')\n const {\n data: response,\n error,\n isLoading,\n } = useSWR(router.isReady ? swrKey : null, async (key) => {\n const { data } = await axios.get<ApiResponse<T>>(key)\n return data\n })\n const data = response?.data || []\n const totalDocumentos = response?.total || 0\n const searchParams = new URLSearchParams(\n router.query as Record<string, string>\n )\n const page = searchParams.get('page')\n const currentPage = page ? parseInt(page) : 1\n const limit = searchParams.get('limit')\n const pageSize = limit ? parseInt(limit) : 20\n\n const tableProps: TableProps<T> = {\n loading: isLoading,\n dataSource: data,\n rowKey: '_id',\n bordered: true,\n pagination: {\n current: currentPage,\n defaultPageSize: pageSize,\n total: totalDocumentos,\n },\n onChange: async (pagination, filters, sorter) => {\n const paramsInicial = searchParams.toString()\n const params = new URLSearchParams(paramsInicial)\n\n // paginación\n if (pagination.current !== currentPage) {\n const newPage = pagination.current!.toString()\n if (newPage === '1') params.delete('page')\n else params.set('page', newPage)\n }\n\n // tamaño de página\n if (pagination.pageSize !== pageSize) {\n const newPageSize = pagination.pageSize!.toString()\n if (newPageSize === '20') params.delete('limit')\n else params.set('limit', newPageSize)\n }\n\n // ordenar\n if (Array.isArray(sorter)) {\n // TODO: Implementar multiple orden\n } else {\n if (sorter.order === 'ascend') {\n params.set('sort', sorter.field as string)\n } else if (sorter.order === 'descend') {\n params.set('sort', '-' + sorter.field)\n } else {\n params.delete('sort')\n }\n }\n\n // // filtros\n // const keysPersonalizadas: string[] = []\n // for (const property in filters) {\n // const filtro = filters[property]\n // if (filtro && filtro!.length !== 0) {\n // const esPersonalizado = filtro.some((item) =>\n // Object.entries(args.filtros || {}).some(\n // ([, opcion]) => opcion.value === item\n // )\n // )\n // if (esPersonalizado) {\n // keysPersonalizadas.push(property)\n // filtro.forEach((item) => {\n // const urlParams = new URLSearchParams(item as string)\n // urlParams.forEach((value, key) => {\n // query[key] = value\n // })\n // })\n // } else if (\n // filtro.length === 1 &&\n // /\\{\\$(gte?|lte?)\\}/.test(filtro[0] as string)\n // ) {\n // query[property] = filtro[0] as string\n // } else {\n // query[property] = '{$in}' + filtro!.join(',')\n // }\n // } else {\n // delete query[property]\n // }\n // }\n\n // if (args.filtros)\n // for (const key in args.filtros) {\n // if (keysPersonalizadas.includes(key)) continue\n // const urlParams = new URLSearchParams(args.filtros[key].value)\n // urlParams.forEach((value, key) => {\n // if (query[key] === value) delete query[key]\n // })\n // }\n if (paramsInicial !== params.toString()) {\n router.push({ query: Object.fromEntries(params) })\n }\n },\n }\n\n const init = () => {\n mutate(swrKey)\n }\n\n const getOpt = (name: string, value: string) => {\n const enumerate = options[name]?.find((x) => x.id === value)\n return enumerate ? enumerate.description : ''\n }\n\n const remove = async (id: string | { endpoint: string }) => {\n try {\n await axios.delete(\n typeof id === 'string' ? args.endpoint + '/' + id : id.endpoint\n )\n init()\n } catch (err) {\n showError(err)\n }\n }\n\n const cancel = async (id: string | { endpoint: string }) => {\n try {\n await axios.delete(\n typeof id === 'string'\n ? args.endpoint + '/' + id + '/cancel'\n : id.endpoint\n )\n init()\n } catch (err) {\n showError(err)\n }\n }\n\n return {\n data,\n isLoading,\n error,\n options,\n endpoint: args.endpoint,\n endpointWithHost: getApiEndpoint(args.endpoint),\n mainroute: router.route,\n tableProps,\n\n init,\n getOpt,\n remove,\n cancel,\n }\n}\n\nexport default useVistaPrincipal\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","__generator","body","f","y","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","__spreadArray","to","from","pack","ar","l","Array","slice","concat","SuppressedError","process","env","NODE_ENV","jsxRuntimeModule","exports","require$$0","k","for","m","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","ReactCurrentOwner","key","__self","__source","q","c","a","b","d","h","defaultProps","$$typeof","props","_owner","current","reactJsxRuntime_production_min","jsx","jsxs","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","ReactSharedInternals","error","format","_len2","args","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","argsWithFormat","map","item","String","unshift","Function","console","printWarning","REACT_MODULE_REFERENCE","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","getContextName","displayName","getComponentNameFromType","tag","name","_context","outerType","innerType","wrapperName","functionName","getWrappedName","render","outerName","lazyComponent","payload","_payload","init","_init","x","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledDepth","disabledLog","__reactDisabledLog","prefix","ReactCurrentDispatcher","describeBuiltInComponentFrame","source","ownerFn","undefined","Error","match","trim","componentFrameCache","reentry","PossiblyWeakMap","WeakMap","Map","describeNativeComponentFrame","fn","construct","control","frame","get","previousDispatcher","previousPrepareStackTrace","prepareStackTrace","log","info","warn","group","groupCollapsed","groupEnd","configurable","enumerable","writable","defineProperties","disableLogs","Fake","defineProperty","set","Reflect","sample","sampleLines","split","controlLines","_frame","replace","includes","reenableLogs","syntheticFrame","describeUnknownElementTypeFrameInDEV","isReactComponent","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","_source","setExtraStackFrame","isArrayImpl","isArray","testStringCoercion","checkKeyStringCoercion","willCoercionThrow","toStringTag","constructor","typeName","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","RESERVED_PROPS","ReactElement","self","_store","freeze","jsxDEV","config","maybeKey","propName","getter","getOwnPropertyDescriptor","isReactWarning","hasValidKey","hasValidRef","stateNode","componentName","warnIfStringRefCannotBeAutoConverted","warnAboutAccessingKey","defineKeyPropWarningGetter","warnAboutAccessingRef","defineRefPropWarningGetter","propTypesMisspellWarningShown","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","isValidElement","object","getDeclarationErrorAddendum","ownerHasKeyUseWarning","validateExplicitKey","parentType","validated","currentComponentErrorInfo","parentName","getCurrentComponentErrorInfo","childOwner","validateChildKeys","node","child","iteratorFn","maybeIterable","maybeIterator","getIteratorFn","entries","validatePropTypes","propTypes","typeSpecs","values","location","has","bind","typeSpecName","error$1","err","ex","message","checkPropTypes","PropTypes","getDefaultProps","isReactClassApproved","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","getModuleId","isValidElementType","typeString","keys","children","filter","beforeExample","join","fragment","validateFragmentProps","reactJsxRuntime_development","Fragment","Navegador","paths","_jsx","Breadcrumb","items","_a","title","Link","href","configs","hostUtils","hostFastify","hostRestify","userTokenName","adminTokenName","cookieDominio","cookiePath","getMensajeError","_e","response","data","_f","Blob","_b","JSON","parse","text","_g","_d","tipo","useUtils","App","useApp","modal","notification","showError","content","width","_jsxs","_Fragment","cuerpoAdicional","okType","getNombreCookie","getAxios","endpoint","baseURL","axios","axiosBase","create","defaults","headers","common","Authorization","getCookie","domain","path","getApiEndpoint","queries","url","URL","queryString","URLSearchParams","toString","hashear","mensaje","hash","charCodeAt","redireccionarLogin","router","pathLogin","esOtroDominio","window","origin","asPath","searchParams","append","pathname","search","tiposValidadorUnico","empresa","$reglas","required","min","max","email","pattern","patron","unico","validator","debounce","correos","_1","args_1","some","diasDiferencia","dias","diferencia","dayjs","startOf","diff","defaultLocale","$filtros","currency","arg","Intl","NumberFormat","minimumFractionDigits","parseFloat","date","completeDate","month","percent","EmpresaContext","createContext","shimModule","is","useState","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","u","inst","useSyncExternalStoreShim_production_min","useSyncExternalStore","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","objectIs","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","useSyncExternalStoreShim_development","registerInternalModuleStop","noop","UNDEFINED","OBJECT","isUndefined","isFunction","mergeObjects","table","counter","stableHash","isDate","Date","index","RegExp","toJSON","stringify","sort","SWRGlobalState","EMPTY_CACHE","INITIAL_CACHE","STR_UNDEFINED","isWindowDefined","isDocumentDefined","createCacheHelper","cache","state","prev","online","onWindowEvent","offWindowEvent","addEventListener","removeEventListener","preset","isOnline","isVisible","visibilityState","defaultConfigOptions","initFocus","callback","initReconnect","onOnline","onOffline","IS_REACT_LEGACY","useId","IS_SERVER","rAF","setTimeout","useIsomorphicLayoutEffect","navigatorConnection","navigator","connection","slowConnection","effectiveType","saveData","serialize","__timestamp","getTimestamp","events","async","internalMutate","_key","_data","_opts","options","populateCache","throwOnError","revalidate","rollbackOnErrorOption","rollbackOnError","optimisticData","keyFilter","matchedKeys","it","test","_k","all","mutateByKey","EVENT_REVALIDATORS","MUTATION","FETCH","PRELOAD","startRevalidate","revalidators","beforeMutationTs","hasOptimisticData","displayedData","currentData","_c","committedData","catch","populateCachedData","revalidateAllKeys","mutate","provider","opts","unmount","subscriptions","subs","splice","indexOf","setter","initProvider","releaseFocus","releaseReconnect","delete","initCache","defaultConfig","onLoadingSlow","onSuccess","onError","onErrorRetry","__","maxRetryCount","errorRetryCount","currentRetryCount","retryCount","timeout","Math","random","errorRetryInterval","onDiscarded","revalidateOnFocus","revalidateOnReconnect","revalidateIfStale","shouldRetryOnError","focusThrottleInterval","dedupingInterval","loadingTimeout","compare","newData","isPaused","fallback","SWRConfigContext","enableDevtools","__SWR_DEVTOOLS_USE__","use","normalize","BUILT_IN_MIDDLEWARE","useSWRNext","key_","fetcher_","startsWith","req","__SWR_DEVTOOLS_REACT__","ReactExports","promise","status","reason","WITH_DEDUPE","dedupe","useSWR","hook","fetcher","suspense","fallbackData","revalidateOnMount","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","fnArg","initialMountedRef","useRef","unmountedRef","keyRef","fetcherRef","configRef","getConfig","isActive","getCache","setCache","subscribeCache","getInitialCache","stateDependencies","isEqual","returnedData","useMemo","shouldStartRequest","getSelectedCache","snapshot","isValidating","isLoading","cachedData","initialData","clientSnapshot","serverSnapshot","memorizedSnapshot","newSnapshot","cached","useCallback","isInitialMount","hasRevalidator","laggyDataRef","shouldDoInitialRevalidation","defaultValidatingState","revalidateOpts","currentFetcher","startAt","loading","shouldStartNewRequest","callbackSafeguard","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","mutationInfo","cacheData","currentConfig","revalidateEvents","boundMutate","softRevalidate","nextFocusRevalidatedAt","unsubEvents","callbacks","keyedRevalidators","subscribeCallback","now","timer","interval","execute","clearTimeout","fallbackConfig","useContext","_config","u1","f1","u2","f2","mergeConfigs","middleware","useSWRImmutable","uses","withMiddleware","colorPrimary","layoutBodyBg","useRouter","ready","setReady","business","setBusiness","params","fields","dataConfigs","configuraciones","Provider","nombreEmpresa","nombreUsuario","user","testEnviroment","useTestEnviroment","usuarioEsAdmin","userType","className","newPathname","defaultInsert","getOwnPropertySymbols","propertyIsEnumerable","__rest","qQuery","setQQuery","query","onSearch","fromEntries","segundaColumna","ocultarBuscador","Input","Search","placeholder","onChange","event","target","onPressEnter","endsWith","Button","onRefrescar","icon","ReloadOutlined","onClick","isReady","Typography","Title","subtitle","column","form","Form","useFormInstance","opciones","setOpciones","validations","rules","onBuscarPersona","identificador","campoNombre","nombre","err_1","Item","toUpperCase","dependencies","hiddenLabel","AutoComplete","onSelect","option","setFieldValue","maxLength","disabled","collapsed","setCollapsed","responsive","setResponsive","sidebar","Layout","Sider","overflow","height","position","insetInlineStart","top","bottom","scrollbarWidth","scrollbarColor","zIndex","breakpoint","collapsedWidth","trigger","collapsible","onBreakpoint","broken","menu","stopPropagation","preventDefault","navbar","Header","MenuUnfoldOutlined","MenuFoldOutlined","Content","footer","Footer","textoExtra","tipoDefecto","_this","defaultOptions","preestablecido","withOptions","estado","field","id","preBusquedaQ","optionsRequest","useSeekerTypes","hideLabel","extra","hideMessage","classNameFormItem","isClient","setIsClient","ConfigProvider","locale","esEs","theme","token","colorLink","colorTextDisabled","components","bodyBg","headerBg","hasSider","override","setCookie","usuario","maxAge","deleteCookie","useForm","setIsLoading","setIsReady","preventor","empezar","hashInicial","hashFormulario","setHashFormulario","navegarHanlder","confirm","limpiar","localStorage","removeItem","refrescarHandler","Router","off","on","cambiarHashInicial","cambiarDatosFormulario","cadenaTexto","nuevoHash","setItem","reanudar","obtenerDataEmergencia","datosGuardados","getItem","QuestionCircleOutlined","onOk","onCancel","datos","useConfirmacionSalida","tipoEmision","objectId","sinOptions","registroId","soloParaInsertar","mainroute","onSubmit","values_1","put","post","noRedirect","success","noShowError","voucherid","comprobante","content_1","BotonesPorDefecto","Space","submit","ModoCarga","Skeleton","paragraph","rows","onMensajeValidacion","warning","formProps","autoComplete","initialValues","onFinish","layout","onFinishFailed","recuperacionEmergencia","setInterval","getFieldsValue","clearInterval","desdeEmergencia","_id","formatearDataInicial","setFieldsValue","onMounted","onMainRouter","getOption","find","description","useSWRConfig","optionsPath","searchParamsKey","swrKey","totalDocumentos","total","page","currentPage","parseInt","limit","pageSize","tableProps","dataSource","rowKey","bordered","pagination","defaultPageSize","filters","sorter","paramsInicial","newPage","newPageSize","order","endpointWithHost","route","getOpt","enumerate","remove","cancel","err_2"],"mappings":"+QAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D,8/CCMO,IAAIe,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAChC,EA0EO,SAASQ,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAW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