@entropic-bond/crud-panel 4.4.2 → 4.4.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":"entropic-bond-crud-panel.umd.cjs","sources":["../node_modules/entropic-bond/lib/entropic-bond.js","../src/progress-controller.ts","../src/crud-controller.ts","../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react.production.js","../node_modules/react/cjs/react.development.js","../node_modules/react/index.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/crud-panel.tsx"],"sourcesContent":["class U {\n constructor() {\n this.subscribers = /* @__PURE__ */ new Set();\n }\n /**\n * Subscribes a listener callback function. On every notification, \n * the listener callback will be called with an event as a parameter if sent.\n * \n * @param callback the listener callback\n * @returns a function to unsubscribe the listener from further notifications\n */\n subscribe(e) {\n return this.subscribers.add(e), () => this.unsubscribe(e);\n }\n /**\n * Removes the callback from the notification list.\n * \n * @param listenerCallback the listener callback to remove\n */\n unsubscribe(e) {\n this.subscribers.delete(e);\n }\n /**\n * Notifies all the subscribers with the event passed as parameter.\n * \n * @param event the event passed to all subscribers.\n */\n notify(e) {\n this.subscribers.forEach((t) => t(e));\n }\n /**\n * Returns the number of subscribers.\n * \n * @returns the number of subscribers\n * @example\n * const observable = new Observable<number>()\n * observable.subscribe( event => console.log( event ) )\n * observable.subscribe( event => console.log( event ) )\n * observable.subscribe( event => console.log( event ) )\n * console.log( observable.subscribersCount ) // 3\n */\n get subscribersCount() {\n return this.subscribers.size;\n }\n}\nconst f = [];\nfor (let i = 0; i < 256; ++i)\n f.push((i + 256).toString(16).slice(1));\nfunction M(i, e = 0) {\n return (f[i[e + 0]] + f[i[e + 1]] + f[i[e + 2]] + f[i[e + 3]] + \"-\" + f[i[e + 4]] + f[i[e + 5]] + \"-\" + f[i[e + 6]] + f[i[e + 7]] + \"-\" + f[i[e + 8]] + f[i[e + 9]] + \"-\" + f[i[e + 10]] + f[i[e + 11]] + f[i[e + 12]] + f[i[e + 13]] + f[i[e + 14]] + f[i[e + 15]]).toLowerCase();\n}\nlet O;\nconst T = new Uint8Array(16);\nfunction x() {\n if (!O) {\n if (typeof crypto > \"u\" || !crypto.getRandomValues)\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n O = crypto.getRandomValues.bind(crypto);\n }\n return O(T);\n}\nconst B = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), A = { randomUUID: B };\nfunction W(i, e, t) {\n i = i || {};\n const r = i.random ?? i.rng?.() ?? x();\n if (r.length < 16)\n throw new Error(\"Random bytes length must be >= 16\");\n return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, M(r);\n}\nfunction Q(i, e, t) {\n return A.randomUUID && !i ? A.randomUUID() : W(i);\n}\nvar q = Object.defineProperty, Y = (i, e, t, r) => {\n for (var s = void 0, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = o(e, t, s) || s);\n return s && q(e, t, s), s;\n}, l;\nconst k = (l = class {\n /**\n * Registers a class to be used by the persistence engine.\n * @param className the name of the class to be registered\n * @param factory the constructor of the registered class\n * @param annotation an annotation associated with the class\n */\n static registerFactory(e, t, r, s = !1) {\n this._factoryMap[e] = { factory: t, annotation: r, isLegacy: s };\n }\n /**\n * Returns the constructor of a registered class\n * @param className the name of the class to be retrieved\n * @returns the constructor of the class\n * @throws an error if the class is not registered\n * @see registerFactory\n * @see registeredClasses\n * @see classesExtending\n * @see annotations\n */\n static classFactory(e) {\n if (!e) throw new Error(\"You should provide a class name.\");\n if (!this._factoryMap[e]) throw new Error(`You should register class ${e} prior to use.`);\n return this._factoryMap[e].factory;\n }\n /**\n * Returns the names of all registered classes\n * @returns the names of all registered classes\n * @see registerFactory\n * @see classFactory\n */\n static registeredClasses() {\n return Object.entries(this._factoryMap).filter(([, e]) => !e.isLegacy).map(([e]) => e);\n }\n /**\n * Returns the names of all registered classes, including legacy names\n * @returns the names of all registered classes, including legacy names\n * @see registerFactory\n * @see classFactory\n */\n static registeredClassesAndLegacyNames() {\n return Object.keys(this._factoryMap);\n }\n /**\n * Returns the names of all registered classes that extend a given class\n * @param derivedFrom the class to be extended\n * @returns the names of all registered classes that extend the given class\n * @see registerFactory\n * @see classFactory\n */\n static classesExtending(e) {\n return Object.entries(this._factoryMap).filter(([, t]) => new t.factory() instanceof e && !t.isLegacy).map(([t]) => t);\n }\n /**\n * Returns the annotation associated with a registered class\n * @param className the name of the class to be retrieved\n * @returns the annotation associated with the class\n * @throws an error if the class is not registered\n * @see registerFactory\n */\n static annotations(e) {\n if (e instanceof l ? e = e.className : typeof e == \"string\" || (e = new e().className), !this._factoryMap[e]) throw new Error(`You should register class ${e} prior to use.`);\n return this._factoryMap[e].annotation;\n }\n /**\n * Returns a new instance of Persistent class.\n * @param className the initial id of this instance. If not provided, a new id will be generated\n */\n constructor(e = Q()) {\n this._id = e;\n }\n /**\n * Gets the class name of this instance.\n */\n get className() {\n return this.__className;\n }\n /**\n * Sets the id of this instance.\n * @param value the id of this instance\n */\n setId(e) {\n this._id = e;\n }\n /**\n * Returns the id of this instance.\n * @returns the id of this instance\n */\n get id() {\n return this._id;\n }\n /**\n * This method is called by the persistence engine when the instance has been\n * just serialized. It is called after the properties are initialized with \n * serialized data.\n */\n afterDeserialize() {\n }\n /**\n * This method is called by the persistence engine before the instance is\n * serialized. \n */\n beforeSerialize() {\n }\n /**\n * Returns an array of the persistent properties of this instance.\n * @returns an array of the persistent properties of this instance\n */\n getPersistentProperties() {\n return this._persistentProperties ? this._persistentProperties.map((e) => ({\n ...e,\n name: e.name.slice(1)\n })) : [];\n }\n /**\n * Get the property information of this instance\n * @param propName the persistent property name\n * @returns the property information\n */\n getPropInfo(e) {\n const t = this.getPersistentProperties().find((r) => r.name === e);\n if (!t) throw new Error(`Property \"${e}\" has not been registered.`);\n return t;\n }\n /**\n * Query if the property is required\n * To mark a property as required, use the @required decorator\n * @param propName the persistent property name\n * @returns true if the property is required\n * @see required\n */\n isRequired(e) {\n const t = this.getPropInfo(e).validator;\n return t != null;\n }\n /**\n * Query if the property value is valid\n * Define the validator function using the @required decorator\n * @param propName the persistent property name\n * @returns true if the property value is valid using the validator function\n * passed to the @required decorator\n * @see required\n */\n isPropValueValid(e) {\n const t = this.getPropInfo(e);\n return t.validator ? t.validator(this[t.name], t, this) : !0;\n }\n /**\n * Copy the persistent properties of the given instance to this instance. \n * The property `id` will be ignored.\n * Only the properties that are not null or undefined will be copied.\n * @param instance the instance to be copied\n * @returns this instance\n * @see fromObject\n * @see toObject\n */\n clone(e) {\n const t = e.toObject();\n return delete t.id, this.fromObject(t);\n }\n /**\n * Initializes the persistent properties of this instance from the properties \n * of given object.\n * @param obj the object to be copied\n * @returns this instance\n * @see clone\n * @see toObject\n */\n fromObject(e) {\n return this.fromObj(e), this.afterDeserialize(), this;\n }\n fromObj(e) {\n return this._persistentProperties ? (this._persistentProperties.forEach((t) => {\n const r = this.removeUnderscore(t), s = e[r];\n s != null && (this[t.name] = this.fromDeepObject(s));\n }), this) : this;\n }\n /**\n * Returns a plain object representation of this instance.\n * Only the properties that are not null or undefined will be copied.\n * @returns a plain object representation of this instance\n * @see fromObject\n * @see clone\n */\n toObject() {\n const e = {}, t = this.toObj(e);\n return this.pushDocument(e, this.className, t), {\n ...t,\n __rootCollections: e\n };\n }\n toObj(e) {\n if (!this._persistentProperties) return {};\n this.beforeSerialize();\n const t = {};\n if (!this.className) throw new Error(`You should register \\`${this.constructor.name || this.toString() || \"this\"}\\` class prior to streaming it.`);\n return this._persistentProperties.forEach((r) => {\n const s = this[r.name], n = this.removeUnderscore(r);\n s != null && (r.isReference ? t[n] = this.toReferenceObj(r, e) : t[n] = this.toDeepObj(s, e), r.searchableArray && (t[l.searchableArrayNameFor(n)] = s.map((o) => o.id)));\n }), t.__className = this.className, t;\n }\n static searchableArrayNameFor(e) {\n return `__${e}_searchable`;\n }\n fromDeepObject(e) {\n if (e == null) return e;\n if (Array.isArray(e))\n return e.map((t) => this.fromDeepObject(t));\n if (e.__documentReference) {\n const t = e, r = l.createInstance(t);\n return r.__documentReference = e.__documentReference, r;\n }\n if (e.__className)\n return l.createInstance(e);\n if (typeof e == \"object\") {\n const t = {};\n return Object.entries(e).forEach(\n ([r, s]) => t[r] = this.fromDeepObject(s)\n ), t;\n }\n return e;\n }\n toDeepObj(e, t) {\n if (e != null) {\n if (Array.isArray(e))\n return e.map((r) => this.toDeepObj(r, t));\n if (e.__documentReference) return e;\n if (e instanceof l)\n return e.toObj(t);\n if (typeof e == \"object\") {\n const r = {};\n return Object.entries(e).forEach(\n ([s, n]) => r[s] = this.toDeepObj(n, t)\n ), r;\n }\n return e;\n }\n }\n static collectionPath(e, t) {\n let r;\n return typeof t.storeInCollection == \"function\" ? r = t.storeInCollection(e, t) : r = t.storeInCollection ?? e.className, r;\n }\n toReferenceObj(e, t) {\n const r = this[e.name];\n return Array.isArray(r) ? r.map((s) => (e.isPureReference || this.pushDocument(t, l.collectionPath(s, e), s), this.buildRefObject(s, l.collectionPath(s, e), e.cachedPropsConfig?.cachedProps))) : (e.isPureReference || this.pushDocument(t, l.collectionPath(r, e), r), this.buildRefObject(r, l.collectionPath(r, e), e.cachedPropsConfig?.cachedProps));\n }\n buildRefObject(e, t, r) {\n const s = r?.reduce((n, o) => (e[o] !== void 0 && (n[o] = e[o]), n), {});\n return {\n id: e.id,\n __className: e.className || e.__className,\n __documentReference: {\n storedInCollection: t\n },\n ...s\n };\n }\n pushDocument(e, t, r) {\n if (\"__documentReference\" in r && r.__documentReference) return;\n e[t] || (e[t] = []);\n const s = this.toDeepObj(r, e);\n e[t].push(s);\n }\n removeUnderscore(e) {\n return e.name.slice(1);\n }\n static createReference(e) {\n const t = l.createInstance(e);\n return t.__documentReference = e.__documentReference || { storedInCollection: t.className }, t;\n }\n static createInstance(e) {\n if (typeof e == \"string\")\n return new (l.classFactory(e))();\n try {\n return new (l.classFactory(e.__className))().fromObject(e);\n } catch (t) {\n const r = Object.entries(e).filter(([s, n]) => n != null && typeof n != \"function\").map(([s, n]) => `${s}: ${n}`).join(`,\n\t`);\n throw new Error(`${t}\n-----> Class name not found in object:\n{\n\t ${r} \n}\n`);\n }\n }\n static propInfo(e, t) {\n return l.createInstance(e).getPropInfo(t);\n }\n /**\n * Retrieves a collection of references with the properties that are stored in the reference object\n * @returns the references collection\n */\n static getSystemRegisteredReferencesWithCachedProps() {\n return l.registeredClassesAndLegacyNames().reduce((r, s) => {\n const o = l.createInstance(s).getPersistentProperties().filter(\n (a) => a.cachedPropsConfig?.cachedProps\n );\n return o.length > 0 && (r[s] = o), r;\n }, {});\n }\n}, l._factoryMap = {}, l);\nY([\n S\n], k.prototype, \"_id\");\nlet u = k;\nfunction S(i, e) {\n return _()(i, e);\n}\nfunction te(i) {\n return function(e, t) {\n return _({\n storeInCollection: i,\n isReference: !0\n })(e, t);\n };\n}\nfunction re(i, e) {\n return _({ isReference: !0 })(i, e);\n}\nfunction se(i, e, t) {\n const r = Array.isArray(i) ? { cachedProps: i } : i;\n return function(s, n) {\n return _({\n isReference: !0,\n storeInCollection: e,\n typeName: t,\n cachedPropsConfig: r\n })(s, n);\n };\n}\nfunction ie(i, e, t) {\n return _({ isReference: !0, isPureReference: !0, storeInCollection: t })(i, e);\n}\nfunction ne(i, e, t) {\n return function(r, s) {\n const n = Array.isArray(i) ? { cachedProps: i } : i;\n return _({\n isReference: !0,\n isPureReference: !0,\n storeInCollection: e,\n typeName: t,\n cachedPropsConfig: n\n })(r, s);\n };\n}\nfunction _(i) {\n return function(e, t) {\n Object.getOwnPropertyDescriptor(e, \"_persistentProperties\") || (e._persistentProperties ? e._persistentProperties = [...e._persistentProperties] : e._persistentProperties = []);\n const r = e._persistentProperties.find((s) => s.name === t);\n r ? Object.assign(r, i) : e._persistentProperties.push({\n name: t,\n ...i\n });\n };\n}\nfunction z(i, e) {\n return (t) => {\n u.registerFactory(i, t, e), t.prototype.__className = i;\n };\n}\nfunction oe(i) {\n return (e) => {\n u.registerFactory(i, e, void 0, !0);\n };\n}\nfunction ae(i, e) {\n return _({ searchableArray: !0 })(i, e);\n}\nfunction ce(i, e) {\n return _({ validator: (t) => t != null })(i, e);\n}\nfunction ue(i = (e) => e != null) {\n return function(e, t) {\n return _({ validator: i })(e, t);\n };\n}\nclass he extends u {\n constructor() {\n super(...arguments), this._onChange = new U();\n }\n /**\n * Subscribes a listener callback function. Every time a property is changed, \n * the listener callback will be called with the property change event.\n * \n * @param listenerCallback the listener callback\n * @returns a function to unsubscribe the listener from further notifications\n */\n onChange(e) {\n return this._onChange.subscribe(e);\n }\n /**\n * Removes the listener callback subscrition from the notifications.\n * \n * @param listenerCallback the listener callback to remove\n */\n removeOnChange(e) {\n this._onChange.unsubscribe(e);\n }\n /**\n * Changes the value of the property and notifies the subscribers about the change.\n * This is a helper method that can be used in the property setter.\n * \n * @param propName the name of the property to be changed\n * @param value the new value for the property\n * @returns true in case the property has been effectively changed, false otherwise\n */\n changeProp(e, t) {\n const r = \"_\" + String(e);\n return this[r] !== t ? (this[r] = t, this._onChange.notify({ [e]: t }), !0) : !1;\n }\n /**\n * Notifies the subscribers a property or group of properties change.\n * This is a helper function to be used when you want to notify property changes.\n * \n * @param event the event with the changed properties\n */\n notify(e) {\n this._onChange.notify(e);\n }\n /**\n * Inserts a new element in an arbitrary array property of this class and \n * fires a change event if successfully inserted. To avoid repeated elements\n * to be inserted, you can pass a function that checks for inequity.\n * \n * @param arrayPropName the name of the array property of this class where you\n * \t\t\t\t\t\t\t\t\t\t\twant to insert the\tnew element.\n * @param element the element to be inserted\n * @param isUnique a function that checks for inequity of the two elements \n * \t\t\t\t\t\t\t\t\tpassed as parameter. If the returned value is true, the \n * \t\t\t\t\t\t\t\t\tvalue will be\tpushed into the array. When the function is \n * \t\t\t\t\t\t\t\t\tnot provided, the element will be inserted regardless it is\n * \t\t\t\t\t\t\t\t\talready in the array.\n * @returns the inserted element or undefined if the element was not inserted.\n */\n pushAndNotify(e, t, r) {\n const s = \"_\" + String(e);\n if (!(r && this[s].find(\n (o) => !r(o, t)\n )))\n return this[s].push(t), this.notify({ [e]: this[e] }), t;\n }\n /**\n * Removes an element from an arbitrary array property of this class and fires\n * a change event on operation success.\n * \n * @param arrayPropName the name of the array property of this class where you\n * \t\t\t\t\t\t\t\t\t\t\twant to insert the\tnew element.\n * @param element the element to be inserted\n * @param isEqual a function that checks for equity of the two elements \n * \t\t\t\t\t\t\t\t\tpassed as parameter. If the returned value is true, the \n * \t\t\t\t\t\t\t\t\tvalue will be\tremoved from the array. \n * @returns the removed element or undefined if the element was not removed.\n */\n removeAndNotify(e, t, r) {\n const s = \"_\" + String(e), n = this[s].length;\n if (this[s] = this[s].filter(\n (o) => !r(o, t)\n ), n !== this[s].length)\n return this.notify({ [e]: this[e] }), t;\n }\n}\nconst D = class D {\n constructor(e, t, r) {\n if (r) {\n if (!(t instanceof u)) throw new Error(D.error.persistentNeedForSubCollection);\n this.collectionName = `${t.className}/${t.id}/${r}`;\n } else\n this.collectionName = t instanceof u ? t.className : t;\n this._stream = e;\n }\n /**\n * Finds an stored object in the database by its id. The field id is provided\n * by the Persistent parent class and it is automatically managed. Therefore,\n * you should obtain the id by looking at the id field of the object.\n * \n * @param id the id to look for\n * @param instance you can pass an instace that will be filled with the found data\n * @returns a promise resolving to an instance with the found data\n */\n findById(e, t) {\n return new Promise((r, s) => {\n this._stream.findById(e, this.collectionName).then((n) => {\n n ? (t ? t.fromObject(n) : t = u.createInstance(n), r(t)) : r(void 0);\n }).catch((n) => s(n));\n });\n }\n /**\n * Stores an object in the database\n * \n * @param instance the object instance to store\n * @returns a promise \n */\n save(e) {\n const t = e.toObject();\n return this.collectionName !== t.__className && (t.__rootCollections[this.collectionName] = t.__rootCollections[t.__className], delete t.__rootCollections[t.__className]), new Promise((r, s) => {\n this._stream.save(t.__rootCollections).then(() => r()).catch((n) => s(n));\n });\n }\n /**\n * Removes an element from the database by id\n * @param id the id of the element to be removed\n * @returns a promise\n */\n delete(e) {\n return new Promise((t, r) => {\n this._stream.delete(e, this.collectionName).then(() => t()).catch((s) => r(s));\n });\n }\n /**\n * Call find to retrieve a Query object used to define the search conditions\n * @returns a Query object\n */\n find() {\n return new H(this);\n }\n /**\n * Define the search conditions. You pass query operations and how the query\n * results are returned to the QueryObject\n * @param queryObject the QueryObject with the search constrains\n * @param objectType Deprecated! - restricts the search to a specific instances of the class type\n * @returns a promise resolving to a collection of matched documents\n */\n query(e = {}, t) {\n if (t) {\n const r = t instanceof u ? t.className : t;\n e.operations || (e.operations = []), e.operations.push(\n { property: \"__className\", operator: \"==\", value: r }\n );\n }\n return this.mapToInstance(\n () => this._stream.find(this.preprocessQueryObject(e), this.collectionName)\n );\n }\n /**\n * Get the amount of documents matching the query\n * @param queryObject the QueryObject with the search constrains\n * @returns a promise resolving to the amount of matched documents\n */\n count(e) {\n return this._stream.count(e, this.collectionName);\n }\n /**\n * Get the next bunch of documents matching the last query\n * @param limit the max amount of documents to retrieve. If not set, uses the\n * last limit set\n * @returns a promise resolving to a collection of matched documents\n */\n next(e) {\n return this.mapToInstance(() => this._stream.next(e));\n }\n onDocumentChange(e, t) {\n return this._stream.onDocumentChange(\n this.collectionName,\n e,\n (r) => t(this.toPersistentChangeObject(r))\n );\n }\n onCollectionChange(e, t) {\n return this._stream.onCollectionChange(\n e.getQueryObject(),\n this.collectionName,\n (r) => t(r.map((s) => ({\n after: s.after && u.createInstance(s.after),\n before: s.before && u.createInstance(s.before),\n type: s.type,\n params: s.params\n })))\n );\n }\n toPersistentChangeObject(e) {\n return {\n ...e,\n before: e.before && u.createInstance(e.before),\n after: e.after && u.createInstance(e.after)\n };\n }\n // /**\n // * Get the previous bunch of documents matching the last query\n // * @param limit the max amount of documents to retrieve. If not set, uses the\n // * last limit set\n // * @returns a promise resolving to a collection of matched documents\n // */\n // prev<U extends T>( limit?: number ): Promise<U[]> {\n // \treturn this.mapToInstance( () => this._stream.prev( limit ) )\n // }\n mapToInstance(e) {\n return new Promise((t, r) => {\n e().then((s) => t(\n s.map((n) => u.createInstance(n))\n )).catch((s) => r(s));\n });\n }\n /**\n * Normalizes the query object to match the data source requirements.\n * Call this method before you do any query operation on the concrete data source\n * @param queryObject the query object containing the query operations\n * @param operatorConversor a function that converts the query operators to the\n * operators supported by the concrete data source\n * @returns the normalized query object\n */\n preprocessQueryObject(e) {\n if (Object.values(e).length === 0) return e;\n const t = e.operations?.map((r) => {\n const s = r.value[0] ?? r.value;\n return w.isArrayOperator(r.operator) && s instanceof u ? {\n property: u.searchableArrayNameFor(r.property),\n operator: r.operator,\n value: Array.isArray(r.value) ? r.value.map((n) => n.id) : s.id,\n aggregate: r.aggregate\n } : {\n property: r.property,\n operator: r.operator,\n value: r.value instanceof u ? { id: r.value.id } : r.value,\n aggregate: r.aggregate\n };\n }) ?? [];\n return {\n ...e,\n operations: t\n };\n }\n};\nD.error = {\n persistentNeedForSubCollection: \"The document parameter for a sub-collection should be a Persistent instace\",\n invalidQueryOrder: \"Cannot add where calls after or calls\"\n};\nlet C = D;\nclass H {\n constructor(e) {\n this.queryObject = { operations: [] }, this.model = e;\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter. Subsequent `where` calls will be operated to the\n * previous ones using the AND operator\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @param aggregate if true, the query will use the logical or operator and \n * aggregate the results to the previous query\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' )\n * query.where( 'age', '>', 18 )\n * query.where( 'age', '==', 18 ).where( 'name', '==', 'John' )\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n where(e, t, r, s) {\n if (this.queryObject.operations?.at(-1)?.aggregate && !s) throw new Error(C.error.invalidQueryOrder);\n return this.queryObject.operations?.push({\n property: e,\n operator: t,\n value: r,\n aggregate: s\n }), this;\n }\n // where2<P extends PropPath<T>>( property: P, operator: QueryOperator, value: PropPathType<T, P> ) {\n // \tif ( property.indexOf( '.' ) > 0 ) return this.whereDeepProp( property, operator, value )\n // \tlet val = value instanceof Persistent? { id: value.id } : value\n // \tthis.queryObject.operations.push({\n // \t\tproperty,\n // \t\toperator,\n // \t\tvalue: val\n // \t})\n // \treturn this\n // }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.whereDeepProp( 'address.street', '==', 'Main Street' )\n * @see where\n * @see or\n * @see orDeepProp\n */\n whereDeepProp(e, t, r, s) {\n if (this.queryObject.operations?.at(-1)?.aggregate && !s) throw new Error(C.error.invalidQueryOrder);\n const n = e.split(\".\");\n let o = {}, a = n.length > 1 ? o : r;\n return n.slice(1).forEach((c, h) => {\n o[c] = h < n.length - 2 ? {} : r, o = o[c];\n }), this.queryObject.operations?.push({\n property: n[0],\n operator: t,\n value: a,\n aggregate: s\n }), this;\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' ).and( 'age', '>', 18 )\n * @see andDeepProp\n * @see where\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n and(e, t, r) {\n return this.where(e, t, r);\n }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.whereDeepProp( 'address.street', '==', 'Main Street' ).andDeepProp( 'address.city', '==', 'New York' )\n * @see and\n * @see where\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n andDeepProp(e, t, r) {\n return this.whereDeepProp(e, t, r);\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @returns this Query object to make chained calls possible\n * @example\n * query.or( 'name', '==', 'John' )\n * query.or( 'age', '>', 18 )\n * @see orDeepProp\n * @see where\n * @see whereDeepProp\n */\n or(e, t, r) {\n return this.where(e, t, r, !0);\n }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.orDeepProp( 'address.street', '==', 'Main Street' )\n * @see or\n * @see where\n * @see whereDeepProp\n */\n orDeepProp(e, t, r) {\n return this.whereDeepProp(e, t, r, !0);\n }\n /**\n * Defines a where condition to match documents that are instances of the\n * given class\n * @param classId the class name or an instance to match\n * @returns this Query object to make chained calls possible\n * @example\n * query.instanceOf( 'Person' )\n * query.instanceOf( Person )\n * query.instanceOf( Person ).where( 'age', '>', 18 )\n */\n instanceOf(e) {\n const t = e instanceof u ? e.className : e;\n return this.queryObject.operations?.push({\n property: \"__className\",\n operator: \"==\",\n value: t\n }), this;\n }\n /**\n * Executes the query and returns the result\n * @param limit the max amount of documents to retrieve. If not set, uses the\n * last limit set or all the matching documents\n * @returns a promise resolving to a collection of matched documents\n * @example\n * const namedJohn = await query.where( 'name', '==', 'John' ).get()\n */\n get(e) {\n return e && (this.queryObject.limit = e), this.model.query(this.queryObject);\n }\n /**\n * Limits the number of documents to retrieve\n * @param maxDocs the max amount of documents to retrieve\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' ).limit( 10 )\n */\n limit(e) {\n return this.queryObject.limit = e, this;\n }\n /**\n * Orders the result set by a property.\n * @param propertyName The name of the property to order by\n * @param order The sort direction. Possible values are 'asc' and 'desc'\n * @returns a chainable query object\n * @example\n * query.orderBy( 'name', 'asc' )\n * query.orderBy( 'age', 'desc' )\n */\n orderBy(e, t = \"asc\") {\n return this.queryObject.sort = {\n propertyName: e,\n order: t\n }, this;\n }\n /**\n * Orders the result set by a deep property\n * \n * @param propertyPath The full path of the deep property. It should be \n * \t\t\t\t\t\t\t\t\t\t\tseparated by dots like person.name.firstName.\n * @param order The sort direction. Possible values are 'asc' and 'desc'\n * @returns a chainable query object\n */\n orderByDeepProp(e, t = \"asc\") {\n return this.queryObject.sort = {\n propertyName: e,\n order: t\n }, this;\n }\n /**\n * Returns the number of documents that match the query\n * @returns a promise resolving to the number of documents that match the query\n * @example\n * const count = await query.where( 'name', '==', 'John' ).count()\n */\n count() {\n return this.model.count(this.queryObject);\n }\n getQueryObject() {\n return this.queryObject;\n }\n}\nconst y = class y {\n constructor() {\n }\n /**\n * Registers a data source to be used by the store.\n * You need to register a data source before using the store.\n * @param dataSource the data source to be used by the store\n */\n static useDataSource(e) {\n this._dataSource = e;\n }\n /**\n * The data source currently used by the store\n * @returns the data source\n */\n static get dataSource() {\n return y._dataSource;\n }\n /**\n * Retrieves a model for a collection\n * @param classId the class name or an instance of the document type stored in the collection\n * @returns the model for the collection\n */\n static getModel(e) {\n if (!y._dataSource) throw new Error(this.error.shouldBeRegistered);\n return new C(y._dataSource, e);\n }\n /**\n * Retrieves a model for a subcollection \n * @param document the persistent object that owns the subcollection\n * @param subCollection the name of the subcollection\n * @returns the model for the subcollection\n */\n static getModelForSubCollection(e, t) {\n if (!y._dataSource) throw new Error(this.error.shouldBeRegistered);\n return new C(y._dataSource, e, t);\n }\n /**\n * Populates property references with actual data from the store.\n * It will not retrieve data if the instance is already populated\n * @param instance the data to be populated.\n * @returns the populated instance\n */\n static async populate(e) {\n if (!e) return;\n const t = async (r) => {\n const s = r;\n if (!s.__documentReference) return r;\n const o = await this.getModel(s.__documentReference.storedInCollection).findById(s.id, r);\n return o && (o.__documentReference = void 0), o;\n };\n return Array.isArray(e) ? (await Promise.all(\n e.map((s) => t(s))\n )).filter((s) => s) : t(e);\n }\n /**\n * Checks if an instance is populated\n * @param instance the instance or array of instances to be checked\n * @returns true if the instance is populated\n */\n static isPopulated(e) {\n return Array.isArray(e) ? e.reduce(\n (t, r) => t && r.__documentReference === void 0,\n !0\n ) : e.__documentReference === void 0;\n }\n};\ny.error = { shouldBeRegistered: \"You should register a data source before using the data Store.\" };\nlet E = y;\nclass w {\n installCachedPropsUpdaters(e = {}) {\n w.onUpdate = e.onUpdate;\n const t = u.getSystemRegisteredReferencesWithCachedProps(), r = {};\n Object.entries(t).forEach(([n, o]) => {\n o.forEach((a) => {\n const c = u.collectionPath(u.createInstance(n), a);\n r[c] || (r[c] = []), r[c].push({\n prop: a,\n collectionPropOwner: n\n });\n });\n });\n const s = [];\n return Object.entries(r).forEach(([n, o]) => {\n const a = this.subscribeToDocumentChangeListener(n, (c) => w.processDocumentChange(c, o));\n if (a)\n s.push(a);\n else if (e.noThrowOnNonImplementedListener) throw new Error(\"The method documentChangeListener has not been implemented in the concrete data source\");\n }), s;\n }\n /**\n * Installs a document change listener\n * Implement the required logic to install a listener that will be called\n * when a document is changed in your concrete the data source\n * @param collectionPathToListen the name of the collection to be watched\n * @param props the properties to be watched in the collection\n * @param listener the listener to be called when a document is changed\n * @returns a function that uninstalls the listener. If the returned value is undefined\n * the method documentChangeListener has not been implemented in the concrete data source\n */\n subscribeToDocumentChangeListener(e, t) {\n }\n /**\n * Utility method to convert a query object to a property path query object\n * \n * @param queryObject the query object to be converted\n * @returns a property path query object\n * @example\n * const queryObject = {\n * \toperations: [{ property: 'name', operator: '==', value: { ancestorName: { father: 'Felipe' }}]\n * }\n * const propPathQueryObject = DataSource.toPropertyPathQueryObject( queryObject )\n * // returned value: [{ property: 'name.ancestorName.father', operator: '==', value: 'Felipe' }]\n */\n static toPropertyPathOperations(e) {\n return e ? e.map((t) => {\n if (w.isArrayOperator(t.operator) && t.value[0] instanceof u)\n return {\n property: u.searchableArrayNameFor(t.property),\n operator: t.operator,\n value: t.value.map((o) => o.id),\n aggregate: t.aggregate\n };\n const [r, s] = this.toPropertyPathValue(t.value);\n return {\n property: `${String(t.property)}${r ? \".\" + r : \"\"}`,\n operator: t.operator,\n value: s,\n aggregate: t.aggregate\n };\n }) : [];\n }\n static isArrayOperator(e) {\n return e === \"containsAny\" || e === \"contains\";\n }\n static toPropertyPathValue(e) {\n if (typeof e == \"object\" && !Array.isArray(e)) {\n const t = Object.keys(e)[0], [r, s] = this.toPropertyPathValue(e[t]);\n return [`${t}${r ? \".\" + r : \"\"}`, s];\n } else\n return [void 0, e];\n }\n static async processDocumentChange(e, t) {\n if (e.before)\n return t.map(async (r) => {\n const s = E.getModel(r.collectionPropOwner);\n let n = s.find();\n r.prop.cachedPropsConfig?.cachedProps?.forEach((a) => {\n const c = e.before?.[a], h = e.after?.[a];\n c !== h && (n = n.orDeepProp(`${r.prop.name}.${a}`, \"==\", c));\n });\n const o = await n.get();\n return Promise.all([\n o.map(async (a) => {\n r.prop.cachedPropsConfig?.cachedProps?.forEach(async (c) => {\n const h = e.before?.[c], d = e.after?.[c];\n h !== d && (a[`_${r.prop.name}`][`_${c}`] = d, await s.save(a), this.onUpdate?.(a, r.prop));\n });\n })\n ]);\n });\n }\n}\nclass le extends w {\n /**\n * @param jsonRawData the JSON object to be used as data store\n */\n constructor(e) {\n super(), this._jsonRawData = {}, this._lastMatchingDocs = [], this._lastLimit = 0, this._cursor = 0, this._simulateDelay = 0, this._pendingPromises = [], this._documentListeners = {}, this._collectionListeners = {}, this._serverCollectionListeners = {}, e && (this._jsonRawData = e);\n }\n /**\n * Set the JSON object to initialize the data store. Use to set the it after \n * the constructor has been called.\n * @param jsonRawData the JSON object to be used as data store\n */\n setDataStore(e) {\n return this._jsonRawData = e, this;\n }\n /**\n * Introduce a delay in the execution of operations to simulate a real data source\n * @param miliSeconds the number of milliseconds to delay the execution of operations\n * @returns a chainable reference to this object\n */\n simulateDelay(e) {\n return this._simulateDelay = e, this;\n }\n findById(e, t) {\n if (this._simulateError?.findById) throw new Error(this._simulateError.findById);\n return this.resolveWithDelay(this._jsonRawData[t]?.[e]);\n }\n save(e) {\n if (this._simulateError?.store) throw new Error(this._simulateError.store);\n return Object.entries(e).forEach(([t, r]) => {\n this._jsonRawData[t] || (this._jsonRawData[t] = {}), r?.forEach((s) => {\n const n = this._jsonRawData[t][s.id];\n this._jsonRawData[t][s.id] = s, n && this.notifyChange(t, s, n);\n });\n }), this.resolveWithDelay();\n }\n find(e, t) {\n if (this._simulateError?.find) throw new Error(this._simulateError.find);\n const r = Object.values(this._jsonRawData[t] || {});\n return e ? (this._lastLimit = e.limit || 0, this._cursor = 0, this._lastMatchingDocs = Object.entries(e).reduce(\n (s, [n, o]) => this.queryProcessor(s, n, o),\n Object.values(r)\n ), this.resolveWithDelay(this._lastMatchingDocs.slice(0, e.limit))) : this.resolveWithDelay(r);\n }\n delete(e, t) {\n if (this._simulateError?.delete) throw new Error(this._simulateError.delete);\n return delete this._jsonRawData[t][e], this.resolveWithDelay();\n }\n next(e) {\n return e && (this._lastLimit = e), this.incCursor(this._lastLimit), this.resolveWithDelay(this._lastMatchingDocs.slice(this._cursor, this._cursor + this._lastLimit));\n }\n count(e, t) {\n return this.resolveWithDelay(\n Object.keys(this._jsonRawData[t] ?? {}).length\n );\n }\n onCollectionChange(e, t, r) {\n return this._collectionListeners[t] = (s) => {\n if (!s.after) return;\n const n = this.retrieveQueryDocs([s.after], e.operations);\n n.length > 0 && r(n.map((o) => ({\n before: void 0,\n after: o,\n type: s.type,\n params: s.params\n })));\n }, () => delete this._serverCollectionListeners[t];\n }\n onDocumentChange(e, t, r) {\n return this._documentListeners[e] = (s) => {\n s.after && s.after.id === t && r(s);\n }, () => delete this._serverCollectionListeners[e];\n }\n /**\n * @returns the raw data store data as a JSON object\n */\n get rawData() {\n return this._jsonRawData;\n }\n /**\n * Wait for all pending promises to be resolved\n * @returns a promise that resolves when all pending promises are resolved\n */\n wait() {\n return Promise.all([...this._pendingPromises]);\n }\n incCursor(e) {\n this._cursor += e, this._cursor > this._lastMatchingDocs.length && (this._cursor = this._lastMatchingDocs.length);\n }\n simulateError(e) {\n return e === void 0 ? (this._simulateError = void 0, this) : (typeof e == \"string\" ? this._simulateError = {\n store: e,\n find: e,\n findById: e,\n delete: e\n } : this._simulateError = e, this);\n }\n subscribeToDocumentChangeListener(e, t) {\n return delete this._serverCollectionListeners[e], this._serverCollectionListeners[e] = t, {\n uninstall: () => delete this._serverCollectionListeners[e],\n nativeHandler: t,\n collectionPath: e\n };\n }\n notifyChange(e, t, r) {\n const s = {\n before: r,\n after: t,\n collectionPath: e,\n params: {},\n type: r ? \"update\" : \"create\"\n };\n this._serverCollectionListeners[e]?.(s), this._documentListeners[e]?.(s), this._collectionListeners[e]?.(s);\n }\n decCursor(e) {\n return this._cursor -= e, this._cursor < 0 ? (this._cursor = 0, !0) : !1;\n }\n queryProcessor(e, t, r) {\n return {\n limit: (n) => e,\n //.slice( 0, limit ),\n operations: (n) => this.retrieveQueryDocs(e, n),\n sort: ({ order: n, propertyName: o }) => e.sort((a, c) => n === \"asc\" ? this.deepValue(a, o) > this.deepValue(c, o) ? 1 : -1 : this.deepValue(a, o) < this.deepValue(c, o) ? 1 : -1)\n }[t](r);\n }\n retrieveQueryDocs(e, t) {\n return t.reduce((r, s, n) => {\n if (s.aggregate) {\n const o = e.filter((a) => this.isQueryMatched(a, s));\n return n === 0 ? o : r.concat(o);\n } else\n return r.filter((o) => this.isQueryMatched(o, s));\n }, e);\n }\n deepValue(e, t) {\n return t.split(\".\").reduce((s, n) => s[n], e);\n }\n isQueryMatched(e, t) {\n const r = {\n \"==\": (h, d) => h === d,\n \"!=\": (h, d) => h !== d,\n \"<\": (h, d) => h < d,\n \"<=\": (h, d) => h <= d,\n \">\": (h, d) => h > d,\n \">=\": (h, d) => h >= d,\n containsAny: (h, d) => h?.some(($) => d?.includes($)),\n contains: (h, d) => h?.includes(d)\n }, { property: s, value: n, operator: o } = t, [a, c] = this.retrieveValuesToCompare(e, s, n);\n return r[o](a, c);\n }\n retrieveValuesToCompare(e, t, r) {\n const s = e[t];\n if (s && typeof r == \"object\" && !Array.isArray(r)) {\n const a = Object.keys(r)[0];\n var [n, o] = this.retrieveValuesToCompare(s, a, r?.[a]);\n }\n return [n || s, o || r];\n }\n resolveWithDelay(e) {\n if (this._simulateDelay <= 0) return Promise.resolve(e);\n const t = new Promise((r) => {\n setTimeout(\n () => r(e),\n this._simulateDelay\n );\n });\n return this._pendingPromises.push(t), t.finally(\n () => this._pendingPromises = this._pendingPromises.filter((r) => r === t)\n ), t;\n }\n}\nconst v = class v {\n static registerCloudStorage(e, t) {\n v._cloudStorageFactoryMap[e] = t;\n }\n static createInstance(e) {\n const t = v._cloudStorageFactoryMap[e];\n if (!t)\n throw new Error(`You should register the ${e} cloud storage provider prior to use it`);\n return t();\n }\n get className() {\n return this.__className;\n }\n static useCloudStorage(e) {\n v._defaultCloudStorage = e;\n }\n static get defaultCloudStorage() {\n if (!v._defaultCloudStorage)\n throw new Error(\"You should define a default cloud storage provider prior to use it\");\n return v._defaultCloudStorage;\n }\n};\nv._cloudStorageFactoryMap = {};\nlet P = v;\nfunction J(i, e) {\n return P.registerCloudStorage(i, e), (t) => {\n t.prototype.__className = i;\n };\n}\nvar Z = Object.getOwnPropertyDescriptor, G = (i, e, t, r) => {\n for (var s = r > 1 ? void 0 : r ? Z(e, t) : e, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = o(s) || s);\n return s;\n};\nlet j = class extends P {\n constructor(i = \"\") {\n super(), this._simulateDelay = 0, this._pendingPromises = [], this.mockFileSystem = {}, this._pathToMockFiles = i;\n }\n /**\n * Introduce a delay in the execution of operations to simulate a real data source\n * @param miliSeconds the number of milliseconds to delay the execution of operations\n * @returns a chainable reference to this object\n */\n simulateDelay(i) {\n return this._simulateDelay = i, this;\n }\n resolveWithDelay(i) {\n if (this._simulateDelay <= 0) return Promise.resolve(i);\n const e = new Promise((t) => {\n setTimeout(\n () => t(i),\n this._simulateDelay\n );\n });\n return this._pendingPromises.push(e), e.finally(\n () => this._pendingPromises = this._pendingPromises.filter((t) => t === e)\n ), e;\n }\n save(i, e) {\n const t = i;\n this._onProgress && this._onProgress(0, 100), this.mockFileSystem[i] = JSON.stringify(e), this._onProgress && this._onProgress(100, 100);\n const r = e instanceof File ? e.name : t;\n return this.resolveWithDelay(r);\n }\n uploadControl() {\n return {\n resume: () => {\n },\n pause: () => {\n },\n cancel: () => {\n },\n onProgress: (i) => this._onProgress = i\n };\n }\n getUrl(i) {\n return Promise.resolve(this._pathToMockFiles + i);\n }\n delete(i) {\n return delete this.mockFileSystem[i], this.resolveWithDelay();\n }\n};\nj = G([\n J(\"MockCloudStorage\", () => new j())\n], j);\nvar K = Object.defineProperty, X = Object.getOwnPropertyDescriptor, R = (i, e, t, r) => {\n for (var s = r > 1 ? void 0 : r ? X(e, t) : e, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = (r ? o(e, t, s) : o(s)) || s);\n return r && s && K(e, t, s), s;\n}, ee = /* @__PURE__ */ ((i) => (i[i.stored = 0] = \"stored\", i[i.pendingDataSet = 1] = \"pendingDataSet\", i[i.deleted = 2] = \"deleted\", i))(ee || {});\nlet b = class extends u {\n constructor() {\n super(...arguments), this._onChange = new U();\n }\n async save({ data: i, fileName: e, progress: t, cloudStorageProvider: r } = {}) {\n const s = i || this._pendingData;\n s && (this._reference && await this.delete(), this.provider = r || P.defaultCloudStorage, this._originalFileName = e || (s instanceof File ? s.name : void 0), this._reference = await this.provider.save(this.id, s, t), this._url = await this.provider.getUrl(this._reference), this._pendingData = void 0, this._onChange.notify({ event: 0, storedFile: this }));\n }\n uploadControl() {\n return this.provider.uploadControl();\n }\n async delete() {\n if (!this._reference) throw new Error(\"Cannot delete a not stored file\");\n await this.provider.delete(this._reference), this._reference = void 0, this._url = void 0, this._onChange.notify({ event: 2, storedFile: this });\n }\n set provider(i) {\n this._provider = i, this._cloudStorageProviderName = i.className;\n }\n get provider() {\n if (!this._provider)\n try {\n this._provider = P.createInstance(this._cloudStorageProviderName);\n } catch {\n this._provider = P.defaultCloudStorage;\n }\n return this._provider;\n }\n get url() {\n return this._url;\n }\n get mimeType() {\n return this._mimeType;\n }\n setDataToStore(i) {\n return this._pendingData = i, this._originalFileName = i instanceof File ? i.name : void 0, this._mimeType = i instanceof Blob ? i.type : void 0, this._onChange.notify({\n event: 1,\n pendingData: i,\n storedFile: this\n }), this;\n }\n get originalFileName() {\n return this._originalFileName;\n }\n onChange(i) {\n return this._onChange.subscribe(i);\n }\n};\nR([\n S\n], b.prototype, \"_reference\", 2);\nR([\n S\n], b.prototype, \"_url\", 2);\nR([\n S\n], b.prototype, \"_cloudStorageProviderName\", 2);\nR([\n S\n], b.prototype, \"_originalFileName\", 2);\nR([\n S\n], b.prototype, \"_mimeType\", 2);\nb = R([\n z(\"StoredFile\")\n], b);\nclass L {\n}\nconst p = class p extends L {\n constructor() {\n if (super(), this._onAuthStateChange = new U(), !p._authService) throw new Error(p.error.shouldBeRegistered);\n p._authService.onAuthStateChange(\n (e) => this.authStateChanged(e)\n );\n }\n /**\n * Registers an authentication service to be used by the Auth class.\n * You need to register an authentication service before using the Auth class.\n * @param authService the authentication service to be used by the Auth class\n */\n static useAuthService(e) {\n p._authService != e && (p._authService = e, this._instance = void 0);\n }\n /**\n * The instance of the Auth class\n * @returns the authentication service\n */\n static get instance() {\n return this._instance || (this._instance = new this());\n }\n /**\n * Signs up a new user\n * @param singData the data to be used to sign up the user\n * @returns a promise that resolves to the user credentials\n * @example\n * // Sign up a new user with email and password\n * Auth.instance.signUp({ authProvider: 'email', email: 'john@test.com', password: '123456' })\n * // Sign up a new user with a Google account\n * Auth.instance.signUp({ authProvider: 'google'})\n */\n signUp(e) {\n return p._authService.signUp(e);\n }\n /**\n * Logs in an existing user\n * @param singData the data to be used to log in the user\n * @returns a promise that resolves to the user credentials\n * @example\n * // Log in an existing user with email and password\n * Auth.instance.login({ authProvider: 'email', email: 'john@test.com', password: '123456' })\n * // Log in an existing user with a Google account\n * Auth.instance.login({ authProvider: 'google'})\n */\n login(e) {\n return p._authService.login(e);\n }\n /**\n * Logs out the current user\n * @returns a promise that resolves when the user is logged out\n */\n logout() {\n return p._authService.logout();\n }\n /**\n * Resets the password associated with the email.\n * @param email the email address of the user to reset the password\n * @returns a promise that resolves when the process is done\n */\n resetEmailPassword(e) {\n return p._authService.resetEmailPassword(e);\n }\n /**\n * Resends the email verification to the user.\n * @returns a promise that resolves when the process is done\n */\n resendVerificationEmail(e, t, r) {\n return p._authService.resendVerificationEmail(e, t, r);\n }\n refreshToken() {\n return p._authService.refreshToken();\n }\n /**\n * Adds a listener to be called when the authentication state changes.\n * @param onChange the listener to be called when the authentication state changes.\n * The listener is called with the user credentials as a parameter.\n * If the user is logged out, the listener is called with `undefined` as a parameter.\n * @returns a function to remove the listener\n * @example\n * // Add a listener to be called when the authentication state changes\n * const removeListener = Auth.instance.onAuthStateChange( userCredentials => {\n * \tif ( userCredentials ) {\n * \t\t// The user is logged in\n * \t} else {\n * \t\t// The user is logged out\n * \t}\n * })\n */\n onAuthStateChange(e) {\n return this._onAuthStateChange.subscribe(e);\n }\n /**\n * Removes a listener that was added by `onAuthStateChange` method.\n * @param onChange the listener to be removed\n */\n removeAuthStateChange(e) {\n this._onAuthStateChange.unsubscribe(e);\n }\n /**\n * Links an additional authentication provider to the authenticated user.\n * @param provider the provider to be linked\n * @returns a promise that resolves when the process is done\n * @example\n * // Link a Google account to the auth service\n * Auth.instance.linkAdditionalProvider({ authProvider: 'google' })\n */\n linkAdditionalProvider(e) {\n return p._authService.linkAdditionalProvider(e);\n }\n /**\n * Unlinks an authentication provider from the authenticated user.\n * @param provider the provider to be unlinked\n * @returns a promise that resolves when the process is done\n * @example\n * // Unlink the Google account from the auth service\n * Auth.instance.unlinkProvider({ authProvider: 'google' })\n */\n unlinkProvider(e) {\n return p._authService.unlinkProvider(e);\n }\n authStateChanged(e) {\n this._onAuthStateChange.notify(e);\n }\n};\np.error = { shouldBeRegistered: \"You should register an auth service before using Auth.\" }, p._instance = void 0;\nlet F = p;\nclass de extends L {\n constructor() {\n super(...arguments), this.pendingPromises = [], this._fakeRegisteredUsers = {};\n }\n signUp(e) {\n const { verificationLink: t, email: r, password: s, authProvider: n } = e, o = new Promise(async (a, c) => {\n n === \"email\" && (r || c({ code: \"missingEmail\", message: \"missingEmail\" }), s || c({ code: \"missingPassword\", message: \"missingPassword\" })), s !== \"fail\" && r !== \"fail\" ? (this._loggedUser = this.userCredentials(e), this._fakeRegisteredUsers[this._loggedUser.id] = this._loggedUser, a(this._loggedUser), this.notifyChange?.(this._loggedUser)) : (c({ code: \"userNotFound\", message: t || \"Test auth error\" }), this.notifyChange?.(void 0));\n });\n return this.pendingPromises.push(o), o;\n }\n login(e) {\n const t = Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e.email\n );\n return e.authProvider === \"email\" && !t && e.email && (e.email = \"fail\"), this.signUp(e);\n }\n onAuthStateChange(e) {\n this.notifyChange = e, this.notifyChange(this._loggedUser);\n }\n async logout() {\n const e = new Promise((t) => {\n this._loggedUser = void 0, t(), this.notifyChange?.(void 0);\n });\n return this.pendingPromises.push(e), e;\n }\n resetEmailPassword(e) {\n return Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e\n ) ? Promise.resolve() : Promise.reject({ code: \"userNotFound\", message: \"Test auth error\" });\n }\n resendVerificationEmail(e, t, r) {\n return Object.values(this._fakeRegisteredUsers).find(\n (n) => n.email === e\n ) ? Promise.resolve() : Promise.reject({ code: \"userNotFound\", message: \"Test auth error\" });\n }\n refreshToken() {\n return Promise.resolve();\n }\n linkAdditionalProvider(e) {\n throw new Error(\"Not implemented.\");\n }\n unlinkProvider(e) {\n throw new Error(\"Not implemented.\");\n }\n async flush() {\n await Promise.all(this.pendingPromises), this.pendingPromises = [];\n }\n fakeRegisteredUser(e) {\n if (this._fakeRegisteredUsers[e.id]) throw new Error(`User with id ${e.id} already exists in fake user list`);\n return this._fakeRegisteredUsers[e.id] = e, this;\n }\n get fakeRegisteredUsers() {\n return this._fakeRegisteredUsers;\n }\n userCredentials(e) {\n const t = Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e.email\n );\n return t ? { ...t } : {\n id: e.authProvider || `testUID${e.email ? \"-\" + e.email : \"\"}`,\n email: e.email || \"testEmail\",\n name: e.authProvider || `testName${e.email ? \" \" + e.email : \"\"}`,\n phoneNumber: \"testPhone\",\n customData: {\n role: \"test\"\n },\n lastLogin: 0,\n creationDate: 0\n };\n }\n}\nconst g = class g {\n constructor() {\n }\n static useCloudFunctionsService(e) {\n this._cloudFunctionsService != e && (this._cloudFunctionsService = e);\n }\n static get instance() {\n if (!this._cloudFunctionsService) throw new Error(g.error.shouldBeRegistered);\n return g._instance || (g._instance = new g());\n }\n getRawFunction(e) {\n return g._cloudFunctionsService.retrieveFunction(e);\n }\n getFunction(e) {\n const t = g._cloudFunctionsService.callFunction, r = this.getRawFunction(e);\n return async (s) => {\n const n = await t(r, this.processParam(s));\n return this.processResult(n);\n };\n }\n processParam(e) {\n if (e != null)\n return e instanceof u ? e.toObject() : Array.isArray(e) ? e.map((t) => this.processParam(t)) : typeof e == \"object\" ? Object.entries(e).reduce((t, [r, s]) => (t[r] = this.processParam(s), t), {}) : e;\n }\n processResult(e) {\n if (e != null)\n return e.__className ? u.createInstance(e) : Array.isArray(e) ? e.map((t) => this.processResult(t)) : typeof e == \"object\" ? Object.entries(e).reduce((t, [r, s]) => (t[r] = this.processResult(s), t), {}) : e;\n }\n};\ng.error = { shouldBeRegistered: \"You should register a cloud functions service with useCloudFunctionsService static method before using CloudFunctions.\" };\nlet I = g;\nclass fe {\n constructor(e) {\n this._registeredFunctions = e;\n }\n retrieveFunction(e) {\n const t = this._registeredFunctions[e];\n if (!t) throw new Error(`Cloud function ${e} is not registered.`);\n return t;\n }\n callFunction(e, t) {\n return e(t);\n }\n}\nclass V {\n}\nconst m = class m extends V {\n constructor() {\n super();\n }\n static useServerAuthService(e) {\n m._authService != e && (m._authService = e, this._instance = void 0);\n }\n static get instance() {\n if (!m._authService) throw new Error(m.error.shouldBeRegistered);\n return this._instance || (this._instance = new m());\n }\n getUser(e) {\n return m._authService.getUser(e);\n }\n updateUser(e, t) {\n return m._authService.updateUser(e, t);\n }\n setCustomCredentials(e, t) {\n return m._authService.setCustomCredentials(e, t);\n }\n deleteUser(e) {\n return m._authService.deleteUser(e);\n }\n};\nm.error = { shouldBeRegistered: \"You should register a Server Auth service before using the Server Auth.\" }, m._instance = void 0;\nlet N = m;\nclass pe extends V {\n constructor(e) {\n super(), this._userCredentials = e;\n }\n getUser(e) {\n return this._userCredentials[e] || Promise.resolve(void 0), Promise.resolve(this._userCredentials[e]);\n }\n setCustomCredentials(e, t) {\n const r = this._userCredentials[e];\n if (!r) throw new Error(`User ${e} not found in the auth system`);\n return r.customData = { ...t }, Promise.resolve();\n }\n updateUser(e, t) {\n return this._userCredentials[e] = {\n ...this._userCredentials,\n ...t,\n id: e\n }, Promise.resolve(this._userCredentials[e]);\n }\n deleteUser(e) {\n return delete this._userCredentials[e], Promise.resolve();\n }\n get userCredentials() {\n return this._userCredentials;\n }\n}\nfunction me(i, e) {\n return i ? i.replace(/\\${\\s*(\\w*)\\s*}/g, function(t, r) {\n return e[r] || \"\";\n }) : \"\";\n}\nfunction ge(i) {\n return i ? i.replace(\n /([-_ ][\\w])/g,\n (e) => e.toUpperCase().replace(\"-\", \"\").replace(\"_\", \"\").replace(\" \", \"\")\n ) : \"\";\n}\nfunction _e(i, e = \"-\") {\n if (!i) return \"\";\n const t = i.slice(1).replace(/( |[A-Z])/g, (r) => r === \" \" ? \"-\" : e + r[0].toLowerCase());\n return i[0].toLocaleLowerCase() + t.replace(/--/g, \"-\");\n}\nfunction ye(i, e) {\n return e.split(\".\").reduce((t, r) => t[r], i);\n}\nexport {\n F as Auth,\n de as AuthMock,\n L as AuthService,\n I as CloudFunctions,\n fe as CloudFunctionsMock,\n P as CloudStorage,\n w as DataSource,\n he as EntropicComponent,\n le as JsonDataSource,\n j as MockCloudStorage,\n C as Model,\n U as Observable,\n u as Persistent,\n H as Query,\n N as ServerAuth,\n pe as ServerAuthMock,\n V as ServerAuthService,\n E as Store,\n b as StoredFile,\n ee as StoredFileEvent,\n ge as camelCase,\n ye as getDeepValue,\n S as persistent,\n _ as persistentParser,\n ie as persistentPureReference,\n ne as persistentPureReferenceWithCachedProps,\n re as persistentReference,\n te as persistentReferenceAt,\n se as persistentReferenceWithCachedProps,\n J as registerCloudStorage,\n oe as registerLegacyClassName,\n z as registerPersistentClass,\n me as replaceValue,\n ce as required,\n ue as requiredWithValidator,\n ae as searchableArray,\n _e as snakeCase\n};\n//# sourceMappingURL=entropic-bond.js.map\n","import { Callback, Observable } from 'entropic-bond'\n\ninterface ProgressStage {\n\tname: string\n\tprogress: number\n\ttotal: number\n}\n\ninterface ProgressStageCollection {\n\t[ stageName: string ]: ProgressStage\n}\n\nexport interface ProgressEvent {\n\tbusy: boolean\n\tstages: ProgressStageCollection\n\toverallProgress: number\n}\n\nexport class ProgressController {\n\tnotifyBusy( busy: boolean, name?: string ) {\n\t\tthis.pushStage({\n\t\t\tname: name ?? '', progress: busy? 0 : 1, total: 1\n\t\t})\n\t}\n\n\tpushStage( stage: ProgressStage ) {\n\t\tthis._stages[ stage.name ] = stage\n\n\t\tconst overallProgress = Object.values( this._stages ).reduce( (prev, stage, _i, arr )=>{\n\t\t\treturn prev + stage.progress / stage.total / arr.length\n\t\t}, 0)\n\t\t\n\t\tthis._onProgress.notify({\n\t\t\tbusy: overallProgress < 1,\n\t\t\toverallProgress,\n\t\t\tstages: this._stages\n\t\t})\n\n\t\tif ( overallProgress >= 1 ) this._stages = {}\n\t\tif ( this.debug ) console.log( `ProgressController ${ stage.name }: Progress: ${ stage.progress } Stages: ${ stage.total }` )\n\t}\n\n\tonProgress( cb: Callback<ProgressEvent> ) {\n\t\treturn this._onProgress.subscribe( cb )\n\t}\n\n\tset debug( value: boolean ) {\n\t\tthis._debug = value\n\t}\n\t\n\tget debug(): boolean {\n\t\treturn this._debug\n\t}\n\t\n\tprivate _debug: boolean = false\n\tprivate _stages: ProgressStageCollection = {}\n\tprivate _onProgress: Observable<ProgressEvent> = new Observable<ProgressEvent>()\n}","import { Callback, ClassPropNames, EntropicComponent, Model, Observable, PropChangeEvent, Unsubscriber, Query } from 'entropic-bond'\nimport { ProgressController, ProgressEvent } from './progress-controller'\n\ntype CrudControllerAction = 'saved' | 'deleted' | 'populated' | 'filterChange'\n\nexport interface CrudControllerEvent<T extends EntropicComponent> {\n\tdocumentProps?: PropChangeEvent<T> \n\tdocumentChanged?: T\n\tdocumentCollection?: T[]\n\taction?: CrudControllerAction\n\t/** deprecated */\terror?: Error \n}\n\ninterface GlobalValidator<T extends EntropicComponent> {\n\tfunc: ( document: T ) => boolean\n\terrorMessage?: string\n}\n\ntype ValidatorFunction<V> = ( value: V ) => boolean \ntype ValidatorCollection<T extends EntropicComponent> = {\n\t[ prop in ClassPropNames<T> ]: {\n\t\tfunc: ValidatorFunction<T[prop]>\n\t\terrorMessage?: string\n\t}\n}\n\nexport abstract class CrudController<T extends EntropicComponent> {\n\tstatic readonly errorMessages = {\n\t\tmissedDocument: 'No document to save',\n\t}\n\n\tconstructor( document?: T ) {\n\t\tthis.setDocument( document || this.createDocument() )\n\t}\n\n\tprotected abstract createDocument(): T \n\tprotected abstract getModel(): Model<T> \n\t\n\tallRequiredPropertiesFilled(): boolean {\n\t\treturn this.nonFilledRequiredProperties.length <= 0 && this.validateGlobal()\n\t}\n\n\tget nonFilledRequiredProperties(): ClassPropNames<T>[] {\n\t\treturn this.requiredProperties.filter( prop => this.validateProp( prop ))\n\t}\n\n\tget requiredProperties(): ClassPropNames<T>[] {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tconst decoratorDeclared = this.document.getPersistentProperties()\n\t\t\t.filter( prop => this.document.isRequired( prop.name as ClassPropNames<T> ) )\n\t\t\t.map( prop => prop.name )\n\n\t\tconst uniqueValues = new Set( decoratorDeclared.concat( Object.keys( this.validator )))\n\t\treturn [ ...uniqueValues ] as ClassPropNames<T>[]\n\t}\n\n\taddValidator<P extends ClassPropNames<T>>( prop: P, validatorFn: ValidatorFunction<T[P]>, errorMessage?: string ) {\n\t\tthis.validator[ prop ] = {\n\t\t\tfunc: validatorFn,\n\t\t\terrorMessage\n\t\t}\n\t}\n\n\tremoveValidator( prop: ClassPropNames<T> ) {\n\t\tdelete this.validator[ prop ]\n\t}\n\n\taddGlobalValidator( validatorFn: ValidatorFunction<T>, errorMessage?: string ) {\n\t\tthis.globalValidator = {\n\t\t\tfunc: validatorFn,\n\t\t\terrorMessage\n\t\t}\n\t}\n\n\tremoveGlobalValidator() {\n\t\tthis.globalValidator = undefined\n\t}\n\n\tfailedValidationError( prop?: ClassPropNames<T> ): string | undefined {\n\t\tif ( prop ) return this.validator[ prop ]?.errorMessage\n\n\t\tconst nonFilledProperty = this.nonFilledRequiredProperties[0]\n\t\tif ( nonFilledProperty ) return this.validator[ nonFilledProperty ]?.errorMessage\n\t\treturn this.globalValidator?.errorMessage\n\t}\n\n\tprivate validateProp( prop: ClassPropNames<T> ): boolean {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tconst propVal = this.document[ prop ]\n\n\t\tif ( this.validator[ prop ] ) return !this.validator[ prop ].func( propVal )\n\t\treturn !this.document.isPropValueValid( prop )\n\t}\n\n\tprivate validateGlobal(): boolean {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tif ( this.globalValidator ) return this.globalValidator.func( this.document )\n\t\telse return true\n\t}\n\n\tprotected storeDoc(): Promise<void> {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\t\treturn this.model.save( this.document )\n\t}\n\n\tprotected deleteDoc(): Promise<void> {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\t\treturn this.model.delete( this.document.id )\n\t}\n\n\t/**\n\t * Override this method to customize the query used to retrieve the documents \n\t * in the documentCollection method. This is the default method used by \n\t * the documentCollection method. If the findDocs method is overridden and returns\n\t * non undefined value, then this queryDocs method will not be used.\n\t * \n\t * @param limit the maximum number of documents to retrieve\n\t * @returns a query to retrieve the documents\n\t * @see documentCollection\n\t * @see findDocs\n\t */\n\tprotected queryDocs( limit?: number ): Query<T> {\n\t\tlet query = this.model.find()\n\n\t\tif ( limit ) query = query.limit( limit )\n\n\t\treturn query\n\t}\n\n\t/**\n\t * Override this method to customize the query used to retrieve the documents \n\t * in the documentCollection method. The default method called by the \n\t * documentCollection method is the queryDocs method. If this findDocs method \n\t * returns a non undefined value, then this method will be used instead of the\n\t * queryDocs method.\n\t * \n\t * @param limit the maximum number of documents to retrieve\n\t * @returns a query to retrieve the documents\n\t * @see documentCollection\n\t * @see queryDocs\n\t */\n\tprotected findDocs( limit?: number ): Promise<T[]> | undefined {\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Sets a filter function to filter in memory the documents returned by the `documentCollection` method.\n\t * \n\t * @param filter the filter function\n\t * @returns the controller itself\n\t */\n\tasync setFilter( filter: ( document: T ) => boolean ) {\n\t\tthis._filter = filter\n\t\tthis.onChangeHdl.notify({ action: 'filterChange' })\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes the filter function set by the `setFilter` method.\n\t * @returns the controller itself\n\t */\n\tresetFilter() {\n\t\tthis._filter = undefined\n\t\tthis.onChangeHdl.notify({ action: 'filterChange' })\n\t\treturn this\n\t}\n\t\n\tonChange( observer: Callback<CrudControllerEvent<T>> ) {\n\t\treturn this.onChangeHdl.subscribe( observer )\n\t}\n\n\t/**\n\t * Notifies the observer of any error that occurs during the execution of the controller.\n\t * If there are no subscribers to this event, the error will be thrown.\n\t * \n\t * @param observer \n\t * @returns the unsubscriber function\n\t */\n\tonError( observer: Callback<Error> ) {\n\t\treturn this.onErrorHdl.subscribe( observer )\n\t}\n\n\tprotected notifyChange<U extends CrudControllerEvent<T>>( event: U ) {\n\t\tthis.onChangeHdl.notify( event )\n\t}\n\n\tnewDocument() {\n\t\treturn this.setDocument( this.createDocument() )\n\t}\n\n\tasync storeDocument() {\n\t\tconst progressStage = 'Saving main document'\n\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tawait this.storeDoc()\n\n\t\t\tthis.onChangeHdl.notify({\n\t\t\t\tdocumentCollection: await this.documentCollection(),\n\t\t\t\taction: 'saved'\n\t\t\t})\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\t}\n\n\tasync deleteDocument() {\n\t\tconst progressStage = 'Delete main document'\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tawait this.deleteDoc()\n\n\t\t\tthis.onChangeHdl.notify({\n\t\t\t\tdocumentCollection: await this.documentCollection(),\n\t\t\t\taction: 'deleted'\n\t\t\t})\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\t}\n\t\t\n\tasync documentCollection( limit?: number ): Promise<T[]> {\n\t\tconst progressStage = 'Retrieving document collection'\n\t\tlet found: T[] = []\n\t\t\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tconst docPromise = this.findDocs( limit )\n\t\t\tif ( docPromise ) found = await docPromise\n\t\t\telse found = await this.queryDocs( limit ).get()\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.onChangeHdl.notify({\tdocumentCollection: found\t})\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\n\t\treturn found\n\t}\n\n\tfilter( docs: T[] ): T[] {\n\t\treturn docs.filter( doc => this._filter?.( doc ) ?? true )\n\t}\n\n\tonProgress( observer: Callback<ProgressEvent> ) {\n\t\treturn this.progressController.onProgress( observer )\n\t}\n\n\tprotected get model() {\n\t\treturn this.getModel()\n\t}\n\n\tsetDocument( value: T ): this {\n\t\tif ( this._document !== value ) {\n\n\t\t\tif ( this.unsubscribeDocument ) this.unsubscribeDocument()\n\n\t\t\tif ( value ) {\n\t\t\t\tthis.unsubscribeDocument = value.onChange( e => this.onChangeHdl.notify({ documentProps: e } ) )\n\t\t\t}\n\n\t\t\tthis._document = value\n\t\t\tthis.onChangeHdl.notify({ documentChanged: this._document })\n\t\t}\n\n\t\treturn this\n\t}\n\n\tset document( value: T ) {\n\t\tthis.setDocument( value )\n\t}\n\t\n\tget document(): T {\n\t\treturn this._document\n\t}\n\n\t/**\n\t * Use this method to throw an error in a controlled way.\n\t * It will notify the subscribers of the `onError` event and throw the error \n\t * if there are no subscribers to the `onError` event.\n\t * \n\t * @param error the error to throw\n\t */\n\tprotected managedThrow( error: Error | string | any ) {\n\t\t/* deprecated */ this.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\tif ( this.throwOnError ) throw this.errorToError( error )\n\t}\n\n\tprotected errorToError( error: any ): Error {\n\t\tif ( error instanceof Error ) return error\n\t\tif ( typeof error === 'string' ) return new Error( error )\n\t\tif ( 'code' in error ) return new Error( error.code )\n\t\tif ( 'message' in error ) return new Error( error.error )\n\t\treturn new Error( JSON.stringify( error ) )\n\t}\n\n\tprotected get throwOnError() {\n\t\treturn this.onErrorHdl.subscribersCount === 0 \n\t}\n\n\tprotected progressController: ProgressController = new ProgressController()\n\tprotected onChangeHdl: Observable<CrudControllerEvent<T>> = new Observable<CrudControllerEvent<T>>()\n\tprotected onErrorHdl: Observable<Error> = new Observable<Error>()\n\tprivate _document!: T\n\tprivate unsubscribeDocument: Unsubscriber | undefined\n\tprivate _filter: (( document: T ) => boolean ) | undefined\n\tprivate validator = {} as ValidatorCollection<T>\n\tprivate globalValidator: GlobalValidator<T> | undefined\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.3\";\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.2.3\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"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 validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { EntropicComponent, snakeCase, Unsubscriber } from 'entropic-bond'\nimport { cloneElement, Component, ReactElement, JSX } from 'react'\nimport { CrudController } from './crud-controller'\n\nenum Mode { normal, add, edit }\n\nexport interface CrudCardProps<T extends EntropicComponent> {\n\tdocument: T\n\tonSelect: ( document: T ) => void\n\tonDelete: ( document: T ) => void\n}\n\nexport interface CrudContentViewProps<T extends EntropicComponent> {\n\tcontroller: CrudController<T>\n\tsubmitButtonCaption: string\n\tonSubmit: ( document: T ) => void\n\tonCancel: ()=>void\n}\n\nexport interface CrudPanelLabels {\n\taddNewDocumentLabel: string\n\taddButtonLabel: string\n\tupdateButtonLabel: string\n\tsingularDocumentInCollectionCaption?: string\n\tdocumentsInCollectionCaption: string\n\tnoDocumentsFoundLabel: string\n}\n\nexport type Layout = 'formOrItems' | 'itemsAlways' | 'formAndItems'\n\ninterface CrudPanelState<T extends EntropicComponent> {\n\tdocuments: T[]\n\tmode: Mode\n}\n\ninterface CrudPanelProps<T extends EntropicComponent> {\n\tcontroller: CrudController<T>\t\n\tlabels?: CrudPanelLabels | ( ( controller: CrudController<T> ) => CrudPanelLabels )\n\tlayout?: Layout\n\tchildren: [\n\t\t( ( props: CrudContentViewProps<T> ) => ReactElement ) | ReactElement<CrudContentViewProps<T>>,\n\t\t( ( props: CrudCardProps<T> ) => ReactElement ) | ReactElement<CrudCardProps<T>>\n\t]\n\tclassName?: string\n\tcardAddButton?: boolean | JSX.Element\n\theader?: string | JSX.Element | ( ( controller: CrudController<T>, newDocumentAction: ()=>void, labels: CrudPanelLabels ) => string | JSX.Element )\n\tfooter?: string | JSX.Element | ( ( controller: CrudController<T>, newDocumentAction: ()=>void, labels: CrudPanelLabels ) => string | JSX.Element )\n}\n\nexport class CrudPanel<T extends EntropicComponent> extends Component<CrudPanelProps<T>, CrudPanelState<T>> {\n\n\tconstructor( props: CrudPanelProps<T> ) {\n\t\tsuper( props )\n\n\t\tthis.state = {\n\t\t\tdocuments: [],\n\t\t\tmode: Mode.normal,\n\t\t}\n\t}\n\n\toverride async componentDidMount() {\n\t\tconst { controller } = this.props\n\n\t\tthis.unsubscriber = controller.onChange( event => {\n\t\t\tif ( event.documentCollection ) {\n\t\t\t\tthis.unfilteredDocuments = event.documentCollection\n\t\t\t\tthis.setState({\n\t\t\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t\t\t})\n\t\t\t}\n\t\t\tif ( event.action === 'filterChange' ) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t\t\t})\n\t\t\t}\n\t\t\telse this.setState({})\n\t\t})\n\n\t\tthis.unfilteredDocuments = await controller.documentCollection()\n\t\tthis.setState({\n\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t})\n\t}\n\n\toverride componentWillUnmount() {\n\t\tthis.unsubscriber?.()\n\t}\n\n\tprivate newDocument() {\n\t\tthis.props.controller.newDocument()\n\n\t\tthis.setState({\n\t\t\tmode: Mode.add,\n\t\t})\n\t}\n\n\tprivate editDocument( document: T ) {\n\t\tthis.props.controller.setDocument( document )\n\n\t\tthis.setState({\n\t\t\tmode: Mode.edit\n\t\t})\n\t}\n\n\tprivate async storeDocument( document: T ) {\n\t\tconst { controller, layout } = this.props\n\t\tcontroller.setDocument( document )\n\t\tawait controller.storeDocument()\n\n\t\tif ( layout === 'formAndItems' ) {\n\t\t\tthis.newDocument()\n\t\t}\n\t\telse {\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.normal,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate invokeContentViewChild( labels : CrudPanelLabels ) {\n\t\tconst { children, layout, controller } = this.props\n\t\tconst { mode } = this.state\n\t\tconst closeOnCancel = layout !== 'formAndItems'\n\t\tif ( !controller.document ) return\n\n\t\tconst props: CrudContentViewProps<T> = {\n\t\t\tcontroller: controller,\n\t\t\tsubmitButtonCaption: mode==Mode.edit? labels?.updateButtonLabel : labels?.addButtonLabel,\n\t\t\tonSubmit: ( document: T ) => this.storeDocument( document ),\n\t\t\tonCancel: closeOnCancel\n\t\t\t\t? ()=>this.setState({ mode: Mode.normal })\n\t\t\t\t: ()=>this.newDocument(),\n\t\t}\n\n\t\tif ( typeof children[0] === 'function' ) {\n\t\t\treturn cloneElement( children[0] (props), { key: controller.document.id })\n\t\t}\n\t\telse {\n\t\t\treturn cloneElement( children[0], { key: controller.document.id, ...props })\t\n\t\t}\t\t\n\t}\n\n\tprivate invokeDetailViewChild( document: T ) {\n\t\tconst { children, controller } = this.props\n\n\t\tconst props: CrudCardProps<T> = {\n\t\t\tdocument,\n\t\t\tonSelect: (document: T) => this.editDocument( document ),\n\t\t\tonDelete: (document: T) => controller.setDocument( document ).deleteDocument()\n\t\t}\n\n\t\tif ( typeof children[1] === 'function' ) {\n\t\t\treturn cloneElement( children[1]( props ), { key: document.id } )\n\t\t}\n\t\telse {\n\t\t\treturn cloneElement( children[1], { key: document.id, ...props } )\n\t\t}\n\t}\n\n\toverride render() {\n\t\tconst { mode, documents } = this.state\n\t\tconst { className, cardAddButton, controller } = this.props\n\t\tconst docClassName = snakeCase( controller.document?.className )\n\t\tlet labels = this.props.labels || {} as CrudPanelLabels\n\t\tconst layout = this.props.layout || 'itemsAlways'\n\n\t\tif ( typeof labels === 'function' ) labels = labels( controller )\n\n\t\tconst { addNewDocumentLabel, singularDocumentInCollectionCaption, documentsInCollectionCaption, noDocumentsFoundLabel } = labels\n\n\t\treturn (\n\t\t\t<div className={`crud-panel ${ docClassName } ${ className || '' }`}>\n\n\t\t\t\t{ mode === Mode.normal && layout !== 'formAndItems' && !cardAddButton &&\n\t\t\t\t\t<div className=\"header\">\n\n\t\t\t\t\t\t{ this.props.header\n\t\t\t\t\t\t\t? typeof this.props.header === 'function'\n\t\t\t\t\t\t\t\t? this.props.header( controller, ()=> this.newDocument(), labels )\n\t\t\t\t\t\t\t\t: this.props.header\n\t\t\t\t\t\t\t:\t<button onClick={ ()=> this.newDocument() }>\n\t\t\t\t\t\t\t\t\t{\taddNewDocumentLabel\t}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t</div>\n\n\t\t\t\t}\n\n\t\t\t\t{ ( layout === 'formAndItems' || mode === Mode.add || mode === Mode.edit ) &&\n\n\t\t\t\t\t<div className=\"content-panel\">\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.invokeContentViewChild( labels )\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t{ ( layout==='itemsAlways' || layout === 'formAndItems'\t|| mode === Mode.normal ) &&\n\n\t\t\t\t\t<div className=\"collection-panel\">\n\t\t\t\t\t\t{ documents?.length > 0 &&\n\t\t\t\t\t\t\t<h3>\n\t\t\t\t\t\t\t\t{ documents.length > 1\n\t\t\t\t\t\t\t\t\t? documentsInCollectionCaption \n\t\t\t\t\t\t\t\t\t: singularDocumentInCollectionCaption || documentsInCollectionCaption\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<div className=\"documents\">\n\t\t\t\t\t\t\t{ cardAddButton &&\n\t\t\t\t\t\t\t\t<div className=\"crud-card card-add-button clickable\" \n\t\t\t\t\t\t\t\t\tonClick={ ()=> this.newDocument() }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"button-element\">{\tcardAddButton }</div>\n\t\t\t\t\t\t\t\t\t<div className=\"add-label\">{\taddNewDocumentLabel\t}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ documents?.length\n\t\t\t\t\t\t\t\t? documents.map( (document: T) => this.invokeDetailViewChild( document ) )\n\t\t\t\t\t\t\t\t: <p>{ noDocumentsFoundLabel }</p>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t<div className=\"footer\">\n\t\t\t\t\t{ this.props.footer &&\n\t\t\t\t\t\ttypeof this.props.footer === 'function'\n\t\t\t\t\t\t\t? this.props.footer( controller, ()=> this.newDocument(), labels )\n\t\t\t\t\t\t\t: this.props.footer\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\n\tprivate unsubscriber: Unsubscriber | undefined\n\tprivate unfilteredDocuments: T[] = []\n}\n"],"names":["U","e","t","f","i","M","O","T","x","B","A","W","r","Q","q","Y","s","n","o","l","k","S","u","_","z","v","P","J","G","j","K","X","R","b","_e","ProgressController","Observable","busy","name","stage","overallProgress","prev","_i","arr","cb","value","_CrudController","document","prop","decoratorDeclared","validatorFn","errorMessage","nonFilledProperty","propVal","limit","query","filter","observer","event","progressStage","error","found","docPromise","docs","doc","CrudController","REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","REACT_PORTAL_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_ACTIVITY_TYPE","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","ReactNoopUpdateQueue","assign","emptyObject","Component","props","context","updater","partialState","callback","ComponentDummy","PureComponent","pureComponentPrototype","isArrayImpl","noop","ReactSharedInternals","hasOwnProperty","ReactElement","refProp","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","match","userProvidedKeyEscapeRegex","getElementKey","element","index","resolveThenable","thenable","fulfilledValue","mapIntoArray","children","array","escapedPrefix","nameSoFar","invokeCallback","c","nextNamePrefix","mapChildren","func","result","count","child","lazyInitializer","payload","ctor","moduleObject","reportGlobalError","Children","forEachFunc","forEachContext","react_production","size","fn","childArray","defaultValue","childrenLength","render","compare","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","usable","action","initialState","permalink","deps","Context","initialValue","create","ref","passthrough","reducer","initialArg","init","subscribe","getSnapshot","getServerSnapshot","defineDeprecationWarning","methodName","info","warnNoop","publicInstance","callerName","warningKey","didWarnStateUpdateForUnmountedComponent","testStringCoercion","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_SUSPENSE_LIST_TYPE","innerType","getTaskName","getOwner","dispatcher","UnknownOwner","hasValidKey","getter","defineKeyPropWarningGetter","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","owner","debugStack","debugTask","validateChildKeys","node","childKey","didWarnAboutMaps","ioInfo","_ioInfo","_ioInfo2","resolveDispatcher","releaseAsyncTransition","enqueueTask","task","enqueueTaskImpl","requireString","module","didWarnAboutMessageChannel","channel","aggregateErrors","errors","popActScope","prevActQueue","prevActScopeDepth","actScopeDepth","recursivelyFlushAsyncActWork","resolve","reject","queue","flushActQueue","isFlushing","continuation","deprecatedAPIs","fnName","createTask","callStackForError","didWarnAboutOldJSXRuntime","unknownOwnerDebugStack","unknownOwnerDebugTask","didWarnNoAwaitAct","queueSeveralMicrotasks","exports","didAwaitActCall","error$0","_thrownError","returnValue$jscomp$0","getCurrentStack","a","refObject","elementType","ownName","lazyType","formatterFn","reactModule","require$$0","require$$1","jsxDEVImpl","isStaticChildren","keys","didWarnAboutKeySpread","React","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","CrudPanel","controller","layout","labels","mode","closeOnCancel","cloneElement","documents","className","cardAddButton","docClassName","snakeCase","addNewDocumentLabel","singularDocumentInCollectionCaption","documentsInCollectionCaption","noDocumentsFoundLabel","jsxs","jsx"],"mappings":"wPAAA,MAAMA,CAAE,CACN,aAAc,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,IAAS,IAEnEY,EAAAA,KAAC,MAAA,CAAI,UAAU,mBACZ,SAAA,CAAAT,GAAW,OAAS,GACrBU,EAAAA,IAAC,KAAA,CACE,WAAU,OAAS,EAClBH,EACAD,GAAuCC,CAAA,CAE3C,EAGDE,EAAAA,KAAC,MAAA,CAAI,UAAU,YACZ,SAAA,CAAAP,GACDO,EAAAA,KAAC,MAAA,CAAI,UAAU,sCACd,QAAU,IAAK,KAAK,YAAA,EAEpB,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAI,UAAU,iBAAmB,SAAAR,EAAe,EACjDQ,EAAAA,IAAC,MAAA,CAAI,UAAU,YAAc,SAAAL,CAAA,CAAqB,CAAA,CAAA,CAAA,EAGlDL,GAAW,OACVA,EAAU,IAAMjO,GAAgB,KAAK,sBAAuBA,CAAS,CAAE,EACvE2O,EAAAA,IAAC,KAAI,SAAAF,CAAA,CAAuB,CAAA,CAAA,CAEhC,CAAA,EACD,EAIDE,EAAAA,IAAC,MAAA,CAAI,UAAU,SACZ,SAAA,KAAK,MAAM,QACZ,OAAO,KAAK,MAAM,QAAW,WAC1B,KAAK,MAAM,OAAQhB,EAAY,IAAK,KAAK,YAAA,EAAeE,CAAO,EAC/D,KAAK,MAAM,MAAA,CAEhB,CAAA,EACD,CAEF,CAID","x_google_ignoreList":[0,3,4,5,6,7,8]}
1
+ {"version":3,"file":"entropic-bond-crud-panel.umd.cjs","sources":["../node_modules/entropic-bond/lib/entropic-bond.js","../src/progress-controller.ts","../src/crud-controller.ts","../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react.production.js","../node_modules/react/cjs/react.development.js","../node_modules/react/index.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/crud-panel.tsx"],"sourcesContent":["class k {\n constructor() {\n this.subscribers = /* @__PURE__ */ new Set();\n }\n /**\n * Subscribes a listener callback function. On every notification, \n * the listener callback will be called with an event as a parameter if sent.\n * \n * @param callback the listener callback\n * @returns a function to unsubscribe the listener from further notifications\n */\n subscribe(e) {\n return this.subscribers.add(e), () => this.unsubscribe(e);\n }\n /**\n * Removes the callback from the notification list.\n * \n * @param listenerCallback the listener callback to remove\n */\n unsubscribe(e) {\n this.subscribers.delete(e);\n }\n /**\n * Notifies all the subscribers with the event passed as parameter.\n * \n * @param event the event passed to all subscribers.\n */\n notify(e) {\n this.subscribers.forEach((t) => t(e));\n }\n /**\n * Returns the number of subscribers.\n * \n * @returns the number of subscribers\n * @example\n * const observable = new Observable<number>()\n * observable.subscribe( event => console.log( event ) )\n * observable.subscribe( event => console.log( event ) )\n * observable.subscribe( event => console.log( event ) )\n * console.log( observable.subscribersCount ) // 3\n */\n get subscribersCount() {\n return this.subscribers.size;\n }\n}\nconst f = [];\nfor (let i = 0; i < 256; ++i)\n f.push((i + 256).toString(16).slice(1));\nfunction B(i, e = 0) {\n return (f[i[e + 0]] + f[i[e + 1]] + f[i[e + 2]] + f[i[e + 3]] + \"-\" + f[i[e + 4]] + f[i[e + 5]] + \"-\" + f[i[e + 6]] + f[i[e + 7]] + \"-\" + f[i[e + 8]] + f[i[e + 9]] + \"-\" + f[i[e + 10]] + f[i[e + 11]] + f[i[e + 12]] + f[i[e + 13]] + f[i[e + 14]] + f[i[e + 15]]).toLowerCase();\n}\nlet N;\nconst Q = new Uint8Array(16);\nfunction q() {\n if (!N) {\n if (typeof crypto > \"u\" || !crypto.getRandomValues)\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n N = crypto.getRandomValues.bind(crypto);\n }\n return N(Q);\n}\nconst Y = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), L = { randomUUID: Y };\nfunction z(i, e, t) {\n i = i || {};\n const r = i.random ?? i.rng?.() ?? q();\n if (r.length < 16)\n throw new Error(\"Random bytes length must be >= 16\");\n return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, B(r);\n}\nfunction H(i, e, t) {\n return L.randomUUID && !i ? L.randomUUID() : z(i);\n}\nvar J = Object.defineProperty, Z = (i, e, t, r) => {\n for (var s = void 0, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = o(e, t, s) || s);\n return s && J(e, t, s), s;\n}, u;\nconst $ = (u = class {\n /**\n * Registers a class to be used by the persistence engine.\n * @param className the name of the class to be registered\n * @param factory the constructor of the registered class\n * @param annotation an annotation associated with the class\n */\n static registerFactory(e, t, r, s = !1) {\n this._factoryMap[e] = { factory: t, annotation: r, isLegacy: s };\n }\n /**\n * Returns the constructor of a registered class\n * @param className the name of the class to be retrieved\n * @returns the constructor of the class\n * @throws an error if the class is not registered\n * @see registerFactory\n * @see registeredClasses\n * @see classesExtending\n * @see annotations\n */\n static classFactory(e) {\n if (!e) throw new Error(\"You should provide a class name.\");\n if (!this._factoryMap[e]) throw new Error(`You should register class ${e} prior to use.`);\n return this._factoryMap[e].factory;\n }\n /**\n * Returns the names of all registered classes\n * @returns the names of all registered classes\n * @see registerFactory\n * @see classFactory\n */\n static registeredClasses() {\n return Object.entries(this._factoryMap).filter(([, e]) => !e.isLegacy).map(([e]) => e);\n }\n /**\n * Returns the names of all registered classes, including legacy names\n * @returns the names of all registered classes, including legacy names\n * @see registerFactory\n * @see classFactory\n */\n static registeredClassesAndLegacyNames() {\n return Object.keys(this._factoryMap);\n }\n /**\n * Returns the names of all registered classes that extend a given class\n * @param derivedFrom the parent class to be queried\n * @returns the names of all registered classes that extend the given class\n * @see registerFactory\n * @see classFactory\n */\n static classesExtending(e) {\n return Object.entries(this._factoryMap).filter(([, t]) => new t.factory() instanceof e && !t.isLegacy).map(([t]) => t);\n }\n /**\n * Returns the annotation associated with a registered class\n * @param className the name of the class to be retrieved\n * @returns the annotation associated with the class\n * @throws an error if the class is not registered\n * @see registerFactory\n */\n static annotations(e) {\n if (e instanceof u ? e = e.className : typeof e == \"string\" || (e = new e().className), !this._factoryMap[e]) throw new Error(`You should register class ${e} prior to use.`);\n return this._factoryMap[e].annotation;\n }\n /**\n * Returns a new instance of Persistent class.\n * @param className the initial id of this instance. If not provided, a new id will be generated\n */\n constructor(e = H()) {\n this._id = e;\n }\n /**\n * Gets the class name of this instance.\n */\n get className() {\n return this.__className;\n }\n /**\n * Sets the id of this instance.\n * @param value the id of this instance\n */\n setId(e) {\n this._id = e;\n }\n /**\n * Returns the id of this instance.\n * @returns the id of this instance\n */\n get id() {\n return this._id;\n }\n /**\n * This method is called by the persistence engine when the instance has been\n * just serialized. It is called after the properties are initialized with \n * serialized data.\n */\n afterDeserialize() {\n }\n /**\n * This method is called by the persistence engine before the instance is\n * serialized. \n */\n beforeSerialize() {\n }\n /**\n * Returns an array of the persistent properties of this instance.\n * @returns an array of the persistent properties of this instance\n */\n getPersistentProperties() {\n return this._persistentProperties ? this._persistentProperties.map((e) => ({\n ...e,\n name: e.name.slice(1)\n })) : [];\n }\n /**\n * Get the property information of this instance\n * @param propName the persistent property name\n * @returns the property information\n */\n getPropInfo(e) {\n const t = this.getPersistentProperties().find((r) => r.name === e);\n if (!t) throw new Error(`Property \"${e}\" has not been registered.`);\n return t;\n }\n /**\n * Query if the property is required\n * To mark a property as required, use the @required decorator\n * @param propName the persistent property name\n * @returns true if the property is required\n * @see required\n */\n isRequired(e) {\n const t = this.getPropInfo(e).validator;\n return t != null;\n }\n /**\n * Query if the property value is valid\n * Define the validator function using the @required decorator\n * @param propName the persistent property name\n * @returns true if the property value is valid using the validator function\n * passed to the @required decorator\n * @see required\n */\n isPropValueValid(e) {\n const t = this.getPropInfo(e);\n return t.validator ? t.validator(this[t.name], t, this) : !0;\n }\n /**\n * Copy the persistent properties of the given instance to this instance. \n * The property `id` will be ignored.\n * Only the properties that are not null or undefined will be copied.\n * @param instance the instance to be copied\n * @returns this instance\n * @see fromObject\n * @see toObject\n */\n clone(e) {\n const t = e.toObject();\n return delete t.id, this.fromObject(t);\n }\n /**\n * Initializes the persistent properties of this instance from the properties \n * of given object.\n * @param obj the object to be copied\n * @returns this instance\n * @see clone\n * @see toObject\n */\n fromObject(e) {\n return this.fromObj(e), this.afterDeserialize(), this;\n }\n fromObj(e) {\n return this._persistentProperties ? (this._persistentProperties.forEach((t) => {\n const r = this.removeUnderscore(t), s = e[r];\n s != null && (this[t.name] = this.fromDeepObject(s));\n }), this) : this;\n }\n /**\n * Returns a plain object representation of this instance.\n * Only the properties that are not null or undefined will be copied.\n * @returns a plain object representation of this instance\n * @see fromObject\n * @see clone\n */\n toObject() {\n const e = {}, t = this.toObj(e);\n return this.pushDocument(e, this.className, t), {\n ...t,\n __rootCollections: e\n };\n }\n toObj(e) {\n if (!this._persistentProperties) return {};\n this.beforeSerialize();\n const t = {};\n if (!this.className) throw new Error(`You should register \\`${this.constructor.name || this.toString() || \"this\"}\\` class prior to streaming it.`);\n return this._persistentProperties.forEach((r) => {\n const s = this[r.name], n = this.removeUnderscore(r);\n s != null && (r.isReference ? t[n] = this.toReferenceObj(r, e) : t[n] = this.toDeepObj(s, e), r.searchableArray && (t[u.searchableArrayNameFor(n)] = s.map((o) => o.id)));\n }), t.__className = this.className, t;\n }\n static searchableArrayNameFor(e) {\n return `__${e}_searchable`;\n }\n fromDeepObject(e) {\n if (e == null) return e;\n if (Array.isArray(e))\n return e.map((t) => this.fromDeepObject(t));\n if (e.__documentReference) {\n const t = e, r = u.createInstance(t);\n return r.__documentReference = e.__documentReference, r;\n }\n if (e.__className)\n return u.createInstance(e);\n if (typeof e == \"object\") {\n const t = {};\n return Object.entries(e).forEach(\n ([r, s]) => t[r] = this.fromDeepObject(s)\n ), t;\n }\n return e;\n }\n toDeepObj(e, t) {\n if (e != null) {\n if (Array.isArray(e))\n return e.map((r) => this.toDeepObj(r, t));\n if (e.__documentReference) return e;\n if (e instanceof u)\n return e.toObj(t);\n if (typeof e == \"object\") {\n const r = {};\n return Object.entries(e).forEach(\n ([s, n]) => r[s] = this.toDeepObj(n, t)\n ), r;\n }\n return e;\n }\n }\n static collectionPath(e, t, r) {\n let s;\n return typeof t.storeInCollection == \"function\" ? s = t.storeInCollection(e, t, r) : s = t.storeInCollection ?? e.className, s;\n }\n toReferenceObj(e, t) {\n const r = this[e.name];\n return Array.isArray(r) ? r.map((s) => (e.isPureReference || this.pushDocument(t, u.collectionPath(s, e), s), this.buildRefObject(s, u.collectionPath(s, e), e.cachedProps))) : (e.isPureReference || this.pushDocument(t, u.collectionPath(r, e), r), this.buildRefObject(r, u.collectionPath(r, e), e.cachedProps));\n }\n buildRefObject(e, t, r) {\n const s = r?.reduce((n, o) => (e[o] !== void 0 && (n[o] = e[o]), n), {});\n return {\n id: e.id,\n __className: e.className || e.__className,\n __documentReference: {\n storedInCollection: t\n },\n ...s\n };\n }\n pushDocument(e, t, r) {\n if (\"__documentReference\" in r && r.__documentReference) return;\n e[t] || (e[t] = []);\n const s = this.toDeepObj(r, e);\n e[t].push(s);\n }\n removeUnderscore(e) {\n return e.name.slice(1);\n }\n static createReference(e) {\n const t = u.createInstance(e);\n return t.__documentReference = e.__documentReference || { storedInCollection: t.className }, t;\n }\n static createInstance(e) {\n if (typeof e == \"string\")\n return new (u.classFactory(e))();\n try {\n return new (u.classFactory(e.__className))().fromObject(e);\n } catch (t) {\n const r = Object.entries(e).filter(([s, n]) => n != null && typeof n != \"function\").map(([s, n]) => `${s}: ${n}`).join(`,\n\t`);\n throw new Error(`${t}\n-----> Class name not found in object:\n{\n\t ${r} \n}\n`);\n }\n }\n static propInfo(e, t) {\n return u.createInstance(e).getPropInfo(t);\n }\n /**\n * Return the type of a persistent property.\n * Several strategies are used to determine the type:\n * - If the typeName is defined in the property info a decorator, it is used\n * - If the property value is an array, the type of the first element is used\n * - If the property value is a Persistent instance, its class name is used\n * - Otherwise, the typeof operator is used to determine the type\n * @param propInfo the persistent property info to retrieve the type\n * @returns the type of the property or the type of the first element if the property is an array or undefined if cannot be determined\n */\n static propType(e) {\n if (e.typeName) return Array.isArray(e.typeName) ? \"undefined[]\" : e.typeName ?? \"undefined\";\n const r = u.createInstance(e.ownerClassName())[e.name];\n if (Array.isArray(r)) {\n if (r.length === 0) return \"undefined[]\";\n const s = r[0];\n return s instanceof u ? s.className + \"[]\" : typeof s + \"[]\";\n } else\n return r instanceof u ? r.className : typeof r;\n }\n /**\n * Retrieves a collection of references with the properties that are stored in the reference object\n * @returns the references collection\n */\n static getSystemRegisteredReferencesWithCachedProps() {\n return u.registeredClasses().reduce((r, s) => {\n const o = u.createInstance(s).getPersistentProperties().filter(\n (a) => a.cachedProps\n );\n return o.length > 0 && (r[s] = o), r;\n }, {});\n }\n}, u._factoryMap = {}, u);\nZ([\n O\n], $.prototype, \"_id\");\nlet h = $;\nfunction O(i, e) {\n return _()(i, e);\n}\nfunction ne(i) {\n return function(e, t) {\n return _({\n storeInCollection: i,\n isReference: !0\n })(e, t);\n };\n}\nfunction oe(i, e) {\n return _({ isReference: !0 })(i, e);\n}\nfunction ae(i, e, t, r) {\n return function(s, n) {\n const o = {\n isReference: !0,\n storeInCollection: t,\n typeName: e,\n cachedProps: i,\n ownerCollection: r ?? s.className\n };\n return _(o)(s, n);\n };\n}\nfunction ce(i, e, t) {\n return _({ isReference: !0, isPureReference: !0, storeInCollection: t })(i, e);\n}\nfunction ue(i, e, t, r) {\n return function(s, n) {\n return _({\n isReference: !0,\n isPureReference: !0,\n storeInCollection: t,\n ownerCollection: r,\n typeName: e,\n cachedProps: i\n })(s, n);\n };\n}\nfunction _(i) {\n return function(e, t) {\n Object.getOwnPropertyDescriptor(e, \"_persistentProperties\") || (e._persistentProperties ? e._persistentProperties = [...e._persistentProperties] : e._persistentProperties = []);\n const r = e._persistentProperties.find((s) => s.name === t);\n r ? Object.assign(r, i) : e._persistentProperties.push({\n name: t,\n ownerClassName: () => e.className,\n ...i\n });\n };\n}\nfunction G(i, e) {\n return (t) => {\n h.registerFactory(i, t, e), t.prototype.__className = i;\n };\n}\nfunction he(i) {\n return (e) => {\n h.registerFactory(i, e, void 0, !0);\n };\n}\nfunction le(i, e) {\n return _({ searchableArray: !0 })(i, e);\n}\nfunction de(i, e) {\n return _({ validator: (t) => t != null })(i, e);\n}\nfunction fe(i = (e) => e != null) {\n return function(e, t) {\n return _({ validator: i })(e, t);\n };\n}\nfunction me(i) {\n let e;\n return typeof i == \"function\" ? e = new i().className : e = i, function(t, r) {\n return _({ typeName: e })(t, r);\n };\n}\nclass pe extends h {\n constructor() {\n super(...arguments), this._onChange = new k();\n }\n /**\n * Subscribes a listener callback function. Every time a property is changed, \n * the listener callback will be called with the property change event.\n * \n * @param listenerCallback the listener callback\n * @returns a function to unsubscribe the listener from further notifications\n */\n onChange(e) {\n return this._onChange.subscribe(e);\n }\n /**\n * Removes the listener callback subscrition from the notifications.\n * \n * @param listenerCallback the listener callback to remove\n */\n removeOnChange(e) {\n this._onChange.unsubscribe(e);\n }\n /**\n * Changes the value of the property and notifies the subscribers about the change.\n * This is a helper method that can be used in the property setter.\n * \n * @param propName the name of the property to be changed\n * @param value the new value for the property\n * @returns true in case the property has been effectively changed, false otherwise\n */\n changeProp(e, t) {\n const r = \"_\" + String(e);\n return this[r] !== t ? (this[r] = t, this._onChange.notify({ [e]: t }), !0) : !1;\n }\n /**\n * Notifies the subscribers a property or group of properties change.\n * This is a helper function to be used when you want to notify property changes.\n * \n * @param event the event with the changed properties\n */\n notify(e) {\n this._onChange.notify(e);\n }\n /**\n * Inserts a new element in an arbitrary array property of this class and \n * fires a change event if successfully inserted. To avoid repeated elements\n * to be inserted, you can pass a function that checks for inequity.\n * \n * @param arrayPropName the name of the array property of this class where you\n * \t\t\t\t\t\t\t\t\t\t\twant to insert the\tnew element.\n * @param element the element to be inserted\n * @param isUnique a function that checks for inequity of the two elements \n * \t\t\t\t\t\t\t\t\tpassed as parameter. If the returned value is true, the \n * \t\t\t\t\t\t\t\t\tvalue will be\tpushed into the array. When the function is \n * \t\t\t\t\t\t\t\t\tnot provided, the element will be inserted regardless it is\n * \t\t\t\t\t\t\t\t\talready in the array.\n * @returns the inserted element or undefined if the element was not inserted.\n */\n pushAndNotify(e, t, r) {\n const s = \"_\" + String(e);\n if (!(r && this[s].find(\n (o) => !r(o, t)\n )))\n return this[s].push(t), this.notify({ [e]: this[e] }), t;\n }\n /**\n * Removes an element from an arbitrary array property of this class and fires\n * a change event on operation success.\n * \n * @param arrayPropName the name of the array property of this class where you\n * \t\t\t\t\t\t\t\t\t\t\twant to insert the\tnew element.\n * @param element the element to be inserted\n * @param isEqual a function that checks for equity of the two elements \n * \t\t\t\t\t\t\t\t\tpassed as parameter. If the returned value is true, the \n * \t\t\t\t\t\t\t\t\tvalue will be\tremoved from the array. \n * @returns the removed element or undefined if the element was not removed.\n */\n removeAndNotify(e, t, r) {\n const s = \"_\" + String(e), n = this[s].length;\n if (this[s] = this[s].filter(\n (o) => !r(o, t)\n ), n !== this[s].length)\n return this.notify({ [e]: this[e] }), t;\n }\n}\nconst E = class E {\n constructor(e, t, r) {\n if (r) {\n if (!(t instanceof h)) throw new Error(E.error.persistentNeedForSubCollection);\n this.collectionName = `${t.className}/${t.id}/${r}`;\n } else\n this.collectionName = t instanceof h ? t.className : t;\n this._stream = e;\n }\n /**\n * Finds an stored object in the database by its id. The field id is provided\n * by the Persistent parent class and it is automatically managed. Therefore,\n * you should obtain the id by looking at the id field of the object.\n * \n * @param id the id to look for\n * @param instance you can pass an instace that will be filled with the found data\n * @returns a promise resolving to an instance with the found data\n */\n findById(e, t) {\n return new Promise((r, s) => {\n this._stream.findById(e, this.collectionName).then((n) => {\n n ? (t ? t.fromObject(n) : t = h.createInstance(n), r(t)) : r(void 0);\n }).catch((n) => s(n));\n });\n }\n /**\n * Stores an object in the database\n * \n * @param instance the object instance to store\n * @returns a promise \n */\n save(e) {\n const t = e.toObject();\n return this.collectionName !== t.__className && (t.__rootCollections[this.collectionName] = t.__rootCollections[t.__className], delete t.__rootCollections[t.__className]), new Promise((r, s) => {\n this._stream.save(t.__rootCollections).then(() => r()).catch((n) => s(n));\n });\n }\n /**\n * Removes an element from the database by id\n * @param id the id of the element to be removed\n * @returns a promise\n */\n delete(e) {\n return new Promise((t, r) => {\n this._stream.delete(e, this.collectionName).then(() => t()).catch((s) => r(s));\n });\n }\n /**\n * Call find to retrieve a Query object used to define the search conditions\n * @returns a Query object\n */\n find() {\n return new K(this);\n }\n /**\n * Define the search conditions. You pass query operations and how the query\n * results are returned to the QueryObject\n * @param queryObject the QueryObject with the search constrains\n * @param objectType Deprecated! - restricts the search to a specific instances of the class type\n * @returns a promise resolving to a collection of matched documents\n */\n query(e = {}, t) {\n if (t) {\n const r = t instanceof h ? t.className : t;\n e.operations || (e.operations = []), e.operations.push(\n { property: \"__className\", operator: \"==\", value: r }\n );\n }\n return this.mapToInstance(\n () => this._stream.find(this.preprocessQueryObject(e), this.collectionName)\n );\n }\n /**\n * Get the amount of documents matching the query\n * @param queryObject the QueryObject with the search constrains\n * @returns a promise resolving to the amount of matched documents\n */\n count(e) {\n return this._stream.count(e, this.collectionName);\n }\n /**\n * Get the next bunch of documents matching the last query\n * @param limit the max amount of documents to retrieve. If not set, uses the\n * last limit set\n * @returns a promise resolving to a collection of matched documents\n */\n next(e) {\n return this.mapToInstance(() => this._stream.next(e));\n }\n onDocumentChange(e, t) {\n return this._stream.onDocumentChange(\n this.collectionName,\n e,\n (r) => t(w.toPersistentDocumentChange(r))\n );\n }\n onCollectionChange(e, t) {\n return this._stream.onCollectionChange(\n this.preprocessQueryObject(e.getQueryObject()),\n this.collectionName,\n (r) => t(r.map(\n (s) => w.toPersistentDocumentChange(s)\n ))\n );\n }\n // /**\n // * Get the previous bunch of documents matching the last query\n // * @param limit the max amount of documents to retrieve. If not set, uses the\n // * last limit set\n // * @returns a promise resolving to a collection of matched documents\n // */\n // prev<U extends T>( limit?: number ): Promise<U[]> {\n // \treturn this.mapToInstance( () => this._stream.prev( limit ) )\n // }\n mapToInstance(e) {\n return new Promise((t, r) => {\n e().then((s) => t(\n s.map((n) => h.createInstance(n))\n )).catch((s) => r(s));\n });\n }\n /**\n * Normalizes the query object to match the data source requirements.\n * Call this method before you do any query operation on the concrete data source\n * @param queryObject the query object containing the query operations\n * @param operatorConversor a function that converts the query operators to the\n * operators supported by the concrete data source\n * @returns the normalized query object\n */\n preprocessQueryObject(e) {\n if (Object.values(e).length === 0) return e;\n const t = e.operations?.map((r) => {\n const s = r.value[0] ?? r.value;\n return w.isArrayOperator(r.operator) && s instanceof h ? {\n property: h.searchableArrayNameFor(r.property),\n operator: r.operator,\n value: Array.isArray(r.value) ? r.value.map((n) => n.id) : s.id,\n aggregate: r.aggregate\n } : {\n property: r.property,\n operator: r.operator,\n value: r.value instanceof h ? { id: r.value.id } : r.value,\n aggregate: r.aggregate\n };\n }) ?? [];\n return {\n ...e,\n operations: t\n };\n }\n};\nE.error = {\n persistentNeedForSubCollection: \"The document parameter for a sub-collection should be a Persistent instace\",\n invalidQueryOrder: \"Cannot add where calls after or calls\"\n};\nlet S = E;\nclass K {\n constructor(e) {\n this.queryObject = { operations: [] }, this.model = e;\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter. Subsequent `where` calls will be operated to the\n * previous ones using the AND operator\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @param aggregate if true, the query will use the logical or operator and \n * aggregate the results to the previous query\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' )\n * query.where( 'age', '>', 18 )\n * query.where( 'age', '==', 18 ).where( 'name', '==', 'John' )\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n where(e, t, r, s) {\n if (this.queryObject.operations?.at(-1)?.aggregate && !s) throw new Error(S.error.invalidQueryOrder);\n return this.queryObject.operations?.push({\n property: e,\n operator: t,\n value: r,\n aggregate: s\n }), this;\n }\n // where2<P extends PropPath<T>>( property: P, operator: QueryOperator, value: PropPathType<T, P> ) {\n // \tif ( property.indexOf( '.' ) > 0 ) return this.whereDeepProp( property, operator, value )\n // \tlet val = value instanceof Persistent? { id: value.id } : value\n // \tthis.queryObject.operations.push({\n // \t\tproperty,\n // \t\toperator,\n // \t\tvalue: val\n // \t})\n // \treturn this\n // }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.whereDeepProp( 'address.street', '==', 'Main Street' )\n * @see where\n * @see or\n * @see orDeepProp\n */\n whereDeepProp(e, t, r, s) {\n if (this.queryObject.operations?.at(-1)?.aggregate && !s) throw new Error(S.error.invalidQueryOrder);\n const n = e.split(\".\");\n let o = {}, a = n.length > 1 ? o : r;\n return n.slice(1).forEach((d, l) => {\n o[d] = l < n.length - 2 ? {} : r, o = o[d];\n }), this.queryObject.operations?.push({\n property: n[0],\n operator: t,\n value: a,\n aggregate: s\n }), this;\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' ).and( 'age', '>', 18 )\n * @see andDeepProp\n * @see where\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n and(e, t, r) {\n return this.where(e, t, r);\n }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.whereDeepProp( 'address.street', '==', 'Main Street' ).andDeepProp( 'address.city', '==', 'New York' )\n * @see and\n * @see where\n * @see whereDeepProp\n * @see or\n * @see orDeepProp\n */\n andDeepProp(e, t, r) {\n return this.whereDeepProp(e, t, r);\n }\n /**\n * Matches all documents that the value of the property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param property the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @returns this Query object to make chained calls possible\n * @example\n * query.or( 'name', '==', 'John' )\n * query.or( 'age', '>', 18 )\n * @see orDeepProp\n * @see where\n * @see whereDeepProp\n */\n or(e, t, r) {\n return this.where(e, t, r, !0);\n }\n /**\n * Matches all documents that the value of the deep property satisfies the condition\n * in the operator parameter and aggregates the results to the previous query\n * @param propertyPath the path to the property to be compared\n * @param operator the operator to be used in the comparison. The available\n * operators are: ==, !=, >, >=, < and <=\n * @param value the value to be compared\n * @returns this Query object to make chained calls possible\n * @example\n * query.orDeepProp( 'address.street', '==', 'Main Street' )\n * @see or\n * @see where\n * @see whereDeepProp\n */\n orDeepProp(e, t, r) {\n return this.whereDeepProp(e, t, r, !0);\n }\n /**\n * Defines a where condition to match documents that are instances of the\n * given class\n * @param classId the class name or an instance to match\n * @returns this Query object to make chained calls possible\n * @example\n * query.instanceOf( 'Person' )\n * query.instanceOf( Person )\n * query.instanceOf( Person ).where( 'age', '>', 18 )\n */\n instanceOf(e) {\n const t = e instanceof h ? e.className : e;\n return this.queryObject.operations?.push({\n property: \"__className\",\n operator: \"==\",\n value: t\n }), this;\n }\n /**\n * Executes the query and returns the result\n * @param limit the max amount of documents to retrieve. If not set, uses the\n * last limit set or all the matching documents\n * @returns a promise resolving to a collection of matched documents\n * @example\n * const namedJohn = await query.where( 'name', '==', 'John' ).get()\n */\n get(e) {\n return e && (this.queryObject.limit = e), this.model.query(this.queryObject);\n }\n /**\n * Limits the number of documents to retrieve\n * @param maxDocs the max amount of documents to retrieve\n * @returns this Query object to make chained calls possible\n * @example\n * query.where( 'name', '==', 'John' ).limit( 10 )\n */\n limit(e) {\n return this.queryObject.limit = e, this;\n }\n /**\n * Orders the result set by a property.\n * @param propertyName The name of the property to order by\n * @param order The sort direction. Possible values are 'asc' and 'desc'\n * @returns a chainable query object\n * @example\n * query.orderBy( 'name', 'asc' )\n * query.orderBy( 'age', 'desc' )\n */\n orderBy(e, t = \"asc\") {\n return this.queryObject.sort = {\n propertyName: e,\n order: t\n }, this;\n }\n /**\n * Orders the result set by a deep property\n * \n * @param propertyPath The full path of the deep property. It should be \n * \t\t\t\t\t\t\t\t\t\t\tseparated by dots like person.name.firstName.\n * @param order The sort direction. Possible values are 'asc' and 'desc'\n * @returns a chainable query object\n */\n orderByDeepProp(e, t = \"asc\") {\n return this.queryObject.sort = {\n propertyName: e,\n order: t\n }, this;\n }\n /**\n * Returns the number of documents that match the query\n * @returns a promise resolving to the number of documents that match the query\n * @example\n * const count = await query.where( 'name', '==', 'John' ).count()\n */\n count() {\n return this.model.count(this.queryObject);\n }\n getQueryObject() {\n return this.queryObject;\n }\n}\nconst P = class P {\n constructor() {\n }\n /**\n * Registers a data source to be used by the store.\n * You need to register a data source before using the store.\n * @param dataSource the data source to be used by the store\n */\n static useDataSource(e) {\n this._dataSource = e;\n }\n /**\n * The data source currently used by the store\n * @returns the data source\n */\n static get dataSource() {\n return P._dataSource;\n }\n /**\n * Retrieves a model for a collection\n * @param classId the class name or an instance of the document type stored in the collection\n * @returns the model for the collection\n */\n static getModel(e) {\n if (!P._dataSource) throw new Error(this.error.shouldBeRegistered);\n return new S(P._dataSource, e);\n }\n /**\n * Retrieves a model for a subcollection \n * @param document the persistent object that owns the subcollection\n * @param subCollection the name of the subcollection\n * @returns the model for the subcollection\n */\n static getModelForSubCollection(e, t) {\n if (!P._dataSource) throw new Error(this.error.shouldBeRegistered);\n return new S(P._dataSource, e, t);\n }\n /**\n * Populates property references with actual data from the store.\n * It will not retrieve data if the instance is already populated\n * @param instance the data to be populated.\n * @returns the populated instance\n */\n static async populate(e) {\n if (!e) return;\n const t = async (r) => {\n const s = r;\n if (!s.__documentReference) return r;\n const o = await this.getModel(s.__documentReference.storedInCollection).findById(s.id, r);\n return o && (o.__documentReference = void 0), o;\n };\n return Array.isArray(e) ? (await Promise.all(\n e.map((s) => t(s))\n )).filter((s) => s) : t(e);\n }\n /**\n * Checks if an instance is populated\n * @param instance the instance or array of instances to be checked\n * @returns true if the instance is populated\n */\n static isPopulated(e) {\n return Array.isArray(e) ? e.reduce(\n (t, r) => t && r.__documentReference === void 0,\n !0\n ) : e.__documentReference === void 0;\n }\n};\nP.error = { shouldBeRegistered: \"You should register a data source before using the data Store.\" };\nlet R = P;\nclass I {\n constructor(e) {\n this.handlers = [], this.subscribeToDocumentChangeListener = () => {\n throw new Error(\"The method subscribeToDocumentChangeListener has not been implemented in the concrete data source\");\n }, e && (this.beforeUpdate = e.beforeUpdateDocument, this.afterUpdate = e.afterUpdateDocument, this.onAllPropsUpdatedCallback = e.onAllPropsUpdated);\n }\n installUpdaters() {\n const e = h.getSystemRegisteredReferencesWithCachedProps(), t = {};\n return Object.entries(e).forEach(([r, s]) => {\n s.forEach((n) => {\n if (!n.typeName) return;\n (Array.isArray(n.typeName) ? n.typeName : [n?.typeName ?? r]).map((a) => h.collectionPath(h.createInstance(a), n)).forEach((a) => {\n t[a] || (t[a] = []), t[a].push(n);\n });\n });\n }), this.handlers = [], Object.entries(t).forEach(([r, s]) => {\n const n = this.subscribeToDocumentChangeListener(\n r,\n (o) => this.onDocumentChange(o, s)\n );\n if (n) this.handlers.push(n);\n else throw new Error(\"The method documentChangeListener has not been implemented in the concrete data source\");\n }), this.handlers;\n }\n uninstallUpdaters() {\n this.handlers.forEach((e) => e.uninstall()), this.handlers = [];\n }\n set onAllPropsUpdated(e) {\n this.onAllPropsUpdatedCallback = e;\n }\n set beforeUpdateDocument(e) {\n this.beforeUpdate = e;\n }\n set afterUpdateDocument(e) {\n this.afterUpdate = e;\n }\n set documentChangeListenerSubscriber(e) {\n this.subscribeToDocumentChangeListener = e;\n }\n // protected subscribeToDocumentChangeListener( collectionPathToListen: string, listener: DocumentChangeListener<Persistent> ): DocumentChangeListenerHandler | undefined {\n // \tconst model = Store.getModel<Persistent>( collectionPathToListen )\n // \tconst handler = model.onCollectionChange( model.find(), event => {\n // \t\tconst snapshot = event[0]!\n // \t\tlistener( snapshot )\n // \t})\n // \treturn {\n // \t\tuninstall: handler,\n // \t\tnativeHandler: handler,\n // \t\tcollectionPath: collectionPathToListen\n // \t}\n // }\n async onDocumentChange(e, t) {\n const r = w.toPersistentDocumentChange(e);\n r.before && (await Promise.all(t.map(async (s) => {\n const n = I.ownerCollectionPath(h.createInstance(s.ownerClassName()), s, r.params), o = R.getModel(n);\n let a = o.find(), d = !1;\n s.cachedProps?.forEach((c) => {\n const g = r.before[c], b = r.after[c];\n g !== b && (d = !0);\n }), d && (s.searchableArray ? a = a.where(s.name, \"contains\", r.before) : a = a.where(s.name, \"==\", r.before));\n const l = await a.get();\n return Promise.all([\n l.map(async (c) => {\n let g = !1;\n if (s.cachedProps?.forEach((b) => {\n const j = r.before[b], A = r.after[b];\n j !== A && (g = !0);\n }), g) {\n if (s.searchableArray) {\n const b = c[s.name].findIndex((j) => j.id === r.before.id);\n c[s.name][b] = r.after;\n } else\n c[`_${s.name}`] = r.after;\n this.beforeUpdate?.(c, s), await o.save(c), this.afterUpdate?.(c, s);\n } else await Promise.resolve();\n })\n ]);\n })), this.onAllPropsUpdatedCallback?.());\n }\n static ownerCollectionPath(e, t, r) {\n let s;\n return typeof t.ownerCollection == \"function\" ? s = t.ownerCollection(e, t, r) : s = t.ownerCollection ?? e.className, s;\n }\n}\nclass w {\n constructor() {\n this._cachedPropsUpdater = void 0;\n }\n /**\n * Installs a document change listener\n * Implement the required logic to install a listener that will be called\n * when a document is changed in your concrete the data source\n * @param collectionPathToListen the name of the collection to be watched\n * @param props the properties to be watched in the collection\n * @param listener the listener to be called when a document is changed\n * @returns a function that uninstalls the listener. If the returned value is undefined\n * the method documentChangeListener has not been implemented in the concrete data source\n */\n subscribeToDocumentChangeListener(e, t) {\n const r = R.getModel(e), s = r.onCollectionChange(r.find(), (n) => {\n const o = n[0];\n t({\n ...o,\n before: o.before?.toObject(),\n after: o.after?.toObject()\n });\n });\n return {\n uninstall: s,\n nativeHandler: s,\n collectionPath: e\n };\n }\n installCachedPropsUpdater(e) {\n return this._cachedPropsUpdater = new I(e), this._cachedPropsUpdater.documentChangeListenerSubscriber = this.subscribeToDocumentChangeListener.bind(this), this._cachedPropsUpdater.installUpdaters();\n }\n uninstallCachedPropsUpdater() {\n this._cachedPropsUpdater?.uninstallUpdaters(), this._cachedPropsUpdater = void 0;\n }\n get cachedPropsUpdater() {\n return this._cachedPropsUpdater;\n }\n /**\n * Utility method to convert a query object to a property path query object\n * \n * @param queryObject the query object to be converted\n * @returns a property path query object\n * @example\n * const queryObject = {\n * \toperations: [{ property: 'name', operator: '==', value: { ancestorName: { father: 'Felipe' }}]\n * }\n * const propPathQueryObject = DataSource.toPropertyPathQueryObject( queryObject )\n * // returned value: [{ property: 'name.ancestorName.father', operator: '==', value: 'Felipe' }]\n */\n static toPropertyPathOperations(e) {\n return e ? e.map((t) => {\n if (w.isArrayOperator(t.operator) && t.value[0] instanceof h)\n return {\n property: h.searchableArrayNameFor(t.property),\n operator: t.operator,\n value: t.value.map((o) => o.id),\n aggregate: t.aggregate\n };\n const [r, s] = this.toPropertyPathValue(t.value);\n return {\n property: `${String(t.property)}${r ? \".\" + r : \"\"}`,\n operator: t.operator,\n value: s,\n aggregate: t.aggregate\n };\n }) : [];\n }\n static isArrayOperator(e) {\n return e === \"containsAny\" || e === \"contains\";\n }\n static toPersistentDocumentChange(e) {\n return {\n ...e,\n before: e.before && h.createInstance(e.before),\n after: e.after && h.createInstance(e.after)\n };\n }\n static toPropertyPathValue(e) {\n if (typeof e == \"object\" && !Array.isArray(e)) {\n const t = Object.keys(e)[0], [r, s] = this.toPropertyPathValue(e[t]);\n return [`${t}${r ? \".\" + r : \"\"}`, s];\n } else\n return [void 0, e];\n }\n}\nclass ge extends w {\n /**\n * @param jsonRawData the JSON object to be used as data store\n */\n constructor(e) {\n super(), this._jsonRawData = {}, this._lastMatchingDocs = [], this._lastLimit = 0, this._cursor = 0, this._simulateDelay = 0, this._pendingPromises = [], this._documentListeners = {}, this._collectionListeners = {}, this._serverCollectionListeners = {}, e && (this._jsonRawData = e);\n }\n /**\n * Set the JSON object to initialize the data store. Use to set the it after \n * the constructor has been called.\n * @param jsonRawData the JSON object to be used as data store\n */\n setDataStore(e) {\n return this._jsonRawData = e, this;\n }\n /**\n * Introduce a delay in the execution of operations to simulate a real data source\n * @param miliSeconds the number of milliseconds to delay the execution of operations\n * @returns a chainable reference to this object\n */\n simulateDelay(e) {\n return this._simulateDelay = e, this;\n }\n findById(e, t) {\n if (this._simulateError?.findById) throw new Error(this._simulateError.findById);\n return this.resolveWithDelay(this._jsonRawData[t]?.[e]);\n }\n save(e) {\n if (this._simulateError?.store) throw new Error(this._simulateError.store);\n return Object.entries(e).forEach(([t, r]) => {\n this._jsonRawData[t] || (this._jsonRawData[t] = {}), r?.forEach((s) => {\n const n = this._jsonRawData[t][s.id];\n this._jsonRawData[t][s.id] = s, this.notifyChange(t, s, n);\n });\n }), this.resolveWithDelay();\n }\n find(e, t) {\n if (this._simulateError?.find) throw new Error(this._simulateError.find);\n const r = Object.values(this._jsonRawData[t] || {});\n return e ? (this._lastLimit = e.limit || 0, this._cursor = 0, this._lastMatchingDocs = Object.entries(e).reduce(\n (s, [n, o]) => this.queryProcessor(s, n, o),\n Object.values(r)\n ), this.resolveWithDelay(this._lastMatchingDocs.slice(0, e.limit))) : this.resolveWithDelay(r);\n }\n delete(e, t) {\n if (this._simulateError?.delete) throw new Error(this._simulateError.delete);\n return delete this._jsonRawData[t][e], this.resolveWithDelay();\n }\n next(e) {\n return e && (this._lastLimit = e), this.incCursor(this._lastLimit), this.resolveWithDelay(this._lastMatchingDocs.slice(this._cursor, this._cursor + this._lastLimit));\n }\n count(e, t) {\n return this.resolveWithDelay(\n Object.keys(this._jsonRawData[t] ?? {}).length\n );\n }\n onCollectionChange(e, t, r) {\n let s = this._collectionListeners[t];\n s || (this._collectionListeners[t] = {}, s = this._collectionListeners[t]);\n const n = (a) => {\n if (!a.after) return;\n const d = [a.after];\n a.before && d.push(a.before);\n const c = this.retrieveQueryDocs(d, e.operations).filter((g, b, j) => b === j.findIndex((A) => A.id === g.id));\n c.length > 0 && r(c.map((g) => ({\n before: a.before,\n after: g,\n type: a.type,\n params: a.params\n })));\n }, o = Math.random().toString(36).substring(2, 9);\n return s[o] = n, () => delete s[o];\n }\n onDocumentChange(e, t, r) {\n let s = this._documentListeners[e];\n s || (this._documentListeners[e] = {}, s = this._documentListeners[e]);\n const n = (a) => {\n a.after && a.after.id === t && r(a);\n }, o = Math.random().toString(36).substring(2, 9);\n return s[o] = n, () => delete s[o];\n }\n /**\n * @returns the raw data store data as a JSON object\n */\n get rawData() {\n return this._jsonRawData;\n }\n /**\n * Wait for all pending promises to be resolved\n * @returns a promise that resolves when all pending promises are resolved\n */\n wait() {\n return Promise.all([...this._pendingPromises]);\n }\n incCursor(e) {\n this._cursor += e, this._cursor > this._lastMatchingDocs.length && (this._cursor = this._lastMatchingDocs.length);\n }\n simulateError(e) {\n return e === void 0 ? (this._simulateError = void 0, this) : (typeof e == \"string\" ? this._simulateError = {\n store: e,\n find: e,\n findById: e,\n delete: e\n } : this._simulateError = e, this);\n }\n // protected override subscribeToDocumentChangeListener( collectionNameToListen: string, listener: DocumentChangeListener<DocumentObject> ): DocumentChangeListenerHandler | undefined {\n // \tdelete this._serverCollectionListeners[ collectionNameToListen ]\n // \tthis._serverCollectionListeners[ collectionNameToListen ] = listener\n // \treturn {\n // \t\tuninstall: ()=> delete this._serverCollectionListeners[ collectionNameToListen ],\n // \t\tnativeHandler: listener,\n // \t\tcollectionPath: collectionNameToListen,\n // \t}\n // }\n notifyChange(e, t, r) {\n const s = {\n before: r,\n after: t,\n collectionPath: e,\n params: {},\n type: r ? \"update\" : \"create\"\n };\n this._serverCollectionListeners[e]?.(s), Object.values(this._documentListeners[e] ?? {}).forEach((n) => n(s)), Object.values(this._collectionListeners[e] ?? {}).forEach((n) => n(s));\n }\n decCursor(e) {\n return this._cursor -= e, this._cursor < 0 ? (this._cursor = 0, !0) : !1;\n }\n queryProcessor(e, t, r) {\n return {\n limit: (n) => e,\n //.slice( 0, limit ),\n operations: (n) => this.retrieveQueryDocs(e, n),\n sort: ({ order: n, propertyName: o }) => e.sort((a, d) => n === \"asc\" ? this.deepValue(a, o) > this.deepValue(d, o) ? 1 : -1 : this.deepValue(a, o) < this.deepValue(d, o) ? 1 : -1)\n }[t](r);\n }\n retrieveQueryDocs(e, t) {\n return t.reduce((r, s, n) => {\n if (s.aggregate) {\n const o = e.filter((a) => this.isQueryMatched(a, s));\n return n === 0 ? o : r.concat(o);\n } else\n return r.filter((o) => this.isQueryMatched(o, s));\n }, e);\n }\n deepValue(e, t) {\n return t.split(\".\").reduce((s, n) => s[n], e);\n }\n isQueryMatched(e, t) {\n const r = {\n \"==\": (l, c) => l === c,\n \"!=\": (l, c) => l !== c,\n \"<\": (l, c) => l < c,\n \"<=\": (l, c) => l <= c,\n \">\": (l, c) => l > c,\n \">=\": (l, c) => l >= c,\n containsAny: (l, c) => l?.some((g) => c?.includes(g)),\n contains: (l, c) => l?.includes(c)\n }, { property: s, value: n, operator: o } = t, [a, d] = this.retrieveValuesToCompare(e, s, n);\n return r[o](a, d);\n }\n retrieveValuesToCompare(e, t, r) {\n const s = e[t];\n if (s && typeof r == \"object\" && !Array.isArray(r)) {\n const a = Object.keys(r)[0];\n var [n, o] = this.retrieveValuesToCompare(s, a, r?.[a]);\n }\n return [n || s, o || r];\n }\n resolveWithDelay(e) {\n if (this._simulateDelay <= 0) return Promise.resolve(e);\n const t = new Promise((r) => {\n setTimeout(\n () => r(e),\n this._simulateDelay\n );\n });\n return this._pendingPromises.push(t), t.finally(\n () => this._pendingPromises = this._pendingPromises.filter((r) => r === t)\n ), t;\n }\n}\nconst v = class v {\n static registerCloudStorage(e, t) {\n v._cloudStorageFactoryMap[e] = t;\n }\n static createInstance(e) {\n const t = v._cloudStorageFactoryMap[e];\n if (!t)\n throw new Error(`You should register the ${e} cloud storage provider prior to use it`);\n return t();\n }\n get className() {\n return this.__className;\n }\n static useCloudStorage(e) {\n v._defaultCloudStorage = e;\n }\n static get defaultCloudStorage() {\n if (!v._defaultCloudStorage)\n throw new Error(\"You should define a default cloud storage provider prior to use it\");\n return v._defaultCloudStorage;\n }\n};\nv._cloudStorageFactoryMap = {};\nlet C = v;\nfunction X(i, e) {\n return C.registerCloudStorage(i, e), (t) => {\n t.prototype.__className = i;\n };\n}\nvar ee = Object.getOwnPropertyDescriptor, te = (i, e, t, r) => {\n for (var s = r > 1 ? void 0 : r ? ee(e, t) : e, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = o(s) || s);\n return s;\n};\nlet F = class extends C {\n constructor(i = \"\") {\n super(), this._simulateDelay = 0, this._pendingPromises = [], this.mockFileSystem = {}, this._pathToMockFiles = i;\n }\n /**\n * Introduce a delay in the execution of operations to simulate a real data source\n * @param miliSeconds the number of milliseconds to delay the execution of operations\n * @returns a chainable reference to this object\n */\n simulateDelay(i) {\n return this._simulateDelay = i, this;\n }\n resolveWithDelay(i) {\n if (this._simulateDelay <= 0) return Promise.resolve(i);\n const e = new Promise((t) => {\n setTimeout(\n () => t(i),\n this._simulateDelay\n );\n });\n return this._pendingPromises.push(e), e.finally(\n () => this._pendingPromises = this._pendingPromises.filter((t) => t === e)\n ), e;\n }\n save(i, e) {\n const t = i;\n this._onProgress && this._onProgress(0, 100), this.mockFileSystem[i] = JSON.stringify(e), this._onProgress && this._onProgress(100, 100);\n const r = e instanceof File ? e.name : t;\n return this.resolveWithDelay(r);\n }\n uploadControl() {\n return {\n resume: () => {\n },\n pause: () => {\n },\n cancel: () => {\n },\n onProgress: (i) => this._onProgress = i\n };\n }\n getUrl(i) {\n return Promise.resolve(this._pathToMockFiles + i);\n }\n delete(i) {\n return delete this.mockFileSystem[i], this.resolveWithDelay();\n }\n};\nF = te([\n X(\"MockCloudStorage\", () => new F())\n], F);\nvar re = Object.defineProperty, se = Object.getOwnPropertyDescriptor, U = (i, e, t, r) => {\n for (var s = r > 1 ? void 0 : r ? se(e, t) : e, n = i.length - 1, o; n >= 0; n--)\n (o = i[n]) && (s = (r ? o(e, t, s) : o(s)) || s);\n return r && s && re(e, t, s), s;\n}, ie = /* @__PURE__ */ ((i) => (i[i.stored = 0] = \"stored\", i[i.pendingDataSet = 1] = \"pendingDataSet\", i[i.deleted = 2] = \"deleted\", i))(ie || {});\nlet D = class extends h {\n constructor() {\n super(...arguments), this._onChange = new k();\n }\n async save({ data: i, fileName: e, progress: t, cloudStorageProvider: r } = {}) {\n const s = i || this._pendingData;\n s && (this._reference && await this.delete(), this.provider = r || C.defaultCloudStorage, this._originalFileName = e || (s instanceof File ? s.name : void 0), this._reference = await this.provider.save(this.id, s, t), this._url = await this.provider.getUrl(this._reference), this._pendingData = void 0, this._onChange.notify({ event: 0, storedFile: this }));\n }\n uploadControl() {\n return this.provider.uploadControl();\n }\n async delete() {\n if (!this._reference) throw new Error(\"Cannot delete a not stored file\");\n await this.provider.delete(this._reference), this._reference = void 0, this._url = void 0, this._onChange.notify({ event: 2, storedFile: this });\n }\n set provider(i) {\n this._provider = i, this._cloudStorageProviderName = i.className;\n }\n get provider() {\n if (!this._provider)\n try {\n this._provider = C.createInstance(this._cloudStorageProviderName);\n } catch {\n this._provider = C.defaultCloudStorage;\n }\n return this._provider;\n }\n get url() {\n return this._url;\n }\n get mimeType() {\n return this._mimeType;\n }\n setDataToStore(i) {\n return this._pendingData = i, this._originalFileName = i instanceof File ? i.name : void 0, this._mimeType = i instanceof Blob ? i.type : void 0, this._onChange.notify({\n event: 1,\n pendingData: i,\n storedFile: this\n }), this;\n }\n get originalFileName() {\n return this._originalFileName;\n }\n onChange(i) {\n return this._onChange.subscribe(i);\n }\n};\nU([\n O\n], D.prototype, \"_reference\", 2);\nU([\n O\n], D.prototype, \"_url\", 2);\nU([\n O\n], D.prototype, \"_cloudStorageProviderName\", 2);\nU([\n O\n], D.prototype, \"_originalFileName\", 2);\nU([\n O\n], D.prototype, \"_mimeType\", 2);\nD = U([\n G(\"StoredFile\")\n], D);\nclass x {\n}\nconst m = class m extends x {\n constructor() {\n if (super(), this._onAuthStateChange = new k(), !m._authService) throw new Error(m.error.shouldBeRegistered);\n m._authService.onAuthStateChange(\n (e) => this.authStateChanged(e)\n );\n }\n /**\n * Registers an authentication service to be used by the Auth class.\n * You need to register an authentication service before using the Auth class.\n * @param authService the authentication service to be used by the Auth class\n */\n static useAuthService(e) {\n m._authService != e && (m._authService = e, this._instance = void 0);\n }\n /**\n * The instance of the Auth class\n * @returns the authentication service\n */\n static get instance() {\n return this._instance || (this._instance = new this());\n }\n /**\n * Signs up a new user\n * @param singData the data to be used to sign up the user\n * @returns a promise that resolves to the user credentials\n * @example\n * // Sign up a new user with email and password\n * Auth.instance.signUp({ authProvider: 'email', email: 'john@test.com', password: '123456' })\n * // Sign up a new user with a Google account\n * Auth.instance.signUp({ authProvider: 'google'})\n */\n signUp(e) {\n return m._authService.signUp(e);\n }\n /**\n * Logs in an existing user\n * @param singData the data to be used to log in the user\n * @returns a promise that resolves to the user credentials\n * @example\n * // Log in an existing user with email and password\n * Auth.instance.login({ authProvider: 'email', email: 'john@test.com', password: '123456' })\n * // Log in an existing user with a Google account\n * Auth.instance.login({ authProvider: 'google'})\n */\n login(e) {\n return m._authService.login(e);\n }\n /**\n * Logs out the current user\n * @returns a promise that resolves when the user is logged out\n */\n logout() {\n return m._authService.logout();\n }\n /**\n * Resets the password associated with the email.\n * @param email the email address of the user to reset the password\n * @returns a promise that resolves when the process is done\n */\n resetEmailPassword(e) {\n return m._authService.resetEmailPassword(e);\n }\n /**\n * Resends the email verification to the user.\n * @returns a promise that resolves when the process is done\n */\n resendVerificationEmail(e, t, r) {\n return m._authService.resendVerificationEmail(e, t, r);\n }\n refreshToken() {\n return m._authService.refreshToken();\n }\n /**\n * Adds a listener to be called when the authentication state changes.\n * @param onChange the listener to be called when the authentication state changes.\n * The listener is called with the user credentials as a parameter.\n * If the user is logged out, the listener is called with `undefined` as a parameter.\n * @returns a function to remove the listener\n * @example\n * // Add a listener to be called when the authentication state changes\n * const removeListener = Auth.instance.onAuthStateChange( userCredentials => {\n * \tif ( userCredentials ) {\n * \t\t// The user is logged in\n * \t} else {\n * \t\t// The user is logged out\n * \t}\n * })\n */\n onAuthStateChange(e) {\n return this._onAuthStateChange.subscribe(e);\n }\n /**\n * Removes a listener that was added by `onAuthStateChange` method.\n * @param onChange the listener to be removed\n */\n removeAuthStateChange(e) {\n this._onAuthStateChange.unsubscribe(e);\n }\n /**\n * Links an additional authentication provider to the authenticated user.\n * @param provider the provider to be linked\n * @returns a promise that resolves when the process is done\n * @example\n * // Link a Google account to the auth service\n * Auth.instance.linkAdditionalProvider({ authProvider: 'google' })\n */\n linkAdditionalProvider(e) {\n return m._authService.linkAdditionalProvider(e);\n }\n /**\n * Unlinks an authentication provider from the authenticated user.\n * @param provider the provider to be unlinked\n * @returns a promise that resolves when the process is done\n * @example\n * // Unlink the Google account from the auth service\n * Auth.instance.unlinkProvider({ authProvider: 'google' })\n */\n unlinkProvider(e) {\n return m._authService.unlinkProvider(e);\n }\n authStateChanged(e) {\n this._onAuthStateChange.notify(e);\n }\n};\nm.error = { shouldBeRegistered: \"You should register an auth service before using Auth.\" }, m._instance = void 0;\nlet M = m;\nclass _e extends x {\n constructor() {\n super(...arguments), this.pendingPromises = [], this._fakeRegisteredUsers = {};\n }\n signUp(e) {\n const { verificationLink: t, email: r, password: s, authProvider: n } = e, o = new Promise(async (a, d) => {\n n === \"email\" && (r || d({ code: \"missingEmail\", message: \"missingEmail\" }), s || d({ code: \"missingPassword\", message: \"missingPassword\" })), s !== \"fail\" && r !== \"fail\" ? (this._loggedUser = this.userCredentials(e), this._fakeRegisteredUsers[this._loggedUser.id] = this._loggedUser, a(this._loggedUser), this.notifyChange?.(this._loggedUser)) : (d({ code: \"userNotFound\", message: t || \"Test auth error\" }), this.notifyChange?.(void 0));\n });\n return this.pendingPromises.push(o), o;\n }\n login(e) {\n const t = Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e.email\n );\n return e.authProvider === \"email\" && !t && e.email && (e.email = \"fail\"), this.signUp(e);\n }\n onAuthStateChange(e) {\n this.notifyChange = e, this.notifyChange(this._loggedUser);\n }\n async logout() {\n const e = new Promise((t) => {\n this._loggedUser = void 0, t(), this.notifyChange?.(void 0);\n });\n return this.pendingPromises.push(e), e;\n }\n resetEmailPassword(e) {\n return Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e\n ) ? Promise.resolve() : Promise.reject({ code: \"userNotFound\", message: \"Test auth error\" });\n }\n resendVerificationEmail(e, t, r) {\n return Object.values(this._fakeRegisteredUsers).find(\n (n) => n.email === e\n ) ? Promise.resolve() : Promise.reject({ code: \"userNotFound\", message: \"Test auth error\" });\n }\n refreshToken() {\n return Promise.resolve();\n }\n linkAdditionalProvider(e) {\n throw new Error(\"Not implemented.\");\n }\n unlinkProvider(e) {\n throw new Error(\"Not implemented.\");\n }\n async flush() {\n await Promise.all(this.pendingPromises), this.pendingPromises = [];\n }\n fakeRegisteredUser(e) {\n if (this._fakeRegisteredUsers[e.id]) throw new Error(`User with id ${e.id} already exists in fake user list`);\n return this._fakeRegisteredUsers[e.id] = e, this;\n }\n get fakeRegisteredUsers() {\n return this._fakeRegisteredUsers;\n }\n userCredentials(e) {\n const t = Object.values(this._fakeRegisteredUsers).find(\n (r) => r.email === e.email\n );\n return t ? { ...t } : {\n id: e.authProvider || `testUID${e.email ? \"-\" + e.email : \"\"}`,\n email: e.email || \"testEmail\",\n name: e.authProvider || `testName${e.email ? \" \" + e.email : \"\"}`,\n phoneNumber: \"testPhone\",\n customData: {\n role: \"test\"\n },\n lastLogin: 0,\n creationDate: 0\n };\n }\n}\nconst y = class y {\n constructor() {\n }\n static useCloudFunctionsService(e) {\n this._cloudFunctionsService != e && (this._cloudFunctionsService = e);\n }\n static get instance() {\n if (!this._cloudFunctionsService) throw new Error(y.error.shouldBeRegistered);\n return y._instance || (y._instance = new y());\n }\n getRawFunction(e) {\n return y._cloudFunctionsService.retrieveFunction(e);\n }\n getFunction(e) {\n const t = y._cloudFunctionsService.callFunction, r = this.getRawFunction(e);\n return async (s) => {\n const n = await t(r, this.processParam(s));\n return this.processResult(n);\n };\n }\n processParam(e) {\n if (e != null)\n return e instanceof h ? e.toObject() : Array.isArray(e) ? e.map((t) => this.processParam(t)) : typeof e == \"object\" ? Object.entries(e).reduce((t, [r, s]) => (t[r] = this.processParam(s), t), {}) : e;\n }\n processResult(e) {\n if (e != null)\n return e.__className ? h.createInstance(e) : Array.isArray(e) ? e.map((t) => this.processResult(t)) : typeof e == \"object\" ? Object.entries(e).reduce((t, [r, s]) => (t[r] = this.processResult(s), t), {}) : e;\n }\n};\ny.error = { shouldBeRegistered: \"You should register a cloud functions service with useCloudFunctionsService static method before using CloudFunctions.\" };\nlet V = y;\nclass ye {\n constructor(e) {\n this._registeredFunctions = e;\n }\n retrieveFunction(e) {\n const t = this._registeredFunctions[e];\n if (!t) throw new Error(`Cloud function ${e} is not registered.`);\n return t;\n }\n callFunction(e, t) {\n return e(t);\n }\n}\nclass W {\n}\nconst p = class p extends W {\n constructor() {\n super();\n }\n static useServerAuthService(e) {\n p._authService != e && (p._authService = e, this._instance = void 0);\n }\n static get instance() {\n if (!p._authService) throw new Error(p.error.shouldBeRegistered);\n return this._instance || (this._instance = new p());\n }\n getUser(e) {\n return p._authService.getUser(e);\n }\n updateUser(e, t) {\n return p._authService.updateUser(e, t);\n }\n setCustomCredentials(e, t) {\n return p._authService.setCustomCredentials(e, t);\n }\n deleteUser(e) {\n return p._authService.deleteUser(e);\n }\n};\np.error = { shouldBeRegistered: \"You should register a Server Auth service before using the Server Auth.\" }, p._instance = void 0;\nlet T = p;\nclass be extends W {\n constructor(e) {\n super(), this._userCredentials = e;\n }\n getUser(e) {\n return this._userCredentials[e] || Promise.resolve(void 0), Promise.resolve(this._userCredentials[e]);\n }\n setCustomCredentials(e, t) {\n const r = this._userCredentials[e];\n if (!r) throw new Error(`User ${e} not found in the auth system`);\n return r.customData = { ...t }, Promise.resolve();\n }\n updateUser(e, t) {\n return this._userCredentials[e] = {\n ...this._userCredentials,\n ...t,\n id: e\n }, Promise.resolve(this._userCredentials[e]);\n }\n deleteUser(e) {\n return delete this._userCredentials[e], Promise.resolve();\n }\n get userCredentials() {\n return this._userCredentials;\n }\n}\nfunction Pe(i, e) {\n return i ? i.replace(/\\${\\s*(\\w*)\\s*}/g, function(t, r) {\n return e[r] || \"\";\n }) : \"\";\n}\nfunction ve(i) {\n return i ? i.replace(\n /([-_ ][\\w])/g,\n (e) => e.toUpperCase().replace(\"-\", \"\").replace(\"_\", \"\").replace(\" \", \"\")\n ) : \"\";\n}\nfunction we(i, e = \"-\") {\n if (!i) return \"\";\n const t = i.slice(1).replace(/( |[A-Z])/g, (r) => r === \" \" ? \"-\" : e + r[0].toLowerCase());\n return i[0].toLocaleLowerCase() + t.replace(/--/g, \"-\");\n}\nfunction Ce(i, e) {\n return e.split(\".\").reduce((t, r) => t[r], i);\n}\nexport {\n M as Auth,\n _e as AuthMock,\n x as AuthService,\n V as CloudFunctions,\n ye as CloudFunctionsMock,\n C as CloudStorage,\n w as DataSource,\n pe as EntropicComponent,\n ge as JsonDataSource,\n F as MockCloudStorage,\n S as Model,\n k as Observable,\n h as Persistent,\n K as Query,\n T as ServerAuth,\n be as ServerAuthMock,\n W as ServerAuthService,\n R as Store,\n D as StoredFile,\n ie as StoredFileEvent,\n ve as camelCase,\n Ce as getDeepValue,\n O as persistent,\n _ as persistentParser,\n ce as persistentPureReference,\n ue as persistentPureReferenceWithCachedProps,\n oe as persistentReference,\n ne as persistentReferenceAt,\n ae as persistentReferenceWithCachedProps,\n X as registerCloudStorage,\n he as registerLegacyClassName,\n G as registerPersistentClass,\n Pe as replaceValue,\n de as required,\n fe as requiredWithValidator,\n le as searchableArray,\n we as snakeCase,\n me as typeName\n};\n//# sourceMappingURL=entropic-bond.js.map\n","import { Callback, Observable } from 'entropic-bond'\n\ninterface ProgressStage {\n\tname: string\n\tprogress: number\n\ttotal: number\n}\n\ninterface ProgressStageCollection {\n\t[ stageName: string ]: ProgressStage\n}\n\nexport interface ProgressEvent {\n\tbusy: boolean\n\tstages: ProgressStageCollection\n\toverallProgress: number\n}\n\nexport class ProgressController {\n\tnotifyBusy( busy: boolean, name?: string ) {\n\t\tthis.pushStage({\n\t\t\tname: name ?? '', progress: busy? 0 : 1, total: 1\n\t\t})\n\t}\n\n\tpushStage( stage: ProgressStage ) {\n\t\tthis._stages[ stage.name ] = stage\n\n\t\tconst overallProgress = Object.values( this._stages ).reduce( (prev, stage, _i, arr )=>{\n\t\t\treturn prev + stage.progress / stage.total / arr.length\n\t\t}, 0)\n\t\t\n\t\tthis._onProgress.notify({\n\t\t\tbusy: overallProgress < 1,\n\t\t\toverallProgress,\n\t\t\tstages: this._stages\n\t\t})\n\n\t\tif ( overallProgress >= 1 ) this._stages = {}\n\t\tif ( this.debug ) console.log( `ProgressController ${ stage.name }: Progress: ${ stage.progress } Stages: ${ stage.total }` )\n\t}\n\n\tonProgress( cb: Callback<ProgressEvent> ) {\n\t\treturn this._onProgress.subscribe( cb )\n\t}\n\n\tset debug( value: boolean ) {\n\t\tthis._debug = value\n\t}\n\t\n\tget debug(): boolean {\n\t\treturn this._debug\n\t}\n\t\n\tprivate _debug: boolean = false\n\tprivate _stages: ProgressStageCollection = {}\n\tprivate _onProgress: Observable<ProgressEvent> = new Observable<ProgressEvent>()\n}","import { Callback, ClassPropNames, EntropicComponent, Model, Observable, PropChangeEvent, Unsubscriber, Query } from 'entropic-bond'\nimport { ProgressController, ProgressEvent } from './progress-controller'\n\ntype CrudControllerAction = 'saved' | 'deleted' | 'populated' | 'filterChange'\n\nexport interface CrudControllerEvent<T extends EntropicComponent> {\n\tdocumentProps?: PropChangeEvent<T> \n\tdocumentChanged?: T\n\tdocumentCollection?: T[]\n\taction?: CrudControllerAction\n\t/** deprecated */\terror?: Error \n}\n\ninterface GlobalValidator<T extends EntropicComponent> {\n\tfunc: ( document: T ) => boolean\n\terrorMessage?: string\n}\n\ntype ValidatorFunction<V> = ( value: V ) => boolean \ntype ValidatorCollection<T extends EntropicComponent> = {\n\t[ prop in ClassPropNames<T> ]: {\n\t\tfunc: ValidatorFunction<T[prop]>\n\t\terrorMessage?: string\n\t}\n}\n\nexport abstract class CrudController<T extends EntropicComponent> {\n\tstatic readonly errorMessages = {\n\t\tmissedDocument: 'No document to save',\n\t}\n\n\tconstructor( document?: T ) {\n\t\tthis.setDocument( document || this.createDocument() )\n\t}\n\n\tprotected abstract createDocument(): T \n\tprotected abstract getModel(): Model<T> \n\t\n\tallRequiredPropertiesFilled(): boolean {\n\t\treturn this.nonFilledRequiredProperties.length <= 0 && this.validateGlobal()\n\t}\n\n\tget nonFilledRequiredProperties(): ClassPropNames<T>[] {\n\t\treturn this.requiredProperties.filter( prop => this.validateProp( prop ))\n\t}\n\n\tget requiredProperties(): ClassPropNames<T>[] {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tconst decoratorDeclared = this.document.getPersistentProperties()\n\t\t\t.filter( prop => this.document.isRequired( prop.name as ClassPropNames<T> ) )\n\t\t\t.map( prop => prop.name )\n\n\t\tconst uniqueValues = new Set( decoratorDeclared.concat( Object.keys( this.validator )))\n\t\treturn [ ...uniqueValues ] as ClassPropNames<T>[]\n\t}\n\n\taddValidator<P extends ClassPropNames<T>>( prop: P, validatorFn: ValidatorFunction<T[P]>, errorMessage?: string ) {\n\t\tthis.validator[ prop ] = {\n\t\t\tfunc: validatorFn,\n\t\t\terrorMessage\n\t\t}\n\t}\n\n\tremoveValidator( prop: ClassPropNames<T> ) {\n\t\tdelete this.validator[ prop ]\n\t}\n\n\taddGlobalValidator( validatorFn: ValidatorFunction<T>, errorMessage?: string ) {\n\t\tthis.globalValidator = {\n\t\t\tfunc: validatorFn,\n\t\t\terrorMessage\n\t\t}\n\t}\n\n\tremoveGlobalValidator() {\n\t\tthis.globalValidator = undefined\n\t}\n\n\tfailedValidationError( prop?: ClassPropNames<T> ): string | undefined {\n\t\tif ( prop ) return this.validator[ prop ]?.errorMessage\n\n\t\tconst nonFilledProperty = this.nonFilledRequiredProperties[0]\n\t\tif ( nonFilledProperty ) return this.validator[ nonFilledProperty ]?.errorMessage\n\t\treturn this.globalValidator?.errorMessage\n\t}\n\n\tprivate validateProp( prop: ClassPropNames<T> ): boolean {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tconst propVal = this.document[ prop ]\n\n\t\tif ( this.validator[ prop ] ) return !this.validator[ prop ].func( propVal )\n\t\treturn !this.document.isPropValueValid( prop )\n\t}\n\n\tprivate validateGlobal(): boolean {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\n\t\tif ( this.globalValidator ) return this.globalValidator.func( this.document )\n\t\telse return true\n\t}\n\n\tprotected storeDoc(): Promise<void> {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\t\treturn this.model.save( this.document )\n\t}\n\n\tprotected deleteDoc(): Promise<void> {\n\t\tif ( !this.document ) throw new Error( CrudController.errorMessages.missedDocument )\n\t\treturn this.model.delete( this.document.id )\n\t}\n\n\t/**\n\t * Override this method to customize the query used to retrieve the documents \n\t * in the documentCollection method. This is the default method used by \n\t * the documentCollection method. If the findDocs method is overridden and returns\n\t * non undefined value, then this queryDocs method will not be used.\n\t * \n\t * @param limit the maximum number of documents to retrieve\n\t * @returns a query to retrieve the documents\n\t * @see documentCollection\n\t * @see findDocs\n\t */\n\tprotected queryDocs( limit?: number ): Query<T> {\n\t\tlet query = this.model.find()\n\n\t\tif ( limit ) query = query.limit( limit )\n\n\t\treturn query\n\t}\n\n\t/**\n\t * Override this method to customize the query used to retrieve the documents \n\t * in the documentCollection method. The default method called by the \n\t * documentCollection method is the queryDocs method. If this findDocs method \n\t * returns a non undefined value, then this method will be used instead of the\n\t * queryDocs method.\n\t * \n\t * @param limit the maximum number of documents to retrieve\n\t * @returns a query to retrieve the documents\n\t * @see documentCollection\n\t * @see queryDocs\n\t */\n\tprotected findDocs( limit?: number ): Promise<T[]> | undefined {\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Sets a filter function to filter in memory the documents returned by the `documentCollection` method.\n\t * \n\t * @param filter the filter function\n\t * @returns the controller itself\n\t */\n\tasync setFilter( filter: ( document: T ) => boolean ) {\n\t\tthis._filter = filter\n\t\tthis.onChangeHdl.notify({ action: 'filterChange' })\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes the filter function set by the `setFilter` method.\n\t * @returns the controller itself\n\t */\n\tresetFilter() {\n\t\tthis._filter = undefined\n\t\tthis.onChangeHdl.notify({ action: 'filterChange' })\n\t\treturn this\n\t}\n\t\n\tonChange( observer: Callback<CrudControllerEvent<T>> ) {\n\t\treturn this.onChangeHdl.subscribe( observer )\n\t}\n\n\t/**\n\t * Notifies the observer of any error that occurs during the execution of the controller.\n\t * If there are no subscribers to this event, the error will be thrown.\n\t * \n\t * @param observer \n\t * @returns the unsubscriber function\n\t */\n\tonError( observer: Callback<Error> ) {\n\t\treturn this.onErrorHdl.subscribe( observer )\n\t}\n\n\tprotected notifyChange<U extends CrudControllerEvent<T>>( event: U ) {\n\t\tthis.onChangeHdl.notify( event )\n\t}\n\n\tnewDocument() {\n\t\treturn this.setDocument( this.createDocument() )\n\t}\n\n\tasync storeDocument() {\n\t\tconst progressStage = 'Saving main document'\n\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tawait this.storeDoc()\n\n\t\t\tthis.onChangeHdl.notify({\n\t\t\t\tdocumentCollection: await this.documentCollection(),\n\t\t\t\taction: 'saved'\n\t\t\t})\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\t}\n\n\tasync deleteDocument() {\n\t\tconst progressStage = 'Delete main document'\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tawait this.deleteDoc()\n\n\t\t\tthis.onChangeHdl.notify({\n\t\t\t\tdocumentCollection: await this.documentCollection(),\n\t\t\t\taction: 'deleted'\n\t\t\t})\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\t}\n\t\t\n\tasync documentCollection( limit?: number ): Promise<T[]> {\n\t\tconst progressStage = 'Retrieving document collection'\n\t\tlet found: T[] = []\n\t\t\n\t\ttry {\n\t\t\tthis.progressController.notifyBusy( true, progressStage )\n\t\t\tconst docPromise = this.findDocs( limit )\n\t\t\tif ( docPromise ) found = await docPromise\n\t\t\telse found = await this.queryDocs( limit ).get()\n\t\t}\n\t\tcatch( error ) {\n\t\t\tthis.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\t\tif ( this.throwOnError ) throw error\n\t\t}\n\t\tfinally {\n\t\t\tthis.onChangeHdl.notify({\tdocumentCollection: found\t})\n\t\t\tthis.progressController.notifyBusy( false, progressStage )\n\t\t}\n\n\t\treturn found\n\t}\n\n\tfilter( docs: T[] ): T[] {\n\t\treturn docs.filter( doc => this._filter?.( doc ) ?? true )\n\t}\n\n\tonProgress( observer: Callback<ProgressEvent> ) {\n\t\treturn this.progressController.onProgress( observer )\n\t}\n\n\tprotected get model() {\n\t\treturn this.getModel()\n\t}\n\n\tsetDocument( value: T ): this {\n\t\tif ( this._document !== value ) {\n\n\t\t\tif ( this.unsubscribeDocument ) this.unsubscribeDocument()\n\n\t\t\tif ( value ) {\n\t\t\t\tthis.unsubscribeDocument = value.onChange( e => this.onChangeHdl.notify({ documentProps: e } ) )\n\t\t\t}\n\n\t\t\tthis._document = value\n\t\t\tthis.onChangeHdl.notify({ documentChanged: this._document })\n\t\t}\n\n\t\treturn this\n\t}\n\n\tset document( value: T ) {\n\t\tthis.setDocument( value )\n\t}\n\t\n\tget document(): T {\n\t\treturn this._document\n\t}\n\n\t/**\n\t * Use this method to throw an error in a controlled way.\n\t * It will notify the subscribers of the `onError` event and throw the error \n\t * if there are no subscribers to the `onError` event.\n\t * \n\t * @param error the error to throw\n\t */\n\tprotected managedThrow( error: Error | string | any ) {\n\t\t/* deprecated */ this.onChangeHdl.notify({ error: this.errorToError( error ) })\n\t\tthis.onErrorHdl.notify( this.errorToError( error ))\n\t\tif ( this.throwOnError ) throw this.errorToError( error )\n\t}\n\n\tprotected errorToError( error: any ): Error {\n\t\tif ( error instanceof Error ) return error\n\t\tif ( typeof error === 'string' ) return new Error( error )\n\t\tif ( 'code' in error ) return new Error( error.code )\n\t\tif ( 'message' in error ) return new Error( error.error )\n\t\treturn new Error( JSON.stringify( error ) )\n\t}\n\n\tprotected get throwOnError() {\n\t\treturn this.onErrorHdl.subscribersCount === 0 \n\t}\n\n\tprotected progressController: ProgressController = new ProgressController()\n\tprotected onChangeHdl: Observable<CrudControllerEvent<T>> = new Observable<CrudControllerEvent<T>>()\n\tprotected onErrorHdl: Observable<Error> = new Observable<Error>()\n\tprivate _document!: T\n\tprivate unsubscribeDocument: Unsubscriber | undefined\n\tprivate _filter: (( document: T ) => boolean ) | undefined\n\tprivate validator = {} as ValidatorCollection<T>\n\tprivate globalValidator: GlobalValidator<T> | undefined\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.3\";\n","/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ioInfo = payload._ioInfo;\n null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n null != _ioInfo && (_ioInfo.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 && (_ioInfo2.end = performance.now());\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n ioInfo.value = thenable;\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n propName ? Error(\"react-stack-top-frame\") : unknownOwnerDebugStack,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n };\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.2.3\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%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://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"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 validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { EntropicComponent, snakeCase, Unsubscriber } from 'entropic-bond'\nimport { cloneElement, Component, ReactElement, JSX } from 'react'\nimport { CrudController } from './crud-controller'\n\nenum Mode { normal, add, edit }\n\nexport interface CrudCardProps<T extends EntropicComponent> {\n\tdocument: T\n\tonSelect: ( document: T ) => void\n\tonDelete: ( document: T ) => void\n}\n\nexport interface CrudContentViewProps<T extends EntropicComponent> {\n\tcontroller: CrudController<T>\n\tsubmitButtonCaption: string\n\tonSubmit: ( document: T ) => void\n\tonCancel: ()=>void\n}\n\nexport interface CrudPanelLabels {\n\taddNewDocumentLabel: string\n\taddButtonLabel: string\n\tupdateButtonLabel: string\n\tsingularDocumentInCollectionCaption?: string\n\tdocumentsInCollectionCaption: string\n\tnoDocumentsFoundLabel: string\n}\n\nexport type Layout = 'formOrItems' | 'itemsAlways' | 'formAndItems'\n\ninterface CrudPanelState<T extends EntropicComponent> {\n\tdocuments: T[]\n\tmode: Mode\n}\n\ninterface CrudPanelProps<T extends EntropicComponent> {\n\tcontroller: CrudController<T>\t\n\tlabels?: CrudPanelLabels | ( ( controller: CrudController<T> ) => CrudPanelLabels )\n\tlayout?: Layout\n\tchildren: [\n\t\t( ( props: CrudContentViewProps<T> ) => ReactElement ) | ReactElement<CrudContentViewProps<T>>,\n\t\t( ( props: CrudCardProps<T> ) => ReactElement ) | ReactElement<CrudCardProps<T>>\n\t]\n\tclassName?: string\n\tcardAddButton?: boolean | JSX.Element\n\theader?: string | JSX.Element | ( ( controller: CrudController<T>, newDocumentAction: ()=>void, labels: CrudPanelLabels ) => string | JSX.Element )\n\tfooter?: string | JSX.Element | ( ( controller: CrudController<T>, newDocumentAction: ()=>void, labels: CrudPanelLabels ) => string | JSX.Element )\n}\n\nexport class CrudPanel<T extends EntropicComponent> extends Component<CrudPanelProps<T>, CrudPanelState<T>> {\n\n\tconstructor( props: CrudPanelProps<T> ) {\n\t\tsuper( props )\n\n\t\tthis.state = {\n\t\t\tdocuments: [],\n\t\t\tmode: Mode.normal,\n\t\t}\n\t}\n\n\toverride async componentDidMount() {\n\t\tconst { controller } = this.props\n\n\t\tthis.unsubscriber = controller.onChange( event => {\n\t\t\tif ( event.documentCollection ) {\n\t\t\t\tthis.unfilteredDocuments = event.documentCollection\n\t\t\t\tthis.setState({\n\t\t\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t\t\t})\n\t\t\t}\n\t\t\tif ( event.action === 'filterChange' ) {\n\t\t\t\tthis.setState({\n\t\t\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t\t\t})\n\t\t\t}\n\t\t\telse this.setState({})\n\t\t})\n\n\t\tthis.unfilteredDocuments = await controller.documentCollection()\n\t\tthis.setState({\n\t\t\tdocuments: controller.filter( this.unfilteredDocuments )\n\t\t})\n\t}\n\n\toverride componentWillUnmount() {\n\t\tthis.unsubscriber?.()\n\t}\n\n\tprivate newDocument() {\n\t\tthis.props.controller.newDocument()\n\n\t\tthis.setState({\n\t\t\tmode: Mode.add,\n\t\t})\n\t}\n\n\tprivate editDocument( document: T ) {\n\t\tthis.props.controller.setDocument( document )\n\n\t\tthis.setState({\n\t\t\tmode: Mode.edit\n\t\t})\n\t}\n\n\tprivate async storeDocument( document: T ) {\n\t\tconst { controller, layout } = this.props\n\t\tcontroller.setDocument( document )\n\t\tawait controller.storeDocument()\n\n\t\tif ( layout === 'formAndItems' ) {\n\t\t\tthis.newDocument()\n\t\t}\n\t\telse {\n\t\t\tthis.setState({\n\t\t\t\tmode: Mode.normal,\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate invokeContentViewChild( labels : CrudPanelLabels ) {\n\t\tconst { children, layout, controller } = this.props\n\t\tconst { mode } = this.state\n\t\tconst closeOnCancel = layout !== 'formAndItems'\n\t\tif ( !controller.document ) return\n\n\t\tconst props: CrudContentViewProps<T> = {\n\t\t\tcontroller: controller,\n\t\t\tsubmitButtonCaption: mode==Mode.edit? labels?.updateButtonLabel : labels?.addButtonLabel,\n\t\t\tonSubmit: ( document: T ) => this.storeDocument( document ),\n\t\t\tonCancel: closeOnCancel\n\t\t\t\t? ()=>this.setState({ mode: Mode.normal })\n\t\t\t\t: ()=>this.newDocument(),\n\t\t}\n\n\t\tif ( typeof children[0] === 'function' ) {\n\t\t\treturn cloneElement( children[0] (props), { key: controller.document.id })\n\t\t}\n\t\telse {\n\t\t\treturn cloneElement( children[0], { key: controller.document.id, ...props })\t\n\t\t}\t\t\n\t}\n\n\tprivate invokeDetailViewChild( document: T ) {\n\t\tconst { children, controller } = this.props\n\n\t\tconst props: CrudCardProps<T> = {\n\t\t\tdocument,\n\t\t\tonSelect: (document: T) => this.editDocument( document ),\n\t\t\tonDelete: (document: T) => controller.setDocument( document ).deleteDocument()\n\t\t}\n\n\t\tif ( typeof children[1] === 'function' ) {\n\t\t\treturn cloneElement( children[1]( props ), { key: document.id } )\n\t\t}\n\t\telse {\n\t\t\treturn cloneElement( children[1], { key: document.id, ...props } )\n\t\t}\n\t}\n\n\toverride render() {\n\t\tconst { mode, documents } = this.state\n\t\tconst { className, cardAddButton, controller } = this.props\n\t\tconst docClassName = snakeCase( controller.document?.className )\n\t\tlet labels = this.props.labels || {} as CrudPanelLabels\n\t\tconst layout = this.props.layout || 'itemsAlways'\n\n\t\tif ( typeof labels === 'function' ) labels = labels( controller )\n\n\t\tconst { addNewDocumentLabel, singularDocumentInCollectionCaption, documentsInCollectionCaption, noDocumentsFoundLabel } = labels\n\n\t\treturn (\n\t\t\t<div className={`crud-panel ${ docClassName } ${ className || '' }`}>\n\n\t\t\t\t{ mode === Mode.normal && layout !== 'formAndItems' && !cardAddButton &&\n\t\t\t\t\t<div className=\"header\">\n\n\t\t\t\t\t\t{ this.props.header\n\t\t\t\t\t\t\t? typeof this.props.header === 'function'\n\t\t\t\t\t\t\t\t? this.props.header( controller, ()=> this.newDocument(), labels )\n\t\t\t\t\t\t\t\t: this.props.header\n\t\t\t\t\t\t\t:\t<button onClick={ ()=> this.newDocument() }>\n\t\t\t\t\t\t\t\t\t{\taddNewDocumentLabel\t}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t</div>\n\n\t\t\t\t}\n\n\t\t\t\t{ ( layout === 'formAndItems' || mode === Mode.add || mode === Mode.edit ) &&\n\n\t\t\t\t\t<div className=\"content-panel\">\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.invokeContentViewChild( labels )\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t{ ( layout==='itemsAlways' || layout === 'formAndItems'\t|| mode === Mode.normal ) &&\n\n\t\t\t\t\t<div className=\"collection-panel\">\n\t\t\t\t\t\t{ documents?.length > 0 &&\n\t\t\t\t\t\t\t<h3>\n\t\t\t\t\t\t\t\t{ documents.length > 1\n\t\t\t\t\t\t\t\t\t? documentsInCollectionCaption \n\t\t\t\t\t\t\t\t\t: singularDocumentInCollectionCaption || documentsInCollectionCaption\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t<div className=\"documents\">\n\t\t\t\t\t\t\t{ cardAddButton &&\n\t\t\t\t\t\t\t\t<div className=\"crud-card card-add-button clickable\" \n\t\t\t\t\t\t\t\t\tonClick={ ()=> this.newDocument() }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"button-element\">{\tcardAddButton }</div>\n\t\t\t\t\t\t\t\t\t<div className=\"add-label\">{\taddNewDocumentLabel\t}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ documents?.length\n\t\t\t\t\t\t\t\t? documents.map( (document: T) => this.invokeDetailViewChild( document ) )\n\t\t\t\t\t\t\t\t: <p>{ noDocumentsFoundLabel }</p>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t<div className=\"footer\">\n\t\t\t\t\t{ this.props.footer &&\n\t\t\t\t\t\ttypeof this.props.footer === 'function'\n\t\t\t\t\t\t\t? this.props.footer( controller, ()=> this.newDocument(), labels )\n\t\t\t\t\t\t\t: this.props.footer\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\n\tprivate unsubscriber: Unsubscriber | undefined\n\tprivate unfilteredDocuments: T[] = []\n}\n"],"names":["k","e","t","f","i","B","N","Q","q","Y","L","z","r","H","J","Z","s","n","o","u","$","O","h","_","G","v","C","X","te","F","re","se","U","D","we","ProgressController","Observable","busy","name","stage","overallProgress","prev","_i","arr","cb","value","_CrudController","document","prop","decoratorDeclared","validatorFn","errorMessage","nonFilledProperty","propVal","limit","query","filter","observer","event","progressStage","error","found","docPromise","docs","doc","CrudController","REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","REACT_PORTAL_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_ACTIVITY_TYPE","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","ReactNoopUpdateQueue","assign","emptyObject","Component","props","context","updater","partialState","callback","ComponentDummy","PureComponent","pureComponentPrototype","isArrayImpl","noop","ReactSharedInternals","hasOwnProperty","ReactElement","refProp","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","match","userProvidedKeyEscapeRegex","getElementKey","element","index","resolveThenable","thenable","fulfilledValue","mapIntoArray","children","array","escapedPrefix","nameSoFar","invokeCallback","c","nextNamePrefix","mapChildren","func","result","count","child","lazyInitializer","payload","ctor","moduleObject","reportGlobalError","Children","forEachFunc","forEachContext","react_production","size","fn","childArray","defaultValue","childrenLength","render","compare","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","usable","action","initialState","permalink","deps","Context","initialValue","create","ref","passthrough","reducer","initialArg","init","subscribe","getSnapshot","getServerSnapshot","defineDeprecationWarning","methodName","info","warnNoop","publicInstance","callerName","warningKey","didWarnStateUpdateForUnmountedComponent","testStringCoercion","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_SUSPENSE_LIST_TYPE","innerType","getTaskName","getOwner","dispatcher","UnknownOwner","hasValidKey","getter","defineKeyPropWarningGetter","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","owner","debugStack","debugTask","validateChildKeys","node","childKey","didWarnAboutMaps","ioInfo","_ioInfo","_ioInfo2","resolveDispatcher","releaseAsyncTransition","enqueueTask","task","enqueueTaskImpl","requireString","module","didWarnAboutMessageChannel","channel","aggregateErrors","errors","popActScope","prevActQueue","prevActScopeDepth","actScopeDepth","recursivelyFlushAsyncActWork","resolve","reject","queue","flushActQueue","isFlushing","continuation","deprecatedAPIs","fnName","createTask","callStackForError","didWarnAboutOldJSXRuntime","unknownOwnerDebugStack","unknownOwnerDebugTask","didWarnNoAwaitAct","queueSeveralMicrotasks","exports","didAwaitActCall","error$0","_thrownError","returnValue$jscomp$0","getCurrentStack","a","refObject","elementType","ownName","lazyType","formatterFn","reactModule","require$$0","require$$1","jsxDEVImpl","isStaticChildren","keys","didWarnAboutKeySpread","React","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","CrudPanel","controller","layout","labels","mode","closeOnCancel","cloneElement","documents","className","cardAddButton","docClassName","snakeCase","addNewDocumentLabel","singularDocumentInCollectionCaption","documentsInCollectionCaption","noDocumentsFoundLabel","jsxs","jsx"],"mappings":"wPAAA,MAAMA,CAAE,CACN,aAAc,CACZ,KAAK,YAA8B,IAAI,GACzC,CAQA,UAAUC,EAAG,CACX,OAAO,KAAK,YAAY,IAAIA,CAAC,EAAG,IAAM,KAAK,YAAYA,CAAC,CAC1D,CAMA,YAAYA,EAAG,CACb,KAAK,YAAY,OAAOA,CAAC,CAC3B,CAMA,OAAOA,EAAG,CACR,KAAK,YAAY,QAASC,GAAMA,EAAED,CAAC,CAAC,CACtC,CAYA,IAAI,kBAAmB,CACrB,OAAO,KAAK,YAAY,IAC1B,CACF,CACA,MAAME,EAAI,CAAA,EACV,QAASC,EAAI,EAAGA,EAAI,IAAK,EAAEA,EACzBD,EAAE,MAAMC,EAAI,KAAK,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC,EACxC,SAASC,GAAED,EAAGH,EAAI,EAAG,CACnB,OAAQE,EAAEC,EAAEH,EAAI,CAAC,CAAC,EAAIE,EAAEC,EAAEH,EAAI,CAAC,CAAC,EAAIE,EAAEC,EAAEH,EAAI,CAAC,CAAC,EAAIE,EAAEC,EAAEH,EA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