{"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/interfaces/modal.interface.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/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/core.service.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/pipes/split.pipe.ts","../../../projects/wacom/src/lib/pipes/number.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/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/services/rtc.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';\nexport interface Any {\n\t[key: string]: string;\n}\nexport interface Config {\n\tmeta?: {\n\t\tuseTitleSuffix?: boolean;\n\t\twarnMissingGuard?: boolean;\n\t\tdefaults?: {\n\t\t\ttitle?: string;\n\t\t\ttitleSuffix?: string;\n\t\t} & { [key: string]: string | undefined };\n\t};\n\talert?: {\n\t\talerts?: object;\n\t\ttext?: string;\n\t\ttype?: string;\n\t\ticon?: string;\n\t\tclass?: string;\n\t\tunique?: string;\n\t\tprogress?: boolean;\n\t\tposition?: string;\n\t\ttimeout?: number;\n\t\tclose?: any;\n\t\tbuttons?: any;\n\t};\n\tmodal?: {\n\t\tsize?: any;\n\t\ttimeout?: any;\n\t\ttimestart?: any;\n\t\tclass?: string;\n\t\tmodals?: object;\n\t\tposition?: string;\n\t\tclosable?: boolean;\n\t\tunique?: string;\n\t};\n\tpopup?: {\n\t\tpopups?: object;\n\t};\n\tloader?: {\n\t\tloaders?: object;\n\t};\n\tsocket?: any;\n\tio?: any;\n\thttp?: {\n\t\theaders?: any;\n\t\turl?: string;\n\t};\n\tstore?: {\n\t\tprefix?: string;\n\t\tset?: (\n\t\t\thold: any,\n\t\t\tvalue: any,\n\t\t\tcb?: () => void,\n\t\t\terrCb?: () => void\n\t\t) => Promise<boolean>;\n\t\tget?: (\n\t\t\thold: any,\n\t\t\tcb?: (value: string) => void,\n\t\t\terrCb?: () => void\n\t\t) => Promise<string>;\n\t\tremove?: (\n\t\t\thold: any,\n\t\t\tcb?: () => void,\n\t\t\terrCb?: () => void\n\t\t) => Promise<boolean>;\n\t\tclear?: (cb?: () => void, errCb?: () => void) => Promise<boolean>;\n\t};\n}\nexport const CONFIG_TOKEN = new InjectionToken<Config>('config');\nexport const DEFAULT_CONFIG: Config = {\n\tmeta: {\n\t\tuseTitleSuffix: false,\n\t\twarnMissingGuard: true,\n\t\tdefaults: {},\n\t},\n\tsocket: false,\n\thttp: {\n\t\turl: '',\n\t\theaders: {},\n\t},\n\tstore: {\n\t\tprefix: '',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\n\nexport interface Alert {\n\tonClose?: any;\n\talerts?: object;\n\tcomponent?: any;\n\ttext?: string;\n\ticon?: string;\n\ttype?: string;\n\tclass?: string;\n\tunique?: string;\n\tprogress?: boolean;\n\tposition?: string;\n\ttimeout?: any;\n\tclosable?: boolean;\n\tclose?: any;\n\tbuttons?: any;\n\t[x: string]: any;\n}\nexport const DEFAULT_Alert: Alert = {\n\talerts: {},\n\ttext: '',\n\ttype: 'info',\n\tclass: '',\n\tprogress: true,\n\tposition: 'bottomRight',\n\ttimeout: 5000,\n\tclosable: true,\n\tbuttons: [],\n};\n","import { InjectionToken } from '@angular/core';\n\nexport interface Modal {\n\tonOpen?: any;\n\tonClose?: any;\n\tonClickOutside?: any;\n\tid?: number;\n\tclose?: any;\n\tcomponent?: any;\n\tsize?: any;\n\ttimeout?: any;\n\ttimestart?: any;\n\tclass?: string;\n\tmodals?: object;\n\tposition?: string;\n\tclosable?: boolean;\n\tunique?: string;\n\t[x: string]: any;\n}\nexport const DEFAULT_Modal: Modal = {\n\tsize: 'mid',\n\ttimeout: 0,\n\ttimestart: 0,\n\tclass: '',\n\tmodals: {},\n\tposition: 'tc',\n\tclosable: true,\n};\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { Title, Meta } from '@angular/platform-browser';\nimport { Router, Route } from '@angular/router';\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\n\nconst isDefined = (val: any) => typeof val !== 'undefined';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class MetaService {\n\tprivate _meta: any;\n\n\tconstructor(\n\t\tprivate router: Router,\n\t\tprivate meta: Meta,\n\t\tprivate titleService: Title,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\n\t) {\n\t\tthis.config = this.config || DEFAULT_CONFIG;\n\t\tthis._meta = this.config.meta || {};\n\t\tthis._warnMissingGuard();\n\t}\n\n\t/**\n\t * Sets the default meta tags.\n\t *\n\t * @param defaults - The default meta tags.\n\t */\n\tsetDefaults(defaults: { [key: string]: string }): void {\n\t\tthis._meta.defaults = defaults;\n\t}\n\n\t/**\n\t * Sets the title and optional title suffix.\n\t *\n\t * @param title - The title to set.\n\t * @param titleSuffix - The title suffix to append.\n\t * @returns The MetaService instance.\n\t */\n\tsetTitle(title?: string, titleSuffix?: string): MetaService {\n\t\tlet titleContent = isDefined(title)\n\t\t\t? title\n\t\t\t: this._meta.defaults['title'] || '';\n\t\tif (this._meta.useTitleSuffix) {\n\t\t\ttitleContent += isDefined(titleSuffix)\n\t\t\t\t? titleSuffix\n\t\t\t\t: this._meta.defaults['titleSuffix'] || '';\n\t\t}\n\t\tthis._updateMetaTag('title', titleContent);\n\t\tthis._updateMetaTag('og:title', titleContent);\n\t\tthis.titleService.setTitle(titleContent);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets link tags.\n\t *\n\t * @param links - The links to set.\n\t * @returns The MetaService instance.\n\t */\n\tsetLink(links: { [key: string]: string }): MetaService {\n\t\tObject.keys(links).forEach((rel) => {\n\t\t\tlet link: HTMLLinkElement = document.createElement('link');\n\t\t\tlink.setAttribute('rel', rel);\n\t\t\tlink.setAttribute('href', links[rel]);\n\t\t\tdocument.head.appendChild(link);\n\t\t});\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets a meta tag.\n\t *\n\t * @param tag - The meta tag name.\n\t * @param value - The meta tag value.\n\t * @param prop - The meta tag property.\n\t * @returns The MetaService instance.\n\t */\n\tsetTag(tag: string, value: string, prop?: string): MetaService {\n\t\tif (tag === 'title' || tag === 'titleSuffix') {\n\t\t\tthrow new Error(\n\t\t\t\t`Attempt to set ${tag} through 'setTag': 'title' and 'titleSuffix' are reserved tag names. Please use 'MetaService.setTitle' instead`\n\t\t\t);\n\t\t}\n\t\tconst content = isDefined(value)\n\t\t\t? value\n\t\t\t: this._meta.defaults[tag] || '';\n\t\tthis._updateMetaTag(tag, content, prop);\n\t\tif (tag === 'description') {\n\t\t\tthis._updateMetaTag('og:description', content, prop);\n\t\t\tthis._updateMetaTag('twitter:description', content, prop);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * Updates a meta tag.\n\t *\n\t * @param tag - The meta tag name.\n\t * @param value - The meta tag value.\n\t * @param prop - The meta tag property.\n\t */\n\tprivate _updateMetaTag(tag: string, value: string, prop?: string): void {\n\t\tprop =\n\t\t\tprop ||\n\t\t\t(tag.startsWith('og:') || tag.startsWith('twitter:')\n\t\t\t\t? 'property'\n\t\t\t\t: 'name');\n\t\tthis.meta.updateTag({ [prop]: tag, content: value });\n\t}\n\n\t/**\n\t * Removes a meta tag.\n\t *\n\t * @param tag - The meta tag name.\n\t * @param prop - The meta tag property.\n\t */\n\tremoveTag(tag: string, prop?: string): void {\n\t\tprop =\n\t\t\tprop ||\n\t\t\t(tag.startsWith('og:') || tag.startsWith('twitter:')\n\t\t\t\t? 'property'\n\t\t\t\t: 'name');\n\t\tthis.meta.removeTag(`${prop}=\"${tag}\"`);\n\t}\n\n\t/**\n\t * Warns about missing meta guards in routes.\n\t */\n\tprivate _warnMissingGuard(): void {\n\t\tif (\n\t\t\tisDefined(this._meta.warnMissingGuard) &&\n\t\t\t!this._meta.warnMissingGuard\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst hasDefaultMeta = !!Object.keys(this._meta.defaults).length;\n\t\tconst hasMetaGuardInArr = (it: any) =>\n\t\t\tit && it.IDENTIFIER === 'MetaGuard';\n\t\tlet hasShownWarnings = false;\n\t\tthis.router.config.forEach((route: Route) => {\n\t\t\tconst hasRouteMeta = route.data && route.data['meta'];\n\t\t\tconst showWarning =\n\t\t\t\t!isDefined(route.redirectTo) &&\n\t\t\t\t(hasDefaultMeta || hasRouteMeta) &&\n\t\t\t\t!(route.canActivate || []).some(hasMetaGuardInArr);\n\t\t\tif (showWarning) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t`Route with path \"${route.path}\" has ${\n\t\t\t\t\t\thasRouteMeta ? '' : 'default '\n\t\t\t\t\t}meta tags, but does not use MetaGuard. Please add MetaGuard to the canActivate array in your route configuration`\n\t\t\t\t);\n\t\t\t\thasShownWarnings = true;\n\t\t\t}\n\t\t});\n\t\tif (hasShownWarnings) {\n\t\t\tconsole.warn(\n\t\t\t\t`To disable these warnings, set metaConfig.warnMissingGuard: false in your MetaConfig passed to MetaModule.forRoot()`\n\t\t\t);\n\t\t}\n\t}\n}\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { MetaService } from '../services/meta.service';\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\n\n@Injectable()\nexport class MetaGuard {\n\tpublic static IDENTIFIER = 'MetaGuard';\n\tprivate _meta: any;\n\tpublic constructor(\n\t\tprivate metaService: MetaService,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\n\t) {\n\t\tthis._meta = config.meta;\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\n\t}\n\tpublic canActivate(\n\t\troute: ActivatedRouteSnapshot,\n\t\tstate: RouterStateSnapshot\n\t): boolean {\n\t\tthis._processRouteMetaTags(route.data && route.data['meta']);\n\t\treturn true;\n\t}\n\tprivate _processRouteMetaTags(meta: any = {}) {\n\t\tif (meta.disableUpdate) {\n\t\t\treturn;\n\t\t}\n\t\tif (meta.title) {\n\t\t\tthis.metaService.setTitle(meta.title, meta.titleSuffix);\n\t\t}\n\t\tif (Array.isArray(meta.links)) {\n\t\t\tthis.metaService.setLink(meta.links);\n\t\t} else if (typeof meta.links === 'string') {\n\t\t\tthis.metaService.setLink(meta.links.split(' '));\n\t\t}\n\t\tif (Array.isArray(this._meta.defaults?.links)) {\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links);\n\t\t} else if (typeof this._meta.defaults?.links === 'string') {\n\t\t\tthis.metaService.setLink(this._meta.defaults?.links.split(' '));\n\t\t}\n\t\tObject.keys(meta).forEach((prop) => {\n\t\t\tif (\n\t\t\t\tprop === 'title' ||\n\t\t\t\tprop === 'titleSuffix' ||\n\t\t\t\tprop === 'links'\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tObject.keys(meta[prop]).forEach((key) => {\n\t\t\t\tthis.metaService.setTag(key, meta[prop][key], prop);\n\t\t\t});\n\t\t});\n\t\tObject.keys(this._meta.defaults).forEach((key) => {\n\t\t\tif (\n\t\t\t\tkey in meta ||\n\t\t\t\tkey === 'title' ||\n\t\t\t\tkey === 'titleSuffix' ||\n\t\t\t\tkey === 'links'\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.metaService.setTag(key, this._meta.defaults[key]);\n\t\t});\n\t}\n}\n","import { Component, ViewChild } from '@angular/core';\n\n@Component({\n\tselector: 'alert',\n\ttemplateUrl: './alert.component.html',\n\tstyleUrls: ['./alert.component.scss'],\n\tstandalone: false,\n})\nexport class AlertComponent {\n\t@ViewChild('alert', { static: false }) alert: any;\n\tcomponent: any;\n\ttext: string = '';\n\tclass: string = '';\n\ttype: string = 'info';\n\tprogress: boolean = true;\n\tposition: string = 'bottomRight'; // [bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter or center]\n\ticon: string = '';\n\ttimeout: any = 5000;\n\tclose: any;\n\tclosable: any = true;\n\tbuttons: any = []; /*[{text, callback}]*/\n\n\tconstructor() {\n\t\tsetTimeout(() => {\n\t\t\tif (this.timeout) {\n\t\t\t\tlet remaining = JSON.parse(JSON.stringify(this.timeout));\n\n\t\t\t\tlet timer = setTimeout(() => {\n\t\t\t\t\tthis.remove();\n\t\t\t\t}, remaining);\n\n\t\t\t\tlet start = new Date();\n\n\t\t\t\tthis.alert.nativeElement.addEventListener(\n\t\t\t\t\t'mouseenter',\n\t\t\t\t\t() => {\n\t\t\t\t\t\tclearTimeout(timer);\n\n\t\t\t\t\t\tremaining -= new Date().getTime() - start.getTime();\n\t\t\t\t\t},\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\tthis.alert.nativeElement.addEventListener(\n\t\t\t\t\t'mouseleave',\n\t\t\t\t\t() => {\n\t\t\t\t\t\tstart = new Date();\n\n\t\t\t\t\t\tclearTimeout(timer);\n\n\t\t\t\t\t\ttimer = window.setTimeout(() => {\n\t\t\t\t\t\t\tthis.remove();\n\t\t\t\t\t\t}, remaining);\n\t\t\t\t\t},\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\tpublic delete_animation = false;\n\tremove() {\n\t\tthis.delete_animation = true;\n\t\tsetTimeout(() => {\n\t\t\tthis.close();\n\t\t\tthis.delete_animation = false;\n\t\t}, 350);\n\t}\n}\n","<div\n\t*ngIf=\"text\"\n\t[ngClass]=\"class\"\n\tclass=\"waw-alert-container height\"\n\t[class._close]=\"delete_animation\"\n>\n\t<div\n\t\t[class.waw-alert-color-blue]=\"type == 'info'\"\n\t\t[class.waw-alert-color-red]=\"type == 'error'\"\n\t\t[class.waw-alert-color-green]=\"type == 'success'\"\n\t\t[class.waw-alert-color-orange]=\"type == 'warning'\"\n\t\t[class.waw-alert-color-yellow]=\"type == 'question'\"\n\t\tclass=\"waw-alert bounceInUp waw-alert-theme-light waw-alert-animateInside waw-alert-opened\"\n\t\t#alert\n\t>\n\t\t<div class=\"waw-alert__progress\" *ngIf=\"progress\">\n\t\t\t<span\n\t\t\t\t[ngStyle]=\"{\n\t\t\t\t\t'animation-duration': (timeout + 350) / 1000 + 's'\n\t\t\t\t}\"\n\t\t\t></span>\n\t\t</div>\n\t\t<div class=\"waw-alert-body\">\n\t\t\t<div *ngIf=\"!component\" class=\"waw-alert-texts\">\n\t\t\t\t<div *ngIf=\"icon\" class=\"{{ icon }}\"></div>\n\t\t\t\t<div class=\"waw-alert-message slideIn\">{{ text }}</div>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"!component && type == 'question'\">\n\t\t\t\t<button\n\t\t\t\t\tclass=\"alert-btn\"\n\t\t\t\t\t*ngFor=\"let b of buttons\"\n\t\t\t\t\t(click)=\"remove(); b.callback && b.callback()\"\n\t\t\t\t>\n\t\t\t\t\t{{ b.text }}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclass=\"waw-alert__close\"\n\t\t\t\t*ngIf=\"closable\"\n\t\t\t\t(click)=\"remove()\"\n\t\t\t></div>\n\t\t</div>\n\t</div>\n</div>\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n\tselector: 'lib-modal',\n\ttemplateUrl: './modal.component.html',\n\tstyleUrls: ['./modal.component.scss'],\n\tstandalone: false,\n})\nexport class ModalComponent implements OnInit {\n\tclass: string = '';\n\tsize: string = 'flex';\n\tclosable: boolean = true;\n\tclose: any;\n\tonOpen: any;\n\ttimestart: any;\n\ttimeout: any;\n\tshowModal = false;\n\tallowClose = true;\n\tonClickOutside: any;\n\tngOnInit() {\n\t\tif (typeof this.onClickOutside !== 'function') {\n\t\t\tthis.onClickOutside = this.close;\n\t\t\t// this.onClickOutside = () => {\n\t\t\t// \tif (this.allowClose) {\n\t\t\t// \t\tthis.close();\n\t\t\t// \t}\n\n\t\t\t// \tthis.allowClose = true;\n\t\t\t// };\n\t\t}\n\n\t\tif (typeof this.onOpen == 'function') this.onOpen();\n\n\t\twindow.addEventListener('popstate', this.popStateListener.bind(this));\n\t}\n\n\tngAfterViewInit() {\n\t\tsetTimeout(() => {\n\t\t\tthis.showModal = true;\n\t\t}, this.timestart || 0);\n\t}\n\n\tngOnDestroy(): void {\n\t\twindow.removeEventListener(\n\t\t\t'popstate',\n\t\t\tthis.popStateListener.bind(this)\n\t\t);\n\t}\n\n\tpopStateListener(e: Event) {\n\t\tthis.close();\n\t}\n}\n","<div\n\t[hidden]=\"!showModal\"\n\tclass=\"modal\"\n\t[ngClass]=\"class + ' ' + size\"\n\t(click)=\"onClickOutside()\"\n>\n\t<!--  (click)=\"$event.stopPropagation()\" -->\n\t<!-- <div class=\"modal-content\" (mousedown)=\"allowClose = false\"> -->\n\t<div class=\"modal-content\" (click)=\"$event.stopPropagation()\">\n\t\t<div><!-- Content Will Drop Here --></div>\n\t\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">&times;</span>\n\t</div>\n</div>\n","import { Component, ViewChild } from '@angular/core';\n\n@Component({\n\tselector: 'lib-loader',\n\ttemplateUrl: './loader.component.html',\n\tstyleUrls: ['./loader.component.scss'],\n\tstandalone: false,\n})\nexport class LoaderComponent {\n\t@ViewChild('loader', { static: false }) loader: any;\n\tpublic text: string = 'Loading';\n\tpublic class: string = '';\n\tpublic progress: boolean = true;\n\tpublic timeout: number = 5000;\n\tpublic close: any;\n\tpublic closable: any = true;\n\tconstructor() {}\n\tngOnInit() {\n\t\tif (this.timeout) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.close();\n\t\t\t}, this.timeout);\n\t\t}\n\t}\n}\n","<div\n\tstyle=\"\n\t\tposition: fixed;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\tbackground-color: #334d6e;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tz-index: 999999;\n\t\"\n\t#loader\n>\n\t<span class=\"close\" (click)=\"close()\" *ngIf=\"closable\">&times;</span>\n\t<span style=\"font-size: 30px; color: white\">\n\t\t{{ text }}\n\t</span>\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 { Component } from '@angular/core';\n\n@Component({\n\tselector: 'lib-wrapper',\n\ttemplateUrl: './wrapper.component.html',\n\tstyleUrls: ['./wrapper.component.scss'],\n\tstandalone: false,\n})\nexport class WrapperComponent {\n\tconstructor() {}\n}\n","<div>\n\t<div\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomRight\"\n\t\tid=\"bottomRight\"\n\t></div>\n\t<div\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomLeft\"\n\t\tid=\"bottomLeft\"\n\t></div>\n\t<div\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-topRight\"\n\t\tid=\"topRight\"\n\t></div>\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-topLeft\" id=\"topLeft\"></div>\n\t<div\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-topCenter\"\n\t\tid=\"topCenter\"\n\t></div>\n\t<div\n\t\tclass=\"waw-alert-wrapper waw-alert-wrapper-bottomCenter\"\n\t\tid=\"bottomCenter\"\n\t></div>\n\t<div class=\"waw-alert-wrapper waw-alert-wrapper-center\" id=\"center\"></div>\n</div>\n","import {\n\tInjectable,\n\tInjector,\n\tComponentFactoryResolver,\n\tComponentRef,\n\tEmbeddedViewRef,\n\tApplicationRef,\n} from '@angular/core';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class DomService {\n\tprivate providedIn: Record<string, boolean> = {};\n\n\tconstructor(\n\t\tprivate componentFactoryResolver: ComponentFactoryResolver,\n\t\tprivate appRef: ApplicationRef,\n\t\tprivate injector: Injector\n\t) {}\n\n\t/**\n\t * Appends a component to a specified element by ID.\n\t *\n\t * @param component - The component to append.\n\t * @param options - The options to project into the component.\n\t * @param id - The ID of the element to append the component to.\n\t * @returns An object containing the native element and the component reference.\n\t */\n\tappendById(\n\t\tcomponent: any,\n\t\toptions: any = {},\n\t\tid: string\n\t): { nativeElement: HTMLElement; componentRef: ComponentRef<any> } {\n\t\tconst componentRef = this.componentFactoryResolver\n\t\t\t.resolveComponentFactory(component)\n\t\t\t.create(this.injector);\n\n\t\tthis.projectComponentInputs(componentRef, options);\n\t\tthis.appRef.attachView(componentRef.hostView);\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\n\t\t\t.rootNodes[0] as HTMLElement;\n\t\tconst element = document.getElementById(id);\n\t\tif (element && typeof element.appendChild === 'function') {\n\t\t\telement.appendChild(domElem);\n\t\t}\n\t\treturn {\n\t\t\tnativeElement: domElem,\n\t\t\tcomponentRef: componentRef,\n\t\t};\n\t}\n\n\t/**\n\t * Appends a component to a specified element or to the body.\n\t *\n\t * @param component - The component to append.\n\t * @param options - The options to project into the component.\n\t * @param element - The element to append the component to. Defaults to body.\n\t * @returns An object containing the native element and the component reference.\n\t */\n\tappendComponent(\n\t\tcomponent: any,\n\t\toptions: any = {},\n\t\telement: HTMLElement = document.body\n\t): { nativeElement: HTMLElement; componentRef: ComponentRef<any> } | void {\n\t\tif (options.providedIn) {\n\t\t\tif (this.providedIn[options.providedIn]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.providedIn[options.providedIn] = true;\n\t\t}\n\n\t\tconst componentRef = this.componentFactoryResolver\n\t\t\t.resolveComponentFactory(component)\n\t\t\t.create(this.injector);\n\t\tthis.projectComponentInputs(componentRef, options);\n\t\tthis.appRef.attachView(componentRef.hostView);\n\t\tconst domElem = (componentRef.hostView as EmbeddedViewRef<any>)\n\t\t\t.rootNodes[0] as HTMLElement;\n\t\tif (element && typeof element.appendChild === 'function') {\n\t\t\telement.appendChild(domElem);\n\t\t}\n\t\treturn {\n\t\t\tnativeElement: domElem,\n\t\t\tcomponentRef: componentRef,\n\t\t};\n\t}\n\n\t/**\n\t * Gets a reference to a dynamically created component.\n\t *\n\t * @param component - The component to create.\n\t * @param options - The options to project into the component.\n\t * @returns The component reference.\n\t */\n\tgetComponentRef(component: any, options: any = {}): ComponentRef<any> {\n\t\tconst componentRef = this.componentFactoryResolver\n\t\t\t.resolveComponentFactory(component)\n\t\t\t.create(this.injector);\n\n\t\tthis.projectComponentInputs(componentRef, options);\n\t\tthis.appRef.attachView(componentRef.hostView);\n\n\t\treturn componentRef;\n\t}\n\n\t/**\n\t * Projects the inputs onto the component.\n\t *\n\t * @param component - The component reference.\n\t * @param options - The options to project into the component.\n\t * @returns The component reference with the projected inputs.\n\t */\n\tprivate projectComponentInputs(\n\t\tcomponent: ComponentRef<any>,\n\t\toptions: any\n\t): ComponentRef<any> {\n\t\tif (options) {\n\t\t\tconst props = Object.getOwnPropertyNames(options);\n\t\t\tfor (const prop of props) {\n\t\t\t\tcomponent.instance[prop] = options[prop];\n\t\t\t}\n\t\t}\n\t\treturn component;\n\t}\n}\n\n/*\nhttps://stackoverflow.com/questions/39857222/angular2-dynamic-component-injection-in-root/40687392#40687392\nhttps://gist.github.com/reed-lawrence/1f6b7c328ad3886e60dc2b0adcf75a97\n*/\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\nimport { AlertComponent } from '../components/alert/alert.component';\nimport { WrapperComponent } from '../components/alert/wrapper/wrapper.component';\nimport { DomService } from './dom.service';\nimport { Alert, DEFAULT_Alert } from '../interfaces/alert.interface';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class AlertService {\n\tprivate alert: any;\n\tprivate _container: any;\n\tconstructor(\n\t\tprivate dom: DomService,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\n\t) {\n\t\tif (!this.config) this.config = DEFAULT_CONFIG;\n\t\tthis.alert = this.config.alert;\n\t\tif (!this.alert) {\n\t\t\tthis.alert = DEFAULT_Alert;\n\t\t} else {\n\t\t\tfor (let each in DEFAULT_Alert) {\n\t\t\t\tif (this.alert[each]) continue;\n\t\t\t\tthis.alert[each] = DEFAULT_Alert[each];\n\t\t\t}\n\t\t}\n\t\tthis._container = this.dom.appendComponent(WrapperComponent);\n\t}\n\tprivate uniques: any = {};\n\tprivate shortcuts: any = {\n\t\ttl: 'topLeft',\n\t\ttc: 'topCenter',\n\t\ttr: 'topRight',\n\t\tr: 'right',\n\t\tbr: 'bottomRight',\n\t\tbc: 'bottomCenter',\n\t\tbl: 'bottomLeft',\n\t\tl: 'left',\n\t\tc: 'center',\n\t};\n\tprivate positionNumber: any = {\n\t\ttopLeft: 3,\n\t\ttopCenter: 4,\n\t\ttopRight: 2,\n\t\tright: '',\n\t\tbottomRight: 0,\n\t\tbottomCenter: 5,\n\t\tbottomLeft: 1,\n\t\tleft: '',\n\t\tcenter: 6,\n\t};\n\n\tshow(opts: any | Alert) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\ttext: opts,\n\t\t\t};\n\t\t}\n\t\tif (!opts) opts = {};\n\t\tif (!opts['type']) opts['type'] = 'info';\n\t\tfor (let each in this.alert) {\n\t\t\tif (each == 'class')\n\t\t\t\topts[each] = opts[each] + ' ' + this.alert[each];\n\t\t\telse if (typeof opts[each] == 'undefined')\n\t\t\t\topts[each] = this.alert[each];\n\t\t}\n\t\tif (this.shortcuts[opts.position])\n\t\t\topts.position = this.shortcuts[opts.position];\n\t\tif (!opts.position) opts.position = 'bottomRight';\n\t\tvar content: any;\n\t\topts.close = () => {\n\t\t\tif (content) content.componentRef.destroy();\n\t\t\topts.component.nativeElement.remove();\n\t\t\tif (typeof (opts as Alert).onClose == 'function')\n\t\t\t\t(opts as Alert).onClose();\n\t\t};\n\t\t// let component = this.dom.appendById(AlertComponent, opts, opts.position);\n\t\tlet customElement = false;\n\n\t\tif (\n\t\t\ttypeof opts.component == 'string' &&\n\t\t\tthis.alert.alerts[opts.component]\n\t\t) {\n\t\t\topts.component = this.alert.alerts[opts.component];\n\t\t\tcustomElement = true;\n\t\t} else {\n\t\t\topts.component = this.dom.appendById(\n\t\t\t\tAlertComponent,\n\t\t\t\topts,\n\t\t\t\topts.position\n\t\t\t);\n\t\t}\n\n\t\tif (typeof opts.component === 'function') {\n\t\t\tcontent = this.dom.appendComponent(\n\t\t\t\topts.component,\n\t\t\t\topts,\n\t\t\t\tthis._container.nativeElement.children[0].children[\n\t\t\t\t\tthis.positionNumber[opts.position] || 0\n\t\t\t\t]\n\t\t\t\t// component.nativeElement.children[0].children[0].children[0] as HTMLElement\n\t\t\t);\n\t\t}\n\n\t\tif (opts.unique) {\n\t\t\tif (this.uniques[opts.unique]) this.uniques[opts.unique].remove();\n\t\t\tthis.uniques[opts.unique] = opts.component.nativeElement;\n\t\t}\n\n\t\tif (typeof opts.timeout !== 'number') {\n\t\t\topts.timeout = 2000;\n\t\t}\n\n\t\tif (opts.timeout) {\n\t\t\tsetTimeout(() => {\n\t\t\t\topts.close();\n\t\t\t}, opts.timeout);\n\t\t}\n\n\t\treturn opts.component.nativeElement;\n\t}\n\n\topen(opts: Alert) {\n\t\tthis.show(opts);\n\t}\n\n\tinfo(opts: Alert) {\n\t\topts['type'] = 'info';\n\t\tthis.show(opts);\n\t}\n\n\tsuccess(opts: Alert) {\n\t\topts['type'] = 'success';\n\t\tthis.show(opts);\n\t}\n\n\twarning(opts: Alert) {\n\t\topts['type'] = 'warning';\n\t\tthis.show(opts);\n\t}\n\n\terror(opts: Alert) {\n\t\topts['type'] = 'error';\n\t\tthis.show(opts);\n\t}\n\n\tquestion(opts: Alert) {\n\t\topts['type'] = 'question';\n\t\tthis.show(opts);\n\t}\n\n\tdestroy() {\n\t\t[\n\t\t\t'bottomRight',\n\t\t\t'bottomLeft',\n\t\t\t'bottomCenter',\n\t\t\t'topRight',\n\t\t\t'topLeft',\n\t\t\t'topCenter',\n\t\t\t'center',\n\t\t].forEach((id) => {\n\t\t\tconst el = document.getElementById(id);\n\n\t\t\tif (el) el.innerHTML = '';\n\t\t});\n\t}\n}\n","import {\n\tInjectable,\n\tInject,\n\tPLATFORM_ID,\n\tSignal,\n\tWritableSignal,\n\tsignal,\n} from '@angular/core';\nimport { Subject, Observable } from 'rxjs';\nimport { Selectitem } from '../interfaces/select.item.interface';\n\n// Add capitalize method to String prototype if it doesn't already exist\nif (!String.prototype.capitalize) {\n\tString.prototype.capitalize = function (): string {\n\t\tif (this.length > 0) {\n\t\t\treturn this.charAt(0).toUpperCase() + this.slice(1).toLowerCase();\n\t\t}\n\t\treturn '';\n\t};\n}\n\n// Extend the String interface to include the new method\ndeclare global {\n\tinterface String {\n\t\tcapitalize(): string;\n\t}\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class CoreService {\n\tdeviceID =\n\t\tlocalStorage.getItem('deviceID') ||\n\t\t(typeof crypto?.randomUUID === 'function'\n\t\t\t? crypto.randomUUID()\n\t\t\t: this.UUID());\n\n\tconstructor(@Inject(PLATFORM_ID) private platformId: boolean) {\n\t\tlocalStorage.setItem('deviceID', this.deviceID);\n\n\t\tthis.detectDevice();\n\t}\n\n\t/**\n\t * Generates a UUID (Universally Unique Identifier) version 4.\n\t *\n\t * This implementation uses `Math.random()` to generate random values,\n\t * making it suitable for general-purpose identifiers, but **not** for\n\t * cryptographic or security-sensitive use cases.\n\t *\n\t * The format follows the UUID v4 standard: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`\n\t * where:\n\t * - `x` is a random hexadecimal digit (0–f)\n\t * - `4` indicates UUID version 4\n\t * - `y` is one of 8, 9, A, or B\n\t *\n\t * Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479`\n\t *\n\t * @returns A string containing a UUID v4.\n\t */\n\tUUID(): string {\n\t\treturn 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n\t\t\t/[xy]/g,\n\t\t\t(c: string) => {\n\t\t\t\tconst r = (Math.random() * 16) | 0;\n\t\t\t\tconst v = c === 'x' ? r : (r & 0x3) | 0x8;\n\t\t\t\treturn v.toString(16);\n\t\t\t}\n\t\t);\n\t}\n\n\t/**\n\t * Converts an object to an array. Optionally holds keys instead of values.\n\t *\n\t * @param {any} obj - The object to be converted.\n\t * @param {boolean} [holder=false] - If true, the keys will be held in the array; otherwise, the values will be held.\n\t * @returns {any[]} The resulting array.\n\t */\n\tota(obj: any, holder: boolean = false): any[] {\n\t\tif (Array.isArray(obj)) return obj;\n\t\tif (typeof obj !== 'object' || obj === null) return [];\n\t\tconst arr = [];\n\t\tfor (const each in obj) {\n\t\t\tif (\n\t\t\t\tobj.hasOwnProperty(each) &&\n\t\t\t\t(obj[each] ||\n\t\t\t\t\ttypeof obj[each] === 'number' ||\n\t\t\t\t\ttypeof obj[each] === 'boolean')\n\t\t\t) {\n\t\t\t\tif (holder) {\n\t\t\t\t\tarr.push(each);\n\t\t\t\t} else {\n\t\t\t\t\tarr.push(obj[each]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\n\t/**\n\t * Removes elements from `fromArray` that are present in `removeArray` based on a comparison field.\n\t *\n\t * @param {any[]} removeArray - The array of elements to remove.\n\t * @param {any[]} fromArray - The array from which to remove elements.\n\t * @param {string} [compareField='_id'] - The field to use for comparison.\n\t * @returns {any[]} The modified `fromArray` with elements removed.\n\t */\n\tsplice(\n\t\tremoveArray: any[],\n\t\tfromArray: any[],\n\t\tcompareField: string = '_id'\n\t): any[] {\n\t\tif (!Array.isArray(removeArray) || !Array.isArray(fromArray)) {\n\t\t\treturn fromArray;\n\t\t}\n\n\t\tconst removeSet = new Set(\n\t\t\tremoveArray.map((item) => item[compareField])\n\t\t);\n\t\treturn fromArray.filter((item) => !removeSet.has(item[compareField]));\n\t}\n\n\t/**\n\t * Unites multiple _id values into a single unique _id.\n\t * The resulting _id is unique regardless of the order of the input _id values.\n\t *\n\t * @param {...string[]} args - The _id values to be united.\n\t * @returns {string} The unique combined _id.\n\t */\n\tids2id(...args: string[]): string {\n\t\targs.sort((a, b) => {\n\t\t\tif (\n\t\t\t\tNumber(a.toString().substring(0, 8)) >\n\t\t\t\tNumber(b.toString().substring(0, 8))\n\t\t\t) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn -1;\n\t\t});\n\n\t\treturn args.join();\n\t}\n\n\t// After While\n\tprivate _afterWhile: Record<string, number> = {};\n\t/**\n\t * Delays the execution of a callback function for a specified amount of time.\n\t * If called again within that time, the timer resets.\n\t *\n\t * @param {string | object | (() => void)} doc - A unique identifier for the timer, an object to host the timer, or the callback function.\n\t * @param {() => void} [cb] - The callback function to execute after the delay.\n\t * @param {number} [time=1000] - The delay time in milliseconds.\n\t */\n\tafterWhile(\n\t\tdoc: string | object | (() => void),\n\t\tcb?: () => void,\n\t\ttime: number = 1000\n\t): void {\n\t\tif (typeof doc === 'function') {\n\t\t\tcb = doc as () => void;\n\t\t\tdoc = 'common';\n\t\t}\n\n\t\tif (typeof cb === 'function' && typeof time === 'number') {\n\t\t\tif (typeof doc === 'string') {\n\t\t\t\tclearTimeout(this._afterWhile[doc]);\n\t\t\t\tthis._afterWhile[doc] = window.setTimeout(cb, time);\n\t\t\t} else if (typeof doc === 'object') {\n\t\t\t\tclearTimeout((doc as { __afterWhile: number }).__afterWhile);\n\t\t\t\t(doc as { __afterWhile: number }).__afterWhile =\n\t\t\t\t\twindow.setTimeout(cb, time);\n\t\t\t} else {\n\t\t\t\tconsole.warn('badly configured after while');\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Recursively copies properties from one object to another.\n\t * Handles nested objects, arrays, and Date instances appropriately.\n\t *\n\t * @param from - The source object from which properties are copied.\n\t * @param to - The target object to which properties are copied.\n\t */\n\tcopy(from: any, to: any) {\n\t\tfor (const each in from) {\n\t\t\tif (\n\t\t\t\ttypeof from[each] !== 'object' ||\n\t\t\t\tfrom[each] instanceof Date ||\n\t\t\t\tArray.isArray(from[each]) ||\n\t\t\t\tfrom[each] === null\n\t\t\t) {\n\t\t\t\tto[each] = from[each];\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\ttypeof to[each] !== 'object' ||\n\t\t\t\t\tto[each] instanceof Date ||\n\t\t\t\t\tArray.isArray(to[each]) ||\n\t\t\t\t\tto[each] === null\n\t\t\t\t) {\n\t\t\t\t\tto[each] = {};\n\t\t\t\t}\n\n\t\t\t\tthis.copy(from[each], to[each]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Device management\n\tdevice = '';\n\t/**\n\t * Detects the device type based on the user agent.\n\t */\n\tdetectDevice(): void {\n\t\tconst userAgent =\n\t\t\tnavigator.userAgent || navigator.vendor || (window as any).opera;\n\t\tif (/windows phone/i.test(userAgent)) {\n\t\t\tthis.device = 'Windows Phone';\n\t\t} else if (/android/i.test(userAgent)) {\n\t\t\tthis.device = 'Android';\n\t\t} else if (\n\t\t\t/iPad|iPhone|iPod/.test(userAgent) &&\n\t\t\t!(window as any).MSStream\n\t\t) {\n\t\t\tthis.device = 'iOS';\n\t\t} else {\n\t\t\tthis.device = 'Web';\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the device is a mobile device.\n\t * @returns {boolean} - Returns true if the device is a mobile device.\n\t */\n\tisMobile(): boolean {\n\t\treturn (\n\t\t\tthis.device === 'Windows Phone' ||\n\t\t\tthis.device === 'Android' ||\n\t\t\tthis.device === 'iOS'\n\t\t);\n\t}\n\n\t/**\n\t * Checks if the device is a tablet.\n\t * @returns {boolean} - Returns true if the device is a tablet.\n\t */\n\tisTablet(): boolean {\n\t\treturn this.device === 'iOS' && /iPad/.test(navigator.userAgent);\n\t}\n\n\t/**\n\t * Checks if the device is a web browser.\n\t * @returns {boolean} - Returns true if the device is a web browser.\n\t */\n\tisWeb(): boolean {\n\t\treturn this.device === 'Web';\n\t}\n\n\t/**\n\t * Checks if the device is an Android device.\n\t * @returns {boolean} - Returns true if the device is an Android device.\n\t */\n\tisAndroid(): boolean {\n\t\treturn this.device === 'Android';\n\t}\n\n\t/**\n\t * Checks if the device is an iOS device.\n\t * @returns {boolean} - Returns true if the device is an iOS device.\n\t */\n\tisIos(): boolean {\n\t\treturn this.device === 'iOS';\n\t}\n\n\t// Version management\n\tversion = '1.0.0';\n\n\tappVersion = '';\n\n\tdateVersion = '';\n\n\t/**\n\t * Sets the combined version string based on appVersion and dateVersion.\n\t */\n\tsetVersion(): void {\n\t\tthis.version = this.appVersion || '';\n\n\t\tthis.version += this.version && this.dateVersion ? ' ' : '';\n\n\t\tthis.version += this.dateVersion || '';\n\t}\n\n\t/**\n\t * Sets the app version and updates the combined version string.\n\t *\n\t * @param {string} appVersion - The application version to set.\n\t */\n\tsetAppVersion(appVersion: string): void {\n\t\tthis.appVersion = appVersion;\n\n\t\tthis.setVersion();\n\t}\n\n\t/**\n\t * Sets the date version and updates the combined version string.\n\t *\n\t * @param {string} dateVersion - The date version to set.\n\t */\n\tsetDateVersion(dateVersion: string): void {\n\t\tthis.dateVersion = dateVersion;\n\n\t\tthis.setVersion();\n\t}\n\n\t// Signal management\n\tprivate _signals: Record<string, Subject<any>> = {};\n\n\t/**\n\t * Emits a signal, optionally passing data to the listeners.\n\t * @param signal - The name of the signal to emit.\n\t * @param data - Optional data to pass to the listeners.\n\t */\n\temit(signal: string, data?: any): void {\n\t\tif (!this._signals[signal]) {\n\t\t\tthis._signals[signal] = new Subject<any>();\n\t\t}\n\n\t\tthis._signals[signal].next(data);\n\t}\n\n\t/**\n\t * Returns an Observable that emits values when the specified signal is emitted.\n\t * Multiple components or services can subscribe to this Observable to be notified of the signal.\n\t * @param signal - The name of the signal to listen for.\n\t * @returns An Observable that emits when the signal is emitted.\n\t */\n\ton(signal: string): Observable<any> {\n\t\tif (!this._signals[signal]) {\n\t\t\tthis._signals[signal] = new Subject<any>();\n\t\t}\n\n\t\treturn this._signals[signal].asObservable();\n\t}\n\n\t/**\n\t * Completes the Subject for a specific signal, effectively stopping any future emissions.\n\t * This also unsubscribes all listeners for the signal.\n\t * @param signal - The name of the signal to stop.\n\t */\n\toff(signal: string): void {\n\t\tif (!this._signals[signal]) return;\n\t\tthis._signals[signal].complete();\n\t\tdelete this._signals[signal];\n\t}\n\n\t// Await management\n\tprivate _completed: Record<string, unknown> = {};\n\n\tprivate _completeResolvers: Record<string, ((doc: unknown) => void)[]> = {};\n\n\t/**\n\t * Marks a task as complete.\n\t * @param task - The task to mark as complete, identified by a string.\n\t */\n\tcomplete(task: string, document: unknown = true): void {\n\t\tthis._completed[task] = document;\n\n\t\tif (this._completeResolvers[task]) {\n\t\t\tthis._completeResolvers[task].forEach((resolve) =>\n\t\t\t\tresolve(document)\n\t\t\t);\n\n\t\t\tthis._completeResolvers[task] = [];\n\t\t}\n\t}\n\n\t/**\n\t * Waits for one or more tasks to be marked as complete.\n\t *\n\t * @param {string | string[]} tasks - The task or array of tasks to wait for.\n\t * @returns {Promise<unknown>} A promise that resolves when all specified tasks are complete.\n\t * - If a single task is provided, resolves with its completion result.\n\t * - If multiple tasks are provided, resolves with an array of results in the same order.\n\t *\n\t * @remarks\n\t * If any task is not yet completed, a resolver is attached. The developer is responsible for managing\n\t * resolver cleanup if needed. Resolvers remain after resolution and are not removed automatically.\n\t */\n\tonComplete(tasks: string | string[]): Promise<unknown> {\n\t\tif (typeof tasks === 'string') {\n\t\t\ttasks = [tasks];\n\t\t}\n\n\t\tif (this._isCompleted(tasks)) {\n\t\t\treturn Promise.resolve(\n\t\t\t\ttasks.length > 1\n\t\t\t\t\t? tasks.map((task) => this._completed[task])\n\t\t\t\t\t: this._completed[tasks[0]]\n\t\t\t);\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tfor (const task of tasks) {\n\t\t\t\tif (!this._completeResolvers[task]) {\n\t\t\t\t\tthis._completeResolvers[task] = [];\n\t\t\t\t}\n\n\t\t\t\tthis._completeResolvers[task].push(\n\t\t\t\t\tthis._allCompleted(tasks, resolve)\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Returns a resolver function that checks if all given tasks are completed,\n\t * and if so, calls the provided resolve function with their results.\n\t *\n\t * @param {string[]} tasks - The list of task names to monitor for completion.\n\t * @param {(value: unknown) => void} resolve - The resolver function to call once all tasks are complete.\n\t * @returns {(doc: unknown) => void} A function that can be registered as a resolver for each task.\n\t *\n\t * @remarks\n\t * This function does not manage or clean up resolvers. It assumes the developer handles any potential duplicates or memory concerns.\n\t */\n\tprivate _allCompleted(\n\t\ttasks: string[],\n\t\tresolve: (value: unknown) => void\n\t): (doc: unknown) => void {\n\t\treturn (doc: unknown) => {\n\t\t\tif (this._isCompleted(tasks)) {\n\t\t\t\tresolve(\n\t\t\t\t\ttasks.length > 1\n\t\t\t\t\t\t? tasks.map((task) => this._completed[task])\n\t\t\t\t\t\t: this._completed[tasks[0]]\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Checks whether all specified tasks have been marked as completed.\n\t *\n\t * @param {string[]} tasks - The array of task names to check.\n\t * @returns {boolean} `true` if all tasks are completed, otherwise `false`.\n\t */\n\tprivate _isCompleted(tasks: string[]): boolean {\n\t\tfor (const task of tasks) {\n\t\t\tif (!this._completed[task]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if a task is completed.\n\t * @param task - The task to check, identified by a string.\n\t * @returns True if the task is completed, false otherwise.\n\t */\n\tcompleted(task: string): unknown {\n\t\treturn this._completed[task];\n\t}\n\n\t/**\n\t * Clears the completed state for a specific task.\n\t *\n\t * This removes the task from the internal `_completed` store,\n\t * allowing it to be awaited again in the future if needed.\n\t * It does not affect pending resolvers or trigger any callbacks.\n\t *\n\t * @param task - The task identifier to clear from completed state.\n\t */\n\tclearCompleted(task: string) {\n\t\tdelete this._completed[task];\n\t}\n\n\t// Locking management\n\tprivate _locked: Record<string, boolean> = {};\n\tprivate _unlockResolvers: Record<string, (() => void)[]> = {};\n\n\t/**\n\t * Locks a resource to prevent concurrent access.\n\t * @param which - The resource to lock, identified by a string.\n\t */\n\tlock(which: string): void {\n\t\tthis._locked[which] = true;\n\n\t\tif (!this._unlockResolvers[which]) {\n\t\t\tthis._unlockResolvers[which] = [];\n\t\t}\n\t}\n\n\t/**\n\t * Unlocks a resource, allowing access.\n\t * @param which - The resource to unlock, identified by a string.\n\t */\n\tunlock(which: string): void {\n\t\tthis._locked[which] = false;\n\n\t\tif (this._unlockResolvers[which]) {\n\t\t\tthis._unlockResolvers[which].forEach((resolve) => resolve());\n\n\t\t\tthis._unlockResolvers[which] = [];\n\t\t}\n\t}\n\n\t/**\n\t * Returns a Promise that resolves when the specified resource is unlocked.\n\t * @param which - The resource to watch for unlocking, identified by a string.\n\t * @returns A Promise that resolves when the resource is unlocked.\n\t */\n\tonUnlock(which: string): Promise<void> {\n\t\tif (!this._locked[which]) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tif (!this._unlockResolvers[which]) {\n\t\t\t\tthis._unlockResolvers[which] = [];\n\t\t\t}\n\n\t\t\tthis._unlockResolvers[which].push(resolve);\n\t\t});\n\t}\n\n\t/**\n\t * Checks if a resource is locked.\n\t * @param which - The resource to check, identified by a string.\n\t * @returns True if the resource is locked, false otherwise.\n\t */\n\tlocked(which: string): boolean {\n\t\treturn !!this._locked[which];\n\t}\n\n\t// Linking management\n\tlinkCollections: string[] = [];\n\tlinkRealCollectionName: Record<string, string> = {};\n\tlinkIds: Record<string, Selectitem[]> = {};\n\n\taddLink(name: string, reset: () => Selectitem[], realName = ''): void {\n\t\tthis.linkCollections.push(name);\n\n\t\tthis.linkRealCollectionName[name] = realName || name;\n\n\t\tthis.onComplete(name.toLowerCase() + '_loaded').then(() => {\n\t\t\tthis.linkIds[name] = reset();\n\t\t});\n\n\t\tthis.on(name.toLowerCase() + '_changed').subscribe(() => {\n\t\t\tthis.linkIds[name].splice(0, this.linkIds[name].length);\n\n\t\t\tthis.linkIds[name].push(...reset());\n\t\t});\n\t}\n\n\t// Angular Signals //\n\t/**\n\t * Converts a plain object into a signal-wrapped object.\n\t * Optionally wraps specific fields of the object as individual signals,\n\t * and merges them into the returned signal for fine-grained reactivity.\n\t *\n\t * @template Document - The type of the object being wrapped.\n\t * @param {Document} document - The plain object to wrap into a signal.\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\n\t *        Optional map where each key is a field name and the value is a function\n\t *        to extract the initial value for that field. These fields will be wrapped\n\t *        as separate signals and embedded in the returned object.\n\t *\n\t * @returns {Signal<Document>} A signal-wrapped object, possibly containing\n\t *          nested field signals for more granular control.\n\t *\n\t * @example\n\t * const user = { _id: '1', name: 'Alice', score: 42 };\n\t * const sig = toSignal(user, { score: (u) => u.score });\n\t * console.log(sig().name); // 'Alice'\n\t * console.log(sig().score()); // 42 — field is now a signal\n\t */\n\ttoSignal<Document>(\n\t\tdocument: Document,\n\t\tsignalFields: Record<string, (doc: Document) => unknown> = {}\n\t): Signal<Document> {\n\t\tif (Object.keys(signalFields).length) {\n\t\t\tconst fields: Record<string, Signal<unknown>> = {};\n\n\t\t\tfor (const key in signalFields) {\n\t\t\t\tfields[key] = signal(signalFields[key](document));\n\t\t\t}\n\n\t\t\treturn signal({ ...document, ...fields });\n\t\t} else {\n\t\t\treturn signal(document);\n\t\t}\n\t}\n\n\t/**\n\t * Converts an array of objects into an array of Angular signals.\n\t * Optionally wraps specific fields of each object as individual signals.\n\t *\n\t * @template Document - The type of each object in the array.\n\t * @param {Document[]} arr - Array of plain objects to convert into signals.\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\n\t *        Optional map where keys are field names and values are functions that extract the initial value\n\t *        from the object. These fields will be turned into separate signals.\n\t *\n\t * @returns {Signal<Document>[]} An array where each item is a signal-wrapped object,\n\t *          optionally with individual fields also wrapped in signals.\n\t *\n\t * @example\n\t * toSignalsArray(users, {\n\t *   name: (u) => u.name,\n\t *   score: (u) => u.score,\n\t * });\n\t */\n\ttoSignalsArray<Document>(\n\t\tarr: Document[],\n\t\tsignalFields: Record<string, (doc: Document) => unknown> = {}\n\t): Signal<Document>[] {\n\t\treturn arr.map((obj) => this.toSignal(obj, signalFields));\n\t}\n\n\t/**\n\t * Adds a new object to the signals array.\n\t * Optionally wraps specific fields of the object as individual signals before wrapping the whole object.\n\t *\n\t * @template Document - The type of the object being added.\n\t * @param {Signal<Document>[]} signals - The signals array to append to.\n\t * @param {Document} item - The object to wrap and push as a signal.\n\t * @param {Record<string, (doc: Document) => unknown>} [signalFields={}] -\n\t *        Optional map of fields to be wrapped as signals within the object.\n\t *\n\t * @returns {void}\n\t */\n\tpushSignal<Document>(\n\t\tsignals: Signal<Document>[],\n\t\titem: Document,\n\t\tsignalFields: Record<string, (doc: Document) => unknown> = {}\n\t): void {\n\t\tsignals.push(this.toSignal(item, signalFields));\n\t}\n\n\t/**\n\t * Removes the first signal from the array whose object's field matches the provided value.\n\t * @template Document\n\t * @param {WritableSignal<Document>[]} signals - The signals array to modify.\n\t * @param {unknown} value - The value to match.\n\t * @param {string} [field='_id'] - The object field to match against.\n\t * @returns {void}\n\t */\n\tremoveSignalByField<Document extends Record<string, unknown>>(\n\t\tsignals: WritableSignal<Document>[],\n\t\tvalue: unknown,\n\t\tfield: string = '_id'\n\t): void {\n\t\tconst idx = signals.findIndex((sig) => sig()[field] === value);\n\n\t\tif (idx > -1) signals.splice(idx, 1);\n\t}\n\n\t/**\n\t * Returns a generic trackBy function for *ngFor, tracking by the specified object field.\n\t * @template Document\n\t * @param {string} field - The object field to use for tracking (e.g., '_id').\n\t * @returns {(index: number, sig: Signal<Document>) => unknown} TrackBy function for Angular.\n\t */\n\ttrackBySignalField<Document extends Record<string, unknown>>(\n\t\tfield: string\n\t) {\n\t\treturn (_: number, sig: Signal<Document>) => sig()[field];\n\t}\n\n\t/**\n\t * Finds the first signal in the array whose object's field matches the provided value.\n\t * @template Document\n\t * @param {Signal<Document>[]} signals - Array of signals to search.\n\t * @param {unknown} value - The value to match.\n\t * @param {string} [field='_id'] - The object field to match against.\n\t * @returns {Signal<Document> | undefined} The found signal or undefined if not found.\n\t */\n\tfindSignalByField<Document extends Record<string, unknown>>(\n\t\tsignals: Signal<Document>[],\n\t\tvalue: unknown,\n\t\tfield = '_id'\n\t): Signal<Document> | undefined {\n\t\treturn signals.find(\n\t\t\t(sig) => sig()[field] === value\n\t\t) as Signal<Document>;\n\t}\n\n\t/**\n\t * Updates the first writable signal in the array whose object's field matches the provided value.\n\t * @template Document\n\t * @param {WritableSignal<Document>[]} signals - Array of writable signals to search.\n\t * @param {unknown} value - The value to match.\n\t * @param {(val: Document) => Document} updater - Function to produce the updated object.\n\t * @param {string} field - The object field to match against.\n\t * @returns {void}\n\t */\n\tupdateSignalByField<Document extends Record<string, unknown>>(\n\t\tsignals: WritableSignal<Document>[],\n\t\tvalue: unknown,\n\t\tupdater: (val: Document) => Document,\n\t\tfield: string\n\t): void {\n\t\tconst sig = this.findSignalByField<Document>(\n\t\t\tsignals,\n\t\t\tvalue,\n\t\t\tfield\n\t\t) as WritableSignal<Document>;\n\n\t\tif (sig) sig.update(updater);\n\t}\n}\n","import { ChangeDetectorRef, inject } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport {\n\tCrudDocument,\n\tCrudOptions,\n\tCrudServiceInterface,\n\tTableConfig,\n} from '../interfaces/crud.interface';\nimport { AlertService } from '../services/alert.service';\nimport { CoreService } from '../services/core.service';\n\n/**\n * Interface representing the shape of a form service used by the CrudComponent.\n * The consuming app must provide a service that implements this structure.\n */\ninterface FormServiceInterface<FormInterface> {\n\tprepareForm: (form: FormInterface) => any;\n\tmodal: <T>(form: any, options?: any, doc?: T) => Promise<T>;\n\tmodalDocs: <T>(docs: T[]) => Promise<T[]>;\n\tmodalUnique: <T>(collection: string, key: string, doc: T) => void;\n\talert?: {\n\t\tquestion: (config: {\n\t\t\ttext: string;\n\t\t\tbuttons: { text: string; callback?: () => void }[];\n\t\t}) => void;\n\t};\n}\n\n/**\n * Abstract reusable base class for CRUD list views.\n * It encapsulates pagination, modals, and document handling logic.\n *\n * @template Service - A service implementing CrudServiceInterface for a specific document type\n * @template Document - The data model extending CrudDocument\n */\nexport abstract class CrudComponent<\n\tService extends CrudServiceInterface<Document>,\n\tDocument extends CrudDocument,\n\tFormInterface\n> {\n\t/** Service responsible for data fetching, creating, updating, deleting */\n\tprotected service: Service;\n\n\t/** The array of documents currently loaded and shown */\n\tprotected documents: Document[] = [];\n\n\t/** The reactive form instance generated from the provided config */\n\tprotected form: any;\n\n\t/** Current pagination page */\n\tprotected page = 1;\n\n\t/** CoreService handles timing and copying helpers */\n\tprivate __core = inject(CoreService);\n\n\t/** AlertService handles alerts */\n\tprivate __alert = inject(AlertService);\n\n\t/** ChangeDetectorRef handles on push strategy */\n\tprivate __cdr = inject(ChangeDetectorRef);\n\n\t/** Internal reference to form service matching FormServiceInterface */\n\tprivate __form: FormServiceInterface<FormInterface>;\n\n\t/**\n\t * Constructor\n\t *\n\t * @param formConfig - Object describing form title and its component structure\n\t * @param formService - Any service that conforms to FormServiceInterface (usually casted)\n\t * @param translate - An object providing a translate() method for i18n\n\t * @param service - CRUD service implementing get/create/update/delete\n\t */\n\tconstructor(\n\t\tformConfig: unknown,\n\t\tprotected formService: unknown,\n\t\tprotected translate: { translate: (key: string) => string },\n\t\tservice: Service,\n\t\tmodule = ''\n\t) {\n\t\tthis.service = service;\n\n\t\tthis.__form = formService as FormServiceInterface<FormInterface>;\n\n\t\tconst form = formConfig as FormInterface;\n\n\t\tthis.form = this.__form.prepareForm(form);\n\n\t\tthis._module = module;\n\t}\n\n\t/**\n\t * Loads documents for a given page.\n\t */\n\tprotected setDocuments(page = this.page): Promise<void> {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (this.configType === 'server') {\n\t\t\t\tthis.page = page;\n\n\t\t\t\tthis.__core.afterWhile(\n\t\t\t\t\tthis,\n\t\t\t\t\t() => {\n\t\t\t\t\t\tthis.service\n\t\t\t\t\t\t\t.get({ page }, this.getOptions())\n\t\t\t\t\t\t\t.subscribe((docs: Document[]) => {\n\t\t\t\t\t\t\t\tthis.documents.splice(0, this.documents.length);\n\n\t\t\t\t\t\t\t\tthis.documents.push(...docs);\n\n\t\t\t\t\t\t\t\tresolve();\n\n\t\t\t\t\t\t\t\tthis.__cdr.markForCheck();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\t250\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.documents = this.service.getDocs();\n\n\t\t\t\tthis.service.loaded.then(() => {\n\t\t\t\t\tresolve();\n\n\t\t\t\t\tthis.__cdr.markForCheck();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected updatableFields = ['_id', 'name', 'description', 'data'];\n\n\t/**\n\t * Clears temporary metadata before document creation.\n\t */\n\tprotected preCreate(doc: Document): void {\n\t\tdelete doc.__created;\n\t}\n\n\t/**\n\t * Funciton which controls whether the create functionality is available.\n\t */\n\tprotected allowCreate(): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Funciton which controls whether the update and delete functionality is available.\n\t */\n\tprotected allowMutate(): boolean {\n\t\treturn true;\n\t}\n\n\t/**\n\t * Funciton which controls whether the unique url functionality is available.\n\t */\n\tprotected allowUrl(): boolean {\n\t\treturn true;\n\t}\n\n\tprotected allowSort(): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Funciton which prepare get crud options.\n\t */\n\tprotected getOptions(): CrudOptions<Document> {\n\t\treturn {} as CrudOptions<Document>;\n\t}\n\n\t/**\n\t * Handles bulk creation and updating of documents.\n\t * In creation mode, adds new documents.\n\t * In update mode, syncs changes and deletes removed entries.\n\t */\n\tprotected bulkManagement(create = true): () => void {\n\t\treturn (): void => {\n\t\t\tthis.__form\n\t\t\t\t.modalDocs<Document>(\n\t\t\t\t\tcreate\n\t\t\t\t\t\t? []\n\t\t\t\t\t\t: this.documents.map(\n\t\t\t\t\t\t\t\t(obj: any) =>\n\t\t\t\t\t\t\t\t\tObject.fromEntries(\n\t\t\t\t\t\t\t\t\t\tthis.updatableFields.map((key) => [\n\t\t\t\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\t\t\t\tobj[key],\n\t\t\t\t\t\t\t\t\t\t])\n\t\t\t\t\t\t\t\t\t) as Document\n\t\t\t\t\t\t  )\n\t\t\t\t)\n\t\t\t\t.then(async (docs: Document[]) => {\n\t\t\t\t\tif (create) {\n\t\t\t\t\t\tfor (const doc of docs) {\n\t\t\t\t\t\t\tthis.preCreate(doc);\n\n\t\t\t\t\t\t\tawait firstValueFrom(this.service.create(doc));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (const document of this.documents) {\n\t\t\t\t\t\t\tif (!docs.find((d) => d._id === document._id)) {\n\t\t\t\t\t\t\t\tawait firstValueFrom(\n\t\t\t\t\t\t\t\t\tthis.service.delete(document)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (const doc of docs) {\n\t\t\t\t\t\t\tconst local = this.documents.find(\n\t\t\t\t\t\t\t\t(d) => d._id === doc._id\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (local) {\n\t\t\t\t\t\t\t\tthis.__core.copy(doc, local);\n\n\t\t\t\t\t\t\t\tawait firstValueFrom(\n\t\t\t\t\t\t\t\t\tthis.service.update(local)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.preCreate(doc);\n\n\t\t\t\t\t\t\t\tawait firstValueFrom(this.service.create(doc));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.setDocuments();\n\t\t\t\t});\n\t\t};\n\t}\n\n\tprotected configType: 'server' | 'local' = 'server';\n\n\tprotected perPage = 20;\n\n\t/**\n\t * Configuration object used by the UI for rendering table and handling actions.\n\t */\n\tprotected getConfig(): TableConfig<Document> {\n\t\tconst config = {\n\t\t\tcreate: this.allowCreate()\n\t\t\t\t? (): void => {\n\t\t\t\t\t\tthis.__form.modal<Document>(this.form, {\n\t\t\t\t\t\t\tlabel: 'Create',\n\t\t\t\t\t\t\tclick: async (\n\t\t\t\t\t\t\t\tcreated: unknown,\n\t\t\t\t\t\t\t\tclose: () => void\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tclose();\n\t\t\t\t\t\t\t\tthis.preCreate(created as Document);\n\n\t\t\t\t\t\t\t\tawait firstValueFrom(\n\t\t\t\t\t\t\t\t\tthis.service.create(created as Document)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tthis.setDocuments();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t});\n\t\t\t\t  }\n\t\t\t\t: null,\n\n\t\t\tupdate: this.allowMutate()\n\t\t\t\t? (doc: Document): void => {\n\t\t\t\t\t\tthis.__form\n\t\t\t\t\t\t\t.modal<Document>(this.form, [], doc)\n\t\t\t\t\t\t\t.then((updated: Document) => {\n\t\t\t\t\t\t\t\tthis.__core.copy(updated, doc);\n\n\t\t\t\t\t\t\t\tthis.service.update(doc);\n\n\t\t\t\t\t\t\t\tthis.__cdr.markForCheck();\n\t\t\t\t\t\t\t});\n\t\t\t\t  }\n\t\t\t\t: null,\n\n\t\t\tdelete: this.allowMutate()\n\t\t\t\t? (doc: Document): void => {\n\t\t\t\t\t\tthis.__alert.question({\n\t\t\t\t\t\t\ttext: this.translate.translate(\n\t\t\t\t\t\t\t\t`Common.Are you sure you want to delete this${\n\t\t\t\t\t\t\t\t\tthis._module ? ' ' + this._module : ''\n\t\t\t\t\t\t\t\t}?`\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tbuttons: [\n\t\t\t\t\t\t\t\t{ text: this.translate.translate('Common.No') },\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttext: this.translate.translate(\n\t\t\t\t\t\t\t\t\t\t'Common.Yes'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tcallback: async (): Promise<void> => {\n\t\t\t\t\t\t\t\t\t\tawait firstValueFrom(\n\t\t\t\t\t\t\t\t\t\t\tthis.service.delete(doc)\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\tthis.setDocuments();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t});\n\t\t\t\t  }\n\t\t\t\t: null,\n\n\t\t\tbuttons: [\n\t\t\t\tthis.allowUrl() && this._module\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ticon: 'cloud_download',\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\n\t\t\t\t\t\t\t\tthis.__form.modalUnique<Document>(\n\t\t\t\t\t\t\t\t\tthis._module,\n\t\t\t\t\t\t\t\t\t'url',\n\t\t\t\t\t\t\t\t\tdoc\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t  }\n\t\t\t\t\t: null,\n\t\t\t\tthis.allowSort()\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ticon: 'arrow_upward',\n\t\t\t\t\t\t\tclick: (doc: Document): void => {\n\t\t\t\t\t\t\t\tconst index = this.documents.findIndex(\n\t\t\t\t\t\t\t\t\t(d) => d._id === doc._id\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif (index) {\n\t\t\t\t\t\t\t\t\tthis.documents.splice(index, 1);\n\n\t\t\t\t\t\t\t\t\tthis.documents.splice(index - 1, 0, doc);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\t\t\tlet i = 0;\n\t\t\t\t\t\t\t\t\ti < this.documents.length;\n\t\t\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tif (this.documents[i].order !== i) {\n\t\t\t\t\t\t\t\t\t\tthis.documents[i].order = i;\n\n\t\t\t\t\t\t\t\t\t\tthis.service.update(this.documents[i]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthis.__cdr.markForCheck();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t  }\n\t\t\t\t\t: null,\n\t\t\t],\n\n\t\t\theaderButtons: [\n\t\t\t\tthis.allowCreate()\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ticon: 'playlist_add',\n\t\t\t\t\t\t\tclick: this.bulkManagement(),\n\t\t\t\t\t\t\tclass: 'playlist',\n\t\t\t\t\t  }\n\t\t\t\t\t: null,\n\t\t\t\tthis.allowMutate()\n\t\t\t\t\t? {\n\t\t\t\t\t\t\ticon: 'edit_note',\n\t\t\t\t\t\t\tclick: this.bulkManagement(false),\n\t\t\t\t\t\t\tclass: 'edit',\n\t\t\t\t\t  }\n\t\t\t\t\t: null,\n\t\t\t],\n\t\t\tallDocs: true,\n\t\t};\n\n\t\treturn this.configType === 'server'\n\t\t\t? {\n\t\t\t\t\t...config,\n\t\t\t\t\tpaginate: this.setDocuments.bind(this),\n\t\t\t\t\tperPage: this.perPage,\n\t\t\t\t\tsetPerPage: this.service.setPerPage?.bind(this.service),\n\t\t\t\t\tallDocs: false,\n\t\t\t  }\n\t\t\t: config;\n\t}\n\n\tprivate _module = '';\n}\n","import {\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tOutput,\n\tHostListener,\n} from '@angular/core';\n\n@Directive({\n\tselector: '[clickOutside]',\n\tstandalone: false,\n})\nexport class ClickOutsideDirective {\n\t@Output() clickOutside: EventEmitter<Event> = new EventEmitter<Event>();\n\n\tconstructor(private elementRef: ElementRef) {}\n\n\t@HostListener('document:click', ['$event'])\n\tonClick(event: Event): void {\n\t\tconst clickedInside = this.elementRef.nativeElement.contains(\n\t\t\tevent.target\n\t\t);\n\t\tif (!clickedInside) {\n\t\t\tthis.clickOutside.emit(event);\n\t\t}\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'arr',\n\tstandalone: false,\n})\nexport class ArrPipe implements PipeTransform {\n\ttransform(data: any, type?: any, refresh?: any): any {\n\t\tif (!data) {\n\t\t\treturn [];\n\t\t}\n\t\tif (typeof data == 'string') return data.split(type || ' ');\n\t\tif (Array.isArray(data)) {\n\t\t\treturn data;\n\t\t}\n\t\tif (typeof data != 'object') {\n\t\t\treturn [];\n\t\t}\n\t\tlet arr = [];\n\t\tfor (let each in data) {\n\t\t\tif (!data[each]) continue;\n\t\t\tif (type == 'prop') {\n\t\t\t\tarr.push(each);\n\t\t\t} else if (type == 'value') {\n\t\t\t\tarr.push(data[each]);\n\t\t\t} else {\n\t\t\t\tarr.push({\n\t\t\t\t\tprop: each,\n\t\t\t\t\tvalue: data[each],\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'mongodate',\n\tstandalone: false,\n})\nexport class MongodatePipe implements PipeTransform {\n\ttransform(_id: any) {\n\t\tif (!_id) return new Date();\n\t\tlet timestamp = _id.toString().substring(0, 8);\n\t\treturn new Date(parseInt(timestamp, 16) * 1000);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'page',\n\tpure: false,\n\tstandalone: false,\n})\nexport class PaginationPipe implements PipeTransform {\n\ttransform(arr: any, config: any, sort: any, search = ''): any {\n\t\tif (!Array.isArray(arr)) return [];\n\t\tarr = arr.slice();\n\t\tfor (let i = 0; i < arr.length; i++) {\n\t\t\tarr[i].num = i + 1;\n\t\t}\n\t\tif (sort.direction) {\n\t\t\tarr.sort((a: any, b: any) => {\n\t\t\t\tif (a[sort.title] < b[sort.title]) {\n\t\t\t\t\treturn sort.direction == 'desc' ? 1 : -1;\n\t\t\t\t}\n\t\t\t\tif (a[sort.title] > b[sort.title]) {\n\t\t\t\t\treturn sort.direction == 'desc' ? -1 : 1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t}\n\t\treturn arr.slice(\n\t\t\t(config.page - 1) * config.perPage,\n\t\t\tconfig.page * config.perPage\n\t\t);\n\t}\n}\n","import { Pipe } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n@Pipe({\n\tname: 'safe',\n\tstandalone: false,\n})\nexport class SafePipe {\n\tconstructor(private sanitizer: DomSanitizer) {}\n\ttransform(html: any) {\n\t\treturn this.sanitizer.bypassSecurityTrustResourceUrl(html);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n/*\n *\tAuthor: Honchar Denys\n *\tSearch for any content in any type of given documents\n *\tAlways returning an array, even if nothing is provided\n */\n@Pipe({\n\tname: 'search',\n\tstandalone: false,\n})\nexport class SearchPipe implements PipeTransform {\n\tprivate c = 0;\n\t// transform(given: any, search?: any, fields?: any, l?: any, i?: any, reload?: any): any {\n\ttransform(\n\t\tgiven: any,\n\t\ts?: any,\n\t\tf?: any,\n\t\tl?: any,\n\t\ti?: any,\n\t\treload?: any\n\t): any {\n\t\t// given stands for the provided array with docs\n\t\t// s stands for search\n\t\t// f stands for fields\n\t\t// l stands for limit\n\t\t// i stands for ignore filter\n\t\t// start stands for start the limit\n\t\tif (!s) {\n\t\t\treturn given;\n\t\t}\n\t\tif (typeof f == 'number') {\n\t\t\tl = f;\n\t\t\tf = null;\n\t\t}\n\t\tif (i || !s) {\n\t\t\tif (l && Array.isArray(given)) return given.slice(0, l);\n\t\t\telse return given || [];\n\t\t}\n\t\tlet _arr: any = [],\n\t\t\t_check: any = {};\n\t\tif (!Array.isArray(s) && typeof s == 'object') {\n\t\t\tlet _s = [];\n\t\t\tfor (let key in s) {\n\t\t\t\tif (s[key]) _s.push(key);\n\t\t\t}\n\t\t\ts = _s;\n\t\t}\n\t\tif (typeof s == 'string') {\n\t\t\ts = [s];\n\t\t}\n\t\tif (!f) f = ['name'];\n\t\tif (typeof f == 'string') f = f.split(' ');\n\t\tlet sub_test = function (\n\t\t\tobj: any,\n\t\t\t_f: any,\n\t\t\tinitObj: any,\n\t\t\tcheck: any\n\t\t): any {\n\t\t\tif (!obj) return;\n\t\t\tif (_f.indexOf('.') > -1) {\n\t\t\t\tlet sub = _f.split('.');\n\t\t\t\tlet nsub = sub.shift();\n\t\t\t\tif (Array.isArray(obj[nsub])) {\n\t\t\t\t\tfor (let s = 0; s < obj[nsub].length; s++) {\n\t\t\t\t\t\tsub_test(obj[nsub][s], sub.join('.'), initObj, check);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\treturn sub_test(obj[nsub], sub.join('.'), initObj, check);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let j = 0; j < s.length; j++) {\n\t\t\t\tlet b = false;\n\t\t\t\tif (\n\t\t\t\t\tobj[_f] &&\n\t\t\t\t\t(typeof obj[_f] == 'string' ||\n\t\t\t\t\t\ttypeof obj[_f] == 'number') &&\n\t\t\t\t\ttypeof s[j] == 'string' &&\n\t\t\t\t\t(obj[_f]\n\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.indexOf(s[j].toLowerCase()) > -1 ||\n\t\t\t\t\t\ts[j]\n\t\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t\t.indexOf(obj[_f].toString().toLowerCase()) > -1)\n\t\t\t\t) {\n\t\t\t\t\tif (!_check[check]) _arr.push(initObj);\n\t\t\t\t\t_check[check] = true;\n\t\t\t\t\tb = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (b) break;\n\t\t\t}\n\t\t};\n\t\tlet test = function (obj: any, check: any) {\n\t\t\tfor (let i = 0; i < f.length; i++) {\n\t\t\t\tsub_test(obj, f[i], obj, check);\n\t\t\t}\n\t\t};\n\t\tif (Array.isArray(given)) {\n\t\t\tfor (let i = 0; i < given.length; i++) {\n\t\t\t\ttest(given[i], i);\n\t\t\t}\n\t\t} else if (typeof given == 'object') {\n\t\t\tfor (let key in given) {\n\t\t\t\ttest(given[key], key);\n\t\t\t}\n\t\t}\n\t\tif (l) return _arr.splice(0, l);\n\t\treturn _arr;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n\tname: 'splice',\n\tstandalone: false,\n})\nexport class SplicePipe implements PipeTransform {\n\ttransform(from: any, which: any, refresh?: number): any {\n\t\tif (Array.isArray(from)) from = { arr: from, prop: '_id' };\n\t\tlet arr = (which.keep && []) || from.arr.slice();\n\t\tif (Array.isArray(which)) which = { arr: which, prop: '_id' };\n\t\tfor (let i = from.arr.length - 1; i >= 0; i--) {\n\t\t\tfor (let j = 0; j < which.arr.length; j++) {\n\t\t\t\tif (from.prop && which.prop) {\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j][which.prop]) {\n\t\t\t\t\t\tif (which.keep) {\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarr.splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (from.prop) {\n\t\t\t\t\tif (from.arr[i][from.prop] == which.arr[j]) {\n\t\t\t\t\t\tif (which.keep) {\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarr.splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (which.prop) {\n\t\t\t\t\tif (from.arr[i] == which.arr[j][which.prop]) {\n\t\t\t\t\t\tif (which.keep) {\n\t\t\t\t\t\t\tarr.push(from.arr[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tarr.splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if (from.arr[i] == which.arr[j]) {\n\t\t\t\t\tif (which.keep) {\n\t\t\t\t\t\tarr.push(from.arr[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tarr.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n    name: 'split',\n    standalone: false\n})\nexport class SplitPipe implements PipeTransform {\n\ttransform(value: string, index = 0, devider = ':'): unknown {\n\t\tconst arr = value.split(devider);\n\n\t\treturn arr.length > index ? arr[index] : '';\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n    name: 'number',\n    standalone: false\n})\nexport class NumberPipe implements PipeTransform {\n\ttransform(value: unknown): number {\n\t\tconst result = Number(value); // Convert value to a number\n\n\t\treturn isNaN(result) ? 0 : result; // Return 0 if conversion fails\n\t}\n}\n","import { Injectable } from '@angular/core';\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class BaseService {\n\tnow = new Date().getTime();\n\n\trefreshNow(): void {\n\t\tthis.now = new Date().getTime();\n\t}\n}\n","import { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\nimport { Injectable, Inject, Optional } from '@angular/core';\nimport { CoreService } from './core.service';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class StoreService {\n\tprivate _prefix = '';\n\n\tconstructor(\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config,\n\t\tprivate core: CoreService\n\t) {\n\t\tthis.config = this.config || DEFAULT_CONFIG;\n\t}\n\n\t/**\n\t * Sets the prefix for storage keys.\n\t *\n\t * @param prefix - The prefix to set.\n\t */\n\tsetPrefix(prefix: string): void {\n\t\tthis._prefix = prefix;\n\t}\n\n\t/**\n\t * Sets a value in storage.\n\t *\n\t * @param key - The storage key.\n\t * @param value - The value to store.\n\t * @param callback - The callback to execute on success.\n\t * @param errCallback - The callback to execute on error.\n\t */\n\tset(\n\t\tkey: string,\n\t\tvalue: string,\n\t\tcallback: () => void = () => {},\n\t\terrCallback: () => void = () => {}\n\t): void {\n\t\tkey = this.applyPrefix(key);\n\n\t\tif (this.config.store?.set) {\n\t\t\tthis.config.store.set(key, value, callback, errCallback);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tlocalStorage.setItem(key, value);\n\t\t\t\tcallback();\n\t\t\t} catch (e) {\n\t\t\t\terrCallback();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Sets a value in storage asynchronously.\n\t *\n\t * @param key - The storage key.\n\t * @param value - The value to store.\n\t * @returns A promise that resolves to a boolean indicating success.\n\t */\n\tasync setAsync(key: string, value: string): Promise<boolean> {\n\t\tkey = this.applyPrefix(key);\n\n\t\ttry {\n\t\t\tif (this.config.store?.set) {\n\t\t\t\tawait this.config.store.set(key, value);\n\t\t\t} else {\n\t\t\t\tlocalStorage.setItem(key, value);\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Gets a value from storage.\n\t *\n\t * @param key - The storage key.\n\t * @param callback - The callback to execute with the retrieved value.\n\t * @param errCallback - The callback to execute on error.\n\t */\n\tget(\n\t\tkey: string,\n\t\tcallback: (value: string) => void = () => {},\n\t\terrCallback: () => void = () => {}\n\t): void {\n\t\tkey = this.applyPrefix(key);\n\n\t\tif (this.config.store?.get) {\n\t\t\tthis.config.store.get(key, callback, errCallback);\n\t\t} else {\n\t\t\tconst value = localStorage.getItem(key) || '';\n\t\t\tcallback(value);\n\t\t}\n\t}\n\n\t/**\n\t * Gets a value from storage asynchronously.\n\t *\n\t * @param key - The storage key.\n\t * @returns A promise that resolves to the retrieved value.\n\t */\n\tasync getAsync(key: string): Promise<string> {\n\t\tkey = this.applyPrefix(key);\n\n\t\ttry {\n\t\t\tif (this.config.store?.get) {\n\t\t\t\treturn await this.config.store.get(key);\n\t\t\t} else {\n\t\t\t\treturn localStorage.getItem(key) || '';\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * Sets a JSON value in storage.\n\t *\n\t * @param key - The storage key.\n\t * @param value - The value to store.\n\t * @param callback - The callback to execute on success.\n\t * @param errCallback - The callback to execute on error.\n\t */\n\tsetJson(\n\t\tkey: string,\n\t\tvalue: any,\n\t\tcallback: () => void = () => {},\n\t\terrCallback: () => void = () => {}\n\t): void {\n\t\tthis.set(key, JSON.stringify(value), callback, errCallback);\n\t}\n\n\t/**\n\t * Sets a JSON value in storage asynchronously.\n\t *\n\t * @param key - The storage key.\n\t * @param value - The value to store.\n\t * @returns A promise that resolves to a boolean indicating success.\n\t */\n\tasync setJsonAsync(key: string, value: any): Promise<boolean> {\n\t\treturn this.setAsync(key, JSON.stringify(value));\n\t}\n\n\t/**\n\t * Gets a JSON value from storage.\n\t *\n\t * @param key - The storage key.\n\t * @param callback - The callback to execute with the retrieved value.\n\t * @param errCallback - The callback to execute on error.\n\t */\n\tgetJson(\n\t\tkey: string,\n\t\tcallback: (value: any) => void = () => {},\n\t\terrCallback: () => void = () => {}\n\t): void {\n\t\tthis.get(\n\t\t\tkey,\n\t\t\t(value: string) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst parsedValue = JSON.parse(value);\n\t\t\t\t\tcallback(parsedValue);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcallback(null);\n\t\t\t\t}\n\t\t\t},\n\t\t\terrCallback\n\t\t);\n\t}\n\n\t/**\n\t * Gets a JSON value from storage asynchronously.\n\t *\n\t * @param key - The storage key.\n\t * @returns A promise that resolves to the retrieved value.\n\t */\n\tasync getJsonAsync<T = any>(key: string): Promise<T | null> {\n\t\tconst value = await this.getAsync(key);\n\t\ttry {\n\t\t\treturn JSON.parse(value);\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t * Removes a value from storage.\n\t *\n\t * @param key - The storage key.\n\t * @param callback - The callback to execute on success.\n\t * @param errCallback - The callback to execute on error.\n\t * @returns A promise that resolves to a boolean indicating success.\n\t */\n\tasync remove(\n\t\tkey: string,\n\t\tcallback?: () => void,\n\t\terrCallback?: () => void\n\t): Promise<boolean> {\n\t\tkey = this.applyPrefix(key);\n\n\t\ttry {\n\t\t\tif (this.config.store?.remove) {\n\t\t\t\tawait this.config.store.remove(key, callback, errCallback);\n\t\t\t} else {\n\t\t\t\tlocalStorage.removeItem(key);\n\t\t\t}\n\t\t\tcallback?.();\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\terrCallback?.();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Clears all values from storage.\n\t *\n\t * @param callback - The callback to execute on success.\n\t * @param errCallback - The callback to execute on error.\n\t * @returns A promise that resolves to a boolean indicating success.\n\t */\n\tasync clear(\n\t\tcallback?: () => void,\n\t\terrCallback?: () => void\n\t): Promise<boolean> {\n\t\ttry {\n\t\t\tif (this.config.store?.clear) {\n\t\t\t\tawait this.config.store.clear();\n\t\t\t} else {\n\t\t\t\tlocalStorage.clear();\n\t\t\t}\n\t\t\tcallback?.();\n\t\t\treturn true;\n\t\t} catch (err) {\n\t\t\tconsole.error(err);\n\t\t\terrCallback?.();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Applies the configured prefix to a storage key.\n\t *\n\t * @param key - The storage key.\n\t * @returns The prefixed storage key.\n\t */\n\tprivate applyPrefix(key: string): string {\n\t\tif (this.config.store?.prefix) {\n\t\t\tkey = this.config.store.prefix + key;\n\t\t}\n\t\tif (this._prefix) {\n\t\t\tkey = this._prefix + key;\n\t\t}\n\t\treturn key;\n\t}\n\n\t/**\n\t * Checks if a value exists in storage.\n\t *\n\t * This function checks whether a value is present for the given key in the storage.\n\t * It uses the configured storage mechanism if available; otherwise, it defaults to using `localStorage`.\n\t *\n\t * @param key - The storage key to check.\n\t * @returns A promise that resolves to `true` if the value exists, otherwise `false`.\n\t *\n\t * @example\n\t * const store = new StoreService(config, core);\n\t *\n\t * // Set a value and check if it exists\n\t * await store.setAsync('exampleKey', 'exampleValue');\n\t * const exists = await store.has('exampleKey');\n\t * console.log(exists); // Output: true\n\t *\n\t * @notes\n\t * - This method internally uses `getAsync` to retrieve the value and checks if it is not null or empty.\n\t * - An empty string value will still return `true` as the key exists in storage.\n\t */\n\tasync has(key: string): Promise<boolean> {\n\t\treturn !!(await this.getAsync(key));\n\t}\n}\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\nimport {\n\tHttpClient,\n\tHttpErrorResponse,\n\tHttpHeaders,\n} from '@angular/common/http';\nimport { EMPTY, Observable, ReplaySubject } from 'rxjs';\nimport { catchError, first } from 'rxjs/operators';\nimport { StoreService } from './store.service';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class HttpService {\n\t// An array of error handling callbacks\n\terrors: ((err: HttpErrorResponse, retry?: () => void) => {})[] = [];\n\n\t// Base URL for HTTP requests\n\turl = '';\n\n\t// Flag to lock the service to prevent multiple requests\n\tlocked = false;\n\n\t// Array to store setTimeout IDs for managing request locks\n\tawaitLocked: any[] = [];\n\n\t// Configuration object for HTTP settings\n\tprivate _http: any;\n\n\t// Object to store HTTP headers\n\tprivate _headers: any = {};\n\n\t// Instance of HttpHeaders with current headers\n\tprivate _http_headers = new HttpHeaders(this._headers);\n\n\tconstructor(\n\t\tprivate store: StoreService,\n\t\tprivate http: HttpClient,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config\n\t) {\n\t\t// Initialize HTTP configuration and headers from injected config\n\t\tthis._http = this._config.http || {};\n\n\t\tif (typeof this._http.headers === 'object') {\n\t\t\tfor (const header in this._http.headers) {\n\t\t\t\tthis._headers[header] = this._http.headers[header];\n\t\t\t}\n\n\t\t\tthis._http_headers = new HttpHeaders(this._headers);\n\t\t}\n\n\t\t// Retrieve and set the base URL and headers from the store\n\t\tthis.store.get('http_url', (url: any) => {\n\t\t\tthis.url = url || this._http.url || '';\n\t\t});\n\n\t\tthis.store.getJson('http_headers', (headers: any) => {\n\t\t\tif (headers) {\n\t\t\t\tfor (const header in headers) {\n\t\t\t\t\tthis._headers[header] = headers[header];\n\t\t\t\t}\n\n\t\t\t\tthis._http_headers = new HttpHeaders(this._headers);\n\t\t\t}\n\t\t});\n\t}\n\n\t// Set a new base URL and save it in the store\n\tsetUrl(url: string) {\n\t\tthis.url = url;\n\n\t\tthis.store.set('http_url', url);\n\t}\n\n\t// Remove the base URL and revert to the default or stored one\n\tremoveUrl() {\n\t\tthis.url = this._http.url || '';\n\n\t\tthis.store.remove('http_url');\n\t}\n\n\t// Set a new HTTP header and update the stored headers\n\tset(key: any, value: any) {\n\t\tthis._headers[key] = value;\n\n\t\tthis.store.setJson('http_headers', this._headers);\n\n\t\tthis._http_headers = new HttpHeaders(this._headers);\n\t}\n\n\t// Get the value of a specific HTTP header\n\theader(key: any) {\n\t\treturn this._headers[key];\n\t}\n\n\t// Remove a specific HTTP header and update the stored headers\n\tremove(key: any) {\n\t\tdelete this._headers[key];\n\n\t\tthis._http_headers = new HttpHeaders(this._headers);\n\n\t\tthis.store.setJson('http_headers', this._headers);\n\t}\n\n\t// Internal method to make HTTP requests based on the method type\n\tprivate _httpMethod(\n\t\tmethod: string,\n\t\t_url: string,\n\t\tdoc: unknown,\n\t\theaders: any\n\t): Observable<any> {\n\t\tif (method === 'post') {\n\t\t\treturn this.http.post<any>(_url, doc, headers);\n\t\t} else if (method === 'put') {\n\t\t\treturn this.http.put<any>(_url, doc, headers);\n\t\t} else if (method === 'patch') {\n\t\t\treturn this.http.patch<any>(_url, doc, headers);\n\t\t} else if (method === 'delete') {\n\t\t\treturn this.http.delete<any>(_url, headers);\n\t\t} else {\n\t\t\treturn this.http.get<any>(_url, headers);\n\t\t}\n\t}\n\n\t/**\n\t * Internal method to handle HTTP requests for various methods (POST, PUT, PATCH, DELETE, GET).\n\t *\n\t * Features:\n\t * - **Request Locking**: Manages request locking to prevent simultaneous requests.\n\t * - **Acceptance Check**: Validates the server response against a user-defined `acceptance` function.\n\t *   If the check fails, the response is rejected with an error.\n\t * - **Replace Logic**: Allows modification of specific parts of the response object, determined by a user-defined `replace` function.\n\t *   Can handle both objects and arrays within the response.\n\t * - **Field Filtering**: Supports extracting specific fields from response objects or arrays.\n\t * - **Legacy Support**: Compatible with callback-based usage alongside Observables.\n\t * - **ReplaySubject**: Ensures that the response can be shared across multiple subscribers.\n\t *\n\t * @param url - The endpoint to send the HTTP request to (relative to the base URL).\n\t * @param doc - The request payload for methods like POST, PUT, and PATCH.\n\t * @param callback - A legacy callback function to handle the response.\n\t * @param opts - Additional options:\n\t *   - `err`: Error handling callback.\n\t *   - `acceptance`: Function to validate the server response. Should return `true` for valid responses.\n\t *   - `replace`: Function to modify specific parts of the response data.\n\t *   - `fields`: Array of fields to extract from the response object(s).\n\t *   - `data`: Path in the response where the data resides for `replace` and `fields` operations.\n\t *   - `skipLock`: If `true`, bypasses request locking.\n\t *   - `url`: Overrides the base URL for this request.\n\t * @param method - The HTTP method (e.g., 'post', 'put', 'patch', 'delete', 'get').\n\t * @returns An Observable that emits the processed HTTP response or an error.\n\t */\n\tprivate _post(\n\t\turl: string,\n\t\tdoc: unknown,\n\t\tcallback = (resp: unknown) => {},\n\t\topts: any = {},\n\t\tmethod = 'post'\n\t): Observable<any> {\n\t\tif (typeof opts === 'function') {\n\t\t\topts = { err: opts };\n\t\t}\n\n\t\tif (!opts.err) {\n\t\t\topts.err = (err: HttpErrorResponse) => {};\n\t\t}\n\n\t\t// Handle request locking to avoid multiple simultaneous requests\n\t\tif (this.locked && !opts.skipLock) {\n\t\t\treturn new Observable((observer) => {\n\t\t\t\tconst wait = setTimeout(() => {\n\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\n\t\t\t\t\t\tobserver\n\t\t\t\t\t);\n\t\t\t\t}, 100);\n\t\t\t\tthis.awaitLocked.push(wait);\n\t\t\t});\n\t\t}\n\n\t\tconst _url = (opts.url || this.url) + url;\n\n\t\tthis.prepare_handle(_url, doc);\n\n\t\t// Using ReplaySubject to allow multiple subscriptions without re-triggering the HTTP request\n\t\tconst responseSubject = new ReplaySubject<any>(1);\n\n\t\tthis._httpMethod(method, _url, doc, { headers: this._http_headers })\n\t\t\t.pipe(\n\t\t\t\tfirst(),\n\t\t\t\tcatchError((error: HttpErrorResponse) => {\n\t\t\t\t\tthis.handleError(opts.err, () => {\n\t\t\t\t\t\tthis._post(url, doc, callback, opts, method).subscribe(\n\t\t\t\t\t\t\tresponseSubject\n\t\t\t\t\t\t);\n\t\t\t\t\t})(error);\n\n\t\t\t\t\tresponseSubject.error(error);\n\n\t\t\t\t\treturn EMPTY;\n\t\t\t\t})\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: (resp: unknown) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\topts.acceptance &&\n\t\t\t\t\t\ttypeof opts.acceptance === 'function'\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (!opts.acceptance(resp)) {\n\t\t\t\t\t\t\tconst error = new HttpErrorResponse({\n\t\t\t\t\t\t\t\terror: 'Acceptance failed',\n\t\t\t\t\t\t\t\tstatus: 400,\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tthis.handleError(opts.err, () => {})(error);\n\n\t\t\t\t\t\t\tresponseSubject.error(error);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (opts.replace && typeof opts.replace === 'function') {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tArray.isArray(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\n\t\t\t\t\t\t\t\t\tresp,\n\t\t\t\t\t\t\t\t\topts.data\n\t\t\t\t\t\t\t\t) as Array<unknown>\n\t\t\t\t\t\t\t).map((item: unknown) => opts.replace(item));\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\n\t\t\t\t\t\t\topts.replace(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Array.isArray(opts.fields)) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tArray.isArray(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(\n\t\t\t\t\t\t\t\t\tresp,\n\t\t\t\t\t\t\t\t\topts.data\n\t\t\t\t\t\t\t\t) as Array<unknown>\n\t\t\t\t\t\t\t).map((item: unknown) => {\n\t\t\t\t\t\t\t\treturn this._newDoc(item, opts.fields);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if (this._getObjectToReplace(resp, opts.data)) {\n\t\t\t\t\t\t\tconst newDoc = this._newDoc(\n\t\t\t\t\t\t\t\tthis._getObjectToReplace(resp, opts.data),\n\t\t\t\t\t\t\t\topts.fields\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (opts.data) {\n\t\t\t\t\t\t\t\tthis._setObjectToReplace(\n\t\t\t\t\t\t\t\t\tresp,\n\t\t\t\t\t\t\t\t\topts.data,\n\t\t\t\t\t\t\t\t\tnewDoc\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresp = newDoc;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.response_handle(_url, resp, () => callback(resp));\n\n\t\t\t\t\tresponseSubject.next(resp);\n\n\t\t\t\t\tresponseSubject.complete();\n\t\t\t\t},\n\t\t\t\terror: (err) => responseSubject.error(err),\n\t\t\t\tcomplete: () => responseSubject.complete(),\n\t\t\t});\n\n\t\treturn responseSubject.asObservable();\n\t}\n\n\t/**\n\t * Public method to perform a POST request.\n\t * - Supports legacy callback usage.\n\t * - Returns an Observable for reactive programming.\n\t */\n\tpost(\n\t\turl: string,\n\t\tdoc: any,\n\t\tcallback = (resp: any) => {},\n\t\topts: any = {}\n\t): Observable<any> {\n\t\treturn this._post(url, doc, callback, opts);\n\t}\n\n\t/**\n\t * Public method to perform a PUT request.\n\t * - Supports legacy callback usage.\n\t * - Returns an Observable for reactive programming.\n\t */\n\tput(\n\t\turl: string,\n\t\tdoc: any,\n\t\tcallback = (resp: any) => {},\n\t\topts: any = {}\n\t): Observable<any> {\n\t\treturn this._post(url, doc, callback, opts, 'put');\n\t}\n\n\t/**\n\t * Public method to perform a PATCH request.\n\t * - Supports legacy callback usage.\n\t * - Returns an Observable for reactive programming.\n\t */\n\tpatch(\n\t\turl: string,\n\t\tdoc: any,\n\t\tcallback = (resp: any) => {},\n\t\topts: any = {}\n\t): Observable<any> {\n\t\treturn this._post(url, doc, callback, opts, 'patch');\n\t}\n\n\t/**\n\t * Public method to perform a DELETE request.\n\t * - Supports legacy callback usage.\n\t * - Returns an Observable for reactive programming.\n\t */\n\tdelete(\n\t\turl: string,\n\t\tcallback = (resp: any) => {},\n\t\topts: any = {}\n\t): Observable<any> {\n\t\treturn this._post(url, null, callback, opts, 'delete');\n\t}\n\n\t/**\n\t * Public method to perform a GET request.\n\t * - Supports legacy callback usage.\n\t * - Returns an Observable for reactive programming.\n\t */\n\tget(\n\t\turl: string,\n\t\tcallback = (resp: any) => {},\n\t\topts: any = {}\n\t): Observable<any> {\n\t\treturn this._post(url, null, callback, opts, 'get');\n\t}\n\n\t// Clear all pending request locks\n\tclearLocked() {\n\t\tfor (const awaitLocked of this.awaitLocked) {\n\t\t\tclearTimeout(awaitLocked);\n\t\t}\n\t\tthis.awaitLocked = [];\n\t}\n\n\t// Lock the service to prevent multiple simultaneous requests\n\tlock() {\n\t\tthis.locked = true;\n\t}\n\n\t// Unlock the service to allow new requests\n\tunlock() {\n\t\tthis.locked = false;\n\t}\n\n\t/**\n\t * Handles HTTP errors.\n\t * - Calls provided error callback and retries the request if needed.\n\t */\n\tprivate handleError(callback: any, retry: () => void) {\n\t\treturn (error: HttpErrorResponse): Promise<void> => {\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tthis.err_handle(error, callback, retry);\n\t\t\t\tresolve();\n\t\t\t});\n\t\t};\n\t}\n\n\t/**\n\t * Internal method to trigger error handling callbacks.\n\t */\n\tprivate err_handle(\n\t\terr: HttpErrorResponse,\n\t\tnext: (err: HttpErrorResponse) => void,\n\t\tretry: () => void\n\t) {\n\t\tif (typeof next === 'function') {\n\t\t\tnext(err);\n\t\t}\n\n\t\tfor (const callback of this.errors) {\n\t\t\tif (typeof callback === 'function') {\n\t\t\t\tcallback(err, retry);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Placeholder method for handling request preparation (can be customized)\n\tprivate prepare_handle(url: string, body: unknown) {}\n\n\t// Placeholder method for handling the response (can be customized)\n\tprivate response_handle(url: string, body: unknown, next: () => void) {\n\t\tif (typeof next === 'function') {\n\t\t\tnext();\n\t\t}\n\t}\n\n\t/**\n\t * Retrieves a nested object or property from the response based on a dot-separated path.\n\t *\n\t * @param resp - The response object to retrieve data from.\n\t * @param base - A dot-separated string indicating the path to the desired property within the response.\n\t *   - Example: `'data.items'` will navigate through `resp.data.items`.\n\t *   - If empty, the entire response is returned.\n\t * @returns The object or property located at the specified path within the response.\n\t */\n\tprivate _getObjectToReplace(resp: unknown, base = ''): unknown {\n\t\tif (base.includes('.')) {\n\t\t\tconst newBase = base.split('');\n\n\t\t\tconst currentBase: string = newBase.pop() || '';\n\n\t\t\treturn this._getObjectToReplace(\n\t\t\t\t(resp as Record<string, unknown>)[currentBase] || {},\n\t\t\t\tnewBase.join('.')\n\t\t\t);\n\t\t} else if (base) {\n\t\t\treturn (resp as Record<string, unknown>)[base];\n\t\t} else {\n\t\t\treturn resp;\n\t\t}\n\t}\n\n\t/**\n\t * Sets or replaces a nested object or property in the response based on a dot-separated path.\n\t *\n\t * @param resp - The response object to modify.\n\t * @param base - A dot-separated string indicating the path to the property to replace.\n\t *   - Example: `'data.items'` will navigate through `resp.data.items`.\n\t * @param doc - The new data or object to set at the specified path.\n\t * @returns `void`.\n\t */\n\tprivate _setObjectToReplace(resp: unknown, base = '', doc: unknown): void {\n\t\twhile (base.includes('.')) {\n\t\t\tconst newBase = base.split('');\n\n\t\t\tconst currentBase: string = newBase.pop() || '';\n\n\t\t\tresp = (resp as Record<string, unknown>)[currentBase] || {};\n\n\t\t\tbase = newBase.join('.');\n\t\t}\n\n\t\t(resp as Record<string, unknown>)[base] = doc;\n\t}\n\n\t/**\n\t * Creates a new object containing only specified fields from the input item.\n\t *\n\t * @param item - The input object to extract fields from.\n\t * @param fields - An array of field names to include in the new object.\n\t *   - Example: `['id', 'name']` will create a new object with only the `id` and `name` properties from `item`.\n\t * @returns A new object containing only the specified fields.\n\t */\n\tprivate _newDoc(item: unknown, fields: string[]): unknown {\n\t\tconst newDoc: Record<string, unknown> = {};\n\n\t\tfor (const field of fields) {\n\t\t\tnewDoc[field] = (item as Record<string, unknown>)[field];\n\t\t}\n\n\t\treturn newDoc;\n\t}\n}\n","import { Observable } from 'rxjs';\nimport { HttpService } from './http.service';\nimport { StoreService } from './store.service';\nimport { AlertService } from './alert.service';\nimport { CoreService } from './core.service';\nimport { CrudDocument, CrudOptions } from '../interfaces/crud.interface';\nimport { BaseService } from './base.service';\nimport { inject } from '@angular/core';\n\ninterface CrudConfig<Document> {\n\tsignalFields?: Record<string, (doc: Document) => unknown>;\n\tname: string;\n\t_id?: string;\n\treplace?: (doc: Document) => void;\n\tunauthorized?: boolean;\n\tappId?: string;\n}\n\ninterface GetConfig {\n\tpage?: number;\n\tperPage?: number;\n\tquery?: string;\n}\n\n/**\n * Abstract class representing a CRUD (Create, Read, Update, Delete) service.\n *\n * This class provides methods for managing documents, interacting with an API,\n * and storing/retrieving data from local storage. It is designed to be extended\n * for specific document types.\n *\n * @template Document - The type of the document the service handles.\n */\nexport abstract class CrudService<\n\tDocument extends CrudDocument\n> extends BaseService {\n\t/**\n\t * URL for the API.\n\t */\n\tprivate _url = '/api/';\n\n\t/**\n\t * Array of documents managed by this service.\n\t */\n\tprivate _docs: Document[] = [];\n\n\t/**\n\t * Number of documents per page.\n\t */\n\tprivate _perPage = 20;\n\n\t/**\n\t * Callbacks for filtering documents.\n\t */\n\tprivate _filteredDocumentsCallbacks: (() => void)[] = [];\n\n\t/**\n\t * Constructs a CRUD service instance.\n\t *\n\t * @param _config - Configuration options for the CRUD service.\n\t * @param __http - Service to handle HTTP requests.\n\t * @param __store - Service to manage local storage of documents.\n\t * @param __alert - Service to display alerts.\n\t * @param __core - Core service for utility functions.\n\t */\n\tprotected __http = inject(HttpService);\n\n\tprotected __store = inject(StoreService);\n\n\tprotected __alert = inject(AlertService);\n\n\tprotected __core = inject(CoreService);\n\n\tloaded: Promise<unknown>;\n\n\tconstructor(private _config: CrudConfig<Document>) {\n\t\tsuper();\n\n\t\tthis._config.signalFields = this._config.signalFields || {};\n\n\t\tthis._url += this._config.name;\n\n\t\tthis.loaded = this.__core.onComplete(this._config.name + '_loaded');\n\n\t\tif (this._config.unauthorized) {\n\t\t\tthis.restoreDocs();\n\t\t} else if (localStorage.getItem('waw_user')) {\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\n\n\t\t\tif (\n\t\t\t\tuser._id ===\n\t\t\t\tlocalStorage.getItem(this._config.name + 'waw_user_id')\n\t\t\t) {\n\t\t\t\tthis.restoreDocs();\n\t\t\t}\n\t\t}\n\n\t\tthis.__core.on('wipe').subscribe((): void => {\n\t\t\tthis.clearDocs();\n\n\t\t\tthis._filterDocuments();\n\t\t});\n\t}\n\n\trestoreDocs(): void {\n\t\tthis.__store.getJson('docs_' + this._config.name, (docs) => {\n\t\t\tif (Array.isArray(docs)) {\n\t\t\t\tthis._docs.push(...docs);\n\n\t\t\t\tthis._filterDocuments();\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Saves the current set of documents to local storage.\n\t */\n\tsetDocs(): void {\n\t\tthis.__store.setJson('docs_' + this._config.name, this._docs);\n\t}\n\n\t/**\n\t * Retrieves the current list of documents.\n\t *\n\t * @returns The list of documents.\n\t */\n\tgetDocs(): Document[] {\n\t\treturn this._docs;\n\t}\n\n\t/**\n\t * Clears the current list of documents.\n\t *\n\t * Empties the internal documents array and saves the updated state to local storage.\n\t */\n\tclearDocs(): void {\n\t\tthis._docs.splice(0, this._docs.length);\n\n\t\tthis.setDocs();\n\t}\n\n\t/**\n\t * Adds multiple documents to the service and saves them to local storage.\n\t *\n\t * @param docs - An array of documents to add.\n\t */\n\taddDocs(docs: Document[]): void {\n\t\tif (Array.isArray(docs)) {\n\t\t\tfor (const doc of docs) {\n\t\t\t\tthis.addDoc(doc);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Adds a single document to the service. If it already exists, it will be updated.\n\t *\n\t * @param doc - The document to add.\n\t */\n\taddDoc(doc: Document): void {\n\t\tif (this._config.replace) {\n\t\t\tthis._config.replace(doc);\n\t\t}\n\n\t\tconst existingDoc = this._docs.find(\n\t\t\t(d) => this._id(d) === this._id(doc)\n\t\t);\n\n\t\tif (existingDoc) {\n\t\t\t// Update the existing document\n\t\t\tthis.__core.copy(doc, existingDoc);\n\n\t\t\tthis.__core.copy(existingDoc, doc);\n\t\t} else {\n\t\t\t// Add new document\n\t\t\tthis._docs.push(doc);\n\t\t}\n\n\t\tthis.setDocs();\n\t}\n\n\t/**\n\t * Creates a new document with a temporary ID and status flags.\n\t *\n\t * @param doc - Optional base document to use for the new document.\n\t * @returns A new document instance with default properties.\n\t */\n\tnew(doc: Document = {} as Document): Document {\n\t\treturn {\n\t\t\t...doc,\n\t\t\t_id: doc._id || Date.now().toString(),\n\t\t\t__created: false,\n\t\t\t__modified: false,\n\t\t} as Document;\n\t}\n\n\t/**\n\t * Retrieves a document by its unique ID or creates a new one if it doesn't exist.\n\t *\n\t * @param _id - The document ID to search for.\n\t * @returns The found document or a new document if not found.\n\t */\n\tdoc(_id: string): Document {\n\t\tconst doc =\n\t\t\tthis._docs.find((d) => this._id(d) === _id) ||\n\t\t\tthis.new({\n\t\t\t\t_id,\n\t\t\t} as Document);\n\n\t\tif (\n\t\t\t!this._docs.find((d) => this._id(d) === _id) &&\n\t\t\t!this._fetchingId[_id]\n\t\t) {\n\t\t\tthis._fetchingId[_id] = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.fetch({ _id }).subscribe((_doc: Document) => {\n\t\t\t\t\tthis._fetchingId[_id] = false;\n\n\t\t\t\t\tif (_doc) {\n\t\t\t\t\t\tthis.__core.copy(_doc, doc);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn doc;\n\t}\n\n\t/**\n\t * Sets the number of documents to display per page.\n\t *\n\t * @param _perPage - Number of documents per page.\n\t */\n\tsetPerPage(_perPage: number): void {\n\t\tthis._perPage = _perPage;\n\t}\n\n\t/**\n\t * Fetches a list of documents from the API with optional pagination.\n\t *\n\t * @param config - Optional pagination configuration.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the list of documents.\n\t */\n\tget(\n\t\tconfig: GetConfig = {},\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document[]> {\n\t\tif (!this._config.unauthorized && localStorage.getItem('waw_user')) {\n\t\t\tconst user = JSON.parse(localStorage.getItem('waw_user') as string);\n\n\t\t\tlocalStorage.setItem(this._config.name + 'waw_user_id', user._id);\n\t\t}\n\n\t\tconst url = `${this._url}/get${options.name || ''}`;\n\n\t\tconst params =\n\t\t\t(typeof config.page === 'number' || config.query ? '?' : '') +\n\t\t\t(config.query || '') +\n\t\t\t(typeof config.page === 'number'\n\t\t\t\t? `&skip=${this._perPage * (config.page - 1)}&limit=${\n\t\t\t\t\t\tthis._perPage\n\t\t\t\t  }`\n\t\t\t\t: '');\n\n\t\tconst obs = this.__http.get(`${url}${params}`);\n\n\t\tobs.subscribe({\n\t\t\tnext: (resp: unknown): void => {\n\t\t\t\tresp = resp || [];\n\n\t\t\t\tif (typeof config.page !== 'number') {\n\t\t\t\t\tthis.clearDocs();\n\t\t\t\t}\n\n\t\t\t\t(resp as Document[]).forEach((doc) => this.addDoc(doc));\n\n\t\t\t\tif (options.callback) {\n\t\t\t\t\toptions.callback(resp as Document[]);\n\t\t\t\t}\n\n\t\t\t\tif (typeof config.page !== 'number') {\n\t\t\t\t\tthis._filterDocuments();\n\n\t\t\t\t\tthis.__core.complete(\n\t\t\t\t\t\tthis._config.name + '_loaded',\n\t\t\t\t\t\tthis._docs\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_get`, this._docs);\n\t\t\t},\n\t\t\terror: (err: unknown): void => {\n\t\t\t\tif (options.errCallback) {\n\t\t\t\t\toptions.errCallback(err);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document[]>;\n\t}\n\n\t/**\n\t * Sends a request to the API to create a new document.\n\t *\n\t * @param doc - The document to create.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the created document, or emits an error if already created.\n\t */\n\tcreate(\n\t\tdoc: Document = {} as Document,\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tif (doc.__created) {\n\t\t\t// Emit an error observable if the document is already created\n\t\t\treturn new Observable<Document>((observer) => {\n\t\t\t\tobserver.error(new Error('Document has already been created.'));\n\t\t\t});\n\t\t}\n\n\t\tif (this._config.appId) {\n\t\t\tdoc.appId = this._config.appId;\n\t\t}\n\n\t\tdoc.__created = true;\n\n\t\tconst obs = this.__http.post(\n\t\t\t`${this._url}/create${options.name || ''}`,\n\t\t\tdoc\n\t\t);\n\n\t\tobs.subscribe({\n\t\t\tnext: (resp: unknown) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis.__core.copy(resp, doc);\n\n\t\t\t\t\tthis.addDoc(doc);\n\n\t\t\t\t\tthis._filterDocuments();\n\n\t\t\t\t\tif (options.callback) {\n\t\t\t\t\t\toptions.callback(doc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (options.alert) {\n\t\t\t\t\t\tthis.__alert.show({\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\n\t\t\t\t\t\t\ttext: options.alert,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdoc.__created = false;\n\n\t\t\t\t\tif (options.errCallback) {\n\t\t\t\t\t\toptions.errCallback(resp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_create`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\n\t\t\t},\n\t\t\terror: (err: unknown) => {\n\t\t\t\tdoc.__created = false;\n\n\t\t\t\tif (options.errCallback) options.errCallback(err);\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document>;\n\t}\n\n\t/**\n\t * Fetches a document from the API based on a query.\n\t *\n\t * @param query - The query object used to filter documents.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the fetched document.\n\t */\n\tfetch(\n\t\tquery: object = {},\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tconst obs = this.__http.post(\n\t\t\t`${this._url}/fetch${options.name || ''}`,\n\t\t\tquery\n\t\t);\n\n\t\tobs.subscribe({\n\t\t\tnext: (doc: unknown) => {\n\t\t\t\tif (doc) {\n\t\t\t\t\tthis.addDoc(doc as Document);\n\n\t\t\t\t\tthis._filterDocuments();\n\n\t\t\t\t\tif (options.callback) options.callback(doc as Document);\n\n\t\t\t\t\tif (options.alert) {\n\t\t\t\t\t\tthis.__alert.show({\n\t\t\t\t\t\t\tunique: `${this._config.name}create`,\n\t\t\t\t\t\t\ttext: options.alert,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\n\t\t\t\t} else {\n\t\t\t\t\tif (options.errCallback) {\n\t\t\t\t\t\toptions.errCallback(doc as Document);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: (err: unknown) => {\n\t\t\t\tif (options.errCallback) {\n\t\t\t\t\toptions.errCallback(err);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document>;\n\t}\n\n\t/**\n\t * Updates a document after a specified delay and returns an observable.\n\t *\n\t * @param doc - The document to update.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that emits the updated document.\n\t */\n\tupdateAfterWhile(\n\t\tdoc: Document,\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tdoc.__modified = true;\n\n\t\treturn new Observable<Document>((observer) => {\n\t\t\tthis.__core.afterWhile(this._id(doc), () => {\n\t\t\t\tthis.update(doc, options).subscribe({\n\t\t\t\t\tnext: (updatedDoc) => {\n\t\t\t\t\t\tobserver.next(updatedDoc); // Emit the updated document\n\t\t\t\t\t},\n\t\t\t\t\terror: (err) => {\n\t\t\t\t\t\tobserver.error(err); // Forward the error\n\t\t\t\t\t},\n\t\t\t\t\tcomplete: () => {\n\t\t\t\t\t\tobserver.complete(); // Complete the observable\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Updates a document in the API.\n\t *\n\t * @param doc - The document to update.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the updated document.\n\t */\n\tupdate(\n\t\tdoc: Document,\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tdoc.__modified = true;\n\n\t\tconst obs = this.__http.post(\n\t\t\t`${this._url}/update${options.name || ''}`,\n\t\t\tdoc\n\t\t);\n\n\t\tobs.subscribe({\n\t\t\tnext: (resp: unknown) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tdoc.__modified = false;\n\n\t\t\t\t\tconst storedDoc = this.doc(doc._id);\n\n\t\t\t\t\tthis.__core.copy(resp, storedDoc);\n\n\t\t\t\t\tthis.__core.copy(resp, doc);\n\n\t\t\t\t\tif (options.callback) {\n\t\t\t\t\t\toptions.callback(doc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (options.alert) {\n\t\t\t\t\t\tthis.__alert.show({\n\t\t\t\t\t\t\tunique: `${this._config.name}update`,\n\t\t\t\t\t\t\ttext: options.alert,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (options.errCallback) {\n\t\t\t\t\t\toptions.errCallback(resp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_update`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\n\t\t\t},\n\t\t\terror: (err: unknown) => {\n\t\t\t\tif (options.errCallback) {\n\t\t\t\t\toptions.errCallback(err);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document>;\n\t}\n\n\t/**\n\t * Unique update a document field in the API.\n\t *\n\t * @param doc - The document to update.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the updated document.\n\t */\n\tunique(\n\t\tdoc: Document,\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tdoc.__modified = true;\n\n\t\tconst obs = this.__http.post(\n\t\t\t`${this._url}/unique${options.name || ''}`,\n\t\t\tdoc\n\t\t);\n\n\t\tobs.subscribe({\n\t\t\tnext: (resp: unknown) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tdoc.__modified = false;\n\n\t\t\t\t\t(doc as any)[options.name as string] = resp;\n\n\t\t\t\t\tif (options.callback) {\n\t\t\t\t\t\toptions.callback(doc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (options.alert) {\n\t\t\t\t\t\tthis.__alert.show({\n\t\t\t\t\t\t\tunique: `${this._config.name}unique`,\n\t\t\t\t\t\t\ttext: options.alert,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (options.errCallback) {\n\t\t\t\t\t\toptions.errCallback(resp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_unique`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\n\t\t\t},\n\t\t\terror: (err: unknown) => {\n\t\t\t\tif (options.errCallback) {\n\t\t\t\t\toptions.errCallback(err);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document>;\n\t}\n\n\t/**\n\t * Deletes a document from the API.\n\t *\n\t * @param doc - The document to delete.\n\t * @param options - Optional callback and error handling configuration.\n\t * @returns An observable that resolves with the deleted document.\n\t */\n\tdelete(\n\t\tdoc: Document,\n\t\toptions: CrudOptions<Document> = {}\n\t): Observable<Document> {\n\t\tconst obs = this.__http.post(\n\t\t\t`${this._url}/delete${options.name || ''}`,\n\t\t\tdoc\n\t\t);\n\n\t\tobs.subscribe({\n\t\t\tnext: (resp: unknown) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis._docs.splice(\n\t\t\t\t\t\tthis._docs.findIndex(\n\t\t\t\t\t\t\t(d) => this._id(d) === this._id(doc)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t1\n\t\t\t\t\t);\n\n\t\t\t\t\tthis.setDocs();\n\n\t\t\t\t\tthis._filterDocuments();\n\n\t\t\t\t\tif (options.callback) {\n\t\t\t\t\t\toptions.callback(doc);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (options.alert) {\n\t\t\t\t\t\tthis.__alert.show({\n\t\t\t\t\t\t\tunique: `${this._config.name}delete`,\n\t\t\t\t\t\t\ttext: options.alert,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (options.errCallback) {\n\t\t\t\t\t\toptions.errCallback(resp);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_delete`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_list`, doc);\n\n\t\t\t\tthis.__core.emit(`${this._config.name}_changed`, doc);\n\t\t\t},\n\t\t\terror: (err: unknown) => {\n\t\t\t\tif (options.errCallback) {\n\t\t\t\t\toptions.errCallback(err);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\n\t\treturn obs as Observable<Document>;\n\t}\n\n\t/**\n\t * Filters documents based on specific conditions and stores the result in a provided object.\n\t *\n\t * @param storeObject - Object to store filtered documents.\n\t * @param field - The field to filter by or a function to extract the field.\n\t * @param valid - Optional function to check the validity of a document.\n\t * @param sort - Function to sort the filtered documents.\n\t * @returns A callback function that triggers the filtering process.\n\t */\n\tfilteredDocuments(\n\t\tstoreObject: Record<string, Document[]>,\n\t\tfield: string | ((doc: Document) => string) = 'author',\n\t\tvalid?: (doc: Document) => boolean,\n\t\tsort: (a: Document, b: Document) => number = (\n\t\t\ta: Document,\n\t\t\tb: Document\n\t\t) => {\n\t\t\tif ((a as any)[this._id(a)] < (b as any)[this._id(b)]) return -1;\n\n\t\t\tif ((a as any)[this._id(a)] > (b as any)[this._id(b)]) return 1;\n\n\t\t\treturn 0;\n\t\t}\n\t): () => void {\n\t\tconst callback = (): void => {\n\t\t\t/* remove docs if they were removed */\n\t\t\tfor (const parentId in storeObject) {\n\t\t\t\tfor (let i = storeObject[parentId].length - 1; i >= 0; i--) {\n\t\t\t\t\tconst _field =\n\t\t\t\t\t\ttypeof field === 'function'\n\t\t\t\t\t\t\t? field(storeObject[parentId][i])\n\t\t\t\t\t\t\t: field;\n\t\t\t\t\tconst _doc: any = storeObject[parentId][i];\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!this._docs.find((doc: any) =>\n\t\t\t\t\t\t\tArray.isArray(doc[_field])\n\t\t\t\t\t\t\t\t? doc[_field].includes(_doc[this._id(doc)])\n\t\t\t\t\t\t\t\t: doc[_field] === _doc[this._id(doc)]\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tstoreObject[parentId].splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* add docs if they are not added */\n\t\t\tfor (const doc of this._docs) {\n\t\t\t\tconst _field = typeof field === 'function' ? field(doc) : field;\n\n\t\t\t\tif (\n\t\t\t\t\ttypeof valid === 'function'\n\t\t\t\t\t\t? !valid(doc)\n\t\t\t\t\t\t: Array.isArray((doc as any)[_field])\n\t\t\t\t\t\t? !(doc as any)[_field]?.length\n\t\t\t\t\t\t: !(doc as any)[_field]\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (typeof field === 'function') {\n\t\t\t\t\tif (\n\t\t\t\t\t\tfield(doc) &&\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\n\t\t\t\t\t\t\t(c) => c._id === doc._id\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\n\t\t\t\t\t}\n\t\t\t\t} else if (Array.isArray((doc as any)[_field])) {\n\t\t\t\t\t(doc as any)[_field].forEach((_field: string) => {\n\t\t\t\t\t\tstoreObject[_field] = storeObject[_field] || [];\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!storeObject[_field].find((c) => c._id === doc._id)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tstoreObject[_field].push(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tstoreObject[(doc as any)[_field]] =\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]] || [];\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t!storeObject[(doc as any)[_field]].find(\n\t\t\t\t\t\t\t(c) => c._id === doc._id\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tstoreObject[(doc as any)[_field]].push(doc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* sort the array's */\n\t\t\tfor (const parentId in storeObject) {\n\t\t\t\tstoreObject[parentId].sort(sort);\n\t\t\t}\n\t\t};\n\n\t\tthis._filteredDocumentsCallbacks.push(callback);\n\n\t\treturn callback;\n\t}\n\n\t/**\n\t * Generates a unique ID for a document.\n\t *\n\t * @param doc - The document for which to generate the ID.\n\t * @returns The unique ID as a string.\n\t */\n\tprivate _id(doc: Document): string {\n\t\treturn (doc as unknown as Record<string, unknown>)[\n\t\t\tthis._config._id || '_id'\n\t\t]?.toString() as string;\n\t}\n\n\t/**\n\t * Executes all registered filter document callbacks.\n\t */\n\tprivate _filterDocuments(): void {\n\t\tfor (const callback of this._filteredDocumentsCallbacks) {\n\t\t\tcallback();\n\t\t}\n\n\t\tthis.__core.emit(`${this._config.name}_filtered`);\n\t}\n\n\tprivate _fetchingId: Record<string, boolean> = {};\n}\n","import { Injectable } from '@angular/core';\nimport { HttpService } from './http.service';\nimport { CoreService } from './core.service';\nimport { Subject } from 'rxjs';\nimport { StoreService } from './store.service';\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class MongoService {\n\t/*\n\t *\tData will be storage for all information we are pulling from waw crud.\n\t *\tdata['arr' + part] will host all docs from collection part in array form\n\t *\tdata['obj' + part] will host all docs from collection part in object form\n\t *\t\tand all groups collecitons provided\n\t *\tdata['opts' + part] will host options for docs from collection part\n\t *\t\tWill be initialized only inside get\n\t *\t\tWill be used inside push\n\t */\n\tprivate data: any = {};\n\tprivate socket: any = {\n\t\temit: (which: any, doc: any) => {\n\t\t\tconsole.log(which, doc, 'is not used on sockets');\n\t\t},\n\t};\n\t/*\n\t *\twaw crud connect functions\n\t */\n\tpublic config(part: any, opts: any) {\n\t\tif (this.data['opts' + part]) return;\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\n\t\tif (this.data['opts' + part]) {\n\t\t\tfor (let each in opts) {\n\t\t\t\tthis.data['opts' + part][each] = opts[each];\n\t\t\t}\n\t\t} else this.data['opts' + part] = opts = opts || {};\n\t\tif (typeof opts.use === 'string') {\n\t\t\topts.use = opts.use.split(' ');\n\t\t}\n\t\tif (opts.query) {\n\t\t\tfor (let key in opts.query) {\n\t\t\t\tif (typeof opts.query[key] == 'function') {\n\t\t\t\t\topts.query[key] = {\n\t\t\t\t\t\tallow: opts.query[key],\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tthis.data['obj' + part][key] = [];\n\t\t\t}\n\t\t}\n\t\tif (opts.groups) {\n\t\t\tif (typeof opts.groups === 'string') {\n\t\t\t\topts.groups = opts.groups.split(' ');\n\t\t\t}\n\t\t\tif (Array.isArray(opts.groups)) {\n\t\t\t\tlet arr = opts.groups;\n\t\t\t\topts.groups = {};\n\t\t\t\tfor (let i = 0; i < arr.length; i++) {\n\t\t\t\t\tif (typeof arr[i] === 'string') {\n\t\t\t\t\t\topts.groups[arr[i]] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let key in arr[i]) {\n\t\t\t\t\t\t\tif (typeof arr[i][key] == 'function') {\n\t\t\t\t\t\t\t\tarr[i][key] = {\n\t\t\t\t\t\t\t\t\tfield: arr[i][key],\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\topts.groups[key] = arr[i][key];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let key in opts.groups) {\n\t\t\t\tif (typeof opts.groups[key] == 'boolean') {\n\t\t\t\t\tif (opts.groups[key]) {\n\t\t\t\t\t\topts.groups[key] = {\n\t\t\t\t\t\t\tfield: function (doc: any) {\n\t\t\t\t\t\t\t\treturn doc[key];\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdelete opts.groups[key];\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof opts.groups[key] != 'object') {\n\t\t\t\t\tdelete opts.groups[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (typeof opts.groups[key].field != 'function') {\n\t\t\t\t\tdelete opts.groups[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (Array.isArray(this.data['obj' + part][key])) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t'You can have same field groups with query. Field ' +\n\t\t\t\t\t\t\tkey +\n\t\t\t\t\t\t\t' is not used in groups.'\n\t\t\t\t\t);\n\t\t\t\t\tdelete opts.groups[key];\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tthis.data['obj' + part][key] = {};\n\t\t\t}\n\t\t}\n\t\tif (opts.fields) {\n\t\t\tif (typeof opts.fields === 'string') {\n\t\t\t\topts.fields = opts.fields.split(' ');\n\t\t\t}\n\t\t}\n\t\tif (!Array.isArray(opts.fields)) {\n\t\t\topts.fields = [];\n\t\t}\n\t\t// this.store.getJson('mongo' + part, data => {\n\t\t// \tif (data && Array.isArray(data)) {\n\t\t// \t\tfor (let i = 0; i < data.length; i++) {\n\t\t// \t\t\tthis.push(part, data[i]);\n\t\t// \t\t}\n\t\t// \t}\n\t\t// });\n\t\treturn {\n\t\t\tarr: this.data['arr' + part],\n\t\t\tobj: this.data['obj' + part],\n\t\t};\n\t}\n\tpublic create(\n\t\tpart: any,\n\t\tdoc: any = undefined,\n\t\tcb: any = undefined,\n\t\topts: any = {}\n\t) {\n\t\tif (typeof doc == 'function') {\n\t\t\tif (cb) opts = cb;\n\t\t\tcb = doc;\n\t\t\tdoc = {};\n\t\t}\n\t\tif (typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\terr: opts,\n\t\t\t};\n\t\t}\n\t\tif (typeof doc != 'object') doc = {};\n\t\tif (doc.___created && !opts.allow_multiple) return;\n\t\tdoc.___created = true;\n\t\tthis.http.post(\n\t\t\topts.url || '/api/' + part + '/create',\n\t\t\tdoc || {},\n\t\t\t(resp) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis.socket.emit('create', {\n\t\t\t\t\t\t_id: resp._id,\n\t\t\t\t\t\tpart: part,\n\t\t\t\t\t});\n\t\t\t\t\tthis.push(part, resp);\n\t\t\t\t\tif (typeof cb == 'function') cb(resp);\n\t\t\t\t} else if (typeof cb == 'function') {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t}\n\tpublic fetch(part: any, opts: any = undefined, cb: any = undefined) {\n\t\tif (\n\t\t\topts.query &&\n\t\t\topts.query._id &&\n\t\t\t!opts.force &&\n\t\t\tthis.data['obj' + part][opts.query._id]\n\t\t) {\n\t\t\treturn this.data['obj' + part][opts.query._id];\n\t\t}\n\t\tif (typeof opts == 'function') {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tif (!opts) opts = {};\n\t\tthis.config(part, opts); // remove this in future\n\t\tlet url = '/api/' + part + '/fetch' + (opts.name || ''),\n\t\t\tdoc: any;\n\t\tif (\n\t\t\topts.query &&\n\t\t\topts.query._id &&\n\t\t\tthis.data['obj' + part][opts.query._id]\n\t\t) {\n\t\t\tdoc = this.data['obj' + part][opts.query._id];\n\t\t} else {\n\t\t\tdoc = {};\n\t\t\tfor (let key in this.data['opts' + part].replace) {\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\n\t\t\t}\n\t\t}\n\t\tthis.http.post(\n\t\t\topts.url || url,\n\t\t\topts.query || {},\n\t\t\t(resp) => {\n\t\t\t\tif (!resp) return cb && cb(false);\n\t\t\t\tfor (let each in resp) {\n\t\t\t\t\tdoc[each] = resp[each];\n\t\t\t\t}\n\t\t\t\tfor (let each in doc) {\n\t\t\t\t\tdoc[each] = resp[each];\n\t\t\t\t}\n\t\t\t\tthis.push(part, doc);\n\t\t\t\tif (resp && typeof cb == 'function') {\n\t\t\t\t\tcb(doc);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t\treturn doc;\n\t}\n\tpublic get(part: any, opts: any = undefined, cb: any = undefined) {\n\t\tif (typeof opts == 'function') {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tif (!opts) opts = {};\n\t\tthis.config(part, opts); // remove this in future\n\t\tlet url =\n\t\t\t'/api/' + part + '/get' + (opts.name || '') + (opts.param || '');\n\t\tthis.http.get(\n\t\t\topts.url || url,\n\t\t\t(resp) => {\n\t\t\t\tif (Array.isArray(resp)) {\n\t\t\t\t\tfor (let i = 0; i < resp.length; i++) {\n\t\t\t\t\t\tthis.push(part, resp[i]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!opts.paginate) {\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlet i = 0;\n\t\t\t\t\t\t\ti < this.data['arr' + part].length;\n\t\t\t\t\t\t\ti++\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tlet remove = true;\n\t\t\t\t\t\t\tfor (let j = 0; j < resp.length; j++) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tresp[j]._id ===\n\t\t\t\t\t\t\t\t\tthis.data['arr' + part][i]._id\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tremove = false;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (remove) {\n\t\t\t\t\t\t\t\tthis.remove(part, this.data['arr' + part][i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof cb == 'function')\n\t\t\t\t\t\tcb(\n\t\t\t\t\t\t\tthis.data['arr' + part],\n\t\t\t\t\t\t\tthis.data['obj' + part],\n\t\t\t\t\t\t\topts.name || '',\n\t\t\t\t\t\t\tresp\n\t\t\t\t\t\t);\n\t\t\t\t} else if (typeof cb == 'function') {\n\t\t\t\t\tcb(\n\t\t\t\t\t\tthis.data['arr' + part],\n\t\t\t\t\t\tthis.data['obj' + part],\n\t\t\t\t\t\topts.name || '',\n\t\t\t\t\t\tresp\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.data['loaded' + part] = true;\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t\treturn this.data['arr' + part];\n\t}\n\tpublic set(part: any, opts: any = undefined, resp: any = undefined) {\n\t\tif (Array.isArray(opts)) {\n\t\t\tresp = opts;\n\t\t\topts = undefined;\n\t\t}\n\t\tif (opts) this.config(part, opts);\n\t\tif (Array.isArray(resp)) {\n\t\t\tfor (let i = 0; i < resp.length; i++) {\n\t\t\t\tthis.push(part, resp[i]);\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tarr: this.data['arr' + part],\n\t\t\tobj: this.data['obj' + part],\n\t\t};\n\t}\n\tprivate prepare_update(part: any, doc: any, opts: any) {\n\t\tif (opts.fields) {\n\t\t\tif (typeof opts.fields === 'string')\n\t\t\t\topts.fields = opts.fields.split(' ');\n\t\t\tlet _doc: any = {};\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\n\t\t\t}\n\t\t\tdoc = _doc;\n\t\t} else this.renew(part, doc);\n\t\tif (\n\t\t\ttypeof opts.rewrite == 'object' &&\n\t\t\tObject.values(opts.rewrite).length\n\t\t) {\n\t\t\tdoc = JSON.parse(JSON.stringify(doc));\n\t\t\tfor (let key in opts.rewrite) {\n\t\t\t\tthis.replace(doc, key, opts.rewrite[key]);\n\t\t\t}\n\t\t}\n\t\treturn doc;\n\t}\n\tpublic update(\n\t\tpart: any,\n\t\tdoc: any,\n\t\topts: any = undefined,\n\t\tcb: any = undefined\n\t) {\n\t\tif (typeof opts == 'function') {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tif (typeof opts != 'object') opts = {};\n\t\tdoc = this.prepare_update(part, doc, opts);\n\t\tlet url = '/api/' + part + '/update' + (opts.name || '');\n\t\tthis.http.post(\n\t\t\topts.url || url,\n\t\t\tdoc,\n\t\t\t(resp) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis.socket.emit('update', {\n\t\t\t\t\t\t_id: doc._id,\n\t\t\t\t\t\tpart: part,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif (resp && typeof cb == 'function') {\n\t\t\t\t\tcb(resp);\n\t\t\t\t} else if (typeof cb == 'function') {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t}\n\tpublic unique(\n\t\tpart: any,\n\t\tdoc: any,\n\t\topts: any = undefined,\n\t\tcb: any = undefined\n\t) {\n\t\tif (typeof opts == 'function') {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tif (typeof opts != 'object') opts = {};\n\t\tdoc = this.prepare_update(part, doc, opts);\n\t\tlet url = '/api/' + part + '/unique' + (opts.name || '');\n\t\tthis.http.post(\n\t\t\topts.url || url,\n\t\t\tdoc,\n\t\t\t(resp) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis.socket.emit('update', {\n\t\t\t\t\t\t_id: doc._id,\n\t\t\t\t\t\tpart: part,\n\t\t\t\t\t});\n\t\t\t\t\tlet current_doc = this.data['obj' + part][doc._id];\n\t\t\t\t\tfor (let each in doc) {\n\t\t\t\t\t\tcurrent_doc[each] = doc[each];\n\t\t\t\t\t}\n\t\t\t\t\tthis.renew(part, current_doc);\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t(resp || typeof resp === 'string') &&\n\t\t\t\t\ttypeof cb == 'function'\n\t\t\t\t) {\n\t\t\t\t\tcb(resp);\n\t\t\t\t} else if (typeof cb == 'function') {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t}\n\tpublic delete(\n\t\tpart: any,\n\t\tdoc: any,\n\t\topts: any = undefined,\n\t\tcb: any = undefined\n\t) {\n\t\tif (typeof opts == 'function') {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tif (typeof opts !== 'object') opts = {};\n\t\tif (opts.fields) {\n\t\t\tif (typeof opts.fields === 'string')\n\t\t\t\topts.fields = opts.fields.split(' ');\n\t\t\tlet _doc: any = {};\n\t\t\tfor (let i = 0; i < opts.fields.length; i++) {\n\t\t\t\t_doc[opts.fields[i]] = doc[opts.fields[i]];\n\t\t\t}\n\t\t\tdoc = _doc;\n\t\t} else {\n\t\t\tdoc = {\n\t\t\t\t_id: doc._id,\n\t\t\t};\n\t\t}\n\t\tlet url = '/api/' + part + '/delete' + (opts.name || '');\n\t\tthis.http.post(\n\t\t\topts.url || url,\n\t\t\tdoc,\n\t\t\t(resp) => {\n\t\t\t\tif (resp) {\n\t\t\t\t\tthis.socket.emit('delete', {\n\t\t\t\t\t\t_id: doc._id,\n\t\t\t\t\t\tpart: part,\n\t\t\t\t\t});\n\t\t\t\t\tthis.remove(part, doc);\n\t\t\t\t}\n\t\t\t\tif (resp && typeof cb == 'function') {\n\t\t\t\t\tcb(resp);\n\t\t\t\t} else if (typeof cb == 'function') {\n\t\t\t\t\tcb(false);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\turl: opts.base_url || this.http.url,\n\t\t\t}\n\t\t);\n\t}\n\tpublic _id(cb: any) {\n\t\tif (typeof cb == 'function') {\n\t\t\tthis.http.get('/waw/newId', cb);\n\t\t}\n\t}\n\tpublic to_id(docs: any) {\n\t\tif (!docs) return [];\n\t\tif (Array.isArray(docs)) {\n\t\t\tdocs = docs.slice();\n\t\t} else if (typeof docs == 'object') {\n\t\t\tif (docs._id) return [docs._id];\n\t\t\tlet _docs = [];\n\t\t\tfor (let key in docs) {\n\t\t\t\tif (docs[key]) _docs.push(docs[key]._id || docs[key]);\n\t\t\t}\n\t\t\tdocs = _docs;\n\t\t}\n\t\tfor (let i = 0; i < docs.length; ++i) {\n\t\t\tif (docs[i]) docs[i] = docs[i]._id || docs[i];\n\t\t}\n\t\treturn docs;\n\t}\n\tpublic afterWhile(doc: any, cb: any, time = 1000) {\n\t\tif (typeof cb == 'function' && typeof time == 'number') {\n\t\t\tclearTimeout(doc.__updateTimeout);\n\t\t\tdoc.__updateTimeout = setTimeout(cb, time);\n\t\t}\n\t}\n\tpublic populate(doc: any, field: any, part: any): any {\n\t\tif (!doc || !field || !part) return;\n\t\tif (Array.isArray(doc)) {\n\t\t\tfor (let i = 0; i < doc.length; i++) {\n\t\t\t\tthis.populate(doc[i], field, part);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (this.data['loaded' + part]) {\n\t\t\tif (Array.isArray(field)) {\n\t\t\t\tfor (let i = 0; i < field.length; i++) {\n\t\t\t\t\tthis.populate(doc, field[i], part);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t} else if (field.indexOf('.') > -1) {\n\t\t\t\tfield = field.split('.');\n\t\t\t\tlet sub = field.shift();\n\t\t\t\tif (typeof doc[sub] != 'object') return;\n\t\t\t\treturn this.populate(doc[sub], field.join('.'), part);\n\t\t\t}\n\t\t\tif (Array.isArray(doc[field])) {\n\t\t\t\tfor (let i = doc[field].length - 1; i >= 0; i--) {\n\t\t\t\t\tif (this.data['obj' + part][doc[field][i]]) {\n\t\t\t\t\t\tdoc[field][i] = this.data['obj' + part][doc[field][i]];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdoc[field].splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t} else if (typeof doc[field] === 'string') {\n\t\t\t\tdoc[field] = this.data['obj' + part][doc[field]] || null;\n\t\t\t} else return;\n\t\t} else {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.populate(doc, field, part);\n\t\t\t}, 100);\n\t\t}\n\t}\n\tpublic on(parts: any, cb: any): any {\n\t\tif (typeof parts === 'string') {\n\t\t\tparts = parts.split(' ');\n\t\t}\n\t\tfor (var i = 0; i < parts.length; i++) {\n\t\t\tif (!this.data['loaded' + parts[i]]) {\n\t\t\t\treturn setTimeout(() => {\n\t\t\t\t\tthis.on(parts, cb);\n\t\t\t\t}, 100);\n\t\t\t}\n\t\t}\n\t\tcb(this.data);\n\t}\n\tpublic track(index: any, doc: any) {\n\t\treturn (doc && doc._id && doc._id) || index;\n\t}\n\t/*\n\t *\tmongo sort filters\n\t */\n\tpublic sortAscId() {\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a._id > b._id) return 1;\n\t\t\telse return -1;\n\t\t};\n\t}\n\tpublic sortDescId() {\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a._id < b._id) return 1;\n\t\t\telse return -1;\n\t\t};\n\t}\n\tpublic sortAscString(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field].toLowerCase() > b[opts.field].toLowerCase())\n\t\t\t\treturn 1;\n\t\t\telse if (\n\t\t\t\ta[opts.field].toLowerCase() < b[opts.field].toLowerCase() ||\n\t\t\t\t!opts.next\n\t\t\t)\n\t\t\t\treturn -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortDescString(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field].toLowerCase() < b[opts.field].toLowerCase())\n\t\t\t\treturn 1;\n\t\t\telse if (\n\t\t\t\ta[opts.field].toLowerCase() > b[opts.field].toLowerCase() ||\n\t\t\t\t!opts.next\n\t\t\t)\n\t\t\t\treturn -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortAscDate(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field].getTime() > b[opts.field].getTime()) return 1;\n\t\t\telse if (\n\t\t\t\ta[opts.field].getTime() < b[opts.field].getTime() ||\n\t\t\t\t!opts.next\n\t\t\t)\n\t\t\t\treturn -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortDescDate(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field].getTime() < b[opts.field].getTime()) return 1;\n\t\t\telse if (\n\t\t\t\ta[opts.field].getTime() > b[opts.field].getTime() ||\n\t\t\t\t!opts.next\n\t\t\t)\n\t\t\t\treturn -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortAscNumber(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field] > b[opts.field]) return 1;\n\t\t\telse if (a[opts.field] < b[opts.field] || !opts.next) return -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortDescNumber(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field] < b[opts.field]) return 1;\n\t\t\telse if (a[opts.field] > b[opts.field] || !opts.next) return -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortAscBoolean(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (!a[opts.field] && b[opts.field]) return 1;\n\t\t\telse if ((a[opts.field] && !b[opts.field]) || !opts.next) return -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\tpublic sortDescBoolean(opts: any) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = {\n\t\t\t\tfield: opts,\n\t\t\t};\n\t\t}\n\t\treturn function (a: any, b: any) {\n\t\t\tif (a[opts.field] && !b[opts.field]) return 1;\n\t\t\telse if ((!a[opts.field] && b[opts.field]) || !opts.next) return -1;\n\t\t\telse return opts.next(a, b);\n\t\t};\n\t}\n\t/*\n\t *\tmongo replace filters\n\t */\n\tpublic beArr(val: any, cb: any) {\n\t\tif (!Array.isArray(val)) cb([]);\n\t\telse cb(val);\n\t}\n\tpublic beObj(val: any, cb: any) {\n\t\tif (typeof val != 'object' || Array.isArray(val) || !val) {\n\t\t\tval = {};\n\t\t}\n\t\tcb(val);\n\t}\n\tpublic beDate(val: any, cb: any) {\n\t\tcb(new Date(val));\n\t}\n\tpublic beString(val: any, cb: any) {\n\t\tif (typeof val != 'string') {\n\t\t\tval = '';\n\t\t}\n\t\tcb(val);\n\t}\n\tpublic beDoc = (val: any, cb: any) => {\n\t\tthis.beObj(val, (val: any) => {\n\t\t\tif (!val._id) {\n\t\t\t\tthis._id((_id: any) => {\n\t\t\t\t\tval._id = _id;\n\t\t\t\t\tcb(val);\n\t\t\t\t});\n\t\t\t} else cb(val);\n\t\t});\n\t};\n\tpublic forceArr(val: any, cb: any) {\n\t\tcb([]);\n\t}\n\tpublic forceObj(val: any, cb: any) {\n\t\tcb({});\n\t}\n\tpublic forceString(val: any, cb: any) {\n\t\tcb('');\n\t}\n\tpublic forceDoc = (val: any, cb: any) => {\n\t\tthis._id((_id: any) => {\n\t\t\tcb({\n\t\t\t\t_id: _id,\n\t\t\t});\n\t\t});\n\t};\n\tpublic getCreated(val: any, cb: any, doc: any) {\n\t\tcb(new Date(parseInt(doc._id.substring(0, 8), 16) * 1000));\n\t}\n\t/*\n\t *\tmongo local support functions\n\t */\n\tprivate replace(doc: any, value: any, rpl: any): any {\n\t\tif (value.indexOf('.') > -1) {\n\t\t\tvalue = value.split('.');\n\t\t\tlet sub = value.shift();\n\t\t\tif (\n\t\t\t\tdoc[sub] &&\n\t\t\t\t(typeof doc[sub] != 'object' || Array.isArray(doc[sub]))\n\t\t\t)\n\t\t\t\treturn;\n\t\t\tif (!doc[sub]) doc[sub] = {};\n\t\t\treturn this.replace(doc[sub], value.join('.'), rpl);\n\t\t}\n\t\tif (typeof rpl == 'function') {\n\t\t\trpl(\n\t\t\t\tdoc[value],\n\t\t\t\tfunction (newValue: any) {\n\t\t\t\t\tdoc[value] = newValue;\n\t\t\t\t},\n\t\t\t\tdoc\n\t\t\t);\n\t\t}\n\t}\n\tpublic renew(part: any, doc: any) {\n\t\tif (!this.data['obj' + part][doc._id]) return this.push(part, doc);\n\t\tif (this.data['opts' + part].replace) {\n\t\t\tfor (let key in this.data['opts' + part].replace) {\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\n\t\t\t}\n\t\t}\n\t\tfor (let each in this.data['obj' + part][doc._id]) {\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\n\t\t}\n\t\tfor (let each in doc) {\n\t\t\tthis.data['obj' + part][doc._id][each] = doc[each];\n\t\t}\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\n\t\t\tconst field = this.data['opts' + part].fields[i];\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (let each in doc) {\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].groups) {\n\t\t\tfor (let key in this.data['opts' + part].groups) {\n\t\t\t\tlet to_have = true;\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc))\n\t\t\t\t\tto_have = false;\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc))\n\t\t\t\t\tto_have = false;\n\t\t\t\tif (!this.data['obj' + part][key]) {\n\t\t\t\t\tthis.data['obj' + part][key] = {};\n\t\t\t\t}\n\t\t\t\tlet fields: any = {};\n\t\t\t\tlet set = (field: any) => {\n\t\t\t\t\tfields[field] = true;\n\t\t\t\t\tif (!field) return;\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\n\t\t\t\t\t}\n\t\t\t\t\tif (to_have) {\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlet i =\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\n\t\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\t\ti--\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\n\t\t\t\t\t\t\t\tdoc._id\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (\n\t\t\t\t\t\t\tlet i =\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].length - 1;\n\t\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\t\ti--\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\n\t\t\t\t\t\t\t\tdoc._id\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(\n\t\t\t\t\t\t\t\t\ti,\n\t\t\t\t\t\t\t\t\t1\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof g.sort == 'function') {\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tset(g.field(doc, set.bind(this)));\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\n\t\t\t\t\tif (fields[field]) continue;\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\n\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\ti--\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\n\t\t\t\t\t\t\tdoc._id\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].query) {\n\t\t\tfor (let key in this.data['opts' + part].query) {\n\t\t\t\tlet to_have = true;\n\t\t\t\tlet query = this.data['opts' + part].query[key];\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\n\t\t\t\t\tto_have = false;\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\n\t\t\t\t\tto_have = false;\n\t\t\t\tif (!this.data['obj' + part][key]) {\n\t\t\t\t\tthis.data['obj' + part][key] = [];\n\t\t\t\t}\n\t\t\t\tif (to_have) {\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\n\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\ti--\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.data['obj' + part][key].push(doc);\n\t\t\t\t} else {\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\n\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\ti--\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\n\t\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (typeof query.sort == 'function') {\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tpublic push(part: any, doc: any): any {\n\t\tif (!this.data['arr' + part]) this.data['arr' + part] = [];\n\t\tif (!this.data['obj' + part]) this.data['obj' + part] = {};\n\t\tif (!this.data['opts' + part]) this.data['opts' + part] = {};\n\t\tif (this.data['obj' + part][doc._id]) return this.renew(part, doc);\n\t\tif (this.data['opts' + part].replace) {\n\t\t\tfor (let key in this.data['opts' + part].replace) {\n\t\t\t\tthis.replace(doc, key, this.data['opts' + part].replace[key]);\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].populate) {\n\t\t\tlet p = this.data['opts' + part].populate;\n\t\t\tif (Array.isArray(p)) {\n\t\t\t\tfor (let i = 0; i < p.length; i++) {\n\t\t\t\t\tif (typeof p == 'object' && p[i].field && p[i].part) {\n\t\t\t\t\t\tthis.populate(doc, p[i].field, p[i].part);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (typeof p == 'object' && p.field && p.part) {\n\t\t\t\tthis.populate(doc, p.field, p.part);\n\t\t\t}\n\t\t}\n\t\tthis.data['arr' + part].push(doc);\n\t\tif (this.data['opts' + part].sort) {\n\t\t\tthis.data['arr' + part].sort(this.data['opts' + part].sort);\n\t\t}\n\t\tthis.data['obj' + part][doc._id] = doc;\n\t\tif (Array.isArray(this.data['opts' + part].use)) {\n\t\t\tfor (let i = 0; i < this.data['opts' + part].use.length; i++) {\n\t\t\t\tthis.data['obj' + part][doc[this.data['opts' + part].use[i]]] =\n\t\t\t\t\tdoc;\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].groups) {\n\t\t\tfor (let key in this.data['opts' + part].groups) {\n\t\t\t\tlet g = this.data['opts' + part].groups[key];\n\t\t\t\tif (typeof g.ignore == 'function' && g.ignore(doc)) continue;\n\t\t\t\tif (typeof g.allow == 'function' && !g.allow(doc)) continue;\n\t\t\t\tif (!this.data['obj' + part][key]) {\n\t\t\t\t\tthis.data['obj' + part][key] = {};\n\t\t\t\t}\n\t\t\t\tlet set = (field: any) => {\n\t\t\t\t\tif (!field) return;\n\t\t\t\t\tif (!Array.isArray(this.data['obj' + part][key][field])) {\n\t\t\t\t\t\tthis.data['obj' + part][key][field] = [];\n\t\t\t\t\t}\n\t\t\t\t\tthis.data['obj' + part][key][field].push(doc);\n\t\t\t\t\tif (typeof g.sort == 'function') {\n\t\t\t\t\t\tthis.data['obj' + part][key][field].sort(g.sort);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tset(\n\t\t\t\t\tg.field(doc, (field: any) => {\n\t\t\t\t\t\tset(field);\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].query) {\n\t\t\tfor (let key in this.data['opts' + part].query) {\n\t\t\t\tlet query = this.data['opts' + part].query[key];\n\t\t\t\tif (typeof query.ignore == 'function' && query.ignore(doc))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (typeof query.allow == 'function' && !query.allow(doc))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!this.data['obj' + part][key]) {\n\t\t\t\t\tthis.data['obj' + part][key] = [];\n\t\t\t\t}\n\t\t\t\tthis.data['obj' + part][key].push(doc);\n\t\t\t\tif (typeof query.sort == 'function') {\n\t\t\t\t\tthis.data['obj' + part][key].sort(query.sort);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\n\t\t\tconst field = this.data['opts' + part].fields[i];\n\t\t\tif (!this.data['obj' + part][doc[field]]) {\n\t\t\t\tthis.data['obj' + part][doc[field]] = doc;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor (let each in doc) {\n\t\t\t\tthis.data['obj' + part][doc[field]][each] = doc[each];\n\t\t\t}\n\t\t}\n\t\t// this.store.setJson('mongo' + part, this.data['arr' + part]);\n\t}\n\tpublic remove(part: any, doc: any) {\n\t\tif (!Array.isArray(this.data['arr' + part])) return;\n\t\tfor (let i = 0; i < this.data['arr' + part].length; i++) {\n\t\t\tif (this.data['arr' + part][i]._id == doc._id) {\n\t\t\t\tthis.data['arr' + part].splice(i, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdelete this.data['obj' + part][doc._id];\n\t\tfor (let i = 0; i < this.data['opts' + part].fields.length; i++) {\n\t\t\tconst field = this.data['opts' + part].fields[i];\n\t\t\tdelete this.data['obj' + part][doc[field]];\n\t\t}\n\t\tif (this.data['opts' + part].groups) {\n\t\t\tfor (let key in this.data['opts' + part].groups) {\n\t\t\t\tfor (let field in this.data['obj' + part][key]) {\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet i = this.data['obj' + part][key][field].length - 1;\n\t\t\t\t\t\ti >= 0;\n\t\t\t\t\t\ti--\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field][i]._id ==\n\t\t\t\t\t\t\tdoc._id\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthis.data['obj' + part][key][field].splice(i, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.data['opts' + part].query) {\n\t\t\tfor (let key in this.data['opts' + part].query) {\n\t\t\t\tfor (\n\t\t\t\t\tlet i = this.data['obj' + part][key].length - 1;\n\t\t\t\t\ti >= 0;\n\t\t\t\t\ti--\n\t\t\t\t) {\n\t\t\t\t\tif (this.data['obj' + part][key][i]._id == doc._id) {\n\t\t\t\t\t\tthis.data['obj' + part][key].splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t/*\n\t *\tEndof Mongo Service\n\t */\n\tconstructor(\n\t\tprivate store: StoreService,\n\t\tprivate http: HttpService,\n\t\tprivate core: CoreService\n\t) {\n\t\tconsole.warn('Mongo Service is deprecated');\n\n\t\tthis.core.onComplete('socket').then((socket: any) => {\n\t\t\tthis.socket = socket;\n\t\t\tsocket.on('create', (created: any) => {\n\t\t\t\tthis.fetch(created.part, {\n\t\t\t\t\tforce: true,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\t_id: created._id,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t\tsocket.on('update', (updated: any) => {\n\t\t\t\tthis.fetch(updated.part, {\n\t\t\t\t\tforce: true,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\t_id: updated._id,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t});\n\t\t\tsocket.on('delete', (deleted: any) => {\n\t\t\t\tthis.remove(deleted.part, deleted);\n\t\t\t});\n\t\t});\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class RenderService {\n\t/**\n\t * A dictionary to store event callbacks.\n\t * Each event has an array of callback functions that will be executed when the event is triggered.\n\t */\n\tprivate _pipes: Record<string, ((param: unknown) => void)[]> = {};\n\n\t/**\n\t * Registers a callback function to an event.\n\t *\n\t * @param event - The name of the event to listen for.\n\t * @param cb - The callback function to execute when the event is triggered.\n\t * @returns A function to unregister the callback from the event.\n\t */\n\ton(event: string, cb: () => void): () => void {\n\t\tthis._pipes[event] = this._pipes[event] || [];\n\t\tthis._pipes[event].push(cb);\n\n\t\tconst index = this._pipes[event].length - 1;\n\n\t\treturn () => {\n\t\t\tthis._pipes[event][index] = () => {};\n\t\t};\n\t}\n\n\t/**\n\t * Triggers an event and executes all registered callback functions for that event.\n\t *\n\t * @param event - The name of the event to trigger.\n\t * @param param - An optional parameter to pass to the callback functions.\n\t */\n\trender(event: string = '', param: unknown = null): void {\n\t\tif (!this._pipes[event]) return;\n\n\t\tfor (let i = 0; i < this._pipes[event].length; i++) {\n\t\t\tif (typeof this._pipes[event][i] === 'function') {\n\t\t\t\tthis._pipes[event][i](param);\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class HashService {\n\tprivate replacements = [\n\t\t{\n\t\t\tfrom: '%20',\n\t\t\tto: ' ',\n\t\t},\n\t];\n\tpublic hash: { [key: string]: string } = {};\n\tprivate done: boolean = false;\n\n\tconstructor() {\n\t\tthis.initialize();\n\t}\n\n\t/**\n\t * Initializes the hash service by loading the current hash from the URL.\n\t */\n\tprivate initialize(): void {\n\t\tif (!window.location.hash) {\n\t\t\tthis.done = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.load();\n\t\tthis.done = true;\n\t}\n\n\t/**\n\t * Loads the current hash from the URL into the hash object.\n\t */\n\tprivate load(): void {\n\t\tthis.hash = {};\n\t\tconst hashArray = window.location.hash\n\t\t\t.replace('#!#', '')\n\t\t\t.replace('#', '')\n\t\t\t.split('&');\n\n\t\tfor (const hashItem of hashArray) {\n\t\t\tlet [holder, value] = hashItem.split('=');\n\t\t\tholder = this.applyReplacements(holder);\n\t\t\tvalue = this.applyReplacements(value);\n\t\t\tthis.hash[holder] = value;\n\t\t}\n\t}\n\n\t/**\n\t * Applies replacements to a given string based on the replacements array.\n\t *\n\t * @param str - The string to apply replacements to.\n\t * @returns The string with replacements applied.\n\t */\n\tprivate applyReplacements(str: string | undefined): string {\n\t\tif (!str) return '';\n\t\tfor (const replacement of this.replacements) {\n\t\t\tstr = str.split(replacement.from).join(replacement.to);\n\t\t}\n\t\treturn str;\n\t}\n\n\t/**\n\t * Executes a callback with the value of a specific hash field once the hash is loaded.\n\t *\n\t * @param field - The hash field to get the value for.\n\t * @param cb - The callback to execute with the value.\n\t */\n\ton(field: string, cb: (value: string) => void): void {\n\t\tif (!this.done) {\n\t\t\tsetTimeout(() => this.on(field, cb), 100);\n\t\t\treturn;\n\t\t}\n\t\tcb(this.hash[field]);\n\t}\n\n\t/**\n\t * Saves the current hash object to the URL.\n\t */\n\tsave(): void {\n\t\tconst hash = Object.entries(this.hash)\n\t\t\t.map(([key, value]) => `${key}=${value}`)\n\t\t\t.join('&');\n\t\twindow.location.hash = hash;\n\t}\n\n\t/**\n\t * Sets a value for a specific hash field and updates the URL.\n\t *\n\t * @param field - The hash field to set the value for.\n\t * @param value - The value to set.\n\t */\n\tset(field: string, value: string): void {\n\t\tthis.hash[field] = value;\n\t\tthis.save();\n\t}\n\n\t/**\n\t * Gets the value of a specific hash field.\n\t *\n\t * @param field - The hash field to get the value for.\n\t * @returns The value of the hash field.\n\t */\n\tget(field: string): string | undefined {\n\t\treturn this.hash[field];\n\t}\n\n\t/**\n\t * Clears a specific hash field or all hash fields and updates the URL.\n\t *\n\t * @param field - The hash field to clear. If not provided, clears all hash fields.\n\t */\n\tclear(field?: string): void {\n\t\tif (field) {\n\t\t\tdelete this.hash[field];\n\t\t} else {\n\t\t\tthis.hash = {};\n\t\t}\n\t\tthis.save();\n\t}\n}\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\nimport { LoaderComponent } from '../components/loader/loader.component';\nimport { DomService } from './dom.service';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class LoaderService {\n\tpublic loaders: any = [];\n\tconstructor(\n\t\tprivate dom: DomService,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\n\t) {}\n\tshow(opts?: any) {\n\t\tlet component: any;\n\t\topts.close = () => {\n\t\t\tif (component) component.componentRef.destroy();\n\t\t\tcomponent.nativeElement.remove();\n\t\t\tif (typeof opts.onClose == 'function') opts.onClose();\n\t\t};\n\t\tif (opts.append) {\n\t\t\tcomponent = this.dom.appendComponent(\n\t\t\t\tLoaderComponent,\n\t\t\t\topts,\n\t\t\t\topts.append\n\t\t\t);\n\t\t} else {\n\t\t\tcomponent = this.dom.appendComponent(LoaderComponent, opts);\n\t\t}\n\t\tthis.loaders.push(component);\n\t\treturn component.nativeElement;\n\t}\n\tdestroy() {\n\t\tfor (let i = this.loaders.length - 1; i >= 0; i--) {\n\t\t\tthis.loaders[i].componentRef.destroy();\n\t\t\tthis.loaders.splice(i, 1);\n\t\t}\n\t}\n}\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from '../interfaces/config';\nimport { CoreService } from './core.service';\n\n/* app.module.ts\nimport * as io from 'socket.io-client';\nWacomModule.forRoot({\n\tio\n)\n */\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class SocketService {\n\tprivate _url = '';\n\n\tprivate _io: any;\n\n\tprivate _connected = false;\n\n\tprivate _opts: any = {};\n\n\tconstructor(\n\t\t@Inject(CONFIG_TOKEN) @Optional() private _config: Config,\n\t\tprivate _core: CoreService\n\t) {\n\t\tif (!this._config.io) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._url = window.location.origin.replace('4200', '8080');\n\n\t\tif (!this._config) this._config = DEFAULT_CONFIG;\n\n\t\tif (typeof this._config.socket === 'object') {\n\t\t\tif (this._config.socket.url) {\n\t\t\t\tthis._url = this._config.socket.url;\n\t\t\t}\n\n\t\t\tif (this._config.socket.opts) {\n\t\t\t\tthis._opts = this._config.socket.opts;\n\t\t\t}\n\t\t}\n\n\t\tif (this._config.socket) {\n\t\t\tthis.load();\n\t\t}\n\t}\n\n\t/**\n\t * Sets the URL for the WebSocket connection and reloads the socket.\n\t * @param url - The URL of the WebSocket server.\n\t */\n\tsetUrl(url: string): void {\n\t\tthis._url = url;\n\n\t\tif (!this._config.socket) {\n\t\t\tthis._config.socket = true;\n\t\t}\n\n\t\tthis.load();\n\t}\n\n\t/**\n\t * Loads and initializes the WebSocket connection.\n\t */\n\tprivate load(): void {\n\t\tif (this._config.io) {\n\t\t\tconst ioFunc = this._config.io.default\n\t\t\t\t? this._config.io.default\n\t\t\t\t: this._config.io;\n\n\t\t\tthis._io = ioFunc(this._url, this._opts);\n\n\t\t\tthis._io.on('connect', () => {\n\t\t\t\tthis._connected = true;\n\t\t\t\tthis._core.complete('socket');\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Subscribes to a WebSocket event.\n\t * @param to - The event to subscribe to.\n\t * @param cb - The callback function to execute when the event is received.\n\t */\n\ton(to: string, cb: (message: any) => void = () => {}): void {\n\t\tif (!this._config.socket) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._connected) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.on(to, cb);\n\t\t\t}, 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._io.on(to, cb);\n\t}\n\n\t/**\n\t * Emits a message to a WebSocket event.\n\t * @param to - The event to emit the message to.\n\t * @param message - The message to emit.\n\t * @param room - Optional room to emit the message to.\n\t */\n\temit(to: string, message: any, room: any = false): void {\n\t\tif (!this._config.socket) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._connected) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.emit(to, message, room);\n\t\t\t}, 100);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._io.emit(to, message, room);\n\t}\n}\n","import { Injectable, Inject, Optional } from '@angular/core';\nimport { DomService } from './dom.service';\nimport { ModalComponent } from '../components/modal/modal.component';\nimport { CONFIG_TOKEN, Config } from '../interfaces/config';\nimport { Modal } from '../interfaces/modal.interface';\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ModalService {\n\tprivate _modal: any;\n\tconstructor(\n\t\tprivate dom: DomService,\n\t\t@Inject(CONFIG_TOKEN) @Optional() private config: Config\n\t) {\n\t\tif (!this.config) this.config = {};\n\t\tif (!this.config.modal) this.config.modal = {};\n\t\tif (!this.config.modal.modals) this.config.modal.modals = {};\n\t\tthis._modal = config.modal;\n\t}\n\n\tshow(opts: Modal | any) {\n\t\tif (this.locked) {\n\t\t\treturn;\n\t\t}\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\tcomponent: opts,\n\t\t\t};\n\t\t}\n\t\tif (!opts || typeof opts != 'object') opts = {};\n\t\tif (\n\t\t\ttypeof opts.component == 'string' &&\n\t\t\tthis._modal.modals[opts.component]\n\t\t) {\n\t\t\topts.component = this._modal.modals[opts.component];\n\t\t}\n\t\tif (typeof opts.component != 'function') {\n\t\t\tconsole.log('This component does not exists.');\n\t\t\treturn;\n\t\t}\n\t\tif (!opts.class) opts.class = '';\n\t\tfor (let each in this.config.modal) {\n\t\t\tif (each == 'class')\n\t\t\t\topts.class +=\n\t\t\t\t\t((opts.class && ' ') || '') + this.config.modal.class;\n\t\t\telse if (!opts[each]) opts[each] = this._modal[each];\n\t\t}\n\t\topts.id = Math.floor(Math.random() * Date.now()) + Date.now();\n\t\tthis.opened[opts.id] = opts;\n\t\tdocument.body.classList.add('modalOpened');\n\t\tlet component: any;\n\t\tlet content: any;\n\t\topts.close = () => {\n\t\t\tcontent.componentRef.destroy();\n\t\t\tcomponent.nativeElement.remove();\n\t\t\tif (typeof opts.onClose == 'function') opts.onClose();\n\t\t\tdelete this.opened[opts.id];\n\t\t\tif (!Object.keys(this.opened).length) {\n\t\t\t\tdocument.body.classList.remove('modalOpened');\n\t\t\t}\n\t\t};\n\t\tif (typeof opts.timeout == 'number' && opts.timeout > 0) {\n\t\t\tsetTimeout(opts.close, opts.timeout);\n\t\t}\n\t\tcomponent = this.dom.appendComponent(ModalComponent, opts);\n\t\tcontent = this.dom.appendComponent(\n\t\t\topts.component,\n\t\t\topts,\n\t\t\tcomponent.nativeElement.children[0].children[0]\n\t\t\t\t.children[0] as HTMLElement\n\t\t);\n\t\treturn component.nativeElement;\n\t}\n\topen(opts: Modal) {\n\t\tthis.show(opts);\n\t}\n\tsmall(opts: Modal) {\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\tcomponent: opts,\n\t\t\t};\n\t\t}\n\t\topts.size = 'small';\n\t\tthis.show(opts);\n\t}\n\tmid(opts: Modal) {\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\tcomponent: opts,\n\t\t\t};\n\t\t}\n\t\topts.size = 'mid';\n\t\tthis.show(opts);\n\t}\n\tbig(opts: Modal) {\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\tcomponent: opts,\n\t\t\t};\n\t\t}\n\t\topts.size = 'big';\n\t\tthis.show(opts);\n\t}\n\tfull(opts: Modal) {\n\t\tif (typeof opts == 'string' || typeof opts == 'function') {\n\t\t\topts = {\n\t\t\t\tcomponent: opts,\n\t\t\t};\n\t\t}\n\t\topts.size = 'full';\n\t\tthis.show(opts);\n\t}\n\tprivate opened: any = {};\n\tlocked = false;\n\tdestroy() {\n\t\tif (this.locked) {\n\t\t\treturn;\n\t\t}\n\t\tfor (let each in this.opened) {\n\t\t\tthis.opened[each].close();\n\t\t}\n\t\tdocument.body.classList.remove('modalOpened');\n\t}\n}\n","import { Component } from '@angular/core';\n\n@Component({\n\tselector: 'lib-files',\n\ttemplateUrl: './files.component.html',\n\tstyleUrls: ['./files.component.scss'],\n\tstandalone: false,\n})\nexport class FilesComponent {\n\tpublic fs: any;\n\tconstructor() {}\n}\n","<ng-container *ngFor=\"let file of fs.files\">\n\t<input\n\t\t[id]=\"file.id\"\n\t\ttype=\"file\"\n\t\tname=\"file\"\n\t\t(change)=\"fs.change($event, file); input.value = ''\"\n\t\t#input\n\t\t[hidden]=\"true\"\n\t\t[accept]=\"file.accept || (file.part && 'image/*') || ''\"\n\t\t[multiple]=\"(file.multiple && true) || ''\"\n\t/>\n</ng-container>\n","import { Injectable } from '@angular/core';\nimport { HttpService } from './http.service';\nimport { DomService } from './dom.service';\nimport { FilesComponent } from '../components/files/files.component';\n\ninterface FileOptions {\n\tid: string;\n\ttype?: string;\n\tresize?: number | { width: number; height: number };\n\tmultiple?: boolean;\n\tmultiple_cb?: (files: { dataUrl: string; file: File }[]) => void;\n\tcb?: (dataUrl: string | false, file: File) => void;\n\tsave?: boolean;\n\tcomplete?: () => void;\n\tapi?: string;\n\tpart?: string;\n\tname?: string;\n\tbody?: () => object | object;\n\tresp?: (response: any) => void;\n\tappend?: (formData: FormData, files: File[]) => void;\n\tmultiple_files?: { dataUrl: string; file: File }[];\n\tmultiple_counter?: number;\n\turl?: string;\n}\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class FileService {\n\tprivate added: Record<string, FileOptions> = {};\n\tprivate files: FileOptions[] = [];\n\n\tconstructor(private dom: DomService, private http: HttpService) {\n\t\tthis.dom.appendComponent(FilesComponent, {\n\t\t\tfs: this,\n\t\t});\n\t}\n\n\t/**\n\t * Adds a file input configuration.\n\t *\n\t * @param opts - The file options.\n\t */\n\tadd(opts: FileOptions | string): void | (() => void) {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = { id: opts };\n\t\t}\n\n\t\tif (!opts.id) {\n\t\t\tconsole.log('You have to pass ID into file object');\n\t\t\treturn;\n\t\t}\n\n\t\topts.type = opts.type || 'image';\n\n\t\tif (typeof opts.resize === 'number') {\n\t\t\topts.resize = { width: opts.resize, height: opts.resize };\n\t\t}\n\n\t\tif (this.added[opts.id]) {\n\t\t\tthis.files = this.files.filter((file) => file.id !== opts.id);\n\t\t}\n\n\t\tthis.files.push(opts);\n\t\tthis.added[opts.id] = opts;\n\n\t\tif (opts.save) {\n\t\t\treturn () => {\n\t\t\t\topts.complete?.();\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Handles file input change event.\n\t *\n\t * @param event - The input change event.\n\t * @param info - The file options.\n\t */\n\tchange(event: Event, info: FileOptions): void {\n\t\tconst input = event.target as HTMLInputElement;\n\t\tif (!input.files) return;\n\n\t\tif (info.type === 'image') {\n\t\t\tif (info.multiple) {\n\t\t\t\tif (info.multiple_cb) {\n\t\t\t\t\tinfo.multiple_files = [];\n\t\t\t\t\tinfo.multiple_counter = input.files.length;\n\t\t\t\t}\n\t\t\t\tArray.from(input.files).forEach((file) =>\n\t\t\t\t\tthis.process(file, info)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.process(input.files[0], info);\n\t\t\t}\n\t\t} else if (info.type === 'file') {\n\t\t\tif (info.multiple) {\n\t\t\t\tinfo.multiple_cb?.(\n\t\t\t\t\tArray.from(input.files).map((file) => ({\n\t\t\t\t\t\tdataUrl: '',\n\t\t\t\t\t\tfile,\n\t\t\t\t\t}))\n\t\t\t\t);\n\t\t\t}\n\t\t\tArray.from(input.files).forEach((file) => info.cb?.('', file));\n\t\t\tif (info.part || info.url) {\n\t\t\t\tthis.uploadFiles(info, input.files as any);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log('Provide type `image` or `file`');\n\t\t}\n\t}\n\n\t/**\n\t * Removes a file.\n\t *\n\t * @param part - The part of the API.\n\t * @param url - The URL of the file.\n\t * @param opts - Additional options.\n\t * @param cb - The callback function.\n\t */\n\tremove(\n\t\tpart: string,\n\t\turl: string,\n\t\topts: any = {},\n\t\tcb: (resp: any) => void = () => {}\n\t): void | (() => void) {\n\t\topts.url = url;\n\t\tif (opts.save) {\n\t\t\treturn () => {\n\t\t\t\tthis.http.post(\n\t\t\t\t\topts.api || `/api/${part}/file/delete`,\n\t\t\t\t\topts,\n\t\t\t\t\tcb\n\t\t\t\t);\n\t\t\t};\n\t\t} else {\n\t\t\tthis.http.post(opts.api || `/api/${part}/file/delete`, opts, cb);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads files to the server.\n\t *\n\t * @param info - The file options.\n\t * @param files - The files to upload.\n\t * @param cb - The callback function.\n\t */\n\tuploadFiles(\n\t\tinfo: FileOptions,\n\t\tfiles: File[],\n\t\tcb: (resp: any) => void = () => {}\n\t): void {\n\t\tconst formData = new FormData();\n\n\t\tif (info.append) {\n\t\t\tinfo.append(formData, files);\n\t\t} else {\n\t\t\tfiles.forEach((file, index) =>\n\t\t\t\tformData.append(`file[${index}]`, file)\n\t\t\t);\n\t\t}\n\n\t\tconst body =\n\t\t\ttypeof info.body === 'function' ? info.body() : info.body || {};\n\t\tObject.entries(body).forEach(([key, value]) =>\n\t\t\tformData.append(key, value)\n\t\t);\n\n\t\tif (info.save) {\n\t\t\tinfo.complete = () => {\n\t\t\t\tthis.http.post(\n\t\t\t\t\tinfo.api ||\n\t\t\t\t\t\t`/api/${info.part}/file${\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\n\t\t\t\t\t\t}`,\n\t\t\t\t\tformData,\n\t\t\t\t\t(resp: any) => {\n\t\t\t\t\t\tinfo.resp?.(resp);\n\t\t\t\t\t\tcb(resp);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\t\t} else {\n\t\t\tthis.http.post(\n\t\t\t\tinfo.api ||\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\n\t\t\t\tformData,\n\t\t\t\t(resp: any) => {\n\t\t\t\t\tinfo.resp?.(resp);\n\t\t\t\t\tcb(resp);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Uploads an image to the server.\n\t *\n\t * @param info - The file options.\n\t * @param cb - The callback function.\n\t */\n\timage(\n\t\tinfo: FileOptions,\n\t\tcb: (resp: any) => void = () => {}\n\t): void | (() => void) {\n\t\tif (info.save) {\n\t\t\treturn () => {\n\t\t\t\tthis.http.post(\n\t\t\t\t\tinfo.api ||\n\t\t\t\t\t\t`/api/${info.part}/file${\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\n\t\t\t\t\t\t}`,\n\t\t\t\t\tinfo,\n\t\t\t\t\tcb\n\t\t\t\t);\n\t\t\t};\n\t\t} else {\n\t\t\tthis.http.post(\n\t\t\t\tinfo.api ||\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\n\t\t\t\tinfo,\n\t\t\t\tcb\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Updates the file information after processing.\n\t *\n\t * @param dataUrl - The data URL of the processed file.\n\t * @param info - The file options.\n\t * @param file - The file object.\n\t */\n\t// private update(dataUrl: string, info: FileOptions, file: File): void {\n\tprivate update(dataUrl: string, info: any, file: File): void {\n\t\tinfo.cb?.(dataUrl, file);\n\t\tif (info.multiple_cb) {\n\t\t\tinfo.multiple_files.push({ dataUrl, file });\n\t\t\tif (--info.multiple_counter === 0)\n\t\t\t\tinfo.multiple_cb(info.multiple_files);\n\t\t}\n\n\t\tif (!info.part) return;\n\n\t\tconst obj =\n\t\t\ttypeof info.body === 'function' ? info.body() : info.body || {};\n\t\tobj['dataUrl'] = dataUrl;\n\n\t\tif (info.save) {\n\t\t\tinfo.complete = () => {\n\t\t\t\tthis.http.post(\n\t\t\t\t\tinfo.api ||\n\t\t\t\t\t\t`/api/${info.part}/file${\n\t\t\t\t\t\t\tinfo.name ? `/${info.name}` : ''\n\t\t\t\t\t\t}`,\n\t\t\t\t\tobj,\n\t\t\t\t\t(resp: any) => {\n\t\t\t\t\t\tinfo.cb?.(resp);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\t\t} else {\n\t\t\tthis.http.post(\n\t\t\t\tinfo.api ||\n\t\t\t\t\t`/api/${info.part}/file${info.name ? `/${info.name}` : ''}`,\n\t\t\t\tobj,\n\t\t\t\t(resp: any) => {\n\t\t\t\t\tinfo.cb?.(resp);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Processes an image file for resizing.\n\t *\n\t * @param file - The file object.\n\t * @param info - The file options.\n\t */\n\t// private process(file: File, info: FileOptions): void {\n\tprocess(file: File, info: any): void {\n\t\tif (!file.type.startsWith('image/')) {\n\t\t\tinfo.cb?.(false, file);\n\t\t\tif (info.multiple_cb) {\n\t\t\t\tinfo.multiple_files.push({ dataUrl: '', file });\n\t\t\t\tif (--info.multiple_counter === 0)\n\t\t\t\t\tinfo.multiple_cb(info.multiple_files);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (info.resize) {\n\t\t\tinfo.resize.width = info.resize.width || 1920;\n\t\t\tinfo.resize.height = info.resize.height || 1080;\n\t\t}\n\n\t\tconst reader = new FileReader();\n\t\treader.onload = (loadEvent) => {\n\t\t\tif (!info.resize) {\n\t\t\t\treturn this.update(\n\t\t\t\t\tloadEvent.target?.result as string,\n\t\t\t\t\tinfo,\n\t\t\t\t\tfile\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst canvas = document.createElement('canvas');\n\t\t\tconst img = document.createElement('img');\n\t\t\timg.onload = () => {\n\t\t\t\tif (\n\t\t\t\t\timg.width <= info.resize.width &&\n\t\t\t\t\timg.height <= info.resize.height\n\t\t\t\t) {\n\t\t\t\t\treturn this.update(\n\t\t\t\t\t\tloadEvent.target?.result as string,\n\t\t\t\t\t\tinfo,\n\t\t\t\t\t\tfile\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst infoRatio = info.resize.width / info.resize.height;\n\t\t\t\tconst imgRatio = img.width / img.height;\n\t\t\t\tlet width, height;\n\t\t\t\tif (imgRatio > infoRatio) {\n\t\t\t\t\twidth = Math.min(info.resize.width, img.width);\n\t\t\t\t\theight = width / imgRatio;\n\t\t\t\t} else {\n\t\t\t\t\theight = Math.min(info.resize.height, img.height);\n\t\t\t\t\twidth = height * imgRatio;\n\t\t\t\t}\n\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\t\t\t\tconst context = canvas.getContext('2d');\n\t\t\t\tcontext?.drawImage(img, 0, 0, width, height);\n\t\t\t\tconst dataUrl = canvas.toDataURL('image/jpeg', 1);\n\t\t\t\tthis.update(dataUrl, info, file);\n\t\t\t};\n\t\t\timg.src = loadEvent.target?.result as string;\n\t\t};\n\t\treader.readAsDataURL(file);\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class UiService {\n\tprivate variables: { [key: string]: string } = {};\n\tprivate _forms: { [key: string]: any } = {};\n\t// global variable use for design purposes\n\tvar: Record<string, unknown> = {};\n\n\tconstructor() {\n\t\tconst storedVariables = localStorage.getItem('css_variables');\n\t\tthis.variables = storedVariables ? JSON.parse(storedVariables) : {};\n\t\tfor (const key in this.variables) {\n\t\t\tthis.setProperty(key, this.variables[key]);\n\t\t}\n\t}\n\n\t/* Forms Management */\n\t/**\n\t * Manages form states.\n\t *\n\t * @param id - The form identifier.\n\t * @returns The form state object.\n\t */\n\tpublic form(id: string): any {\n\t\tif (typeof id !== 'string') return {};\n\t\tif (!this._forms[id]) this._forms[id] = {};\n\t\treturn this._forms[id];\n\t}\n\n\t/**\n\t * Validates input values based on the specified type.\n\t *\n\t * @param value - The value to validate.\n\t * @param kind - The type of validation.\n\t * @param extra - Additional validation criteria.\n\t * @returns True if the value is valid, false otherwise.\n\t */\n\tpublic valid(value: any, kind = 'email', extra = 0): boolean {\n\t\tconst validators: { [key: string]: (value: any) => boolean } = {\n\t\t\temail: (value) =>\n\t\t\t\t/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,10})+$/.test(\n\t\t\t\t\tvalue || ''\n\t\t\t\t),\n\t\t\ttext: (value) => typeof value === 'string',\n\t\t\tarray: (value) => Array.isArray(value),\n\t\t\tobject: (value) =>\n\t\t\t\ttypeof value === 'object' &&\n\t\t\t\t!Array.isArray(value) &&\n\t\t\t\tvalue !== null,\n\t\t\tnumber: (value) => typeof value === 'number',\n\t\t\tpassword: (value) => {\n\t\t\t\tif (!value) return false;\n\t\t\t\tswitch (extra) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))/.test(\n\t\t\t\t\t\t\tvalue || ''\n\t\t\t\t\t\t);\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\treturn /^(((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{8,})/.test(\n\t\t\t\t\t\t\tvalue || ''\n\t\t\t\t\t\t);\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]))(?=.{8,})/.test(\n\t\t\t\t\t\t\tvalue || ''\n\t\t\t\t\t\t);\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\treturn /^((?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[@#$%&!-_]))(?=.{8,})/.test(\n\t\t\t\t\t\t\tvalue || ''\n\t\t\t\t\t\t);\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn !!value;\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t\treturn validators[kind] ? validators[kind](value) : false;\n\t}\n\n\t/**\n\t * Determines the strength of a password.\n\t *\n\t * @param value - The password to evaluate.\n\t * @returns The strength level of the password.\n\t */\n\tpublic level(value = ''): number {\n\t\tif (!value) return 0;\n\t\tlet level = 0;\n\t\tif (value.length > 8) level++;\n\t\tif (/[a-z]/.test(value)) level++;\n\t\tif (/[A-Z]/.test(value)) level++;\n\t\tif (/[1-9]/.test(value)) level++;\n\t\tif (/[`!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?~]/.test(value)) level++;\n\t\treturn level;\n\t}\n\n\t/* CSS Management */\n\t/**\n\t * Saves the CSS variables to local storage.\n\t */\n\tprivate save(): void {\n\t\tlocalStorage.setItem('css_variables', JSON.stringify(this.variables));\n\t}\n\n\t/**\n\t * Sets a CSS variable.\n\t *\n\t * @param key - The CSS variable name.\n\t * @param value - The CSS variable value.\n\t */\n\tprivate setProperty(key: string, value: string): void {\n\t\tdocument.documentElement.style.setProperty(key, value);\n\t}\n\n\t/**\n\t * Sets multiple CSS variables.\n\t *\n\t * @param variables - The CSS variables to set.\n\t * @param opts - Options for setting the variables.\n\t */\n\tpublic set(variables: { [key: string]: string }, opts: any = {}): void {\n\t\tif (typeof opts === 'string') {\n\t\t\topts = opts === 'local' ? { local: true } : { host: opts };\n\t\t}\n\t\tif (opts.host && window.location.host !== opts.host) return;\n\t\tfor (const key in variables) {\n\t\t\tif (opts.local) {\n\t\t\t\tthis.variables[key] = variables[key];\n\t\t\t} else if (this.variables[key]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.setProperty(key, variables[key]);\n\t\t}\n\t\tif (opts.local) this.save();\n\t}\n\n\t/**\n\t * Retrieves the stored CSS variables.\n\t *\n\t * @returns The stored CSS variables.\n\t */\n\tpublic get(): { [key: string]: string } {\n\t\treturn this.variables;\n\t}\n\n\t/**\n\t * Removes specified CSS variables.\n\t *\n\t * @param keys - The keys of the CSS variables to remove.\n\t */\n\tpublic remove(keys: string | string[]): void {\n\t\tconst keyArray = Array.isArray(keys) ? keys : keys.split(' ');\n\t\tfor (const key of keyArray) {\n\t\t\tdelete this.variables[key];\n\t\t}\n\t\tthis.save();\n\t}\n\n\t/**\n\t * Generates an array of sample data.\n\t *\n\t * @param arrLen - The length of the array.\n\t * @param type - The type of data to generate.\n\t * @returns An array of sample data.\n\t */\n\tpublic arr(arrLen = 10, type: string = 'number'): any[] {\n\t\tconst arr = [];\n\t\tfor (let i = 0; i < arrLen; i++) {\n\t\t\tswitch (type) {\n\t\t\t\tcase 'number':\n\t\t\t\t\tarr.push(i + 1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'text':\n\t\t\t\t\tarr.push(this.text());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\tarr.push(new Date(new Date().getTime() + i * 86400000));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tarr.push(type);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\n\t/**\n\t * Generates a random text string.\n\t *\n\t * @param length - The length of the text string.\n\t * @returns A random text string.\n\t */\n\tpublic text(length = 10): string {\n\t\tconst characters =\n\t\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\tlet result = '';\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tresult += characters.charAt(\n\t\t\t\tMath.floor(Math.random() * characters.length)\n\t\t\t);\n\t\t}\n\t\treturn result;\n\t}\n}\n","import { Injectable } from '@angular/core';\nimport { DatePipe } from '@angular/common';\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class TimeService {\n\tprivate weekDays = [\n\t\t'Sunday',\n\t\t'Monday',\n\t\t'Tuesday',\n\t\t'Wednesday',\n\t\t'Thursday',\n\t\t'Friday',\n\t\t'Saturday',\n\t];\n\n\tconstructor(private datePipe: DatePipe) {}\n\n\t/**\n\t * Returns the name of the day of the week for a given date.\n\t *\n\t * @param date - The date for which to get the day of the week.\n\t * @param format - The format in which to return the day name. Default is 'long'.\n\t * @returns The name of the day of the week.\n\t */\n\tgetDayName(date: Date, format: 'short' | 'long' = 'long'): string {\n\t\tconst dayIndex = date.getDay();\n\t\treturn format === 'short'\n\t\t\t? this.weekDays[dayIndex].substring(0, 3)\n\t\t\t: this.weekDays[dayIndex];\n\t}\n\n\t/**\n\t * Formats a date according to the specified format and timezone.\n\t *\n\t * @param date - The date to format.\n\t * @param format - The format string (see Angular DatePipe documentation for format options).\n\t * @param timezone - The timezone to use for formatting.\n\t * @returns The formatted date string.\n\t */\n\tformatDate(\n\t\tdate: Date,\n\t\tformat: string = 'mediumDate',\n\t\ttimezone: string = 'UTC'\n\t): string {\n\t\treturn this.datePipe.transform(date, format, timezone) || '';\n\t}\n\n\t/**\n\t * Converts a date to a different timezone.\n\t *\n\t * @param date - The date to convert.\n\t * @param timezone - The timezone to convert to.\n\t * @returns The date in the new timezone.\n\t */\n\tconvertToTimezone(date: Date, timezone: string): Date {\n\t\treturn new Date(date.toLocaleString('en-US', { timeZone: timezone }));\n\t}\n\n\t/**\n\t * Returns the start of the day for a given date.\n\t *\n\t * @param date - The date for which to get the start of the day.\n\t * @returns The start of the day (midnight) for the given date.\n\t */\n\tstartOfDay(date: Date): Date {\n\t\tconst newDate = new Date(date);\n\t\tnewDate.setHours(0, 0, 0, 0);\n\t\treturn newDate;\n\t}\n\n\t/**\n\t * Returns the end of the day for a given date.\n\t *\n\t * @param date - The date for which to get the end of the day.\n\t * @returns The end of the day (one millisecond before midnight) for the given date.\n\t */\n\tendOfDay(date: Date): Date {\n\t\tconst newDate = new Date(date);\n\t\tnewDate.setHours(23, 59, 59, 999);\n\t\treturn newDate;\n\t}\n\n\t/**\n\t * Returns the number of days in a given month and year.\n\t *\n\t * @param month - The month (0-11).\n\t * @param year - The year.\n\t * @returns The number of days in the month.\n\t */\n\tgetDaysInMonth(month: number, year: number): number {\n\t\treturn new Date(year, month + 1, 0).getDate();\n\t}\n\n\t/**\n\t * Checks if a given year is a leap year.\n\t *\n\t * @param year - The year to check.\n\t * @returns True if the year is a leap year, false otherwise.\n\t */\n\tisLeapYear(year: number): boolean {\n\t\treturn (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n\t}\n\n\t/**\n\t * Adds a specified number of days to a date.\n\t *\n\t * @param date - The date to which to add days.\n\t * @param days - The number of days to add.\n\t * @returns The new date with the added days.\n\t */\n\taddDays(date: Date, days: number): Date {\n\t\tconst newDate = new Date(date);\n\t\tnewDate.setDate(newDate.getDate() + days);\n\t\treturn newDate;\n\t}\n\n\t/**\n\t * Adds a specified number of months to a date.\n\t *\n\t * @param date - The date to which to add months.\n\t * @param months - The number of months to add.\n\t * @returns The new date with the added months.\n\t */\n\taddMonths(date: Date, months: number): Date {\n\t\tconst newDate = new Date(date);\n\t\tnewDate.setMonth(newDate.getMonth() + months);\n\t\treturn newDate;\n\t}\n\n\t/**\n\t * Adds a specified number of years to a date.\n\t *\n\t * @param date - The date to which to add years.\n\t * @param years - The number of years to add.\n\t * @returns The new date with the added years.\n\t */\n\taddYears(date: Date, years: number): Date {\n\t\tconst newDate = new Date(date);\n\t\tnewDate.setFullYear(newDate.getFullYear() + years);\n\t\treturn newDate;\n\t}\n\n\t/**\n\t * Subtracts a specified number of days from a date.\n\t *\n\t * @param date - The date from which to subtract days.\n\t * @param days - The number of days to subtract.\n\t * @returns The new date with the subtracted days.\n\t */\n\tsubtractDays(date: Date, days: number): Date {\n\t\treturn this.addDays(date, -days);\n\t}\n\n\t/**\n\t * Subtracts a specified number of months from a date.\n\t *\n\t * @param date - The date from which to subtract months.\n\t * @param months - The number of months to subtract.\n\t * @returns The new date with the subtracted months.\n\t */\n\tsubtractMonths(date: Date, months: number): Date {\n\t\treturn this.addMonths(date, -months);\n\t}\n\n\t/**\n\t * Subtracts a specified number of years from a date.\n\t *\n\t * @param date - The date from which to subtract years.\n\t * @param years - The number of years to subtract.\n\t * @returns The new date with the subtracted years.\n\t */\n\tsubtractYears(date: Date, years: number): Date {\n\t\treturn this.addYears(date, -years);\n\t}\n\n\t/**\n\t * Checks if two dates are on the same day.\n\t *\n\t * @param date1 - The first date.\n\t * @param date2 - The second date.\n\t * @returns True if the dates are on the same day, false otherwise.\n\t */\n\tisSameDay(date1: Date, date2: Date): boolean {\n\t\treturn (\n\t\t\tdate1.getFullYear() === date2.getFullYear() &&\n\t\t\tdate1.getMonth() === date2.getMonth() &&\n\t\t\tdate1.getDate() === date2.getDate()\n\t\t);\n\t}\n\n\t/**\n\t * Returns the ISO week number for a given date.\n\t *\n\t * @param date - The date for which to get the week number.\n\t * @returns The ISO week number (1-53).\n\t */\n\tgetWeekNumber(date: Date): number {\n\t\tconst tempDate = new Date(date.getTime());\n\t\ttempDate.setHours(0, 0, 0, 0);\n\t\t// Set to nearest Thursday: current date + 4 - current day number, making Thursday day 4\n\t\ttempDate.setDate(tempDate.getDate() + 4 - (tempDate.getDay() || 7));\n\t\tconst yearStart = new Date(tempDate.getFullYear(), 0, 1);\n\t\t// Calculate full weeks to nearest Thursday\n\t\treturn Math.ceil(\n\t\t\t((tempDate.getTime() - yearStart.getTime()) / 86400000 + 1) / 7\n\t\t);\n\t}\n\n\t/**\n\t * Returns the number of weeks in a month for a given month and year.\n\t *\n\t * @param month - The month (0-11).\n\t * @param year - The year.\n\t * @returns The number of weeks in the month.\n\t */\n\tgetWeeksInMonth(month: number, year: number): number {\n\t\tconst firstDayOfMonth = new Date(year, month, 1);\n\t\tconst lastDayOfMonth = new Date(year, month + 1, 0);\n\t\t// Get ISO week numbers for the first and last day of the month\n\t\tconst firstWeek = this.getWeekNumber(firstDayOfMonth);\n\t\tlet lastWeek = this.getWeekNumber(lastDayOfMonth);\n\t\t// Special case: when January 1st is in the last week of the previous year\n\t\tif (firstWeek > lastWeek) {\n\t\t\tlastWeek = this.getWeekNumber(new Date(year, 11, 31)); // Get week of the last day of the year\n\t\t}\n\t\treturn lastWeek - firstWeek + 1;\n\t}\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * RtcService handles WebRTC peer connections and local media stream setup.\n * It provides functionality to initialize the user's camera/microphone,\n * manage multiple peer connections, and handle offer/answer negotiation.\n */\n@Injectable({ providedIn: 'root' })\nexport class RtcService {\n\t/**\n\t * Map of peer connections, keyed by peer ID.\n\t */\n\tprivate peers = new Map<string, RTCPeerConnection>();\n\n\t/**\n\t * Local media stream from user's camera and microphone.\n\t */\n\tprivate localStream: MediaStream | null = null;\n\n\t/**\n\t * Initializes the local media stream (audio/video).\n\t * Requests permissions and stores the stream internally.\n\t */\n\tasync initLocalStream(): Promise<MediaStream> {\n\t\tif (!this.localStream) {\n\t\t\tthis.localStream = await navigator.mediaDevices.getUserMedia({\n\t\t\t\tvideo: true,\n\t\t\t\taudio: true\n\t\t\t});\n\t\t}\n\n\t\treturn this.localStream;\n\t}\n\n\t/**\n\t * Creates a new RTCPeerConnection for the given ID and attaches local tracks.\n\t */\n\tasync createPeer(id: string): Promise<RTCPeerConnection> {\n\t\tconst peer = new RTCPeerConnection();\n\n\t\tthis.localStream\n\t\t\t?.getTracks()\n\t\t\t.forEach((track) => peer.addTrack(track, this.localStream!));\n\n\t\tthis.peers.set(id, peer);\n\n\t\treturn peer;\n\t}\n\n\t/**\n\t * Retrieves an existing peer connection by ID.\n\t */\n\tgetPeer(id: string): RTCPeerConnection | undefined {\n\t\treturn this.peers.get(id);\n\t}\n\n\t/**\n\t * Creates an SDP offer for the specified peer and sets it as the local description.\n\t */\n\tasync createOffer(id: string): Promise<RTCSessionDescriptionInit> {\n\t\tconst peer = this.peers.get(id);\n\t\tif (!peer) throw new Error('Peer not found');\n\t\tconst offer = await peer.createOffer();\n\t\tawait peer.setLocalDescription(offer);\n\t\treturn offer;\n\t}\n\n\t/**\n\t * Accepts an SDP offer, creates an answer, and sets it as the local description.\n\t */\n\tasync createAnswer(\n\t\tid: string,\n\t\toffer: RTCSessionDescriptionInit\n\t): Promise<RTCSessionDescriptionInit> {\n\t\tconst peer = this.peers.get(id);\n\t\tif (!peer) throw new Error('Peer not found');\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(offer));\n\t\tconst answer = await peer.createAnswer();\n\t\tawait peer.setLocalDescription(answer);\n\t\treturn answer;\n\t}\n\n\t/**\n\t * Sets the remote description with an SDP answer for the given peer.\n\t */\n\tasync setRemoteAnswer(id: string, answer: RTCSessionDescriptionInit) {\n\t\tconst peer = this.peers.get(id);\n\t\tif (!peer) throw new Error('Peer not found');\n\t\tawait peer.setRemoteDescription(new RTCSessionDescription(answer));\n\t}\n\n\t/**\n\t * Adds an ICE candidate to the specified peer connection.\n\t */\n\taddIceCandidate(id: string, candidate: RTCIceCandidateInit) {\n\t\tconst peer = this.peers.get(id);\n\t\tif (peer) peer.addIceCandidate(new RTCIceCandidate(candidate));\n\t}\n\n\t/**\n\t * Returns the initialized local media stream.\n\t */\n\tgetLocalStream(): MediaStream | null {\n\t\treturn this.localStream;\n\t}\n\n\t/**\n\t * Closes a specific peer connection and removes it from the map.\n\t */\n\tclosePeer(id: string) {\n\t\tconst peer = this.peers.get(id);\n\t\tif (peer) {\n\t\t\tpeer.close();\n\t\t\tthis.peers.delete(id);\n\t\t}\n\t}\n\n\t/**\n\t * Closes all peer connections and stops the local media stream.\n\t */\n\tcloseAll() {\n\t\tthis.peers.forEach((peer) => peer.close());\n\t\tthis.peers.clear();\n\t\tthis.localStream?.getTracks().forEach((track) => track.stop());\n\t\tthis.localStream = null;\n\t}\n}\n\n","/* initialize */\nimport { CONFIG_TOKEN, Config, DEFAULT_CONFIG } from './interfaces/config';\nimport { NgModule, ModuleWithProviders } from '@angular/core';\nimport {\n\tprovideHttpClient,\n\twithInterceptorsFromDi,\n} from '@angular/common/http';\nimport { MetaService } from './services/meta.service';\nimport { MetaGuard } from './guard/meta.guard';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\n/* directives */\nimport { ClickOutsideDirective } from './directives/click-outside.directive';\nconst DIRECTIVES = [ClickOutsideDirective];\n\n/* pipes */\nimport { ArrPipe } from './pipes/arr.pipe';\nimport { SafePipe } from './pipes/safe.pipe';\nimport { SplicePipe } from './pipes/splice.pipe';\nimport { SearchPipe } from './pipes/search.pipe';\nimport { MongodatePipe } from './pipes/mongodate.pipe';\nimport { PaginationPipe } from './pipes/pagination.pipe';\nconst PIPES = [\n\tArrPipe,\n\tSafePipe,\n\tSplicePipe,\n\tSearchPipe,\n\tMongodatePipe,\n\tPaginationPipe,\n];\n\n/* components */\nimport { WrapperComponent } from './components/alert/wrapper/wrapper.component';\nimport { LoaderComponent } from './components/loader/loader.component';\nimport { FilesComponent } from './components/files/files.component';\nimport { ModalComponent } from './components/modal/modal.component';\nimport { AlertComponent } from './components/alert/alert.component';\nconst LOCAL_COMPONENTS = [WrapperComponent, FilesComponent];\nconst COMPONENTS = [LoaderComponent, ModalComponent, AlertComponent];\n\n@NgModule({\n\tdeclarations: [...LOCAL_COMPONENTS, ...PIPES, ...COMPONENTS, ...DIRECTIVES],\n\texports: [...PIPES, ...COMPONENTS, ...DIRECTIVES],\n\timports: [CommonModule, FormsModule],\n\tproviders: [\n\t\t{ provide: CONFIG_TOKEN, useValue: DEFAULT_CONFIG },\n\t\tMetaGuard,\n\t\tMetaService,\n\t\tprovideHttpClient(withInterceptorsFromDi()),\n\t],\n})\nexport class WacomModule {\n\tstatic forRoot(\n\t\tconfig: Config = DEFAULT_CONFIG\n\t): ModuleWithProviders<WacomModule> {\n\t\treturn {\n\t\t\tngModule: WacomModule,\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: CONFIG_TOKEN,\n\t\t\t\t\tuseValue: config,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t}\n}\n","/*\n *\tInterfaces\n */\nexport * from './lib/interfaces/config';\nexport * from './lib/interfaces/alert.interface';\nexport * from './lib/interfaces/modal.interface';\nexport * from './lib/interfaces/crud.interface';\n/*\n *\tGuard\n */\nexport * from './lib/guard/meta.guard';\n/*\n *\tComponents\n */\nexport * from './lib/components/alert/alert.component';\nexport * from './lib/components/modal/modal.component';\nexport * from './lib/components/loader/loader.component';\nexport * from './lib/components/base.component';\nexport * from './lib/components/crud.component';\n/*\n *\tDirectives\n */\nexport * from './lib/directives/click-outside.directive';\n/*\n *\tPipes\n */\nexport * from './lib/pipes/arr.pipe';\nexport * from './lib/pipes/mongodate.pipe';\nexport * from './lib/pipes/pagination.pipe';\nexport * from './lib/pipes/safe.pipe';\nexport * from './lib/pipes/search.pipe';\nexport * from './lib/pipes/splice.pipe';\nexport * from './lib/pipes/split.pipe';\nexport * from './lib/pipes/number.pipe';\n/*\n *\tServices\n */\nexport * from './lib/services/base.service';\nexport * from './lib/services/crud.service';\nexport * from './lib/services/meta.service';\nexport * from './lib/services/store.service';\nexport * from './lib/services/http.service';\nexport * from './lib/services/mongo.service';\nexport * from './lib/services/render.service';\nexport * from './lib/services/hash.service';\nexport * from './lib/services/dom.service';\nexport * from './lib/services/alert.service';\nexport * from './lib/services/loader.service';\nexport * from './lib/services/socket.service';\nexport * from './lib/services/modal.service';\nexport * from './lib/services/file.service';\nexport * from './lib/services/ui.service';\nexport * from './lib/services/core.service';\nexport * from './lib/services/time.service';\nexport * from './lib/services/rtc.service';\n/*\n *\tInitial\n *\n *\tmake different kind of modules, one which import all, other for piece by piece\n */\nexport * from './lib/wacom.module';\n/*\n *\tEnd of Support\n */\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.CoreService","i1.StoreService","i2.HttpService","i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