wacom 19.2.0 → 19.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wacom.mjs +217 -176
- package/fesm2022/wacom.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/wacom.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wacom.mjs","sources":["../../../projects/wacom/src/lib/interfaces/config.ts","../../../projects/wacom/src/lib/interfaces/alert.interface.ts","../../../projects/wacom/src/lib/services/core.service.ts","../../../projects/wacom/src/lib/services/meta.service.ts","../../../projects/wacom/src/lib/guard/meta.guard.ts","../../../projects/wacom/src/lib/components/alert/alert.component.ts","../../../projects/wacom/src/lib/components/alert/alert.component.html","../../../projects/wacom/src/lib/components/modal/modal.component.ts","../../../projects/wacom/src/lib/components/modal/modal.component.html","../../../projects/wacom/src/lib/components/loader/loader.component.ts","../../../projects/wacom/src/lib/components/loader/loader.component.html","../../../projects/wacom/src/lib/components/base.component.ts","../../../projects/wacom/src/lib/components/crud.component.ts","../../../projects/wacom/src/lib/directives/click-outside.directive.ts","../../../projects/wacom/src/lib/pipes/arr.pipe.ts","../../../projects/wacom/src/lib/pipes/mongodate.pipe.ts","../../../projects/wacom/src/lib/pipes/pagination.pipe.ts","../../../projects/wacom/src/lib/pipes/safe.pipe.ts","../../../projects/wacom/src/lib/pipes/search.pipe.ts","../../../projects/wacom/src/lib/pipes/splice.pipe.ts","../../../projects/wacom/src/lib/services/base.service.ts","../../../projects/wacom/src/lib/services/store.service.ts","../../../projects/wacom/src/lib/services/http.service.ts","../../../projects/wacom/src/lib/components/alert/wrapper/wrapper.component.ts","../../../projects/wacom/src/lib/components/alert/wrapper/wrapper.component.html","../../../projects/wacom/src/lib/services/dom.service.ts","../../../projects/wacom/src/lib/services/alert.service.ts","../../../projects/wacom/src/lib/services/crud.service.ts","../../../projects/wacom/src/lib/services/mongo.service.ts","../../../projects/wacom/src/lib/services/render.service.ts","../../../projects/wacom/src/lib/services/hash.service.ts","../../../projects/wacom/src/lib/services/loader.service.ts","../../../projects/wacom/src/lib/services/socket.service.ts","../../../projects/wacom/src/lib/services/modal.service.ts","../../../projects/wacom/src/lib/components/files/files.component.ts","../../../projects/wacom/src/lib/components/files/files.component.html","../../../projects/wacom/src/lib/services/file.service.ts","../../../projects/wacom/src/lib/services/ui.service.ts","../../../projects/wacom/src/lib/services/time.service.ts","../../../projects/wacom/src/lib/wacom.module.ts","../../../projects/wacom/src/public-api.ts","../../../projects/wacom/src/wacom.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nexport interface Any {\r\n\t[key: string]: string;\r\n}\r\nexport interface Config {\r\n\tmeta?: {\r\n\t\tuseTitleSuffix?: boolean;\r\n\t\twarnMissingGuard?: boolean;\r\n\t\tdefaults?: {\r\n\t\t\ttitle?: string;\r\n\t\t\ttitleSuffix?: string;\r\n\t\t} & { [key: string]: string | undefined; };\r\n\t};\r\n\talert?: {\r\n\t\talerts?:object;\r\n\t\ttext?:string;\r\n\t\ttype?: string;\r\n\t\ticon?: string;\r\n\t\tclass?: string;\r\n\t\tunique?: string;\r\n\t\tprogress?: boolean;\r\n\t\tposition?: string;\r\n\t\ttimeout?: number;\r\n\t\tclose?: any;\r\n\t\tbuttons?: any;\r\n\t};\r\n\tmodal?: {\r\n\t\tsize?: any;\r\n\t\ttimeout?: any;\r\n\t\ttimestart?: any;\r\n\t\tclass?:string;\r\n\t\tmodals?:object;\r\n\t\tposition?: string;\r\n\t\tclosable?: boolean;\r\n\t\tunique?: string;\r\n\t};\r\n\tpopup?: {\r\n\t\tpopups?: object;\r\n\t};\r\n\tloader?: {\r\n\t\tloaders?: object;\r\n\t};\r\n\tsocket?: any;\r\n\thttp?: {\r\n\t\theaders?: any;\r\n\t\turl?: string;\r\n\t},\r\n\tstore?: {\r\n\t\tprefix?: string;\r\n\t\tset?: (\r\n\t\t\thold: any,\r\n\t\t\tvalue: any,\r\n\t\t\tcb?: () => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<boolean>,\r\n\t\tget?: (\r\n\t\t\thold: any,\r\n\t\t\tcb?: (value: string) => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<string>,\r\n\t\tremove?: (\r\n\t\t\thold: any,\r\n\t\t\tcb?: () => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<boolean>,\r\n\t\tclear?: (\r\n\t\t\tcb?: () => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<boolean>\r\n\t}\r\n}\r\nexport const CONFIG_TOKEN = new InjectionToken<Config>('config');\r\nexport const DEFAULT_CONFIG: Config = {\r\n\tmeta: {\r\n\t\tuseTitleSuffix: false,\r\n\t\twarnMissingGuard: true,\r\n\t\tdefaults: {}\r\n\t},\r\n\tsocket: false,\r\n\thttp: {\r\n\t\turl: '',\r\n\t\theaders: {}\r\n\t},\r\n\tstore: {\r\n\t\tprefix: ''\r\n\t}\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport interface Alert {\r\n\tonClose?: any;\r\n\talerts?:object;\r\n\tcomponent?: any;\r\n\ttext?:string;\r\n\ticon?:string;\r\n\ttype?: string;\r\n\tclass?: string;\r\n\tunique?: string;\r\n\tprogress?: boolean;\r\n\tposition?: string;\r\n\ttimeout?: any;\r\n\tclosable?: boolean;\r\n\tclose?: any;\r\n\tbuttons?: any;\r\n\t[x: string]: any;\r\n}\r\nexport const DEFAULT_Alert: Alert = {\r\n\talerts: {},\r\n\ttext: '',\r\n\ttype: 'info',\r\n\tclass: '',\r\n\tprogress: true,\r\n\tposition: 'bottomRight',\r\n\ttimeout: 5000,\r\n\tclosable: true,\r\n\tbuttons: []\r\n}\r\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\r\nimport { isPlatformServer } from '@angular/common';\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\n// Add capitalize method to String prototype if it doesn't already exist\r\nif (!String.prototype.capitalize) {\r\n\tString.prototype.capitalize = function (): string {\r\n\t\tif (this.length > 0) {\r\n\t\t\treturn this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();\r\n\t\t}\r\n\t\treturn '';\r\n\t};\r\n}\r\n\r\n// Extend the String interface to include the new method\r\ndeclare global {\r\n\tinterface String {\r\n\t\tcapitalize(): string;\r\n\t}\r\n}\r\n\r\ndeclare var cordova: any;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class CoreService {\r\n\tssr = false;\r\n\tlocalStorage: any; // = localStorage;\r\n\tnavigator: any; // = navigator;\r\n\tdocument: any; // = document;\r\n\twindow: any; // = window;\r\n\tconstructor(@Inject(PLATFORM_ID) private platformId: boolean) {\r\n\t\tthis.ssr = isPlatformServer(this.platformId);\r\n\r\n\t\tif (isPlatformServer(this.platformId)) {\r\n\t\t\tthis.localStorage = {\r\n\t\t\t\tgetItem: () => {},\r\n\t\t\t\tsetItem: () => {},\r\n\t\t\t\tremoveItem: () => {},\r\n\t\t\t\tclear: () => {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.document = {\r\n\t\t\t\tquerySelectorAll: () => {},\r\n\t\t\t\taddEventListener: () => {},\r\n\t\t\t\tremoveEventListener: () => {},\r\n\t\t\t\tdocumentElement: {},\r\n\t\t\t\tbody: {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.window = {\r\n\t\t\t\tlocation: {\r\n\t\t\t\t\thost: '',\r\n\t\t\t\t},\r\n\t\t\t\taddEventListener: () => {},\r\n\t\t\t\tremoveEventListener: () => {},\r\n\t\t\t\tsetTimeout: () => {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.navigator = {\r\n\t\t\t\tuserAgent: '',\r\n\t\t\t\tplatform: '',\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.localStorage = localStorage;\r\n\r\n\t\t\tthis.document = document;\r\n\r\n\t\t\tthis.window = window;\r\n\r\n\t\t\tthis.navigator = navigator;\r\n\t\t}\r\n\r\n\t\tthis.detectDevice();\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an object to an array. Optionally holds keys instead of values.\r\n\t *\r\n\t * @param {any} obj - The object to be converted.\r\n\t * @param {boolean} [holder=false] - If true, the keys will be held in the array; otherwise, the values will be held.\r\n\t * @returns {any[]} The resulting array.\r\n\t */\r\n\tota(obj: any, holder: boolean = false): any[] {\r\n\t\tif (Array.isArray(obj)) return obj;\r\n\t\tif (typeof obj !== 'object' || obj === null) return [];\r\n\t\tconst arr = [];\r\n\t\tfor (const each in obj) {\r\n\t\t\tif (\r\n\t\t\t\tobj.hasOwnProperty(each) &&\r\n\t\t\t\t(obj[each] ||\r\n\t\t\t\t\ttypeof obj[each] === 'number' ||\r\n\t\t\t\t\ttypeof obj[each] === 'boolean')\r\n\t\t\t) {\r\n\t\t\t\tif (holder) {\r\n\t\t\t\t\tarr.push(each);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tarr.push(obj[each]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes elements from `fromArray` that are present in `removeArray` based on a comparison field.\r\n\t *\r\n\t * @param {any[]} removeArray - The array of elements to remove.\r\n\t * @param {any[]} fromArray - The array from which to remove elements.\r\n\t * @param {string} [compareField='_id'] - The field to use for comparison.\r\n\t * @returns {any[]} The modified `fromArray` with elements removed.\r\n\t */\r\n\tsplice(\r\n\t\tremoveArray: any[],\r\n\t\tfromArray: any[],\r\n\t\tcompareField: string = '_id'\r\n\t): any[] {\r\n\t\tif (!Array.isArray(removeArray) || !Array.isArray(fromArray)) {\r\n\t\t\treturn fromArray;\r\n\t\t}\r\n\r\n\t\tconst removeSet = new Set(\r\n\t\t\tremoveArray.map((item) => item[compareField])\r\n\t\t);\r\n\t\treturn fromArray.filter((item) => !removeSet.has(item[compareField]));\r\n\t}\r\n\r\n\t/**\r\n\t * Unites multiple _id values into a single unique _id.\r\n\t * The resulting _id is unique regardless of the order of the input _id values.\r\n\t *\r\n\t * @param {...string[]} args - The _id values to be united.\r\n\t * @returns {string} The unique combined _id.\r\n\t */\r\n\tids2id(...args: string[]): string {\r\n\t\targs.sort((a, b) => {\r\n\t\t\tif (\r\n\t\t\t\tNumber(a.toString().substring(0, 8)) >\r\n\t\t\t\tNumber(b.toString().substring(0, 8))\r\n\t\t\t) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t});\r\n\r\n\t\treturn args.join();\r\n\t}\r\n\r\n\t// After While\r\n\tprivate _afterWhile: Record<string, number> = {};\r\n\t/**\r\n\t * Delays the execution of a callback function for a specified amount of time.\r\n\t * If called again within that time, the timer resets.\r\n\t *\r\n\t * @param {string | object | (() => void)} doc - A unique identifier for the timer, an object to host the timer, or the callback function.\r\n\t * @param {() => void} [cb] - The callback function to execute after the delay.\r\n\t * @param {number} [time=1000] - The delay time in milliseconds.\r\n\t */\r\n\tafterWhile(\r\n\t\tdoc: string | object | (() => void),\r\n\t\tcb?: () => void,\r\n\t\ttime: number = 1000\r\n\t): void {\r\n\t\tif (typeof doc === 'function') {\r\n\t\t\tcb = doc as () => void;\r\n\t\t\tdoc = 'common';\r\n\t\t}\r\n\r\n\t\tif (typeof cb === 'function' && typeof time === 'number') {\r\n\t\t\tif (typeof doc === 'string') {\r\n\t\t\t\tclearTimeout(this._afterWhile[doc]);\r\n\t\t\t\tthis._afterWhile[doc] = this.window.setTimeout(cb, time);\r\n\t\t\t} else if (typeof doc === 'object') {\r\n\t\t\t\tclearTimeout((doc as { __afterWhile: number }).__afterWhile);\r\n\t\t\t\t(doc as { __afterWhile: number }).__afterWhile =\r\n\t\t\t\t\tthis.window.setTimeout(cb, time);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.warn('badly configured after while');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Recursively copies properties from one object to another.\r\n\t * Handles nested objects, arrays, and Date instances appropriately.\r\n\t *\r\n\t * @param from - The source object from which properties are copied.\r\n\t * @param to - The target object to which properties are copied.\r\n\t */\r\n\tcopy(from: any, to: any) {\r\n\t\tfor (const each in from) {\r\n\t\t\tif (\r\n\t\t\t\ttypeof from[each] !== 'object' ||\r\n\t\t\t\tfrom[each] instanceof Date ||\r\n\t\t\t\tArray.isArray(from[each]) ||\r\n\t\t\t\tfrom[each] === null\r\n\t\t\t) {\r\n\t\t\t\tto[each] = from[each];\r\n\t\t\t} else {\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof to[each] !== 'object' ||\r\n\t\t\t\t\tto[each] instanceof Date ||\r\n\t\t\t\t\tArray.isArray(to[each]) ||\r\n\t\t\t\t\tto[each] === null\r\n\t\t\t\t) {\r\n\t\t\t\t\tto[each] = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.copy(from[each], to[each]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Device management\r\n\tdevice: string = '';\r\n\t/**\r\n\t * Detects the device type based on the user agent.\r\n\t */\r\n\tdetectDevice(): void {\r\n\t\tconst userAgent =\r\n\t\t\tthis.navigator.userAgent ||\r\n\t\t\tthis.navigator.vendor ||\r\n\t\t\t(this.window as any).opera;\r\n\t\tif (/windows phone/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Windows Phone';\r\n\t\t} else if (/android/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Android';\r\n\t\t} else if (\r\n\t\t\t/iPad|iPhone|iPod/.test(userAgent) &&\r\n\t\t\t!(this.window as any).MSStream\r\n\t\t) {\r\n\t\t\tthis.device = 'iOS';\r\n\t\t} else {\r\n\t\t\tthis.device = 'Web';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a mobile device.\r\n\t * @returns {boolean} - Returns true if the device is a mobile device.\r\n\t */\r\n\tisMobile(): boolean {\r\n\t\treturn (\r\n\t\t\tthis.device === 'Windows Phone' ||\r\n\t\t\tthis.device === 'Android' ||\r\n\t\t\tthis.device === 'iOS'\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a tablet.\r\n\t * @returns {boolean} - Returns true if the device is a tablet.\r\n\t */\r\n\tisTablet(): boolean {\r\n\t\treturn this.device === 'iOS' && /iPad/.test(navigator.userAgent);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a web browser.\r\n\t * @returns {boolean} - Returns true if the device is a web browser.\r\n\t */\r\n\tisWeb(): boolean {\r\n\t\treturn this.device === 'Web';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an Android device.\r\n\t * @returns {boolean} - Returns true if the device is an Android device.\r\n\t */\r\n\tisAndroid(): boolean {\r\n\t\treturn this.device === 'Android';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an iOS device.\r\n\t * @returns {boolean} - Returns true if the device is an iOS device.\r\n\t */\r\n\tisIos(): boolean {\r\n\t\treturn this.device === 'iOS';\r\n\t}\r\n\r\n\t// Version management\r\n\tversion = '1.0.0';\r\n\tappVersion = '';\r\n\tdateVersion = '';\r\n\t/**\r\n\t * Sets the combined version string based on appVersion and dateVersion.\r\n\t */\r\n\tsetVersion(): void {\r\n\t\tthis.version = this.appVersion || '';\r\n\t\tthis.version += this.version && this.dateVersion ? ' ' : '';\r\n\t\tthis.version += this.dateVersion || '';\r\n\t}\r\n\t/**\r\n\t * Sets the app version and updates the combined version string.\r\n\t *\r\n\t * @param {string} appVersion - The application version to set.\r\n\t */\r\n\tsetAppVersion(appVersion: string): void {\r\n\t\tthis.appVersion = appVersion;\r\n\t\tthis.setVersion();\r\n\t}\r\n\t/**\r\n\t * Sets the date version and updates the combined version string.\r\n\t *\r\n\t * @param {string} dateVersion - The date version to set.\r\n\t */\r\n\tsetDateVersion(dateVersion: string): void {\r\n\t\tthis.dateVersion = dateVersion;\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t// Signal management\r\n\tprivate _signals: Record<string, Subject<any>> = {};\r\n\r\n\t/**\r\n\t * Emits a signal, optionally passing data to the listeners.\r\n\t * @param signal - The name of the signal to emit.\r\n\t * @param data - Optional data to pass to the listeners.\r\n\t */\r\n\temit(signal: string, data?: any): void {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\tthis._signals[signal].next(data);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an Observable that emits values when the specified signal is emitted.\r\n\t * Multiple components or services can subscribe to this Observable to be notified of the signal.\r\n\t * @param signal - The name of the signal to listen for.\r\n\t * @returns An Observable that emits when the signal is emitted.\r\n\t */\r\n\ton(signal: string): Observable<any> {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\treturn this._signals[signal].asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Completes the Subject for a specific signal, effectively stopping any future emissions.\r\n\t * This also unsubscribes all listeners for the signal.\r\n\t * @param signal - The name of the signal to stop.\r\n\t */\r\n\toff(signal: string): void {\r\n\t\tif (!this._signals[signal]) return;\r\n\t\tthis._signals[signal].complete();\r\n\t\tdelete this._signals[signal];\r\n\t}\r\n\r\n\t// Await management\r\n\tprivate _completed: Record<string, boolean> = {};\r\n\tprivate _completeResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Marks a task as complete.\r\n\t * @param task - The task to mark as complete, identified by a string.\r\n\t */\r\n\tcomplete(task: string): void {\r\n\t\tthis._completed[task] = true;\r\n\t\tif (this._completeResolvers[task]) {\r\n\t\t\tthis._completeResolvers[task].forEach((resolve) => resolve());\r\n\t\t\tthis._completeResolvers[task] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified task is complete.\r\n\t * @param task - The task to watch for completion, identified by a string.\r\n\t * @returns A Promise that resolves when the task is complete.\r\n\t */\r\n\tonComplete(task: string): Promise<void> {\r\n\t\tif (this._completed[task]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._completeResolvers[task]) {\r\n\t\t\t\tthis._completeResolvers[task] = [];\r\n\t\t\t}\r\n\t\t\tthis._completeResolvers[task].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a task is completed.\r\n\t * @param task - The task to check, identified by a string.\r\n\t * @returns True if the task is completed, false otherwise.\r\n\t */\r\n\tcompleted(task: string): boolean {\r\n\t\treturn !!this._completed[task];\r\n\t}\r\n\r\n\t// Locking management\r\n\tprivate _locked: Record<string, boolean> = {};\r\n\tprivate _unlockResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Locks a resource to prevent concurrent access.\r\n\t * @param which - The resource to lock, identified by a string.\r\n\t */\r\n\tlock(which: string): void {\r\n\t\tthis._locked[which] = true;\r\n\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Unlocks a resource, allowing access.\r\n\t * @param which - The resource to unlock, identified by a string.\r\n\t */\r\n\tunlock(which: string): void {\r\n\t\tthis._locked[which] = false;\r\n\t\tif (this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which].forEach((resolve) => resolve());\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified resource is unlocked.\r\n\t * @param which - The resource to watch for unlocking, identified by a string.\r\n\t * @returns A Promise that resolves when the resource is unlocked.\r\n\t */\r\n\tonUnlock(which: string): Promise<void> {\r\n\t\tif (!this._locked[which]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t\t}\r\n\t\t\tthis._unlockResolvers[which].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a resource is locked.\r\n\t * @param which - The resource to check, identified by a string.\r\n\t * @returns True if the resource is locked, false otherwise.\r\n\t */\r\n\tlocked(which: string): boolean {\r\n\t\treturn !!this._locked[which];\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { Title, Meta } from '@angular/platform-browser';\r\nimport { Router, Route } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { CoreService } from './core.service';\r\n\r\nconst isDefined = (val: any) => typeof val !== 'undefined';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MetaService {\r\n\tprivate _meta: any;\r\n\r\n\tconstructor(\r\n\t\tprivate router: Router,\r\n\t\tprivate meta: Meta,\r\n\t\tprivate core: CoreService,\r\n\t\tprivate titleService: Title,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\t\tthis._meta = this.config.meta || {};\r\n\t\tthis._warnMissingGuard();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the default meta tags.\r\n\t *\r\n\t * @param defaults - The default meta tags.\r\n\t */\r\n\tsetDefaults(defaults: { [key: string]: string }): void {\r\n\t\tthis._meta.defaults = defaults;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the title and optional title suffix.\r\n\t *\r\n\t * @param title - The title to set.\r\n\t * @param titleSuffix - The title suffix to append.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTitle(title?: string, titleSuffix?: string): MetaService {\r\n\t\tlet titleContent = isDefined(title) ? title : this._meta.defaults['title'] || '';\r\n\t\tif (this._meta.useTitleSuffix) {\r\n\t\t\ttitleContent += isDefined(titleSuffix) ? titleSuffix : this._meta.defaults['titleSuffix'] || '';\r\n\t\t}\r\n\t\tthis._updateMetaTag('title', titleContent);\r\n\t\tthis._updateMetaTag('og:title', titleContent);\r\n\t\tthis.titleService.setTitle(titleContent);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets link tags.\r\n\t *\r\n\t * @param links - The links to set.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetLink(links: { [key: string]: string }): MetaService {\r\n\t\tObject.keys(links).forEach(rel => {\r\n\t\t\tlet link: HTMLLinkElement = this.core.document.createElement('link');\r\n\t\t\tlink.setAttribute('rel', rel);\r\n\t\t\tlink.setAttribute('href', links[rel]);\r\n\t\t\tthis.core.document.head.appendChild(link);\r\n\t\t});\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTag(tag: string, value: string, prop?: string): MetaService {\r\n\t\tif (tag === 'title' || tag === 'titleSuffix') {\r\n\t\t\tthrow new Error(`Attempt to set ${tag} through 'setTag': 'title' and 'titleSuffix' are reserved tag names. Please use 'MetaService.setTitle' instead`);\r\n\t\t}\r\n\t\tconst content = isDefined(value) ? value : this._meta.defaults[tag] || '';\r\n\t\tthis._updateMetaTag(tag, content, prop);\r\n\t\tif (tag === 'description') {\r\n\t\t\tthis._updateMetaTag('og:description', content, prop);\r\n\t\t\tthis._updateMetaTag('twitter:description', content, prop);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tprivate _updateMetaTag(tag: string, value: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\t\tthis.meta.updateTag({ [prop]: tag, content: value });\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tremoveTag(tag: string, prop?: string): void {\r\n\t\tprop = prop || (tag.startsWith('og:') || tag.startsWith('twitter:') ? 'property' : 'name');\r\n\t\tthis.meta.removeTag(`${prop}=\"${tag}\"`);\r\n\t}\r\n\r\n\t/**\r\n\t * Warns about missing meta guards in routes.\r\n\t */\r\n\tprivate _warnMissingGuard(): void {\r\n\t\tif (isDefined(this._meta.warnMissingGuard) && !this._meta.warnMissingGuard) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst hasDefaultMeta = !!Object.keys(this._meta.defaults).length;\r\n\t\tconst hasMetaGuardInArr = (it: any) => (it && it.IDENTIFIER === 'MetaGuard');\r\n\t\tlet hasShownWarnings = false;\r\n\t\tthis.router.config.forEach((route: Route) => {\r\n\t\t\tconst hasRouteMeta = route.data && route.data['meta'];\r\n\t\t\tconst showWarning = !isDefined(route.redirectTo) && (hasDefaultMeta || hasRouteMeta) && !(route.canActivate || []).some(hasMetaGuardInArr);\r\n\t\t\tif (showWarning) {\r\n\t\t\t\tconsole.warn(`Route with path \"${route.path}\" has ${hasRouteMeta ? '' : 'default '}meta tags, but does not use MetaGuard. Please add MetaGuard to the canActivate array in your route configuration`);\r\n\t\t\t\thasShownWarnings = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (hasShownWarnings) {\r\n\t\t\tconsole.warn(`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { MetaService } from '../services/meta.service';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\n\r\n@Injectable()\r\nexport class MetaGuard {\r\n\tpublic static IDENTIFIER = 'MetaGuard';\r\n\tprivate _meta: any;\r\n\tpublic constructor(\r\n\t\tprivate metaService: MetaService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tthis._meta = config.meta;\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t}\r\n\tpublic canActivate(\r\n\t\troute: ActivatedRouteSnapshot,\r\n\t\tstate: RouterStateSnapshot\r\n\t): boolean {\r\n\t\tthis._processRouteMetaTags(route.data && route.data['meta']);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _processRouteMetaTags(meta: any = {}) {\r\n\t\tif (meta.disableUpdate) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (meta.title) {\r\n\t\t\tthis.metaService.setTitle(meta.title, meta.titleSuffix);\r\n\t\t}\r\n\t\tif (Array.isArray(meta.links)) {\r\n\t\t\tthis.metaService.setLink(meta.links);\r\n\t\t} else if (typeof meta.links === 'string') {\r\n\t\t\tthis.metaService.setLink(meta.links.split(' '));\r\n\t\t}\r\n\t\tif (Array.isArray(this._meta.defaults?.links)) {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links);\r\n\t\t} else if (typeof this._meta.defaults?.links === 'string') {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links.split(' '));\r\n\t\t}\r\n\t\tObject.keys(meta).forEach((prop) => {\r\n\t\t\tif (\r\n\t\t\t\tprop === 'title' ||\r\n\t\t\t\tprop === 'titleSuffix' ||\r\n\t\t\t\tprop === 'links'\r\n\t\t\t) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tObject.keys(meta[prop]).forEach((key) => {\r\n\t\t\t\tthis.metaService.setTag(key, meta[prop][key], prop);\r\n\t\t\t});\r\n\t\t});\r\n\t\tObject.keys(this._meta.defaults).forEach((key) => {\r\n\t\t\tif (\r\n\t\t\t\tkey in meta ||\r\n\t\t\t\tkey === 'title' ||\r\n\t\t\t\tkey === 'titleSuffix' ||\r\n\t\t\t\tkey === 'links'\r\n\t\t\t) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.metaService.setTag(key, this._meta.defaults[key]);\r\n\t\t});\r\n\t}\r\n}\r\n","import { Component, ViewChild } from '@angular/core';\r\nimport { CoreService } from '../../services/core.service';\r\n\r\n@Component({\n selector: 'alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n standalone: false\n})\r\nexport class AlertComponent {\r\n\t@ViewChild('alert', { static: false }) alert: any;\r\n\tcomponent: any;\r\n\ttext: string = '';\r\n\tclass: string = '';\r\n\ttype: string = 'info';\r\n\tprogress: boolean = true;\r\n\tposition: string = 'bottomRight'; // [bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter or center]\r\n\ticon: string = '';\r\n\ttimeout: any = 5000;\r\n\tclose: any;\r\n\tclosable: any = true;\r\n\tbuttons: any = []; /*[{text, callback}]*/\r\n\r\n\tconstructor(public core: CoreService) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tif (this.timeout) {\r\n\t\t\t\tlet remaining = JSON.parse(JSON.stringify(this.timeout));\r\n\t\t\t\tlet timer = setTimeout(() => {\r\n\t\t\t\t\tthis.remove();\r\n\t\t\t\t}, remaining);\r\n\t\t\t\tlet start = new Date();\r\n\t\t\t\tthis.alert.nativeElement.addEventListener(\r\n\t\t\t\t\t'mouseenter',\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tclearTimeout(timer);\r\n\t\t\t\t\t\tremaining -= new Date().getTime() - start.getTime();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t\tthis.alert.nativeElement.addEventListener(\r\n\t\t\t\t\t'mouseleave',\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tstart = new Date();\r\n\t\t\t\t\t\tclearTimeout(timer);\r\n\t\t\t\t\t\ttimer = core.window.setTimeout(() => {\r\n\t\t\t\t\t\t\tthis.remove();\r\n\t\t\t\t\t\t}, remaining);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tpublic delete_animation = false;\r\n\tremove() {\r\n\t\tthis.delete_animation = true;\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.close();\r\n\t\t\tthis.delete_animation = false;\r\n\t\t}, 350);\r\n\t}\r\n}\r\n","<div\r\n *ngIf=\"text\"\r\n [ngClass]=\"class\"\r\n class=\"waw-alert-container height\"\r\n [class._close]=\"delete_animation\"\r\n>\r\n <div\r\n [class.waw-alert-color-blue]=\"type == 'info'\"\r\n [class.waw-alert-color-red]=\"type == 'error'\"\r\n [class.waw-alert-color-green]=\"type == 'success'\"\r\n [class.waw-alert-color-orange]=\"type == 'warning'\"\r\n [class.waw-alert-color-yellow]=\"type == 'question'\"\r\n class=\"waw-alert bounceInUp waw-alert-theme-light waw-alert-animateInside waw-alert-opened\"\r\n #alert\r\n >\r\n <div class=\"waw-alert__progress\" *ngIf=\"progress\">\r\n <span\r\n [ngStyle]=\"{ 'animation-duration': (timeout + 350) / 1000 + 's' }\"\r\n ></span>\r\n </div>\r\n <div class=\"waw-alert-body\">\r\n <div *ngIf=\"!component\" class=\"waw-alert-texts\">\r\n <div *ngIf=\"icon\" class=\"{{ icon }}\"></div>\r\n <div class=\"waw-alert-message slideIn\">{{ text }}</div>\r\n </div>\r\n <div *ngIf=\"!component && type == 'question'\">\r\n <button\r\n class=\"alert-btn\"\r\n *ngFor=\"let b of buttons\"\r\n (click)=\"remove(); b.callback && b.callback()\"\r\n >\r\n {{ b.text }}\r\n </button>\r\n </div>\r\n <div class=\"waw-alert__close\" *ngIf=\"closable\" (click)=\"remove()\"></div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\n selector: 'lib-modal',\n templateUrl: './modal.component.html',\n styleUrls: ['./modal.component.scss'],\n standalone: false\n})\r\nexport class ModalComponent implements OnInit {\r\n\tclass: string = '';\r\n\tsize: string = 'flex';\r\n\tclosable: boolean = true;\r\n\tclose: any;\r\n\tonOpen: any;\r\n\ttimestart: any;\r\n\ttimeout: any;\r\n\tshowModal = false;\r\n\tallowClose = true;\r\n\tonClickOutside: any;\r\n\tngOnInit() {\r\n\t\tif (typeof this.onClickOutside !== 'function') {\r\n\t\t\tthis.onClickOutside = this.close;\r\n\t\t\t// this.onClickOutside = () => {\r\n\t\t\t// \tif (this.allowClose) {\r\n\t\t\t// \t\tthis.close();\r\n\t\t\t// \t}\r\n\r\n\t\t\t// \tthis.allowClose = true;\r\n\t\t\t// };\r\n\t\t}\r\n\r\n\t\tif (typeof this.onOpen == 'function') this.onOpen();\r\n\r\n\t\twindow.addEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.showModal = true;\r\n\t\t}, this.timestart || 0);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\twindow.removeEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tpopStateListener(e: Event) {\r\n\t\tthis.close();\r\n\t}\r\n}\r\n","<div [hidden]=\"!showModal\" class=\"modal\" [ngClass]=\"class + ' ' + size\" (click)=\"onClickOutside()\">\r\n\t<!-- (click)=\"$event.stopPropagation()\" -->\r\n\t<!-- <div class=\"modal-content\" (mousedown)=\"allowClose = false\"> -->\r\n\t<div class=\"modal-content\" (click)=\"$event.stopPropagation();\">\r\n\t\t<div><!-- Content Will Drop Here --></div>\r\n\t\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t</div>\r\n</div>\r\n","import { Component, ViewChild} from '@angular/core';\r\n\r\n@Component({\n selector: 'lib-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n standalone: false\n})\r\n\r\nexport class LoaderComponent {\r\n @ViewChild('loader', { static: false }) loader: any;\r\n public text: string = \"Loading\";\r\n public class: string = \"\";\r\n public progress: boolean = true;\r\n public timeout: number = 5000;\r\n public close: any;\r\n public closable: any = true;\r\n constructor() { }\r\n ngOnInit(){\r\n if(this.timeout){\r\n setTimeout(()=>{\r\n this.close();\r\n }, this.timeout)\r\n }\r\n }\r\n}\r\n","<div style=\"position: fixed; width: 100%; height: 100%; left: 0; top: 0; background-color: #334d6e; display: flex; justify-content: center; align-items: center; z-index: 999999;\" #loader>\r\n\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t<span style=\"font-size: 30px; color: white;\">\r\n\t\t{{text}}\r\n\t</span>\r\n</div>","\n/**\n * BaseComponent is an abstract class that provides basic functionality for managing the current timestamp.\n */\nexport abstract class BaseComponent {\n\t/**\n\t * The current timestamp in milliseconds since the Unix epoch.\n\t */\n\tnow = new Date().getTime();\n\n\t/**\n\t * Refreshes the `now` property with the current timestamp.\n\t */\n\trefreshNow(): void {\n\t\tthis.now = new Date().getTime();\n\t}\n}\n","import { CrudDocument } from '../interfaces/crud.interface';\r\nimport { CoreService } from '../services/core.service';\r\nimport { CrudService } from '../services/crud.service';\r\nimport { BaseComponent } from './base.component';\r\n\r\n/**\r\n * Form interface defines the structure for a form that handles document operations.\r\n * It includes a method `modalDocs` that processes an array of documents and returns a promise.\r\n */\r\ninterface Form {\r\n\t/**\r\n\t * Processes an array of documents and returns a promise with processed documents.\r\n\t *\r\n\t * @param docs The documents to be processed.\r\n\t * @returns A promise that resolves with the processed documents.\r\n\t */\r\n\tmodalDocs<Document>(docs: Document[]): Promise<Document[]>;\r\n}\r\n\r\n/**\r\n * CrudComponent is an abstract class that extends BaseComponent and provides CRUD functionality for managing documents.\r\n * It interacts with a CrudService to create, read, update, or delete documents.\r\n *\r\n * @template Service - The service class that extends CrudService for managing documents.\r\n * @template Document - The type of the document that the component works with.\r\n */\r\nexport abstract class CrudComponent<\r\n\tService extends CrudService<Document>,\r\n\tDocument extends CrudDocument\r\n> extends BaseComponent {\r\n\t/**\r\n\t * A getter that returns the list of documents by calling `getDocs()` from the service.\r\n\t *\r\n\t * @returns An array of documents.\r\n\t */\r\n\tget rows(): Document[] {\r\n\t\treturn this.__service.getDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Columns to be displayed for the document list, defaulting to 'name' and 'description'.\r\n\t */\r\n\tcolumns = ['name', 'description'];\r\n\r\n\t/**\r\n\t * Constructor for initializing the CrudComponent.\r\n\t *\r\n\t * @param __service The service instance for interacting with the document data (e.g., CRUD operations).\r\n\t * @param __core The core service providing utility methods.\r\n\t * @param __form The form interface used for handling document processing.\r\n\t */\r\n\tconstructor(\r\n\t\tprivate __service: Service,\r\n\t\tprivate __core: CoreService,\r\n\t\tprivate __form: unknown\r\n\t) {\r\n\t\tsuper();\r\n\t}\r\n\r\n\t/**\r\n\t * Performs bulk management of documents by creating, updating, or deleting them.\r\n\t *\r\n\t * If `create` is true, it creates new documents. If false, it compares documents\r\n\t * and deletes or updates them accordingly.\r\n\t *\r\n\t * @param create If true, new documents will be created; otherwise, updates or deletions will be performed.\r\n\t * @returns A function that handles bulk document operations.\r\n\t */\r\n\tbulkManagement(create = true): () => void {\r\n\t\treturn (): void => {\r\n\t\t\t// Call the modalDocs method from the __form interface to process the documents.\r\n\t\t\t(this.__form as Form)\r\n\t\t\t\t.modalDocs<Document>(create ? [] : this.rows)\r\n\t\t\t\t.then((docs: Document[]) => {\r\n\t\t\t\t\tif (create) {\r\n\t\t\t\t\t\t// Create new documents\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tthis.preCreate(doc); // Prepare document for creation\r\n\r\n\t\t\t\t\t\t\tthis.__service.create(doc); // Call the service to create the document\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Delete documents that are no longer present\r\n\t\t\t\t\t\tfor (const doc of this.rows) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t!docs.find(\r\n\t\t\t\t\t\t\t\t\t(localDoc) => localDoc._id === doc._id\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tthis.__service.delete(doc); // Delete document from the service\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Update existing documents or create new ones if not found\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tconst localDoc = this.rows.find(\r\n\t\t\t\t\t\t\t\t(localDoc) => localDoc._id === doc._id\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\tif (localDoc) {\r\n\t\t\t\t\t\t\t\t// Update the document if it exists locally\r\n\t\t\t\t\t\t\t\tthis.__core.copy(doc, localDoc);\r\n\r\n\t\t\t\t\t\t\t\tthis.__service.update(localDoc); // Call the service to update the document\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.preCreate(doc); // Prepare document for creation\r\n\r\n\t\t\t\t\t\t\t\tthis.__service.create(doc); // Call the service to create the new document\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Prepares a document before creation by deleting the `__created` property.\r\n\t *\r\n\t * @param doc The document to be prepared for creation.\r\n\t */\r\n\tpreCreate(doc: Document): void {\r\n\t\tdelete doc.__created;\r\n\t}\r\n}\r\n","import { Directive, ElementRef, EventEmitter, Output, HostListener } from '@angular/core';\r\n\r\n@Directive({\n selector: '[clickOutside]',\n standalone: false\n})\r\nexport class ClickOutsideDirective {\r\n\t@Output() clickOutside: EventEmitter<Event> = new EventEmitter<Event>();\r\n\r\n\tconstructor(private elementRef: ElementRef) { }\r\n\r\n\t@HostListener('document:click', ['$event'])\r\n\tonClick(event: Event): void {\r\n\t\tconst clickedInside = this.elementRef.nativeElement.contains(event.target);\r\n\t\tif (!clickedInside) {\r\n\t\t\tthis.clickOutside.emit(event);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\n name: 'arr',\n standalone: false\n})\r\nexport class ArrPipe implements PipeTransform {\r\n\ttransform(data: any, type?: any, refresh?:any): any {\r\n\t\tif(!data) { return []; }\r\n\t\tif(typeof data == 'string') return data.split(type||' ');\r\n\t\tif(Array.isArray(data)) { return data; }\r\n\t\tif(typeof data != 'object') { return []; }\r\n\t\tlet arr = [];\r\n\t\tfor (let each in data) {\r\n\t\t\tif(!data[each]) continue;\r\n\t\t\tif(type == 'prop'){\r\n\t\t\t\tarr.push(each);\r\n\t\t\t}else if(type == 'value'){\r\n\t\t\t\tarr.push(data[each]);\r\n\t\t\t}else{\r\n\t\t\t\tarr.push({\r\n\t\t\t\t\tprop: each,\r\n\t\t\t\t\tvalue: data[each]\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\n name: 'mongodate',\n standalone: false\n})\r\nexport class MongodatePipe implements PipeTransform {\r\n\ttransform(_id: any){\r\n\t\tif(!_id) return new Date();\r\n\t\tlet timestamp = _id.toString().substring(0,8);\r\n\t\treturn new Date(parseInt(timestamp,16)*1000);\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\n name: 'page',\n pure: false,\n standalone: false\n})\r\nexport class PaginationPipe implements PipeTransform {\r\n\ttransform(arr: any, config:any, sort:any, search=''): any {\r\n if(!Array.isArray(arr)) return [];\r\n\t\tarr = arr.slice();\r\n\t\tfor (let i = 0; i < arr.length; i++){\r\n\t\t arr[i].num = i+1;\r\n\t\t}\r\n\t\tif(sort.direction) {\r\n arr.sort((a:any, b:any)=> {\r\n if (a[sort.title] < b[sort.title]) {\r\n return (sort.direction=='desc') ? 1 : -1;\r\n }\r\n if (a[sort.title] > b[sort.title]) {\r\n return (sort.direction=='desc') ? -1 : 1;\r\n }\r\n return 0;\r\n })\r\n }\r\n\t\treturn arr.slice((config.page-1)*config.perPage, config.page*config.perPage);;\r\n\t}\r\n}","import { Pipe } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n@Pipe({\n name: 'safe',\n standalone: false\n})\r\nexport class SafePipe {\r\n\tconstructor(private sanitizer: DomSanitizer){}\r\n\ttransform(html: any) {\r\n\t\treturn this.sanitizer.bypassSecurityTrustResourceUrl(html);\r\n\t}\r\n}","import { Pipe, PipeTransform } from '@angular/core';\r\n/*\r\n*\tAuthor: Honchar Denys\r\n*\tSearch for any content in any type of given documents\r\n*\tAlways returning an array, even if nothing is provided\r\n*/\r\n@Pipe({\n name: 'search',\n standalone: false\n})\r\nexport class SearchPipe implements PipeTransform {\r\n\tprivate c = 0;\r\n\t// transform(given: any, search?: any, fields?: any, l?: any, i?: any, reload?: any): any {\r\n\ttransform(given: any, s?: any, f?: any, l?: any, i?: any, reload?: any): any {\r\n\t\t// given stands for the provided array with docs\r\n\t\t// s stands for search\r\n\t\t// f stands for fields\r\n\t\t// l stands for limit\r\n\t\t// i stands for ignore filter\r\n\t\t// start stands for start the limit\r\n\t\tif (!s) {\r\n\t\t\treturn given;\r\n\t\t}\r\n\t\tif (typeof f == 'number') {\r\n\t\t\tl = f;\r\n\t\t\tf = null;\r\n\t\t}\r\n\t\tif (i || !s) {\r\n\t\t\tif (l && Array.isArray(given)) return given.slice(0, l);\r\n\t\t\telse return given || [];\r\n\t\t}\r\n\t\tlet _arr: any = [], _check: any = {};\r\n\t\tif (!Array.isArray(s) && typeof s == 'object') {\r\n\t\t\tlet _s = [];\r\n\t\t\tfor (let key in s) {\r\n\t\t\t\tif (s[key]) _s.push(key);\r\n\t\t\t}\r\n\t\t\ts = _s;\r\n\t\t}\r\n\t\tif (typeof s == 'string') {\r\n\t\t\ts = [s];\r\n\t\t}\r\n\t\tif (!f) f = ['name'];\r\n\t\tif (typeof f == 'string') f = f.split(' ');\r\n\t\tlet sub_test = function (obj: any, _f: any, initObj: any, check: any): any {\r\n\t\t\tif (!obj) return;\r\n\t\t\tif (_f.indexOf('.') > -1) {\r\n\t\t\t\tlet sub = _f.split('.');\r\n\t\t\t\tlet nsub = sub.shift();\r\n\t\t\t\tif (Array.isArray(obj[nsub])) {\r\n\t\t\t\t\tfor (let s = 0; s < obj[nsub].length; s++) {\r\n\t\t\t\t\t\tsub_test(obj[nsub][s], sub.join('.'), initObj, check);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn sub_test(obj[nsub], sub.join('.'), initObj, check);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (let j = 0; j < s.length; j++) {\r\n\t\t\t\tlet b = false;\r\n\t\t\t\tif (obj[_f] && (typeof obj[_f] == 'string' || typeof obj[_f] == 'number') &&\r\n\t\t\t\t\ttypeof s[j] == 'string' &&\r\n\t\t\t\t\t(obj[_f].toString().toLowerCase().indexOf(s[j].toLowerCase()) > -1 ||\r\n\t\t\t\t\t\ts[j].toLowerCase().indexOf(obj[_f].toString().toLowerCase()) > -1)) {\r\n\t\t\t\t\tif (!_check[check]) _arr.push(initObj);\r\n\t\t\t\t\t_check[check] = true;\r\n\t\t\t\t\tb = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (b) break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet test = function (obj: any, check: any) {\r\n\t\t\tfor (let i = 0; i < f.length; i++) {\r\n\t\t\t\tsub_test(obj, f[i], obj, check);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (Array.isArray(given)) {\r\n\t\t\tfor (let i = 0; i < given.length; i++) {\r\n\t\t\t\ttest(given[i], i);\r\n\t\t\t}\r\n\t\t} else if (typeof given == 'object') {\r\n\t\t\tfor (let key in given) {\r\n\t\t\t\ttest(given[key], key);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (l) return _arr.splice(0, l);\r\n\t\treturn _arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\n name: 'splice',\n standalone: false\n})\r\nexport class SplicePipe implements PipeTransform {\r\n\ttransform(from: any, which: any, refresh?:number): any {\r\n\t\tif(Array.isArray(from)) from = { arr: from, prop: '_id' };\r\n\t\tlet arr = which.keep && [] || from.arr.slice();\r\n\t\tif(Array.isArray(which)) which = { arr: which, prop: '_id' };\r\n\t\tfor (let i = from.arr.length-1; i >= 0; i--){\r\n\t\t\tfor (let j = 0; j < which.arr.length; j++){\r\n\t\t\t\tif(from.prop && which.prop){\r\n\t\t\t\t\tif(from.arr[i][from.prop] == which.arr[j][which.prop]){\r\n\t\t\t\t\t\tif(which.keep){\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(from.prop){\r\n\t\t\t\t\tif(from.arr[i][from.prop] == which.arr[j]){\r\n\t\t\t\t\t\tif(which.keep){\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(which.prop){\r\n\t\t\t\t\tif(from.arr[i] == which.arr[j][which.prop]){\r\n\t\t\t\t\t\tif(which.keep){\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(from.arr[i] == which.arr[j]){\r\n\t\t\t\t\tif(which.keep){\r\n\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class BaseService {\r\n\tnow = new Date().getTime();\r\n\r\n\trefreshNow(): void {\r\n\t\tthis.now = new Date().getTime();\r\n\t}\r\n}\r\n","import { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class StoreService {\r\n\tprivate _prefix = '';\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t\tprivate core: CoreService\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the prefix for storage keys.\r\n\t *\r\n\t * @param prefix - The prefix to set.\r\n\t */\r\n\tsetPrefix(prefix: string): void {\r\n\t\tthis._prefix = prefix;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tset(\r\n\t\tkey: string,\r\n\t\tvalue: string,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\tif (this.config.store?.set) {\r\n\t\t\tthis.config.store.set(key, value, callback, errCallback);\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tthis.core.localStorage.setItem(key, value);\r\n\t\t\t\tcallback();\r\n\t\t\t} catch (e) {\r\n\t\t\t\terrCallback();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setAsync(key: string, value: string): Promise<boolean> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.set) {\r\n\t\t\t\tawait this.config.store.set(key, value);\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.setItem(key, value);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute with the retrieved value.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tget(\r\n\t\tkey: string,\r\n\t\tcallback: (value: string) => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\tif (this.config.store?.get) {\r\n\t\t\tthis.config.store.get(key, callback, errCallback);\r\n\t\t} else {\r\n\t\t\tconst value = this.core.localStorage.getItem(key) || '';\r\n\t\t\tcallback(value);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getAsync(key: string): Promise<string> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.get) {\r\n\t\t\t\treturn await this.config.store.get(key);\r\n\t\t\t} else {\r\n\t\t\t\treturn this.core.localStorage.getItem(key) || '';\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tsetJson(\r\n\t\tkey: string,\r\n\t\tvalue: any,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tthis.set(key, JSON.stringify(value), callback, errCallback);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setJsonAsync(key: string, value: any): Promise<boolean> {\r\n\t\treturn this.setAsync(key, JSON.stringify(value));\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute with the retrieved value.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tgetJson(\r\n\t\tkey: string,\r\n\t\tcallback: (value: any) => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tthis.get(\r\n\t\t\tkey,\r\n\t\t\t(value: string) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst parsedValue = JSON.parse(value);\r\n\t\t\t\t\tcallback(parsedValue);\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tcallback(null);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terrCallback\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getJsonAsync<T = any>(key: string): Promise<T | null> {\r\n\t\tconst value = await this.getAsync(key);\r\n\t\ttry {\r\n\t\t\treturn JSON.parse(value);\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync remove(\r\n\t\tkey: string,\r\n\t\tcallback?: () => void,\r\n\t\terrCallback?: () => void\r\n\t): Promise<boolean> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.remove) {\r\n\t\t\t\tawait this.config.store.remove(key, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.removeItem(key);\r\n\t\t\t}\r\n\t\t\tcallback?.();\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\terrCallback?.();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all values from storage.\r\n\t *\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync clear(\r\n\t\tcallback?: () => void,\r\n\t\terrCallback?: () => void\r\n\t): Promise<boolean> {\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.clear) {\r\n\t\t\t\tawait this.config.store.clear();\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.clear();\r\n\t\t\t}\r\n\t\t\tcallback?.();\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\terrCallback?.();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Applies the configured prefix to a storage key.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns The prefixed storage key.\r\n\t */\r\n\tprivate applyPrefix(key: string): string {\r\n\t\tif (this.config.store?.prefix) {\r\n\t\t\tkey = this.config.store.prefix + key;\r\n\t\t}\r\n\t\tif (this._prefix) {\r\n\t\t\tkey = this._prefix + key;\r\n\t\t}\r\n\t\treturn key;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a value exists in storage.\r\n\t *\r\n\t * This function checks whether a value is present for the given key in the storage.\r\n\t * It uses the configured storage mechanism if available; otherwise, it defaults to using `localStorage`.\r\n\t *\r\n\t * @param key - The storage key to check.\r\n\t * @returns A promise that resolves to `true` if the value exists, otherwise `false`.\r\n\t *\r\n\t * @example\r\n\t * const store = new StoreService(config, core);\r\n\t *\r\n\t * // Set a value and check if it exists\r\n\t * await store.setAsync('exampleKey', 'exampleValue');\r\n\t * const exists = await store.has('exampleKey');\r\n\t * console.log(exists); // Output: true\r\n\t *\r\n\t * @notes\r\n\t * - This method internally uses `getAsync` to retrieve the value and checks if it is not null or empty.\r\n\t * - An empty string value will still return `true` as the key exists in storage.\r\n\t */\r\n\tasync has(key: string): Promise<boolean> {\r\n\t\treturn !!(await this.getAsync(key));\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\r\nimport {\r\n\tHttpClient,\r\n\tHttpErrorResponse,\r\n\tHttpHeaders,\r\n} from '@angular/common/http';\r\nimport { EMPTY, Observable, ReplaySubject } from 'rxjs';\r\nimport { catchError, first } from 'rxjs/operators';\r\nimport { StoreService } from './store.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HttpService {\r\n\t// An array of error handling callbacks\r\n\terrors: ((err: HttpErrorResponse, retry?: () => void) => {})[] = [];\r\n\r\n\t// Base URL for HTTP requests\r\n\turl = '';\r\n\r\n\t// Flag to lock the service to prevent multiple requests\r\n\tlocked = false;\r\n\r\n\t// Array to store setTimeout IDs for managing request locks\r\n\tawaitLocked: any[] = [];\r\n\r\n\t// Configuration object for HTTP settings\r\n\tprivate _http: any;\r\n\r\n\t// Object to store HTTP headers\r\n\tprivate _headers: any = {};\r\n\r\n\t// Instance of HttpHeaders with current headers\r\n\tprivate _http_headers = new HttpHeaders(this._headers);\r\n\r\n\tconstructor(\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpClient,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config\r\n\t) {\r\n\t\t// Initialize HTTP configuration and headers from injected config\r\n\t\tthis._http = this._config.http || {};\r\n\r\n\t\tif (typeof this._http.headers === 'object') {\r\n\t\t\tfor (const header in this._http.headers) {\r\n\t\t\t\tthis._headers[header] = this._http.headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t}\r\n\r\n\t\t// Retrieve and set the base URL and headers from the store\r\n\t\tthis.store.get('http_url', (url: any) => {\r\n\t\t\tthis.url = url || this._http.url || '';\r\n\t\t});\r\n\r\n\t\tthis.store.getJson('http_headers', (headers: any) => {\r\n\t\t\tif (headers) {\r\n\t\t\t\tfor (const header in headers) {\r\n\t\t\t\t\tthis._headers[header] = headers[header];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t// Set a new base URL and save it in the store\r\n\tsetUrl(url: string) {\r\n\t\tthis.url = url;\r\n\r\n\t\tthis.store.set('http_url', url);\r\n\t}\r\n\r\n\t// Remove the base URL and revert to the default or stored one\r\n\tremoveUrl() {\r\n\t\tthis.url = this._http.url || '';\r\n\r\n\t\tthis.store.remove('http_url');\r\n\t}\r\n\r\n\t// Set a new HTTP header and update the stored headers\r\n\tset(key: any, value: any) {\r\n\t\tthis._headers[key] = value;\r\n\r\n\t\tthis.store.setJson('http_headers', this._headers);\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t}\r\n\r\n\t// Get the value of a specific HTTP header\r\n\theader(key: any) {\r\n\t\treturn this._headers[key];\r\n\t}\r\n\r\n\t// Remove a specific HTTP header and update the stored headers\r\n\tremove(key: any) {\r\n\t\tdelete this._headers[key];\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\r\n\t\tthis.store.setJson('http_headers', this._headers);\r\n\t}\r\n\r\n\t// Internal method to make HTTP requests based on the method type\r\n\tprivate _httpMethod(\r\n\t\tmethod: string,\r\n\t\t_url: string,\r\n\t\tdoc: unknown,\r\n\t\theaders: any\r\n\t): Observable<any> {\r\n\t\tif (method === 'post') {\r\n\t\t\treturn this.http.post<any>(_url, doc, headers);\r\n\t\t} else if (method === 'put') {\r\n\t\t\treturn this.http.put<any>(_url, doc, headers);\r\n\t\t} else if (method === 'patch') {\r\n\t\t\treturn this.http.patch<any>(_url, doc, headers);\r\n\t\t} else if (method === 'delete') {\r\n\t\t\treturn this.http.delete<any>(_url, headers);\r\n\t\t} else {\r\n\t\t\treturn this.http.get<any>(_url, headers);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to handle HTTP requests for various methods (POST, PUT, PATCH, DELETE, GET).\r\n\t *\r\n\t * Features:\r\n\t * - **Request Locking**: Manages request locking to prevent simultaneous requests.\r\n\t * - **Acceptance Check**: Validates the server response against a user-defined `acceptance` function.\r\n\t * If the check fails, the response is rejected with an error.\r\n\t * - **Replace Logic**: Allows modification of specific parts of the response object, determined by a user-defined `replace` function.\r\n\t * Can handle both objects and arrays within the response.\r\n\t * - **Field Filtering**: Supports extracting specific fields from response objects or arrays.\r\n\t * - **Legacy Support**: Compatible with callback-based usage alongside Observables.\r\n\t * - **ReplaySubject**: Ensures that the response can be shared across multiple subscribers.\r\n\t *\r\n\t * @param url - The endpoint to send the HTTP request to (relative to the base URL).\r\n\t * @param doc - The request payload for methods like POST, PUT, and PATCH.\r\n\t * @param callback - A legacy callback function to handle the response.\r\n\t * @param opts - Additional options:\r\n\t * - `err`: Error handling callback.\r\n\t * - `acceptance`: Function to validate the server response. Should return `true` for valid responses.\r\n\t * - `replace`: Function to modify specific parts of the response data.\r\n\t * - `fields`: Array of fields to extract from the response object(s).\r\n\t * - `data`: Path in the response where the data resides for `replace` and `fields` operations.\r\n\t * - `skipLock`: If `true`, bypasses request locking.\r\n\t * - `url`: Overrides the base URL for this request.\r\n\t * @param method - The HTTP method (e.g., 'post', 'put', 'patch', 'delete', 'get').\r\n\t * @returns An Observable that emits the processed HTTP response or an error.\r\n\t */\r\n\tprivate _post(\r\n\t\turl: string,\r\n\t\tdoc: unknown,\r\n\t\tcallback = (resp: unknown) => {},\r\n\t\topts: any = {},\r\n\t\tmethod = 'post'\r\n\t): Observable<any> {\r\n\t\tif (typeof opts === 'function') {\r\n\t\t\topts = { err: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.err) {\r\n\t\t\topts.err = (err: HttpErrorResponse) => {};\r\n\t\t}\r\n\r\n\t\t// Handle request locking to avoid multiple simultaneous requests\r\n\t\tif (this.locked && !opts.skipLock) {\r\n\t\t\treturn new Observable((observer) => {\r\n\t\t\t\tconst wait = setTimeout(() => {\r\n\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\r\n\t\t\t\t\t\tobserver\r\n\t\t\t\t\t);\r\n\t\t\t\t}, 100);\r\n\t\t\t\tthis.awaitLocked.push(wait);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst _url = (opts.url || this.url) + url;\r\n\r\n\t\tthis.prepare_handle(_url, doc);\r\n\r\n\t\t// Using ReplaySubject to allow multiple subscriptions without re-triggering the HTTP request\r\n\t\tconst responseSubject = new ReplaySubject<any>(1);\r\n\r\n\t\tthis._httpMethod(method, _url, doc, { headers: this._http_headers })\r\n\t\t\t.pipe(\r\n\t\t\t\tfirst(),\r\n\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\tthis.handleError(opts.err, () => {\r\n\t\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\r\n\t\t\t\t\t\t\tresponseSubject\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})(error);\r\n\t\t\t\t\tresponseSubject.error(error);\r\n\t\t\t\t\treturn EMPTY;\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\topts.acceptance &&\r\n\t\t\t\t\t\ttypeof opts.acceptance === 'function'\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (!opts.acceptance(resp)) {\r\n\t\t\t\t\t\t\tconst error = new HttpErrorResponse({\r\n\t\t\t\t\t\t\t\terror: 'Acceptance failed',\r\n\t\t\t\t\t\t\t\tstatus: 400,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tthis.handleError(opts.err, () => {})(error);\r\n\r\n\t\t\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.replace && typeof opts.replace === 'function') {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tArray.isArray(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data\r\n\t\t\t\t\t\t\t\t) as Array<unknown>\r\n\t\t\t\t\t\t\t).map((item: unknown) => opts.replace(item));\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\topts.replace(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Array.isArray(opts.fields)) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tArray.isArray(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data\r\n\t\t\t\t\t\t\t\t) as Array<unknown>\r\n\t\t\t\t\t\t\t).map((item: unknown) => {\r\n\t\t\t\t\t\t\t\treturn this._newDoc(item, opts.fields);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\tconst newDoc = this._newDoc(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data),\r\n\t\t\t\t\t\t\t\topts.fields\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\tif (opts.data) {\r\n\t\t\t\t\t\t\t\tthis._setObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data,\r\n\t\t\t\t\t\t\t\t\tnewDoc\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tresp = newDoc;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.response_handle(_url, resp, () => callback(resp));\r\n\r\n\t\t\t\t\tresponseSubject.next(resp);\r\n\r\n\t\t\t\t\tresponseSubject.complete();\r\n\t\t\t\t},\r\n\t\t\t\terror: (err) => responseSubject.error(err),\r\n\t\t\t\tcomplete: () => responseSubject.complete(),\r\n\t\t\t});\r\n\r\n\t\treturn responseSubject.asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a POST request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpost(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PUT request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tput(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'put');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PATCH request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpatch(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'patch');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a DELETE request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tdelete(\r\n\t\turl: string,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'delete');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a GET request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tget(\r\n\t\turl: string,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'get');\r\n\t}\r\n\r\n\t// Clear all pending request locks\r\n\tclearLocked() {\r\n\t\tfor (const awaitLocked of this.awaitLocked) {\r\n\t\t\tclearTimeout(awaitLocked);\r\n\t\t}\r\n\t\tthis.awaitLocked = [];\r\n\t}\r\n\r\n\t// Lock the service to prevent multiple simultaneous requests\r\n\tlock() {\r\n\t\tthis.locked = true;\r\n\t}\r\n\r\n\t// Unlock the service to allow new requests\r\n\tunlock() {\r\n\t\tthis.locked = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles HTTP errors.\r\n\t * - Calls provided error callback and retries the request if needed.\r\n\t */\r\n\tprivate handleError(callback: any, retry: () => void) {\r\n\t\treturn (error: HttpErrorResponse): Promise<void> => {\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tthis.err_handle(error, callback, retry);\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to trigger error handling callbacks.\r\n\t */\r\n\tprivate err_handle(\r\n\t\terr: HttpErrorResponse,\r\n\t\tnext: (err: HttpErrorResponse) => void,\r\n\t\tretry: () => void\r\n\t) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext(err);\r\n\t\t}\r\n\r\n\t\tfor (const callback of this.errors) {\r\n\t\t\tif (typeof callback === 'function') {\r\n\t\t\t\tcallback(err, retry);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Placeholder method for handling request preparation (can be customized)\r\n\tprivate prepare_handle(url: string, body: unknown) {}\r\n\r\n\t// Placeholder method for handling the response (can be customized)\r\n\tprivate response_handle(url: string, body: unknown, next: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a nested object or property from the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to retrieve data from.\r\n\t * @param base - A dot-separated string indicating the path to the desired property within the response.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * - If empty, the entire response is returned.\r\n\t * @returns The object or property located at the specified path within the response.\r\n\t */\r\n\tprivate _getObjectToReplace(resp: unknown, base = ''): unknown {\r\n\t\tif (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\treturn this._getObjectToReplace(\r\n\t\t\t\t(resp as Record<string, unknown>)[currentBase] || {},\r\n\t\t\t\tnewBase.join('.')\r\n\t\t\t);\r\n\t\t} else if (base) {\r\n\t\t\treturn (resp as Record<string, unknown>)[base];\r\n\t\t} else {\r\n\t\t\treturn resp;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets or replaces a nested object or property in the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to modify.\r\n\t * @param base - A dot-separated string indicating the path to the property to replace.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * @param doc - The new data or object to set at the specified path.\r\n\t * @returns `void`.\r\n\t */\r\n\tprivate _setObjectToReplace(resp: unknown, base = '', doc: unknown): void {\r\n\t\twhile (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\tresp = (resp as Record<string, unknown>)[currentBase] || {};\r\n\r\n\t\t\tbase = newBase.join('.');\r\n\t\t}\r\n\r\n\t\t(resp as Record<string, unknown>)[base] = doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new object containing only specified fields from the input item.\r\n\t *\r\n\t * @param item - The input object to extract fields from.\r\n\t * @param fields - An array of field names to include in the new object.\r\n\t * - Example: `['id', 'name']` will create a new object with only the `id` and `name` properties from `item`.\r\n\t * @returns A new object containing only the specified fields.\r\n\t */\r\n\tprivate _newDoc(item: unknown, fields: string[]): unknown {\r\n\t\tconst newDoc: Record<string, unknown> = {};\r\n\r\n\t\tfor (const field of fields) {\r\n\t\t\tnewDoc[field] = (item as Record<string, unknown>)[field];\r\n\t\t}\r\n\r\n\t\treturn newDoc;\r\n\t}\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'lib-wrapper',\n templateUrl: './wrapper.component.html',\n styleUrls: ['./wrapper.component.scss'],\n standalone: false\n})\r\nexport class WrapperComponent{\r\n\tconstructor() {}\r\n}\r\n","<div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-bottomRight\" id=\"bottomRight\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-bottomLeft\" id=\"bottomLeft\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-topRight\" id=\"topRight\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-topLeft\" id=\"topLeft\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-topCenter\" id=\"topCenter\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-bottomCenter\" id=\"bottomCenter\"></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-center\" id=\"center\"></div>\r\n</div>\r\n","import {\r\n\tInjectable,\r\n\tInjector,\r\n\tComponentFactoryResolver,\r\n\tComponentRef,\r\n\tEmbeddedViewRef,\r\n\tApplicationRef\r\n} from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class DomService {\r\n\tprivate providedIn: Record<string, boolean> = {};\r\n\r\n\tconstructor(\r\n\t\tprivate componentFactoryResolver: ComponentFactoryResolver,\r\n\t\tprivate appRef: ApplicationRef,\r\n\t\tprivate injector: Injector,\r\n\t\tprivate core: CoreService\r\n\t) { }\r\n\r\n\t/**\r\n\t * Appends a component to a specified element by ID.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param id - The ID of the element to append the component to.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendById(component: any, options: any = {}, id: string): { nativeElement: HTMLElement, componentRef: ComponentRef<any> } {\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\r\n\t\t\t.rootNodes[0] as HTMLElement;\r\n\t\tconst element = this.core.document.getElementById(id);\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Appends a component to a specified element or to the body.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param element - The element to append the component to. Defaults to body.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendComponent(\r\n\t\tcomponent: any,\r\n\t\toptions: any = {},\r\n\t\telement: HTMLElement = this.core.document.body\r\n\t): { nativeElement: HTMLElement, componentRef: ComponentRef<any> } | void {\r\n\t\tif (options.providedIn) {\r\n\t\t\tif (this.providedIn[options.providedIn]) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.providedIn[options.providedIn] = true;\r\n\t\t}\r\n\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\r\n\t\t\t.rootNodes[0] as HTMLElement;\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a reference to a dynamically created component.\r\n\t *\r\n\t * @param component - The component to create.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference.\r\n\t */\r\n\tgetComponentRef(component: any, options: any = {}): ComponentRef<any> {\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\r\n\t\treturn componentRef;\r\n\t}\r\n\r\n\t/**\r\n\t * Projects the inputs onto the component.\r\n\t *\r\n\t * @param component - The component reference.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference with the projected inputs.\r\n\t */\r\n\tprivate projectComponentInputs(component: ComponentRef<any>, options: any): ComponentRef<any> {\r\n\t\tif (options) {\r\n\t\t\tconst props = Object.getOwnPropertyNames(options);\r\n\t\t\tfor (const prop of props) {\r\n\t\t\t\tcomponent.instance[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn component;\r\n\t}\r\n}\r\n\r\n/*\r\nhttps://stackoverflow.com/questions/39857222/angular2-dynamic-component-injection-in-root/40687392#40687392\r\nhttps://gist.github.com/reed-lawrence/1f6b7c328ad3886e60dc2b0adcf75a97\r\n*/\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { AlertComponent } from '../components/alert/alert.component';\r\nimport { WrapperComponent } from '../components/alert/wrapper/wrapper.component';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { Alert, DEFAULT_Alert } from '../interfaces/alert.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class AlertService {\r\n\tprivate alert: any;\r\n\tprivate _container: any;\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t\tthis.alert = this.config.alert;\r\n\t\tif (!this.alert) {\r\n\t\t\tthis.alert = DEFAULT_Alert;\r\n\t\t} else {\r\n\t\t\tfor (let each in DEFAULT_Alert) {\r\n\t\t\t\tif (this.alert[each]) continue;\r\n\t\t\t\tthis.alert[each] = DEFAULT_Alert[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._container = this.dom.appendComponent(WrapperComponent);\r\n\t}\r\n\tprivate uniques: any = {};\r\n\tprivate shortcuts: any = {\r\n\t\ttl: 'topLeft',\r\n\t\ttc: 'topCenter',\r\n\t\ttr: 'topRight',\r\n\t\tr: 'right',\r\n\t\tbr: 'bottomRight',\r\n\t\tbc: 'bottomCenter',\r\n\t\tbl: 'bottomLeft',\r\n\t\tl: 'left',\r\n\t\tc: 'center',\r\n\t};\r\n\tprivate positionNumber: any = {\r\n\t\ttopLeft: 3,\r\n\t\ttopCenter: 4,\r\n\t\ttopRight: 2,\r\n\t\tright: '',\r\n\t\tbottomRight: 0,\r\n\t\tbottomCenter: 5,\r\n\t\tbottomLeft: 1,\r\n\t\tleft: '',\r\n\t\tcenter: 6,\r\n\t};\r\n\r\n\tshow(opts: any | Alert) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\ttext: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tif (!opts['type']) opts['type'] = 'info';\r\n\t\tfor (let each in this.alert) {\r\n\t\t\tif (each == 'class')\r\n\t\t\t\topts[each] = opts[each] + ' ' + this.alert[each];\r\n\t\t\telse if (typeof opts[each] == 'undefined')\r\n\t\t\t\topts[each] = this.alert[each];\r\n\t\t}\r\n\t\tif (this.shortcuts[opts.position])\r\n\t\t\topts.position = this.shortcuts[opts.position];\r\n\t\tif (!opts.position) opts.position = 'bottomRight';\r\n\t\tvar content: any;\r\n\t\topts.close = () => {\r\n\t\t\tif (content) content.componentRef.destroy();\r\n\t\t\topts.component.nativeElement.remove();\r\n\t\t\tif (typeof (opts as Alert).onClose == 'function')\r\n\t\t\t\t(opts as Alert).onClose();\r\n\t\t};\r\n\t\t// let component = this.dom.appendById(AlertComponent, opts, opts.position);\r\n\t\tlet customElement = false;\r\n\r\n\t\tif (\r\n\t\t\ttypeof opts.component == 'string' &&\r\n\t\t\tthis.alert.alerts[opts.component]\r\n\t\t) {\r\n\t\t\topts.component = this.alert.alerts[opts.component];\r\n\t\t\tcustomElement = true;\r\n\t\t} else {\r\n\t\t\topts.component = this.dom.appendById(\r\n\t\t\t\tAlertComponent,\r\n\t\t\t\topts,\r\n\t\t\t\topts.position\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (typeof opts.component === 'function') {\r\n\t\t\tcontent = this.dom.appendComponent(\r\n\t\t\t\topts.component,\r\n\t\t\t\topts,\r\n\t\t\t\tthis._container.nativeElement.children[0].children[\r\n\t\t\t\t\tthis.positionNumber[opts.position] || 0\r\n\t\t\t\t]\r\n\t\t\t\t// component.nativeElement.children[0].children[0].children[0] as HTMLElement\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (opts.unique) {\r\n\t\t\tif (this.uniques[opts.unique]) this.uniques[opts.unique].remove();\r\n\t\t\tthis.uniques[opts.unique] = opts.component.nativeElement;\r\n\t\t}\r\n\r\n\t\tif (typeof opts.timeout !== 'number') {\r\n\t\t\topts.timeout = 2000;\r\n\t\t}\r\n\r\n\t\tif (opts.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\topts.close();\r\n\t\t\t}, opts.timeout);\r\n\t\t}\r\n\r\n\t\treturn opts.component.nativeElement;\r\n\t}\r\n\topen(opts: Alert) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\tinfo(opts: Alert) {\r\n\t\topts['type'] = 'info';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tsuccess(opts: Alert) {\r\n\t\topts['type'] = 'success';\r\n\t\tthis.show(opts);\r\n\t}\r\n\twarning(opts: Alert) {\r\n\t\topts['type'] = 'warning';\r\n\t\tthis.show(opts);\r\n\t}\r\n\terror(opts: Alert) {\r\n\t\topts['type'] = 'error';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tquestion(opts: Alert) {\r\n\t\topts['type'] = 'question';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tdestroy() {\r\n\t\tthis.core.document.getElementById('bottomRight').innerHTML = '';\r\n\t\tthis.core.document.getElementById('bottomLeft').innerHTML = '';\r\n\t\tthis.core.document.getElementById('bottomCenter').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topRight').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topLeft').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topCenter').innerHTML = '';\r\n\t\tthis.core.document.getElementById('center').innerHTML = '';\r\n\t}\r\n}\r\n","import { Observable } from 'rxjs';\r\nimport { HttpService } from './http.service';\r\nimport { StoreService } from './store.service';\r\nimport { AlertService } from './alert.service';\r\nimport { CoreService } from './core.service';\r\nimport { CrudDocument } from '../interfaces/crud.interface';\r\nimport { BaseService } from './base.service';\r\nimport { inject } from '@angular/core';\r\n\r\ninterface CrudOptions<Document> {\r\n\tname?: string;\r\n\talert?: string;\r\n\tcallback?: (resp: Document | Document[]) => void;\r\n\terrCallback?: (resp: unknown) => void;\r\n}\r\n\r\ninterface CrudConfig<Document> {\r\n\tname: string;\r\n\t_id?: string;\r\n\treplace?: (doc: Document) => void;\r\n\tunauthorized?: boolean;\r\n}\r\n\r\ninterface GetConfig {\r\n\tpage?: number;\r\n\tperPage?: number;\r\n\tquery?: string;\r\n}\r\n\r\n/**\r\n * Abstract class representing a CRUD (Create, Read, Update, Delete) service.\r\n *\r\n * This class provides methods for managing documents, interacting with an API,\r\n * and storing/retrieving data from local storage. It is designed to be extended\r\n * for specific document types.\r\n *\r\n * @template Document - The type of the document the service handles.\r\n */\r\nexport abstract class CrudService<\r\n\tDocument extends CrudDocument\r\n> extends BaseService {\r\n\t/**\r\n\t * URL for the API.\r\n\t */\r\n\tprivate _url = '/api/';\r\n\r\n\t/**\r\n\t * Array of documents managed by this service.\r\n\t */\r\n\tprivate _docs: Document[] = [];\r\n\r\n\t/**\r\n\t * Number of documents per page.\r\n\t */\r\n\tprivate _perPage = 20;\r\n\r\n\t/**\r\n\t * Callbacks for filtering documents.\r\n\t */\r\n\tprivate _filteredDocumentsCallbacks: (() => void)[] = [];\r\n\r\n\t/**\r\n\t * Constructs a CRUD service instance.\r\n\t *\r\n\t * @param _config - Configuration options for the CRUD service.\r\n\t * @param __http - Service to handle HTTP requests.\r\n\t * @param __store - Service to manage local storage of documents.\r\n\t * @param __alert - Service to display alerts.\r\n\t * @param __core - Core service for utility functions.\r\n\t */\r\n\tprotected __http = inject(HttpService);\r\n\r\n\tprotected __store = inject(StoreService);\r\n\r\n\tprotected __alert = inject(AlertService);\r\n\r\n\tprotected __core = inject(CoreService);\r\n\r\n\tconstructor(private _config: CrudConfig<Document>) {\r\n\t\tsuper();\r\n\r\n\t\tthis._url += this._config.name;\r\n\r\n\t\tif (this._config.unauthorized) {\r\n\t\t\tthis.restoreDocs();\r\n\t\t} else if (localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tif (user._id === localStorage.getItem('waw_user_id')) {\r\n\t\t\t\tthis.restoreDocs();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__core.on('wipe').subscribe((): void => {\r\n\t\t\tthis.clearDocs();\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t});\r\n\t}\r\n\r\n\trestoreDocs(): void {\r\n\t\tthis.__store.getJson('docs_' + this._config.name, (docs) => {\r\n\t\t\tif (Array.isArray(docs)) {\r\n\t\t\t\tthis._docs.push(...docs);\r\n\r\n\t\t\t\tthis._filterDocuments();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current set of documents to local storage.\r\n\t */\r\n\tsetDocs(): void {\r\n\t\tthis.__store.setJson('docs_' + this._config.name, this._docs);\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the current list of documents.\r\n\t *\r\n\t * @returns The list of documents.\r\n\t */\r\n\tgetDocs(): Document[] {\r\n\t\treturn this._docs;\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the current list of documents.\r\n\t *\r\n\t * Empties the internal documents array and saves the updated state to local storage.\r\n\t */\r\n\tclearDocs(): void {\r\n\t\tthis._docs.splice(0, this._docs.length);\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Adds multiple documents to the service and saves them to local storage.\r\n\t *\r\n\t * @param docs - An array of documents to add.\r\n\t */\r\n\taddDocs(docs: Document[]): void {\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tfor (const doc of docs) {\r\n\t\t\t\tthis.addDoc(doc);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a single document to the service. If it already exists, it will be updated.\r\n\t *\r\n\t * @param doc - The document to add.\r\n\t */\r\n\taddDoc(doc: Document): void {\r\n\t\tif (this._config.replace) {\r\n\t\t\tthis._config.replace(doc);\r\n\t\t}\r\n\r\n\t\tconst existingDoc = this._docs.find(\r\n\t\t\t(d) => this._id(d) === this._id(doc)\r\n\t\t);\r\n\r\n\t\tif (existingDoc) {\r\n\t\t\t// Update the existing document\r\n\t\t\tthis.__core.copy(doc, existingDoc);\r\n\r\n\t\t\tthis.__core.copy(existingDoc, doc);\r\n\t\t} else {\r\n\t\t\t// Add new document\r\n\t\t\tthis._docs.push(doc);\r\n\t\t}\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new document with a temporary ID and status flags.\r\n\t *\r\n\t * @param doc - Optional base document to use for the new document.\r\n\t * @returns A new document instance with default properties.\r\n\t */\r\n\tnew(doc: Document = {} as Document): Document {\r\n\t\treturn {\r\n\t\t\t...doc,\r\n\t\t\t_id: doc._id || Date.now().toString(),\r\n\t\t\t__created: false,\r\n\t\t\t__modified: false,\r\n\t\t} as Document;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a document by its unique ID or creates a new one if it doesn't exist.\r\n\t *\r\n\t * @param _id - The document ID to search for.\r\n\t * @returns The found document or a new document if not found.\r\n\t */\r\n\tdoc(_id: string): Document {\r\n\t\tconst doc =\r\n\t\t\tthis._docs.find((d) => this._id(d) === _id) ||\r\n\t\t\tthis.new({\r\n\t\t\t\t_id,\r\n\t\t\t} as Document);\r\n\r\n\t\tif (\r\n\t\t\t!this._docs.find((d) => this._id(d) === _id) &&\r\n\t\t\t!this._fetchingId[_id]\r\n\t\t) {\r\n\t\t\tthis._fetchingId[_id] = true;\r\n\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.fetch({ _id }).subscribe((_doc: Document) => {\r\n\t\t\t\t\tthis._fetchingId[_id] = false;\r\n\r\n\t\t\t\t\tif (_doc) {\r\n\t\t\t\t\t\tthis.__core.copy(_doc, doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the number of documents to display per page.\r\n\t *\r\n\t * @param _perPage - Number of documents per page.\r\n\t */\r\n\tsetPerPage(_perPage: number): void {\r\n\t\tthis._perPage = _perPage;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a list of documents from the API with optional pagination.\r\n\t *\r\n\t * @param config - Optional pagination configuration.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the list of documents.\r\n\t */\r\n\tget(\r\n\t\tconfig: GetConfig = {},\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document[]> {\r\n\t\tif (!this._config.unauthorized) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tlocalStorage.setItem('waw_user_id', user._id);\r\n\t\t}\r\n\r\n\t\tconst url = `${this._url}/get${options.name || ''}`;\r\n\r\n\t\tconst params =\r\n\t\t\t(typeof config.page === 'number' || config.query ? '?' : '') +\r\n\t\t\t(config.query || '') +\r\n\t\t\t(typeof config.page === 'number'\r\n\t\t\t\t? `&skip=${this._perPage * (config.page - 1)}&limit=${\r\n\t\t\t\t\t\tthis._perPage\r\n\t\t\t\t }`\r\n\t\t\t\t: '');\r\n\r\n\t\tconst obs = this.__http.get(`${url}${params}`);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown): void => {\r\n\t\t\t\t(resp as Document[]).forEach((doc) => this.addDoc(doc));\r\n\r\n\t\t\t\tif (options.callback) {\r\n\t\t\t\t\toptions.callback(resp as Document[]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis._filterDocuments();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_get`, this._docs);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown): void => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document[]>;\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a request to the API to create a new document.\r\n\t *\r\n\t * @param doc - The document to create.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the created document, or emits an error if already created.\r\n\t */\r\n\tcreate(\r\n\t\tdoc: Document = {} as Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tif (doc.__created) {\r\n\t\t\t// Emit an error observable if the document is already created\r\n\t\t\treturn new Observable<Document>((observer) => {\r\n\t\t\t\tobserver.error(new Error('Document has already been created.'));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tdoc.__created = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/create${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tthis.addDoc(doc);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_create`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\tif (options.errCallback) options.errCallback(err);\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a document from the API based on a query.\r\n\t *\r\n\t * @param query - The query object used to filter documents.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the fetched document.\r\n\t */\r\n\tfetch(\r\n\t\tquery: object = {},\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/fetch${options.name || ''}`,\r\n\t\t\tquery\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.addDoc(resp as Document);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) options.callback(resp as Document);\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp as Document);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document after a specified delay and returns an observable.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that emits the updated document.\r\n\t */\r\n\tupdateAfterWhile(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\treturn new Observable<Document>((observer) => {\r\n\t\t\tthis.__core.afterWhile(this._id(doc), () => {\r\n\t\t\t\tthis.update(doc, options).subscribe({\r\n\t\t\t\t\tnext: (updatedDoc) => {\r\n\t\t\t\t\t\tobserver.next(updatedDoc); // Emit the updated document\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\tobserver.error(err); // Forward the error\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tobserver.complete(); // Complete the observable\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tupdate(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/update${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}update`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_update`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Unique update a document field in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tunique(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/unique${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\t(doc as any)[options.name as string] = resp;\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}unique`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_unique`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Deletes a document from the API.\r\n\t *\r\n\t * @param doc - The document to delete.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the deleted document.\r\n\t */\r\n\tdelete(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/delete${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis._docs.splice(\r\n\t\t\t\t\t\tthis._docs.findIndex(\r\n\t\t\t\t\t\t\t(d) => this._id(d) === this._id(doc)\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t1\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tthis.setDocs();\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}delete`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_delete`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Filters documents based on specific conditions and stores the result in a provided object.\r\n\t *\r\n\t * @param storeObject - Object to store filtered documents.\r\n\t * @param field - The field to filter by or a function to extract the field.\r\n\t * @param valid - Optional function to check the validity of a document.\r\n\t * @param sort - Function to sort the filtered documents.\r\n\t * @returns A callback function that triggers the filtering process.\r\n\t */\r\n\tfilteredDocuments(\r\n\t\tstoreObject: Record<string, Document[]>,\r\n\t\tfield: string | ((doc: Document) => string) = 'author',\r\n\t\tvalid?: (doc: Document) => boolean,\r\n\t\tsort: (a: Document, b: Document) => number = (\r\n\t\t\ta: Document,\r\n\t\t\tb: Document\r\n\t\t) => {\r\n\t\t\tif ((a as any)[this._id(a)] < (b as any)[this._id(b)]) return -1;\r\n\r\n\t\t\tif ((a as any)[this._id(a)] > (b as any)[this._id(b)]) return 1;\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t): () => void {\r\n\t\tconst callback = (): void => {\r\n\t\t\t/* remove docs if they were removed */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tfor (let i = storeObject[parentId].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tconst _field =\r\n\t\t\t\t\t\ttypeof field === 'function'\r\n\t\t\t\t\t\t\t? field(storeObject[parentId][i])\r\n\t\t\t\t\t\t\t: field;\r\n\t\t\t\t\tconst _doc: any = storeObject[parentId][i];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!this._docs.find((doc: any) =>\r\n\t\t\t\t\t\t\tArray.isArray(doc[_field])\r\n\t\t\t\t\t\t\t\t? doc[_field].includes(_doc[this._id(doc)])\r\n\t\t\t\t\t\t\t\t: doc[_field] === _doc[this._id(doc)]\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[parentId].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* add docs if they are not added */\r\n\t\t\tfor (const doc of this._docs) {\r\n\t\t\t\tconst _field = typeof field === 'function' ? field(doc) : field;\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof valid === 'function'\r\n\t\t\t\t\t\t? !valid(doc)\r\n\t\t\t\t\t\t: Array.isArray((doc as any)[_field])\r\n\t\t\t\t\t\t? !(doc as any)[_field]?.length\r\n\t\t\t\t\t\t: !(doc as any)[_field]\r\n\t\t\t\t) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof field === 'function') {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tfield(doc) &&\r\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\r\n\t\t\t\t\t\t\t(c) => c._id === doc._id\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Array.isArray((doc as any)[_field])) {\r\n\t\t\t\t\t(doc as any)[_field].forEach((_field: string) => {\r\n\t\t\t\t\t\tstoreObject[_field] = storeObject[_field] || [];\r\n\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t!storeObject[_field].find((c) => c._id === doc._id)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tstoreObject[_field].push(doc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstoreObject[(doc as any)[_field]] =\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]] || [];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\r\n\t\t\t\t\t\t\t(c) => c._id === doc._id\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* sort the array's */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tstoreObject[parentId].sort(sort);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis._filteredDocumentsCallbacks.push(callback);\r\n\r\n\t\treturn callback;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a unique ID for a document.\r\n\t *\r\n\t * @param doc - The document for which to generate the ID.\r\n\t * @returns The unique ID as a string.\r\n\t */\r\n\tprivate _id(doc: Document): string {\r\n\t\treturn (doc as unknown as Record<string, unknown>)[\r\n\t\t\tthis._config._id || '_id'\r\n\t\t]?.toString() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes all registered filter document callbacks.\r\n\t */\r\n\tprivate _filterDocuments(): void {\r\n\t\tfor (const callback of this._filteredDocumentsCallbacks) {\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis.__core.complete(this._config.name + 'Loaded');\r\n\t}\r\n\r\n\tprivate _fetchingId: Record<string, boolean> = {};\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\nimport { CoreService } from './core.service';\r\nimport { Subject } from 'rxjs';\r\nimport { StoreService } from './store.service';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MongoService {\r\n\t/*\r\n\t *\tData will be storage for all information we are pulling from waw crud.\r\n\t *\tdata['arr' + part] will host all docs from collection part in array form\r\n\t *\tdata['obj' + part] will host all docs from collection part in object form\r\n\t *\t\tand all groups collecitons provided\r\n\t *\tdata['opts' + part] will host options for docs from collection part\r\n\t *\t\tWill be initialized only inside get\r\n\t *\t\tWill be used inside push\r\n\t */\r\n\tprivate data: any = {};\r\n\tprivate socket: any = {\r\n\t\temit: (which: any, doc: any) => {\r\n\t\t\tconsole.log(which, doc, 'is not used on sockets');\r\n\t\t},\r\n\t};\r\n\t/*\r\n\t *\twaw crud connect functions\r\n\t */\r\n\tpublic config(part: any, opts: any) {\r\n\t\tif (this.data['opts' + part]) return;\r\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\r\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\r\n\t\tif (this.data['opts' + part]) {\r\n\t\t\tfor (let each in opts) {\r\n\t\t\t\tthis.data['opts' + part][each] = opts[each];\r\n\t\t\t}\r\n\t\t} else this.data['opts' + part] = opts = opts || {};\r\n\t\tif (typeof opts.use === 'string') {\r\n\t\t\topts.use = opts.use.split(' ');\r\n\t\t}\r\n\t\tif (opts.query) {\r\n\t\t\tfor (let key in opts.query) {\r\n\t\t\t\tif (typeof opts.query[key] == 'function') {\r\n\t\t\t\t\topts.query[key] = {\r\n\t\t\t\t\t\tallow: opts.query[key],\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.groups) {\r\n\t\t\tif (typeof opts.groups === 'string') {\r\n\t\t\t\topts.groups = opts.groups.split(' ');\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(opts.groups)) {\r\n\t\t\t\tlet arr = opts.groups;\r\n\t\t\t\topts.groups = {};\r\n\t\t\t\tfor (let i = 0; i < arr.length; i++) {\r\n\t\t\t\t\tif (typeof arr[i] === 'string') {\r\n\t\t\t\t\t\topts.groups[arr[i]] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (let key in arr[i]) {\r\n\t\t\t\t\t\t\tif (typeof arr[i][key] == 'function') {\r\n\t\t\t\t\t\t\t\tarr[i][key] = {\r\n\t\t\t\t\t\t\t\t\tfield: arr[i][key],\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\topts.groups[key] = arr[i][key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (let key in opts.groups) {\r\n\t\t\t\tif (typeof opts.groups[key] == 'boolean') {\r\n\t\t\t\t\tif (opts.groups[key]) {\r\n\t\t\t\t\t\topts.groups[key] = {\r\n\t\t\t\t\t\t\tfield: function (doc: any) {\r\n\t\t\t\t\t\t\t\treturn doc[key];\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof opts.groups[key] != 'object') {\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof opts.groups[key].field != 'function') {\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (Array.isArray(this.data['obj' + part][key])) {\r\n\t\t\t\t\tconsole.warn(\r\n\t\t\t\t\t\t'You can have same field groups with query. Field ' +\r\n\t\t\t\t\t\t\tkey +\r\n\t\t\t\t\t\t\t' is not used in groups.'\r\n\t\t\t\t\t);\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string') {\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!Array.isArray(opts.fields)) {\r\n\t\t\topts.fields = [];\r\n\t\t}\r\n\t\t// this.store.getJson('mongo' + part, data => {\r\n\t\t// \tif (data && Array.isArray(data)) {\r\n\t\t// \t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t// \t\t\tthis.push(part, data[i]);\r\n\t\t// \t\t}\r\n\t\t// \t}\r\n\t\t// });\r\n\t\treturn {\r\n\t\t\tarr: this.data['arr' + part],\r\n\t\t\tobj: this.data['obj' + part],\r\n\t\t};\r\n\t}\r\n\tpublic create(\r\n\t\tpart: any,\r\n\t\tdoc: any = undefined,\r\n\t\tcb: any = undefined,\r\n\t\topts: any = {}\r\n\t) {\r\n\t\tif (typeof doc == 'function') {\r\n\t\t\tif (cb) opts = cb;\r\n\t\t\tcb = doc;\r\n\t\t\tdoc = {};\r\n\t\t}\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\terr: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (typeof doc != 'object') doc = {};\r\n\t\tif (doc.___created && !opts.allow_multiple) return;\r\n\t\tdoc.___created = true;\r\n\t\tthis.http.post(\r\n\t\t\topts.url || '/api/' + part + '/create',\r\n\t\t\tdoc || {},\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('create', {\r\n\t\t\t\t\t\t_id: resp._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.push(part, resp);\r\n\t\t\t\t\tif (typeof cb == 'function') cb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic fetch(part: any, opts: any = undefined, cb: any = undefined) {\r\n\t\tif (\r\n\t\t\topts.query &&\r\n\t\t\topts.query._id &&\r\n\t\t\t!opts.force &&\r\n\t\t\tthis.data['obj' + part][opts.query._id]\r\n\t\t) {\r\n\t\t\treturn this.data['obj' + part][opts.query._id];\r\n\t\t}\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tthis.config(part, opts); // remove this in future\r\n\t\tlet url = '/api/' + part + '/fetch' + (opts.name || ''),\r\n\t\t\tdoc: any;\r\n\t\tif (\r\n\t\t\topts.query &&\r\n\t\t\topts.query._id &&\r\n\t\t\tthis.data['obj' + part][opts.query._id]\r\n\t\t) {\r\n\t\t\tdoc = this.data['obj' + part][opts.query._id];\r\n\t\t} else {\r\n\t\t\tdoc = {};\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\topts.query || {},\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (!resp) return cb && cb(false);\r\n\t\t\t\tfor (let each in resp) {\r\n\t\t\t\t\tdoc[each] = resp[each];\r\n\t\t\t\t}\r\n\t\t\t\tfor (let each in doc) {\r\n\t\t\t\t\tdoc[each] = resp[each];\r\n\t\t\t\t}\r\n\t\t\t\tthis.push(part, doc);\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(doc);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t\treturn doc;\r\n\t}\r\n\tpublic get(part: any, opts: any = undefined, cb: any = undefined) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tthis.config(part, opts); // remove this in future\r\n\t\tlet url =\r\n\t\t\t'/api/' + part + '/get' + (opts.name || '') + (opts.param || '');\r\n\t\tthis.http.get(\r\n\t\t\topts.url || url,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (Array.isArray(resp)) {\r\n\t\t\t\t\tfor (let i = 0; i < resp.length; i++) {\r\n\t\t\t\t\t\tthis.push(part, resp[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!opts.paginate) {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i = 0;\r\n\t\t\t\t\t\t\ti < this.data['arr' + part].length;\r\n\t\t\t\t\t\t\ti++\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tlet remove = true;\r\n\t\t\t\t\t\t\tfor (let j = 0; j < resp.length; j++) {\r\n\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\tresp[j]._id ===\r\n\t\t\t\t\t\t\t\t\tthis.data['arr' + part][i]._id\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tremove = false;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (remove) {\r\n\t\t\t\t\t\t\t\tthis.remove(part, this.data['arr' + part][i]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof cb == 'function')\r\n\t\t\t\t\t\tcb(\r\n\t\t\t\t\t\t\tthis.data['arr' + part],\r\n\t\t\t\t\t\t\tthis.data['obj' + part],\r\n\t\t\t\t\t\t\topts.name || '',\r\n\t\t\t\t\t\t\tresp\r\n\t\t\t\t\t\t);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(\r\n\t\t\t\t\t\tthis.data['arr' + part],\r\n\t\t\t\t\t\tthis.data['obj' + part],\r\n\t\t\t\t\t\topts.name || '',\r\n\t\t\t\t\t\tresp\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['loaded' + part] = true;\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t\treturn this.data['arr' + part];\r\n\t}\r\n\tpublic set(part: any, opts: any = undefined, resp: any = undefined) {\r\n\t\tif (Array.isArray(opts)) {\r\n\t\t\tresp = opts;\r\n\t\t\topts = undefined;\r\n\t\t}\r\n\t\tif (opts) this.config(part, opts);\r\n\t\tif (Array.isArray(resp)) {\r\n\t\t\tfor (let i = 0; i < resp.length; i++) {\r\n\t\t\t\tthis.push(part, resp[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tarr: this.data['arr' + part],\r\n\t\t\tobj: this.data['obj' + part],\r\n\t\t};\r\n\t}\r\n\tprivate prepare_update(part: any, doc: any, opts: any) {\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string')\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\tlet _doc: any = {};\r\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\r\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\r\n\t\t\t}\r\n\t\t\tdoc = _doc;\r\n\t\t} else this.renew(part, doc);\r\n\t\tif (\r\n\t\t\ttypeof opts.rewrite == 'object' &&\r\n\t\t\tObject.values(opts.rewrite).length\r\n\t\t) {\r\n\t\t\tdoc = JSON.parse(JSON.stringify(doc));\r\n\t\t\tfor (let key in opts.rewrite) {\r\n\t\t\t\tthis.replace(doc, key, opts.rewrite[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn doc;\r\n\t}\r\n\tpublic update(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts != 'object') opts = {};\r\n\t\tdoc = this.prepare_update(part, doc, opts);\r\n\t\tlet url = '/api/' + part + '/update' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('update', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic unique(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts != 'object') opts = {};\r\n\t\tdoc = this.prepare_update(part, doc, opts);\r\n\t\tlet url = '/api/' + part + '/unique' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('update', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlet current_doc = this.data['obj' + part][doc._id];\r\n\t\t\t\t\tfor (let each in doc) {\r\n\t\t\t\t\t\tcurrent_doc[each] = doc[each];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.renew(part, current_doc);\r\n\t\t\t\t}\r\n\t\t\t\tif (\r\n\t\t\t\t\t(resp || typeof resp === 'string') &&\r\n\t\t\t\t\ttypeof cb == 'function'\r\n\t\t\t\t) {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic delete(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts !== 'object') opts = {};\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string')\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\tlet _doc: any = {};\r\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\r\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\r\n\t\t\t}\r\n\t\t\tdoc = _doc;\r\n\t\t} else {\r\n\t\t\tdoc = {\r\n\t\t\t\t_id: doc._id,\r\n\t\t\t};\r\n\t\t}\r\n\t\tlet url = '/api/' + part + '/delete' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('delete', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.remove(part, doc);\r\n\t\t\t\t}\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic _id(cb: any) {\r\n\t\tif (typeof cb == 'function') {\r\n\t\t\tthis.http.get('/waw/newId', cb);\r\n\t\t}\r\n\t}\r\n\tpublic to_id(docs: any) {\r\n\t\tif (!docs) return [];\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tdocs = docs.slice();\r\n\t\t} else if (typeof docs == 'object') {\r\n\t\t\tif (docs._id) return [docs._id];\r\n\t\t\tlet _docs = [];\r\n\t\t\tfor (let key in docs) {\r\n\t\t\t\tif (docs[key]) _docs.push(docs[key]._id || docs[key]);\r\n\t\t\t}\r\n\t\t\tdocs = _docs;\r\n\t\t}\r\n\t\tfor (let i = 0; i < docs.length; ++i) {\r\n\t\t\tif (docs[i]) docs[i] = docs[i]._id || docs[i];\r\n\t\t}\r\n\t\treturn docs;\r\n\t}\r\n\tpublic afterWhile(doc: any, cb: any, time = 1000) {\r\n\t\tif (typeof cb == 'function' && typeof time == 'number') {\r\n\t\t\tclearTimeout(doc.__updateTimeout);\r\n\t\t\tdoc.__updateTimeout = setTimeout(cb, time);\r\n\t\t}\r\n\t}\r\n\tpublic populate(doc: any, field: any, part: any): any {\r\n\t\tif (!doc || !field || !part) return;\r\n\t\tif (Array.isArray(doc)) {\r\n\t\t\tfor (let i = 0; i < doc.length; i++) {\r\n\t\t\t\tthis.populate(doc[i], field, part);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (this.data['loaded' + part]) {\r\n\t\t\tif (Array.isArray(field)) {\r\n\t\t\t\tfor (let i = 0; i < field.length; i++) {\r\n\t\t\t\t\tthis.populate(doc, field[i], part);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else if (field.indexOf('.') > -1) {\r\n\t\t\t\tfield = field.split('.');\r\n\t\t\t\tlet sub = field.shift();\r\n\t\t\t\tif (typeof doc[sub] != 'object') return;\r\n\t\t\t\treturn this.populate(doc[sub], field.join('.'), part);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(doc[field])) {\r\n\t\t\t\tfor (let i = doc[field].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tif (this.data['obj' + part][doc[field][i]]) {\r\n\t\t\t\t\t\tdoc[field][i] = this.data['obj' + part][doc[field][i]];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdoc[field].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else if (typeof doc[field] === 'string') {\r\n\t\t\t\tdoc[field] = this.data['obj' + part][doc[field]] || null;\r\n\t\t\t} else return;\r\n\t\t} else {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.populate(doc, field, part);\r\n\t\t\t}, 100);\r\n\t\t}\r\n\t}\r\n\tpublic on(parts: any, cb: any): any {\r\n\t\tif (typeof parts === 'string') {\r\n\t\t\tparts = parts.split(' ');\r\n\t\t}\r\n\t\tfor (var i = 0; i < parts.length; i++) {\r\n\t\t\tif (!this.data['loaded' + parts[i]]) {\r\n\t\t\t\treturn setTimeout(() => {\r\n\t\t\t\t\tthis.on(parts, cb);\r\n\t\t\t\t}, 100);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcb(this.data);\r\n\t}\r\n\tpublic track(index: any, doc: any) {\r\n\t\treturn (doc && doc._id && doc._id) || index;\r\n\t}\r\n\t/*\r\n\t *\tmongo sort filters\r\n\t */\r\n\tpublic sortAscId() {\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a._id > b._id) return 1;\r\n\t\t\telse return -1;\r\n\t\t};\r\n\t}\r\n\tpublic sortDescId() {\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a._id < b._id) return 1;\r\n\t\t\telse return -1;\r\n\t\t};\r\n\t}\r\n\tpublic sortAscString(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].toLowerCase() > b[opts.field].toLowerCase())\r\n\t\t\t\treturn 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].toLowerCase() < b[opts.field].toLowerCase() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescString(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].toLowerCase() < b[opts.field].toLowerCase())\r\n\t\t\t\treturn 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].toLowerCase() > b[opts.field].toLowerCase() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscDate(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].getTime() > b[opts.field].getTime()) return 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].getTime() < b[opts.field].getTime() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescDate(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].getTime() < b[opts.field].getTime()) return 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].getTime() > b[opts.field].getTime() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscNumber(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] > b[opts.field]) return 1;\r\n\t\t\telse if (a[opts.field] < b[opts.field] || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescNumber(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] < b[opts.field]) return 1;\r\n\t\t\telse if (a[opts.field] > b[opts.field] || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscBoolean(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (!a[opts.field] && b[opts.field]) return 1;\r\n\t\t\telse if ((a[opts.field] && !b[opts.field]) || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescBoolean(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] && !b[opts.field]) return 1;\r\n\t\t\telse if ((!a[opts.field] && b[opts.field]) || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\t/*\r\n\t *\tmongo replace filters\r\n\t */\r\n\tpublic beArr(val: any, cb: any) {\r\n\t\tif (!Array.isArray(val)) cb([]);\r\n\t\telse cb(val);\r\n\t}\r\n\tpublic beObj(val: any, cb: any) {\r\n\t\tif (typeof val != 'object' || Array.isArray(val) || !val) {\r\n\t\t\tval = {};\r\n\t\t}\r\n\t\tcb(val);\r\n\t}\r\n\tpublic beDate(val: any, cb: any) {\r\n\t\tcb(new Date(val));\r\n\t}\r\n\tpublic beString(val: any, cb: any) {\r\n\t\tif (typeof val != 'string') {\r\n\t\t\tval = '';\r\n\t\t}\r\n\t\tcb(val);\r\n\t}\r\n\tpublic beDoc = (val: any, cb: any) => {\r\n\t\tthis.beObj(val, (val: any) => {\r\n\t\t\tif (!val._id) {\r\n\t\t\t\tthis._id((_id: any) => {\r\n\t\t\t\t\tval._id = _id;\r\n\t\t\t\t\tcb(val);\r\n\t\t\t\t});\r\n\t\t\t} else cb(val);\r\n\t\t});\r\n\t};\r\n\tpublic forceArr(val: any, cb: any) {\r\n\t\tcb([]);\r\n\t}\r\n\tpublic forceObj(val: any, cb: any) {\r\n\t\tcb({});\r\n\t}\r\n\tpublic forceString(val: any, cb: any) {\r\n\t\tcb('');\r\n\t}\r\n\tpublic forceDoc = (val: any, cb: any) => {\r\n\t\tthis._id((_id: any) => {\r\n\t\t\tcb({\r\n\t\t\t\t_id: _id,\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\tpublic getCreated(val: any, cb: any, doc: any) {\r\n\t\tcb(new Date(parseInt(doc._id.substring(0, 8), 16) * 1000));\r\n\t}\r\n\t/*\r\n\t *\tmongo local support functions\r\n\t */\r\n\tprivate replace(doc: any, value: any, rpl: any): any {\r\n\t\tif (value.indexOf('.') > -1) {\r\n\t\t\tvalue = value.split('.');\r\n\t\t\tlet sub = value.shift();\r\n\t\t\tif (\r\n\t\t\t\tdoc[sub] &&\r\n\t\t\t\t(typeof doc[sub] != 'object' || Array.isArray(doc[sub]))\r\n\t\t\t)\r\n\t\t\t\treturn;\r\n\t\t\tif (!doc[sub]) doc[sub] = {};\r\n\t\t\treturn this.replace(doc[sub], value.join('.'), rpl);\r\n\t\t}\r\n\t\tif (typeof rpl == 'function') {\r\n\t\t\trpl(\r\n\t\t\t\tdoc[value],\r\n\t\t\t\tfunction (newValue: any) {\r\n\t\t\t\t\tdoc[value] = newValue;\r\n\t\t\t\t},\r\n\t\t\t\tdoc\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\tpublic renew(part: any, doc: any) {\r\n\t\tif (!this.data['obj' + part][doc._id]) return this.push(part, doc);\r\n\t\tif (this.data['opts' + part].replace) {\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let each in this.data['obj' + part][doc._id]) {\r\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\r\n\t\t}\r\n\t\tfor (let each in doc) {\r\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\r\n\t\t}\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let each in doc) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tlet to_have = true;\r\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\r\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t\t}\r\n\t\t\t\tlet fields: any = {};\r\n\t\t\t\tlet set = (field: any) => {\r\n\t\t\t\t\tfields[field] = true;\r\n\t\t\t\t\tif (!field) return;\r\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (to_have) {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i =\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\t\ti--\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i =\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\t\ti--\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(\r\n\t\t\t\t\t\t\t\t\ti,\r\n\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof g.sort == 'function') {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tset(g.field(doc, set.bind(this)));\r\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\r\n\t\t\t\t\tif (fields[field]) continue;\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tlet to_have = true;\r\n\t\t\t\tlet query = this.data['opts' + part].query[key];\r\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t\t}\r\n\t\t\t\tif (to_have) {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id)\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.data['obj' + part][key].push(doc);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof query.sort == 'function') {\r\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tpublic push(part: any, doc: any): any {\r\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\r\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\r\n\t\tif (!this.data['opts' + part]) this.data['opts' + part] = {};\r\n\t\tif (this.data['obj' + part][doc._id]) return this.renew(part, doc);\r\n\t\tif (this.data['opts' + part].replace) {\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].populate) {\r\n\t\t\tlet p = this.data['opts' + part].populate;\r\n\t\t\tif (Array.isArray(p)) {\r\n\t\t\t\tfor (let i = 0; i < p.length; i++) {\r\n\t\t\t\t\tif (typeof p == 'object' && p[i].field && p[i].part) {\r\n\t\t\t\t\t\tthis.populate(doc, p[i].field, p[i].part);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (typeof p == 'object' && p.field && p.part) {\r\n\t\t\t\tthis.populate(doc, p.field, p.part);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.data['arr' + part].push(doc);\r\n\t\tif (this.data['opts' + part].sort) {\r\n\t\t\tthis.data['arr' + part].sort(this.data['opts' + part].sort);\r\n\t\t}\r\n\t\tthis.data['obj' + part][doc._id] = doc;\r\n\t\tif (Array.isArray(this.data['opts' + part].use)) {\r\n\t\t\tfor (let i = 0; i < this.data['opts' + part].use.length; i++) {\r\n\t\t\t\tthis.data['obj' + part][doc[this.data['opts' + part].use[i]]] =\r\n\t\t\t\t\tdoc;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\r\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc)) continue;\r\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc)) continue;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t\t}\r\n\t\t\t\tlet set = (field: any) => {\r\n\t\t\t\t\tif (!field) return;\r\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\r\n\t\t\t\t\tif (typeof g.sort == 'function') {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tset(\r\n\t\t\t\t\tg.field(doc, (field: any) => {\r\n\t\t\t\t\t\tset(field);\r\n\t\t\t\t\t})\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tlet query = this.data['opts' + part].query[key];\r\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key].push(doc);\r\n\t\t\t\tif (typeof query.sort == 'function') {\r\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let each in doc) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// this.store.setJson('mongo' + part, this.data['arr' + part]);\r\n\t}\r\n\tpublic remove(part: any, doc: any) {\r\n\t\tif (!Array.isArray(this.data['arr' + part])) return;\r\n\t\tfor (let i = 0; i < this.data['arr' + part].length; i++) {\r\n\t\t\tif (this.data['arr' + part][i]._id == doc._id) {\r\n\t\t\t\tthis.data['arr' + part].splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this.data['obj' + part][doc._id];\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tdelete this.data['obj' + part][doc[field]];\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tfor (\r\n\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\ti >= 0;\r\n\t\t\t\t\ti--\r\n\t\t\t\t) {\r\n\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t/*\r\n\t *\tEndof Mongo Service\r\n\t */\r\n\tconstructor(\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpService,\r\n\t\tprivate core: CoreService\r\n\t) {\r\n\t\tconsole.warn('Mongo Service is deprecated');\r\n\r\n\t\tthis.core.onComplete('socket').then((socket: any) => {\r\n\t\t\tthis.socket = socket;\r\n\t\t\tsocket.on('create', (created: any) => {\r\n\t\t\t\tthis.fetch(created.part, {\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t\tquery: {\r\n\t\t\t\t\t\t_id: created._id,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tsocket.on('update', (updated: any) => {\r\n\t\t\t\tthis.fetch(updated.part, {\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t\tquery: {\r\n\t\t\t\t\t\t_id: updated._id,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tsocket.on('delete', (deleted: any) => {\r\n\t\t\t\tthis.remove(deleted.part, deleted);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class RenderService {\r\n\t/**\r\n\t * A dictionary to store event callbacks.\r\n\t * Each event has an array of callback functions that will be executed when the event is triggered.\r\n\t */\r\n\tprivate _pipes: Record<string, ((param: unknown) => void)[]> = {};\r\n\r\n\t/**\r\n\t * Registers a callback function to an event.\r\n\t *\r\n\t * @param event - The name of the event to listen for.\r\n\t * @param cb - The callback function to execute when the event is triggered.\r\n\t * @returns A function to unregister the callback from the event.\r\n\t */\r\n\ton(event: string, cb: () => void): () => void {\r\n\t\tthis._pipes[event] = this._pipes[event] || [];\r\n\t\tthis._pipes[event].push(cb);\r\n\r\n\t\tconst index = this._pipes[event].length - 1;\r\n\r\n\t\treturn () => {\r\n\t\t\tthis._pipes[event][index] = () => {};\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers an event and executes all registered callback functions for that event.\r\n\t *\r\n\t * @param event - The name of the event to trigger.\r\n\t * @param param - An optional parameter to pass to the callback functions.\r\n\t */\r\n\trender(event: string = '', param: unknown = null): void {\r\n\t\tif (!this._pipes[event]) return;\r\n\r\n\t\tfor (let i = 0; i < this._pipes[event].length; i++) {\r\n\t\t\tif (typeof this._pipes[event][i] === 'function') {\r\n\t\t\t\tthis._pipes[event][i](param);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HashService {\r\n\tprivate replacements = [\r\n\t\t{\r\n\t\t\tfrom: '%20',\r\n\t\t\tto: ' ',\r\n\t\t},\r\n\t];\r\n\tpublic hash: { [key: string]: string } = {};\r\n\tprivate done: boolean = false;\r\n\r\n\tconstructor(private core: CoreService) {\r\n\t\tthis.initialize();\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes the hash service by loading the current hash from the URL.\r\n\t */\r\n\tprivate initialize(): void {\r\n\t\tif (!this.core.window.location.hash) {\r\n\t\t\tthis.done = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.load();\r\n\t\tthis.done = true;\r\n\t}\r\n\r\n\t/**\r\n\t * Loads the current hash from the URL into the hash object.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tthis.hash = {};\r\n\t\tconst hashArray = this.core.window.location.hash\r\n\t\t\t.replace('#!#', '')\r\n\t\t\t.replace('#', '')\r\n\t\t\t.split('&');\r\n\r\n\t\tfor (const hashItem of hashArray) {\r\n\t\t\tlet [holder, value] = hashItem.split('=');\r\n\t\t\tholder = this.applyReplacements(holder);\r\n\t\t\tvalue = this.applyReplacements(value);\r\n\t\t\tthis.hash[holder] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Applies replacements to a given string based on the replacements array.\r\n\t *\r\n\t * @param str - The string to apply replacements to.\r\n\t * @returns The string with replacements applied.\r\n\t */\r\n\tprivate applyReplacements(str: string | undefined): string {\r\n\t\tif (!str) return '';\r\n\t\tfor (const replacement of this.replacements) {\r\n\t\t\tstr = str.split(replacement.from).join(replacement.to);\r\n\t\t}\r\n\t\treturn str;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes a callback with the value of a specific hash field once the hash is loaded.\r\n\t *\r\n\t * @param field - The hash field to get the value for.\r\n\t * @param cb - The callback to execute with the value.\r\n\t */\r\n\ton(field: string, cb: (value: string) => void): void {\r\n\t\tif (!this.done) {\r\n\t\t\tsetTimeout(() => this.on(field, cb), 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcb(this.hash[field]);\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current hash object to the URL.\r\n\t */\r\n\tsave(): void {\r\n\t\tconst hash = Object.entries(this.hash)\r\n\t\t\t.map(([key, value]) => `${key}=${value}`)\r\n\t\t\t.join('&');\r\n\t\tthis.core.window.location.hash = hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value for a specific hash field and updates the URL.\r\n\t *\r\n\t * @param field - The hash field to set the value for.\r\n\t * @param value - The value to set.\r\n\t */\r\n\tset(field: string, value: string): void {\r\n\t\tthis.hash[field] = value;\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the value of a specific hash field.\r\n\t *\r\n\t * @param field - The hash field to get the value for.\r\n\t * @returns The value of the hash field.\r\n\t */\r\n\tget(field: string): string | undefined {\r\n\t\treturn this.hash[field];\r\n\t}\r\n\r\n\t/**\r\n\t * Clears a specific hash field or all hash fields and updates the URL.\r\n\t *\r\n\t * @param field - The hash field to clear. If not provided, clears all hash fields.\r\n\t */\r\n\tclear(field?: string): void {\r\n\t\tif (field) {\r\n\t\t\tdelete this.hash[field];\r\n\t\t} else {\r\n\t\t\tthis.hash = {};\r\n\t\t}\r\n\t\tthis.save();\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { LoaderComponent } from '../components/loader/loader.component';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class LoaderService {\r\n\tpublic loaders:any = [];\r\n\tconstructor(private dom: DomService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config) {\r\n\t}\r\n\tshow(opts?:any){\r\n\t\tlet component:any;\r\n\t\topts.close = ()=>{\r\n\t\t\tif(component) component.componentRef.destroy();\r\n\t\t\tcomponent.nativeElement.remove();\r\n\t\t\tif(typeof opts.onClose == 'function') opts.onClose();\r\n\t\t};\r\n\t\tif(opts.append){\r\n\t\t\tcomponent = this.dom.appendComponent(LoaderComponent, opts, opts.append);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcomponent = this.dom.appendComponent(LoaderComponent, opts);\r\n\t\t}\r\n\t\tthis.loaders.push(component);\r\n\t\treturn component.nativeElement;\r\n\t}\r\n\tdestroy(){\r\n\t\tfor (let i = this.loaders.length-1; i >= 0; i--){\r\n\t\t this.loaders[i].componentRef.destroy();\r\n\t\t\tthis.loaders.splice(i,1);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { CoreService } from './core.service';\r\nimport * as io from 'socket.io-client';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class SocketService {\r\n\tprivate _url = '';\r\n\tprivate _io: any;\r\n\tprivate _connected = false;\r\n\tprivate _opts: any = {};\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config,\r\n\t\tprivate _core: CoreService\r\n\t) {\r\n\t\tthis._url = this._core.window.location.origin.replace('4200', '8080');\r\n\t\tif (!this._config) this._config = DEFAULT_CONFIG;\r\n\r\n\t\tif (typeof this._config.socket === 'object') {\r\n\t\t\tif (this._config.socket.url) {\r\n\t\t\t\tthis._url = this._config.socket.url;\r\n\t\t\t}\r\n\r\n\t\t\tif (this._config.socket.opts) {\r\n\t\t\t\tthis._opts = this._config.socket.opts;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._config.socket) {\r\n\t\t\tthis.load();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the URL for the WebSocket connection and reloads the socket.\r\n\t * @param url - The URL of the WebSocket server.\r\n\t */\r\n\tsetUrl(url: string): void {\r\n\t\tthis._url = url;\r\n\t\tif (!this._config.socket) {\r\n\t\t\tthis._config.socket = true;\r\n\t\t}\r\n\t\tthis.load();\r\n\t}\r\n\r\n\t/**\r\n\t * Loads and initializes the WebSocket connection.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tif (io) {\r\n\t\t\tconst ioFunc = (io as any).default ? (io as any).default : io;\r\n\t\t\tthis._io = ioFunc(this._url, this._opts);\r\n\t\t\tthis._io.on('connect', () => {\r\n\t\t\t\tthis._connected = true;\r\n\t\t\t\tthis._core.complete('socket');\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Subscribes to a WebSocket event.\r\n\t * @param to - The event to subscribe to.\r\n\t * @param cb - The callback function to execute when the event is received.\r\n\t */\r\n\ton(to: string, cb: (message: any) => void = () => { }): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.on(to, cb);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.on(to, cb);\r\n\t}\r\n\r\n\t/**\r\n\t * Emits a message to a WebSocket event.\r\n\t * @param to - The event to emit the message to.\r\n\t * @param message - The message to emit.\r\n\t * @param room - Optional room to emit the message to.\r\n\t */\r\n\temit(to: string, message: any, room: any = false): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.emit(to, message, room);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.emit(to, message, room);\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { ModalComponent } from '../components/modal/modal.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\r\nimport { Modal } from '../interfaces/modal.interface';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class ModalService {\r\n\tprivate _modal: any;\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tif (!this.config) this.config = {};\r\n\t\tif (!this.config.modal) this.config.modal = {};\r\n\t\tif (!this.config.modal.modals) this.config.modal.modals = {};\r\n\t\tthis._modal = config.modal;\r\n\t}\r\n\r\n\tshow(opts: Modal | any) {\r\n\t\tif (this.locked) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!opts || typeof opts != 'object') opts = {};\r\n\t\tif (\r\n\t\t\ttypeof opts.component == 'string' &&\r\n\t\t\tthis._modal.modals[opts.component]\r\n\t\t) {\r\n\t\t\topts.component = this._modal.modals[opts.component];\r\n\t\t}\r\n\t\tif (typeof opts.component != 'function') {\r\n\t\t\tconsole.log('This component does not exists.');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!opts.class) opts.class = '';\r\n\t\tfor (let each in this.config.modal) {\r\n\t\t\tif (each == 'class')\r\n\t\t\t\topts.class +=\r\n\t\t\t\t\t((opts.class && ' ') || '') + this.config.modal.class;\r\n\t\t\telse if (!opts[each]) opts[each] = this._modal[each];\r\n\t\t}\r\n\t\topts.id = Math.floor(Math.random() * Date.now()) + Date.now();\r\n\t\tthis.opened[opts.id] = opts;\r\n\t\tthis.core.document.body.classList.add('modalOpened');\r\n\t\tlet component: any;\r\n\t\tlet content: any;\r\n\t\topts.close = () => {\r\n\t\t\tcontent.componentRef.destroy();\r\n\t\t\tcomponent.nativeElement.remove();\r\n\t\t\tif (typeof opts.onClose == 'function') opts.onClose();\r\n\t\t\tdelete this.opened[opts.id];\r\n\t\t\tif (!Object.keys(this.opened).length) {\r\n\t\t\t\tthis.core.document.body.classList.remove('modalOpened');\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (typeof opts.timeout == 'number' && opts.timeout > 0) {\r\n\t\t\tsetTimeout(opts.close, opts.timeout);\r\n\t\t}\r\n\t\tcomponent = this.dom.appendComponent(ModalComponent, opts);\r\n\t\tcontent = this.dom.appendComponent(\r\n\t\t\topts.component,\r\n\t\t\topts,\r\n\t\t\tcomponent.nativeElement.children[0].children[0]\r\n\t\t\t\t.children[0] as HTMLElement\r\n\t\t);\r\n\t\treturn component.nativeElement;\r\n\t}\r\n\topen(opts: Modal) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\tsmall(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'small';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tmid(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'mid';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tbig(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'big';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tfull(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'full';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tprivate opened: any = {};\r\n\tlocked = false;\r\n\tdestroy() {\r\n\t\tif (this.locked) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor (let each in this.opened) {\r\n\t\t\tthis.opened[each].close();\r\n\t\t}\r\n\t\tthis.core.document.body.classList.remove('modalOpened');\r\n\t}\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\n selector: 'lib-files',\n templateUrl: './files.component.html',\n styleUrls: ['./files.component.scss'],\n standalone: false\n})\r\nexport class FilesComponent{\r\n\tpublic fs:any;\r\n\tconstructor() {}\r\n}\r\n","<ng-container *ngFor=\"let file of fs.files\">\r\n\t<input [id]=\"file.id\" type=\"file\" name=\"file\" (change)=\"fs.change($event, file); input.value='';\" #input [hidden]=\"true\" [accept]=\"(file.accept) || (file.part && 'image/*') || ''\" [multiple]=\"file.multiple && true || ''\">\r\n</ng-container>","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { FilesComponent } from '../components/files/files.component';\r\n\r\ninterface FileOptions {\r\n\tid: string;\r\n\ttype?: string;\r\n\tresize?: number | { width: number; height: number };\r\n\tmultiple?: boolean;\r\n\tmultiple_cb?: (files: { dataUrl: string; file: File }[]) => void;\r\n\tcb?: (dataUrl: string | false, file: File) => void;\r\n\tsave?: boolean;\r\n\tcomplete?: () => void;\r\n\tapi?: string;\r\n\tpart?: string;\r\n\tname?: string;\r\n\tbody?: () => object | object;\r\n\tresp?: (response: any) => void;\r\n\tappend?: (formData: FormData, files: File[]) => void;\r\n\tmultiple_files?: { dataUrl: string; file: File }[];\r\n\tmultiple_counter?: number;\r\n\turl?: string;\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class FileService {\r\n\tprivate added: Record<string, FileOptions> = {};\r\n\tprivate files: FileOptions[] = [];\r\n\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\tprivate http: HttpService\r\n\t) {\r\n\t\tthis.dom.appendComponent(FilesComponent, {\r\n\t\t\tfs: this,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a file input configuration.\r\n\t *\r\n\t * @param opts - The file options.\r\n\t */\r\n\tpublic add(opts: FileOptions | string): void | (() => void) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = { id: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.id) {\r\n\t\t\tconsole.log('You have to pass ID into file object');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\topts.type = opts.type || 'image';\r\n\r\n\t\tif (typeof opts.resize === 'number') {\r\n\t\t\topts.resize = { width: opts.resize, height: opts.resize };\r\n\t\t}\r\n\r\n\t\tif (this.added[opts.id]) {\r\n\t\t\tthis.files = this.files.filter((file) => file.id !== opts.id);\r\n\t\t}\r\n\r\n\t\tthis.files.push(opts);\r\n\t\tthis.added[opts.id] = opts;\r\n\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\topts.complete?.();\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles file input change event.\r\n\t *\r\n\t * @param event - The input change event.\r\n\t * @param info - The file options.\r\n\t */\r\n\tpublic change(event: Event, info: FileOptions): void {\r\n\t\tconst input = event.target as HTMLInputElement;\r\n\t\tif (!input.files) return;\r\n\r\n\t\tif (info.type === 'image') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tif (info.multiple_cb) {\r\n\t\t\t\t\tinfo.multiple_files = [];\r\n\t\t\t\t\tinfo.multiple_counter = input.files.length;\r\n\t\t\t\t}\r\n\t\t\t\tArray.from(input.files).forEach((file) => this.process(file, info));\r\n\t\t\t} else {\r\n\t\t\t\tthis.process(input.files[0], info);\r\n\t\t\t}\r\n\t\t} else if (info.type === 'file') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tinfo.multiple_cb?.(Array.from(input.files).map(file => ({ dataUrl: '', file })));\r\n\t\t\t}\r\n\t\t\tArray.from(input.files).forEach((file) => info.cb?.('', file));\r\n\t\t\tif (info.part || info.url) {\r\n\t\t\t\tthis.uploadFiles(info, input.files as any);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.log('Provide type `image` or `file`');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a file.\r\n\t *\r\n\t * @param part - The part of the API.\r\n\t * @param url - The URL of the file.\r\n\t * @param opts - Additional options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic remove(part: string, url: string, opts: any = {}, cb: (resp: any) => void = () => { }): void | (() => void) {\r\n\t\topts.url = url;\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads files to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param files - The files to upload.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic uploadFiles(info: FileOptions, files: File[], cb: (resp: any) => void = () => { }): void {\r\n\t\tconst formData = new FormData();\r\n\r\n\t\tif (info.append) {\r\n\t\t\tinfo.append(formData, files);\r\n\t\t} else {\r\n\t\t\tfiles.forEach((file, index) => formData.append(`file[${index}]`, file));\r\n\t\t}\r\n\r\n\t\tconst body = typeof info.body === 'function' ? info.body() : (info.body || {});\r\n\t\tObject.entries(body).forEach(([key, value]) => formData.append(key, value));\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, formData, (resp: any) => {\r\n\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\tcb(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads an image to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic image(info: FileOptions, cb: (resp: any) => void = () => { }): void | (() => void) {\r\n\t\tif (info.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, info, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the file information after processing.\r\n\t *\r\n\t * @param dataUrl - The data URL of the processed file.\r\n\t * @param info - The file options.\r\n\t * @param file - The file object.\r\n\t */\r\n\t// private update(dataUrl: string, info: FileOptions, file: File): void {\r\n\tprivate update(dataUrl: string, info: any, file: File): void {\r\n\t\tinfo.cb?.(dataUrl, file);\r\n\t\tif (info.multiple_cb) {\r\n\t\t\tinfo.multiple_files.push({ dataUrl, file });\r\n\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t}\r\n\r\n\t\tif (!info.part) return;\r\n\r\n\t\tconst obj = typeof info.body === 'function' ? info.body() : (info.body || {});\r\n\t\tobj['dataUrl'] = dataUrl;\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(info.api || `/api/${info.part}/file${info.name ? `/${info.name}` : ''}`, obj, (resp: any) => {\r\n\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Processes an image file for resizing.\r\n\t *\r\n\t * @param file - The file object.\r\n\t * @param info - The file options.\r\n\t */\r\n\t// private process(file: File, info: FileOptions): void {\r\n\tprivate process(file: File, info: any): void {\r\n\t\tif (!file.type.startsWith('image/')) {\r\n\t\t\tinfo.cb?.(false, file);\r\n\t\t\tif (info.multiple_cb) {\r\n\t\t\t\tinfo.multiple_files.push({ dataUrl: '', file });\r\n\t\t\t\tif (--info.multiple_counter === 0) info.multiple_cb(info.multiple_files);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (info.resize) {\r\n\t\t\tinfo.resize.width = info.resize.width || 1920;\r\n\t\t\tinfo.resize.height = info.resize.height || 1080;\r\n\t\t}\r\n\r\n\t\tconst reader = new FileReader();\r\n\t\treader.onload = (loadEvent) => {\r\n\t\t\tif (!info.resize) {\r\n\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t}\r\n\r\n\t\t\tconst canvas = this.core.document.createElement('canvas');\r\n\t\t\tconst img = this.core.document.createElement('img');\r\n\t\t\timg.onload = () => {\r\n\t\t\t\tif (img.width <= info.resize.width && img.height <= info.resize.height) {\r\n\t\t\t\t\treturn this.update(loadEvent.target?.result as string, info, file);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst infoRatio = info.resize.width / info.resize.height;\r\n\t\t\t\tconst imgRatio = img.width / img.height;\r\n\t\t\t\tlet width, height;\r\n\t\t\t\tif (imgRatio > infoRatio) {\r\n\t\t\t\t\twidth = Math.min(info.resize.width, img.width);\r\n\t\t\t\t\theight = width / imgRatio;\r\n\t\t\t\t} else {\r\n\t\t\t\t\theight = Math.min(info.resize.height, img.height);\r\n\t\t\t\t\twidth = height * imgRatio;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\t\t\t\tconst context = canvas.getContext('2d');\r\n\t\t\t\tcontext.drawImage(img, 0, 0, width, height);\r\n\t\t\t\tconst dataUrl = canvas.toDataURL('image/jpeg', 1);\r\n\t\t\t\tthis.update(dataUrl, info, file);\r\n\t\t\t};\r\n\t\t\timg.src = loadEvent.target?.result as string;\r\n\t\t};\r\n\t\treader.readAsDataURL(file);\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class UiService {\r\n\tprivate variables: { [key: string]: string } = {};\r\n\tprivate _forms: { [key: string]: any } = {};\r\n\t// global variable use for design purposes\r\n\tvar: Record<string, unknown> = {};\r\n\r\n\tconstructor(private core: CoreService) {\r\n\t\tconst storedVariables = this.core.localStorage.getItem('css_variables');\r\n\t\tthis.variables = storedVariables ? JSON.parse(storedVariables) : {};\r\n\t\tfor (const key in this.variables) {\r\n\t\t\tthis.setProperty(key, this.variables[key]);\r\n\t\t}\r\n\t}\r\n\r\n\t/* Forms Management */\r\n\t/**\r\n\t * Manages form states.\r\n\t *\r\n\t * @param id - The form identifier.\r\n\t * @returns The form state object.\r\n\t */\r\n\tpublic form(id: string): any {\r\n\t\tif (typeof id !== 'string') return {};\r\n\t\tif (!this._forms[id]) this._forms[id] = {};\r\n\t\treturn this._forms[id];\r\n\t}\r\n\r\n\t/**\r\n\t * Validates input values based on the specified type.\r\n\t *\r\n\t * @param value - The value to validate.\r\n\t * @param kind - The type of validation.\r\n\t * @param extra - Additional validation criteria.\r\n\t * @returns True if the value is valid, false otherwise.\r\n\t */\r\n\tpublic valid(value: any, kind = 'email', extra = 0): boolean {\r\n\t\tconst validators: { [key: string]: (value: any) => boolean } = {\r\n\t\t\temail: (value) => /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,10})+$/.test(value || ''),\r\n\t\t\ttext: (value) => typeof value === 'string',\r\n\t\t\tarray: (value) => Array.isArray(value),\r\n\t\t\tobject: (value) => typeof value === 'object' && !Array.isArray(value) && value !== null,\r\n\t\t\tnumber: (value) => typeof value === 'number',\r\n\t\t\tpassword: (value) => {\r\n\t\t\t\tif (!value) return false;\r\n\t\t\t\tswitch (extra) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))/.test(value || '');\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn /^(((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@#$%&!-_]))(?=.{8,})/.test(value || '');\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn !!value;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t};\r\n\t\treturn validators[kind] ? validators[kind](value) : false;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines the strength of a password.\r\n\t *\r\n\t * @param value - The password to evaluate.\r\n\t * @returns The strength level of the password.\r\n\t */\r\n\tpublic level(value = ''): number {\r\n\t\tif (!value) return 0;\r\n\t\tlet level = 0;\r\n\t\tif (value.length > 8) level++;\r\n\t\tif (/[a-z]/.test(value)) level++;\r\n\t\tif (/[A-Z]/.test(value)) level++;\r\n\t\tif (/[1-9]/.test(value)) level++;\r\n\t\tif (/[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/.test(value)) level++;\r\n\t\treturn level;\r\n\t}\r\n\r\n\t/* CSS Management */\r\n\t/**\r\n\t * Saves the CSS variables to local storage.\r\n\t */\r\n\tprivate save(): void {\r\n\t\tthis.core.localStorage.setItem('css_variables', JSON.stringify(this.variables));\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a CSS variable.\r\n\t *\r\n\t * @param key - The CSS variable name.\r\n\t * @param value - The CSS variable value.\r\n\t */\r\n\tprivate setProperty(key: string, value: string): void {\r\n\t\tthis.core.document.documentElement.style.setProperty(key, value);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets multiple CSS variables.\r\n\t *\r\n\t * @param variables - The CSS variables to set.\r\n\t * @param opts - Options for setting the variables.\r\n\t */\r\n\tpublic set(variables: { [key: string]: string }, opts: any = {}): void {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = opts === 'local' ? { local: true } : { host: opts };\r\n\t\t}\r\n\t\tif (opts.host && this.core.window.location.host !== opts.host) return;\r\n\t\tfor (const key in variables) {\r\n\t\t\tif (opts.local) {\r\n\t\t\t\tthis.variables[key] = variables[key];\r\n\t\t\t} else if (this.variables[key]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthis.setProperty(key, variables[key]);\r\n\t\t}\r\n\t\tif (opts.local) this.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the stored CSS variables.\r\n\t *\r\n\t * @returns The stored CSS variables.\r\n\t */\r\n\tpublic get(): { [key: string]: string } {\r\n\t\treturn this.variables;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes specified CSS variables.\r\n\t *\r\n\t * @param keys - The keys of the CSS variables to remove.\r\n\t */\r\n\tpublic remove(keys: string | string[]): void {\r\n\t\tconst keyArray = Array.isArray(keys) ? keys : keys.split(' ');\r\n\t\tfor (const key of keyArray) {\r\n\t\t\tdelete this.variables[key];\r\n\t\t}\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates an array of sample data.\r\n\t *\r\n\t * @param arrLen - The length of the array.\r\n\t * @param type - The type of data to generate.\r\n\t * @returns An array of sample data.\r\n\t */\r\n\tpublic arr(arrLen = 10, type: string = 'number'): any[] {\r\n\t\tconst arr = [];\r\n\t\tfor (let i = 0; i < arrLen; i++) {\r\n\t\t\tswitch (type) {\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tarr.push(i + 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\tarr.push(this.text());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\tarr.push(new Date(new Date().getTime() + i * 86400000));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tarr.push(type);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a random text string.\r\n\t *\r\n\t * @param length - The length of the text string.\r\n\t * @returns A random text string.\r\n\t */\r\n\tpublic text(length = 10): string {\r\n\t\tconst characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\t\tlet result = '';\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += characters.charAt(Math.floor(Math.random() * characters.length));\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class TimeService {\r\n\tprivate weekDays = [\r\n\t\t'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'\r\n\t];\r\n\r\n\tconstructor(private datePipe: DatePipe) { }\r\n\r\n\t/**\r\n\t * Returns the name of the day of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the day of the week.\r\n\t * @param format - The format in which to return the day name. Default is 'long'.\r\n\t * @returns The name of the day of the week.\r\n\t */\r\n\tgetDayName(date: Date, format: 'short' | 'long' = 'long'): string {\r\n\t\tconst dayIndex = date.getDay();\r\n\t\treturn format === 'short' ? this.weekDays[dayIndex].substring(0, 3) : this.weekDays[dayIndex];\r\n\t}\r\n\r\n\t/**\r\n\t * Formats a date according to the specified format and timezone.\r\n\t *\r\n\t * @param date - The date to format.\r\n\t * @param format - The format string (see Angular DatePipe documentation for format options).\r\n\t * @param timezone - The timezone to use for formatting.\r\n\t * @returns The formatted date string.\r\n\t */\r\n\tformatDate(date: Date, format: string = 'mediumDate', timezone: string = 'UTC'): string {\r\n\t\treturn this.datePipe.transform(date, format, timezone) || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a date to a different timezone.\r\n\t *\r\n\t * @param date - The date to convert.\r\n\t * @param timezone - The timezone to convert to.\r\n\t * @returns The date in the new timezone.\r\n\t */\r\n\tconvertToTimezone(date: Date, timezone: string): Date {\r\n\t\treturn new Date(date.toLocaleString('en-US', { timeZone: timezone }));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the day.\r\n\t * @returns The start of the day (midnight) for the given date.\r\n\t */\r\n\tstartOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(0, 0, 0, 0);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the day.\r\n\t * @returns The end of the day (one millisecond before midnight) for the given date.\r\n\t */\r\n\tendOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(23, 59, 59, 999);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of days in a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of days in the month.\r\n\t */\r\n\tgetDaysInMonth(month: number, year: number): number {\r\n\t\treturn new Date(year, month + 1, 0).getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a given year is a leap year.\r\n\t *\r\n\t * @param year - The year to check.\r\n\t * @returns True if the year is a leap year, false otherwise.\r\n\t */\r\n\tisLeapYear(year: number): boolean {\r\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of days to a date.\r\n\t *\r\n\t * @param date - The date to which to add days.\r\n\t * @param days - The number of days to add.\r\n\t * @returns The new date with the added days.\r\n\t */\r\n\taddDays(date: Date, days: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setDate(newDate.getDate() + days);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of months to a date.\r\n\t *\r\n\t * @param date - The date to which to add months.\r\n\t * @param months - The number of months to add.\r\n\t * @returns The new date with the added months.\r\n\t */\r\n\taddMonths(date: Date, months: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMonth(newDate.getMonth() + months);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of years to a date.\r\n\t *\r\n\t * @param date - The date to which to add years.\r\n\t * @param years - The number of years to add.\r\n\t * @returns The new date with the added years.\r\n\t */\r\n\taddYears(date: Date, years: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setFullYear(newDate.getFullYear() + years);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of days from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract days.\r\n\t * @param days - The number of days to subtract.\r\n\t * @returns The new date with the subtracted days.\r\n\t */\r\n\tsubtractDays(date: Date, days: number): Date {\r\n\t\treturn this.addDays(date, -days);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of months from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract months.\r\n\t * @param months - The number of months to subtract.\r\n\t * @returns The new date with the subtracted months.\r\n\t */\r\n\tsubtractMonths(date: Date, months: number): Date {\r\n\t\treturn this.addMonths(date, -months);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of years from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract years.\r\n\t * @param years - The number of years to subtract.\r\n\t * @returns The new date with the subtracted years.\r\n\t */\r\n\tsubtractYears(date: Date, years: number): Date {\r\n\t\treturn this.addYears(date, -years);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if two dates are on the same day.\r\n\t *\r\n\t * @param date1 - The first date.\r\n\t * @param date2 - The second date.\r\n\t * @returns True if the dates are on the same day, false otherwise.\r\n\t */\r\n\tisSameDay(date1: Date, date2: Date): boolean {\r\n\t\treturn (\r\n\t\t\tdate1.getFullYear() === date2.getFullYear() &&\r\n\t\t\tdate1.getMonth() === date2.getMonth() &&\r\n\t\t\tdate1.getDate() === date2.getDate()\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the ISO week number for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the week number.\r\n\t * @returns The ISO week number (1-53).\r\n\t */\r\n\tgetWeekNumber(date: Date): number {\r\n\t\tconst tempDate = new Date(date.getTime());\r\n\t\ttempDate.setHours(0, 0, 0, 0);\r\n\t\t// Set to nearest Thursday: current date + 4 - current day number, making Thursday day 4\r\n\t\ttempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7));\r\n\t\tconst yearStart = new Date(tempDate.getFullYear(), 0, 1);\r\n\t\t// Calculate full weeks to nearest Thursday\r\n\t\treturn Math.ceil((((tempDate.getTime() - yearStart.getTime()) / 86400000) + 1) / 7);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of weeks in a month for a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of weeks in the month.\r\n\t */\r\n\tgetWeeksInMonth(month: number, year: number): number {\r\n\t\tconst firstDayOfMonth = new Date(year, month, 1);\r\n\t\tconst lastDayOfMonth = new Date(year, month + 1, 0);\r\n\t\t// Get ISO week numbers for the first and last day of the month\r\n\t\tconst firstWeek = this.getWeekNumber(firstDayOfMonth);\r\n\t\tlet lastWeek = this.getWeekNumber(lastDayOfMonth);\r\n\t\t// Special case: when January 1st is in the last week of the previous year\r\n\t\tif (firstWeek > lastWeek) {\r\n\t\t\tlastWeek = this.getWeekNumber(new Date(year, 11, 31)); // Get week of the last day of the year\r\n\t\t}\r\n\t\treturn lastWeek - firstWeek + 1;\r\n\t}\r\n}\r\n","/* initialize */\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from './interfaces/config';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';\r\nimport { MetaService } from './services/meta.service';\r\nimport { MetaGuard } from './guard/meta.guard';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n/* directives */\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\nconst DIRECTIVES = [ClickOutsideDirective];\r\n\r\n/* pipes */\r\nimport { ArrPipe } from './pipes/arr.pipe';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { SplicePipe } from './pipes/splice.pipe';\r\nimport { SearchPipe } from './pipes/search.pipe';\r\nimport { MongodatePipe } from './pipes/mongodate.pipe';\r\nimport { PaginationPipe } from './pipes/pagination.pipe';\r\nconst PIPES = [\r\n\tArrPipe,\r\n\tSafePipe,\r\n\tSplicePipe,\r\n\tSearchPipe,\r\n\tMongodatePipe,\r\n\tPaginationPipe,\r\n];\r\n\r\n/* components */\r\nimport { WrapperComponent } from './components/alert/wrapper/wrapper.component';\r\nimport { LoaderComponent } from './components/loader/loader.component';\r\nimport { FilesComponent } from './components/files/files.component';\r\nimport { ModalComponent } from './components/modal/modal.component';\r\nimport { AlertComponent } from './components/alert/alert.component';\r\nconst LOCAL_COMPONENTS = [\r\n\tWrapperComponent,\r\n\tFilesComponent\r\n];\r\nconst COMPONENTS = [\r\n\tLoaderComponent,\r\n\tModalComponent,\r\n\tAlertComponent\r\n];\r\n\r\n@NgModule({ declarations: [...LOCAL_COMPONENTS, ...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n exports: [...PIPES, ...COMPONENTS, ...DIRECTIVES], imports: [CommonModule, FormsModule], providers: [\r\n { provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG },\r\n MetaGuard,\r\n MetaService,\r\n provideHttpClient(withInterceptorsFromDi())\r\n ] })\r\nexport class WacomModule {\r\n\tstatic forRoot(config: Config = DEFAULT_CONFIG): ModuleWithProviders<WacomModule> {\r\n\t\treturn {\r\n\t\t\tngModule: WacomModule,\r\n\t\t\tproviders: [{\r\n\t\t\t\tprovide: CONFIG_TOKEN,\r\n\t\t\t\tuseValue: config\r\n\t\t\t}]\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n *\tInterfaces\r\n */\r\nexport * from './lib/interfaces/config';\r\nexport * from './lib/interfaces/alert.interface';\r\nexport * from './lib/interfaces/crud.interface';\r\n/*\r\n *\tGuard\r\n */\r\nexport * from './lib/guard/meta.guard';\r\n/*\r\n *\tComponents\r\n */\r\nexport * from './lib/components/alert/alert.component';\r\nexport * from './lib/components/modal/modal.component';\r\nexport * from './lib/components/loader/loader.component';\r\nexport * from './lib/components/base.component';\r\nexport * from './lib/components/crud.component';\r\n/*\r\n *\tDirectives\r\n */\r\nexport * from './lib/directives/click-outside.directive';\r\n/*\r\n *\tPipes\r\n */\r\nexport * from './lib/pipes/arr.pipe';\r\nexport * from './lib/pipes/mongodate.pipe';\r\nexport * from './lib/pipes/pagination.pipe';\r\nexport * from './lib/pipes/safe.pipe';\r\nexport * from './lib/pipes/search.pipe';\r\nexport * from './lib/pipes/splice.pipe';\r\n/*\r\n *\tServices\r\n */\r\nexport * from './lib/services/base.service';\r\nexport * from './lib/services/crud.service';\r\nexport * from './lib/services/meta.service';\r\nexport * from './lib/services/store.service';\r\nexport * from './lib/services/http.service';\r\nexport * from './lib/services/mongo.service';\r\nexport * from './lib/services/render.service';\r\nexport * from './lib/services/hash.service';\r\nexport * from './lib/services/dom.service';\r\nexport * from './lib/services/alert.service';\r\nexport * from './lib/services/loader.service';\r\nexport * from './lib/services/socket.service';\r\nexport * from './lib/services/modal.service';\r\nexport * from './lib/services/file.service';\r\nexport * from './lib/services/ui.service';\r\nexport * from './lib/services/core.service';\r\nexport * from './lib/services/time.service';\r\n/*\r\n *\tInitial\r\n *\r\n *\tmake different kind of modules, one which import all, other for piece by piece\r\n */\r\nexport * from './lib/wacom.module';\r\n/*\r\n *\tEnd of Support\r\n */\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CoreService","i2","i1","i1.StoreService","i2.HttpService","i3.CoreService","i1.DomService","i2.CoreService","i3.HttpService"],"mappings":";;;;;;;;;;;;;MAuEa,YAAY,GAAG,IAAI,cAAc,CAAS,QAAQ;AAClD,MAAA,cAAc,GAAW;AACrC,IAAA,IAAI,EAAE;AACL,QAAA,cAAc,EAAE,KAAK;AACrB,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,QAAQ,EAAE;AACV,KAAA;AACD,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE;AACL,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CAAA,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC;oBACnF,OAAO,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE;AAChG,wBAAA,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE;wBACnD,SAAS;wBACT,WAAW;wBACX,iBAAiB,CAAC,sBAAsB,EAAE;qBAC7C,EAAE;;;ACnDP;;AAEG;AAuDH;;AAEG;;AC3DH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"wacom.mjs","sources":["../../../projects/wacom/src/lib/interfaces/config.ts","../../../projects/wacom/src/lib/interfaces/alert.interface.ts","../../../projects/wacom/src/lib/services/core.service.ts","../../../projects/wacom/src/lib/services/meta.service.ts","../../../projects/wacom/src/lib/guard/meta.guard.ts","../../../projects/wacom/src/lib/components/alert/alert.component.ts","../../../projects/wacom/src/lib/components/alert/alert.component.html","../../../projects/wacom/src/lib/components/modal/modal.component.ts","../../../projects/wacom/src/lib/components/modal/modal.component.html","../../../projects/wacom/src/lib/components/loader/loader.component.ts","../../../projects/wacom/src/lib/components/loader/loader.component.html","../../../projects/wacom/src/lib/components/base.component.ts","../../../projects/wacom/src/lib/components/crud.component.ts","../../../projects/wacom/src/lib/directives/click-outside.directive.ts","../../../projects/wacom/src/lib/pipes/arr.pipe.ts","../../../projects/wacom/src/lib/pipes/mongodate.pipe.ts","../../../projects/wacom/src/lib/pipes/pagination.pipe.ts","../../../projects/wacom/src/lib/pipes/safe.pipe.ts","../../../projects/wacom/src/lib/pipes/search.pipe.ts","../../../projects/wacom/src/lib/pipes/splice.pipe.ts","../../../projects/wacom/src/lib/services/base.service.ts","../../../projects/wacom/src/lib/services/store.service.ts","../../../projects/wacom/src/lib/services/http.service.ts","../../../projects/wacom/src/lib/components/alert/wrapper/wrapper.component.ts","../../../projects/wacom/src/lib/components/alert/wrapper/wrapper.component.html","../../../projects/wacom/src/lib/services/dom.service.ts","../../../projects/wacom/src/lib/services/alert.service.ts","../../../projects/wacom/src/lib/services/crud.service.ts","../../../projects/wacom/src/lib/services/mongo.service.ts","../../../projects/wacom/src/lib/services/render.service.ts","../../../projects/wacom/src/lib/services/hash.service.ts","../../../projects/wacom/src/lib/services/loader.service.ts","../../../projects/wacom/src/lib/services/socket.service.ts","../../../projects/wacom/src/lib/services/modal.service.ts","../../../projects/wacom/src/lib/components/files/files.component.ts","../../../projects/wacom/src/lib/components/files/files.component.html","../../../projects/wacom/src/lib/services/file.service.ts","../../../projects/wacom/src/lib/services/ui.service.ts","../../../projects/wacom/src/lib/services/time.service.ts","../../../projects/wacom/src/lib/wacom.module.ts","../../../projects/wacom/src/public-api.ts","../../../projects/wacom/src/wacom.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\nexport interface Any {\r\n\t[key: string]: string;\r\n}\r\nexport interface Config {\r\n\tmeta?: {\r\n\t\tuseTitleSuffix?: boolean;\r\n\t\twarnMissingGuard?: boolean;\r\n\t\tdefaults?: {\r\n\t\t\ttitle?: string;\r\n\t\t\ttitleSuffix?: string;\r\n\t\t} & { [key: string]: string | undefined };\r\n\t};\r\n\talert?: {\r\n\t\talerts?: object;\r\n\t\ttext?: string;\r\n\t\ttype?: string;\r\n\t\ticon?: string;\r\n\t\tclass?: string;\r\n\t\tunique?: string;\r\n\t\tprogress?: boolean;\r\n\t\tposition?: string;\r\n\t\ttimeout?: number;\r\n\t\tclose?: any;\r\n\t\tbuttons?: any;\r\n\t};\r\n\tmodal?: {\r\n\t\tsize?: any;\r\n\t\ttimeout?: any;\r\n\t\ttimestart?: any;\r\n\t\tclass?: string;\r\n\t\tmodals?: object;\r\n\t\tposition?: string;\r\n\t\tclosable?: boolean;\r\n\t\tunique?: string;\r\n\t};\r\n\tpopup?: {\r\n\t\tpopups?: object;\r\n\t};\r\n\tloader?: {\r\n\t\tloaders?: object;\r\n\t};\r\n\tsocket?: any;\r\n\thttp?: {\r\n\t\theaders?: any;\r\n\t\turl?: string;\r\n\t};\r\n\tstore?: {\r\n\t\tprefix?: string;\r\n\t\tset?: (\r\n\t\t\thold: any,\r\n\t\t\tvalue: any,\r\n\t\t\tcb?: () => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<boolean>;\r\n\t\tget?: (\r\n\t\t\thold: any,\r\n\t\t\tcb?: (value: string) => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<string>;\r\n\t\tremove?: (\r\n\t\t\thold: any,\r\n\t\t\tcb?: () => void,\r\n\t\t\terrCb?: () => void\r\n\t\t) => Promise<boolean>;\r\n\t\tclear?: (cb?: () => void, errCb?: () => void) => Promise<boolean>;\r\n\t};\r\n}\r\nexport const CONFIG_TOKEN = new InjectionToken<Config>('config');\r\nexport const DEFAULT_CONFIG: Config = {\r\n\tmeta: {\r\n\t\tuseTitleSuffix: false,\r\n\t\twarnMissingGuard: true,\r\n\t\tdefaults: {},\r\n\t},\r\n\tsocket: false,\r\n\thttp: {\r\n\t\turl: '',\r\n\t\theaders: {},\r\n\t},\r\n\tstore: {\r\n\t\tprefix: '',\r\n\t},\r\n};\r\n","import { InjectionToken } from '@angular/core';\r\n\r\nexport interface Alert {\r\n\tonClose?: any;\r\n\talerts?: object;\r\n\tcomponent?: any;\r\n\ttext?: string;\r\n\ticon?: string;\r\n\ttype?: string;\r\n\tclass?: string;\r\n\tunique?: string;\r\n\tprogress?: boolean;\r\n\tposition?: string;\r\n\ttimeout?: any;\r\n\tclosable?: boolean;\r\n\tclose?: any;\r\n\tbuttons?: any;\r\n\t[x: string]: any;\r\n}\r\nexport const DEFAULT_Alert: Alert = {\r\n\talerts: {},\r\n\ttext: '',\r\n\ttype: 'info',\r\n\tclass: '',\r\n\tprogress: true,\r\n\tposition: 'bottomRight',\r\n\ttimeout: 5000,\r\n\tclosable: true,\r\n\tbuttons: [],\r\n};\r\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\r\nimport { isPlatformServer } from '@angular/common';\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\n// Add capitalize method to String prototype if it doesn't already exist\r\nif (!String.prototype.capitalize) {\r\n\tString.prototype.capitalize = function (): string {\r\n\t\tif (this.length > 0) {\r\n\t\t\treturn this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();\r\n\t\t}\r\n\t\treturn '';\r\n\t};\r\n}\r\n\r\n// Extend the String interface to include the new method\r\ndeclare global {\r\n\tinterface String {\r\n\t\tcapitalize(): string;\r\n\t}\r\n}\r\n\r\ndeclare var cordova: any;\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class CoreService {\r\n\tssr = false;\r\n\tlocalStorage: any; // = localStorage;\r\n\tnavigator: any; // = navigator;\r\n\tdocument: any; // = document;\r\n\twindow: any; // = window;\r\n\tconstructor(@Inject(PLATFORM_ID) private platformId: boolean) {\r\n\t\tthis.ssr = isPlatformServer(this.platformId);\r\n\r\n\t\tif (isPlatformServer(this.platformId)) {\r\n\t\t\tthis.localStorage = {\r\n\t\t\t\tgetItem: () => {},\r\n\t\t\t\tsetItem: () => {},\r\n\t\t\t\tremoveItem: () => {},\r\n\t\t\t\tclear: () => {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.document = {\r\n\t\t\t\tquerySelectorAll: () => {},\r\n\t\t\t\taddEventListener: () => {},\r\n\t\t\t\tremoveEventListener: () => {},\r\n\t\t\t\tdocumentElement: {},\r\n\t\t\t\tbody: {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.window = {\r\n\t\t\t\tlocation: {\r\n\t\t\t\t\thost: '',\r\n\t\t\t\t},\r\n\t\t\t\taddEventListener: () => {},\r\n\t\t\t\tremoveEventListener: () => {},\r\n\t\t\t\tsetTimeout: () => {},\r\n\t\t\t};\r\n\r\n\t\t\tthis.navigator = {\r\n\t\t\t\tuserAgent: '',\r\n\t\t\t\tplatform: '',\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.localStorage = localStorage;\r\n\r\n\t\t\tthis.document = document;\r\n\r\n\t\t\tthis.window = window;\r\n\r\n\t\t\tthis.navigator = navigator;\r\n\t\t}\r\n\r\n\t\tthis.detectDevice();\r\n\t}\r\n\r\n\t/**\r\n\t * Converts an object to an array. Optionally holds keys instead of values.\r\n\t *\r\n\t * @param {any} obj - The object to be converted.\r\n\t * @param {boolean} [holder=false] - If true, the keys will be held in the array; otherwise, the values will be held.\r\n\t * @returns {any[]} The resulting array.\r\n\t */\r\n\tota(obj: any, holder: boolean = false): any[] {\r\n\t\tif (Array.isArray(obj)) return obj;\r\n\t\tif (typeof obj !== 'object' || obj === null) return [];\r\n\t\tconst arr = [];\r\n\t\tfor (const each in obj) {\r\n\t\t\tif (\r\n\t\t\t\tobj.hasOwnProperty(each) &&\r\n\t\t\t\t(obj[each] ||\r\n\t\t\t\t\ttypeof obj[each] === 'number' ||\r\n\t\t\t\t\ttypeof obj[each] === 'boolean')\r\n\t\t\t) {\r\n\t\t\t\tif (holder) {\r\n\t\t\t\t\tarr.push(each);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tarr.push(obj[each]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes elements from `fromArray` that are present in `removeArray` based on a comparison field.\r\n\t *\r\n\t * @param {any[]} removeArray - The array of elements to remove.\r\n\t * @param {any[]} fromArray - The array from which to remove elements.\r\n\t * @param {string} [compareField='_id'] - The field to use for comparison.\r\n\t * @returns {any[]} The modified `fromArray` with elements removed.\r\n\t */\r\n\tsplice(\r\n\t\tremoveArray: any[],\r\n\t\tfromArray: any[],\r\n\t\tcompareField: string = '_id'\r\n\t): any[] {\r\n\t\tif (!Array.isArray(removeArray) || !Array.isArray(fromArray)) {\r\n\t\t\treturn fromArray;\r\n\t\t}\r\n\r\n\t\tconst removeSet = new Set(\r\n\t\t\tremoveArray.map((item) => item[compareField])\r\n\t\t);\r\n\t\treturn fromArray.filter((item) => !removeSet.has(item[compareField]));\r\n\t}\r\n\r\n\t/**\r\n\t * Unites multiple _id values into a single unique _id.\r\n\t * The resulting _id is unique regardless of the order of the input _id values.\r\n\t *\r\n\t * @param {...string[]} args - The _id values to be united.\r\n\t * @returns {string} The unique combined _id.\r\n\t */\r\n\tids2id(...args: string[]): string {\r\n\t\targs.sort((a, b) => {\r\n\t\t\tif (\r\n\t\t\t\tNumber(a.toString().substring(0, 8)) >\r\n\t\t\t\tNumber(b.toString().substring(0, 8))\r\n\t\t\t) {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t});\r\n\r\n\t\treturn args.join();\r\n\t}\r\n\r\n\t// After While\r\n\tprivate _afterWhile: Record<string, number> = {};\r\n\t/**\r\n\t * Delays the execution of a callback function for a specified amount of time.\r\n\t * If called again within that time, the timer resets.\r\n\t *\r\n\t * @param {string | object | (() => void)} doc - A unique identifier for the timer, an object to host the timer, or the callback function.\r\n\t * @param {() => void} [cb] - The callback function to execute after the delay.\r\n\t * @param {number} [time=1000] - The delay time in milliseconds.\r\n\t */\r\n\tafterWhile(\r\n\t\tdoc: string | object | (() => void),\r\n\t\tcb?: () => void,\r\n\t\ttime: number = 1000\r\n\t): void {\r\n\t\tif (typeof doc === 'function') {\r\n\t\t\tcb = doc as () => void;\r\n\t\t\tdoc = 'common';\r\n\t\t}\r\n\r\n\t\tif (typeof cb === 'function' && typeof time === 'number') {\r\n\t\t\tif (typeof doc === 'string') {\r\n\t\t\t\tclearTimeout(this._afterWhile[doc]);\r\n\t\t\t\tthis._afterWhile[doc] = this.window.setTimeout(cb, time);\r\n\t\t\t} else if (typeof doc === 'object') {\r\n\t\t\t\tclearTimeout((doc as { __afterWhile: number }).__afterWhile);\r\n\t\t\t\t(doc as { __afterWhile: number }).__afterWhile =\r\n\t\t\t\t\tthis.window.setTimeout(cb, time);\r\n\t\t\t} else {\r\n\t\t\t\tconsole.warn('badly configured after while');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Recursively copies properties from one object to another.\r\n\t * Handles nested objects, arrays, and Date instances appropriately.\r\n\t *\r\n\t * @param from - The source object from which properties are copied.\r\n\t * @param to - The target object to which properties are copied.\r\n\t */\r\n\tcopy(from: any, to: any) {\r\n\t\tfor (const each in from) {\r\n\t\t\tif (\r\n\t\t\t\ttypeof from[each] !== 'object' ||\r\n\t\t\t\tfrom[each] instanceof Date ||\r\n\t\t\t\tArray.isArray(from[each]) ||\r\n\t\t\t\tfrom[each] === null\r\n\t\t\t) {\r\n\t\t\t\tto[each] = from[each];\r\n\t\t\t} else {\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof to[each] !== 'object' ||\r\n\t\t\t\t\tto[each] instanceof Date ||\r\n\t\t\t\t\tArray.isArray(to[each]) ||\r\n\t\t\t\t\tto[each] === null\r\n\t\t\t\t) {\r\n\t\t\t\t\tto[each] = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.copy(from[each], to[each]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Device management\r\n\tdevice: string = '';\r\n\t/**\r\n\t * Detects the device type based on the user agent.\r\n\t */\r\n\tdetectDevice(): void {\r\n\t\tconst userAgent =\r\n\t\t\tthis.navigator.userAgent ||\r\n\t\t\tthis.navigator.vendor ||\r\n\t\t\t(this.window as any).opera;\r\n\t\tif (/windows phone/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Windows Phone';\r\n\t\t} else if (/android/i.test(userAgent)) {\r\n\t\t\tthis.device = 'Android';\r\n\t\t} else if (\r\n\t\t\t/iPad|iPhone|iPod/.test(userAgent) &&\r\n\t\t\t!(this.window as any).MSStream\r\n\t\t) {\r\n\t\t\tthis.device = 'iOS';\r\n\t\t} else {\r\n\t\t\tthis.device = 'Web';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a mobile device.\r\n\t * @returns {boolean} - Returns true if the device is a mobile device.\r\n\t */\r\n\tisMobile(): boolean {\r\n\t\treturn (\r\n\t\t\tthis.device === 'Windows Phone' ||\r\n\t\t\tthis.device === 'Android' ||\r\n\t\t\tthis.device === 'iOS'\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a tablet.\r\n\t * @returns {boolean} - Returns true if the device is a tablet.\r\n\t */\r\n\tisTablet(): boolean {\r\n\t\treturn this.device === 'iOS' && /iPad/.test(navigator.userAgent);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is a web browser.\r\n\t * @returns {boolean} - Returns true if the device is a web browser.\r\n\t */\r\n\tisWeb(): boolean {\r\n\t\treturn this.device === 'Web';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an Android device.\r\n\t * @returns {boolean} - Returns true if the device is an Android device.\r\n\t */\r\n\tisAndroid(): boolean {\r\n\t\treturn this.device === 'Android';\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the device is an iOS device.\r\n\t * @returns {boolean} - Returns true if the device is an iOS device.\r\n\t */\r\n\tisIos(): boolean {\r\n\t\treturn this.device === 'iOS';\r\n\t}\r\n\r\n\t// Version management\r\n\tversion = '1.0.0';\r\n\tappVersion = '';\r\n\tdateVersion = '';\r\n\t/**\r\n\t * Sets the combined version string based on appVersion and dateVersion.\r\n\t */\r\n\tsetVersion(): void {\r\n\t\tthis.version = this.appVersion || '';\r\n\t\tthis.version += this.version && this.dateVersion ? ' ' : '';\r\n\t\tthis.version += this.dateVersion || '';\r\n\t}\r\n\t/**\r\n\t * Sets the app version and updates the combined version string.\r\n\t *\r\n\t * @param {string} appVersion - The application version to set.\r\n\t */\r\n\tsetAppVersion(appVersion: string): void {\r\n\t\tthis.appVersion = appVersion;\r\n\t\tthis.setVersion();\r\n\t}\r\n\t/**\r\n\t * Sets the date version and updates the combined version string.\r\n\t *\r\n\t * @param {string} dateVersion - The date version to set.\r\n\t */\r\n\tsetDateVersion(dateVersion: string): void {\r\n\t\tthis.dateVersion = dateVersion;\r\n\t\tthis.setVersion();\r\n\t}\r\n\r\n\t// Signal management\r\n\tprivate _signals: Record<string, Subject<any>> = {};\r\n\r\n\t/**\r\n\t * Emits a signal, optionally passing data to the listeners.\r\n\t * @param signal - The name of the signal to emit.\r\n\t * @param data - Optional data to pass to the listeners.\r\n\t */\r\n\temit(signal: string, data?: any): void {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\tthis._signals[signal].next(data);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an Observable that emits values when the specified signal is emitted.\r\n\t * Multiple components or services can subscribe to this Observable to be notified of the signal.\r\n\t * @param signal - The name of the signal to listen for.\r\n\t * @returns An Observable that emits when the signal is emitted.\r\n\t */\r\n\ton(signal: string): Observable<any> {\r\n\t\tif (!this._signals[signal]) {\r\n\t\t\tthis._signals[signal] = new Subject<any>();\r\n\t\t}\r\n\r\n\t\treturn this._signals[signal].asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Completes the Subject for a specific signal, effectively stopping any future emissions.\r\n\t * This also unsubscribes all listeners for the signal.\r\n\t * @param signal - The name of the signal to stop.\r\n\t */\r\n\toff(signal: string): void {\r\n\t\tif (!this._signals[signal]) return;\r\n\t\tthis._signals[signal].complete();\r\n\t\tdelete this._signals[signal];\r\n\t}\r\n\r\n\t// Await management\r\n\tprivate _completed: Record<string, boolean> = {};\r\n\tprivate _completeResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Marks a task as complete.\r\n\t * @param task - The task to mark as complete, identified by a string.\r\n\t */\r\n\tcomplete(task: string): void {\r\n\t\tthis._completed[task] = true;\r\n\t\tif (this._completeResolvers[task]) {\r\n\t\t\tthis._completeResolvers[task].forEach((resolve) => resolve());\r\n\t\t\tthis._completeResolvers[task] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified task is complete.\r\n\t * @param task - The task to watch for completion, identified by a string.\r\n\t * @returns A Promise that resolves when the task is complete.\r\n\t */\r\n\tonComplete(task: string): Promise<void> {\r\n\t\tif (this._completed[task]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._completeResolvers[task]) {\r\n\t\t\t\tthis._completeResolvers[task] = [];\r\n\t\t\t}\r\n\t\t\tthis._completeResolvers[task].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a task is completed.\r\n\t * @param task - The task to check, identified by a string.\r\n\t * @returns True if the task is completed, false otherwise.\r\n\t */\r\n\tcompleted(task: string): boolean {\r\n\t\treturn !!this._completed[task];\r\n\t}\r\n\r\n\t// Locking management\r\n\tprivate _locked: Record<string, boolean> = {};\r\n\tprivate _unlockResolvers: Record<string, (() => void)[]> = {};\r\n\r\n\t/**\r\n\t * Locks a resource to prevent concurrent access.\r\n\t * @param which - The resource to lock, identified by a string.\r\n\t */\r\n\tlock(which: string): void {\r\n\t\tthis._locked[which] = true;\r\n\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Unlocks a resource, allowing access.\r\n\t * @param which - The resource to unlock, identified by a string.\r\n\t */\r\n\tunlock(which: string): void {\r\n\t\tthis._locked[which] = false;\r\n\t\tif (this._unlockResolvers[which]) {\r\n\t\t\tthis._unlockResolvers[which].forEach((resolve) => resolve());\r\n\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a Promise that resolves when the specified resource is unlocked.\r\n\t * @param which - The resource to watch for unlocking, identified by a string.\r\n\t * @returns A Promise that resolves when the resource is unlocked.\r\n\t */\r\n\tonUnlock(which: string): Promise<void> {\r\n\t\tif (!this._locked[which]) {\r\n\t\t\treturn Promise.resolve();\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tif (!this._unlockResolvers[which]) {\r\n\t\t\t\tthis._unlockResolvers[which] = [];\r\n\t\t\t}\r\n\t\t\tthis._unlockResolvers[which].push(resolve);\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a resource is locked.\r\n\t * @param which - The resource to check, identified by a string.\r\n\t * @returns True if the resource is locked, false otherwise.\r\n\t */\r\n\tlocked(which: string): boolean {\r\n\t\treturn !!this._locked[which];\r\n\t}\r\n}\r\n","import { Inject, Injectable, Optional } from '@angular/core';\r\nimport { Title, Meta } from '@angular/platform-browser';\r\nimport { Router, Route } from '@angular/router';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { CoreService } from './core.service';\r\n\r\nconst isDefined = (val: any) => typeof val !== 'undefined';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MetaService {\r\n\tprivate _meta: any;\r\n\r\n\tconstructor(\r\n\t\tprivate router: Router,\r\n\t\tprivate meta: Meta,\r\n\t\tprivate core: CoreService,\r\n\t\tprivate titleService: Title,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\t\tthis._meta = this.config.meta || {};\r\n\t\tthis._warnMissingGuard();\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the default meta tags.\r\n\t *\r\n\t * @param defaults - The default meta tags.\r\n\t */\r\n\tsetDefaults(defaults: { [key: string]: string }): void {\r\n\t\tthis._meta.defaults = defaults;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the title and optional title suffix.\r\n\t *\r\n\t * @param title - The title to set.\r\n\t * @param titleSuffix - The title suffix to append.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTitle(title?: string, titleSuffix?: string): MetaService {\r\n\t\tlet titleContent = isDefined(title)\r\n\t\t\t? title\r\n\t\t\t: this._meta.defaults['title'] || '';\r\n\t\tif (this._meta.useTitleSuffix) {\r\n\t\t\ttitleContent += isDefined(titleSuffix)\r\n\t\t\t\t? titleSuffix\r\n\t\t\t\t: this._meta.defaults['titleSuffix'] || '';\r\n\t\t}\r\n\t\tthis._updateMetaTag('title', titleContent);\r\n\t\tthis._updateMetaTag('og:title', titleContent);\r\n\t\tthis.titleService.setTitle(titleContent);\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets link tags.\r\n\t *\r\n\t * @param links - The links to set.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetLink(links: { [key: string]: string }): MetaService {\r\n\t\tObject.keys(links).forEach((rel) => {\r\n\t\t\tlet link: HTMLLinkElement =\r\n\t\t\t\tthis.core.document.createElement('link');\r\n\t\t\tlink.setAttribute('rel', rel);\r\n\t\t\tlink.setAttribute('href', links[rel]);\r\n\t\t\tthis.core.document.head.appendChild(link);\r\n\t\t});\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t * @returns The MetaService instance.\r\n\t */\r\n\tsetTag(tag: string, value: string, prop?: string): MetaService {\r\n\t\tif (tag === 'title' || tag === 'titleSuffix') {\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Attempt to set ${tag} through 'setTag': 'title' and 'titleSuffix' are reserved tag names. Please use 'MetaService.setTitle' instead`\r\n\t\t\t);\r\n\t\t}\r\n\t\tconst content = isDefined(value)\r\n\t\t\t? value\r\n\t\t\t: this._meta.defaults[tag] || '';\r\n\t\tthis._updateMetaTag(tag, content, prop);\r\n\t\tif (tag === 'description') {\r\n\t\t\tthis._updateMetaTag('og:description', content, prop);\r\n\t\t\tthis._updateMetaTag('twitter:description', content, prop);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param value - The meta tag value.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tprivate _updateMetaTag(tag: string, value: string, prop?: string): void {\r\n\t\tprop =\r\n\t\t\tprop ||\r\n\t\t\t(tag.startsWith('og:') || tag.startsWith('twitter:')\r\n\t\t\t\t? 'property'\r\n\t\t\t\t: 'name');\r\n\t\tthis.meta.updateTag({ [prop]: tag, content: value });\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a meta tag.\r\n\t *\r\n\t * @param tag - The meta tag name.\r\n\t * @param prop - The meta tag property.\r\n\t */\r\n\tremoveTag(tag: string, prop?: string): void {\r\n\t\tprop =\r\n\t\t\tprop ||\r\n\t\t\t(tag.startsWith('og:') || tag.startsWith('twitter:')\r\n\t\t\t\t? 'property'\r\n\t\t\t\t: 'name');\r\n\t\tthis.meta.removeTag(`${prop}=\"${tag}\"`);\r\n\t}\r\n\r\n\t/**\r\n\t * Warns about missing meta guards in routes.\r\n\t */\r\n\tprivate _warnMissingGuard(): void {\r\n\t\tif (\r\n\t\t\tisDefined(this._meta.warnMissingGuard) &&\r\n\t\t\t!this._meta.warnMissingGuard\r\n\t\t) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst hasDefaultMeta = !!Object.keys(this._meta.defaults).length;\r\n\t\tconst hasMetaGuardInArr = (it: any) =>\r\n\t\t\tit && it.IDENTIFIER === 'MetaGuard';\r\n\t\tlet hasShownWarnings = false;\r\n\t\tthis.router.config.forEach((route: Route) => {\r\n\t\t\tconst hasRouteMeta = route.data && route.data['meta'];\r\n\t\t\tconst showWarning =\r\n\t\t\t\t!isDefined(route.redirectTo) &&\r\n\t\t\t\t(hasDefaultMeta || hasRouteMeta) &&\r\n\t\t\t\t!(route.canActivate || []).some(hasMetaGuardInArr);\r\n\t\t\tif (showWarning) {\r\n\t\t\t\tconsole.warn(\r\n\t\t\t\t\t`Route with path \"${route.path}\" has ${\r\n\t\t\t\t\t\thasRouteMeta ? '' : 'default '\r\n\t\t\t\t\t}meta tags, but does not use MetaGuard. Please add MetaGuard to the canActivate array in your route configuration`\r\n\t\t\t\t);\r\n\t\t\t\thasShownWarnings = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (hasShownWarnings) {\r\n\t\t\tconsole.warn(\r\n\t\t\t\t`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { MetaService } from '../services/meta.service';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\n\r\n@Injectable()\r\nexport class MetaGuard {\r\n\tpublic static IDENTIFIER = 'MetaGuard';\r\n\tprivate _meta: any;\r\n\tpublic constructor(\r\n\t\tprivate metaService: MetaService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tthis._meta = config.meta;\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t}\r\n\tpublic canActivate(\r\n\t\troute: ActivatedRouteSnapshot,\r\n\t\tstate: RouterStateSnapshot\r\n\t): boolean {\r\n\t\tthis._processRouteMetaTags(route.data && route.data['meta']);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _processRouteMetaTags(meta: any = {}) {\r\n\t\tif (meta.disableUpdate) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (meta.title) {\r\n\t\t\tthis.metaService.setTitle(meta.title, meta.titleSuffix);\r\n\t\t}\r\n\t\tif (Array.isArray(meta.links)) {\r\n\t\t\tthis.metaService.setLink(meta.links);\r\n\t\t} else if (typeof meta.links === 'string') {\r\n\t\t\tthis.metaService.setLink(meta.links.split(' '));\r\n\t\t}\r\n\t\tif (Array.isArray(this._meta.defaults?.links)) {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links);\r\n\t\t} else if (typeof this._meta.defaults?.links === 'string') {\r\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links.split(' '));\r\n\t\t}\r\n\t\tObject.keys(meta).forEach((prop) => {\r\n\t\t\tif (\r\n\t\t\t\tprop === 'title' ||\r\n\t\t\t\tprop === 'titleSuffix' ||\r\n\t\t\t\tprop === 'links'\r\n\t\t\t) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tObject.keys(meta[prop]).forEach((key) => {\r\n\t\t\t\tthis.metaService.setTag(key, meta[prop][key], prop);\r\n\t\t\t});\r\n\t\t});\r\n\t\tObject.keys(this._meta.defaults).forEach((key) => {\r\n\t\t\tif (\r\n\t\t\t\tkey in meta ||\r\n\t\t\t\tkey === 'title' ||\r\n\t\t\t\tkey === 'titleSuffix' ||\r\n\t\t\t\tkey === 'links'\r\n\t\t\t) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.metaService.setTag(key, this._meta.defaults[key]);\r\n\t\t});\r\n\t}\r\n}\r\n","import { Component, ViewChild } from '@angular/core';\r\nimport { CoreService } from '../../services/core.service';\r\n\r\n@Component({\r\n\tselector: 'alert',\r\n\ttemplateUrl: './alert.component.html',\r\n\tstyleUrls: ['./alert.component.scss'],\r\n\tstandalone: false,\r\n})\r\nexport class AlertComponent {\r\n\t@ViewChild('alert', { static: false }) alert: any;\r\n\tcomponent: any;\r\n\ttext: string = '';\r\n\tclass: string = '';\r\n\ttype: string = 'info';\r\n\tprogress: boolean = true;\r\n\tposition: string = 'bottomRight'; // [bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter or center]\r\n\ticon: string = '';\r\n\ttimeout: any = 5000;\r\n\tclose: any;\r\n\tclosable: any = true;\r\n\tbuttons: any = []; /*[{text, callback}]*/\r\n\r\n\tconstructor(public core: CoreService) {\r\n\t\tsetTimeout(() => {\r\n\t\t\tif (this.timeout) {\r\n\t\t\t\tlet remaining = JSON.parse(JSON.stringify(this.timeout));\r\n\t\t\t\tlet timer = setTimeout(() => {\r\n\t\t\t\t\tthis.remove();\r\n\t\t\t\t}, remaining);\r\n\t\t\t\tlet start = new Date();\r\n\t\t\t\tthis.alert.nativeElement.addEventListener(\r\n\t\t\t\t\t'mouseenter',\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tclearTimeout(timer);\r\n\t\t\t\t\t\tremaining -= new Date().getTime() - start.getTime();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t\tthis.alert.nativeElement.addEventListener(\r\n\t\t\t\t\t'mouseleave',\r\n\t\t\t\t\t() => {\r\n\t\t\t\t\t\tstart = new Date();\r\n\t\t\t\t\t\tclearTimeout(timer);\r\n\t\t\t\t\t\ttimer = core.window.setTimeout(() => {\r\n\t\t\t\t\t\t\tthis.remove();\r\n\t\t\t\t\t\t}, remaining);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfalse\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\tpublic delete_animation = false;\r\n\tremove() {\r\n\t\tthis.delete_animation = true;\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.close();\r\n\t\t\tthis.delete_animation = false;\r\n\t\t}, 350);\r\n\t}\r\n}\r\n","<div\r\n\t*ngIf=\"text\"\r\n\t[ngClass]=\"class\"\r\n\tclass=\"waw-alert-container height\"\r\n\t[class._close]=\"delete_animation\"\r\n>\r\n\t<div\r\n\t\t[class.waw-alert-color-blue]=\"type == 'info'\"\r\n\t\t[class.waw-alert-color-red]=\"type == 'error'\"\r\n\t\t[class.waw-alert-color-green]=\"type == 'success'\"\r\n\t\t[class.waw-alert-color-orange]=\"type == 'warning'\"\r\n\t\t[class.waw-alert-color-yellow]=\"type == 'question'\"\r\n\t\tclass=\"waw-alert bounceInUp waw-alert-theme-light waw-alert-animateInside waw-alert-opened\"\r\n\t\t#alert\r\n\t>\r\n\t\t<div class=\"waw-alert__progress\" *ngIf=\"progress\">\r\n\t\t\t<span\r\n\t\t\t\t[ngStyle]=\"{\r\n\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's'\r\n\t\t\t\t}\"\r\n\t\t\t></span>\r\n\t\t</div>\r\n\t\t<div class=\"waw-alert-body\">\r\n\t\t\t<div *ngIf=\"!component\" class=\"waw-alert-texts\">\r\n\t\t\t\t<div *ngIf=\"icon\" class=\"{{ icon }}\"></div>\r\n\t\t\t\t<div class=\"waw-alert-message slideIn\">{{ text }}</div>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"!component && type == 'question'\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tclass=\"alert-btn\"\r\n\t\t\t\t\t*ngFor=\"let b of buttons\"\r\n\t\t\t\t\t(click)=\"remove(); b.callback && b.callback()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ b.text }}\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"waw-alert__close\"\r\n\t\t\t\t*ngIf=\"closable\"\r\n\t\t\t\t(click)=\"remove()\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n","import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-modal',\r\n\ttemplateUrl: './modal.component.html',\r\n\tstyleUrls: ['./modal.component.scss'],\r\n\tstandalone: false,\r\n})\r\nexport class ModalComponent implements OnInit {\r\n\tclass: string = '';\r\n\tsize: string = 'flex';\r\n\tclosable: boolean = true;\r\n\tclose: any;\r\n\tonOpen: any;\r\n\ttimestart: any;\r\n\ttimeout: any;\r\n\tshowModal = false;\r\n\tallowClose = true;\r\n\tonClickOutside: any;\r\n\tngOnInit() {\r\n\t\tif (typeof this.onClickOutside !== 'function') {\r\n\t\t\tthis.onClickOutside = this.close;\r\n\t\t\t// this.onClickOutside = () => {\r\n\t\t\t// \tif (this.allowClose) {\r\n\t\t\t// \t\tthis.close();\r\n\t\t\t// \t}\r\n\r\n\t\t\t// \tthis.allowClose = true;\r\n\t\t\t// };\r\n\t\t}\r\n\r\n\t\tif (typeof this.onOpen == 'function') this.onOpen();\r\n\r\n\t\twindow.addEventListener('popstate', this.popStateListener.bind(this));\r\n\t}\r\n\r\n\tngAfterViewInit() {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis.showModal = true;\r\n\t\t}, this.timestart || 0);\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\twindow.removeEventListener(\r\n\t\t\t'popstate',\r\n\t\t\tthis.popStateListener.bind(this)\r\n\t\t);\r\n\t}\r\n\r\n\tpopStateListener(e: Event) {\r\n\t\tthis.close();\r\n\t}\r\n}\r\n","<div\r\n\t[hidden]=\"!showModal\"\r\n\tclass=\"modal\"\r\n\t[ngClass]=\"class + ' ' + size\"\r\n\t(click)=\"onClickOutside()\"\r\n>\r\n\t<!-- (click)=\"$event.stopPropagation()\" -->\r\n\t<!-- <div class=\"modal-content\" (mousedown)=\"allowClose = false\"> -->\r\n\t<div class=\"modal-content\" (click)=\"$event.stopPropagation()\">\r\n\t\t<div><!-- Content Will Drop Here --></div>\r\n\t\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t</div>\r\n</div>\r\n","import { Component, ViewChild } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-loader',\r\n\ttemplateUrl: './loader.component.html',\r\n\tstyleUrls: ['./loader.component.scss'],\r\n\tstandalone: false,\r\n})\r\nexport class LoaderComponent {\r\n\t@ViewChild('loader', { static: false }) loader: any;\r\n\tpublic text: string = 'Loading';\r\n\tpublic class: string = '';\r\n\tpublic progress: boolean = true;\r\n\tpublic timeout: number = 5000;\r\n\tpublic close: any;\r\n\tpublic closable: any = true;\r\n\tconstructor() {}\r\n\tngOnInit() {\r\n\t\tif (this.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.close();\r\n\t\t\t}, this.timeout);\r\n\t\t}\r\n\t}\r\n}\r\n","<div\r\n\tstyle=\"\r\n\t\tposition: fixed;\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t\tleft: 0;\r\n\t\ttop: 0;\r\n\t\tbackground-color: #334d6e;\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t\tz-index: 999999;\r\n\t\"\r\n\t#loader\r\n>\r\n\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">×</span>\r\n\t<span style=\"font-size: 30px; color: white\">\r\n\t\t{{ text }}\r\n\t</span>\r\n</div>\r\n","/**\n * BaseComponent is an abstract class that provides basic functionality for managing the current timestamp.\n */\nexport abstract class BaseComponent {\n\t/**\n\t * The current timestamp in milliseconds since the Unix epoch.\n\t */\n\tnow = new Date().getTime();\n\n\t/**\n\t * Refreshes the `now` property with the current timestamp.\n\t */\n\trefreshNow(): void {\n\t\tthis.now = new Date().getTime();\n\t}\n}\n","import { CrudDocument } from '../interfaces/crud.interface';\r\nimport { CoreService } from '../services/core.service';\r\nimport { CrudService } from '../services/crud.service';\r\nimport { BaseComponent } from './base.component';\r\n\r\n/**\r\n * Form interface defines the structure for a form that handles document operations.\r\n * It includes a method `modalDocs` that processes an array of documents and returns a promise.\r\n */\r\ninterface Form {\r\n\t/**\r\n\t * Processes an array of documents and returns a promise with processed documents.\r\n\t *\r\n\t * @param docs The documents to be processed.\r\n\t * @returns A promise that resolves with the processed documents.\r\n\t */\r\n\tmodalDocs<Document>(docs: Document[]): Promise<Document[]>;\r\n}\r\n\r\n/**\r\n * CrudComponent is an abstract class that extends BaseComponent and provides CRUD functionality for managing documents.\r\n * It interacts with a CrudService to create, read, update, or delete documents.\r\n *\r\n * @template Service - The service class that extends CrudService for managing documents.\r\n * @template Document - The type of the document that the component works with.\r\n */\r\nexport abstract class CrudComponent<\r\n\tService extends CrudService<Document>,\r\n\tDocument extends CrudDocument\r\n> extends BaseComponent {\r\n\t/**\r\n\t * A getter that returns the list of documents by calling `getDocs()` from the service.\r\n\t *\r\n\t * @returns An array of documents.\r\n\t */\r\n\tget rows(): Document[] {\r\n\t\treturn this.__service.getDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Columns to be displayed for the document list, defaulting to 'name' and 'description'.\r\n\t */\r\n\tcolumns = ['name', 'description'];\r\n\r\n\t/**\r\n\t * Constructor for initializing the CrudComponent.\r\n\t *\r\n\t * @param __service The service instance for interacting with the document data (e.g., CRUD operations).\r\n\t * @param __core The core service providing utility methods.\r\n\t * @param __form The form interface used for handling document processing.\r\n\t */\r\n\tconstructor(\r\n\t\tprivate __service: Service,\r\n\t\tprivate __core: CoreService,\r\n\t\tprivate __form: unknown\r\n\t) {\r\n\t\tsuper();\r\n\t}\r\n\r\n\t/**\r\n\t * Performs bulk management of documents by creating, updating, or deleting them.\r\n\t *\r\n\t * If `create` is true, it creates new documents. If false, it compares documents\r\n\t * and deletes or updates them accordingly.\r\n\t *\r\n\t * @param create If true, new documents will be created; otherwise, updates or deletions will be performed.\r\n\t * @returns A function that handles bulk document operations.\r\n\t */\r\n\tbulkManagement(create = true): () => void {\r\n\t\treturn (): void => {\r\n\t\t\t// Call the modalDocs method from the __form interface to process the documents.\r\n\t\t\t(this.__form as Form)\r\n\t\t\t\t.modalDocs<Document>(create ? [] : this.rows)\r\n\t\t\t\t.then((docs: Document[]) => {\r\n\t\t\t\t\tif (create) {\r\n\t\t\t\t\t\t// Create new documents\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tthis.preCreate(doc); // Prepare document for creation\r\n\r\n\t\t\t\t\t\t\tthis.__service.create(doc); // Call the service to create the document\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Delete documents that are no longer present\r\n\t\t\t\t\t\tfor (const doc of this.rows) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t!docs.find(\r\n\t\t\t\t\t\t\t\t\t(localDoc) => localDoc._id === doc._id\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tthis.__service.delete(doc); // Delete document from the service\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Update existing documents or create new ones if not found\r\n\t\t\t\t\t\tfor (const doc of docs) {\r\n\t\t\t\t\t\t\tconst localDoc = this.rows.find(\r\n\t\t\t\t\t\t\t\t(localDoc) => localDoc._id === doc._id\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\tif (localDoc) {\r\n\t\t\t\t\t\t\t\t// Update the document if it exists locally\r\n\t\t\t\t\t\t\t\tthis.__core.copy(doc, localDoc);\r\n\r\n\t\t\t\t\t\t\t\tthis.__service.update(localDoc); // Call the service to update the document\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.preCreate(doc); // Prepare document for creation\r\n\r\n\t\t\t\t\t\t\t\tthis.__service.create(doc); // Call the service to create the new document\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Prepares a document before creation by deleting the `__created` property.\r\n\t *\r\n\t * @param doc The document to be prepared for creation.\r\n\t */\r\n\tpreCreate(doc: Document): void {\r\n\t\tdelete doc.__created;\r\n\t}\r\n}\r\n","import {\r\n\tDirective,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tOutput,\r\n\tHostListener,\r\n} from '@angular/core';\r\n\r\n@Directive({\r\n\tselector: '[clickOutside]',\r\n\tstandalone: false,\r\n})\r\nexport class ClickOutsideDirective {\r\n\t@Output() clickOutside: EventEmitter<Event> = new EventEmitter<Event>();\r\n\r\n\tconstructor(private elementRef: ElementRef) {}\r\n\r\n\t@HostListener('document:click', ['$event'])\r\n\tonClick(event: Event): void {\r\n\t\tconst clickedInside = this.elementRef.nativeElement.contains(\r\n\t\t\tevent.target\r\n\t\t);\r\n\t\tif (!clickedInside) {\r\n\t\t\tthis.clickOutside.emit(event);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'arr',\r\n\tstandalone: false,\r\n})\r\nexport class ArrPipe implements PipeTransform {\r\n\ttransform(data: any, type?: any, refresh?: any): any {\r\n\t\tif (!data) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tif (typeof data == 'string') return data.split(type || ' ');\r\n\t\tif (Array.isArray(data)) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\t\tif (typeof data != 'object') {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t\tlet arr = [];\r\n\t\tfor (let each in data) {\r\n\t\t\tif (!data[each]) continue;\r\n\t\t\tif (type == 'prop') {\r\n\t\t\t\tarr.push(each);\r\n\t\t\t} else if (type == 'value') {\r\n\t\t\t\tarr.push(data[each]);\r\n\t\t\t} else {\r\n\t\t\t\tarr.push({\r\n\t\t\t\t\tprop: each,\r\n\t\t\t\t\tvalue: data[each],\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'mongodate',\r\n\tstandalone: false,\r\n})\r\nexport class MongodatePipe implements PipeTransform {\r\n\ttransform(_id: any) {\r\n\t\tif (!_id) return new Date();\r\n\t\tlet timestamp = _id.toString().substring(0, 8);\r\n\t\treturn new Date(parseInt(timestamp, 16) * 1000);\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'page',\r\n\tpure: false,\r\n\tstandalone: false,\r\n})\r\nexport class PaginationPipe implements PipeTransform {\r\n\ttransform(arr: any, config: any, sort: any, search = ''): any {\r\n\t\tif (!Array.isArray(arr)) return [];\r\n\t\tarr = arr.slice();\r\n\t\tfor (let i = 0; i < arr.length; i++) {\r\n\t\t\tarr[i].num = i + 1;\r\n\t\t}\r\n\t\tif (sort.direction) {\r\n\t\t\tarr.sort((a: any, b: any) => {\r\n\t\t\t\tif (a[sort.title] < b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? 1 : -1;\r\n\t\t\t\t}\r\n\t\t\t\tif (a[sort.title] > b[sort.title]) {\r\n\t\t\t\t\treturn sort.direction == 'desc' ? -1 : 1;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn arr.slice(\r\n\t\t\t(config.page - 1) * config.perPage,\r\n\t\t\tconfig.page * config.perPage\r\n\t\t);\r\n\t}\r\n}\r\n","import { Pipe } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n@Pipe({\r\n\tname: 'safe',\r\n\tstandalone: false,\r\n})\r\nexport class SafePipe {\r\n\tconstructor(private sanitizer: DomSanitizer) {}\r\n\ttransform(html: any) {\r\n\t\treturn this.sanitizer.bypassSecurityTrustResourceUrl(html);\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n/*\r\n *\tAuthor: Honchar Denys\r\n *\tSearch for any content in any type of given documents\r\n *\tAlways returning an array, even if nothing is provided\r\n */\r\n@Pipe({\r\n\tname: 'search',\r\n\tstandalone: false,\r\n})\r\nexport class SearchPipe implements PipeTransform {\r\n\tprivate c = 0;\r\n\t// transform(given: any, search?: any, fields?: any, l?: any, i?: any, reload?: any): any {\r\n\ttransform(\r\n\t\tgiven: any,\r\n\t\ts?: any,\r\n\t\tf?: any,\r\n\t\tl?: any,\r\n\t\ti?: any,\r\n\t\treload?: any\r\n\t): any {\r\n\t\t// given stands for the provided array with docs\r\n\t\t// s stands for search\r\n\t\t// f stands for fields\r\n\t\t// l stands for limit\r\n\t\t// i stands for ignore filter\r\n\t\t// start stands for start the limit\r\n\t\tif (!s) {\r\n\t\t\treturn given;\r\n\t\t}\r\n\t\tif (typeof f == 'number') {\r\n\t\t\tl = f;\r\n\t\t\tf = null;\r\n\t\t}\r\n\t\tif (i || !s) {\r\n\t\t\tif (l && Array.isArray(given)) return given.slice(0, l);\r\n\t\t\telse return given || [];\r\n\t\t}\r\n\t\tlet _arr: any = [],\r\n\t\t\t_check: any = {};\r\n\t\tif (!Array.isArray(s) && typeof s == 'object') {\r\n\t\t\tlet _s = [];\r\n\t\t\tfor (let key in s) {\r\n\t\t\t\tif (s[key]) _s.push(key);\r\n\t\t\t}\r\n\t\t\ts = _s;\r\n\t\t}\r\n\t\tif (typeof s == 'string') {\r\n\t\t\ts = [s];\r\n\t\t}\r\n\t\tif (!f) f = ['name'];\r\n\t\tif (typeof f == 'string') f = f.split(' ');\r\n\t\tlet sub_test = function (\r\n\t\t\tobj: any,\r\n\t\t\t_f: any,\r\n\t\t\tinitObj: any,\r\n\t\t\tcheck: any\r\n\t\t): any {\r\n\t\t\tif (!obj) return;\r\n\t\t\tif (_f.indexOf('.') > -1) {\r\n\t\t\t\tlet sub = _f.split('.');\r\n\t\t\t\tlet nsub = sub.shift();\r\n\t\t\t\tif (Array.isArray(obj[nsub])) {\r\n\t\t\t\t\tfor (let s = 0; s < obj[nsub].length; s++) {\r\n\t\t\t\t\t\tsub_test(obj[nsub][s], sub.join('.'), initObj, check);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn sub_test(obj[nsub], sub.join('.'), initObj, check);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (let j = 0; j < s.length; j++) {\r\n\t\t\t\tlet b = false;\r\n\t\t\t\tif (\r\n\t\t\t\t\tobj[_f] &&\r\n\t\t\t\t\t(typeof obj[_f] == 'string' ||\r\n\t\t\t\t\t\ttypeof obj[_f] == 'number') &&\r\n\t\t\t\t\ttypeof s[j] == 'string' &&\r\n\t\t\t\t\t(obj[_f]\r\n\t\t\t\t\t\t.toString()\r\n\t\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t\t.indexOf(s[j].toLowerCase()) > -1 ||\r\n\t\t\t\t\t\ts[j]\r\n\t\t\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t\t\t.indexOf(obj[_f].toString().toLowerCase()) > -1)\r\n\t\t\t\t) {\r\n\t\t\t\t\tif (!_check[check]) _arr.push(initObj);\r\n\t\t\t\t\t_check[check] = true;\r\n\t\t\t\t\tb = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (b) break;\r\n\t\t\t}\r\n\t\t};\r\n\t\tlet test = function (obj: any, check: any) {\r\n\t\t\tfor (let i = 0; i < f.length; i++) {\r\n\t\t\t\tsub_test(obj, f[i], obj, check);\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (Array.isArray(given)) {\r\n\t\t\tfor (let i = 0; i < given.length; i++) {\r\n\t\t\t\ttest(given[i], i);\r\n\t\t\t}\r\n\t\t} else if (typeof given == 'object') {\r\n\t\t\tfor (let key in given) {\r\n\t\t\t\ttest(given[key], key);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (l) return _arr.splice(0, l);\r\n\t\treturn _arr;\r\n\t}\r\n}\r\n","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n\tname: 'splice',\r\n\tstandalone: false,\r\n})\r\nexport class SplicePipe implements PipeTransform {\r\n\ttransform(from: any, which: any, refresh?: number): any {\r\n\t\tif (Array.isArray(from)) from = { arr: from, prop: '_id' };\r\n\t\tlet arr = (which.keep && []) || from.arr.slice();\r\n\t\tif (Array.isArray(which)) which = { arr: which, prop: '_id' };\r\n\t\tfor (let i = from.arr.length - 1; i >= 0; i--) {\r\n\t\t\tfor (let j = 0; j < which.arr.length; j++) {\r\n\t\t\t\tif (from.prop && which.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.prop) {\r\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (which.prop) {\r\n\t\t\t\t\tif (from.arr[i] == which.arr[j][which.prop]) {\r\n\t\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (from.arr[i] == which.arr[j]) {\r\n\t\t\t\t\tif (which.keep) {\r\n\t\t\t\t\t\tarr.push(from.arr[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarr.splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class BaseService {\r\n\tnow = new Date().getTime();\r\n\r\n\trefreshNow(): void {\r\n\t\tthis.now = new Date().getTime();\r\n\t}\r\n}\r\n","import { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class StoreService {\r\n\tprivate _prefix = '';\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\r\n\t\tprivate core: CoreService\r\n\t) {\r\n\t\tthis.config = this.config || DEFAULT_CONFIG;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the prefix for storage keys.\r\n\t *\r\n\t * @param prefix - The prefix to set.\r\n\t */\r\n\tsetPrefix(prefix: string): void {\r\n\t\tthis._prefix = prefix;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tset(\r\n\t\tkey: string,\r\n\t\tvalue: string,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\tif (this.config.store?.set) {\r\n\t\t\tthis.config.store.set(key, value, callback, errCallback);\r\n\t\t} else {\r\n\t\t\ttry {\r\n\t\t\t\tthis.core.localStorage.setItem(key, value);\r\n\t\t\t\tcallback();\r\n\t\t\t} catch (e) {\r\n\t\t\t\terrCallback();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setAsync(key: string, value: string): Promise<boolean> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.set) {\r\n\t\t\t\tawait this.config.store.set(key, value);\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.setItem(key, value);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute with the retrieved value.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tget(\r\n\t\tkey: string,\r\n\t\tcallback: (value: string) => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\tif (this.config.store?.get) {\r\n\t\t\tthis.config.store.get(key, callback, errCallback);\r\n\t\t} else {\r\n\t\t\tconst value = this.core.localStorage.getItem(key) || '';\r\n\t\t\tcallback(value);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getAsync(key: string): Promise<string> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.get) {\r\n\t\t\t\treturn await this.config.store.get(key);\r\n\t\t\t} else {\r\n\t\t\t\treturn this.core.localStorage.getItem(key) || '';\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tsetJson(\r\n\t\tkey: string,\r\n\t\tvalue: any,\r\n\t\tcallback: () => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tthis.set(key, JSON.stringify(value), callback, errCallback);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a JSON value in storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param value - The value to store.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync setJsonAsync(key: string, value: any): Promise<boolean> {\r\n\t\treturn this.setAsync(key, JSON.stringify(value));\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute with the retrieved value.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t */\r\n\tgetJson(\r\n\t\tkey: string,\r\n\t\tcallback: (value: any) => void = () => {},\r\n\t\terrCallback: () => void = () => {}\r\n\t): void {\r\n\t\tthis.get(\r\n\t\t\tkey,\r\n\t\t\t(value: string) => {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconst parsedValue = JSON.parse(value);\r\n\t\t\t\t\tcallback(parsedValue);\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tcallback(null);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terrCallback\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a JSON value from storage asynchronously.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns A promise that resolves to the retrieved value.\r\n\t */\r\n\tasync getJsonAsync<T = any>(key: string): Promise<T | null> {\r\n\t\tconst value = await this.getAsync(key);\r\n\t\ttry {\r\n\t\t\treturn JSON.parse(value);\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a value from storage.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync remove(\r\n\t\tkey: string,\r\n\t\tcallback?: () => void,\r\n\t\terrCallback?: () => void\r\n\t): Promise<boolean> {\r\n\t\tkey = this.applyPrefix(key);\r\n\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.remove) {\r\n\t\t\t\tawait this.config.store.remove(key, callback, errCallback);\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.removeItem(key);\r\n\t\t\t}\r\n\t\t\tcallback?.();\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\terrCallback?.();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Clears all values from storage.\r\n\t *\r\n\t * @param callback - The callback to execute on success.\r\n\t * @param errCallback - The callback to execute on error.\r\n\t * @returns A promise that resolves to a boolean indicating success.\r\n\t */\r\n\tasync clear(\r\n\t\tcallback?: () => void,\r\n\t\terrCallback?: () => void\r\n\t): Promise<boolean> {\r\n\t\ttry {\r\n\t\t\tif (this.config.store?.clear) {\r\n\t\t\t\tawait this.config.store.clear();\r\n\t\t\t} else {\r\n\t\t\t\tthis.core.localStorage.clear();\r\n\t\t\t}\r\n\t\t\tcallback?.();\r\n\t\t\treturn true;\r\n\t\t} catch (err) {\r\n\t\t\tconsole.error(err);\r\n\t\t\terrCallback?.();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Applies the configured prefix to a storage key.\r\n\t *\r\n\t * @param key - The storage key.\r\n\t * @returns The prefixed storage key.\r\n\t */\r\n\tprivate applyPrefix(key: string): string {\r\n\t\tif (this.config.store?.prefix) {\r\n\t\t\tkey = this.config.store.prefix + key;\r\n\t\t}\r\n\t\tif (this._prefix) {\r\n\t\t\tkey = this._prefix + key;\r\n\t\t}\r\n\t\treturn key;\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a value exists in storage.\r\n\t *\r\n\t * This function checks whether a value is present for the given key in the storage.\r\n\t * It uses the configured storage mechanism if available; otherwise, it defaults to using `localStorage`.\r\n\t *\r\n\t * @param key - The storage key to check.\r\n\t * @returns A promise that resolves to `true` if the value exists, otherwise `false`.\r\n\t *\r\n\t * @example\r\n\t * const store = new StoreService(config, core);\r\n\t *\r\n\t * // Set a value and check if it exists\r\n\t * await store.setAsync('exampleKey', 'exampleValue');\r\n\t * const exists = await store.has('exampleKey');\r\n\t * console.log(exists); // Output: true\r\n\t *\r\n\t * @notes\r\n\t * - This method internally uses `getAsync` to retrieve the value and checks if it is not null or empty.\r\n\t * - An empty string value will still return `true` as the key exists in storage.\r\n\t */\r\n\tasync has(key: string): Promise<boolean> {\r\n\t\treturn !!(await this.getAsync(key));\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\r\nimport {\r\n\tHttpClient,\r\n\tHttpErrorResponse,\r\n\tHttpHeaders,\r\n} from '@angular/common/http';\r\nimport { EMPTY, Observable, ReplaySubject } from 'rxjs';\r\nimport { catchError, first } from 'rxjs/operators';\r\nimport { StoreService } from './store.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HttpService {\r\n\t// An array of error handling callbacks\r\n\terrors: ((err: HttpErrorResponse, retry?: () => void) => {})[] = [];\r\n\r\n\t// Base URL for HTTP requests\r\n\turl = '';\r\n\r\n\t// Flag to lock the service to prevent multiple requests\r\n\tlocked = false;\r\n\r\n\t// Array to store setTimeout IDs for managing request locks\r\n\tawaitLocked: any[] = [];\r\n\r\n\t// Configuration object for HTTP settings\r\n\tprivate _http: any;\r\n\r\n\t// Object to store HTTP headers\r\n\tprivate _headers: any = {};\r\n\r\n\t// Instance of HttpHeaders with current headers\r\n\tprivate _http_headers = new HttpHeaders(this._headers);\r\n\r\n\tconstructor(\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpClient,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config\r\n\t) {\r\n\t\t// Initialize HTTP configuration and headers from injected config\r\n\t\tthis._http = this._config.http || {};\r\n\r\n\t\tif (typeof this._http.headers === 'object') {\r\n\t\t\tfor (const header in this._http.headers) {\r\n\t\t\t\tthis._headers[header] = this._http.headers[header];\r\n\t\t\t}\r\n\r\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t}\r\n\r\n\t\t// Retrieve and set the base URL and headers from the store\r\n\t\tthis.store.get('http_url', (url: any) => {\r\n\t\t\tthis.url = url || this._http.url || '';\r\n\t\t});\r\n\r\n\t\tthis.store.getJson('http_headers', (headers: any) => {\r\n\t\t\tif (headers) {\r\n\t\t\t\tfor (const header in headers) {\r\n\t\t\t\t\tthis._headers[header] = headers[header];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t// Set a new base URL and save it in the store\r\n\tsetUrl(url: string) {\r\n\t\tthis.url = url;\r\n\r\n\t\tthis.store.set('http_url', url);\r\n\t}\r\n\r\n\t// Remove the base URL and revert to the default or stored one\r\n\tremoveUrl() {\r\n\t\tthis.url = this._http.url || '';\r\n\r\n\t\tthis.store.remove('http_url');\r\n\t}\r\n\r\n\t// Set a new HTTP header and update the stored headers\r\n\tset(key: any, value: any) {\r\n\t\tthis._headers[key] = value;\r\n\r\n\t\tthis.store.setJson('http_headers', this._headers);\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\t}\r\n\r\n\t// Get the value of a specific HTTP header\r\n\theader(key: any) {\r\n\t\treturn this._headers[key];\r\n\t}\r\n\r\n\t// Remove a specific HTTP header and update the stored headers\r\n\tremove(key: any) {\r\n\t\tdelete this._headers[key];\r\n\r\n\t\tthis._http_headers = new HttpHeaders(this._headers);\r\n\r\n\t\tthis.store.setJson('http_headers', this._headers);\r\n\t}\r\n\r\n\t// Internal method to make HTTP requests based on the method type\r\n\tprivate _httpMethod(\r\n\t\tmethod: string,\r\n\t\t_url: string,\r\n\t\tdoc: unknown,\r\n\t\theaders: any\r\n\t): Observable<any> {\r\n\t\tif (method === 'post') {\r\n\t\t\treturn this.http.post<any>(_url, doc, headers);\r\n\t\t} else if (method === 'put') {\r\n\t\t\treturn this.http.put<any>(_url, doc, headers);\r\n\t\t} else if (method === 'patch') {\r\n\t\t\treturn this.http.patch<any>(_url, doc, headers);\r\n\t\t} else if (method === 'delete') {\r\n\t\t\treturn this.http.delete<any>(_url, headers);\r\n\t\t} else {\r\n\t\t\treturn this.http.get<any>(_url, headers);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to handle HTTP requests for various methods (POST, PUT, PATCH, DELETE, GET).\r\n\t *\r\n\t * Features:\r\n\t * - **Request Locking**: Manages request locking to prevent simultaneous requests.\r\n\t * - **Acceptance Check**: Validates the server response against a user-defined `acceptance` function.\r\n\t * If the check fails, the response is rejected with an error.\r\n\t * - **Replace Logic**: Allows modification of specific parts of the response object, determined by a user-defined `replace` function.\r\n\t * Can handle both objects and arrays within the response.\r\n\t * - **Field Filtering**: Supports extracting specific fields from response objects or arrays.\r\n\t * - **Legacy Support**: Compatible with callback-based usage alongside Observables.\r\n\t * - **ReplaySubject**: Ensures that the response can be shared across multiple subscribers.\r\n\t *\r\n\t * @param url - The endpoint to send the HTTP request to (relative to the base URL).\r\n\t * @param doc - The request payload for methods like POST, PUT, and PATCH.\r\n\t * @param callback - A legacy callback function to handle the response.\r\n\t * @param opts - Additional options:\r\n\t * - `err`: Error handling callback.\r\n\t * - `acceptance`: Function to validate the server response. Should return `true` for valid responses.\r\n\t * - `replace`: Function to modify specific parts of the response data.\r\n\t * - `fields`: Array of fields to extract from the response object(s).\r\n\t * - `data`: Path in the response where the data resides for `replace` and `fields` operations.\r\n\t * - `skipLock`: If `true`, bypasses request locking.\r\n\t * - `url`: Overrides the base URL for this request.\r\n\t * @param method - The HTTP method (e.g., 'post', 'put', 'patch', 'delete', 'get').\r\n\t * @returns An Observable that emits the processed HTTP response or an error.\r\n\t */\r\n\tprivate _post(\r\n\t\turl: string,\r\n\t\tdoc: unknown,\r\n\t\tcallback = (resp: unknown) => {},\r\n\t\topts: any = {},\r\n\t\tmethod = 'post'\r\n\t): Observable<any> {\r\n\t\tif (typeof opts === 'function') {\r\n\t\t\topts = { err: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.err) {\r\n\t\t\topts.err = (err: HttpErrorResponse) => {};\r\n\t\t}\r\n\r\n\t\t// Handle request locking to avoid multiple simultaneous requests\r\n\t\tif (this.locked && !opts.skipLock) {\r\n\t\t\treturn new Observable((observer) => {\r\n\t\t\t\tconst wait = setTimeout(() => {\r\n\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\r\n\t\t\t\t\t\tobserver\r\n\t\t\t\t\t);\r\n\t\t\t\t}, 100);\r\n\t\t\t\tthis.awaitLocked.push(wait);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tconst _url = (opts.url || this.url) + url;\r\n\r\n\t\tthis.prepare_handle(_url, doc);\r\n\r\n\t\t// Using ReplaySubject to allow multiple subscriptions without re-triggering the HTTP request\r\n\t\tconst responseSubject = new ReplaySubject<any>(1);\r\n\r\n\t\tthis._httpMethod(method, _url, doc, { headers: this._http_headers })\r\n\t\t\t.pipe(\r\n\t\t\t\tfirst(),\r\n\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\tthis.handleError(opts.err, () => {\r\n\t\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\r\n\t\t\t\t\t\t\tresponseSubject\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t})(error);\r\n\t\t\t\t\tresponseSubject.error(error);\r\n\t\t\t\t\treturn EMPTY;\r\n\t\t\t\t})\r\n\t\t\t)\r\n\t\t\t.subscribe({\r\n\t\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\topts.acceptance &&\r\n\t\t\t\t\t\ttypeof opts.acceptance === 'function'\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (!opts.acceptance(resp)) {\r\n\t\t\t\t\t\t\tconst error = new HttpErrorResponse({\r\n\t\t\t\t\t\t\t\terror: 'Acceptance failed',\r\n\t\t\t\t\t\t\t\tstatus: 400,\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tthis.handleError(opts.err, () => {})(error);\r\n\r\n\t\t\t\t\t\t\tresponseSubject.error(error);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opts.replace && typeof opts.replace === 'function') {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tArray.isArray(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data\r\n\t\t\t\t\t\t\t\t) as Array<unknown>\r\n\t\t\t\t\t\t\t).map((item: unknown) => opts.replace(item));\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\topts.replace(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (Array.isArray(opts.fields)) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tArray.isArray(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data\r\n\t\t\t\t\t\t\t\t) as Array<unknown>\r\n\t\t\t\t\t\t\t).map((item: unknown) => {\r\n\t\t\t\t\t\t\t\treturn this._newDoc(item, opts.fields);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\r\n\t\t\t\t\t\t\tconst newDoc = this._newDoc(\r\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data),\r\n\t\t\t\t\t\t\t\topts.fields\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\tif (opts.data) {\r\n\t\t\t\t\t\t\t\tthis._setObjectToReplace(\r\n\t\t\t\t\t\t\t\t\tresp,\r\n\t\t\t\t\t\t\t\t\topts.data,\r\n\t\t\t\t\t\t\t\t\tnewDoc\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tresp = newDoc;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.response_handle(_url, resp, () => callback(resp));\r\n\r\n\t\t\t\t\tresponseSubject.next(resp);\r\n\r\n\t\t\t\t\tresponseSubject.complete();\r\n\t\t\t\t},\r\n\t\t\t\terror: (err) => responseSubject.error(err),\r\n\t\t\t\tcomplete: () => responseSubject.complete(),\r\n\t\t\t});\r\n\r\n\t\treturn responseSubject.asObservable();\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a POST request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpost(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts);\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PUT request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tput(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'put');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a PATCH request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tpatch(\r\n\t\turl: string,\r\n\t\tdoc: any,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, doc, callback, opts, 'patch');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a DELETE request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tdelete(\r\n\t\turl: string,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'delete');\r\n\t}\r\n\r\n\t/**\r\n\t * Public method to perform a GET request.\r\n\t * - Supports legacy callback usage.\r\n\t * - Returns an Observable for reactive programming.\r\n\t */\r\n\tget(\r\n\t\turl: string,\r\n\t\tcallback = (resp: any) => {},\r\n\t\topts: any = {}\r\n\t): Observable<any> {\r\n\t\treturn this._post(url, null, callback, opts, 'get');\r\n\t}\r\n\r\n\t// Clear all pending request locks\r\n\tclearLocked() {\r\n\t\tfor (const awaitLocked of this.awaitLocked) {\r\n\t\t\tclearTimeout(awaitLocked);\r\n\t\t}\r\n\t\tthis.awaitLocked = [];\r\n\t}\r\n\r\n\t// Lock the service to prevent multiple simultaneous requests\r\n\tlock() {\r\n\t\tthis.locked = true;\r\n\t}\r\n\r\n\t// Unlock the service to allow new requests\r\n\tunlock() {\r\n\t\tthis.locked = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Handles HTTP errors.\r\n\t * - Calls provided error callback and retries the request if needed.\r\n\t */\r\n\tprivate handleError(callback: any, retry: () => void) {\r\n\t\treturn (error: HttpErrorResponse): Promise<void> => {\r\n\t\t\treturn new Promise((resolve) => {\r\n\t\t\t\tthis.err_handle(error, callback, retry);\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Internal method to trigger error handling callbacks.\r\n\t */\r\n\tprivate err_handle(\r\n\t\terr: HttpErrorResponse,\r\n\t\tnext: (err: HttpErrorResponse) => void,\r\n\t\tretry: () => void\r\n\t) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext(err);\r\n\t\t}\r\n\r\n\t\tfor (const callback of this.errors) {\r\n\t\t\tif (typeof callback === 'function') {\r\n\t\t\t\tcallback(err, retry);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Placeholder method for handling request preparation (can be customized)\r\n\tprivate prepare_handle(url: string, body: unknown) {}\r\n\r\n\t// Placeholder method for handling the response (can be customized)\r\n\tprivate response_handle(url: string, body: unknown, next: () => void) {\r\n\t\tif (typeof next === 'function') {\r\n\t\t\tnext();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a nested object or property from the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to retrieve data from.\r\n\t * @param base - A dot-separated string indicating the path to the desired property within the response.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * - If empty, the entire response is returned.\r\n\t * @returns The object or property located at the specified path within the response.\r\n\t */\r\n\tprivate _getObjectToReplace(resp: unknown, base = ''): unknown {\r\n\t\tif (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\treturn this._getObjectToReplace(\r\n\t\t\t\t(resp as Record<string, unknown>)[currentBase] || {},\r\n\t\t\t\tnewBase.join('.')\r\n\t\t\t);\r\n\t\t} else if (base) {\r\n\t\t\treturn (resp as Record<string, unknown>)[base];\r\n\t\t} else {\r\n\t\t\treturn resp;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets or replaces a nested object or property in the response based on a dot-separated path.\r\n\t *\r\n\t * @param resp - The response object to modify.\r\n\t * @param base - A dot-separated string indicating the path to the property to replace.\r\n\t * - Example: `'data.items'` will navigate through `resp.data.items`.\r\n\t * @param doc - The new data or object to set at the specified path.\r\n\t * @returns `void`.\r\n\t */\r\n\tprivate _setObjectToReplace(resp: unknown, base = '', doc: unknown): void {\r\n\t\twhile (base.includes('.')) {\r\n\t\t\tconst newBase = base.split('');\r\n\r\n\t\t\tconst currentBase: string = newBase.pop() || '';\r\n\r\n\t\t\tresp = (resp as Record<string, unknown>)[currentBase] || {};\r\n\r\n\t\t\tbase = newBase.join('.');\r\n\t\t}\r\n\r\n\t\t(resp as Record<string, unknown>)[base] = doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new object containing only specified fields from the input item.\r\n\t *\r\n\t * @param item - The input object to extract fields from.\r\n\t * @param fields - An array of field names to include in the new object.\r\n\t * - Example: `['id', 'name']` will create a new object with only the `id` and `name` properties from `item`.\r\n\t * @returns A new object containing only the specified fields.\r\n\t */\r\n\tprivate _newDoc(item: unknown, fields: string[]): unknown {\r\n\t\tconst newDoc: Record<string, unknown> = {};\r\n\r\n\t\tfor (const field of fields) {\r\n\t\t\tnewDoc[field] = (item as Record<string, unknown>)[field];\r\n\t\t}\r\n\r\n\t\treturn newDoc;\r\n\t}\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-wrapper',\r\n\ttemplateUrl: './wrapper.component.html',\r\n\tstyleUrls: ['./wrapper.component.scss'],\r\n\tstandalone: false,\r\n})\r\nexport class WrapperComponent {\r\n\tconstructor() {}\r\n}\r\n","<div>\r\n\t<div\r\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomRight\"\r\n\t\tid=\"bottomRight\"\r\n\t></div>\r\n\t<div\r\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomLeft\"\r\n\t\tid=\"bottomLeft\"\r\n\t></div>\r\n\t<div\r\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-topRight\"\r\n\t\tid=\"topRight\"\r\n\t></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-topLeft\" id=\"topLeft\"></div>\r\n\t<div\r\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-topCenter\"\r\n\t\tid=\"topCenter\"\r\n\t></div>\r\n\t<div\r\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomCenter\"\r\n\t\tid=\"bottomCenter\"\r\n\t></div>\r\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-center\" id=\"center\"></div>\r\n</div>\r\n","import {\r\n\tInjectable,\r\n\tInjector,\r\n\tComponentFactoryResolver,\r\n\tComponentRef,\r\n\tEmbeddedViewRef,\r\n\tApplicationRef,\r\n} from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class DomService {\r\n\tprivate providedIn: Record<string, boolean> = {};\r\n\r\n\tconstructor(\r\n\t\tprivate componentFactoryResolver: ComponentFactoryResolver,\r\n\t\tprivate appRef: ApplicationRef,\r\n\t\tprivate injector: Injector,\r\n\t\tprivate core: CoreService\r\n\t) {}\r\n\r\n\t/**\r\n\t * Appends a component to a specified element by ID.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param id - The ID of the element to append the component to.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendById(\r\n\t\tcomponent: any,\r\n\t\toptions: any = {},\r\n\t\tid: string\r\n\t): { nativeElement: HTMLElement; componentRef: ComponentRef<any> } {\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\r\n\t\t\t.rootNodes[0] as HTMLElement;\r\n\t\tconst element = this.core.document.getElementById(id);\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Appends a component to a specified element or to the body.\r\n\t *\r\n\t * @param component - The component to append.\r\n\t * @param options - The options to project into the component.\r\n\t * @param element - The element to append the component to. Defaults to body.\r\n\t * @returns An object containing the native element and the component reference.\r\n\t */\r\n\tappendComponent(\r\n\t\tcomponent: any,\r\n\t\toptions: any = {},\r\n\t\telement: HTMLElement = this.core.document.body\r\n\t): { nativeElement: HTMLElement; componentRef: ComponentRef<any> } | void {\r\n\t\tif (options.providedIn) {\r\n\t\t\tif (this.providedIn[options.providedIn]) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.providedIn[options.providedIn] = true;\r\n\t\t}\r\n\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\r\n\t\t\t.rootNodes[0] as HTMLElement;\r\n\t\tif (element && typeof element.appendChild === 'function') {\r\n\t\t\telement.appendChild(domElem);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tnativeElement: domElem,\r\n\t\t\tcomponentRef: componentRef,\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Gets a reference to a dynamically created component.\r\n\t *\r\n\t * @param component - The component to create.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference.\r\n\t */\r\n\tgetComponentRef(component: any, options: any = {}): ComponentRef<any> {\r\n\t\tconst componentRef = this.componentFactoryResolver\r\n\t\t\t.resolveComponentFactory(component)\r\n\t\t\t.create(this.injector);\r\n\r\n\t\tthis.projectComponentInputs(componentRef, options);\r\n\t\tthis.appRef.attachView(componentRef.hostView);\r\n\r\n\t\treturn componentRef;\r\n\t}\r\n\r\n\t/**\r\n\t * Projects the inputs onto the component.\r\n\t *\r\n\t * @param component - The component reference.\r\n\t * @param options - The options to project into the component.\r\n\t * @returns The component reference with the projected inputs.\r\n\t */\r\n\tprivate projectComponentInputs(\r\n\t\tcomponent: ComponentRef<any>,\r\n\t\toptions: any\r\n\t): ComponentRef<any> {\r\n\t\tif (options) {\r\n\t\t\tconst props = Object.getOwnPropertyNames(options);\r\n\t\t\tfor (const prop of props) {\r\n\t\t\t\tcomponent.instance[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn component;\r\n\t}\r\n}\r\n\r\n/*\r\nhttps://stackoverflow.com/questions/39857222/angular2-dynamic-component-injection-in-root/40687392#40687392\r\nhttps://gist.github.com/reed-lawrence/1f6b7c328ad3886e60dc2b0adcf75a97\r\n*/\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { AlertComponent } from '../components/alert/alert.component';\r\nimport { WrapperComponent } from '../components/alert/wrapper/wrapper.component';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { Alert, DEFAULT_Alert } from '../interfaces/alert.interface';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class AlertService {\r\n\tprivate alert: any;\r\n\tprivate _container: any;\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\r\n\t\tthis.alert = this.config.alert;\r\n\t\tif (!this.alert) {\r\n\t\t\tthis.alert = DEFAULT_Alert;\r\n\t\t} else {\r\n\t\t\tfor (let each in DEFAULT_Alert) {\r\n\t\t\t\tif (this.alert[each]) continue;\r\n\t\t\t\tthis.alert[each] = DEFAULT_Alert[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._container = this.dom.appendComponent(WrapperComponent);\r\n\t}\r\n\tprivate uniques: any = {};\r\n\tprivate shortcuts: any = {\r\n\t\ttl: 'topLeft',\r\n\t\ttc: 'topCenter',\r\n\t\ttr: 'topRight',\r\n\t\tr: 'right',\r\n\t\tbr: 'bottomRight',\r\n\t\tbc: 'bottomCenter',\r\n\t\tbl: 'bottomLeft',\r\n\t\tl: 'left',\r\n\t\tc: 'center',\r\n\t};\r\n\tprivate positionNumber: any = {\r\n\t\ttopLeft: 3,\r\n\t\ttopCenter: 4,\r\n\t\ttopRight: 2,\r\n\t\tright: '',\r\n\t\tbottomRight: 0,\r\n\t\tbottomCenter: 5,\r\n\t\tbottomLeft: 1,\r\n\t\tleft: '',\r\n\t\tcenter: 6,\r\n\t};\r\n\r\n\tshow(opts: any | Alert) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\ttext: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tif (!opts['type']) opts['type'] = 'info';\r\n\t\tfor (let each in this.alert) {\r\n\t\t\tif (each == 'class')\r\n\t\t\t\topts[each] = opts[each] + ' ' + this.alert[each];\r\n\t\t\telse if (typeof opts[each] == 'undefined')\r\n\t\t\t\topts[each] = this.alert[each];\r\n\t\t}\r\n\t\tif (this.shortcuts[opts.position])\r\n\t\t\topts.position = this.shortcuts[opts.position];\r\n\t\tif (!opts.position) opts.position = 'bottomRight';\r\n\t\tvar content: any;\r\n\t\topts.close = () => {\r\n\t\t\tif (content) content.componentRef.destroy();\r\n\t\t\topts.component.nativeElement.remove();\r\n\t\t\tif (typeof (opts as Alert).onClose == 'function')\r\n\t\t\t\t(opts as Alert).onClose();\r\n\t\t};\r\n\t\t// let component = this.dom.appendById(AlertComponent, opts, opts.position);\r\n\t\tlet customElement = false;\r\n\r\n\t\tif (\r\n\t\t\ttypeof opts.component == 'string' &&\r\n\t\t\tthis.alert.alerts[opts.component]\r\n\t\t) {\r\n\t\t\topts.component = this.alert.alerts[opts.component];\r\n\t\t\tcustomElement = true;\r\n\t\t} else {\r\n\t\t\topts.component = this.dom.appendById(\r\n\t\t\t\tAlertComponent,\r\n\t\t\t\topts,\r\n\t\t\t\topts.position\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (typeof opts.component === 'function') {\r\n\t\t\tcontent = this.dom.appendComponent(\r\n\t\t\t\topts.component,\r\n\t\t\t\topts,\r\n\t\t\t\tthis._container.nativeElement.children[0].children[\r\n\t\t\t\t\tthis.positionNumber[opts.position] || 0\r\n\t\t\t\t]\r\n\t\t\t\t// component.nativeElement.children[0].children[0].children[0] as HTMLElement\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (opts.unique) {\r\n\t\t\tif (this.uniques[opts.unique]) this.uniques[opts.unique].remove();\r\n\t\t\tthis.uniques[opts.unique] = opts.component.nativeElement;\r\n\t\t}\r\n\r\n\t\tif (typeof opts.timeout !== 'number') {\r\n\t\t\topts.timeout = 2000;\r\n\t\t}\r\n\r\n\t\tif (opts.timeout) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\topts.close();\r\n\t\t\t}, opts.timeout);\r\n\t\t}\r\n\r\n\t\treturn opts.component.nativeElement;\r\n\t}\r\n\topen(opts: Alert) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\tinfo(opts: Alert) {\r\n\t\topts['type'] = 'info';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tsuccess(opts: Alert) {\r\n\t\topts['type'] = 'success';\r\n\t\tthis.show(opts);\r\n\t}\r\n\twarning(opts: Alert) {\r\n\t\topts['type'] = 'warning';\r\n\t\tthis.show(opts);\r\n\t}\r\n\terror(opts: Alert) {\r\n\t\topts['type'] = 'error';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tquestion(opts: Alert) {\r\n\t\topts['type'] = 'question';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tdestroy() {\r\n\t\tthis.core.document.getElementById('bottomRight').innerHTML = '';\r\n\t\tthis.core.document.getElementById('bottomLeft').innerHTML = '';\r\n\t\tthis.core.document.getElementById('bottomCenter').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topRight').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topLeft').innerHTML = '';\r\n\t\tthis.core.document.getElementById('topCenter').innerHTML = '';\r\n\t\tthis.core.document.getElementById('center').innerHTML = '';\r\n\t}\r\n}\r\n","import { Observable } from 'rxjs';\r\nimport { HttpService } from './http.service';\r\nimport { StoreService } from './store.service';\r\nimport { AlertService } from './alert.service';\r\nimport { CoreService } from './core.service';\r\nimport { CrudDocument } from '../interfaces/crud.interface';\r\nimport { BaseService } from './base.service';\r\nimport { inject } from '@angular/core';\r\n\r\ninterface CrudOptions<Document> {\r\n\tname?: string;\r\n\talert?: string;\r\n\tcallback?: (resp: Document | Document[]) => void;\r\n\terrCallback?: (resp: unknown) => void;\r\n}\r\n\r\ninterface CrudConfig<Document> {\r\n\tname: string;\r\n\t_id?: string;\r\n\treplace?: (doc: Document) => void;\r\n\tunauthorized?: boolean;\r\n}\r\n\r\ninterface GetConfig {\r\n\tpage?: number;\r\n\tperPage?: number;\r\n\tquery?: string;\r\n}\r\n\r\n/**\r\n * Abstract class representing a CRUD (Create, Read, Update, Delete) service.\r\n *\r\n * This class provides methods for managing documents, interacting with an API,\r\n * and storing/retrieving data from local storage. It is designed to be extended\r\n * for specific document types.\r\n *\r\n * @template Document - The type of the document the service handles.\r\n */\r\nexport abstract class CrudService<\r\n\tDocument extends CrudDocument\r\n> extends BaseService {\r\n\t/**\r\n\t * URL for the API.\r\n\t */\r\n\tprivate _url = '/api/';\r\n\r\n\t/**\r\n\t * Array of documents managed by this service.\r\n\t */\r\n\tprivate _docs: Document[] = [];\r\n\r\n\t/**\r\n\t * Number of documents per page.\r\n\t */\r\n\tprivate _perPage = 20;\r\n\r\n\t/**\r\n\t * Callbacks for filtering documents.\r\n\t */\r\n\tprivate _filteredDocumentsCallbacks: (() => void)[] = [];\r\n\r\n\t/**\r\n\t * Constructs a CRUD service instance.\r\n\t *\r\n\t * @param _config - Configuration options for the CRUD service.\r\n\t * @param __http - Service to handle HTTP requests.\r\n\t * @param __store - Service to manage local storage of documents.\r\n\t * @param __alert - Service to display alerts.\r\n\t * @param __core - Core service for utility functions.\r\n\t */\r\n\tprotected __http = inject(HttpService);\r\n\r\n\tprotected __store = inject(StoreService);\r\n\r\n\tprotected __alert = inject(AlertService);\r\n\r\n\tprotected __core = inject(CoreService);\r\n\r\n\tconstructor(private _config: CrudConfig<Document>) {\r\n\t\tsuper();\r\n\r\n\t\tthis._url += this._config.name;\r\n\r\n\t\tconsole.log(\r\n\t\t\tlocalStorage.getItem('waw_user'),\r\n\t\t\tlocalStorage.getItem(this._config.name + 'waw_user_id')\r\n\t\t);\r\n\r\n\t\tif (this._config.unauthorized) {\r\n\t\t\tthis.restoreDocs();\r\n\t\t} else if (localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tif (\r\n\t\t\t\tuser._id ===\r\n\t\t\t\tlocalStorage.getItem(this._config.name + 'waw_user_id')\r\n\t\t\t) {\r\n\t\t\t\tthis.restoreDocs();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.__core.on('wipe').subscribe((): void => {\r\n\t\t\tthis.clearDocs();\r\n\r\n\t\t\tthis._filterDocuments();\r\n\t\t});\r\n\t}\r\n\r\n\trestoreDocs(): void {\r\n\t\tthis.__store.getJson('docs_' + this._config.name, (docs) => {\r\n\t\t\tif (Array.isArray(docs)) {\r\n\t\t\t\tthis._docs.push(...docs);\r\n\r\n\t\t\t\tthis._filterDocuments();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current set of documents to local storage.\r\n\t */\r\n\tsetDocs(): void {\r\n\t\tthis.__store.setJson('docs_' + this._config.name, this._docs);\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the current list of documents.\r\n\t *\r\n\t * @returns The list of documents.\r\n\t */\r\n\tgetDocs(): Document[] {\r\n\t\treturn this._docs;\r\n\t}\r\n\r\n\t/**\r\n\t * Clears the current list of documents.\r\n\t *\r\n\t * Empties the internal documents array and saves the updated state to local storage.\r\n\t */\r\n\tclearDocs(): void {\r\n\t\tthis._docs.splice(0, this._docs.length);\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Adds multiple documents to the service and saves them to local storage.\r\n\t *\r\n\t * @param docs - An array of documents to add.\r\n\t */\r\n\taddDocs(docs: Document[]): void {\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tfor (const doc of docs) {\r\n\t\t\t\tthis.addDoc(doc);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a single document to the service. If it already exists, it will be updated.\r\n\t *\r\n\t * @param doc - The document to add.\r\n\t */\r\n\taddDoc(doc: Document): void {\r\n\t\tif (this._config.replace) {\r\n\t\t\tthis._config.replace(doc);\r\n\t\t}\r\n\r\n\t\tconst existingDoc = this._docs.find(\r\n\t\t\t(d) => this._id(d) === this._id(doc)\r\n\t\t);\r\n\r\n\t\tif (existingDoc) {\r\n\t\t\t// Update the existing document\r\n\t\t\tthis.__core.copy(doc, existingDoc);\r\n\r\n\t\t\tthis.__core.copy(existingDoc, doc);\r\n\t\t} else {\r\n\t\t\t// Add new document\r\n\t\t\tthis._docs.push(doc);\r\n\t\t}\r\n\r\n\t\tthis.setDocs();\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a new document with a temporary ID and status flags.\r\n\t *\r\n\t * @param doc - Optional base document to use for the new document.\r\n\t * @returns A new document instance with default properties.\r\n\t */\r\n\tnew(doc: Document = {} as Document): Document {\r\n\t\treturn {\r\n\t\t\t...doc,\r\n\t\t\t_id: doc._id || Date.now().toString(),\r\n\t\t\t__created: false,\r\n\t\t\t__modified: false,\r\n\t\t} as Document;\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves a document by its unique ID or creates a new one if it doesn't exist.\r\n\t *\r\n\t * @param _id - The document ID to search for.\r\n\t * @returns The found document or a new document if not found.\r\n\t */\r\n\tdoc(_id: string): Document {\r\n\t\tconst doc =\r\n\t\t\tthis._docs.find((d) => this._id(d) === _id) ||\r\n\t\t\tthis.new({\r\n\t\t\t\t_id,\r\n\t\t\t} as Document);\r\n\r\n\t\tif (\r\n\t\t\t!this._docs.find((d) => this._id(d) === _id) &&\r\n\t\t\t!this._fetchingId[_id]\r\n\t\t) {\r\n\t\t\tthis._fetchingId[_id] = true;\r\n\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.fetch({ _id }).subscribe((_doc: Document) => {\r\n\t\t\t\t\tthis._fetchingId[_id] = false;\r\n\r\n\t\t\t\t\tif (_doc) {\r\n\t\t\t\t\t\tthis.__core.copy(_doc, doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn doc;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the number of documents to display per page.\r\n\t *\r\n\t * @param _perPage - Number of documents per page.\r\n\t */\r\n\tsetPerPage(_perPage: number): void {\r\n\t\tthis._perPage = _perPage;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a list of documents from the API with optional pagination.\r\n\t *\r\n\t * @param config - Optional pagination configuration.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the list of documents.\r\n\t */\r\n\tget(\r\n\t\tconfig: GetConfig = {},\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document[]> {\r\n\t\tif (!this._config.unauthorized && localStorage.getItem('waw_user')) {\r\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\r\n\r\n\t\t\tlocalStorage.setItem(this._config.name + 'waw_user_id', user._id);\r\n\t\t}\r\n\r\n\t\tconst url = `${this._url}/get${options.name || ''}`;\r\n\r\n\t\tconst params =\r\n\t\t\t(typeof config.page === 'number' || config.query ? '?' : '') +\r\n\t\t\t(config.query || '') +\r\n\t\t\t(typeof config.page === 'number'\r\n\t\t\t\t? `&skip=${this._perPage * (config.page - 1)}&limit=${\r\n\t\t\t\t\t\tthis._perPage\r\n\t\t\t\t }`\r\n\t\t\t\t: '');\r\n\r\n\t\tconst obs = this.__http.get(`${url}${params}`);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown): void => {\r\n\t\t\t\t(resp as Document[]).forEach((doc) => this.addDoc(doc));\r\n\r\n\t\t\t\tif (options.callback) {\r\n\t\t\t\t\toptions.callback(resp as Document[]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof config.page !== 'number') {\r\n\t\t\t\t\tthis._filterDocuments();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_get`, this._docs);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown): void => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document[]>;\r\n\t}\r\n\r\n\t/**\r\n\t * Sends a request to the API to create a new document.\r\n\t *\r\n\t * @param doc - The document to create.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the created document, or emits an error if already created.\r\n\t */\r\n\tcreate(\r\n\t\tdoc: Document = {} as Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tif (doc.__created) {\r\n\t\t\t// Emit an error observable if the document is already created\r\n\t\t\treturn new Observable<Document>((observer) => {\r\n\t\t\t\tobserver.error(new Error('Document has already been created.'));\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tdoc.__created = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/create${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tthis.addDoc(doc);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_create`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tdoc.__created = false;\r\n\r\n\t\t\t\tif (options.errCallback) options.errCallback(err);\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Fetches a document from the API based on a query.\r\n\t *\r\n\t * @param query - The query object used to filter documents.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the fetched document.\r\n\t */\r\n\tfetch(\r\n\t\tquery: object = {},\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/fetch${options.name || ''}`,\r\n\t\t\tquery\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.addDoc(resp as Document);\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) options.callback(resp as Document);\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp as Document);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document after a specified delay and returns an observable.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that emits the updated document.\r\n\t */\r\n\tupdateAfterWhile(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\treturn new Observable<Document>((observer) => {\r\n\t\t\tthis.__core.afterWhile(this._id(doc), () => {\r\n\t\t\t\tthis.update(doc, options).subscribe({\r\n\t\t\t\t\tnext: (updatedDoc) => {\r\n\t\t\t\t\t\tobserver.next(updatedDoc); // Emit the updated document\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: (err) => {\r\n\t\t\t\t\t\tobserver.error(err); // Forward the error\r\n\t\t\t\t\t},\r\n\t\t\t\t\tcomplete: () => {\r\n\t\t\t\t\t\tobserver.complete(); // Complete the observable\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Updates a document in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tupdate(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/update${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\tconst storedDoc = this.doc(doc._id);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, storedDoc);\r\n\r\n\t\t\t\t\tthis.__core.copy(resp, doc);\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}update`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_update`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Unique update a document field in the API.\r\n\t *\r\n\t * @param doc - The document to update.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the updated document.\r\n\t */\r\n\tunique(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tdoc.__modified = true;\r\n\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/unique${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tdoc.__modified = false;\r\n\r\n\t\t\t\t\t(doc as any)[options.name as string] = resp;\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}unique`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_unique`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Deletes a document from the API.\r\n\t *\r\n\t * @param doc - The document to delete.\r\n\t * @param options - Optional callback and error handling configuration.\r\n\t * @returns An observable that resolves with the deleted document.\r\n\t */\r\n\tdelete(\r\n\t\tdoc: Document,\r\n\t\toptions: CrudOptions<Document> = {}\r\n\t): Observable<Document> {\r\n\t\tconst obs = this.__http.post(\r\n\t\t\t`${this._url}/delete${options.name || ''}`,\r\n\t\t\tdoc\r\n\t\t);\r\n\r\n\t\tobs.subscribe({\r\n\t\t\tnext: (resp: unknown) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis._docs.splice(\r\n\t\t\t\t\t\tthis._docs.findIndex(\r\n\t\t\t\t\t\t\t(d) => this._id(d) === this._id(doc)\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\t1\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tthis.setDocs();\r\n\r\n\t\t\t\t\tthis._filterDocuments();\r\n\r\n\t\t\t\t\tif (options.callback) {\r\n\t\t\t\t\t\toptions.callback(doc);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options.alert) {\r\n\t\t\t\t\t\tthis.__alert.show({\r\n\t\t\t\t\t\t\tunique: `${this._config.name}delete`,\r\n\t\t\t\t\t\t\ttext: options.alert,\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\t\toptions.errCallback(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.__core.emit(`${this._config.name}_delete`, doc);\r\n\t\t\t},\r\n\t\t\terror: (err: unknown) => {\r\n\t\t\t\tif (options.errCallback) {\r\n\t\t\t\t\toptions.errCallback(err);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\treturn obs as Observable<Document>;\r\n\t}\r\n\r\n\t/**\r\n\t * Filters documents based on specific conditions and stores the result in a provided object.\r\n\t *\r\n\t * @param storeObject - Object to store filtered documents.\r\n\t * @param field - The field to filter by or a function to extract the field.\r\n\t * @param valid - Optional function to check the validity of a document.\r\n\t * @param sort - Function to sort the filtered documents.\r\n\t * @returns A callback function that triggers the filtering process.\r\n\t */\r\n\tfilteredDocuments(\r\n\t\tstoreObject: Record<string, Document[]>,\r\n\t\tfield: string | ((doc: Document) => string) = 'author',\r\n\t\tvalid?: (doc: Document) => boolean,\r\n\t\tsort: (a: Document, b: Document) => number = (\r\n\t\t\ta: Document,\r\n\t\t\tb: Document\r\n\t\t) => {\r\n\t\t\tif ((a as any)[this._id(a)] < (b as any)[this._id(b)]) return -1;\r\n\r\n\t\t\tif ((a as any)[this._id(a)] > (b as any)[this._id(b)]) return 1;\r\n\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t): () => void {\r\n\t\tconst callback = (): void => {\r\n\t\t\t/* remove docs if they were removed */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tfor (let i = storeObject[parentId].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tconst _field =\r\n\t\t\t\t\t\ttypeof field === 'function'\r\n\t\t\t\t\t\t\t? field(storeObject[parentId][i])\r\n\t\t\t\t\t\t\t: field;\r\n\t\t\t\t\tconst _doc: any = storeObject[parentId][i];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!this._docs.find((doc: any) =>\r\n\t\t\t\t\t\t\tArray.isArray(doc[_field])\r\n\t\t\t\t\t\t\t\t? doc[_field].includes(_doc[this._id(doc)])\r\n\t\t\t\t\t\t\t\t: doc[_field] === _doc[this._id(doc)]\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[parentId].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* add docs if they are not added */\r\n\t\t\tfor (const doc of this._docs) {\r\n\t\t\t\tconst _field = typeof field === 'function' ? field(doc) : field;\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\ttypeof valid === 'function'\r\n\t\t\t\t\t\t? !valid(doc)\r\n\t\t\t\t\t\t: Array.isArray((doc as any)[_field])\r\n\t\t\t\t\t\t? !(doc as any)[_field]?.length\r\n\t\t\t\t\t\t: !(doc as any)[_field]\r\n\t\t\t\t) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (typeof field === 'function') {\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tfield(doc) &&\r\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\r\n\t\t\t\t\t\t\t(c) => c._id === doc._id\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (Array.isArray((doc as any)[_field])) {\r\n\t\t\t\t\t(doc as any)[_field].forEach((_field: string) => {\r\n\t\t\t\t\t\tstoreObject[_field] = storeObject[_field] || [];\r\n\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t!storeObject[_field].find((c) => c._id === doc._id)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tstoreObject[_field].push(doc);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstoreObject[(doc as any)[_field]] =\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]] || [];\r\n\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\r\n\t\t\t\t\t\t\t(c) => c._id === doc._id\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* sort the array's */\r\n\t\t\tfor (const parentId in storeObject) {\r\n\t\t\t\tstoreObject[parentId].sort(sort);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis._filteredDocumentsCallbacks.push(callback);\r\n\r\n\t\treturn callback;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a unique ID for a document.\r\n\t *\r\n\t * @param doc - The document for which to generate the ID.\r\n\t * @returns The unique ID as a string.\r\n\t */\r\n\tprivate _id(doc: Document): string {\r\n\t\treturn (doc as unknown as Record<string, unknown>)[\r\n\t\t\tthis._config._id || '_id'\r\n\t\t]?.toString() as string;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes all registered filter document callbacks.\r\n\t */\r\n\tprivate _filterDocuments(): void {\r\n\t\tfor (const callback of this._filteredDocumentsCallbacks) {\r\n\t\t\tcallback();\r\n\t\t}\r\n\r\n\t\tthis.__core.complete(this._config.name + 'Loaded');\r\n\t}\r\n\r\n\tprivate _fetchingId: Record<string, boolean> = {};\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\nimport { CoreService } from './core.service';\r\nimport { Subject } from 'rxjs';\r\nimport { StoreService } from './store.service';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class MongoService {\r\n\t/*\r\n\t *\tData will be storage for all information we are pulling from waw crud.\r\n\t *\tdata['arr' + part] will host all docs from collection part in array form\r\n\t *\tdata['obj' + part] will host all docs from collection part in object form\r\n\t *\t\tand all groups collecitons provided\r\n\t *\tdata['opts' + part] will host options for docs from collection part\r\n\t *\t\tWill be initialized only inside get\r\n\t *\t\tWill be used inside push\r\n\t */\r\n\tprivate data: any = {};\r\n\tprivate socket: any = {\r\n\t\temit: (which: any, doc: any) => {\r\n\t\t\tconsole.log(which, doc, 'is not used on sockets');\r\n\t\t},\r\n\t};\r\n\t/*\r\n\t *\twaw crud connect functions\r\n\t */\r\n\tpublic config(part: any, opts: any) {\r\n\t\tif (this.data['opts' + part]) return;\r\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\r\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\r\n\t\tif (this.data['opts' + part]) {\r\n\t\t\tfor (let each in opts) {\r\n\t\t\t\tthis.data['opts' + part][each] = opts[each];\r\n\t\t\t}\r\n\t\t} else this.data['opts' + part] = opts = opts || {};\r\n\t\tif (typeof opts.use === 'string') {\r\n\t\t\topts.use = opts.use.split(' ');\r\n\t\t}\r\n\t\tif (opts.query) {\r\n\t\t\tfor (let key in opts.query) {\r\n\t\t\t\tif (typeof opts.query[key] == 'function') {\r\n\t\t\t\t\topts.query[key] = {\r\n\t\t\t\t\t\tallow: opts.query[key],\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.groups) {\r\n\t\t\tif (typeof opts.groups === 'string') {\r\n\t\t\t\topts.groups = opts.groups.split(' ');\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(opts.groups)) {\r\n\t\t\t\tlet arr = opts.groups;\r\n\t\t\t\topts.groups = {};\r\n\t\t\t\tfor (let i = 0; i < arr.length; i++) {\r\n\t\t\t\t\tif (typeof arr[i] === 'string') {\r\n\t\t\t\t\t\topts.groups[arr[i]] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (let key in arr[i]) {\r\n\t\t\t\t\t\t\tif (typeof arr[i][key] == 'function') {\r\n\t\t\t\t\t\t\t\tarr[i][key] = {\r\n\t\t\t\t\t\t\t\t\tfield: arr[i][key],\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\topts.groups[key] = arr[i][key];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (let key in opts.groups) {\r\n\t\t\t\tif (typeof opts.groups[key] == 'boolean') {\r\n\t\t\t\t\tif (opts.groups[key]) {\r\n\t\t\t\t\t\topts.groups[key] = {\r\n\t\t\t\t\t\t\tfield: function (doc: any) {\r\n\t\t\t\t\t\t\t\treturn doc[key];\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof opts.groups[key] != 'object') {\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof opts.groups[key].field != 'function') {\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (Array.isArray(this.data['obj' + part][key])) {\r\n\t\t\t\t\tconsole.warn(\r\n\t\t\t\t\t\t'You can have same field groups with query. Field ' +\r\n\t\t\t\t\t\t\tkey +\r\n\t\t\t\t\t\t\t' is not used in groups.'\r\n\t\t\t\t\t);\r\n\t\t\t\t\tdelete opts.groups[key];\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string') {\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!Array.isArray(opts.fields)) {\r\n\t\t\topts.fields = [];\r\n\t\t}\r\n\t\t// this.store.getJson('mongo' + part, data => {\r\n\t\t// \tif (data && Array.isArray(data)) {\r\n\t\t// \t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t// \t\t\tthis.push(part, data[i]);\r\n\t\t// \t\t}\r\n\t\t// \t}\r\n\t\t// });\r\n\t\treturn {\r\n\t\t\tarr: this.data['arr' + part],\r\n\t\t\tobj: this.data['obj' + part],\r\n\t\t};\r\n\t}\r\n\tpublic create(\r\n\t\tpart: any,\r\n\t\tdoc: any = undefined,\r\n\t\tcb: any = undefined,\r\n\t\topts: any = {}\r\n\t) {\r\n\t\tif (typeof doc == 'function') {\r\n\t\t\tif (cb) opts = cb;\r\n\t\t\tcb = doc;\r\n\t\t\tdoc = {};\r\n\t\t}\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\terr: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (typeof doc != 'object') doc = {};\r\n\t\tif (doc.___created && !opts.allow_multiple) return;\r\n\t\tdoc.___created = true;\r\n\t\tthis.http.post(\r\n\t\t\topts.url || '/api/' + part + '/create',\r\n\t\t\tdoc || {},\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('create', {\r\n\t\t\t\t\t\t_id: resp._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.push(part, resp);\r\n\t\t\t\t\tif (typeof cb == 'function') cb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic fetch(part: any, opts: any = undefined, cb: any = undefined) {\r\n\t\tif (\r\n\t\t\topts.query &&\r\n\t\t\topts.query._id &&\r\n\t\t\t!opts.force &&\r\n\t\t\tthis.data['obj' + part][opts.query._id]\r\n\t\t) {\r\n\t\t\treturn this.data['obj' + part][opts.query._id];\r\n\t\t}\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tthis.config(part, opts); // remove this in future\r\n\t\tlet url = '/api/' + part + '/fetch' + (opts.name || ''),\r\n\t\t\tdoc: any;\r\n\t\tif (\r\n\t\t\topts.query &&\r\n\t\t\topts.query._id &&\r\n\t\t\tthis.data['obj' + part][opts.query._id]\r\n\t\t) {\r\n\t\t\tdoc = this.data['obj' + part][opts.query._id];\r\n\t\t} else {\r\n\t\t\tdoc = {};\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\topts.query || {},\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (!resp) return cb && cb(false);\r\n\t\t\t\tfor (let each in resp) {\r\n\t\t\t\t\tdoc[each] = resp[each];\r\n\t\t\t\t}\r\n\t\t\t\tfor (let each in doc) {\r\n\t\t\t\t\tdoc[each] = resp[each];\r\n\t\t\t\t}\r\n\t\t\t\tthis.push(part, doc);\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(doc);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t\treturn doc;\r\n\t}\r\n\tpublic get(part: any, opts: any = undefined, cb: any = undefined) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (!opts) opts = {};\r\n\t\tthis.config(part, opts); // remove this in future\r\n\t\tlet url =\r\n\t\t\t'/api/' + part + '/get' + (opts.name || '') + (opts.param || '');\r\n\t\tthis.http.get(\r\n\t\t\topts.url || url,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (Array.isArray(resp)) {\r\n\t\t\t\t\tfor (let i = 0; i < resp.length; i++) {\r\n\t\t\t\t\t\tthis.push(part, resp[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!opts.paginate) {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i = 0;\r\n\t\t\t\t\t\t\ti < this.data['arr' + part].length;\r\n\t\t\t\t\t\t\ti++\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tlet remove = true;\r\n\t\t\t\t\t\t\tfor (let j = 0; j < resp.length; j++) {\r\n\t\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t\tresp[j]._id ===\r\n\t\t\t\t\t\t\t\t\tthis.data['arr' + part][i]._id\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tremove = false;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (remove) {\r\n\t\t\t\t\t\t\t\tthis.remove(part, this.data['arr' + part][i]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof cb == 'function')\r\n\t\t\t\t\t\tcb(\r\n\t\t\t\t\t\t\tthis.data['arr' + part],\r\n\t\t\t\t\t\t\tthis.data['obj' + part],\r\n\t\t\t\t\t\t\topts.name || '',\r\n\t\t\t\t\t\t\tresp\r\n\t\t\t\t\t\t);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(\r\n\t\t\t\t\t\tthis.data['arr' + part],\r\n\t\t\t\t\t\tthis.data['obj' + part],\r\n\t\t\t\t\t\topts.name || '',\r\n\t\t\t\t\t\tresp\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['loaded' + part] = true;\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t\treturn this.data['arr' + part];\r\n\t}\r\n\tpublic set(part: any, opts: any = undefined, resp: any = undefined) {\r\n\t\tif (Array.isArray(opts)) {\r\n\t\t\tresp = opts;\r\n\t\t\topts = undefined;\r\n\t\t}\r\n\t\tif (opts) this.config(part, opts);\r\n\t\tif (Array.isArray(resp)) {\r\n\t\t\tfor (let i = 0; i < resp.length; i++) {\r\n\t\t\t\tthis.push(part, resp[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tarr: this.data['arr' + part],\r\n\t\t\tobj: this.data['obj' + part],\r\n\t\t};\r\n\t}\r\n\tprivate prepare_update(part: any, doc: any, opts: any) {\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string')\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\tlet _doc: any = {};\r\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\r\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\r\n\t\t\t}\r\n\t\t\tdoc = _doc;\r\n\t\t} else this.renew(part, doc);\r\n\t\tif (\r\n\t\t\ttypeof opts.rewrite == 'object' &&\r\n\t\t\tObject.values(opts.rewrite).length\r\n\t\t) {\r\n\t\t\tdoc = JSON.parse(JSON.stringify(doc));\r\n\t\t\tfor (let key in opts.rewrite) {\r\n\t\t\t\tthis.replace(doc, key, opts.rewrite[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn doc;\r\n\t}\r\n\tpublic update(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts != 'object') opts = {};\r\n\t\tdoc = this.prepare_update(part, doc, opts);\r\n\t\tlet url = '/api/' + part + '/update' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('update', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic unique(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts != 'object') opts = {};\r\n\t\tdoc = this.prepare_update(part, doc, opts);\r\n\t\tlet url = '/api/' + part + '/unique' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('update', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlet current_doc = this.data['obj' + part][doc._id];\r\n\t\t\t\t\tfor (let each in doc) {\r\n\t\t\t\t\t\tcurrent_doc[each] = doc[each];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.renew(part, current_doc);\r\n\t\t\t\t}\r\n\t\t\t\tif (\r\n\t\t\t\t\t(resp || typeof resp === 'string') &&\r\n\t\t\t\t\ttypeof cb == 'function'\r\n\t\t\t\t) {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic delete(\r\n\t\tpart: any,\r\n\t\tdoc: any,\r\n\t\topts: any = undefined,\r\n\t\tcb: any = undefined\r\n\t) {\r\n\t\tif (typeof opts == 'function') {\r\n\t\t\tcb = opts;\r\n\t\t\topts = {};\r\n\t\t}\r\n\t\tif (typeof opts !== 'object') opts = {};\r\n\t\tif (opts.fields) {\r\n\t\t\tif (typeof opts.fields === 'string')\r\n\t\t\t\topts.fields = opts.fields.split(' ');\r\n\t\t\tlet _doc: any = {};\r\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\r\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\r\n\t\t\t}\r\n\t\t\tdoc = _doc;\r\n\t\t} else {\r\n\t\t\tdoc = {\r\n\t\t\t\t_id: doc._id,\r\n\t\t\t};\r\n\t\t}\r\n\t\tlet url = '/api/' + part + '/delete' + (opts.name || '');\r\n\t\tthis.http.post(\r\n\t\t\topts.url || url,\r\n\t\t\tdoc,\r\n\t\t\t(resp) => {\r\n\t\t\t\tif (resp) {\r\n\t\t\t\t\tthis.socket.emit('delete', {\r\n\t\t\t\t\t\t_id: doc._id,\r\n\t\t\t\t\t\tpart: part,\r\n\t\t\t\t\t});\r\n\t\t\t\t\tthis.remove(part, doc);\r\n\t\t\t\t}\r\n\t\t\t\tif (resp && typeof cb == 'function') {\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t} else if (typeof cb == 'function') {\r\n\t\t\t\t\tcb(false);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\turl: opts.base_url || this.http.url,\r\n\t\t\t}\r\n\t\t);\r\n\t}\r\n\tpublic _id(cb: any) {\r\n\t\tif (typeof cb == 'function') {\r\n\t\t\tthis.http.get('/waw/newId', cb);\r\n\t\t}\r\n\t}\r\n\tpublic to_id(docs: any) {\r\n\t\tif (!docs) return [];\r\n\t\tif (Array.isArray(docs)) {\r\n\t\t\tdocs = docs.slice();\r\n\t\t} else if (typeof docs == 'object') {\r\n\t\t\tif (docs._id) return [docs._id];\r\n\t\t\tlet _docs = [];\r\n\t\t\tfor (let key in docs) {\r\n\t\t\t\tif (docs[key]) _docs.push(docs[key]._id || docs[key]);\r\n\t\t\t}\r\n\t\t\tdocs = _docs;\r\n\t\t}\r\n\t\tfor (let i = 0; i < docs.length; ++i) {\r\n\t\t\tif (docs[i]) docs[i] = docs[i]._id || docs[i];\r\n\t\t}\r\n\t\treturn docs;\r\n\t}\r\n\tpublic afterWhile(doc: any, cb: any, time = 1000) {\r\n\t\tif (typeof cb == 'function' && typeof time == 'number') {\r\n\t\t\tclearTimeout(doc.__updateTimeout);\r\n\t\t\tdoc.__updateTimeout = setTimeout(cb, time);\r\n\t\t}\r\n\t}\r\n\tpublic populate(doc: any, field: any, part: any): any {\r\n\t\tif (!doc || !field || !part) return;\r\n\t\tif (Array.isArray(doc)) {\r\n\t\t\tfor (let i = 0; i < doc.length; i++) {\r\n\t\t\t\tthis.populate(doc[i], field, part);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (this.data['loaded' + part]) {\r\n\t\t\tif (Array.isArray(field)) {\r\n\t\t\t\tfor (let i = 0; i < field.length; i++) {\r\n\t\t\t\t\tthis.populate(doc, field[i], part);\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else if (field.indexOf('.') > -1) {\r\n\t\t\t\tfield = field.split('.');\r\n\t\t\t\tlet sub = field.shift();\r\n\t\t\t\tif (typeof doc[sub] != 'object') return;\r\n\t\t\t\treturn this.populate(doc[sub], field.join('.'), part);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(doc[field])) {\r\n\t\t\t\tfor (let i = doc[field].length - 1; i >= 0; i--) {\r\n\t\t\t\t\tif (this.data['obj' + part][doc[field][i]]) {\r\n\t\t\t\t\t\tdoc[field][i] = this.data['obj' + part][doc[field][i]];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdoc[field].splice(i, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else if (typeof doc[field] === 'string') {\r\n\t\t\t\tdoc[field] = this.data['obj' + part][doc[field]] || null;\r\n\t\t\t} else return;\r\n\t\t} else {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.populate(doc, field, part);\r\n\t\t\t}, 100);\r\n\t\t}\r\n\t}\r\n\tpublic on(parts: any, cb: any): any {\r\n\t\tif (typeof parts === 'string') {\r\n\t\t\tparts = parts.split(' ');\r\n\t\t}\r\n\t\tfor (var i = 0; i < parts.length; i++) {\r\n\t\t\tif (!this.data['loaded' + parts[i]]) {\r\n\t\t\t\treturn setTimeout(() => {\r\n\t\t\t\t\tthis.on(parts, cb);\r\n\t\t\t\t}, 100);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcb(this.data);\r\n\t}\r\n\tpublic track(index: any, doc: any) {\r\n\t\treturn (doc && doc._id && doc._id) || index;\r\n\t}\r\n\t/*\r\n\t *\tmongo sort filters\r\n\t */\r\n\tpublic sortAscId() {\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a._id > b._id) return 1;\r\n\t\t\telse return -1;\r\n\t\t};\r\n\t}\r\n\tpublic sortDescId() {\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a._id < b._id) return 1;\r\n\t\t\telse return -1;\r\n\t\t};\r\n\t}\r\n\tpublic sortAscString(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].toLowerCase() > b[opts.field].toLowerCase())\r\n\t\t\t\treturn 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].toLowerCase() < b[opts.field].toLowerCase() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescString(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].toLowerCase() < b[opts.field].toLowerCase())\r\n\t\t\t\treturn 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].toLowerCase() > b[opts.field].toLowerCase() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscDate(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].getTime() > b[opts.field].getTime()) return 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].getTime() < b[opts.field].getTime() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescDate(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field].getTime() < b[opts.field].getTime()) return 1;\r\n\t\t\telse if (\r\n\t\t\t\ta[opts.field].getTime() > b[opts.field].getTime() ||\r\n\t\t\t\t!opts.next\r\n\t\t\t)\r\n\t\t\t\treturn -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscNumber(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] > b[opts.field]) return 1;\r\n\t\t\telse if (a[opts.field] < b[opts.field] || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescNumber(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] < b[opts.field]) return 1;\r\n\t\t\telse if (a[opts.field] > b[opts.field] || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortAscBoolean(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (!a[opts.field] && b[opts.field]) return 1;\r\n\t\t\telse if ((a[opts.field] && !b[opts.field]) || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\tpublic sortDescBoolean(opts: any) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = {\r\n\t\t\t\tfield: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn function (a: any, b: any) {\r\n\t\t\tif (a[opts.field] && !b[opts.field]) return 1;\r\n\t\t\telse if ((!a[opts.field] && b[opts.field]) || !opts.next) return -1;\r\n\t\t\telse return opts.next(a, b);\r\n\t\t};\r\n\t}\r\n\t/*\r\n\t *\tmongo replace filters\r\n\t */\r\n\tpublic beArr(val: any, cb: any) {\r\n\t\tif (!Array.isArray(val)) cb([]);\r\n\t\telse cb(val);\r\n\t}\r\n\tpublic beObj(val: any, cb: any) {\r\n\t\tif (typeof val != 'object' || Array.isArray(val) || !val) {\r\n\t\t\tval = {};\r\n\t\t}\r\n\t\tcb(val);\r\n\t}\r\n\tpublic beDate(val: any, cb: any) {\r\n\t\tcb(new Date(val));\r\n\t}\r\n\tpublic beString(val: any, cb: any) {\r\n\t\tif (typeof val != 'string') {\r\n\t\t\tval = '';\r\n\t\t}\r\n\t\tcb(val);\r\n\t}\r\n\tpublic beDoc = (val: any, cb: any) => {\r\n\t\tthis.beObj(val, (val: any) => {\r\n\t\t\tif (!val._id) {\r\n\t\t\t\tthis._id((_id: any) => {\r\n\t\t\t\t\tval._id = _id;\r\n\t\t\t\t\tcb(val);\r\n\t\t\t\t});\r\n\t\t\t} else cb(val);\r\n\t\t});\r\n\t};\r\n\tpublic forceArr(val: any, cb: any) {\r\n\t\tcb([]);\r\n\t}\r\n\tpublic forceObj(val: any, cb: any) {\r\n\t\tcb({});\r\n\t}\r\n\tpublic forceString(val: any, cb: any) {\r\n\t\tcb('');\r\n\t}\r\n\tpublic forceDoc = (val: any, cb: any) => {\r\n\t\tthis._id((_id: any) => {\r\n\t\t\tcb({\r\n\t\t\t\t_id: _id,\r\n\t\t\t});\r\n\t\t});\r\n\t};\r\n\tpublic getCreated(val: any, cb: any, doc: any) {\r\n\t\tcb(new Date(parseInt(doc._id.substring(0, 8), 16) * 1000));\r\n\t}\r\n\t/*\r\n\t *\tmongo local support functions\r\n\t */\r\n\tprivate replace(doc: any, value: any, rpl: any): any {\r\n\t\tif (value.indexOf('.') > -1) {\r\n\t\t\tvalue = value.split('.');\r\n\t\t\tlet sub = value.shift();\r\n\t\t\tif (\r\n\t\t\t\tdoc[sub] &&\r\n\t\t\t\t(typeof doc[sub] != 'object' || Array.isArray(doc[sub]))\r\n\t\t\t)\r\n\t\t\t\treturn;\r\n\t\t\tif (!doc[sub]) doc[sub] = {};\r\n\t\t\treturn this.replace(doc[sub], value.join('.'), rpl);\r\n\t\t}\r\n\t\tif (typeof rpl == 'function') {\r\n\t\t\trpl(\r\n\t\t\t\tdoc[value],\r\n\t\t\t\tfunction (newValue: any) {\r\n\t\t\t\t\tdoc[value] = newValue;\r\n\t\t\t\t},\r\n\t\t\t\tdoc\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\tpublic renew(part: any, doc: any) {\r\n\t\tif (!this.data['obj' + part][doc._id]) return this.push(part, doc);\r\n\t\tif (this.data['opts' + part].replace) {\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let each in this.data['obj' + part][doc._id]) {\r\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\r\n\t\t}\r\n\t\tfor (let each in doc) {\r\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\r\n\t\t}\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let each in doc) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tlet to_have = true;\r\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\r\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t\t}\r\n\t\t\t\tlet fields: any = {};\r\n\t\t\t\tlet set = (field: any) => {\r\n\t\t\t\t\tfields[field] = true;\r\n\t\t\t\t\tif (!field) return;\r\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (to_have) {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i =\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\t\ti--\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (\r\n\t\t\t\t\t\t\tlet i =\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\t\ti--\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(\r\n\t\t\t\t\t\t\t\t\ti,\r\n\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (typeof g.sort == 'function') {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tset(g.field(doc, set.bind(this)));\r\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\r\n\t\t\t\t\tif (fields[field]) continue;\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tlet to_have = true;\r\n\t\t\t\tlet query = this.data['opts' + part].query[key];\r\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\r\n\t\t\t\t\tto_have = false;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t\t}\r\n\t\t\t\tif (to_have) {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id)\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.data['obj' + part][key].push(doc);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof query.sort == 'function') {\r\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tpublic push(part: any, doc: any): any {\r\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\r\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\r\n\t\tif (!this.data['opts' + part]) this.data['opts' + part] = {};\r\n\t\tif (this.data['obj' + part][doc._id]) return this.renew(part, doc);\r\n\t\tif (this.data['opts' + part].replace) {\r\n\t\t\tfor (let key in this.data['opts' + part].replace) {\r\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].populate) {\r\n\t\t\tlet p = this.data['opts' + part].populate;\r\n\t\t\tif (Array.isArray(p)) {\r\n\t\t\t\tfor (let i = 0; i < p.length; i++) {\r\n\t\t\t\t\tif (typeof p == 'object' && p[i].field && p[i].part) {\r\n\t\t\t\t\t\tthis.populate(doc, p[i].field, p[i].part);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (typeof p == 'object' && p.field && p.part) {\r\n\t\t\t\tthis.populate(doc, p.field, p.part);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.data['arr' + part].push(doc);\r\n\t\tif (this.data['opts' + part].sort) {\r\n\t\t\tthis.data['arr' + part].sort(this.data['opts' + part].sort);\r\n\t\t}\r\n\t\tthis.data['obj' + part][doc._id] = doc;\r\n\t\tif (Array.isArray(this.data['opts' + part].use)) {\r\n\t\t\tfor (let i = 0; i < this.data['opts' + part].use.length; i++) {\r\n\t\t\t\tthis.data['obj' + part][doc[this.data['opts' + part].use[i]]] =\r\n\t\t\t\t\tdoc;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\r\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc)) continue;\r\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc)) continue;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = {};\r\n\t\t\t\t}\r\n\t\t\t\tlet set = (field: any) => {\r\n\t\t\t\t\tif (!field) return;\r\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\r\n\t\t\t\t\tif (typeof g.sort == 'function') {\r\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tset(\r\n\t\t\t\t\tg.field(doc, (field: any) => {\r\n\t\t\t\t\t\tset(field);\r\n\t\t\t\t\t})\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tlet query = this.data['opts' + part].query[key];\r\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tif (!this.data['obj' + part][key]) {\r\n\t\t\t\t\tthis.data['obj' + part][key] = [];\r\n\t\t\t\t}\r\n\t\t\t\tthis.data['obj' + part][key].push(doc);\r\n\t\t\t\tif (typeof query.sort == 'function') {\r\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor (let each in doc) {\r\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// this.store.setJson('mongo' + part, this.data['arr' + part]);\r\n\t}\r\n\tpublic remove(part: any, doc: any) {\r\n\t\tif (!Array.isArray(this.data['arr' + part])) return;\r\n\t\tfor (let i = 0; i < this.data['arr' + part].length; i++) {\r\n\t\t\tif (this.data['arr' + part][i]._id == doc._id) {\r\n\t\t\t\tthis.data['arr' + part].splice(i, 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete this.data['obj' + part][doc._id];\r\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\r\n\t\t\tconst field = this.data['opts' + part].fields[i];\r\n\t\t\tdelete this.data['obj' + part][doc[field]];\r\n\t\t}\r\n\t\tif (this.data['opts' + part].groups) {\r\n\t\t\tfor (let key in this.data['opts' + part].groups) {\r\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\r\n\t\t\t\t\tfor (\r\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\r\n\t\t\t\t\t\ti >= 0;\r\n\t\t\t\t\t\ti--\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\r\n\t\t\t\t\t\t\tdoc._id\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this.data['opts' + part].query) {\r\n\t\t\tfor (let key in this.data['opts' + part].query) {\r\n\t\t\t\tfor (\r\n\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\r\n\t\t\t\t\ti >= 0;\r\n\t\t\t\t\ti--\r\n\t\t\t\t) {\r\n\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\r\n\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t/*\r\n\t *\tEndof Mongo Service\r\n\t */\r\n\tconstructor(\r\n\t\tprivate store: StoreService,\r\n\t\tprivate http: HttpService,\r\n\t\tprivate core: CoreService\r\n\t) {\r\n\t\tconsole.warn('Mongo Service is deprecated');\r\n\r\n\t\tthis.core.onComplete('socket').then((socket: any) => {\r\n\t\t\tthis.socket = socket;\r\n\t\t\tsocket.on('create', (created: any) => {\r\n\t\t\t\tthis.fetch(created.part, {\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t\tquery: {\r\n\t\t\t\t\t\t_id: created._id,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tsocket.on('update', (updated: any) => {\r\n\t\t\t\tthis.fetch(updated.part, {\r\n\t\t\t\t\tforce: true,\r\n\t\t\t\t\tquery: {\r\n\t\t\t\t\t\t_id: updated._id,\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\tsocket.on('delete', (deleted: any) => {\r\n\t\t\t\tthis.remove(deleted.part, deleted);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class RenderService {\r\n\t/**\r\n\t * A dictionary to store event callbacks.\r\n\t * Each event has an array of callback functions that will be executed when the event is triggered.\r\n\t */\r\n\tprivate _pipes: Record<string, ((param: unknown) => void)[]> = {};\r\n\r\n\t/**\r\n\t * Registers a callback function to an event.\r\n\t *\r\n\t * @param event - The name of the event to listen for.\r\n\t * @param cb - The callback function to execute when the event is triggered.\r\n\t * @returns A function to unregister the callback from the event.\r\n\t */\r\n\ton(event: string, cb: () => void): () => void {\r\n\t\tthis._pipes[event] = this._pipes[event] || [];\r\n\t\tthis._pipes[event].push(cb);\r\n\r\n\t\tconst index = this._pipes[event].length - 1;\r\n\r\n\t\treturn () => {\r\n\t\t\tthis._pipes[event][index] = () => {};\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Triggers an event and executes all registered callback functions for that event.\r\n\t *\r\n\t * @param event - The name of the event to trigger.\r\n\t * @param param - An optional parameter to pass to the callback functions.\r\n\t */\r\n\trender(event: string = '', param: unknown = null): void {\r\n\t\tif (!this._pipes[event]) return;\r\n\r\n\t\tfor (let i = 0; i < this._pipes[event].length; i++) {\r\n\t\t\tif (typeof this._pipes[event][i] === 'function') {\r\n\t\t\t\tthis._pipes[event][i](param);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class HashService {\r\n\tprivate replacements = [\r\n\t\t{\r\n\t\t\tfrom: '%20',\r\n\t\t\tto: ' ',\r\n\t\t},\r\n\t];\r\n\tpublic hash: { [key: string]: string } = {};\r\n\tprivate done: boolean = false;\r\n\r\n\tconstructor(private core: CoreService) {\r\n\t\tthis.initialize();\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes the hash service by loading the current hash from the URL.\r\n\t */\r\n\tprivate initialize(): void {\r\n\t\tif (!this.core.window.location.hash) {\r\n\t\t\tthis.done = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.load();\r\n\t\tthis.done = true;\r\n\t}\r\n\r\n\t/**\r\n\t * Loads the current hash from the URL into the hash object.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tthis.hash = {};\r\n\t\tconst hashArray = this.core.window.location.hash\r\n\t\t\t.replace('#!#', '')\r\n\t\t\t.replace('#', '')\r\n\t\t\t.split('&');\r\n\r\n\t\tfor (const hashItem of hashArray) {\r\n\t\t\tlet [holder, value] = hashItem.split('=');\r\n\t\t\tholder = this.applyReplacements(holder);\r\n\t\t\tvalue = this.applyReplacements(value);\r\n\t\t\tthis.hash[holder] = value;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Applies replacements to a given string based on the replacements array.\r\n\t *\r\n\t * @param str - The string to apply replacements to.\r\n\t * @returns The string with replacements applied.\r\n\t */\r\n\tprivate applyReplacements(str: string | undefined): string {\r\n\t\tif (!str) return '';\r\n\t\tfor (const replacement of this.replacements) {\r\n\t\t\tstr = str.split(replacement.from).join(replacement.to);\r\n\t\t}\r\n\t\treturn str;\r\n\t}\r\n\r\n\t/**\r\n\t * Executes a callback with the value of a specific hash field once the hash is loaded.\r\n\t *\r\n\t * @param field - The hash field to get the value for.\r\n\t * @param cb - The callback to execute with the value.\r\n\t */\r\n\ton(field: string, cb: (value: string) => void): void {\r\n\t\tif (!this.done) {\r\n\t\t\tsetTimeout(() => this.on(field, cb), 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcb(this.hash[field]);\r\n\t}\r\n\r\n\t/**\r\n\t * Saves the current hash object to the URL.\r\n\t */\r\n\tsave(): void {\r\n\t\tconst hash = Object.entries(this.hash)\r\n\t\t\t.map(([key, value]) => `${key}=${value}`)\r\n\t\t\t.join('&');\r\n\t\tthis.core.window.location.hash = hash;\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a value for a specific hash field and updates the URL.\r\n\t *\r\n\t * @param field - The hash field to set the value for.\r\n\t * @param value - The value to set.\r\n\t */\r\n\tset(field: string, value: string): void {\r\n\t\tthis.hash[field] = value;\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Gets the value of a specific hash field.\r\n\t *\r\n\t * @param field - The hash field to get the value for.\r\n\t * @returns The value of the hash field.\r\n\t */\r\n\tget(field: string): string | undefined {\r\n\t\treturn this.hash[field];\r\n\t}\r\n\r\n\t/**\r\n\t * Clears a specific hash field or all hash fields and updates the URL.\r\n\t *\r\n\t * @param field - The hash field to clear. If not provided, clears all hash fields.\r\n\t */\r\n\tclear(field?: string): void {\r\n\t\tif (field) {\r\n\t\t\tdelete this.hash[field];\r\n\t\t} else {\r\n\t\t\tthis.hash = {};\r\n\t\t}\r\n\t\tthis.save();\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { LoaderComponent } from '../components/loader/loader.component';\r\nimport { DomService } from './dom.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class LoaderService {\r\n\tpublic loaders: any = [];\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {}\r\n\tshow(opts?: any) {\r\n\t\tlet component: any;\r\n\t\topts.close = () => {\r\n\t\t\tif (component) component.componentRef.destroy();\r\n\t\t\tcomponent.nativeElement.remove();\r\n\t\t\tif (typeof opts.onClose == 'function') opts.onClose();\r\n\t\t};\r\n\t\tif (opts.append) {\r\n\t\t\tcomponent = this.dom.appendComponent(\r\n\t\t\t\tLoaderComponent,\r\n\t\t\t\topts,\r\n\t\t\t\topts.append\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tcomponent = this.dom.appendComponent(LoaderComponent, opts);\r\n\t\t}\r\n\t\tthis.loaders.push(component);\r\n\t\treturn component.nativeElement;\r\n\t}\r\n\tdestroy() {\r\n\t\tfor (let i = this.loaders.length - 1; i >= 0; i--) {\r\n\t\t\tthis.loaders[i].componentRef.destroy();\r\n\t\t\tthis.loaders.splice(i, 1);\r\n\t\t}\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\r\nimport { CoreService } from './core.service';\r\nimport * as io from 'socket.io-client';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class SocketService {\r\n\tprivate _url = '';\r\n\tprivate _io: any;\r\n\tprivate _connected = false;\r\n\tprivate _opts: any = {};\r\n\r\n\tconstructor(\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config,\r\n\t\tprivate _core: CoreService\r\n\t) {\r\n\t\tthis._url = this._core.window.location.origin.replace('4200', '8080');\r\n\t\tif (!this._config) this._config = DEFAULT_CONFIG;\r\n\r\n\t\tif (typeof this._config.socket === 'object') {\r\n\t\t\tif (this._config.socket.url) {\r\n\t\t\t\tthis._url = this._config.socket.url;\r\n\t\t\t}\r\n\r\n\t\t\tif (this._config.socket.opts) {\r\n\t\t\t\tthis._opts = this._config.socket.opts;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._config.socket) {\r\n\t\t\tthis.load();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Sets the URL for the WebSocket connection and reloads the socket.\r\n\t * @param url - The URL of the WebSocket server.\r\n\t */\r\n\tsetUrl(url: string): void {\r\n\t\tthis._url = url;\r\n\t\tif (!this._config.socket) {\r\n\t\t\tthis._config.socket = true;\r\n\t\t}\r\n\t\tthis.load();\r\n\t}\r\n\r\n\t/**\r\n\t * Loads and initializes the WebSocket connection.\r\n\t */\r\n\tprivate load(): void {\r\n\t\tif (io) {\r\n\t\t\tconst ioFunc = (io as any).default ? (io as any).default : io;\r\n\t\t\tthis._io = ioFunc(this._url, this._opts);\r\n\t\t\tthis._io.on('connect', () => {\r\n\t\t\t\tthis._connected = true;\r\n\t\t\t\tthis._core.complete('socket');\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Subscribes to a WebSocket event.\r\n\t * @param to - The event to subscribe to.\r\n\t * @param cb - The callback function to execute when the event is received.\r\n\t */\r\n\ton(to: string, cb: (message: any) => void = () => {}): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.on(to, cb);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.on(to, cb);\r\n\t}\r\n\r\n\t/**\r\n\t * Emits a message to a WebSocket event.\r\n\t * @param to - The event to emit the message to.\r\n\t * @param message - The message to emit.\r\n\t * @param room - Optional room to emit the message to.\r\n\t */\r\n\temit(to: string, message: any, room: any = false): void {\r\n\t\tif (!this._config.socket) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this._connected) {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis.emit(to, message, room);\r\n\t\t\t}, 100);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._io.emit(to, message, room);\r\n\t}\r\n}\r\n","import { Injectable, Inject, Optional } from '@angular/core';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { ModalComponent } from '../components/modal/modal.component';\r\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\r\nimport { Modal } from '../interfaces/modal.interface';\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class ModalService {\r\n\tprivate _modal: any;\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\r\n\t) {\r\n\t\tif (!this.config) this.config = {};\r\n\t\tif (!this.config.modal) this.config.modal = {};\r\n\t\tif (!this.config.modal.modals) this.config.modal.modals = {};\r\n\t\tthis._modal = config.modal;\r\n\t}\r\n\r\n\tshow(opts: Modal | any) {\r\n\t\tif (this.locked) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (!opts || typeof opts != 'object') opts = {};\r\n\t\tif (\r\n\t\t\ttypeof opts.component == 'string' &&\r\n\t\t\tthis._modal.modals[opts.component]\r\n\t\t) {\r\n\t\t\topts.component = this._modal.modals[opts.component];\r\n\t\t}\r\n\t\tif (typeof opts.component != 'function') {\r\n\t\t\tconsole.log('This component does not exists.');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!opts.class) opts.class = '';\r\n\t\tfor (let each in this.config.modal) {\r\n\t\t\tif (each == 'class')\r\n\t\t\t\topts.class +=\r\n\t\t\t\t\t((opts.class && ' ') || '') + this.config.modal.class;\r\n\t\t\telse if (!opts[each]) opts[each] = this._modal[each];\r\n\t\t}\r\n\t\topts.id = Math.floor(Math.random() * Date.now()) + Date.now();\r\n\t\tthis.opened[opts.id] = opts;\r\n\t\tthis.core.document.body.classList.add('modalOpened');\r\n\t\tlet component: any;\r\n\t\tlet content: any;\r\n\t\topts.close = () => {\r\n\t\t\tcontent.componentRef.destroy();\r\n\t\t\tcomponent.nativeElement.remove();\r\n\t\t\tif (typeof opts.onClose == 'function') opts.onClose();\r\n\t\t\tdelete this.opened[opts.id];\r\n\t\t\tif (!Object.keys(this.opened).length) {\r\n\t\t\t\tthis.core.document.body.classList.remove('modalOpened');\r\n\t\t\t}\r\n\t\t};\r\n\t\tif (typeof opts.timeout == 'number' && opts.timeout > 0) {\r\n\t\t\tsetTimeout(opts.close, opts.timeout);\r\n\t\t}\r\n\t\tcomponent = this.dom.appendComponent(ModalComponent, opts);\r\n\t\tcontent = this.dom.appendComponent(\r\n\t\t\topts.component,\r\n\t\t\topts,\r\n\t\t\tcomponent.nativeElement.children[0].children[0]\r\n\t\t\t\t.children[0] as HTMLElement\r\n\t\t);\r\n\t\treturn component.nativeElement;\r\n\t}\r\n\topen(opts: Modal) {\r\n\t\tthis.show(opts);\r\n\t}\r\n\tsmall(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'small';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tmid(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'mid';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tbig(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'big';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tfull(opts: Modal) {\r\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\r\n\t\t\topts = {\r\n\t\t\t\tcomponent: opts,\r\n\t\t\t};\r\n\t\t}\r\n\t\topts.size = 'full';\r\n\t\tthis.show(opts);\r\n\t}\r\n\tprivate opened: any = {};\r\n\tlocked = false;\r\n\tdestroy() {\r\n\t\tif (this.locked) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor (let each in this.opened) {\r\n\t\t\tthis.opened[each].close();\r\n\t\t}\r\n\t\tthis.core.document.body.classList.remove('modalOpened');\r\n\t}\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n\tselector: 'lib-files',\r\n\ttemplateUrl: './files.component.html',\r\n\tstyleUrls: ['./files.component.scss'],\r\n\tstandalone: false,\r\n})\r\nexport class FilesComponent {\r\n\tpublic fs: any;\r\n\tconstructor() {}\r\n}\r\n","<ng-container *ngFor=\"let file of fs.files\">\r\n\t<input\r\n\t\t[id]=\"file.id\"\r\n\t\ttype=\"file\"\r\n\t\tname=\"file\"\r\n\t\t(change)=\"fs.change($event, file); input.value = ''\"\r\n\t\t#input\r\n\t\t[hidden]=\"true\"\r\n\t\t[accept]=\"file.accept || (file.part && 'image/*') || ''\"\r\n\t\t[multiple]=\"(file.multiple && true) || ''\"\r\n\t/>\r\n</ng-container>\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\nimport { DomService } from './dom.service';\r\nimport { CoreService } from './core.service';\r\nimport { FilesComponent } from '../components/files/files.component';\r\n\r\ninterface FileOptions {\r\n\tid: string;\r\n\ttype?: string;\r\n\tresize?: number | { width: number; height: number };\r\n\tmultiple?: boolean;\r\n\tmultiple_cb?: (files: { dataUrl: string; file: File }[]) => void;\r\n\tcb?: (dataUrl: string | false, file: File) => void;\r\n\tsave?: boolean;\r\n\tcomplete?: () => void;\r\n\tapi?: string;\r\n\tpart?: string;\r\n\tname?: string;\r\n\tbody?: () => object | object;\r\n\tresp?: (response: any) => void;\r\n\tappend?: (formData: FormData, files: File[]) => void;\r\n\tmultiple_files?: { dataUrl: string; file: File }[];\r\n\tmultiple_counter?: number;\r\n\turl?: string;\r\n}\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class FileService {\r\n\tprivate added: Record<string, FileOptions> = {};\r\n\tprivate files: FileOptions[] = [];\r\n\r\n\tconstructor(\r\n\t\tprivate dom: DomService,\r\n\t\tprivate core: CoreService,\r\n\t\tprivate http: HttpService\r\n\t) {\r\n\t\tthis.dom.appendComponent(FilesComponent, {\r\n\t\t\tfs: this,\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a file input configuration.\r\n\t *\r\n\t * @param opts - The file options.\r\n\t */\r\n\tpublic add(opts: FileOptions | string): void | (() => void) {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = { id: opts };\r\n\t\t}\r\n\r\n\t\tif (!opts.id) {\r\n\t\t\tconsole.log('You have to pass ID into file object');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\topts.type = opts.type || 'image';\r\n\r\n\t\tif (typeof opts.resize === 'number') {\r\n\t\t\topts.resize = { width: opts.resize, height: opts.resize };\r\n\t\t}\r\n\r\n\t\tif (this.added[opts.id]) {\r\n\t\t\tthis.files = this.files.filter((file) => file.id !== opts.id);\r\n\t\t}\r\n\r\n\t\tthis.files.push(opts);\r\n\t\tthis.added[opts.id] = opts;\r\n\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\topts.complete?.();\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Handles file input change event.\r\n\t *\r\n\t * @param event - The input change event.\r\n\t * @param info - The file options.\r\n\t */\r\n\tpublic change(event: Event, info: FileOptions): void {\r\n\t\tconst input = event.target as HTMLInputElement;\r\n\t\tif (!input.files) return;\r\n\r\n\t\tif (info.type === 'image') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tif (info.multiple_cb) {\r\n\t\t\t\t\tinfo.multiple_files = [];\r\n\t\t\t\t\tinfo.multiple_counter = input.files.length;\r\n\t\t\t\t}\r\n\t\t\t\tArray.from(input.files).forEach((file) =>\r\n\t\t\t\t\tthis.process(file, info)\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tthis.process(input.files[0], info);\r\n\t\t\t}\r\n\t\t} else if (info.type === 'file') {\r\n\t\t\tif (info.multiple) {\r\n\t\t\t\tinfo.multiple_cb?.(\r\n\t\t\t\t\tArray.from(input.files).map((file) => ({\r\n\t\t\t\t\t\tdataUrl: '',\r\n\t\t\t\t\t\tfile,\r\n\t\t\t\t\t}))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tArray.from(input.files).forEach((file) => info.cb?.('', file));\r\n\t\t\tif (info.part || info.url) {\r\n\t\t\t\tthis.uploadFiles(info, input.files as any);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.log('Provide type `image` or `file`');\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Removes a file.\r\n\t *\r\n\t * @param part - The part of the API.\r\n\t * @param url - The URL of the file.\r\n\t * @param opts - Additional options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic remove(\r\n\t\tpart: string,\r\n\t\turl: string,\r\n\t\topts: any = {},\r\n\t\tcb: (resp: any) => void = () => {}\r\n\t): void | (() => void) {\r\n\t\topts.url = url;\r\n\t\tif (opts.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(\r\n\t\t\t\t\topts.api || `/api/${part}/file/delete`,\r\n\t\t\t\t\topts,\r\n\t\t\t\t\tcb\r\n\t\t\t\t);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads files to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param files - The files to upload.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic uploadFiles(\r\n\t\tinfo: FileOptions,\r\n\t\tfiles: File[],\r\n\t\tcb: (resp: any) => void = () => {}\r\n\t): void {\r\n\t\tconst formData = new FormData();\r\n\r\n\t\tif (info.append) {\r\n\t\t\tinfo.append(formData, files);\r\n\t\t} else {\r\n\t\t\tfiles.forEach((file, index) =>\r\n\t\t\t\tformData.append(`file[${index}]`, file)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tconst body =\r\n\t\t\ttypeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tObject.entries(body).forEach(([key, value]) =>\r\n\t\t\tformData.append(key, value)\r\n\t\t);\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(\r\n\t\t\t\t\tinfo.api ||\r\n\t\t\t\t\t\t`/api/${info.part}/file${\r\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\r\n\t\t\t\t\t\t}`,\r\n\t\t\t\t\tformData,\r\n\t\t\t\t\t(resp: any) => {\r\n\t\t\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\t\t\tcb(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(\r\n\t\t\t\tinfo.api ||\r\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\r\n\t\t\t\tformData,\r\n\t\t\t\t(resp: any) => {\r\n\t\t\t\t\tinfo.resp?.(resp);\r\n\t\t\t\t\tcb(resp);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Uploads an image to the server.\r\n\t *\r\n\t * @param info - The file options.\r\n\t * @param cb - The callback function.\r\n\t */\r\n\tpublic image(\r\n\t\tinfo: FileOptions,\r\n\t\tcb: (resp: any) => void = () => {}\r\n\t): void | (() => void) {\r\n\t\tif (info.save) {\r\n\t\t\treturn () => {\r\n\t\t\t\tthis.http.post(\r\n\t\t\t\t\tinfo.api ||\r\n\t\t\t\t\t\t`/api/${info.part}/file${\r\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\r\n\t\t\t\t\t\t}`,\r\n\t\t\t\t\tinfo,\r\n\t\t\t\t\tcb\r\n\t\t\t\t);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(\r\n\t\t\t\tinfo.api ||\r\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\r\n\t\t\t\tinfo,\r\n\t\t\t\tcb\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the file information after processing.\r\n\t *\r\n\t * @param dataUrl - The data URL of the processed file.\r\n\t * @param info - The file options.\r\n\t * @param file - The file object.\r\n\t */\r\n\t// private update(dataUrl: string, info: FileOptions, file: File): void {\r\n\tprivate update(dataUrl: string, info: any, file: File): void {\r\n\t\tinfo.cb?.(dataUrl, file);\r\n\t\tif (info.multiple_cb) {\r\n\t\t\tinfo.multiple_files.push({ dataUrl, file });\r\n\t\t\tif (--info.multiple_counter === 0)\r\n\t\t\t\tinfo.multiple_cb(info.multiple_files);\r\n\t\t}\r\n\r\n\t\tif (!info.part) return;\r\n\r\n\t\tconst obj =\r\n\t\t\ttypeof info.body === 'function' ? info.body() : info.body || {};\r\n\t\tobj['dataUrl'] = dataUrl;\r\n\r\n\t\tif (info.save) {\r\n\t\t\tinfo.complete = () => {\r\n\t\t\t\tthis.http.post(\r\n\t\t\t\t\tinfo.api ||\r\n\t\t\t\t\t\t`/api/${info.part}/file${\r\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\r\n\t\t\t\t\t\t}`,\r\n\t\t\t\t\tobj,\r\n\t\t\t\t\t(resp: any) => {\r\n\t\t\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis.http.post(\r\n\t\t\t\tinfo.api ||\r\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\r\n\t\t\t\tobj,\r\n\t\t\t\t(resp: any) => {\r\n\t\t\t\t\tinfo.cb?.(resp);\r\n\t\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Processes an image file for resizing.\r\n\t *\r\n\t * @param file - The file object.\r\n\t * @param info - The file options.\r\n\t */\r\n\t// private process(file: File, info: FileOptions): void {\r\n\tprivate process(file: File, info: any): void {\r\n\t\tif (!file.type.startsWith('image/')) {\r\n\t\t\tinfo.cb?.(false, file);\r\n\t\t\tif (info.multiple_cb) {\r\n\t\t\t\tinfo.multiple_files.push({ dataUrl: '', file });\r\n\t\t\t\tif (--info.multiple_counter === 0)\r\n\t\t\t\t\tinfo.multiple_cb(info.multiple_files);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (info.resize) {\r\n\t\t\tinfo.resize.width = info.resize.width || 1920;\r\n\t\t\tinfo.resize.height = info.resize.height || 1080;\r\n\t\t}\r\n\r\n\t\tconst reader = new FileReader();\r\n\t\treader.onload = (loadEvent) => {\r\n\t\t\tif (!info.resize) {\r\n\t\t\t\treturn this.update(\r\n\t\t\t\t\tloadEvent.target?.result as string,\r\n\t\t\t\t\tinfo,\r\n\t\t\t\t\tfile\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tconst canvas = this.core.document.createElement('canvas');\r\n\t\t\tconst img = this.core.document.createElement('img');\r\n\t\t\timg.onload = () => {\r\n\t\t\t\tif (\r\n\t\t\t\t\timg.width <= info.resize.width &&\r\n\t\t\t\t\timg.height <= info.resize.height\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn this.update(\r\n\t\t\t\t\t\tloadEvent.target?.result as string,\r\n\t\t\t\t\t\tinfo,\r\n\t\t\t\t\t\tfile\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst infoRatio = info.resize.width / info.resize.height;\r\n\t\t\t\tconst imgRatio = img.width / img.height;\r\n\t\t\t\tlet width, height;\r\n\t\t\t\tif (imgRatio > infoRatio) {\r\n\t\t\t\t\twidth = Math.min(info.resize.width, img.width);\r\n\t\t\t\t\theight = width / imgRatio;\r\n\t\t\t\t} else {\r\n\t\t\t\t\theight = Math.min(info.resize.height, img.height);\r\n\t\t\t\t\twidth = height * imgRatio;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\t\t\t\tconst context = canvas.getContext('2d');\r\n\t\t\t\tcontext.drawImage(img, 0, 0, width, height);\r\n\t\t\t\tconst dataUrl = canvas.toDataURL('image/jpeg', 1);\r\n\t\t\t\tthis.update(dataUrl, info, file);\r\n\t\t\t};\r\n\t\t\timg.src = loadEvent.target?.result as string;\r\n\t\t};\r\n\t\treader.readAsDataURL(file);\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { CoreService } from './core.service';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class UiService {\r\n\tprivate variables: { [key: string]: string } = {};\r\n\tprivate _forms: { [key: string]: any } = {};\r\n\t// global variable use for design purposes\r\n\tvar: Record<string, unknown> = {};\r\n\r\n\tconstructor(private core: CoreService) {\r\n\t\tconst storedVariables = this.core.localStorage.getItem('css_variables');\r\n\t\tthis.variables = storedVariables ? JSON.parse(storedVariables) : {};\r\n\t\tfor (const key in this.variables) {\r\n\t\t\tthis.setProperty(key, this.variables[key]);\r\n\t\t}\r\n\t}\r\n\r\n\t/* Forms Management */\r\n\t/**\r\n\t * Manages form states.\r\n\t *\r\n\t * @param id - The form identifier.\r\n\t * @returns The form state object.\r\n\t */\r\n\tpublic form(id: string): any {\r\n\t\tif (typeof id !== 'string') return {};\r\n\t\tif (!this._forms[id]) this._forms[id] = {};\r\n\t\treturn this._forms[id];\r\n\t}\r\n\r\n\t/**\r\n\t * Validates input values based on the specified type.\r\n\t *\r\n\t * @param value - The value to validate.\r\n\t * @param kind - The type of validation.\r\n\t * @param extra - Additional validation criteria.\r\n\t * @returns True if the value is valid, false otherwise.\r\n\t */\r\n\tpublic valid(value: any, kind = 'email', extra = 0): boolean {\r\n\t\tconst validators: { [key: string]: (value: any) => boolean } = {\r\n\t\t\temail: (value) =>\r\n\t\t\t\t/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,10})+$/.test(\r\n\t\t\t\t\tvalue || ''\r\n\t\t\t\t),\r\n\t\t\ttext: (value) => typeof value === 'string',\r\n\t\t\tarray: (value) => Array.isArray(value),\r\n\t\t\tobject: (value) =>\r\n\t\t\t\ttypeof value === 'object' &&\r\n\t\t\t\t!Array.isArray(value) &&\r\n\t\t\t\tvalue !== null,\r\n\t\t\tnumber: (value) => typeof value === 'number',\r\n\t\t\tpassword: (value) => {\r\n\t\t\t\tif (!value) return false;\r\n\t\t\t\tswitch (extra) {\r\n\t\t\t\t\tcase 1:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))/.test(\r\n\t\t\t\t\t\t\tvalue || ''\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\tcase 2:\r\n\t\t\t\t\t\treturn /^(((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})/.test(\r\n\t\t\t\t\t\t\tvalue || ''\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\tcase 3:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]))(?=.{8,})/.test(\r\n\t\t\t\t\t\t\tvalue || ''\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\tcase 4:\r\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@#$%&!-_]))(?=.{8,})/.test(\r\n\t\t\t\t\t\t\tvalue || ''\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn !!value;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t};\r\n\t\treturn validators[kind] ? validators[kind](value) : false;\r\n\t}\r\n\r\n\t/**\r\n\t * Determines the strength of a password.\r\n\t *\r\n\t * @param value - The password to evaluate.\r\n\t * @returns The strength level of the password.\r\n\t */\r\n\tpublic level(value = ''): number {\r\n\t\tif (!value) return 0;\r\n\t\tlet level = 0;\r\n\t\tif (value.length > 8) level++;\r\n\t\tif (/[a-z]/.test(value)) level++;\r\n\t\tif (/[A-Z]/.test(value)) level++;\r\n\t\tif (/[1-9]/.test(value)) level++;\r\n\t\tif (/[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/.test(value)) level++;\r\n\t\treturn level;\r\n\t}\r\n\r\n\t/* CSS Management */\r\n\t/**\r\n\t * Saves the CSS variables to local storage.\r\n\t */\r\n\tprivate save(): void {\r\n\t\tthis.core.localStorage.setItem(\r\n\t\t\t'css_variables',\r\n\t\t\tJSON.stringify(this.variables)\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets a CSS variable.\r\n\t *\r\n\t * @param key - The CSS variable name.\r\n\t * @param value - The CSS variable value.\r\n\t */\r\n\tprivate setProperty(key: string, value: string): void {\r\n\t\tthis.core.document.documentElement.style.setProperty(key, value);\r\n\t}\r\n\r\n\t/**\r\n\t * Sets multiple CSS variables.\r\n\t *\r\n\t * @param variables - The CSS variables to set.\r\n\t * @param opts - Options for setting the variables.\r\n\t */\r\n\tpublic set(variables: { [key: string]: string }, opts: any = {}): void {\r\n\t\tif (typeof opts === 'string') {\r\n\t\t\topts = opts === 'local' ? { local: true } : { host: opts };\r\n\t\t}\r\n\t\tif (opts.host && this.core.window.location.host !== opts.host) return;\r\n\t\tfor (const key in variables) {\r\n\t\t\tif (opts.local) {\r\n\t\t\t\tthis.variables[key] = variables[key];\r\n\t\t\t} else if (this.variables[key]) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthis.setProperty(key, variables[key]);\r\n\t\t}\r\n\t\tif (opts.local) this.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the stored CSS variables.\r\n\t *\r\n\t * @returns The stored CSS variables.\r\n\t */\r\n\tpublic get(): { [key: string]: string } {\r\n\t\treturn this.variables;\r\n\t}\r\n\r\n\t/**\r\n\t * Removes specified CSS variables.\r\n\t *\r\n\t * @param keys - The keys of the CSS variables to remove.\r\n\t */\r\n\tpublic remove(keys: string | string[]): void {\r\n\t\tconst keyArray = Array.isArray(keys) ? keys : keys.split(' ');\r\n\t\tfor (const key of keyArray) {\r\n\t\t\tdelete this.variables[key];\r\n\t\t}\r\n\t\tthis.save();\r\n\t}\r\n\r\n\t/**\r\n\t * Generates an array of sample data.\r\n\t *\r\n\t * @param arrLen - The length of the array.\r\n\t * @param type - The type of data to generate.\r\n\t * @returns An array of sample data.\r\n\t */\r\n\tpublic arr(arrLen = 10, type: string = 'number'): any[] {\r\n\t\tconst arr = [];\r\n\t\tfor (let i = 0; i < arrLen; i++) {\r\n\t\t\tswitch (type) {\r\n\t\t\t\tcase 'number':\r\n\t\t\t\t\tarr.push(i + 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'text':\r\n\t\t\t\t\tarr.push(this.text());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'date':\r\n\t\t\t\t\tarr.push(new Date(new Date().getTime() + i * 86400000));\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tarr.push(type);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}\r\n\r\n\t/**\r\n\t * Generates a random text string.\r\n\t *\r\n\t * @param length - The length of the text string.\r\n\t * @returns A random text string.\r\n\t */\r\n\tpublic text(length = 10): string {\r\n\t\tconst characters =\r\n\t\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\t\tlet result = '';\r\n\t\tfor (let i = 0; i < length; i++) {\r\n\t\t\tresult += characters.charAt(\r\n\t\t\t\tMath.floor(Math.random() * characters.length)\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { DatePipe } from '@angular/common';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root',\r\n})\r\nexport class TimeService {\r\n\tprivate weekDays = [\r\n\t\t'Sunday',\r\n\t\t'Monday',\r\n\t\t'Tuesday',\r\n\t\t'Wednesday',\r\n\t\t'Thursday',\r\n\t\t'Friday',\r\n\t\t'Saturday',\r\n\t];\r\n\r\n\tconstructor(private datePipe: DatePipe) {}\r\n\r\n\t/**\r\n\t * Returns the name of the day of the week for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the day of the week.\r\n\t * @param format - The format in which to return the day name. Default is 'long'.\r\n\t * @returns The name of the day of the week.\r\n\t */\r\n\tgetDayName(date: Date, format: 'short' | 'long' = 'long'): string {\r\n\t\tconst dayIndex = date.getDay();\r\n\t\treturn format === 'short'\r\n\t\t\t? this.weekDays[dayIndex].substring(0, 3)\r\n\t\t\t: this.weekDays[dayIndex];\r\n\t}\r\n\r\n\t/**\r\n\t * Formats a date according to the specified format and timezone.\r\n\t *\r\n\t * @param date - The date to format.\r\n\t * @param format - The format string (see Angular DatePipe documentation for format options).\r\n\t * @param timezone - The timezone to use for formatting.\r\n\t * @returns The formatted date string.\r\n\t */\r\n\tformatDate(\r\n\t\tdate: Date,\r\n\t\tformat: string = 'mediumDate',\r\n\t\ttimezone: string = 'UTC'\r\n\t): string {\r\n\t\treturn this.datePipe.transform(date, format, timezone) || '';\r\n\t}\r\n\r\n\t/**\r\n\t * Converts a date to a different timezone.\r\n\t *\r\n\t * @param date - The date to convert.\r\n\t * @param timezone - The timezone to convert to.\r\n\t * @returns The date in the new timezone.\r\n\t */\r\n\tconvertToTimezone(date: Date, timezone: string): Date {\r\n\t\treturn new Date(date.toLocaleString('en-US', { timeZone: timezone }));\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the start of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the start of the day.\r\n\t * @returns The start of the day (midnight) for the given date.\r\n\t */\r\n\tstartOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(0, 0, 0, 0);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the end of the day for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the end of the day.\r\n\t * @returns The end of the day (one millisecond before midnight) for the given date.\r\n\t */\r\n\tendOfDay(date: Date): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setHours(23, 59, 59, 999);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of days in a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of days in the month.\r\n\t */\r\n\tgetDaysInMonth(month: number, year: number): number {\r\n\t\treturn new Date(year, month + 1, 0).getDate();\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a given year is a leap year.\r\n\t *\r\n\t * @param year - The year to check.\r\n\t * @returns True if the year is a leap year, false otherwise.\r\n\t */\r\n\tisLeapYear(year: number): boolean {\r\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of days to a date.\r\n\t *\r\n\t * @param date - The date to which to add days.\r\n\t * @param days - The number of days to add.\r\n\t * @returns The new date with the added days.\r\n\t */\r\n\taddDays(date: Date, days: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setDate(newDate.getDate() + days);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of months to a date.\r\n\t *\r\n\t * @param date - The date to which to add months.\r\n\t * @param months - The number of months to add.\r\n\t * @returns The new date with the added months.\r\n\t */\r\n\taddMonths(date: Date, months: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setMonth(newDate.getMonth() + months);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Adds a specified number of years to a date.\r\n\t *\r\n\t * @param date - The date to which to add years.\r\n\t * @param years - The number of years to add.\r\n\t * @returns The new date with the added years.\r\n\t */\r\n\taddYears(date: Date, years: number): Date {\r\n\t\tconst newDate = new Date(date);\r\n\t\tnewDate.setFullYear(newDate.getFullYear() + years);\r\n\t\treturn newDate;\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of days from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract days.\r\n\t * @param days - The number of days to subtract.\r\n\t * @returns The new date with the subtracted days.\r\n\t */\r\n\tsubtractDays(date: Date, days: number): Date {\r\n\t\treturn this.addDays(date, -days);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of months from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract months.\r\n\t * @param months - The number of months to subtract.\r\n\t * @returns The new date with the subtracted months.\r\n\t */\r\n\tsubtractMonths(date: Date, months: number): Date {\r\n\t\treturn this.addMonths(date, -months);\r\n\t}\r\n\r\n\t/**\r\n\t * Subtracts a specified number of years from a date.\r\n\t *\r\n\t * @param date - The date from which to subtract years.\r\n\t * @param years - The number of years to subtract.\r\n\t * @returns The new date with the subtracted years.\r\n\t */\r\n\tsubtractYears(date: Date, years: number): Date {\r\n\t\treturn this.addYears(date, -years);\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if two dates are on the same day.\r\n\t *\r\n\t * @param date1 - The first date.\r\n\t * @param date2 - The second date.\r\n\t * @returns True if the dates are on the same day, false otherwise.\r\n\t */\r\n\tisSameDay(date1: Date, date2: Date): boolean {\r\n\t\treturn (\r\n\t\t\tdate1.getFullYear() === date2.getFullYear() &&\r\n\t\t\tdate1.getMonth() === date2.getMonth() &&\r\n\t\t\tdate1.getDate() === date2.getDate()\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the ISO week number for a given date.\r\n\t *\r\n\t * @param date - The date for which to get the week number.\r\n\t * @returns The ISO week number (1-53).\r\n\t */\r\n\tgetWeekNumber(date: Date): number {\r\n\t\tconst tempDate = new Date(date.getTime());\r\n\t\ttempDate.setHours(0, 0, 0, 0);\r\n\t\t// Set to nearest Thursday: current date + 4 - current day number, making Thursday day 4\r\n\t\ttempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7));\r\n\t\tconst yearStart = new Date(tempDate.getFullYear(), 0, 1);\r\n\t\t// Calculate full weeks to nearest Thursday\r\n\t\treturn Math.ceil(\r\n\t\t\t((tempDate.getTime() - yearStart.getTime()) / 86400000 + 1) / 7\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the number of weeks in a month for a given month and year.\r\n\t *\r\n\t * @param month - The month (0-11).\r\n\t * @param year - The year.\r\n\t * @returns The number of weeks in the month.\r\n\t */\r\n\tgetWeeksInMonth(month: number, year: number): number {\r\n\t\tconst firstDayOfMonth = new Date(year, month, 1);\r\n\t\tconst lastDayOfMonth = new Date(year, month + 1, 0);\r\n\t\t// Get ISO week numbers for the first and last day of the month\r\n\t\tconst firstWeek = this.getWeekNumber(firstDayOfMonth);\r\n\t\tlet lastWeek = this.getWeekNumber(lastDayOfMonth);\r\n\t\t// Special case: when January 1st is in the last week of the previous year\r\n\t\tif (firstWeek > lastWeek) {\r\n\t\t\tlastWeek = this.getWeekNumber(new Date(year, 11, 31)); // Get week of the last day of the year\r\n\t\t}\r\n\t\treturn lastWeek - firstWeek + 1;\r\n\t}\r\n}\r\n","/* initialize */\r\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from './interfaces/config';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport {\r\n\tprovideHttpClient,\r\n\twithInterceptorsFromDi,\r\n} from '@angular/common/http';\r\nimport { MetaService } from './services/meta.service';\r\nimport { MetaGuard } from './guard/meta.guard';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n/* directives */\r\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\r\nconst DIRECTIVES = [ClickOutsideDirective];\r\n\r\n/* pipes */\r\nimport { ArrPipe } from './pipes/arr.pipe';\r\nimport { SafePipe } from './pipes/safe.pipe';\r\nimport { SplicePipe } from './pipes/splice.pipe';\r\nimport { SearchPipe } from './pipes/search.pipe';\r\nimport { MongodatePipe } from './pipes/mongodate.pipe';\r\nimport { PaginationPipe } from './pipes/pagination.pipe';\r\nconst PIPES = [\r\n\tArrPipe,\r\n\tSafePipe,\r\n\tSplicePipe,\r\n\tSearchPipe,\r\n\tMongodatePipe,\r\n\tPaginationPipe,\r\n];\r\n\r\n/* components */\r\nimport { WrapperComponent } from './components/alert/wrapper/wrapper.component';\r\nimport { LoaderComponent } from './components/loader/loader.component';\r\nimport { FilesComponent } from './components/files/files.component';\r\nimport { ModalComponent } from './components/modal/modal.component';\r\nimport { AlertComponent } from './components/alert/alert.component';\r\nconst LOCAL_COMPONENTS = [WrapperComponent, FilesComponent];\r\nconst COMPONENTS = [LoaderComponent, ModalComponent, AlertComponent];\r\n\r\n@NgModule({\r\n\tdeclarations: [...LOCAL_COMPONENTS, ...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\texports: [...PIPES, ...COMPONENTS, ...DIRECTIVES],\r\n\timports: [CommonModule, FormsModule],\r\n\tproviders: [\r\n\t\t{ provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG },\r\n\t\tMetaGuard,\r\n\t\tMetaService,\r\n\t\tprovideHttpClient(withInterceptorsFromDi()),\r\n\t],\r\n})\r\nexport class WacomModule {\r\n\tstatic forRoot(\r\n\t\tconfig: Config = DEFAULT_CONFIG\r\n\t): ModuleWithProviders<WacomModule> {\r\n\t\treturn {\r\n\t\t\tngModule: WacomModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: CONFIG_TOKEN,\r\n\t\t\t\t\tuseValue: config,\r\n\t\t\t\t},\r\n\t\t\t],\r\n\t\t};\r\n\t}\r\n}\r\n","/*\r\n *\tInterfaces\r\n */\r\nexport * from './lib/interfaces/config';\r\nexport * from './lib/interfaces/alert.interface';\r\nexport * from './lib/interfaces/crud.interface';\r\n/*\r\n *\tGuard\r\n */\r\nexport * from './lib/guard/meta.guard';\r\n/*\r\n *\tComponents\r\n */\r\nexport * from './lib/components/alert/alert.component';\r\nexport * from './lib/components/modal/modal.component';\r\nexport * from './lib/components/loader/loader.component';\r\nexport * from './lib/components/base.component';\r\nexport * from './lib/components/crud.component';\r\n/*\r\n *\tDirectives\r\n */\r\nexport * from './lib/directives/click-outside.directive';\r\n/*\r\n *\tPipes\r\n */\r\nexport * from './lib/pipes/arr.pipe';\r\nexport * from './lib/pipes/mongodate.pipe';\r\nexport * from './lib/pipes/pagination.pipe';\r\nexport * from './lib/pipes/safe.pipe';\r\nexport * from './lib/pipes/search.pipe';\r\nexport * from './lib/pipes/splice.pipe';\r\n/*\r\n *\tServices\r\n */\r\nexport * from './lib/services/base.service';\r\nexport * from './lib/services/crud.service';\r\nexport * from './lib/services/meta.service';\r\nexport * from './lib/services/store.service';\r\nexport * from './lib/services/http.service';\r\nexport * from './lib/services/mongo.service';\r\nexport * from './lib/services/render.service';\r\nexport * from './lib/services/hash.service';\r\nexport * from './lib/services/dom.service';\r\nexport * from './lib/services/alert.service';\r\nexport * from './lib/services/loader.service';\r\nexport * from './lib/services/socket.service';\r\nexport * from './lib/services/modal.service';\r\nexport * from './lib/services/file.service';\r\nexport * from './lib/services/ui.service';\r\nexport * from './lib/services/core.service';\r\nexport * from './lib/services/time.service';\r\n/*\r\n *\tInitial\r\n *\r\n *\tmake different kind of modules, one which import all, other for piece by piece\r\n */\r\nexport * from './lib/wacom.module';\r\n/*\r\n *\tEnd of Support\r\n */\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CoreService","i2","i1","i1.StoreService","i2.HttpService","i3.CoreService","i1.DomService","i2.CoreService","i3.HttpService"],"mappings":";;;;;;;;;;;;;MAoEa,YAAY,GAAG,IAAI,cAAc,CAAS,QAAQ;AAClD,MAAA,cAAc,GAAW;AACrC,IAAA,IAAI,EAAE;AACL,QAAA,cAAc,EAAE,KAAK;AACrB,QAAA,gBAAgB,EAAE,IAAI;AACtB,QAAA,QAAQ,EAAE,EAAE;AACZ,KAAA;AACD,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,IAAI,EAAE;AACL,QAAA,GAAG,EAAE,EAAE;AACP,QAAA,OAAO,EAAE,EAAE;AACX,KAAA;AACD,IAAA,KAAK,EAAE;AACN,QAAA,MAAM,EAAE,EAAE;AACV,KAAA;;;AC/DW,MAAA,aAAa,GAAU;AACnC,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,IAAI,EAAE,EAAE;AACR,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,QAAQ,EAAE,aAAa;AACvB,IAAA,OAAO,EAAE,IAAI;AACb,IA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